repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
aYukiSekiguchi/ACCESS-Chromium | refs/heads/master | tools/valgrind/suppressions.py | 1 | #!/usr/bin/env python
# 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.
# suppressions.py
"""Post-process Valgrind suppression matcher.
Suppressions are defined as follows:
# optional one-line comment... |
akosyakov/intellij-community | refs/heads/master | python/testData/psi/KeywordAsNamedParameter.py | 82 | def f(from=1, another_one=2):
pass |
acsone/odoo | refs/heads/8.0 | addons/l10n_nl/__openerp__.py | 260 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2009 Veritos - Jan Verlaan - www.veritos.nl
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# con... |
aequitas/home-assistant | refs/heads/dev | homeassistant/components/ambient_station/config_flow.py | 10 | """Config flow to configure the Ambient PWS component."""
import voluptuous as vol
from homeassistant import config_entries
from homeassistant.const import CONF_API_KEY
from homeassistant.core import callback
from homeassistant.helpers import aiohttp_client
from .const import CONF_APP_KEY, DOMAIN
@callback
def conf... |
andmos/ansible | refs/heads/devel | lib/ansible/modules/utilities/logic/import_role.py | 9 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# 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': [... |
laffra/pava | refs/heads/master | pava/implementation/natives/sun/management/GcInfoBuilder.py | 1 | def add_native_methods(clazz):
def getNumGcExtAttributes__java_lang_management_GarbageCollectorMXBean__(a0, a1):
raise NotImplementedError()
def fillGcAttributeInfo__java_lang_management_GarbageCollectorMXBean__int__java_lang_String____char____java_lang_String____(a0, a1, a2, a3, a4, a5):
raise... |
Kunstmord/krakenous | refs/heads/master | krakenous/errors.py | 1 | __author__ = 'George Oblapenko, Viktor Evstratov'
__license__ = "GPLv3"
# Custom errors (no backend found, no such id, cannot add to db, field with this name already exists, etc) go here
class KrakenousException(Exception):
pass
class KrakenousNotImplemented(Exception):
pass
class KrakenousUnsupportedOper... |
funkbit/django-doctor | refs/heads/master | doctor/management/commands/test_storage.py | 4 | from django.core.management.base import BaseCommand
from doctor.services.storage import StorageServiceCheck
class Command(BaseCommand):
"""
Test various file storage operations, to ensure that integrations (with ie.
Amazon S3) is working properly.
"""
help = 'Test file storage operations.'
... |
0x7E/ubuntu-tweak | refs/heads/master | data/templates/python-script.py | 13 | #!/usr/bin/python
print 'Hello World'
|
tinkhaven-organization/odoo | refs/heads/8.0 | addons/purchase/__openerp__.py | 259 | # -*- 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... |
girish946/yowsup | refs/heads/master | yowsup/registration/regrequest.py | 50 | '''
Copyright (c) <2012> Tarek Galal <tare2.galal@gmail.com>
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, modify,
m... |
jpaton/xen-4.1-LJX1 | refs/heads/master | tools/python/xen/util/vscsi_util.py | 15 | #!/usr/bin/env python
# -*- mode: python; -*-
#============================================================================
# This library is free software; you can redistribute it and/or
# modify it under the terms of version 2.1 of the GNU Lesser General Public
# License as published by the Free Software Foundation... |
domob1812/bitcoin | refs/heads/master | test/util/rpcauth-test.py | 71 | #!/usr/bin/env python3
# Copyright (c) 2015-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test share/rpcauth/rpcauth.py
"""
import base64
import configparser
import hmac
import importlib
import... |
codekansas/spykes | refs/heads/master | spykes/config.py | 2 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
# Environment variables are formulated using SPYKES_KEY_%s.
SPYKES_KEY = 'SPYKES'
# The default data path.
DEFAULT_DATA_DIR = '.spykes'
# Defines the default colors for the population plot.
DEFAULT... |
Nebucatnetzer/tamagotchi | refs/heads/master | pygame/lib/python3.4/site-packages/faker/providers/lorem/ru_RU/__init__.py | 19 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from .. import Provider as LoremProvider
class Provider(LoremProvider):
word_list = (
'алььтыра', 'дэлььынётё', 'вэртырэм', 'вэрыар', 'ты', 'рэгяонэ',
'црял', 'квюальизквюэ', 'квюоджё', 'зюаз', 'конгуы', 'антеопам',
'прё', 'эт... |
algiopensource/server-tools | refs/heads/8.0 | base_search_fuzzy/models/trgm_index.py | 9 | # -*- coding: utf-8 -*-
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from openerp import SUPERUSER_ID, _, api, exceptions, fields, models
from psycopg2.extensions import AsIs
_logger = logging.getLogger(__name__)
class TrgmIndex(models.Model):
"""Model for Trigram Index."""
... |
gameduell/duell | refs/heads/master | bin/mac/python2.7.9/lib/python2.7/idlelib/StackViewer.py | 25 | import os
import sys
import linecache
import re
import Tkinter as tk
from idlelib.TreeWidget import TreeNode, TreeItem, ScrolledCanvas
from idlelib.ObjectBrowser import ObjectTreeItem, make_objecttreeitem
from idlelib.PyShell import PyShellFileList
def StackBrowser(root, flist=None, tb=None, top=None):
if top is ... |
obr/python-fedex | refs/heads/master | examples/example_config.py | 2 | """
This file holds various configuration options used for all of the examples.
You will need to change the values below to match your test account.
"""
import os
import sys
# Use the fedex directory included in the downloaded package instead of
# any globally installed versions.
sys.path.insert(0, os.path.dirname(os.... |
vivianli32/TravelConnect | refs/heads/master | flask/lib/python3.4/site-packages/pip/_vendor/requests/hooks.py | 1891 | # -*- coding: utf-8 -*-
"""
requests.hooks
~~~~~~~~~~~~~~
This module provides the capabilities for the Requests hooks system.
Available hooks:
``response``:
The response generated from a Request.
"""
HOOKS = ['response']
def default_hooks():
hooks = {}
for event in HOOKS:
hooks[event] = []... |
korzeniewskipl/python-mode | refs/heads/develop | pymode/libs3/rope/base/pyscopes.py | 89 | import rope.base.builtins
import rope.base.codeanalyze
import rope.base.pynames
from rope.base import ast, exceptions, utils
class Scope(object):
def __init__(self, pycore, pyobject, parent_scope):
self.pycore = pycore
self.pyobject = pyobject
self.parent = parent_scope
def get_names... |
josh-mckenzie/cassandra-dbapi2 | refs/heads/master | test/test_huge_query.py | 12 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
keon/algorithms | refs/heads/master | algorithms/tree/avl/avl.py | 2 | from tree.tree import TreeNode
class AvlTree(object):
"""
An avl tree.
"""
def __init__(self):
# Root node of the tree.
self.node = None
self.height = -1
self.balance = 0
def insert(self, key):
"""
Insert new key into node
"""
# Cre... |
klnprj/testapp | refs/heads/master | django/middleware/clickjacking.py | 329 | """
Clickjacking Protection Middleware.
This module provides a middleware that implements protection against a
malicious site loading resources from your site in a hidden frame.
"""
from django.conf import settings
class XFrameOptionsMiddleware(object):
"""
Middleware that sets the X-Frame-Options HTTP heade... |
Nitrate/Nitrate | refs/heads/develop | src/tcms/linkreference/urls.py | 2 | # -*- coding: utf-8 -*-
from django.urls import path
from tcms.linkreference import views
urlpatterns = [
path("add/", views.AddLinkToTargetView.as_view(), name="add-link-reference"),
path("get/", views.get, name="get-link-references"),
path(
"remove/<int:link_id>/",
views.RemoveLinkRefere... |
pabigot/pyxb | refs/heads/next | tests/trac/test-issue-0014.py | 2 | # -*- coding: utf-8 -*-
import logging
if __name__ == '__main__':
logging.basicConfig()
_log = logging.getLogger(__name__)
import pyxb.binding.generate
import pyxb.utils.domutils
from pyxb.utils import six
from xml.dom import Node
import pyxb.namespace
import xml.dom.minidom as minidom
import os.path
xst = '''<?xm... |
caedocha/pvc-scripts | refs/heads/master | local/jointChainCreator.py | 2 | from maya.cmds import spaceLocator, joint, parentConstraint, parent, duplicate, delete, select, rename, ls
def getConstraintNodes(node):
"""
Gets the constraint nodes of the specified node.
"""
return listRelatives(node, type="constraint")
def createJointsFromLocators(locators):
"""
Creates a joint chain usin... |
CXQERP/ODOOERP | refs/heads/master | addons/account_check_writing/report/__init__.py | 446 | # -*- 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... |
kevinkahn/softconsole | refs/heads/master | issuecommands.py | 1 | import json
import os
import threading
import subprocess
import functools
from dataclasses import dataclass
from ast import literal_eval
import githubutil as U
import logsupport
import historybuffer
import time
from logsupport import ConsoleWarning, ConsoleError, ConsoleInfo
from controlevents import PostEvent, Consol... |
mikan/racm | refs/heads/develop | src/racm_ui_settings_frame.py | 1 | """Subclass of SettingsFrame, which is generated by wxFormBuilder."""
import wx
import os.path
import platform
import racm_ui
# Implementing SettingsFrame
class SettingsFrame(racm_ui.SettingsFrame):
_main_frame = None
_config = None
def __init__(self, parent, config):
racm_ui.SettingsFrame.__ini... |
victor-prado/broker-manager | refs/heads/master | environment/lib/python3.5/site-packages/pandas/stats/fama_macbeth.py | 7 | from pandas.core.base import StringMixin
from pandas.compat import StringIO, range
import numpy as np
from pandas.core.api import Series, DataFrame
import pandas.stats.common as common
from pandas.util.decorators import cache_readonly
# flake8: noqa
def fama_macbeth(**kwargs):
"""Runs Fama-MacBeth regression.
... |
cedi4155476/QGIS | refs/heads/master | python/plugins/processing/algs/qgis/VariableDistanceBuffer.py | 11 | # -*- coding: utf-8 -*-
"""
***************************************************************************
VariableDistanceBuffer.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
****************... |
t794104/ansible | refs/heads/devel | lib/ansible/modules/network/f5/bigip_firewall_address_list.py | 38 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks Inc.
# 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',
... |
foufou55/Sick-Beard | refs/heads/development | sickbeard/clients/requests/hooks.py | 1891 | # -*- coding: utf-8 -*-
"""
requests.hooks
~~~~~~~~~~~~~~
This module provides the capabilities for the Requests hooks system.
Available hooks:
``response``:
The response generated from a Request.
"""
HOOKS = ['response']
def default_hooks():
hooks = {}
for event in HOOKS:
hooks[event] = []... |
coolsvap/sos | refs/heads/master | sos/plugins/mysql.py | 12 | # 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 distributed in the hope that it will be useful,
# but... |
wangjohn/shape_of_stones | refs/heads/master | plot_stones.py | 1 | from matplotlib import pyplot
from descartes.patch import PolygonPatch
from stone import *
import numpy
# Random Point Chipping
#
# fraction_mean = 0.5
# fraction_std = 0.15
# vertex_chipper = RandomPointVertexChipper(fraction_mean, fraction_std)
# Random Angle Vertex Chipping
# angle_mean = 0.35
# angle_std = 0.35
... |
terkaa/linuxcnc | refs/heads/master | src/emc/usr_intf/stepconf/pages.py | 5 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
#
# This is stepconf, a graphical configuration editor for LinuxCNC
# Copyright 2007 Jeff Epler <jepler@unpythonic.net>
# stepconf 1.1 revamped by Chris Morley 2014
#
# This program is free software; you can redistribute it and/or modify
# it under the term... |
proversity-org/edx-platform | refs/heads/master | openedx/core/djangoapps/cors_csrf/models.py | 24 | """Models for cross-domain configuration. """
from config_models.models import ConfigurationModel
from django.db import models
from django.utils.translation import ugettext_lazy as _
class XDomainProxyConfiguration(ConfigurationModel):
"""Cross-domain proxy configuration.
See `openedx.core.djangoapps.cors_cs... |
BrainDamage/Flexget | refs/heads/develop | flexget/utils/titles/parser.py | 5 | from __future__ import unicode_literals, division, absolute_import
import re
class ParseWarning(Warning):
def __init__(self, value, **kwargs):
self.value = value
self.kwargs = kwargs
def __unicode__(self):
return self.value
def __str__(self):
return self.__unicode__().en... |
onceuponatimeforever/oh-mainline | refs/heads/master | vendor/packages/Django/django/contrib/gis/tests/geoapp/test_feeds.py | 111 | from __future__ import absolute_import
from xml.dom import minidom
from django.conf import settings
from django.contrib.sites.models import Site
from django.test import TestCase
from .models import City
class GeoFeedTest(TestCase):
urls = 'django.contrib.gis.tests.geoapp.urls'
def setUp(self):
Si... |
vitan/django | refs/heads/master | tests/template_tests/syntax_tests/test_basic.py | 106 | from django.template.base import Context, TemplateSyntaxError
from django.test import SimpleTestCase
from ..utils import SilentAttrClass, SilentGetItemClass, SomeClass, setup
basic_templates = {
'basic-syntax01': 'something cool',
'basic-syntax02': '{{ headline }}',
'basic-syntax03': '{{ first }} --- {{ s... |
rombie/contrail-controller | refs/heads/master | src/config/utils/add_route_target.py | 5 | #!/usr/bin/python
#
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
import sys
import argparse
import ConfigParser
from provision_bgp import BgpProvisioner
class MxProvisioner(object):
def __init__(self, args_str=None):
self._args = None
if not args_str:
args_str ... |
jagguli/intellij-community | refs/heads/master | python/testData/mover/insideDocComment_afterDown.py | 80 | def fcn(self, foo, bar):
"""
:type bar: str
:type foo: int
"""
self.foo = foo
self.bar = bar |
li282886931/apistore | refs/heads/master | manage/app/views.py | 6445 | from django.shortcuts import render
# Create your views here.
|
atris/gpdb | refs/heads/master | gpMgmt/bin/gppylib/programs/clsInjectFault.py | 9 | #!/usr/bin/env python
#
# Copyright (c) Greenplum Inc 2010. All Rights Reserved.
#
#
# Used to inject faults into the file replication code
#
#
# THIS IMPORT MUST COME FIRST
#
# import mainUtils FIRST to get python version check
from gppylib.mainUtils import *
from optparse import Option, OptionGroup, OptionParser, O... |
Jordicious/data-processor | refs/heads/master | code/shell.py | 1 | #!/usr/bin/python
#BEEF WELLINGTON inc.
#DATA PROCESSOR SHELL 1.0.4, API 2.5.5
#copyleft by Beef Wellington inc.
#reproduction of the shell application is allowed
#this application is only for unix based systems
#import modules
import sys
import dataProcess as d
#title screen
print(">>>> D A T A P R O C E S S O R... |
vmindru/ansible | refs/heads/devel | lib/ansible/modules/cloud/amazon/aws_s3.py | 26 | #!/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 distributed... |
uberamd/NGECore2 | refs/heads/master | scripts/object/tangible/loot/misc/echo_base_token.py | 85615 | import sys
def setup(core, object):
return |
sridevikoushik31/nova | refs/heads/port_id_in_vif_on_devide | tools/xenserver/vdi_chain_cleanup.py | 139 | #!/usr/bin/env python
# Copyright 2012 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 l... |
miguelparaiso/PracticaOdoo | refs/heads/master | addons/base_geolocalize/models/__init__.py | 1273 | import res_partner
|
jbassen/edx-platform | refs/heads/master | lms/djangoapps/ccx/tests/test_field_override_performance.py | 1 | # coding=UTF-8
"""
Performance tests for field overrides.
"""
import ddt
import itertools
import mock
from nose.plugins.skip import SkipTest
from courseware.views import progress # pylint: disable=import-error
from courseware.field_overrides import OverrideFieldData
from datetime import datetime
from django.conf impo... |
Distrotech/gegl | refs/heads/master | tests/python/test-gegl-buffer.py | 7 | #!/usr/bin/env python
""" This file is part of GEGL
*
* GEGL 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 later version.
*
* GEGL is ... |
hkhamm/django_rest_tutorial_2 | refs/heads/master | env/lib/python2.7/site-packages/django/contrib/gis/geoip/libgeoip.py | 121 | import os
from ctypes import CDLL
from ctypes.util import find_library
from django.conf import settings
# Creating the settings dictionary with any settings, if needed.
GEOIP_SETTINGS = dict((key, getattr(settings, key))
for key in ('GEOIP_PATH', 'GEOIP_LIBRARY_PATH', 'GEOIP_COUNTRY', 'GEOIP_CITY... |
Lingotek/filesystem-connector | refs/heads/master | tests/test_actions/test_push.py | 2 | from tests.test_actions import *
from ltk.actions.push_action import *
from ltk.actions.clean_action import CleanAction
from ltk.actions.add_action import AddAction
from ltk.actions.rm_action import RmAction
from ltk.actions.request_action import RequestAction
from ltk.actions.download_action import DownloadAction
from... |
jparker/therminator_server | refs/heads/master | therminator/views.py | 1 | from datetime import datetime, time, timedelta
from flask import flash, redirect, render_template, request, url_for
from flask_login import (
confirm_login,
current_user,
fresh_login_required,
login_required,
login_user,
logout_user,
)
import pytz
from sqlalchemy.exc import IntegrityError
from u... |
e-gob/plataforma-kioscos-autoatencion | refs/heads/master | scripts/ansible-play/.venv/lib/python2.7/site-packages/ansible/modules/cloud/vmware/vmware_target_canonical_facts.py | 47 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Joseph Callen <jcallen () csc.com>
# 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',
... |
nusdbsystem/incubator-singa | refs/heads/master | examples/cifar10/caffe/__init__.py | 4 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
fdvarela/odoo8 | refs/heads/master | addons/crm_project_issue/__openerp__.py | 388 | {
'name': 'Lead to Issue',
'version': '1.0',
'summary': 'Create Issues from Leads',
'sequence': '19',
'category': 'Project Management',
'complexity': 'easy',
'author': 'OpenERP SA',
'description': """
Lead to Issues
==============
Link module to map leads to issues
""",
'dat... |
qtproject/qt-creator | refs/heads/master | tests/system/suite_tools/tst_designer_goto_slot/test.py | 2 | ############################################################################
#
# Copyright (C) 2016 The Qt Company Ltd.
# Contact: https://www.qt.io/licensing/
#
# This file is part of Qt Creator.
#
# Commercial License Usage
# Licensees holding valid commercial Qt licenses may use this file in
# accordance with the co... |
smartforceplus/SmartForceplus | refs/heads/master | addons/crm_partner_assign/__init__.py | 364 | # -*- 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... |
campenberger/boto | refs/heads/develop | tests/integration/cloudformation/test_cert_verification.py | 126 | # Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
# All rights reserved.
#
# 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 withou... |
cubicova17/annet | refs/heads/master | venv/lib/python2.7/site-packages/django/utils/translation/trans_real.py | 35 | """Translation helper functions."""
from __future__ import unicode_literals
import locale
import os
import re
import sys
import gettext as gettext_module
from threading import local
import warnings
from django.utils.importlib import import_module
from django.utils.datastructures import SortedDict
from django.utils.en... |
AstroMatt/esa-time-perception | refs/heads/master | backend/api_v3/management/commands/check-missing-results.py | 2 | import json
from django.core.management.base import BaseCommand
from backend.api_v3.models import Result
from backend.logger.models import HTTPRequest
class Command(BaseCommand):
help = 'Check which HTTP requests were not parsed as Results'
def handle(self, *args, **options):
print(f'\n\nResults whic... |
Laurawly/tvm-1 | refs/heads/master | tests/python/unittest/test_target_codegen_hexagon.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 u... |
bowang/tensorflow | refs/heads/master | tensorflow/python/keras/_impl/keras/utils/data_utils.py | 15 | # 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... |
openbaoz/titanium_mobile | refs/heads/master | support/module/iphone/iphone.py | 39 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# iPhone Module Project Create Script
#
import os,sys,shutil
template_dir = os.path.abspath(os.path.dirname(sys._getframe(0).f_code.co_filename))
module_dir = os.path.dirname(template_dir)
sys.path.append(module_dir)
import module
#
# this class is created after all te... |
sinelaw/enough | refs/heads/master | old/fnf/gui/Lib/Point.py | 6 | import pygame
from AttrDict import AttrDict
from math import atan2, sqrt, sin, cos, pi
class Point(AttrDict):
allowed_fields = [('x',),
('y',),
('z',0),
]
def __add__(self, other):
return Point(self.x+other.x, self.y+other.y, self.z+ot... |
jgrocha/QGIS | refs/heads/master | tests/src/python/test_qgsgeometrygeneratorsymbollayer.py | 29 | # -*- coding: utf-8 -*-
"""
***************************************************************************
test_qgsgeometrygeneratorsymbollayer.py
---------------------
Date : December 2015
Copyright : (C) 2015 by Matthias Kuhn
Email : matthias at opengis dot ... |
meletakis/collato | refs/heads/master | lib/python2.7/site-packages/django/contrib/flatpages/tests/views.py | 207 | import os
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.auth.tests.utils import skipIfCustomUser
from django.contrib.flatpages.models import FlatPage
from django.test import TestCase
from django.test.utils import override_settings
@override_settings(
LOGIN_URL='/... |
HiSPARC/station-software | refs/heads/master | user/python/Lib/site-packages/pip/_vendor/chardet/__init__.py | 270 | ######################## BEGIN LICENSE BLOCK ########################
# This library 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 2.1 of the License, or (at your option) any later ve... |
xxsergzzxx/python-for-android | refs/heads/master | python3-alpha/python3-src/Lib/test/test_winreg.py | 51 | # Test the windows specific win32reg module.
# Only win32reg functions not hit here: FlushKey, LoadKey and SaveKey
import os, sys
import unittest
from test import support
threading = support.import_module("threading")
from platform import machine
# Do this first so test will be skipped if module doesn't exist
support... |
zhaobin19918183/zhaobinCode | refs/heads/master | zhaobin/mysite/polls/migrations/0004_add.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-08-05 09:01
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('polls', '0003_delete_add'),
]
operations = [
migrations.CreateModel(
... |
rcoscali/external-chromium-trace | refs/heads/master | trace-viewer/third_party/closure_linter/closure_linter/common/erroraccumulator.py | 264 | #!/usr/bin/env python
#
# Copyright 2008 The Closure Linter 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
#... |
openstack/mistral-extra | refs/heads/master | mistral_extra/tests/unit/actions/openstack/test_openstack_actions.py | 1 | # Copyright 2014 - Mirantis, 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 ag... |
ModestoCabrera/IS360_W7Assignment | refs/heads/master | week_7_code.py | 1 | #!usr/bin/env python
# -*- coding: utf-8 -*-
"""Reads HTML Table and returns a Tuple"""
import pprint
import urllib2, argparse, re
from bs4 import BeautifulSoup
def url_download(url):
"""
Args:
url_file = request to open url link.
Returns:
url_file = file access conenction to url.
E... |
uberamd/NGECore2 | refs/heads/master | scripts/object/mobile/mutant_rancor_static.py | 85615 | import sys
def setup(core, object):
return |
ProjectSWGCore/NGECore2 | refs/heads/master | scripts/object/tangible/furniture/modern/rug_oval_sml_s01.py | 85615 | import sys
def setup(core, object):
return |
shakamunyi/ansible | refs/heads/devel | v1/hacking/module_formatter.py | 103 | #!/usr/bin/env python
# (c) 2012, Jan-Piet Mens <jpmens () gmail.com>
# (c) 2012-2014, Michael DeHaan <michael@ansible.com> and others
#
# 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 So... |
iut-ibk/P8-WSC-GUI | refs/heads/master | 3dparty/Editra/src/perspective.py | 3 | ###############################################################################
# Name: perspectives.py #
# Purpose: Editra's view management service #
# Author: Cody Precord <cprecord@editra.org> #
... |
crowdhackathon-transport/optimizers | refs/heads/master | crowdstance-api/venv/lib/python2.7/site-packages/jinja2/testsuite/inheritance.py | 414 | # -*- coding: utf-8 -*-
"""
jinja2.testsuite.inheritance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tests the template inheritance feature.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import unittest
from jinja2.testsuite import JinjaTestCase
from jinja2 import Env... |
terranodo/eventkit-cloud | refs/heads/master | eventkit_cloud/core/migrations/0004_delete_jobpermission.py | 1 | # Generated by Django 2.2.5 on 2020-08-03 10:42
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0003_auto_20200803_1037'),
]
operations = [
migrations.SeparateDatabaseAndState(
state_operations=[
migrations.De... |
cgstudiomap/cgstudiomap | refs/heads/develop | main/parts/geospatial/geoengine_geoname_geocoder/wizard/bulk_encode.py | 2 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Nicolas Bessi
# Copyright 2011-2012 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# ... |
gspilio/nova | refs/heads/master | nova/api/openstack/compute/contrib/quotas.py | 7 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 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.apach... |
jk1/intellij-community | refs/heads/master | python/testData/inspections/PyUnboundLocalVariableInspection/UnboundExceptAs.py | 83 | def f():
try:
raise KeyError("ms")
except KeyError as e:
print(e) #pass
print(<warning descr="Local variable 'e' might be referenced before assignment">e</warning>) #fail
|
IsCoolEntertainment/debpkg_python-boto | refs/heads/master | tests/unit/sts/test_connection.py | 2 | #!/usr/bin/env python
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# 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 ... |
miedzinski/velruse | refs/heads/master | velruse/providers/mailru.py | 3 | """Mail.ru Authentication Views
You may see developer docs on http://api.mail.ru/docs/guides/oauth/
"""
import hashlib
import re
import uuid
from pyramid.httpexceptions import HTTPFound
from pyramid.security import NO_PERMISSION_REQUIRED
import requests
from ..api import (
AuthenticationComplete,
Authentica... |
sekikn/incubator-airflow | refs/heads/master | tests/providers/jdbc/__init__.py | 5130 | #
# 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... |
BondAnthony/ansible | refs/heads/devel | test/lib/ansible_test/_internal/http.py | 68 | """
Primitive replacement for requests to avoid extra dependency.
Avoids use of urllib2 due to lack of SNI support.
"""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import json
import time
try:
from urllib import urlencode
except ImportError:
# noinspection PyCompati... |
citrix-openstack-build/sahara | refs/heads/master | sahara/tests/unit/plugins/vanilla/v1_2_1/test_plugin.py | 3 | # Copyright (c) 2013 Mirantis Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... |
sandeepkbhat/pylearn2 | refs/heads/master | pylearn2/utils/insert_along_axis.py | 44 | """
Shove the contents of one array into a larger array with a fill value
everywhere else.
"""
__author__ = "David Warde-Farley"
__copyright__ = "Copyright (c) 2012, Universite de Montreal"
__credits__ = [__author__]
__license__ = "BSD"
__maintainer__ = "David Warde-Farley"
__email__ = "wardefar@iro"
import numpy as ... |
AvivC/flask | refs/heads/master | flask/app.py | 1 | # -*- coding: utf-8 -*-
"""
flask.app
~~~~~~~~~
This module implements the central WSGI application object.
:copyright: (c) 2015 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import os
import sys
from threading import Lock
from datetime import timedelta
from itertools import ... |
chiragjogi/odoo | refs/heads/8.0 | addons/crm_profiling/__init__.py | 438 | # -*- 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... |
tst-lsavoie/earthenterprise | refs/heads/master | earth_enterprise/src/server/wsgi/common/__init__.py | 9 | """The package indicator for wsgi.common."""
|
tomhenderson/ns-3-dev-git | refs/heads/master | src/nix-vector-routing/bindings/modulegen__gcc_LP64.py | 4 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... |
robvanbentem/bitcoin | refs/heads/master | qa/rpc-tests/test_framework/bignum.py | 230 | #
#
# bignum.py
#
# This file is copied from python-bitcoinlib.
#
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
"""Bignum routines"""
from __future__ import absolute_import, division, print_function, unicode_literals
imp... |
valfirst/selenium | refs/heads/master | py/test/selenium/webdriver/common/api_example_tests.py | 13 | # 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... |
cfossace/test | refs/heads/master | crits/exploits/views.py | 13 | import json
from django.contrib.auth.decorators import user_passes_test
from django.core.urlresolvers import reverse
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render_to_response
from django.template import RequestContext
from crits.exploits.forms import AddExploitForm
fro... |
edx/edx-platform | refs/heads/master | lms/djangoapps/certificates/urls.py | 4 | """
URLs for the certificates app.
"""
from django.conf import settings
from django.conf.urls import url
from lms.djangoapps.certificates import views
app_name = 'certificates'
urlpatterns = [
# Certificates HTML view end point to render web certs by user and course
url(
fr'^user/(?P<user_id>[^/]*)/... |
steveb/heat | refs/heads/master | heat/engine/template.py | 1 | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... |
kbarbary/snpgm | refs/heads/master | naive_sampling.py | 1 | #!/usr/bin/env python
"""Sample one light curve at a time, plot the model and make a corner plot."""
import os
from os.path import join, basename
from glob import glob
import numpy as np
import sncosmo
import emcee
import triangle
import matplotlib as mpl
mpl.use('Agg')
from matplotlib import pyplot as plt
from astro... |
ArcherSys/ArcherSys | refs/heads/master | Lib/site-packages/libfuturize/fixes/fix_order___future__imports.py | 51 | """
UNFINISHED
Fixer for turning multiple lines like these:
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
into a single line like this:
from __future__ import (absolute_import, division, print_function)
This helps with testing of ``futu... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.