repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
reingart/web2conf_googlecode
refs/heads/master
languages/fr-ca.py
4
# coding: utf8 { '\nDear Attendee,\n\nTo proceed with your registration and verify your email, click on the following link:\n\n%s\n\n--\n%s\n': '\nDear Attendee,\n\nTo proceed with your registration and verify your email, click on the following link:\n\n%s\n\n--\n%s\n', '\nDear Attendee,\n\nTo proceed with your registr...
omaciel/automation-tools
refs/heads/master
automation_tools/beaker.py
12
"""Tools to work with Beaker (https://beaker-project.org/). The ``bkr`` command-line utility must be available and configured. (Available via the ``beaker-client`` package on Fedora.) See the `Installing and configuring the client`_ section of the Beaker documentation. .. _Installing and configuring the client: h...
rjschof/gem5
refs/heads/master
src/cpu/kvm/KvmVM.py
57
# Copyright (c) 2012 ARM Limited # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implementation of the functionality ...
artmusic0/theano-learning.part02
refs/heads/master
fixed_official_convolutional_vv1(self_mnist)/doc/conf.py
35
# -*- coding: utf-8 -*- # # theano documentation build configuration file, created by # sphinx-quickstart on Tue Oct 7 16:34:06 2008. # # This file is execfile()d with the current directory set to its containing dir. # # The contents of this file are pickled, so don't put values in the namespace # that aren't pickleab...
tsl143/zamboni
refs/heads/master
mkt/reviewers/serializers.py
13
from rest_framework import serializers from mkt.api.fields import TranslationSerializerField from mkt.reviewers.models import (AdditionalReview, CannedResponse, QUEUE_TARAKO, ReviewerScore) from mkt.webapps.models import Webapp from mkt.webapps.serializers import ESAppSerializer cla...
mirchr/collectd
refs/heads/master
contrib/network-proxy.py
105
#!/usr/bin/env python # vim: sts=4 sw=4 et # Simple unicast proxy to send collectd traffic to another host/port. # Copyright (C) 2007 Pavel Shramov <shramov at mexmat.net> # # 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 th...
mdworks2016/work_development
refs/heads/master
Python/20_Third_Certification/venv/lib/python3.7/site-packages/pip/_vendor/cachecontrol/controller.py
28
""" The httplib2 algorithms ported for use with requests. """ import logging import re import calendar import time from email.utils import parsedate_tz from pip._vendor.requests.structures import CaseInsensitiveDict from .cache import DictCache from .serialize import Serializer logger = logging.getLogger(__name__) ...
yieldbot/sensu-yieldbot-plugins
refs/heads/master
plugins/elasticsearch/check-es-tribe-node.py
1
#!/usr/bin/env python """Sensu check script: Check if tribe nodes are reachable and recent 7 days es doc count are more then threshold. This script is run by Sensu at regular intervals. """ from optparse import OptionParser import socket import sys import httplib import json import datetime import re CHECK_PASSING =...
ubiar/odoo
refs/heads/8.0
addons/product/report/__init__.py
452
# -*- 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...
StephenKing/summerschool-2015-ryu
refs/heads/summerschool-step2-complete
ryu/tests/unit/packet/test_udp.py
38
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # # 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 appli...
artdent/jgments
refs/heads/master
lib/pygments-1.2.2-patched/pygments/formatters/html.py
3
# -*- coding: utf-8 -*- """ pygments.formatters.html ~~~~~~~~~~~~~~~~~~~~~~~~ Formatter for HTML output. :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import sys, os import StringIO try: set except NameError: from sets impor...
Bysmyyr/chromium-crosswalk
refs/heads/master
tools/vim/chromium.ycm_extra_conf.py
15
# Copyright (c) 2012 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. # Autocompletion config for YouCompleteMe in Chromium. # # USAGE: # # 1. Install YCM [https://github.com/Valloric/YouCompleteMe] # (Googlers s...
moijes12/oh-mainline
refs/heads/master
vendor/packages/celery/celery/tests/test_bin/test_celerybeat.py
32
from __future__ import absolute_import from __future__ import with_statement import logging import sys from collections import defaultdict from kombu.tests.utils import redirect_stdouts from celery import beat from celery import platforms from celery.app import app_or_default from celery.bin import celerybeat as ce...
ivan-fedorov/intellij-community
refs/heads/master
python/testData/formatter/alignInGenerators.py
83
def supprice(): if True: if True: agdrn = sum(VARS[drn + price] * md.c[drn][1] * md.c[drn][3] * exp(md.c[drn][2] * VARS['SEEPAGE'] - md.c[drn][3] * pmp) for drn in md.agdrn_nodes if drn in md.c)
andrejbranch/pyigblast
refs/heads/master
arg_parse.py
1
import argparse import textwrap from Bio import SeqIO import os import shutil from multiprocessing import cpu_count class blastargument_parser(): # call on all our file type parsers in the sequence_anlysis_method def __init__(self): """A customized argument parser that does a LOT of error checking""" ...
codenote/chromium-test
refs/heads/master
tools/telemetry/telemetry/core/chrome/tracing_backend.py
4
# Copyright (c) 2012 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. import cStringIO import json import logging import socket import threading from telemetry.core import util from telemetry.core.chrome import trace_even...
wileeam/airflow
refs/heads/master
airflow/providers/amazon/aws/hooks/aws_dynamodb_hook.py
2
# # 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...
devs1991/test_edx_docmode
refs/heads/master
lms/djangoapps/instructor/tests/test_enrollment.py
13
# -*- coding: utf-8 -*- """ Unit tests for instructor.enrollment methods. """ import json import mock from mock import patch from abc import ABCMeta from courseware.models import StudentModule from django.conf import settings from django.test import TestCase from django.utils.translation import get_language from djang...
astrilchuk/sd2xmltv
refs/heads/master
libhdhomerun/common/channel.py
1
class Channel(object): def __init__(self): self.guide_number = None # type: unicode self.guide_name = None # type: unicode self.url = None # type: unicode self.is_hd = False # type: bool self.is_favorite = False # type: bool def __unicode__(self): # type: () ...
wangwei7175878/tutorials
refs/heads/master
matplotlibTUT/plt9_tick_visibility.py
3
# View more python tutorials on my Youtube and Youku channel!!! # Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg # Youku video tutorial: http://i.youku.com/pythontutorial # 9 - tick_visibility """ Please note, this script is for python3+. If you are using python2+, please modify it a...
rockyzhang/zhangyanhit-python-for-android-mips
refs/heads/master
python-modules/twisted/twisted/web/test/test_newclient.py
49
# Copyright (c) 2009-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.web._newclient}. """ __metaclass__ = type from zope.interface import implements from zope.interface.verify import verifyObject from twisted.python import log from twisted.python.failure import Failure from twis...
darktears/chromium-crosswalk
refs/heads/master
build/android/pylib/junit/test_dispatcher.py
27
# 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 pylib import constants from pylib.base import base_test_result def RunTests(tests, runner_factory): """Runs a set of java tests on the host. Retur...
vipul-sharma20/oh-mainline
refs/heads/master
vendor/packages/Django/tests/regressiontests/middleware_exceptions/urls.py
150
# coding: utf-8 from __future__ import absolute_import from django.conf.urls import patterns from . import views urlpatterns = patterns('', (r'^middleware_exceptions/view/$', views.normal_view), (r'^middleware_exceptions/not_found/$', views.not_found), (r'^middleware_exceptions/error/$', views.server_err...
JingheZ/shogun
refs/heads/master
examples/undocumented/python_modular/classifier_multiclass_ecoc_discriminant.py
19
#!/usr/bin/env python from tools.multiclass_shared import prepare_data [traindat, label_traindat, testdat, label_testdat] = prepare_data(False) parameter_list = [[traindat,testdat,label_traindat,label_testdat,2.1,1,1e-5],[traindat,testdat,label_traindat,label_testdat,2.2,1,1e-5]] def classifier_multiclass_ecoc_discr...
gqwest-erp/server
refs/heads/master
openerp/addons/web/http.py
57
# -*- coding: utf-8 -*- #---------------------------------------------------------- # OpenERP Web HTTP layer #---------------------------------------------------------- import ast import cgi import contextlib import functools import getpass import logging import mimetypes import os import pprint import random import sy...
walty8/trac
refs/heads/trunk
trac/admin/__init__.py
8
# -*- coding: utf-8 -*- # # Copyright (C)2006-2009 Edgewall Software # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edgewall.org/wiki/TracLicense. # # This software consis...
jdar/phantomjs-modified
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/bindings/main.py
117
# 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: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
kris-singh/pgmpy
refs/heads/dev
pgmpy/tests/test_base/test_UndirectedGraph.py
4
#!/usr/bin/env python3 from pgmpy.base import UndirectedGraph from pgmpy.tests import help_functions as hf import unittest class TestUndirectedGraphCreation(unittest.TestCase): def setUp(self): self.graph = UndirectedGraph() def test_class_init_without_data(self): self.assertIsInstance(self....
AikawaKai/ExamCollision
refs/heads/master
corsi.py
1
import csv import sys import copy import itertools print("Benvenuto.\nQuesto programma in python ti permette di verificare se gli esami scelti nel tuo piano sono compatibili (no collision).\n\n") input("Press Enter to continue...") with open('csvnumesami.csv') as csvfile: reader = csv.DictReader(csvfile) fo...
rdo-management/neutron
refs/heads/mgt-master
neutron/db/migration/alembic_migrations/versions/abc88c33f74f_lb_stats_needs_bigint.py
17
# Copyright 2014 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
pattisdr/osf.io
refs/heads/develop
addons/osfstorage/admin.py
13
from django.contrib import admin from .models import Region class RegionAdmin(admin.ModelAdmin): list_display = ['name', '_id', 'waterbutler_url', 'mfr_url'] admin.site.register(Region, RegionAdmin)
michaelgallacher/intellij-community
refs/heads/master
python/testData/stubs/DynamicDunderAll.py
83
__all__ = ['foo', 'bar'] for i in range(5): __all__.append('f' + str(i))
alazaro/tennis_tournament
refs/heads/master
django/dispatch/__init__.py
571
"""Multi-consumer multi-producer dispatching mechanism Originally based on pydispatch (BSD) http://pypi.python.org/pypi/PyDispatcher/2.0.1 See license.txt for original license. Heavily modified for Django's purposes. """ from django.dispatch.dispatcher import Signal, receiver
tod31/pyload
refs/heads/stable
module/plugins/accounts/BitshareCom.py
3
# -*- coding: utf-8 -*- from module.plugins.internal.Account import Account class BitshareCom(Account): __name__ = "BitshareCom" __type__ = "account" __version__ = "0.19" __status__ = "testing" __description__ = """Bitshare account plugin""" __license__ = "GPLv3" __authors__ ...
girishramnani/pyappbase
refs/heads/master
tests/test_async.py
1
import asyncio import time import unittest from test_sync import setup from pyappbase import Appbase async def hello_world(d, data): while d[0]: await asyncio.sleep(0.1) data.append("Hello") class AsnycTests(unittest.TestCase): def setUp(self): self.data = { "type": "B...
waytai/odoo
refs/heads/8.0
addons/base_import_module/__init__.py
3964
import controllers import models
Parsely/python-bloomfilter
refs/heads/master
pybloom/__init__.py
1
"""pybloom """ from pybloom import BloomFilter, ScalableBloomFilter, __version__, __author__ from cdbf import CountdownBloomFilter, ScalableCountdownBloomFilter from hashfilter import HashFilter
WladimirSidorenko/SentiLex
refs/heads/master
scripts/vo.py
1
#!/usr/bin/env python2.7 # -*- mode: python; coding: utf-8; -*- """Module for generating lexicon using Velikovich's method (2010). """ ################################################################## # Imports from __future__ import unicode_literals, print_function from collections import Counter from copy import...
angad/libjingle-mac
refs/heads/master
scons-2.2.0/engine/SCons/Debug.py
14
"""SCons.Debug Code for debugging SCons internal things. Shouldn't be needed by most users. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associ...
sunlianqiang/kbengine
refs/heads/master
kbe/src/lib/python/Lib/colorsys.py
144
"""Conversion functions between RGB and other color systems. This modules provides two functions for each color system ABC: rgb_to_abc(r, g, b) --> a, b, c abc_to_rgb(a, b, c) --> r, g, b All inputs and outputs are triples of floats in the range [0.0...1.0] (with the exception of I and Q, which covers a slightly...
skurochkin/selenium
refs/heads/master
py/test/selenium/webdriver/common/element_attribute_tests.py
65
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
qtproject/qtwebkit
refs/heads/dev
Source/JavaScriptCore/inspector/scripts/generate-inspector-protocol-bindings.py
2
#!/usr/bin/env python # # Copyright (c) 2014 Apple Inc. All rights reserved. # Copyright (c) 2014 University of Washington. 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 ...
Yong-Lee/django
refs/heads/master
django/utils/log.py
116
from __future__ import unicode_literals import logging import logging.config # needed when logging_config doesn't start with logging.config import sys import warnings from copy import copy from django.conf import settings from django.core import mail from django.core.mail import get_connection from django.utils.depr...
tjsavage/djangononrel-starter
refs/heads/master
django/contrib/contenttypes/models.py
307
from django.db import models from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import smart_unicode class ContentTypeManager(models.Manager): # Cache to avoid re-looking up ContentType objects all over the place. # This cache is shared by all the get_for_* methods. _cache ...
leighpauls/k2cro4
refs/heads/master
third_party/python_26/Lib/site-packages/pythonwin/pywin/framework/editor/ModuleBrowser.py
17
# ModuleBrowser.py - A view that provides a module browser for an editor document. import pywin.mfc.docview import win32ui import win32con import commctrl import win32api from pywin.tools import hierlist, browser import pywin.framework.scriptutils import afxres import pyclbr class HierListCLBRModule(hierlist.HierList...
cxxgtxy/tensorflow
refs/heads/master
tensorflow/contrib/quantization/python/nn_ops.py
179
# 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...
gganis/root
refs/heads/master
interpreter/llvm/src/tools/clang/tools/scan-build-py/tests/unit/__init__.py
24
# -*- coding: utf-8 -*- # The LLVM Compiler Infrastructure # # This file is distributed under the University of Illinois Open Source # License. See LICENSE.TXT for details. from . import test_libear from . import test_compilation from . import test_clang from . import test_runner from . import test...
bloodearnest/talisker
refs/heads/master
tests/test_postgresql.py
2
# # Copyright (c) 2015-2018 Canonical, Ltd. # # This file is part of Talisker # (see http://github.com/canonical-ols/talisker). # # 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 # regardin...
lastcc/OAHelper
refs/heads/master
oa/models.py
1
# -*- coding: utf-8 -*- from bs4 import BeautifulSoup from log_config import logger class Struct(object): """ An object that has attributes built from the dictionary given in constructor. So ss=Struct(a=1, b='b') will satisfy assert ss.a == 1 and assert ss.b == 'b'. """ def...
openhdf/enigma2-wetek
refs/heads/master
lib/python/Tools/Downloader.py
5
from boxbranding import getMachineBrand, getMachineName from twisted.web import client from twisted.internet import reactor, defer, ssl class HTTPProgressDownloader(client.HTTPDownloader): def __init__(self, url, outfile, headers=None): client.HTTPDownloader.__init__(self, url, outfile, headers=headers, agent="En...
cseed/arachne-pnr
refs/heads/master
tests/combinatorial/generate.py
2
#!/usr/bin/python from __future__ import division from __future__ import print_function import sys import random from contextlib import contextmanager random.seed(1) @contextmanager def redirect_stdout(new_target): old_target, sys.stdout = sys.stdout, new_target try: yield new_target finally: ...
kamyu104/django
refs/heads/master
tests/i18n/test_extraction.py
89
# -*- encoding: utf-8 -*- from __future__ import unicode_literals import io import os import re import shutil import time import warnings from unittest import SkipTest, skipUnless from django.conf import settings from django.core import management from django.core.management import execute_from_command_line from djan...
Alzon/SUR
refs/heads/SURmagnum
magnum/tests/unit/objects/test_container.py
15
# Copyright 2015 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...
indictranstech/trufil-frappe
refs/heads/develop
frappe/website/template.py
3
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.utils import strip_html from frappe.website.utils import get_full_index from frappe import _ from jinja2.utils import concat from jinja2 import meta imp...
kirillzhuravlev/numpy
refs/heads/master
numpy/distutils/tests/swig_ext/setup.py
135
#!/usr/bin/env python from __future__ import division, print_function def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('swig_ext', parent_package, top_path) config.add_extension('_example', ['src/example....
xq262144/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/user_commands/management/commands/leave_locale_alone_true.py
67
from django.core.management.base import BaseCommand from django.utils import translation class Command(BaseCommand): can_import_settings = True leave_locale_alone = True def handle(self, *args, **options): return translation.get_language()
glovebx/odoo
refs/heads/8.0
addons/website_mail/models/email_template.py
151
# -*- coding: utf-8 -*- from openerp.osv import osv from openerp.tools.translate import _ class EmailTemplate(osv.Model): _inherit = 'email.template' def action_edit_html(self, cr, uid, ids, context=None): if not len(ids) == 1: raise ValueError('One and only one ID allowed for this actio...
akash1808/nova_test_latest
refs/heads/master
nova/tests/unit/test_configdrive2.py
44
# Copyright 2012 Michael Still and Canonical 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 # # ...
meteorcloudy/tensorflow
refs/heads/master
tensorflow/contrib/slim/python/slim/data/data_provider.py
145
# 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...
2014cdag4/2014cdag4
refs/heads/master
wsgi/static/Brython2.1.0-20140419-113919/Lib/_random.py
115
import _os from os import urandom as _urandom class Random: """Random number generator base class used by bound module functions. Used to instantiate instances of Random to get generators that don't share state. Class Random can also be subclassed if you want to use a different basic generator of ...
toshywoshy/ansible
refs/heads/devel
lib/ansible/modules/cloud/ovh/ovh_ip_loadbalancing_backend.py
3
#!/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'], ...
tind/invenio-communities
refs/heads/master
invenio_communities/cli.py
1
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2016 CERN. # # Invenio is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later...
drmrd/ansible
refs/heads/devel
test/units/modules/network/ovs/test_openvswitch_port.py
57
# # (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
vikkyrk/incubator-beam
refs/heads/master
sdks/python/apache_beam/utils/value_provider_test.py
2
# # 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...
sh4wn/vispy
refs/heads/master
vispy/visuals/shaders/program.py
20
# -*- coding: utf-8 -*- # Copyright (c) 2015, Vispy Development Team. # Distributed under the (new) BSD License. See LICENSE.txt for more info. from __future__ import division import logging from ...gloo import Program from ...gloo.preprocessor import preprocess from ...util import logger from ...util.event import E...
ericzolf/ansible
refs/heads/devel
test/integration/targets/delegate_to/library/detect_interpreter.py
40
#!/usr/bin/python from __future__ import absolute_import, division, print_function __metaclass__ = type import sys from ansible.module_utils.basic import AnsibleModule def main(): module = AnsibleModule(argument_spec={}) module.exit_json(**dict(found=sys.executable)) if __name__ == '__main__': main(...
capturePointer/capstone
refs/heads/master
bindings/python/test_ppc.py
33
#!/usr/bin/env python # Capstone Python bindings, by Nguyen Anh Quynnh <aquynh@gmail.com> from __future__ import print_function from capstone import * from capstone.ppc import * from xprint import to_x, to_hex, to_x_32 PPC_CODE = b"\x43\x20\x0c\x07\x41\x56\xff\x17\x80\x20\x00\x00\x80\x3f\x00\x00\x10\x43\x23\x0e\xd0\x...
RedHatInsights/insights-core
refs/heads/master
insights/parsers/tests/test_sendq_recvq_socket_buffer.py
1
import doctest import pytest from insights.parsers import ParseException from insights.tests import context_wrap from insights.parsers import sendq_recvq_socket_buffer from insights.parsers.sendq_recvq_socket_buffer import SendQSocketBuffer, RecvQSocketBuffer SENDQ_SOCKET_BUFFER = """ 4096 16384 4194304 """.strip() ...
aljscott/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/editdistance.py
138
# 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 ...
erjohnso/libcloud
refs/heads/trunk
libcloud/backup/drivers/dimensiondata.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 use ...
Drooids/odoo
refs/heads/8.0
addons/hw_posbox_homepage/__openerp__.py
313
# -*- 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...
chrsrds/scikit-learn
refs/heads/master
examples/linear_model/plot_lasso_coordinate_descent_path.py
44
""" ===================== Lasso and Elastic Net ===================== Lasso and elastic net (L1 and L2 penalisation) implemented using a coordinate descent. The coefficients can be forced to be positive. """ print(__doc__) # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # License: BSD 3 clause from itert...
fyffyt/pylearn2
refs/heads/master
pylearn2/scripts/datasets/make_cifar100_patches.py
41
""" This script makes a dataset of two million approximately whitened patches, extracted at random uniformly from the CIFAR-100 train dataset. This script is intended to reproduce the preprocessing used by Adam Coates et. al. in their work from the first half of 2011 on the CIFAR-10 and STL-10 datasets. """ from __fut...
aselle/tensorflow
refs/heads/master
tensorflow/python/ops/losses/losses.py
60
# 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...
itbabu/django-oscar
refs/heads/master
tests/integration/offer/post_order_action_tests.py
21
from decimal import Decimal as D from django.test import TestCase from oscar.apps.offer import models, utils, custom from oscar.test import factories from oscar.test.basket import add_product class CustomAction(models.Benefit): class Meta: proxy = True app_label = 'tests' def apply(self, b...
gylian/headphones
refs/heads/master
lib/mutagen/musepack.py
16
# A Musepack reader/tagger # # Copyright 2006 Lukas Lalinsky <lalinsky@gmail.com> # Copyright 2012 Christoph Reiter <christoph.reiter@gmx.at> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foun...
harlowja/urwid
refs/heads/master
urwid/tests/test_canvas.py
23
import unittest from urwid import canvas from urwid.compat import B import urwid class CanvasCacheTest(unittest.TestCase): def setUp(self): # purge the cache urwid.CanvasCache._widgets.clear() def cct(self, widget, size, focus, expected): got = urwid.CanvasCache.fetch(widget, urwid.W...
feureau/Small-Scripts
refs/heads/master
Blender/Blender config/2.91/scripts/addons/assemblme_v1-4-0/lib/classes_to_register.py
1
""" Copyright (C) 2017 Bricks Brought to Life http://bblanimation.com/ chris@bblanimation.com Created by Christopher Gearhart """ # Module imports from .preferences import * from .report_error import * from .property_groups import * from ..ui import * from ..operators import * from .. import addon_updater_ops class...
takis/odoo
refs/heads/8.0
addons/l10n_be_intrastat/wizard/xml_decl.py
205
# -*- encoding: utf-8 -*- ############################################################################## # # Odoo, Open Source Business Applications # Copyright (C) 2014-2015 Odoo S.A. <http://www.odoo.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
virtualopensystems/neutron
refs/heads/master
neutron/tests/unit/services/firewall/agents/varmour/__init__.py
140
# Copyright 2013 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 req...
flyapen/UgFlu
refs/heads/master
flumotion/test/test_common_xmlwriter.py
3
# -*- Mode: Python; test-case-name: flumotion.test.test_common_componentui -*- # vi:si:et:sw=4:sts=4:ts=4 # # Flumotion - a streaming media server # Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). # All rights reserved. # This file may be distributed and/or modified under the terms of # the GNU General Public Lice...
asedunov/intellij-community
refs/heads/master
python/lib/Lib/site-packages/django/contrib/admin/filterspecs.py
78
""" FilterSpec encapsulates the logic for displaying filters in the Django admin. Filters are specified in models with the "list_filter" option. Each filter subclass knows how to display a filter for a field that passes a certain test -- e.g. being a DateField or ForeignKey. """ from django.db import models from djan...
makinacorpus/django
refs/heads/master
tests/defer_regress/models.py
59
""" Regression tests for defer() / only() behavior. """ from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Item(models.Model): name = models.CharField(max_length=15) text = models.TextField(default="xyzzy") value = models.IntegerF...
dex4er/django
refs/heads/1.6.x
tests/defer_regress/models.py
59
""" Regression tests for defer() / only() behavior. """ from django.db import models from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class Item(models.Model): name = models.CharField(max_length=15) text = models.TextField(default="xyzzy") value = models.IntegerF...
yade/trunk
refs/heads/master
doc/sphinx/ipython_console_highlighting.py
112
"""reST directive for syntax-highlighting ipython interactive sessions. XXX - See what improvements can be made based on the new (as of Sept 2009) 'pycon' lexer for the python console. At the very least it will give better highlighted tracebacks. """ #-----------------------------------------------------------------...
benesch/adspygoogle.dfp
refs/heads/master
adspygoogle/SOAPpy/wstools/__init__.py
14
#! /usr/bin/env python """WSDL parsing services package for Web Services for Python.""" ident = "$Id: __init__.py,v 1.11 2004/12/07 15:54:53 blunck2 Exp $" import WSDLTools import XMLname import logging
polzy/PokeManager
refs/heads/master
pogo/POGOProtos/Settings/Master/Pokemon/StatsAttributes_pb2.py
16
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Settings/Master/Pokemon/StatsAttributes.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from ...
hnaoto/stuff
refs/heads/master
stuff/migrations/0005_user_auth.py
2
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('stuff', '0004_auto_20151021_2309'), ] operations = [ migrations.AddField( model_name='user', name='a...
kennedyshead/home-assistant
refs/heads/dev
homeassistant/components/mqtt_json/__init__.py
36
"""The mqtt_json component."""
SebDieBln/QGIS
refs/heads/master
python/plugins/processing/algs/lidar/lastools/lasnoisePro.py
12
# -*- coding: utf-8 -*- """ *************************************************************************** lasnoisePro.py --------------------- Date : October 2014 Copyright : (C) 2014 by Martin Isenburg Email : martin near rapidlasso point com ***************...
Endika/account-financial-reporting
refs/heads/8.0
account_financial_report_webkit/wizard/print_journal.py
30
# -*- coding: utf-8 -*- ############################################################################## # # account_financial_report_webkit module for OpenERP # Copyright (C) 2012 SYLEAM Info Services (<http://www.syleam.fr/>) # Sebastien LANGE <sebastien.lange@syleam.fr> # # This file is a part of...
bplancher/odoo
refs/heads/9.0
openerp/addons/test_uninstall/__init__.py
2355
# -*- coding: utf-8 -*- import models
VCTLabs/openadams
refs/heads/master
oalogview.py
1
# -*- coding: utf-8 -*- # $Id$ # ------------------------------------------------------------------- # Copyright 2012 Achim K�hler # # This file is part of openADAMS. # # openADAMS is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published # b...
mbr0wn/gnuradio
refs/heads/master
grc/gui/canvas/port.py
5
""" Copyright 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of GNU Radio SPDX-License-Identifier: GPL-2.0-or-later """ import math from gi.repository import Gtk, PangoCairo, Pango from . import colors from .drawable import Drawable from .. import Actions, Utils, Constants from ...core.utils.d...
bjolivot/ansible
refs/heads/devel
lib/ansible/modules/network/illumos/dladm_etherstub.py
70
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Adam Števko <adam.stevko@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 L...
marionleborgne/nupic
refs/heads/master
tests/integration/nupic/opf/opf_checkpoint_test/experiments/temporal_multi_step/a/description.py
6
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2011-2015, 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 p...
maneeshd/PyTutorial
refs/heads/master
Advanced/Numpy/NumpyBasics.py
1
""" @author: Maneesh D @email: maneeshd77@gmail.com @date: 13-03-2017 """ import numpy as np a = np.array([[0, 1, 2, 3, 4], [5, 6, 7, 8, 9]], dtype=np.int64) b = np.arange(11, 21).reshape(2, 5) print(a) print(a.shape) print(a.dtype) print() print(b) print(b.shape) print(b.dtype) print() print(a + b) print() print(a - ...
mkoistinen/joule
refs/heads/master
manage.py
1
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "joule.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
chenyoufu/writeups
refs/heads/master
jarvisoj/pwn_level2_x64.py
1
from pwn import * p = remote("pwn2.jarvisoj.com", 9882) rop0 = 0x00000000004006b3 #pop rdi ; ret bin_sh = 0x0000000000600a90 # system@plt address payload = 'A' * 136 + p64(rop0) + p64(bin_sh) + p64(0x00000000004004c0) p.send(payload) p.interactive()
tysonclugg/django
refs/heads/master
django/conf/global_settings.py
39
""" Default Django settings. Override these with settings in the module pointed to by the DJANGO_SETTINGS_MODULE environment variable. """ # This is defined here as a do-nothing function because we can't import # django.utils.translation -- that module depends on the settings. def gettext_noop(s): return s ####...