repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
stonebig/flexx
refs/heads/master
flexx/util/screenshot.py
21
""" Make screenshots of windows on Windows and Linux. We need this to do visual tests. """ import sys if sys.platform.startswith('win'): import ctypes from ctypes import windll from ctypes.wintypes import (BOOL, DOUBLE, DWORD, HBITMAP, HDC, HGDIOBJ, HWND, INT, LPARAM, ...
tkem/mopidy
refs/heads/develop
mopidy/exceptions.py
15
from __future__ import absolute_import, unicode_literals class MopidyException(Exception): def __init__(self, message, *args, **kwargs): super(MopidyException, self).__init__(message, *args, **kwargs) self._message = message @property def message(self): """Reimplement message fie...
andrewyoung1991/abjad
refs/heads/master
abjad/tools/pitchtools/test/test_pitchtools_PitchArray___iadd__.py
2
# -*- encoding: utf-8 -*- from abjad import * def test_pitchtools_PitchArray___iadd___01(): array_1 = pitchtools.PitchArray([[1, 2, 1], [2, 1, 1]]) ''' [] [ ] [] [ ] [] [] ''' array_2 = pitchtools.PitchArray([[3, 4], [4, 3]]) ''' [ ] [ ] [ ] [ ] ...
babyliynfg/cross
refs/heads/master
tools/project-creator/Python2.6.6/Lib/idlelib/ZoomHeight.py
9
# Sample extension: zoom a window to maximum height import re import sys from idlelib import macosxSupport class ZoomHeight: menudefs = [ ('windows', [ ('_Zoom Height', '<<zoom-height>>'), ]) ] def __init__(self, editwin): self.editwin = editwin ...
khamaileon/django-guardian
refs/heads/master
guardian/models.py
45
from __future__ import unicode_literals from django.db import models from django.core.exceptions import ValidationError from django.contrib.auth.models import Group from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from django.contrib.contenttypes.generic impo...
gladsonvm/haystackdemo
refs/heads/master
lib/python2.7/site-packages/django/core/paginator.py
94
from math import ceil class InvalidPage(Exception): pass class PageNotAnInteger(InvalidPage): pass class EmptyPage(InvalidPage): pass class Paginator(object): def __init__(self, object_list, per_page, orphans=0, allow_empty_first_page=True): self.object_list = object_list self.per_pa...
RO-ny9/python-for-android
refs/heads/master
python-modules/twisted/twisted/names/test/test_cache.py
57
# Copyright (c) 2006 Twisted Matrix Laboratories. # See LICENSE for details. import time from twisted.trial import unittest from twisted.names import dns, cache class Caching(unittest.TestCase): def testLookup(self): c = cache.CacheResolver({ dns.Query(name='example.com', type=dns.MX, cls=dn...
mdeemer/XlsxWriter
refs/heads/master
xlsxwriter/test/comparison/test_chart_bar02.py
8
############################################################################### # # Tests for XlsxWriter. # # Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org # from ..excel_comparsion_test import ExcelComparisonTest from ...workbook import Workbook class TestCompareXLSXFiles(ExcelComparisonTest): """...
kwende/jasper
refs/heads/master
client/notifier.py
36
# -*- coding: utf-8-*- import Queue import atexit from modules import Gmail from apscheduler.schedulers.background import BackgroundScheduler import logging class Notifier(object): class NotificationClient(object): def __init__(self, gather, timestamp): self.gather = gather self....
unnikrishnankgs/va
refs/heads/master
venv/lib/python3.5/site-packages/setuptools/py33compat.py
127
import dis import array import collections from setuptools.extern import six OpArg = collections.namedtuple('OpArg', 'opcode arg') class Bytecode_compat(object): def __init__(self, code): self.code = code def __iter__(self): """Yield '(op,arg)' pair for each operation in code object 'code'...
vshymanskyy/Espruino
refs/heads/master
boards/NRF52832DK.py
2
#!/bin/false # This file is part of Espruino, a JavaScript interpreter for Microcontrollers # # Copyright (C) 2013 Gordon Williams <gw@pur3.co.uk> # # 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 h...
gurneyalex/vertical-travel
refs/heads/8.0
travel_rental_car/__openerp__.py
2
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2013 Savoir-faire Linux # (<http://www.savoirfairelinux.com>). # # This program is free software: you can redistribute it and/or m...
boberfly/gaffer
refs/heads/master
python/GafferOSLUI/OSLExpressionEngineUI.py
7
########################################################################## # # Copyright (c) 2017, Image Engine Design Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistrib...
bunnyinc/django-oidc-provider
refs/heads/v0.4.x
oidc_provider/migrations/0001_initial.py
5
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('auth', '0001_initial'), migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operat...
ric2b/Vivaldi-browser
refs/heads/master
chromium/tools/memory_inspector/memory_inspector/core/backends.py
89
# 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. _backends = {} # Maps a string (backend name) to a |Backend| instance. def Register(backend): """Called by each backend module to register upon initiali...
PeridotYouClod/gRPC-Makerboards
refs/heads/master
ClientTestRfBlaster.py
1
import grpc import generated.proto_out.sensors_pb2_grpc as sensors_grpc import generated.proto_out.sensors_pb2 as sensors_pb2 import generated.proto_out.dao_pb2_grpc as dao_pb2 from time import sleep import ProtoConfig def run(): protoConfig = ProtoConfig.getConfig() channel = grpc.insecure_channel('localhost:%s' ...
rruebner/odoo
refs/heads/master
addons/hr_timesheet_invoice/report/report_analytic.py
299
# -*- 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...
mdeger/nest-simulator
refs/heads/master
pynest/nest/tests/test_connect_helpers.py
13
# -*- coding: utf-8 -*- # # test_connect_helpers.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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 Li...
cloud9UG/odoo
refs/heads/8.0
addons/website_sale/models/__init__.py
307
import product import sale_order import payment
googleapis/googleapis-gen
refs/heads/master
google/cloud/automl/v1beta1/automl-v1beta1-py/google/cloud/automl_v1beta1/types/model.py
1
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
dwaynebailey/virtaal
refs/heads/master
virtaal/views/widgets/label_expander.py
6
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2008-2009 Zuza Software Foundation # # This file is part of Virtaal. # # 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 ...
xzzz9097/android_external_skia
refs/heads/lollipop-mr1
platform_tools/android/bin/download_toolchains.py
133
#!/usr/bin/python """Download all toolchains for this platform. This module downloads multiple tgz's. """ import download_utils import sys url = sys.argv[1] filepath = sys.argv[2] try: download_utils.SyncURL(url, filepath) exit(0) except download_utils.HashError, e: exit(1)
webmasterraj/FogOrNot
refs/heads/master
flask/lib/python2.7/site-packages/jmespath/functions.py
21
import math import json import weakref from jmespath import exceptions from jmespath.compat import string_type as STRING_TYPE from jmespath.compat import get_methods # python types -> jmespath types TYPES_MAP = { 'bool': 'boolean', 'list': 'array', 'dict': 'object', 'NoneType': 'null', 'unicode':...
ahuarte47/QGIS
refs/heads/master
tests/src/python/test_qgsfieldcombobox.py
8
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsFieldComboBox .. 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. """ _...
paplorinc/intellij-community
refs/heads/master
python/testData/intentions/PythonDemorganLawIntentionTest/missingOperand.py
22
if a and b <caret>and : pass
metacloud/python-glanceclient
refs/heads/mc/2013.1.6
tests/test_exc.py
1
# Copyright 2012 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
pombredanne/python-lazy-object-proxy
refs/heads/master
setup.py
1
#!/usr/bin/env python # -*- encoding: utf-8 -*- from __future__ import absolute_import, print_function import io import os import re from glob import glob from os.path import basename from os.path import dirname from os.path import join from os.path import relpath from os.path import splitext from setuptools import f...
barrysteyn/pelican-plugins
refs/heads/master
asciidoc_reader/asciidoc_reader.py
24
# -*- coding: utf-8 -*- """ AsciiDoc Reader =============== This plugin allows you to use AsciiDoc to write your posts. File extension should be ``.asc``, ``.adoc``, or ``asciidoc``. """ from pelican.readers import BaseReader from pelican.utils import pelican_open from pelican import signals try: # asciidocapi ...
nemesisdesign/django
refs/heads/master
tests/migrations/test_multidb.py
366
import unittest from django.db import connection, migrations, models from django.db.migrations.state import ProjectState from django.test import override_settings from .test_operations import OperationTestBase try: import sqlparse except ImportError: sqlparse = None class AgnosticRouter(object): """ ...
devs1991/test_edx_docmode
refs/heads/master
venv/lib/python2.7/site-packages/social/backends/douban.py
82
""" Douban OAuth1 and OAuth2 backends, docs at: http://psa.matiasaguirre.net/docs/backends/douban.html """ from social.backends.oauth import BaseOAuth2, BaseOAuth1 class DoubanOAuth(BaseOAuth1): """Douban OAuth authentication backend""" name = 'douban' EXTRA_DATA = [('id', 'id')] AUTHORIZATION_URL...
JoeWoo/grpc
refs/heads/master
src/python/grpcio/grpc/framework/alpha/_face_utilities.py
36
# Copyright 2015, 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 f...
dcroc16/skunk_works
refs/heads/master
google_appengine/lib/django-1.4/django/templatetags/l10n.py
99
from django.template import Node from django.template import TemplateSyntaxError, Library from django.utils import formats from django.utils.encoding import force_unicode register = Library() @register.filter(is_safe=False) def localize(value): """ Forces a value to be rendered as a localized value, regar...
hradec/gaffer
refs/heads/master
python/GafferCortexUI/ParameterValueWidget.py
8
########################################################################## # # Copyright (c) 2011-2012, Image Engine Design Inc. All rights reserved. # Copyright (c) 2012, John Haddon. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided ...
eilarraza/CrimePrevention-
refs/heads/master
scripts/conversion2limpio3.py
1
#!/usr/bin/env python import csv #este programa elimina el campo ID crimen que no es usable reader = csv.reader(open('todos-crimenes2.csv', 'rb')) #print "Crime ID"," Month "," Reported by ","Falls within","Longitude","Latitude","Location","LSOA code","LSOA name","Crime type","Last outcome category","Context" #omito l...
protwis/protwis
refs/heads/master
api/serializers.py
3
from rest_framework import serializers from interaction.models import ResidueFragmentInteraction from mutation.models import MutationRaw from protein.models import Protein, ProteinConformation, ProteinFamily, Species, ProteinSource, ProteinSegment from residue.models import Residue, ResidueNumberingScheme, ResidueGene...
gangadhar-kadam/helpdesk-erpnext
refs/heads/master
erpnext/patches/v6_12/set_overdue_tasks.py
55
import frappe def execute(): frappe.reload_doctype("Task") from erpnext.projects.doctype.task.task import set_tasks_as_overdue set_tasks_as_overdue()
eharney/cinder
refs/heads/master
cinder/tests/unit/test_qos_specs.py
1
# Copyright (c) 2013 eBay Inc. # Copyright (c) 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 # # ...
badbear1727/rur-ple
refs/heads/master
lessons/checktrans.py
4
# (c) 2008 - Peter Maas # v.1.1 # checktrans.py # Little tool to check XML-conformance of the lessons and also # the translated part in percent (need to add lang attributes # to the html tag of completely translated lessons). # GPLv2 from xml.etree import ElementTree as ET import xml.parsers.expat import os ...
wwright2/p2pool
refs/heads/master
p2pool/test/test_data.py
276
import random import unittest from p2pool import data from p2pool.bitcoin import data as bitcoin_data from p2pool.test.util import test_forest from p2pool.util import forest def random_bytes(length): return ''.join(chr(random.randrange(2**8)) for i in xrange(length)) class Test(unittest.TestCase): def test_h...
tomfotherby/tower-cli
refs/heads/master
tests/test_resources_inventory_source.py
3
# Copyright 2015, Ansible, Inc. # Luke Sneeringer <lsneeringer@ansible.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 requi...
shiminasai/ciat_plataforma
refs/heads/master
ficha_granos_basicos/models.py
1
# -*- coding: utf-8 -*- from django.db import models from multiselectfield import MultiSelectField from mapeo.models import Persona from comunicacion.utils import * from sorl.thumbnail import ImageField from ckeditor.fields import RichTextField # Create your models here. #Inicio Ficha monitoreo 1 ---------------------...
hatchetation/freeipa
refs/heads/debian-unstable
ipalib/plugins/migration.py
1
# Authors: # Pavel Zuna <pzuna@redhat.com> # # Copyright (C) 2009 Red Hat # see file 'COPYING' for use and warranty information # # 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 versio...
eino-makitalo/odoo
refs/heads/8.0
openerp/report/printscreen/ps_list.py
381
# -*- 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 GNU...
goofwear/MediaBrowser.Kodi
refs/heads/master
service.py
2
import xbmcaddon import os __settings__ = xbmcaddon.Addon(id='plugin.video.xbmb3c') __cwd__ = __settings__.getAddonInfo('path') BASE_RESOURCE_PATH = xbmc.translatePath( os.path.join( __cwd__, 'resources', 'lib' ) ) sys.path.append(BASE_RESOURCE_PATH) from ServiceModule import Monitor try: Monitor().ServiceEntryP...
idea4bsd/idea4bsd
refs/heads/idea4bsd-master
python/testData/resolve/multiFile/relativeFromInit/deep/down/__init__.py
83
from __future__ import absolute_import from ...rlyeh import monster as cthulhu
simon-r/PyParticles
refs/heads/master
pyparticles/forces/electromagnetic.py
1
# PyParticles : Particles simulation in python # Copyright (C) 2012 Simone Riva # # 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 late...
grigi/talkey
refs/heads/master
talkey/__init__.py
1
''' Simple Test-To-Speech (TTS) interface library with multi-language and multi-engine support. ''' from .tts import Talkey, enumerate_engines, create_engine, TTSError __version__ = '0.1.2'
lepistone/odoo
refs/heads/master
addons/mail/mail_thread.py
2
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2009-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
A-Ketcham/pubTracker
refs/heads/master
forms/models.py
1
from django.db import models from django.contrib.auth.models import User # Create your models here. class UserProfile(models.Model): FIRST = '1' SECOND = '2' THIRD = '3' FOURTH = '4' REG_CHOICES = ( (FIRST, '1'), (SECOND, '2'), (THIRD, '3'), (FOURTH, '4'), ) ALPHA = 'A' BRAVO = 'B' CHARLIE = 'C' D...
goddino/libjingle
refs/heads/master
trunk/tools/gyp/test/rules/src/rule.py
349
#!/usr/bin/env python # Copyright (c) 2011 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. import sys f = open(sys.argv[1] + ".cc", "w") f.write("""\ #include <stdio.h> int main() { puts("Hello %s"); return 0; } """ % sys.argv...
FelixZYY/gyp
refs/heads/master
test/rules-dirname/src/subdir/printvars.py
350
#!/usr/bin/env python # Copyright (c) 2011 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. """ Prints interesting vars """ import sys; out = open(sys.argv[2], 'w') out.write(sys.argv[1]);
TNT-Samuel/Coding-Projects
refs/heads/master
DNS Server/Source/Tools/scripts/fixnotice.py
64
#! /usr/bin/env python3 """(Ostensibly) fix copyright notices in files. Actually, this script will simply replace a block of text in a file from one string to another. It will only do this once though, i.e. not globally throughout the file. It writes a backup file and then does an os.rename() dance for atomicity. ...
VanirAOSP/kernel_samsung_codinalte
refs/heads/L5
tools/perf/scripts/python/netdev-times.py
11271
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
skyddv/neutron
refs/heads/master
neutron/agent/linux/ip_conntrack.py
22
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
vladmm/intellij-community
refs/heads/master
python/helpers/pycharm/tcmessages.py
35
import sys class TeamcityServiceMessages: quote = {"'": "|'", "|": "||", "\n": "|n", "\r": "|r", ']': '|]'} def __init__(self, output=sys.stdout, prepend_linebreak=False): self.output = output self.prepend_linebreak = prepend_linebreak def escapeValue(self, value): if sys.version...
konieboy/Seng_403
refs/heads/master
Gender Computer/unidecode/x0c2.py
253
data = ( 'syon', # 0x00 'syonj', # 0x01 'syonh', # 0x02 'syod', # 0x03 'syol', # 0x04 'syolg', # 0x05 'syolm', # 0x06 'syolb', # 0x07 'syols', # 0x08 'syolt', # 0x09 'syolp', # 0x0a 'syolh', # 0x0b 'syom', # 0x0c 'syob', # 0x0d 'syobs', # 0x0e 'syos', # 0x0f 'syoss', #...
eric-stanley/youtube-dl
refs/heads/master
test/test_aes.py
124
#!/usr/bin/env python from __future__ import unicode_literals # Allow direct execution import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from youtube_dl.aes import aes_decrypt, aes_encrypt, aes_cbc_decrypt, aes_decrypt_text from youtube_dl.utils impo...
Carmezim/tensorflow
refs/heads/master
tensorflow/contrib/factorization/python/ops/factorization_ops_test_utils.py
116
# 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...
BQLQ/BQLQ
refs/heads/master
mezzanine-4.2.3/mezzanine/core/admin.py
2
from __future__ import unicode_literals from copy import deepcopy from django.contrib import admin from django.contrib.auth import get_user_model from django.contrib.auth.admin import UserAdmin from django.contrib.auth.models import User as AuthUser from django.contrib.redirects.admin import RedirectAdmin from django...
ol-loginov/intellij-community
refs/heads/master
python/testData/codeInsight/smartEnter/docEpytext.py
166
def foo(a, b): """<caret> pass def foo1(): """ :return : """
aliunsal/blog
refs/heads/master
Users/admin.py
13848
from django.contrib import admin # Register your models here.
yasoob/PythonRSSReader
refs/heads/master
venv/lib/python2.7/dist-packages/Crypto/Random/OSRNG/fallback.py
138
# # Random/OSRNG/fallback.py : Fallback entropy source for systems with os.urandom # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to ...
Emilgardis/falloutsnip
refs/heads/develop
Vendor/IronPython/Lib/encodings/cp852.py
593
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP852.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors='strict'): ...
lowRISC/micropython
refs/heads/master
tests/wipy/pin.py
65
""" This test need a set of pins which can be set as inputs and have no external pull up or pull down connected. GP12 and GP17 must be connected together """ from machine import Pin import os mch = os.uname().machine if 'LaunchPad' in mch: pin_map = ['GP24', 'GP12', 'GP14', 'GP15', 'GP16', 'GP17', 'GP28', 'GP8'...
Mistobaan/tensorflow
refs/heads/master
tensorflow/python/keras/_impl/keras/datasets/boston_housing.py
8
# 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...
cedadev/jasmin_cis
refs/heads/master
cis/time_util.py
2
""" Utilities for converting time units """ from cf_units import Unit cis_standard_time_unit = Unit('days since 1600-01-01 00:00:00', calendar='gregorian') class PartialDateTime(object): """ A :class:`PartialDateTime` object specifies values for some subset of the calendar/time fields (year, month, hour,...
b-me/django
refs/heads/master
django/conf/locale/vi/formats.py
619
# -*- 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 = r'\N\gà\y d \t\há\n\g n \nă\m Y' T...
hujiajie/chromium-crosswalk
refs/heads/master
third_party/WebKit/Tools/Scripts/webkitpy/common/system/executive_mock.py
20
# 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 f...
pilou-/ansible
refs/heads/devel
lib/ansible/modules/network/onyx/onyx_vlan.py
57
#!/usr/bin/python # # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
trabucayre/gnuradio
refs/heads/master
grc/core/utils/backports/__init__.py
6
# Copyright 2016 Free Software Foundation, Inc. # # This file is part of GNU Radio # # SPDX-License-Identifier: GPL-3.0-or-later # try: from collections import ChainMap except ImportError: from .chainmap import ChainMap
cuedpc/edpcmentoring
refs/heads/master
edpcmentoring/matching/migrations/0004_allow_responses_to_be_blank.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-12 10:43 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('matching', '0003_rename_invitation_fields'), ] operations = [ migrations.Alt...
timpalpant/calibre
refs/heads/master
src/css_selectors/ordered_set.py
16
#!/usr/bin/env python2 # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2015, Kovid Goyal <kovid at kovidgoyal.net>' import collections SLICE_ALL = slice(None) def is_iterable(obj): """ ...
minesense/VisTrails
refs/heads/master
vistrails/gui/modules/tuple_configuration.py
2
############################################################################### ## ## Copyright (C) 2014-2016, New York University. ## Copyright (C) 2011-2014, NYU-Poly. ## Copyright (C) 2006-2011, University of Utah. ## All rights reserved. ## Contact: contact@vistrails.org ## ## This file is part of VisTrails. ## ## ...
GbalsaC/bitnamiP
refs/heads/master
venv/lib/python2.7/site-packages/pylint/test/input/func_typecheck_non_callable_call.py
4
# pylint: disable=R0903,missing-docstring,no-self-use """ 'E1102': ('%s is not callable', 'Used when an object being called has been infered to a non \ callable object'), """ __revision__ = None __revision__() def correct(): """callable object""" return 1 __revision__ = corre...
kostyfisik/fdtd-1d
refs/heads/master
fdtd-step2-pml05.py
1
#!/usr/bin/env python # -*- coding: UTF-8 -*- # # Copyright (C) 2015 Konstantin Ladutenko <kostyfisik@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 o...
jonathanmeier5/teamstore
refs/heads/master
saleor/userprofile/migrations/0008_auto_20161115_1011.py
7
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-11-15 16:11 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('userprofile', '0007_auto_20161115_0940'), ] operations = [ migrations.Alter...
tyler6389/android_kernel_samsung_v700
refs/heads/cm-12.1
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
snasoft/QtCreatorPluginsPack
refs/heads/master
Bin/3rdParty/vera/bin/lib/lib2to3/tests/data/bom.py
293
# coding: utf-8 print "BOM BOOM!"
gstreamer-sharp/gstreamer-sharp
refs/heads/master
update_sources.py
2
#!/usr/bin/env python3 import subprocess import os import sys import shutil def accept_command(commands): """Search @commands and returns the first found absolute path.""" for command in commands: command = shutil.which(command) if command: return command return None if __nam...
denis-pitul/django
refs/heads/master
tests/model_permalink/models.py
543
from django.db import models def set_attr(name, value): def wrapper(function): setattr(function, name, value) return function return wrapper class Guitarist(models.Model): name = models.CharField(max_length=50) slug = models.CharField(max_length=50) @models.permalink def url...
da2ce7/cjdns
refs/heads/master
node_build/dependencies/libuv/build/gyp/test/prune_targets/gyptest-prune-targets.py
47
#!/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 --root-target removes the unnecessary targets. """ import TestGyp test = TestGyp.TestGyp() # The xcode-ninja generator has it...
maniteja123/numpy
refs/heads/master
numpy/doc/internals.py
91
""" =============== Array Internals =============== Internal organization of numpy arrays ===================================== It helps to understand a bit about how numpy arrays are handled under the covers to help understand numpy better. This section will not go into great detail. Those wishing to understand the ...
micropython/micropython
refs/heads/master
docs/readthedocs/settings/local_settings.py
115
import os # Directory that the project lives in, aka ../.. SITE_ROOT = '/'.join(os.path.dirname(__file__).split('/')[0:-2]) TEMPLATE_DIRS = ( "%s/templates/" % SITE_ROOT, # Your custom template directory, before the RTD one to override it. "%s/readthedocs/templates/" % SITE_ROOT, # Default RTD template dir )
cbitstech/Purple-Robot-Django
refs/heads/master
migrations/0030_auto__add_index_purplerobotreading_logged_user_id.py
1
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding index on 'PurpleRobotReading', fields ['logged', 'user_id'] db.c...
mewtaylor/django
refs/heads/master
tests/m2m_recursive/tests.py
424
from __future__ import unicode_literals from operator import attrgetter from django.test import TestCase from .models import Person class RecursiveM2MTests(TestCase): def setUp(self): self.a, self.b, self.c, self.d = [ Person.objects.create(name=name) for name in ["Anne", "Bill"...
tweemeterjop/thug
refs/heads/master
thug/DOM/W3C/Style/CSS/ElementCSSInlineStyle.py
2
#!/usr/bin/env python from .CSSStyleDeclaration import CSSStyleDeclaration class ElementCSSInlineStyle(object): def __init__(self, doc, tag): self.doc = doc self.tag = tag @property def style(self): return CSSStyleDeclaration(self.tag['style'] if self.tag.has_attr('style') else '...
labcodes/django
refs/heads/master
tests/file_storage/urls.py
452
from django.conf.urls import url from django.http import HttpResponse urlpatterns = [ url(r'^$', lambda req: HttpResponse('example view')), ]
gwparikh/cvgui
refs/heads/master
imageselector.py
2
#!/usr/bin/env python """A script for running a cvTrajOverlay player with a video, and optionally adding overlay from database of trajectory data..""" import os, sys, time, argparse, traceback import rlcompleter, readline import threading import multiprocessing import numpy as np from cvguipy import cvgui # Entry po...
cinnamoncoin/Feathercoin
refs/heads/master-0.8
contrib/bitrpc/bitrpc.py
7
from jsonrpc import ServiceProxy import sys import string # ===== BEGIN USER SETTINGS ===== # if you do not set these you will be prompted for a password for every command rpcuser = "" rpcpass = "" # ====== END USER SETTINGS ====== if rpcpass == "": access = ServiceProxy("http://127.0.0.1:9337") else: access = Ser...
sebrandon1/nova
refs/heads/master
tools/install_venv.py
123
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2010 OpenStack Foundation # Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this...
turbokongen/home-assistant
refs/heads/dev
tests/components/no_ip/__init__.py
39
"""Tests for the no_ip component."""
duhzecca/cinder
refs/heads/master
cinder/db/sqlalchemy/migrate_repo/versions/048_add_allocated_in_quotas.py
20
# Copyright 2015 Yahoo 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 ...
rezometz/django-paiji2-shoutbox
refs/heads/master
testsettings.py
1
import django.conf.global_settings as DEFAULT_SETTINGS from django.core.urlresolvers import reverse import os BASE_DIR = os.path.dirname(__file__) SECRET_KEY = 'tsktsktsk' DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', }, } TEMPLATE_CONTEXT_PROCESSORS...
putcn/Paddle
refs/heads/develop
python/paddle/fluid/graphviz.py
5
# Copyright (c) 2018 PaddlePaddle 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 app...
tvibliani/odoo
refs/heads/8.0
addons/account/wizard/account_fiscalyear_close_state.py
297
# -*- 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...
pavelchristof/gomoku-ai
refs/heads/master
tensorflow/contrib/opt/python/training/external_optimizer_test.py
30
# 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...
rfbsoft/polievanie_kernel
refs/heads/polievanie
tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
# failed system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
DecipherOne/Troglodyte
refs/heads/master
Trog Build Dependencies/Python26/Lib/encodings/euc_jis_2004.py
816
# # euc_jis_2004.py: Python Unicode Codec for EUC_JIS_2004 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_jp, codecs import _multibytecodec as mbc codec = _codecs_jp.getcodec('euc_jis_2004') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(m...
ShinySide/SM-A700F
refs/heads/master
tools/perf/scripts/python/netdev-times.py
11271
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
BhupeshGupta/frappe
refs/heads/develop
frappe/core/doctype/comment/__init__.py
2292
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals