repo_name stringlengths 6 100 | path stringlengths 4 294 | copies stringlengths 1 5 | size stringlengths 4 6 | content stringlengths 606 896k | license stringclasses 15
values |
|---|---|---|---|---|---|
jimklo/LearningRegistry | LR/ez_setup.py | 358 | 9716 | #!python
"""Bootstrap setuptools installation
If you want to use setuptools in your package's setup.py, just include this
file in the same directory with it, and add this to the top of your setup.py::
from ez_setup import use_setuptools
use_setuptools()
If you want to require a specific version of setuptools... | apache-2.0 |
fraenkel-lab/pcst_fast | external/pybind11/tests/test_eigen.py | 6 | 5427 | import pytest
with pytest.suppress(ImportError):
import numpy as np
ref = np.array([[ 0, 3, 0, 0, 0, 11],
[22, 0, 0, 0, 17, 11],
[ 7, 5, 0, 1, 0, 11],
[ 0, 0, 0, 0, 0, 11],
[ 0, 0, 14, 0, 8, 11]])
def assert_eq... | mit |
DefyVentures/edx-platform | lms/djangoapps/shoppingcart/migrations/0007_auto__add_field_orderitem_service_fee.py | 114 | 10407 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'OrderItem.service_fee'
db.add_column('shoppingcart_orderitem', 'service_fee',
... | agpl-3.0 |
doumadou/ssbc | search/management/commands/loadhash.py | 36 | 1418 | #coding: utf8
from django.core.management.base import BaseCommand
from django import db as ddb
from search.models import Hash
import pymongo
db = pymongo.MongoClient().dht
class Command(BaseCommand):
def handle(self, *args, **options):
Hash.objects.all().delete()
print 'inputing ...'
total... | gpl-2.0 |
arnaud-morvan/QGIS | python/plugins/processing/algs/qgis/PointsFromPolygons.py | 10 | 5832 | # -*- coding: utf-8 -*-
"""
***************************************************************************
PointsFromPolygons.py
---------------------
Date : August 2013
Copyright : (C) 2013 by Alexander Bruy
Email : alexander dot bruy at gmail dot com
*******... | gpl-2.0 |
TheWardoctor/Wardoctors-repo | script.module.schism.common/lib/requests/packages/chardet/big5freq.py | 3133 | 82594 | ######################## 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... | apache-2.0 |
MShel/ttw | listener/packets/udpPacket.py | 1 | 1408 | from listener.packets.abstractPacket import AbstractPacket
from struct import unpack
class UdpPacket(AbstractPacket):
UNPACK_FORMAT = '!HHHH'
UDP_HEADER_LENGTH = 8
PROTOCOL_NAME = 'UDP'
def __init__(self, binPacket: bytes, margin: int):
self.binPacket = binPacket
self.headerMa... | mit |
aerler/WRF-Tools | Python/wrfavg/wrfout_average.py | 1 | 79431 | '''
Created on 2013-09-28, revised 2014-06-17, added daily output 2020-05-04
A script to average WRF output; the default settings are meant for my 'fineIO' output configuration and
process the smaller diagnostic files.
The script can run in parallel mode, with each process averaging one filetype and domain, producing... | gpl-3.0 |
cornell-brg/pymtl | pymtl/tools/simulation/SimulationTool.py | 8 | 9013 | #=======================================================================
# SimulationTool.py
#=======================================================================
# Tool for simulating hardware models.
#
# This module contains classes which construct a model simulator for
# execution in the Python interpreter.
from... | bsd-3-clause |
EricMuller/mywebmarks-backend | requirements/twisted/Twisted-17.1.0/build/lib.linux-x86_64-3.5/twisted/names/test/test_dns.py | 12 | 153274 | # test-case-name: twisted.names.test.test_dns
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for twisted.names.dns.
"""
from __future__ import division, absolute_import
from io import BytesIO
import struct
from zope.interface.verify import verifyClass
from twisted.python.failure... | mit |
jxtech/teambition-api | teambition/api/__init__.py | 3 | 1610 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from teambition.api.oauth import OAuth # NOQA
from teambition.api.projects import Projects # NOQA
from teambition.api.tasklists import Tasklists # NOQA
from teambition.api.stages import Stages # NOQA
from teambition.api.tasks import Ta... | mit |
thaumos/ansible | lib/ansible/modules/cloud/azure/azure_rm_mariadbdatabase_facts.py | 12 | 5998 | #!/usr/bin/python
#
# Copyright (c) 2017 Zim Kalinowski, <zikalino@microsoft.com>
# Copyright (c) 2019 Matti Ranta, (@techknowlogick)
#
# 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
AN... | gpl-3.0 |
Aloomaio/googleads-python-lib | examples/ad_manager/v201808/creative_wrapper_service/update_creative_wrappers.py | 1 | 2747 | #!/usr/bin/env python
#
# Copyright 2015 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 requir... | apache-2.0 |
dannyperry571/theapprentice | script.module.unidecode/lib/unidecode/x011.py | 252 | 4135 | data = (
'g', # 0x00
'gg', # 0x01
'n', # 0x02
'd', # 0x03
'dd', # 0x04
'r', # 0x05
'm', # 0x06
'b', # 0x07
'bb', # 0x08
's', # 0x09
'ss', # 0x0a
'', # 0x0b
'j', # 0x0c
'jj', # 0x0d
'c', # 0x0e
'k', # 0x0f
't', # 0x10
'p', # 0x11
'h', # 0x12
'ng', # 0x13
'nn', ... | gpl-2.0 |
RAtechntukan/CouchPotatoServer | libs/pyutil/verlib.py | 106 | 12275 | # -*- coding: utf-8 -*-
"""
"Rational" version definition and parsing for DistutilsVersionFight
discussion at PyCon 2009.
This was written by Tarek Ziadé.
Zooko copied it from http://bitbucket.org/tarek/distutilsversion/ on 2010-07-29.
"""
import re
class IrrationalVersionError(Exception):
"""This is an irrati... | gpl-3.0 |
cnsoft/kbengine-cocos2dx | kbe/res/scripts/common/Lib/idlelib/EditorWindow.py | 4 | 65343 | import sys
import os
import re
import string
import imp
from tkinter import *
import tkinter.simpledialog as tkSimpleDialog
import tkinter.messagebox as tkMessageBox
import traceback
import webbrowser
from idlelib.MultiCall import MultiCallCreator
from idlelib import idlever
from idlelib import WindowList
from idlelib... | lgpl-3.0 |
icomms/wqmanager | apps/domain/models.py | 1 | 6972 | from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
from django.db import models
from domain import Permissions
from wqm.models import WqmAuthority
from locations.models import LocationType
##############################... | bsd-3-clause |
kaguillera/newspipeline | node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/xcode_emulation.py | 1283 | 65086 | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
This module contains classes that help to emulate xcodebuild behavior on top of
other build systems, such as make and ninja.
"""
import copy
import gyp.common... | mit |
sysadminmatmoz/pmis | project_document_page/project.py | 2 | 1589 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010 (Original Author)
# Domsense s.r.l. (<http://www.domsense.com>)
#
# Copyright (C) 2014-now (OpenERP version 7 adaptation)
# Matmoz d.o... | agpl-3.0 |
hehongliang/tensorflow | tensorflow/compiler/tests/depthwise_conv_op_test.py | 4 | 15601 | # 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... | apache-2.0 |
zaqwes8811/matlab_ext | code-miners/extern/cppclean/cpp/utils.py | 1158 | 1153 | #!/usr/bin/env python
#
# Copyright 2007 Neal Norwitz
# Portions Copyright 2007 Google 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... | apache-2.0 |
eRestin/Mezz | mezzanine/pages/models.py | 3 | 10080 | from django.core.urlresolvers import resolve, reverse
from django.db import models
from django.utils.translation import ugettext_lazy as _
from mezzanine.conf import settings
from mezzanine.core.models import Displayable, Orderable, RichText
from mezzanine.pages.fields import MenusField
from mezzanine.pages.managers i... | bsd-2-clause |
trojkat/pylama_gjslint | pylama_gjslint/closure_linter/aliaspass.py | 2 | 7576 | #!/usr/bin/env python
#
# Copyright 2012 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
#
#... | bsd-3-clause |
tuxfux-hlp-notes/python-batches | archieves/Batch-63/14-files/myenv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/escsm.py | 2930 | 7839 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org 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 Reserved.
#
# Con... | gpl-3.0 |
pratikmallya/hue | desktop/core/ext-py/Django-1.6.10/django/contrib/gis/geos/tests/test_geos_mutation.py | 109 | 5305 | # Copyright (c) 2008-2009 Aryeh Leib Taurog, all rights reserved.
# Modified from original contribution by Aryeh Leib Taurog, which was
# released under the New BSD license.
from django.utils import unittest
from django.utils.unittest import skipUnless
from .. import HAS_GEOS
if HAS_GEOS:
from .. import *
fr... | apache-2.0 |
zeptonaut/catapult | third_party/Paste/paste/util/dateinterval.py | 50 | 2412 | """
DateInterval.py
Convert interval strings (in the form of 1w2d, etc) to
seconds, and back again. Is not exactly about months or
years (leap years in particular).
Accepts (y)ear, (b)month, (w)eek, (d)ay, (h)our, (m)inute, (s)econd.
Exports only timeEncode and timeDecode functions.
"""
import re
__all__ = ['inte... | bsd-3-clause |
jantman/cobbler | cobbler/modules/scm_track.py | 3 | 3276 | """
(C) 2009, Red Hat Inc.
Michael DeHaan <michael.dehaan AT gmail>
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 progr... | gpl-2.0 |
yarikoptic/seaborn | seaborn/tests/test_algorithms.py | 1 | 6588 | import numpy as np
from scipy import stats
from six.moves import range
import numpy.testing as npt
from numpy.testing import assert_array_equal
import nose.tools
from nose.tools import assert_equal, raises
from .. import algorithms as algo
rs = np.random.RandomState(sum(map(ord, "test_algorithms")))
a_norm = rs.rand... | bsd-3-clause |
geerlingguy/ansible | test/support/integration/plugins/modules/selinux.py | 60 | 8292 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2012, Derek Carter<goozbach@friocorte.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_v... | gpl-3.0 |
flakerimi/ajenti | plugins/hosts/backend.py | 16 | 3343 | import re
import os
from ajenti.api import *
from ajenti.utils import *
from ajenti.com import *
from ajenti import apis
class Host:
def __init__(self):
self.ip = '';
self.name = '';
self.aliases = '';
class Config(Plugin):
implements(IConfigurable)
name = 'Hosts'
icon = '/d... | lgpl-3.0 |
pilou-/ansible | test/units/modules/network/f5/test_bigip_device_syslog.py | 16 | 3296 | # -*- coding: utf-8 -*-
#
# Copyright: (c) 2018, 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
import os
import json
import pytest
import sys
if sys.version_info < (2... | gpl-3.0 |
CasparLi/calibre | src/calibre/ebooks/rtf2xml/paragraph_def.py | 24 | 29763 | #########################################################################
# #
# #
# copyright 2002 Paul Henry Tremblay #
# ... | gpl-3.0 |
dimagol/trex-core | scripts/external_libs/scapy-2.3.1/python2/scapy/error.py | 21 | 1846 | ## This file is part of Scapy
## See http://www.secdev.org/projects/scapy for more informations
## Copyright (C) Philippe Biondi <phil@secdev.org>
## This program is published under a GPLv2 license
"""
Logging subsystem and basic exception class.
"""
#############################
##### Logging subsystem #####
#######... | apache-2.0 |
chiviak/headphones | lib/unidecode/x08c.py | 251 | 4630 | data = (
'Yu ', # 0x00
'Shui ', # 0x01
'Shen ', # 0x02
'Diao ', # 0x03
'Chan ', # 0x04
'Liang ', # 0x05
'Zhun ', # 0x06
'Sui ', # 0x07
'Tan ', # 0x08
'Shen ', # 0x09
'Yi ', # 0x0a
'Mou ', # 0x0b
'Chen ', # 0x0c
'Die ', # 0x0d
'Huang ', # 0x0e
'Jian ', # 0x0f
'Xie ', # ... | gpl-3.0 |
ArcherSys/ArcherSys | Lib/opcode.py | 1 | 16466 | <<<<<<< HEAD
<<<<<<< HEAD
"""
opcode module - potentially shared between dis and other modules which
operate on bytecodes (e.g. peephole optimizers).
"""
__all__ = ["cmp_op", "hasconst", "hasname", "hasjrel", "hasjabs",
"haslocal", "hascompare", "hasfree", "opname", "opmap",
"HAVE_ARGUMENT", "EX... | mit |
Edraak/edx-platform | cms/djangoapps/contentstore/features/course-settings.py | 33 | 7145 | # pylint: disable=missing-docstring
# pylint: disable=redefined-outer-name
from lettuce import world, step
from selenium.webdriver.common.keys import Keys
from common import type_in_codemirror, upload_file
from django.conf import settings
from nose.tools import assert_true, assert_false
TEST_ROOT = settings.COMMON_T... | agpl-3.0 |
benagricola/exabgp | lib/exabgp/bgp/message/update/nlri/evpn/multicast.py | 1 | 2426 | """
multicast.py
Created by Thomas Morin on 2014-06-23.
Copyright (c) 2014-2015 Orange. All rights reserved.
"""
from exabgp.protocol.ip import IP
from exabgp.bgp.message.update.nlri.qualifier import RouteDistinguisher
from exabgp.bgp.message.update.nlri.qualifier import EthernetTag
from exabgp.bgp.message.update.nl... | bsd-3-clause |
ACJTeam/enigma2 | lib/python/Screens/DVD.py | 7 | 24101 | import os
from enigma import eTimer, iPlayableService, iServiceInformation, eServiceReference, iServiceKeys, getDesktop
from Screens.Screen import Screen
from Screens.MessageBox import MessageBox
from Screens.ChoiceBox import ChoiceBox
from Screens.HelpMenu import HelpableScreen
from Screens.InfoBarGenerics import Info... | gpl-2.0 |
robhudson/django | tests/admin_widgets/widgetadmin.py | 368 | 1345 | from django.contrib import admin
from . import models
class WidgetAdmin(admin.AdminSite):
pass
class CarAdmin(admin.ModelAdmin):
list_display = ['make', 'model', 'owner']
list_editable = ['owner']
class CarTireAdmin(admin.ModelAdmin):
def formfield_for_foreignkey(self, db_field, request, **kwargs... | bsd-3-clause |
yakky/django | tests/ordering/models.py | 261 | 1379 | """
Specifying ordering
Specify default ordering for a model using the ``ordering`` attribute, which
should be a list or tuple of field names. This tells Django how to order
``QuerySet`` results.
If a field name in ``ordering`` starts with a hyphen, that field will be
ordered in descending order. Otherwise, it'll be ... | bsd-3-clause |
RHavar/bitcoin | test/functional/rpc_users.py | 18 | 7885 | #!/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 multiple RPC users."""
from test_framework.test_framework import BitcoinTestFramework
from test_f... | mit |
emoronayuso/beeton | asterisk-bee/asteriskbee/api_status/scripts_graficas/recoge_marcas_graficas.py | 1 | 2307 | #!/usr/bin/python
import matplotlib.pyplot as plt
import numpy as np
#import calendar
from datetime import datetime
from django.conf import settings
settings.configure()
import os
#para conexion con la bases de datos de beeton (asteriskbee)
import sqlite3 as dbapi
##Directorio de la aplicaion
### STATIC_ROOT = '/va... | gpl-3.0 |
zmike/servo | tests/wpt/harness/wptrunner/wptcommandline.py | 32 | 19030 | # 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/.
import argparse
import ast
import os
import sys
from collections import OrderedDict
from distutils.spawn import find_exe... | mpl-2.0 |
Turlough/keyczar | cpp/src/tools/scons/scons-local-1.2.0.d20090223/SCons/Tool/ifort.py | 19 | 3334 | """SCons.Tool.ifort
Tool-specific initialization for newer versions of the Intel Fortran Compiler
for Linux/Windows (and possibly Mac OS X).
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) ... | apache-2.0 |
LaMi-/pmatic | ccu_pkg/python/local/lib/python2.7/dist-packages/requests/auth.py | 174 | 7550 | # -*- coding: utf-8 -*-
"""
requests.auth
~~~~~~~~~~~~~
This module contains the authentication handlers for Requests.
"""
import os
import re
import time
import hashlib
import threading
from base64 import b64encode
from .compat import urlparse, str
from .cookies import extract_cookies_to_jar
from .utils import pa... | gpl-2.0 |
niktre/espressopp | src/integrator/unittest/PTestVelocityVerlet.py | 7 | 4251 | # Copyright (C) 2012,2013
# Max Planck Institute for Polymer Research
# Copyright (C) 2008,2009,2010,2011
# Max-Planck-Institute for Polymer Research & Fraunhofer SCAI
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of t... | gpl-3.0 |
suutari-ai/shoop | shuup_tests/core/test_rounding.py | 3 | 5376 | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import pytest
from decimal import Decimal
from shuup.core.models... | agpl-3.0 |
mattcaldwell/boto | boto/cacerts/__init__.py | 260 | 1097 | # Copyright 2010 Google Inc.
# 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 limitation the rights to use, copy, modify, merg... | mit |
kaplun/invenio | modules/webjournal/lib/webjournal_templates.py | 25 | 36303 | # -*- coding: utf-8 -*-
## This file is part of Invenio.
## Copyright (C) 2007, 2008, 2009, 2010, 2011 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, ... | gpl-2.0 |
ramitalat/odoo | addons/hr_payroll_account/__init__.py | 433 | 1116 | #-*- coding:utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# d$
#
# This program is free software: you can redistribute it and/or modify
# ... | agpl-3.0 |
geminy/aidear | oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/third_party/skia/tools/build_command_buffer.py | 18 | 6222 | #!/usr/bin/python
# Copyright 2016 Google Inc.
#
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Script to build the command buffer shared library and copy it to Skia tree
"""
import argparse
import os
import shlex
import shutil
import subprocess
import sys... | gpl-3.0 |
lonetwin/opencore | opencore/views/tests/test_contentfeeds.py | 4 | 11838 | # Copyright (C) 2008-2009 Open Society Institute
# Thomas Moroz: tmoroz.org
# 2010-2011 Large Blue
# Fergus Doyle: fergus.doyle@largeblue.com
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License Version ... | gpl-2.0 |
ol-loginov/intellij-community | python/helpers/docutils/parsers/rst/states.py | 41 | 129110 | # $Id: states.py 6314 2010-04-26 10:04:17Z milde $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
This is the ``docutils.parsers.restructuredtext.states`` module, the core of
the reStructuredText parser. It defines the following:
:Classes:
- `RSTSt... | apache-2.0 |
jxs/servo | tests/wpt/css-tests/tools/html5lib/html5lib/utils.py | 982 | 2545 | from __future__ import absolute_import, division, unicode_literals
from types import ModuleType
try:
import xml.etree.cElementTree as default_etree
except ImportError:
import xml.etree.ElementTree as default_etree
__all__ = ["default_etree", "MethodDispatcher", "isSurrogatePair",
"surrogatePairTo... | mpl-2.0 |
mszewczy/odoo | addons/hr_timesheet_sheet/hr_timesheet_sheet.py | 72 | 35950 | # -*- 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... | agpl-3.0 |
skycucumber/restful | python/venv/lib/python2.7/site-packages/sqlalchemy/ext/instrumentation.py | 56 | 14646 | """Extensible class instrumentation.
The :mod:`sqlalchemy.ext.instrumentation` package provides for alternate
systems of class instrumentation within the ORM. Class instrumentation
refers to how the ORM places attributes on the class which maintain
data and track changes to that data, as well as event hooks installed... | gpl-2.0 |
diedthreetimes/VCrash | pybindgen-0.15.0.795/pybindgen/typehandlers/inttype.py | 1 | 29684 | # docstrings not needed here (the type handler interfaces are fully
# documented in base.py)
# pylint: disable-msg=C0111
import struct
assert struct.calcsize('i') == 4 # assumption is made that sizeof(int) == 4 for all platforms pybindgen runs on
from base import ReturnValue, Parameter, PointerParameter, PointerRetu... | gpl-2.0 |
maartenq/ansible | lib/ansible/parsing/mod_args.py | 46 | 12036 | # (c) 2014 Michael DeHaan, <michael@ansible.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 option) any later ve... | gpl-3.0 |
baylee-d/osf.io | addons/figshare/messages.py | 25 | 2467 | # MODEL MESSAGES :model.py
BEFORE_PAGE_LOAD_PRIVATE_NODE_MIXED_FS = 'Warning: This OSF {category} is private but figshare project {project_id} may contain some public files or filesets.'
BEFORE_PAGE_LOAD_PUBLIC_NODE_MIXED_FS = 'Warning: This OSF {category} is public but figshare project {project_id} may contain some p... | apache-2.0 |
igemsoftware/SYSU-Software2013 | project/Python27/Lib/site-packages/pythonwin/pywin/framework/intpydde.py | 17 | 1334 | # DDE support for Pythonwin
#
# Seems to work fine (in the context that IE4 seems to have broken
# DDE on _all_ NT4 machines I have tried, but only when a "Command Prompt" window
# is open. Strange, but true. If you have problems with this, close all Command Prompts!
import win32ui
import win32api, win32con
from py... | mit |
SSSD/sssd | src/tests/intg/test_files_provider.py | 1 | 37497 | #
# SSSD files domain tests
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# T... | gpl-3.0 |
boris-savic/swampdragon | tests/test_sessions.py | 13 | 2677 | from swampdragon.connections.sockjs_connection import SubscriberConnection
from swampdragon.route_handler import BaseRouter
from swampdragon.testing.dragon_testcase import DragonTestCase
from swampdragon.connections.mock_connection import TestConnection
from swampdragon.sessions.session_store import BaseSessionStore
fr... | bsd-3-clause |
persandstrom/home-assistant | homeassistant/components/sensor/netatmo_public.py | 1 | 4390 | """
Support for Sensors using public Netatmo data.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.netatmo_public/.
"""
from datetime import timedelta
import logging
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SC... | apache-2.0 |
asnorkin/sentiment_analysis | site/lib/python2.7/site-packages/sqlalchemy/dialects/mysql/gaerdbms.py | 33 | 3387 | # mysql/gaerdbms.py
# Copyright (C) 2005-2017 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
.. dialect:: mysql+gaerdbms
:name: Google Cloud SQL
:dbapi: rdbms
:... | mit |
sencha/chromium-spacewalk | tools/valgrind/asan/third_party/asan_symbolize.py | 8 | 13087 | #!/usr/bin/env python
#===- lib/asan/scripts/asan_symbolize.py -----------------------------------===#
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
#===----------------------------------------... | bsd-3-clause |
ryfeus/lambda-packs | pytorch/source/torch/nn/parallel/deprecated/distributed_cpu.py | 1 | 4290 | import torch
from torch._utils import _flatten_dense_tensors, _unflatten_dense_tensors
import torch.distributed.deprecated as dist
from torch.nn.modules import Module
from collections import defaultdict
from torch.autograd import Variable
import torch.utils.hooks
class DistributedDataParallelCPU(Module):
r"""Impl... | mit |
kenshay/ImageScript | ProgramData/SystemFiles/Python/Lib/site-packages/OpenGL/raw/GL/ARB/texture_compression.py | 9 | 2731 | '''Autogenerated by xml_generate script, do not edit!'''
from OpenGL import platform as _p, arrays
# Code generation uses this
from OpenGL.raw.GL import _types as _cs
# End users want this...
from OpenGL.raw.GL._types import *
from OpenGL.raw.GL import _errors
from OpenGL.constant import Constant as _C
import ctypes
_... | gpl-3.0 |
tragiclifestories/django | django/contrib/auth/context_processors.py | 514 | 1938 | # PermWrapper and PermLookupDict proxy the permissions system into objects that
# the template system can understand.
class PermLookupDict(object):
def __init__(self, user, app_label):
self.user, self.app_label = user, app_label
def __repr__(self):
return str(self.user.get_all_permissions())
... | bsd-3-clause |
Leonnash21/flask_heroku | Tools/scripts/svneol.py | 97 | 3493 | #! /usr/bin/env python3
"""
SVN helper script.
Try to set the svn:eol-style property to "native" on every .py, .txt, .c and
.h file in the directory tree rooted at the current directory.
Files with the svn:eol-style property already set (to anything) are skipped.
svn will itself refuse to set this property on a fil... | mit |
ppasq/geonode | geonode/invitations/forms.py | 9 | 3321 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2018 OSGeo
#
# 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 ver... | gpl-3.0 |
ypu/tp-qemu | qemu/tests/rv_input.py | 3 | 10997 | """
rv_input.py - test keyboard inputs through spice
Requires: Two VMs - client and guest and remote-viewer session
from client VM to guest VM created by rv_connect test.
Deployed PyGTK on guest VM.
Presumes the numlock state at startup is 'OFF'.
"""
import logging
import os
from autote... | gpl-2.0 |
shiftcontrol/UnityOpenCV | opencv/samples/python/laplace.py | 6 | 1374 | #!/usr/bin/python
import urllib2
import cv
import sys
if __name__ == "__main__":
laplace = None
colorlaplace = None
planes = [ None, None, None ]
capture = None
if len(sys.argv) == 1:
capture = cv.CreateCameraCapture(0)
elif len(sys.argv) == 2 and sys.argv[1].isdigit():
cap... | gpl-3.0 |
o5k/openerp-oemedical-v0.1 | openerp/addons/stock_location/procurement_pull.py | 53 | 6951 | ##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public L... | agpl-3.0 |
ahb0327/intellij-community | python/helpers/python-skeletons/multiprocessing/managers.py | 68 | 1616 | """Skeleton for 'multiprocessing.managers' stdlib module."""
import threading
import queue
import multiprocessing
import multiprocessing.managers
class BaseManager(object):
def __init__(self, address=None, authkey=None):
self.address = address
def start(self, initializer=None, initargs=None):
... | apache-2.0 |
ClearCorp/odoo-clearcorp | TODO-7.0/purchase_order_archive/__init__.py | 4 | 1060 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Addons modules by CLEARCORP S.A.
# Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>).
#
# This program is free software: you can redistribute... | agpl-3.0 |
Juniper/neutron | neutron/openstack/common/context.py | 38 | 2735 | # 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.apac... | apache-2.0 |
akretion/project-service | project_gtd/project_gtd.py | 21 | 6301 | # -*- 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... | agpl-3.0 |
hufsm/tu_gen2_libsigrokdecode | decoders/swd/__init__.py | 2 | 1212 | ##
## This file is part of the libsigrokdecode project.
##
## Copyright (C) 2014 Angus Gratton <gus@projectgus.com>
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation; either version 2 of the ... | gpl-3.0 |
motion2015/edx-platform | common/djangoapps/config_models/tests.py | 75 | 10300 | # -*- coding: utf-8 -*-
"""
Tests of ConfigurationModel
"""
import ddt
from django.contrib.auth.models import User
from django.db import models
from django.test import TestCase
from freezegun import freeze_time
from mock import patch
from config_models.models import ConfigurationModel
class ExampleConfig(Configurat... | agpl-3.0 |
geky/pyOCD | pyOCD/target/target_lpc4330.py | 1 | 2872 | """
mbed CMSIS-DAP debugger
Copyright (c) 2006-2015 ARM Limited
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 ... | apache-2.0 |
matthiasdiener/spack | var/spack/repos/builtin/packages/emacs/package.py | 2 | 3112 | ##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 |
ltilve/ChromiumGStreamerBackend | tools/telemetry/third_party/gsutilz/third_party/boto/boto/kinesis/layer1.py | 102 | 40879 | # Copyright (c) 2014 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 limitation the rights ... | bsd-3-clause |
eul721/The-Perfect-Pokemon-Team-Balancer | libs/env/Lib/site-packages/sqlalchemy/testing/requirements.py | 75 | 17798 | # testing/requirements.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Global database feature support policy.
Provides decorators to mark tests ... | gpl-2.0 |
sgerhart/ansible | lib/ansible/plugins/action/script.py | 13 | 7132 | # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any lat... | mit |
Maccimo/intellij-community | python/helpers/pydev/_pydev_bundle/pydev_console_utils.py | 2 | 16369 | import os
import signal
import sys
import traceback
from _pydev_bundle import _pydev_imports_tipper
from _pydev_bundle.pydev_code_executor import BaseCodeExecutor
from _pydev_bundle.pydev_console_types import CodeFragment
from _pydev_bundle.pydev_imports import Exec
from _pydev_bundle.pydev_stdin import StdIn, DebugCo... | apache-2.0 |
haifengkao/LeakCanaryiOS | .ycm_extra_conf.py | 2 | 6487 | import os
import ycm_core
flags = [
'-D__IPHONE_OS_VERSION_MIN_REQUIRED=70000',
'-resource-dir',
'/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../lib/clang/7.0.0',
'-mios-simulator-version-min=7.0',
'-arch i386',
'-fblocks',
'-fobjc-runtime=ios-7.0.0',
'-fencode-extended-block... | mit |
Ernesto99/odoo | addons/account_payment/account_payment.py | 212 | 19161 | # -*- 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... | agpl-3.0 |
vinhlh/bite-project | deps/mrtaskman/server/mapreduce/lib/simplejson/scanner.py | 77 | 2263 | #!/usr/bin/env python
"""JSON token scanner
"""
import re
try:
from mapreduce.lib.simplejson._speedups import make_scanner as c_make_scanner
except ImportError:
c_make_scanner = None
__all__ = ['make_scanner']
NUMBER_RE = re.compile(
r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?',
(re.VERBOSE | re.MULTI... | apache-2.0 |
IntelLabs/numba | numba/tests/test_struct_ref.py | 5 | 11855 | """
Test mutable struct, aka, structref
"""
import warnings
import numpy as np
from numba import typed, njit, errors
from numba.core import types
from numba.experimental import structref
from numba.extending import overload_method, overload_attribute
from numba.tests.support import (
MemoryLeakMixin, TestCase, te... | bsd-2-clause |
polonat/django-payments | payments/forms.py | 5 | 2499 | from __future__ import unicode_literals
try:
from collections import OrderedDict
except ImportError:
from django.utils.datastructures import SortedDict as OrderedDict
from django import forms
from django.utils.translation import ugettext_lazy as _
from .fields import (CreditCardNumberField, CreditCardExpiryF... | bsd-3-clause |
anandology/tornado | tornado/escape.py | 120 | 14441 | #!/usr/bin/env python
#
# Copyright 2009 Facebook
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 |
alexpotter1/Neutron_msm8974_hammerhead | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py | 11088 | 3246 | # Core.py - Python extension for perf script, core functions
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
from collections import defaultdict
def aut... | gpl-2.0 |
gautam1858/tensorflow | tensorflow/python/framework/subscribe.py | 22 | 12982 | # 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... | apache-2.0 |
JeongJunSik/TizenRT | external/iotivity/iotivity_1.2-rel/extlibs/gtest/gtest-1.7.0/test/gtest_env_var_test.py | 2408 | 3487 | #!/usr/bin/env python
#
# Copyright 2008, 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... | apache-2.0 |
coldnew/tf700-kernel | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py | 12980 | 5411 | # SchedGui.py - Python extension for perf script, basic GUI code for
# traces drawing and overview.
#
# Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com>
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
... | gpl-2.0 |
rezasafi/spark | python/pyspark/taskcontext.py | 4 | 7271 | #
# 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... | apache-2.0 |
jaywink/shoop | shoop_tests/front/test_customer_information.py | 6 | 1891 | # -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from django.contrib.auth import get_... | agpl-3.0 |
mbrubeck/servo | tests/wpt/web-platform-tests/tools/third_party/pytest/_pytest/warnings.py | 16 | 3164 | from __future__ import absolute_import, division, print_function
import warnings
from contextlib import contextmanager
import pytest
from _pytest import compat
def _setoption(wmod, arg):
"""
Copy of the warning._setoption function but does not escape arguments.
"""
parts = arg.split(':')
if len... | mpl-2.0 |
devendermishrajio/nova_test_latest | nova/tests/unit/objects/test_migration.py | 12 | 8947 | # Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | apache-2.0 |
danieljaouen/ansible | lib/ansible/modules/cloud/openstack/os_quota.py | 23 | 15753 | #!/usr/bin/python
# Copyright (c) 2016 Pason System Corporation
# 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... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.