repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
chrisdearman/micropython
refs/heads/master
tests/basics/subclass_classmethod.py
41
# Calling an inherited classmethod class Base: @classmethod def foo(cls): print(cls.__name__) try: Base.__name__ except AttributeError: print("SKIP") raise SystemExit class Sub(Base): pass Sub.foo() # overriding a member and accessing it via a classmethod class A(object): foo ...
pawelmhm/scrapy
refs/heads/master
scrapy/linkextractors/lxmlhtml.py
6
""" Link extractor based on lxml.html """ import operator from functools import partial from urllib.parse import urljoin import lxml.etree as etree from w3lib.html import strip_html5_whitespace from w3lib.url import canonicalize_url, safe_url_string from scrapy.link import Link from scrapy.linkextractors import Filte...
wsszczecin/python_training
refs/heads/master
test/test_modify_contact.py
1
# -*- coding: utf-8 -*- from model.contact import Contact from random import randrange def test_modify_contact_name(app,db,check_ui): if len(db.get_group_list()) == 0: app.contact.create(Contact(firstname="test")) old_contacts = db.get_contact_list() index = randrange(len(old_contacts)) contac...
mdrumond/tensorflow
refs/heads/master
tensorflow/contrib/image/python/ops/distort_image_ops.py
68
# 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...
SNAPPETITE/backend
refs/heads/master
flask/lib/python2.7/site-packages/pip/utils/setuptools_build.py
173
# Shim to wrap setup.py invocation with setuptools SETUPTOOLS_SHIM = ( "import setuptools, tokenize;__file__=%r;" "exec(compile(getattr(tokenize, 'open', open)(__file__).read()" ".replace('\\r\\n', '\\n'), __file__, 'exec'))" )
3mb3dw0rk5/upsp_status
refs/heads/master
upsp_status/version.py
2
__version__= '0.1.0'
aallai/gini
refs/heads/master
share/gbuilder/UI/DropBar.py
11
"""The drag and drop toolbar""" from PyQt4 import QtCore, QtGui from Node import * from Core.globals import options from Dockable import * class DropArea(QtGui.QGraphicsView): def __init__(self, itemTypes): """ Create a page of droppable nodes. """ QtGui.QGraphicsView._...
freakboy3742/django-push-notifications
refs/heads/master
push_notifications/management/__init__.py
12133432
dpnova/txmemcache
refs/heads/master
txmemcache/__init__.py
12133432
lcpt/xc
refs/heads/master
python_modules/postprocess/xcVtk/__init__.py
12133432
shubhamgupta123/erpnext
refs/heads/master
erpnext/manufacturing/doctype/material_request_plan_item/__init__.py
12133432
tlksio/tlksio
refs/heads/develop
env/lib/python3.4/site-packages/django/contrib/sessions/migrations/__init__.py
12133432
smarthall/MetricsAtHome
refs/heads/master
metricsathome/Drivers/.__init__.py
12133432
agronholm/ircproto
refs/heads/master
tests/test_connection.py
12133432
EmmaIshta/QUANTAXIS
refs/heads/master
QUANTAXIS/QAData/data_fq.py
1
# coding:utf-8 # # The MIT License (MIT) # # Copyright (c) 2016-2017 yutiansut/QUANTAXIS # # 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 th...
zaqwes8811/matlab_ext
refs/heads/master
measurement/mc-assistant/projects/py_hw_models/trash/ShiftModel.py
1
#!/usr/bin/python #-*- coding: utf-8 -*- import ui import api_convertors.float32_conv as f32_conv import api_convertors.type_conv as tc import math from api_dbg.doColoredConsole import co def hexWordToInt( hexWord ): sum = 0 for pos in range( 0, len( hexWord ) ): oneIt = tc.hex2int( hexWord[ pos ] )*math.pow( 16...
cdent/tank
refs/heads/master
test/test_tag_list.py
1
""" Test that we can get a reasonable list of tags from the data source of /tags """ import shutil from tiddlyweb.model.bag import Bag from tiddlyweb.model.tiddler import Tiddler from tiddlyweb.config import config from tiddlywebplugins.utils import get_store from tiddlywebplugins.tank.search import get_indexed_tag...
abimannans/scikit-learn
refs/heads/master
sklearn/cluster/mean_shift_.py
96
"""Mean shift clustering algorithm. Mean shift clustering aims to discover *blobs* in a smooth density of samples. It is a centroid based algorithm, which works by updating candidates for centroids to be the mean of the points within a given region. These candidates are then filtered in a post-processing stage to elim...
digdoritos/gimp
refs/heads/master
plug-ins/script-fu/servertest.py
16
#!/usr/bin/env python import readline, socket, sys if len(sys.argv) < 1 or len(sys.argv) > 3: print >>sys.stderr, "Usage: %s <host> <port>" % sys.argv[0] print >>sys.stderr, " (if omitted connect to localhost, port 10008)" sys.exit(1) HOST = "localhost" PORT = 10008 try: HOST = sys.argv[1] tr...
thedep2/CouchPotatoServer
refs/heads/develop
libs/requests/packages/charade/langthaimodel.py
2929
######################## 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...
AgentVi/DIGITS
refs/heads/master
digits/utils/constants.py
5
# Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. # Datasets TRAIN_FILE = 'train.txt' TRAIN_DB = 'train_db' VAL_FILE = 'val.txt' VAL_DB = 'val_db' TEST_FILE = 'test.txt' TEST_DB = 'test_db' MEAN_FILE_IMAGE = 'mean.jpg' # Classification jobs LABELS_FILE = 'labels.txt' DEFAULT_BATCH_SIZE = 16 # Caff...
glorizen/nupic
refs/heads/master
examples/opf/experiments/multistep/hotgym_best_sp_16K/description.py
32
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
yufengg/tensorflow
refs/heads/master
tensorflow/python/training/__init__.py
12133432
tomchristie/django
refs/heads/master
django/contrib/sitemaps/management/__init__.py
12133432
akaihola/django
refs/heads/master
tests/regressiontests/i18n/other/__init__.py
12133432
jesramirez/odoo
refs/heads/8.0
openerp/report/render/rml2pdf/utils.py
381
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2003, Fabien Pinckaers, UCL, FSA # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesse...
ijanos/advent2015
refs/heads/master
python/day20/part1_2.py
1
from itertools import count houses = [] for x in range(1000000): houses.append(0) for i in range(1,len(houses)): for j in range(i,len(houses),i): houses[j] += i * 10 if houses[j] >= 34000000: print(j) exit()
nagnath006/Soccer-Analytics
refs/heads/master
Soccer-Analytics/Lib/site-packages/wheel/test/simple.dist/setup.py
565
from setuptools import setup try: unicode def u8(s): return s.decode('unicode-escape').encode('utf-8') except NameError: def u8(s): return s.encode('utf-8') setup(name='simple.dist', version='0.1', description=u8('A testing distribution \N{SNOWMAN}'), packages=['simpledis...
holmboe/hyde
refs/heads/master
tests/__init__.py
62
""" 1. Can build a sitemap from a folder 1.1 Number of nodes 1.2 Number of pages in each node 1.3 Node Attributes 1.3.1 Url 1.3.2 Full Url 1.3.3 Source Folder 1.3.4 Temp Folder 1.3.5 Target Folder 1.3.6 Listing Page 1.4 Page Attributes 1.4.1 Ti...
wraiden/spacewalk
refs/heads/master
client/rhel/rhn-client-tools/src/up2date_client/messageWindow.py
6
import gtk import gettext t = gettext.translation('rhn-client-tools', fallback=True) # Python 3 translations don't have a ugettext method if not hasattr(t, 'ugettext'): t.ugettext = t.gettext _ = t.ugettext # wrap a long line... def wrap_line(line, max_line_size = 100): if len(line) < max_line_size: ...
ol-loginov/intellij-community
refs/heads/master
python/lib/Lib/mimetypes.py
92
"""Guess the MIME type of a file. This module defines two useful functions: guess_type(url, strict=1) -- guess the MIME type and encoding of a URL. guess_extension(type, strict=1) -- guess the extension for a given MIME type. It also contains the following, for tuning the behavior: Data: knownfiles -- list of fil...
kenshay/ImageScripter
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/OpenGL/raw/GLES3/__init__.py
8
from OpenGL.raw.GLES3._types import * from OpenGL.GLES3.VERSION.GLES3_3_0 import *
akshatharaj/django
refs/heads/master
tests/staticfiles_tests/urls/__init__.py
12133432
Breta01/handwriting-ocr
refs/heads/master
src/data/datasets/__init__.py
12133432
pcabido/socorro
refs/heads/master
socorro/unittest/external/statsd/__init__.py
12133432
jmehnle/ansible
refs/heads/devel
test/runner/lib/delegation.py
24
"""Delegate test execution to another environment.""" from __future__ import absolute_import, print_function import os import re import sys import tempfile import lib.pytar import lib.thread from lib.executor import ( SUPPORTED_PYTHON_VERSIONS, IntegrationConfig, ShellConfig, SanityConfig, Units...
rr-/szurubooru
refs/heads/master
server/szurubooru/api/pool_api.py
1
from datetime import datetime from typing import Dict, List, Optional from szurubooru import db, model, rest, search from szurubooru.func import auth, pools, serialization, snapshots, versions _search_executor = search.Executor(search.configs.PoolSearchConfig()) def _serialize(ctx: rest.Context, pool: model.Pool) -...
INM-6/python-gymz
refs/heads/master
gymz/misc.py
1
# -*- coding: utf-8 -*- import collections import json import logging import os import sys import time def read_default_config(): """Reads the default configuration file""" with open(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'DefaultConfig.json'), 'r') as f: return json.load(f) def r...
ahb0327/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/conf/locale/it/formats.py
232
# -*- 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 = 'd F Y' # 25 Ottobre 2006 TIME_FORMAT = 'H:i:s' # 14:30:59 DATETIME_FORMAT...
danielmartin/swift
refs/heads/master
utils/protocol_graph.py
48
# ===--- protocol_graph.py ---------------------------*- coding: utf-8 -*-===// # # This source file is part of the Swift.org open source project # # Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors # Licensed under Apache License v2.0 with Runtime Library Exception # # See https://swift.org/LICENSE.t...
altaris/kappak
refs/heads/master
src/generate.py
1
#!/usr/bin/env python3 """Main file.""" import json from generate_autocompletion import ( generate_autocompletion ) from generate_doc import ( generate_doc ) from generate_sty import ( generate_sty ) PARAMETER_FILE = 'kappak.json' def main() -> None: """Main function.""" with open(PARAMETER_F...
Kingdread/qutebrowser
refs/heads/master
tests/unit/utils/test_log.py
7
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
abhishek-ch/hue
refs/heads/master
desktop/core/ext-py/cx_Oracle-5.1.2/test/uCursorVar.py
34
"""Module for testing cursor variables.""" import struct import sys class TestCursorVar(BaseTestCase): def testBindCursor(self): "test binding in a cursor" cursor = self.connection.cursor() self.failUnlessEqual(cursor.description, None) self.cursor.execute(u""" beg...
wemanuel/smry
refs/heads/master
smry/server-auth/ls/google-cloud-sdk/.install/.backup/lib/dns/ttl.py
248
# Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
fhe-odoo/odoo
refs/heads/8.0
addons/l10n_th/__openerp__.py
170
# -*- 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...
nw328/bioCode
refs/heads/master
diveintopython-5.4/py/search.py
3
"""Search Google from the command line This program is part of "Dive Into Python", a free Python book for experienced programmers. Visit http://diveintopython.org/ for the latest version. """ __author__ = "Mark Pilgrim (mark@diveintopython.org)" __version__ = "$Revision: 1.2 $" __date__ = "$Date: 2004/05/20...
NeoCN/jaeger
refs/heads/master
plugin/storage/es/esCleaner.py
3
import elasticsearch import curator import logging import sys import os def main(): if len(sys.argv) == 1: print('USAGE: [TIMEOUT=(default 120)] %s NUM_OF_DAYS HOSTNAME[:PORT] ...' % sys.argv[0]) sys.exit(1) client = elasticsearch.Elasticsearch(sys.argv[2:]) ilo = curator.IndexList(clien...
projectcalico/calico-nova
refs/heads/calico-readme
nova/tests/unit/virt/hyperv/test_rdpconsoleutilsv2.py
83
# Copyright 2013 Cloudbase Solutions Srl # # 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 ...
wroersma/volatility
refs/heads/master
volatility/plugins/envars.py
12
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # Copyright (c) 2012 Michael Ligh <michael.ligh@mnin.org> # # This file is part of Volatility. # # Volatility 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 Fo...
spektom/incubator-airflow
refs/heads/master
airflow/models/dagpickle.py
13
# # 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...
DeadNumbers/agginj
refs/heads/master
packets.py
3
from scapy.all import sr1, sr, srp1, send, sendp, hexdump, ETH_P_IP from scapy.layers.inet import Raw, Ether, TCP, IP, ICMP, ARP from scapy.layers.dot11 import Dot11, LLC, SNAP, RadioTap, Dot11Beacon, Dot11Elt, Dot11ProbeResp from constants import * from rpyutils import get_frequency, printd, Color, Level, clr, hex_off...
sda2b/youtube-dl
refs/heads/master
youtube_dl/extractor/m6.py
147
# encoding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class M6IE(InfoExtractor): IE_NAME = 'm6' _VALID_URL = r'http://(?:www\.)?m6\.fr/[^/]+/videos/(?P<id>\d+)-[^\.]+\.html' _TEST = { 'url': 'http://www.m6.fr/emission-les_reines_du_shopping/videos...
vincepandolfo/django
refs/heads/master
tests/admin_scripts/custom_templates/app_template/api.py
581
# your API code
jpopelka/Fedora-Dockerfiles
refs/heads/master
python/index.py
34
import web urls = ( '/', 'index' ) class index: def GET(self): return "Hello world!" if __name__ == "__main__": app = web.application(urls, globals()) app.run()
JioEducation/edx-platform
refs/heads/master
openedx/core/djangoapps/user_api/migrations/__init__.py
12133432
shenson/cobbler
refs/heads/master
tests/cli/imports/test_freebsd/__init__.py
12133432
mtustin-handy/airflow
refs/heads/master
airflow/__init__.py
4
""" Authentication is implemented using flask_login and different environments can implement their own login mechanisms by providing an `airflow_login` module in their PYTHONPATH. airflow_login should be based off the `airflow.www.login` """ from builtins import object __version__ = "1.6.1" import logging import os im...
cgstudiomap/cgstudiomap
refs/heads/develop
main/parts/odoo/addons/base_action_rule/tests/base_action_rule_test.py
395
from openerp import SUPERUSER_ID from openerp.tests import common from .. import test_models class base_action_rule_test(common.TransactionCase): def setUp(self): """*****setUp*****""" super(base_action_rule_test, self).setUp() cr, uid = self.cr, self.uid self.demo = self.registry(...
joey545/twilio-hackpack
refs/heads/master
setup.py
5
#!/usr/bin/env python from setuptools import setup setup(name='hackpack', version='2.0', author='Rob Spectre', author_email='help@twilio.com', description='A sample project for deploying Twilio to Heroku with Flask', include_package_data=True, zip_safe=False, packages=['hackpa...
rsvip/Django
refs/heads/master
django/core/cache/backends/locmem.py
586
"Thread-safe in-memory cache backend." import time from contextlib import contextmanager from django.core.cache.backends.base import DEFAULT_TIMEOUT, BaseCache from django.utils.synch import RWLock try: from django.utils.six.moves import cPickle as pickle except ImportError: import pickle # Global in-memor...
jbedorf/tensorflow
refs/heads/master
tensorflow/contrib/tfprof/model_analyzer.py
79
# 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...
zycdragonball/tensorflow
refs/heads/master
tensorflow/python/platform/app.py
75
# 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...
nitzmahone/ansible
refs/heads/devel
test/units/modules/network/dellos10/test_dellos10_facts.py
56
# (c) 2016 Red Hat Inc. # # (c) 2017 Dell EMC. # # 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 vers...
linked67/p2pool-cryptcoin
refs/heads/master
wstools/XMLSchema.py
289
# Copyright (c) 2003, The Regents of the University of California, # through Lawrence Berkeley National Laboratory (subject to receipt of # any required approvals from the U.S. Dept. of Energy). All rights # reserved. # # Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved. # # This software is ...
rasata/ansible
refs/heads/devel
lib/ansible/utils/module_docs.py
75
#!/usr/bin/env python # (c) 2012, Jan-Piet Mens <jpmens () gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your...
wreckJ/intellij-community
refs/heads/master
python/helpers/pydev/third_party/pep8/lib2to3/lib2to3/fixes/fix_raw_input.py
326
"""Fixer that changes raw_input(...) into input(...).""" # Author: Andre Roberge # Local imports from .. import fixer_base from ..fixer_util import Name class FixRawInput(fixer_base.BaseFix): BM_compatible = True PATTERN = """ power< name='raw_input' trailer< '(' [any] ')' > any* > ...
EvilKhaosKat/yau_blog
refs/heads/master
yau_blog/settings.py
1
# coding: utf-8 """ Django settings for yau_blog project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(...
k3nnyfr/s2a_fr-nsis
refs/heads/master
s2a/Python/Lib/idlelib/IOBinding.py
8
# changes by dscherer@cmu.edu # - IOBinding.open() replaces the current window with the opened file, # if the current window is both unmodified and unnamed # - IOBinding.loadfile() interprets Windows, UNIX, and Macintosh # end-of-line conventions, instead of relying on the standard library, # which will...
scorphus/django
refs/heads/master
django/views/decorators/__init__.py
12133432
tomadasocial/tomada-social
refs/heads/master
tomadasocial/__init__.py
12133432
zzxuanyuan/root
refs/heads/master
tutorials/tmva/keras/ApplicationRegressionKeras.py
20
#!/usr/bin/env python from ROOT import TMVA, TFile, TString from array import array from subprocess import call from os.path import isfile # Setup TMVA TMVA.Tools.Instance() TMVA.PyMethodBase.PyInitialize() reader = TMVA.Reader("Color:!Silent") # Load data if not isfile('tmva_reg_example.root'): call(['curl', '-...
glenn-edgar/local_controller_3
refs/heads/master
__backup__/flask_web/werkzeug-master/examples/coolmagic/helpers.py
44
# -*- coding: utf-8 -*- """ coolmagic.helpers ~~~~~~~~~~~~~~~~~ The star-import module for all views. :copyright: (c) 2009 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from coolmagic.utils import Response, TemplateResponse, ThreadedRequest, \...
BarcampBangalore/Barcamp-Bangalore-Android-App
refs/heads/master
gcm_flask/werkzeug/testsuite/debug.py
74
# -*- coding: utf-8 -*- """ werkzeug.testsuite.debug ~~~~~~~~~~~~~~~~~~~~~~~~ Tests some debug utilities. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import unittest import sys import re from werkzeug.testsuite import WerkzeugTestCase from werkzeug.de...
nlhepler/shorah
refs/heads/master
pythonlib/matching.py
1
# Hopcroft-Karp bipartite max-cardinality matching and max independent set # David Eppstein, UC Irvine, 27 Apr 2002 # http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/123641 #Example from Cormen, Leiserson, and Rivest, section 27.3: #a = bipartiteMatch({ 0:[0], 1:[0,2], 2:[1,2,3], 3:[2], 4:[2] }) def bipartit...
TurboTracker/-altstation-yo
refs/heads/master
bot/C_makequote.py
67
from save_load import save from os import listdir import CORE_DATA directory = CORE_DATA.directory def mkquote(prefix,influx,sender,debug): arg = influx[10+len(prefix):] if debug: print sender+":"+prefix+"makequote "+str(len(arg))+" Characters" if len(arg) == 0: return("Type something to a quote") else:...
hoosteeno/mozillians
refs/heads/master
mozillians/users/migrations/0068_auto__chg_field_vouch_voucher.py
3
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Vouch.voucher' db.alter_column(u'users_vouch', 'voucher_id', self.gf('django.db.models.fi...
trtd/faker
refs/heads/master
faker/providers/company/zh_TW/__init__.py
19
# -*- coding: utf-8 -*- from __future__ import unicode_literals from .. import Provider as CompanyProvider class Provider(CompanyProvider): formats = ("{{company_prefix}}{{company_suffix}}", ) company_prefixes = ( "品王餐飲", "一統企業", "品誠", "台灣電信", "Goagle", "一統星巴克", "台日積體電路", "榮長航空", "台灣印...
alexgibson/bedrock
refs/heads/master
tests/redirects/map_locales.py
9
# -*- coding: utf-8 -*- from .base import flatten, url_test # supported locales LOCALES = [ 'ar', 'ast', 'bg', 'ca', 'cs', 'de', 'dsb', 'el', 'en-GB', 'en-US', 'es-CL', 'es-ES', 'fr', 'fy-NL', 'gd', 'it', 'ja', 'ko', 'nl', 'pt-BR', 'pt-PT', 'ru', 'son', 'sv-SE', 'ta', 'tr', 'uk', 'zh-CN', 'zh-TW'] # List...
yongshengwang/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/custom_columns/models.py
114
""" 17. Custom column/table names If your database column name is different than your model attribute, use the ``db_column`` parameter. Note that you'll use the field's name, not its column name, in API usage. If your database table name is different than your model name, use the ``db_table`` Meta attribute. This has...
SimenB/thefuck
refs/heads/master
thefuck/rules/quotation_marks.py
21
# Fixes careless " and ' usage # # Example: # > git commit -m 'My Message" def match(command): return '\'' in command.script and '\"' in command.script def get_new_command(command): return command.script.replace('\'', '\"')
Axelio/pyrecep
refs/heads/master
visitas/admin.py
1
from django.contrib import admin from models import Visita class VisitaAdmin(admin.ModelAdmin): list_display = ('persona', 'institucion', 'proyecto', 'fecha') list_filter = ('institucion', 'proyecto', 'fecha') admin.site.register(Visita, VisitaAdmin)
arthurdarcet/tornado
refs/heads/master
tornado/auth.py
1
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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...
be-cloud-be/horizon-addons
refs/heads/9.0
web/web_notify/models/res_users.py
1
# -*- coding: utf-8 -*- # Copyright 2016 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). from openerp import api, fields, models, _ class ResUsers(models.Model): _inherit = 'res.users' @api.multi @api.depends('create_date') def _compute_channel_names(self): for ...
wackerl91/luna
refs/heads/develop
resources/lib/routing/route.py
1
import yaml class Route(yaml.YAMLObject): """Symbolic base class for routes""" yaml_tag = u'!route' def __init__(self, service_name, class_name, service, prefix): self.service_name = service_name self.class_name = class_name self.service = service self.prefix = prefix ...
ktosiek/ansible
refs/heads/devel
docsite/build-site.py
35
#!/usr/bin/env python # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of the Ansible Documentation # # 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 th...
mmadsen/CTPy
refs/heads/master
ctpy/data/trait_count_sample.py
1
""" .. module:: trait_count_sample :platform: Unix, Windows :synopsis: Data object for storing a sample of trait counts (across all loci) in MongoDB, via the Ming ORM. .. moduleauthor:: Mark E. Madsen <mark@madsenlab.org> """ import logging as log from ming import Session, Field, schema from ming.declarative ...
danieljaouen/ansible
refs/heads/devel
lib/ansible/modules/network/cloudengine/ce_ntp_auth.py
43
#!/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...
shodimaggio/piavatar_ros
refs/heads/master
src/buzzer2.py
5
#!/usr/bin/env python import rospy from std_msgs.msg import UInt16 def recv_buzzer(data): rospy.loginfo(type(data)) rospy.loginfo(data.data) if __name__ == '__main__': rospy.init_node('buzzer') rospy.Subscriber("buzzer", UInt16, recv_buzzer) rospy.spin()
slogan621/tscharts
refs/heads/master
apps/tsdashboard/photoctrl.py
2
#(C) Copyright Syd Logan 2020 #(C) Copyright Thousand Smiles Foundation 2020 # #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 a...
stackforge/python-blazarclient
refs/heads/master
blazarclient/tests/v1/shell_commands/test_leases.py
1
# Copyright (c) 2017 NTT Corp. # # 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,...
jonashaag/django-autocomplete-light
refs/heads/master
test_grappelli/admin_test_autocomplete/autocomplete_light_registry.py
9
import autocomplete_light from models import Foo, Bar autocomplete_light.register(Foo) autocomplete_light.register(Bar)
dimagi/rapidsms
refs/heads/master
setup.py
2
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 from setuptools import setup, find_packages setup( name="RapidSMS", version="0.9.6a", license="BSD", install_requires = [ "django", "django-nose", "djtables", "djappsettings" ], scripts = ["bin/rapidsms-admi...
jiasir/pycs
refs/heads/master
vulpo/pyami/installers/ubuntu/__init__.py
205
# Copyright (c) 2006,2007,2008 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,...
PatrickChrist/CDTM-Deep-Learning-Drones
refs/heads/master
Yolonese/utils/TinyYoloNetforLoc.py
1
import numpy as np from enum import Enum import os class layer: def __init__(self,size,c,n,h,w,type): self.size = size self.c = c self.n = n self.h = h self.w = w self.type = type class convolutional_layer(layer): def __init__(self,size,c,n,h,w): layer._...
mcldev/DjangoCMS_Charts
refs/heads/master
djangocms_charts/migrations/0004_auto_20200521_2007.py
1
# Generated by Django 2.2.12 on 2020-05-21 20:07 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('djangocms_charts', '0003_auto_20190201_1645'), ] operations = [ migrations.AlterField( model_name='chartjsbarmodel', ...
shsingh/ansible
refs/heads/devel
test/units/modules/network/fortios/test_fortios_wireless_controller_timers.py
21
# Copyright 2019 Fortinet, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the...
wallnerryan/quantum_migrate
refs/heads/master
quantumclient/tests/unit/test_cli20_subnet.py
1
# Copyright 2012 OpenStack LLC. # 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...
tarzan0820/hr
refs/heads/8.0
__unported__/hr_policy_group/hr_policy_group.py
27
# -*- coding:utf-8 -*- # # # Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>. # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, eit...
klahnakoski/MoDataSubmission
refs/heads/dev
pyLibrary/queries/lists/util.py
386048
smile921/scrapyNotes
refs/heads/master
spider/weibo_spider/plot.py
1
# -*- coding:utf-8 -*- '''plot some pic using the data i scrapyed ~ wdwdwd ''' import MySQLdb from ConfigParser import ConfigParser import matplotlib.pyplot as plt import re from pylab import mpl import numpy as np class plotFactory(object): def __init__(self): cf = ConfigParser() cf.read("co...