repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
lmcro/letsencrypt
refs/heads/master
letsencrypt-nginx/letsencrypt_nginx/parser.py
8
"""NginxParser is a member object of the NginxConfigurator class.""" import glob import logging import os import pyparsing import re from letsencrypt import errors from letsencrypt_nginx import obj from letsencrypt_nginx import nginxparser logger = logging.getLogger(__name__) class NginxParser(object): """Cla...
biddisco/VTK
refs/heads/master
ThirdParty/Twisted/twisted/conch/avatar.py
91
# -*- test-case-name: twisted.conch.test.test_conch -*- from interfaces import IConchUser from error import ConchError from ssh.connection import OPEN_UNKNOWN_CHANNEL_TYPE from twisted.python import log from zope import interface class ConchUser: interface.implements(IConchUser) def __init__(self): se...
renweizhukov/LearningPythonTheHardWay
refs/heads/master
ex28.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- True and True False and True 1 == 1 and 2 == 1 "test" == "test" 1 == 1 or 2 != 1 True and 1 == 1 False and 0 != 0 True or 1 == 1 "test" == "testing" 1 != 0 and 2 == 1 "test" != "testing" "test" == 1 not (True and False) not (1 == 1 and 0 != 1) not (10 == 1 or 1000 == 1000)...
gangadharkadam/office_frappe
refs/heads/develop
frappe/core/doctype/tag/tag.py
39
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class Tag(Document): pass
hubsaysnuaa/odoo
refs/heads/8.0
addons/website_sale_options/models/product.py
395
# -*- coding: utf-8 -*- from openerp import tools from openerp.osv import osv, fields class product_template(osv.Model): _inherit = "product.template" _columns = { 'optional_product_ids': fields.many2many('product.template','product_optional_rel','src_id','dest_id',string='Optional Products', help="Pr...
obeattie/sqlalchemy
refs/heads/master
lib/sqlalchemy/sql/util.py
1
from sqlalchemy import exc, schema, topological, util, sql, types as sqltypes from sqlalchemy.sql import expression, operators, visitors from itertools import chain """Utility functions that build upon SQL and Schema constructs.""" def sort_tables(tables): """sort a collection of Table objects in order of their f...
ShawnPengxy/Flask-madeBlog
refs/heads/master
site-packages/pip/_vendor/requests/packages/chardet/jisfreq.py
3130
######################## 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...
corruptnova/namebench
refs/heads/master
tools/add_linkcount_and_version_to_csv.py
174
#!/usr/bin/env python # Copyright 2009 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
agry/NGECore2
refs/heads/master
scripts/object/tangible/deed/player_house_deed/generic_house_medium_windowed_s02_deed.py
96
import sys def setup(core, object): object.setAttachment('radial_filename', 'deeds/structureDeed') return def use(core, actor, object): return
ToBeReplaced/ansible-modules-extras
refs/heads/devel
database/postgresql/postgresql_ext.py
81
#!/usr/bin/python # -*- coding: utf-8 -*- # 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. #...
coala-analyzer/coala-quickstart
refs/heads/master
tests/test_bears/LinterBearWithCreateArguments.py
1
from coalib.bearlib.abstractions.Linter import linter @linter(executable='some_lint', output_format='regex', output_regex=r'.+:(?P<line>\d+):(?P<message>.*)') class LinterBearWithCreateArguments: CAN_DETECT = {'Syntax', 'Security'} CAN_FIX = {'Formatting'} LANGUAGES = {} @staticmethod...
traveloka/ansible
refs/heads/devel
lib/ansible/modules/cloud/lxd/lxd_profile.py
18
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, Hiroaki Nakamura <hnakamur@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...
Verizon/libcloud
refs/heads/trunk
libcloud/utils/decorators.py
48
# 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 use ...
ClaudioNahmad/Servicio-Social
refs/heads/master
Parametros/CosmoMC/CosmoMC-master/python/GetDistPlots.py
1
from getdist.plots import *
rocky4570/moto
refs/heads/master
moto/kinesis/models.py
4
from __future__ import unicode_literals import datetime import time import boto.kinesis import re import six import itertools from operator import attrgetter from hashlib import md5 from moto.compat import OrderedDict from moto.core import BaseBackend, BaseModel from moto.core.utils import unix_time from .exceptions...
Sabayon/anaconda
refs/heads/master
pyanaconda/ui/tui/tools/run-text-spoke.py
9
#!/usr/bin/python import sys, os import os.path # Check command line arguments if len(sys.argv)<2: print "Usage: $0 <spoke module name> [<spoke widget class>]" sys.exit(1) # Logging always needs to be set up first thing, or there'll be tracebacks. from pyanaconda import anaconda_log anaconda_log.init() from...
richteer/halibot-buildapcsales
refs/heads/master
buildapcsales.py
1
# TODO: Remove this when modules get proper localdir support import sys sys.path.append("modules/buildapcsales") import time import threading import requests import re import bapc_filter as bapcfilter from halibot import HalModule from halibot import Message, Context class BuildAPcSales(HalModule): run = False t...
ilovelinux/BottonPi
refs/heads/master
modules/twitch.py
1
from irc3.plugins.command import command import urllib.request import json @command def twitch(self=None, mask=None, target=None, args=None): """Indica il meteo della città %%twitch <channel>... """ channel = ' '.join(args['<channel>']) homeurl = 'http://www.twitch.tv/' streaming = '{}{}'....
hustcc/iOS-private-api-checker
refs/heads/master
app/utils/RequestUtil.py
1
#coding=utf-8 ''' Created on 2015年8月21日 @author: atool ''' #获得参数,post或者get def get_parameter(request, key, default = None): ''' info:获得请求参数,包括get和post,其他类型的访问不管 ''' #post参数 if request.method == 'POST': param = request.form.get(key, default) #get elif request.method == 'GET': ...
daodaoliang/python-phonenumbers
refs/heads/dev
python/phonenumbers/data/region_ME.py
9
"""Auto-generated file, do not edit by hand. ME metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_ME = PhoneMetadata(id='ME', country_code=382, international_prefix='00', general_desc=PhoneNumberDesc(national_number_pattern='[2-9]\\d{7,8}', possible_number_pattern=...
mdblv2/joatu-django
refs/heads/master
application/site-packages/django/contrib/__init__.py
12133432
vdmann/cse-360-image-hosting-website
refs/heads/master
src/varnishapp/management/commands/__init__.py
12133432
magnunor/hyperspy
refs/heads/RELEASE_next_minor
hyperspy/samfire_utils/weights/__init__.py
12133432
DazWorrall/ansible
refs/heads/devel
test/units/parsing/vault/__init__.py
12133432
gangadharkadam/saloon_erp
refs/heads/master
erpnext/projects/doctype/task_depends_on/__init__.py
12133432
GuessWhoSamFoo/pandas
refs/heads/master
asv_bench/benchmarks/io/stata.py
5
import numpy as np from pandas import DataFrame, date_range, read_stata import pandas.util.testing as tm from ..pandas_vb_common import BaseIO class Stata(BaseIO): params = ['tc', 'td', 'tm', 'tw', 'th', 'tq', 'ty'] param_names = ['convert_dates'] def setup(self, convert_dates): self.fname = '_...
Cclleemm/FriendlyTorrent
refs/heads/master
src/tornado/BitTornado/HTTPHandler.py
15
# Written by Bram Cohen # see LICENSE.txt for license information from cStringIO import StringIO from sys import stdout import time from clock import clock from gzip import GzipFile try: True except: True = 1 False = 0 DEBUG = False weekdays = ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] months = [...
Tokyo-Buffalo/tokyosouth
refs/heads/master
env/lib/python3.6/site-packages/scrapy/extensions/closespider.py
35
"""CloseSpider is an extension that forces spiders to be closed after certain conditions are met. See documentation in docs/topics/extensions.rst """ from collections import defaultdict from twisted.internet import reactor from scrapy import signals from scrapy.exceptions import NotConfigured class CloseSpider(ob...
odoocn/odoomrp-wip
refs/heads/8.0
product_purchase_warrant/models/__init__.py
31
# -*- encoding: utf-8 -*- ############################################################################## # # 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 Licen...
rossella/neutron
refs/heads/master
quantum/plugins/cisco/models/virt_phy_sw_v2.py
1
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 Cisco Systems, Inc. # All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache...
jyhuh/cnuhawk
refs/heads/master
Tools/autotest/pysim/testwind.py
246
#!/usr/bin/env python # simple test of wind generation code import util, time, random from rotmat import Vector3 wind = util.Wind('7,90,0.1') t0 = time.time() velocity = Vector3(0,0,0) t = 0 deltat = 0.01 while t < 60: print("%.4f %f" % (t, wind.drag(velocity, deltat=deltat).length())) t += deltat
jroxendal/PySCXML
refs/heads/master
w3c_tests/w3cTests.py
1
from scxml.pyscxml import StateMachine from scxml.pyscxml_server import PySCXMLServer import os, shutil from scxml.compiler import ScriptFetchError from test import pyscxmlTest from eventlet import wsgi ASSERTION_DIR = "./" TIMEOUT = 12 class W3CTester(StateMachine): ''' For running a fresh batch of tests fr...
CyanogenMod/android_external_chromium_org
refs/heads/cm-12.0
tools/cr/cr/targets/__init__.py
112
# Copyright 2013 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. """A package for all the built in commands. This package has all the standard commands built in to the cr tool. Most commands use actions to perform the rea...
TmpName/venom-xbmc-addons-beta
refs/heads/master
plugin.video.vstream/resources/sites/trash/bundesliga_de.py
4
from resources.lib.handler.outputParameterHandler import cOutputParameterHandler from resources.lib.handler.inputParameterHandler import cInputParameterHandler from resources.lib.parser import cParser from resources.lib.handler.requestHandler import cRequestHandler from resources.lib.gui.guiElement import cGuiElement f...
richard-willowit/odoo
refs/heads/master
addons/sale_service_rating/models/__init__.py
70
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from . import project
sergiosgc/Syncthing.py
refs/heads/master
syncthing/bep/connection.py
1
from asyncio import Protocol,coroutine,Task from zlib import decompressobj, compressobj, MAX_WBITS, Z_DEFAULT_COMPRESSION, DEFLATED,Z_SYNC_FLUSH from syncthing.bep.message import BEPMessage from syncthing.bep.clusterconfigmessage import BEPClusterConfigMessage from syncthing.bep.indexmessage import BEPIndexMessage from...
sgraham/nope
refs/heads/master
third_party/closure_compiler/tools/compile_coverage.py
79
#!/usr/bin/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. from ast import literal_eval import os _HERE = os.path.dirname(__file__) _SRC_ROOT = os.path.join(_HERE, '..', '..', '..') _FROM_SRC = la...
cliffe/SecGen
refs/heads/master
modules/utilities/unix/audit_tools/ghidra/files/release/Ghidra/Features/Python/data/jython-2.7.1/Lib/lib2to3/fixes/fix_map.py
327
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Fixer that changes map(F, ...) into list(map(F, ...)) unless there exists a 'from future_builtins import map' statement in the top-level namespace. As a special case, map(None, X) is changed into list(X). (This is ...
jasonwzhy/django
refs/heads/master
django/contrib/gis/db/backends/postgis/features.py
345
from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures from django.db.backends.postgresql.features import \ DatabaseFeatures as Psycopg2DatabaseFeatures class DatabaseFeatures(BaseSpatialFeatures, Psycopg2DatabaseFeatures): supports_3d_storage = True supports_3d_functions = True ...
bhargav2408/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/urllib/request.py
45
"""An extensible library for opening URLs using a variety of protocols The simplest way to use this module is to call the urlopen function, which accepts a string containing a URL or a Request object (described below). It opens the URL and returns the results as file-like object; the returned object has some extra me...
ngenovictor/django-crispy-forms
refs/heads/dev
docs/_themes/flask_theme_support.py
2228
# flasky extensions. flasky pygments style based on tango style from pygments.style import Style from pygments.token import Keyword, Name, Comment, String, Error, \ Number, Operator, Generic, Whitespace, Punctuation, Other, Literal class FlaskyStyle(Style): background_color = "#f8f8f8" default_style = "...
mozilla/mozilla-ignite
refs/heads/master
vendor-local/lib/python/fudge/__init__.py
5
"""Fudge is a module for replacing real objects with fakes (mocks, stubs, etc) while testing. See :ref:`using-fudge` for common scenarios. """ __version__ = '1.0.3' import os import re import sys import thread import warnings from fudge.exc import FakeDeclarationError from fudge.patcher import * from fudge.util imp...
wgcv/SWW-Crashphone
refs/heads/master
lib/python2.7/site-packages/django/contrib/flatpages/tests/test_models.py
94
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.core.urlresolvers import set_script_prefix, clear_script_prefix from django.contrib.flatpages.models import FlatPage from django.test import TestCase class FlatpageModelTests(TestCase): def test_get_absolute_url_urlencodes(self): ...
jolevq/odoopub
refs/heads/master
addons/document/document.py
93
# -*- 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...
sgelb/impositioner
refs/heads/master
tools/pdfSampler.py
1
#!/usr/bin/env python # Copyright (C) sgelb 2019 # 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...
swarna-k/MyDiary
refs/heads/master
flask/lib/python2.7/site-packages/whoosh/qparser/dateparse.py
95
# Copyright 2010 Matt Chaput. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the...
Cloudino/Cloudino-Arduino-IDE
refs/heads/esp8266
arduino-core/src/processing/app/i18n/python/requests/packages/urllib3/poolmanager.py
168
# urllib3/poolmanager.py # Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import logging from ._collections import RecentlyUsedContainer from .connectionpool import...
Aptitudetech/ERPNext
refs/heads/master
erpnext/patches/v7_0/update_mode_of_payment_type.py
53
from __future__ import unicode_literals import frappe from frappe.utils import flt def execute(): frappe.reload_doc('accounts', 'doctype', 'mode_of_payment') frappe.db.sql(""" update `tabMode of Payment` set type = 'Cash' where (type is null or type = '') and name = 'Cash'""") for data in frappe.db.sql("""select ...
kekeadou/ycmd
refs/heads/master
ycmd/hmac_utils.py
27
#!/usr/bin/env python # # Copyright (C) 2015 Google Inc. # # This file is part of YouCompleteMe. # # YouCompleteMe 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 you...
sahilshekhawat/sympy
refs/heads/master
sympy/combinatorics/tests/test_testutil.py
129
from sympy.combinatorics.named_groups import SymmetricGroup, AlternatingGroup,\ CyclicGroup from sympy.combinatorics.testutil import _verify_bsgs, _cmp_perm_lists,\ _naive_list_centralizer, _verify_centralizer,\ _verify_normal_closure from sympy.combinatorics.permutations import Permutation from sympy.combi...
raphaelmerx/django
refs/heads/master
django/contrib/contenttypes/forms.py
376
from __future__ import unicode_literals from django.contrib.contenttypes.models import ContentType from django.db import models from django.forms import ModelForm, modelformset_factory from django.forms.models import BaseModelFormSet class BaseGenericInlineFormSet(BaseModelFormSet): """ A formset for generic...
huanpc/IoT-1
refs/heads/master
gui/controller/.venv/lib/python3.5/site-packages/django/db/backends/mysql/schema.py
173
from django.db.backends.base.schema import BaseDatabaseSchemaEditor from django.db.models import NOT_PROVIDED class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): sql_rename_table = "RENAME TABLE %(old_table)s TO %(new_table)s" sql_alter_column_null = "MODIFY %(column)s %(type)s NULL" sql_alter_column_...
leafclick/intellij-community
refs/heads/master
python/testData/inspections/ChainedComparison2_after.py
83
if e < a <= b < c: print "q"
hieukypc/ERP
refs/heads/master
openerp/addons/sale_mrp/tests/test_move_explode.py
23
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp.tests import common class TestMoveExplode(common.TransactionCase): def setUp(self): super(TestMoveExplode, self).setUp() # Usefull models self.SaleOrderLine = self.env['sale.or...
frdb194/ubuntu-tweak
refs/heads/master
ubuntutweak/settings/ccm/__init__.py
5
from Conflicts import * from Constants import * from Utils import *
Garrett-R/elasticsearch-py
refs/heads/master
test_elasticsearch/test_server/__init__.py
13
from elasticsearch.helpers.test import get_test_client, ElasticsearchTestCase as BaseTestCase client = None def get_client(): global client if client is not None: return client # try and locate manual override in the local environment try: from test_elasticsearch.local import get_clie...
scollis/iris
refs/heads/master
lib/iris/tests/test_pp_module.py
1
# (C) British Crown Copyright 2013 - 2014, Met Office # # This file is part of Iris. # # Iris is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option) any l...
saadatqadri/django-oscar
refs/heads/master
tests/unit/dashboard/voucher_form_tests.py
53
from django import test from oscar.apps.dashboard.vouchers import forms class TestVoucherForm(test.TestCase): def test_doesnt_crash_on_empty_date_fields(self): """ There was a bug fixed in 02b3644 where the voucher form would raise an exception (instead of just failing validation) when b...
alfayez/gnuradio
refs/heads/master
gr-howto-write-a-block/docs/doxygen/doxyxml/generated/index.py
344
#!/usr/bin/env python """ Generated Mon Feb 9 19:08:05 2009 by generateDS.py. """ from xml.dom import minidom import os import sys import compound import indexsuper as supermod class DoxygenTypeSub(supermod.DoxygenType): def __init__(self, version=None, compound=None): supermod.DoxygenType.__init__(se...
jparyani/Mailpile
refs/heads/sandstorm
mailpile/plugins/keylookup/nicknym.py
2
#coding:utf-8 from mailpile.commands import Command from mailpile.conn_brokers import Master as ConnBroker from mailpile.plugins import PluginManager from mailpile.plugins.search import Search from mailpile.mailutils import Email # from mailpile.crypto.state import * from mailpile.crypto.gpgi import GnuPG import http...
dyeden/earthengine-api
refs/heads/master
python/examples/Image/hillshade.py
3
#!/usr/bin/env python """Compute hillshade from elevation.""" import math import ee import ee.mapclient ee.Initialize() ee.mapclient.centerMap(-121.767, 46.852, 11) def Radians(img): return img.toFloat().multiply(math.pi).divide(180) def Hillshade(az, ze, slope, aspect): """Compute hillshade for the given ill...
matthappens/taskqueue
refs/heads/master
taskqueue/venv_tq/lib/python2.7/site-packages/PIL/PsdImagePlugin.py
14
# # The Python Imaging Library # $Id$ # # Adobe PSD 2.5/3.0 file handling # # History: # 1995-09-01 fl Created # 1997-01-03 fl Read most PSD images # 1997-01-18 fl Fixed P and CMYK support # 2001-10-21 fl Added seek/tell support (for layers) # # Copyright (c) 1997-2001 by Secret Labs AB. # Copyright (c) 1995-20...
joshuajan/odoo
refs/heads/master
addons/membership/__init__.py
441
# -*- 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...
mapleoin/factory_boy
refs/heads/master
tests/alchemyapp/__init__.py
12133432
mission-liao/pyswagger
refs/heads/develop
pyswagger/tests/__init__.py
12133432
zmughal/pygments-mirror
refs/heads/master
pygments/cmdline.py
22
# -*- coding: utf-8 -*- """ pygments.cmdline ~~~~~~~~~~~~~~~~ Command line interface. :copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function import sys import getopt from textwrap import dedent from py...
pravisankar/origin
refs/heads/master
vendor/github.com/google/certificate-transparency/python/demo/vdb/verifiable_base.py
30
import cPickle as pickle from verifiable_log import VerifiableLog from verifiable_map import VerifiableMap # Extend this class, override _apply_operation and add your own API to: # 1. append to log # 2. read from map class VerifiableBase: def __init__(self, log): # The log, such as a VerifiableLog self._log...
portnov/sverchok
refs/heads/master
ui/nodeview_bgl_viewer_draw_mk2.py
3
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
Aigrefin/py3learn
refs/heads/master
learn/migrations/0001_initial.py
1
# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-05-17 08:52 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Creat...
c3cashdesk/c6sh
refs/heads/master
src/postix/core/migrations/0051_auto_20181103_1516.py
1
# Generated by Django 2.1.3 on 2018-11-03 14:16 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0050_auto_20181103_1452'), ] operations = [ migrations.AddField( model_name='cashdesk', name='record_detail'...
DirtyPiece/dancestudio
refs/heads/master
Build/Tools/Python27/Lib/test/test_compare.py
195
import unittest from test import test_support class Empty: def __repr__(self): return '<Empty>' class Coerce: def __init__(self, arg): self.arg = arg def __repr__(self): return '<Coerce %s>' % self.arg def __coerce__(self, other): if isinstance(other, Coerce): ...
raphaelmerx/django
refs/heads/master
tests/admin_scripts/custom_templates/project_template/project_name/settings.py
738
# Django settings for {{ project_name }} test project.
ropable/statdev
refs/heads/master
ledger/accounts/migrations/0005_remove_duplicates.py
3
# -*- coding: utf-8 -*- # Generated by Django 1.9.9 on 2016-09-08 06:25 from __future__ import unicode_literals from django.db import migrations from ledger.accounts.models import Profile, Address def remove_duplicate_profile_addreses(apps, schema_editor): try: # Get Distinct hashes of addresses _...
cloudbase/neutron-virtualbox
refs/heads/virtualbox_agent
neutron/tests/unit/vmware/apiclient/fake.py
1
# Copyright 2012 VMware, 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 agree...
cryptickp/troposphere
refs/heads/master
examples/EC2Conditions.py
25
from __future__ import print_function from troposphere import ( Template, Parameter, Ref, Condition, Equals, And, Or, Not, If ) from troposphere import ec2 parameters = { "One": Parameter( "One", Type="String", ), "Two": Parameter( "Two", Type="String", ), "Thr...
innstereo/innstereo
refs/heads/master
innstereo/layer_properties.py
2
#!/usr/bin/python3 """ This module contains the layer properties dialog. Each dialog window has its own class that controls its behaviour. This module stores the AboutDialog-, PrintDialog-, StereonetProperties-, LayerProperties-, and FileChooserParse-class. """ from gi.repository import Gtk import matplotlib.colors ...
eduNEXT/edx-platform
refs/heads/master
common/djangoapps/util/tests/test_password_policy_validators.py
4
"""Tests for util.password_policy_validators module.""" import unittest import pytest from ddt import data, ddt, unpack from django.contrib.auth.models import User # lint-amnesty, pylint: disable=imported-auth-user from django.core.exceptions import ValidationError from django.test.utils import override_settings f...
mitdbg/modeldb
refs/heads/master
client/verta/verta/_swagger/_public/modeldb/model/ModeldbObservation.py
1
# THIS FILE IS AUTO-GENERATED. DO NOT EDIT from verta._swagger.base_type import BaseType class ModeldbObservation(BaseType): def __init__(self, attribute=None, artifact=None, timestamp=None): required = { "attribute": False, "artifact": False, "timestamp": False, } self.attribute = attr...
TomAugspurger/pandas
refs/heads/master
pandas/tests/dtypes/test_generic.py
2
from warnings import catch_warnings import numpy as np from pandas.core.dtypes import generic as gt import pandas as pd import pandas._testing as tm class TestABCClasses: tuples = [[1, 2, 2], ["red", "blue", "red"]] multi_index = pd.MultiIndex.from_arrays(tuples, names=("number", "color")) datetime_ind...
rogerhu/django
refs/heads/master
django/core/checks/compatibility/__init__.py
12133432
Manolaru/Python_train
refs/heads/master
Les_4/Task_12/model/__init__.py
12133432
shubhamdhama/zulip
refs/heads/master
tools/setup/__init__.py
12133432
cecep-edu/edx-platform
refs/heads/eucalyptus.2
cms/djangoapps/course_creators/__init__.py
12133432
amenasse/grindstone
refs/heads/master
grindstone/tasks/migrations/__init__.py
12133432
kevclarx/ansible
refs/heads/devel
test/units/module_utils/gcp/test_utils.py
127
# -*- coding: utf-8 -*- # (c) 2016, Tom Melendez <tom@supertom.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 o...
lonnen/socorro
refs/heads/master
webapp-django/crashstats/manage/forms.py
2
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. from django import forms from crashstats.crashstats.forms import BaseForm class GraphicsDeviceUploadForm(BaseForm): ...
hoxmark/TDT4501-Specialization-Project
refs/heads/master
reinforcement/testing/svm_with_entropy.py
1
# Standard scientific Python imports import matplotlib.pyplot as plt import math import random import numpy as np from utils import test_local_logger entropy = True lg = test_local_logger(entropy) # Import datasets, classifiers and performance metrics from sklearn import datasets, svm, metrics from sklearn.utils i...
LudwigOrtmann/RIOT
refs/heads/master
tests/bitarithm_timings/tests/01-run.py
6
#!/usr/bin/env python3 # Copyright (C) 2017 Freie Universität Berlin # # This file is subject to the terms and conditions of the GNU Lesser # General Public License v2.1. See the file LICENSE in the top level # directory for more details. import os import sys def testfunc(child): child.expect_exact("Start.") ...
dezelin/qemu-kvm
refs/heads/master
tests/qemu-iotests/iotests.py
19
# Common utilities and Python wrappers for qemu-iotests # # Copyright (C) 2012 IBM Corp. # # 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) ...
onponomarev/ganeti
refs/heads/master
lib/cli_opts.py
2
# # # Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 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: # # 1. Redistributions of source code must retain the above ...
hujiajie/chromium-crosswalk
refs/heads/master
tools/telemetry/third_party/pyserial/serial/rfc2217.py
141
#! python # # Python Serial Port Extension for Win32, Linux, BSD, Jython # see __init__.py # # This module implements a RFC2217 compatible client. RF2217 descibes a # protocol to access serial ports over TCP/IP and allows setting the baud rate, # modem control lines etc. # # (C) 2001-2013 Chris Liechti <cliechti@gmx.ne...
xiangel/hue
refs/heads/master
desktop/core/ext-py/Pygments-1.3.1/pygments/styles/murphy.py
75
# -*- coding: utf-8 -*- """ pygments.styles.murphy ~~~~~~~~~~~~~~~~~~~~~~ Murphy's style from CodeRay. :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.style import Style from pygments.token import Keyword, Name, Comment,...
odoo-turkiye/odoo
refs/heads/8.0
addons/hr_attendance/wizard/__init__.py
375
# -*- 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...
anarchivist/pyflag
refs/heads/master
src/FileFormats/RegFile.py
7
#!/usr/bin/env python # ****************************************************** # Copyright 2004: Commonwealth of Australia. # # Developed by the Computer Network Vulnerability Team, # Information Security Group. # Department of Defence. # # Michael Cohen <scudette@users.sourceforge.net> # # ****************************...
pwil3058/epygibus
refs/heads/master
epygibus_pkg/cli/subcmd_del.py
1
### Copyright (C) 2015 Peter Williams <pwil3058@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; version 2 of the License only. ### ### This program is distributed in the hop...
EvenStrangest/tensorflow
refs/heads/master
tensorflow/examples/skflow/hdf5_classification.py
9
# Copyright 2015-present The Scikit Flow 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 require...
bfalacerda/strands_executive
refs/heads/kinetic-devel
task_executor/scripts/example_add_time_critical_client.py
2
#!/usr/bin/env python import rospy from strands_executive_msgs import task_utils from strands_executive_msgs.msg import Task from strands_executive_msgs.srv import AddTasks, SetExecutionStatus import sys def get_services(): # get services necessary to do the jon add_tasks_srv_name = '/task_executor/add_tasks...
TheTypoMaster/linux
refs/heads/master
tools/perf/scripts/python/check-perf-trace.py
1997
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
eteq/bokeh
refs/heads/master
bokeh/sampledata/sprint.py
45
from __future__ import absolute_import, print_function from os.path import dirname, join try: import pandas as pd except ImportError as e: raise RuntimeError("sprint data requires pandas (http://pandas.pydata.org) to be installed") sprint = pd.read_csv(join(dirname(__file__), 'sprint.csv'), skipinitialspace=...
ConeyLiu/spark
refs/heads/master
python/pyspark/mllib/tests/test_streaming_algorithms.py
3
# # 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 us...