repo_name stringlengths 5 100 | path stringlengths 4 375 | copies stringclasses 991
values | size stringlengths 4 7 | content stringlengths 666 1M | license stringclasses 15
values |
|---|---|---|---|---|---|
GREO/GNU-Radio | gnuradio-core/src/python/gnuradio/gr/qa_frequency_modulator.py | 6 | 1753 | #!/usr/bin/env python
#
# Copyright 2004,2007 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or (at your opt... | gpl-3.0 |
SEL-Columbia/commcare-hq | corehq/apps/reports/commconnect/system_overview.py | 3 | 9352 | from django.utils.translation import ugettext as _
from django.utils.translation import ugettext_noop
from corehq.apps.reminders.models import REMINDER_TYPE_ONE_TIME
from corehq.apps.reports.commconnect import div, CommConnectReport
from corehq.apps.reports.datatables import DataTablesHeader, DataTablesColumn, DataTabl... | bsd-3-clause |
MattDevo/edk2 | AppPkg/Applications/Python/Python-2.7.2/Lib/encodings/ptcp154.py | 96 | 9125 | """ Python Character Mapping Codec generated from 'PTCP154.txt' with gencodec.py.
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
(c) Copyright 2000 Guido van Rossum.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode... | bsd-2-clause |
MeirKriheli/Open-Knesset | laws/models/law.py | 5 | 1160 | # encoding: utf-8
from django.db import models
import logging
logger = logging.getLogger(__name__)
class Law(models.Model):
class Meta:
app_label = 'laws'
title = models.CharField(max_length=1000)
merged_into = models.ForeignKey('Law', related_name='duplicates', blank=True, null=True)
def __... | bsd-3-clause |
boland1992/seissuite_iran | build/lib/seissuite/spectrum/extrema_pickle.py | 8 | 9300 | # -*- coding: utf-8 -*-
"""
Created on Fri July 6 11:04:03 2015
@author: boland
"""
import os
import datetime
import numpy as np
import multiprocessing as mp
import matplotlib.pyplot as plt
from scipy import signal
from obspy import read
from scipy.signal import argrelextrema
from info_dataless import locs_from_dat... | gpl-3.0 |
Cito/sqlalchemy | test/orm/inheritance/test_manytomany.py | 1 | 8383 | from sqlalchemy.testing import eq_
from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy import testing
from sqlalchemy.testing import fixtures
class InheritTest(fixtures.MappedTest):
"""deals with inheritance and many-to-many relationships"""
@classmethod
def define_tables(cls, metadata)... | mit |
jeffreyliu3230/osf.io | tests/test_transactions.py | 58 | 9120 | # -*- coding: utf-8 -*-
import logging
import mock
import webtest_plus
import unittest
from nose.tools import * # noqa
from tests.base import DbTestCase
from flask import make_response
from pymongo.errors import CollectionInvalid, OperationFailure
from framework.flask import add_handlers
from framework.mongo impor... | apache-2.0 |
kvar/ansible | lib/ansible/modules/network/f5/bigiq_application_fastl4_udp.py | 23 | 21920 | #!/usr/bin/python
# -*- 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
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 |
wetek-enigma/enigma2 | lib/python/Plugins/Extensions/PicturePlayer/ui.py | 23 | 21962 | from boxbranding import getMachineBrand
from enigma import ePicLoad, eTimer, getDesktop, gMainDC, eSize
from Screens.Screen import Screen
from Tools.Directories import resolveFilename, pathExists, SCOPE_MEDIA, SCOPE_ACTIVE_SKIN
from Components.Pixmap import Pixmap, MovingPixmap
from Components.ActionMap import Actio... | gpl-2.0 |
OpenUpgrade/OpenUpgrade | addons/account/wizard/account_report_general_ledger.py | 36 | 3176 | # -*- 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 |
hbrunn/OpenUpgrade | addons/point_of_sale/report/pos_invoice.py | 62 | 2301 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... | agpl-3.0 |
fo369/chaos_calmer | target/linux/x86/image/mkimg_bifferboard.py | 561 | 1265 | #!/usr/bin/env python
"""
Create firmware for 4/8MB Bifferboards, suitable for uploading using
either bb_upload8.py or bb_eth_upload8.py
"""
import struct, sys
# Increase the kmax value if the script gives errors about the kernel being
# too large. You need to set the Biffboot kmax value to the same value yo... | gpl-2.0 |
yongshengwang/hue | desktop/core/ext-py/tablib-0.10.0/tablib/packages/odf3/meta.py | 56 | 2138 | # -*- coding: utf-8 -*-
# Copyright (C) 2006-2007 Søren Roug, European Environment Agency
#
# 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 you... | apache-2.0 |
mrquim/mrquimrepo | repo/script.module.schism.common/lib/requests/packages/urllib3/util/ssl_.py | 148 | 12046 | from __future__ import absolute_import
import errno
import warnings
import hmac
from binascii import hexlify, unhexlify
from hashlib import md5, sha1, sha256
from ..exceptions import SSLError, InsecurePlatformWarning, SNIMissingWarning
SSLContext = None
HAS_SNI = False
IS_PYOPENSSL = False
# Maps the length of a d... | gpl-2.0 |
rmatsuda/invesalius3 | invesalius/gui/import_panel.py | 5 | 18362 | #--------------------------------------------------------------------------
# Software: InVesalius - Software de Reconstrucao 3D de Imagens Medicas
# Copyright: (C) 2001 Centro de Pesquisas Renato Archer
# Homepage: http://www.softwarepublico.gov.br
# Contact: invesalius@cti.gov.br
# License: GNU ... | gpl-2.0 |
jiangzhuo/kbengine | kbe/src/lib/python/Lib/test/test_codeop.py | 118 | 7630 | """
Test cases for codeop.py
Nick Mathewson
"""
import unittest
from test.support import run_unittest, is_jython
from codeop import compile_command, PyCF_DONT_IMPLY_DEDENT
import io
if is_jython:
import sys
def unify_callables(d):
for n,v in d.items():
if hasattr(v, '__call__'):
... | lgpl-3.0 |
pigeonflight/strider-plone | docker/appengine/lib/django-1.4/django/db/backends/postgresql_psycopg2/version.py | 331 | 1502 | """
Extracts the version of the PostgreSQL server.
"""
import re
# This reg-exp is intentionally fairly flexible here.
# Needs to be able to handle stuff like:
# PostgreSQL 8.3.6
# EnterpriseDB 8.3
# PostgreSQL 8.3 beta4
# PostgreSQL 8.4beta1
VERSION_RE = re.compile(r'\S+ (\d+)\.(\d+)\.?(\d+)?')
def _parse_... | mit |
zuowang/incubator-hawq | tools/bin/gppylib/operations/test/regress/test_package/test_regress_simple_gppkg.py | 30 | 1757 | #!/usr/bin/env python
import unittest2 as unittest
from gppylib.operations.test.regress.test_package import GppkgTestCase, GppkgSpec, BuildGppkg, RPMSpec, BuildRPM, run_command, run_remote_command
class SimpleGppkgTestCase(GppkgTestCase):
"""Covers simple build/install/remove/update test cases"""
def test00_... | apache-2.0 |
s-leger/archipack | pygeos/op_polygonsunion.py | 1 | 4985 | # -*- coding:utf-8 -*-
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later versio... | gpl-3.0 |
TinyOS-Camp/DDEA-DEV | Archive/[14_09_12] DDEA_example_code/lib_bnlearn.py | 6 | 12617 | # -*- coding: utf-8 -*-
"""
Created on Mon Mar 24 19:24:11 2014
@author: NGO Quang Minh Khiem
@e-mail: khiem.ngo@adsc.com.sg
"""
from __future__ import division # To forace float point division
import numpy as np
from pandas import DataFrame
# R libs
import rpy2.robjects as robjects
from rpy2.robjects.packages import... | gpl-2.0 |
fluxw42/youtube-dl | youtube_dl/extractor/mnet.py | 34 | 2662 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
int_or_none,
parse_duration,
parse_iso8601,
)
class MnetIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?mnet\.(?:com|interest\.me)/tv/vod/(?:.*?\bclip_id=)?(?P<id>[0-9]+)'
_TESTS =... | unlicense |
cogeorg/black_rhino | examples/degroot/networkx/utils/union_find.py | 44 | 2491 | """
Union-find data structure.
"""
# Copyright (C) 2004-2011 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
import networkx as nx
class UnionFind:
"""Union-find data structure.
Each unionFind inst... | gpl-3.0 |
VeNoMouS/Sick-Beard | lib/js2py/internals/fill_space.py | 7 | 9023 | from __future__ import unicode_literals
from .base import Scope
from .func_utils import *
from .conversions import *
import six
from .prototypes.jsboolean import BooleanPrototype
from .prototypes.jserror import ErrorPrototype
from .prototypes.jsfunction import FunctionPrototype
from .prototypes.jsnumber import NumberP... | gpl-3.0 |
jrief/djangocms-cascade | cmsplugin_cascade/segmentation/mixins.py | 1 | 6830 | from django.contrib import admin
from django.contrib.auth import get_user_model
from django.http import HttpResponse, HttpResponseBadRequest
from django.template.response import TemplateResponse
from django.urls import reverse, re_path
from django.utils.translation import gettext_lazy as _, ngettext
from django.utils.h... | mit |
redhat-imaging/novaimagebuilder | novaimagebuilder/ISOHelper.py | 1 | 17814 | # Copyright (C) 2010,2011 Chris Lalancette <clalance@redhat.com>
# Copyright (C) 2012,2013 Chris Lalancette <clalancette@gmail.com>
# Copyright (C) 2013 Ian McLeod <imcleod@redhat.com>
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# Licen... | apache-2.0 |
3dfxmadscientist/cbss-server | cbss/exceptions.py | 76 | 2138 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2011 OpenERP s.a. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the G... | agpl-3.0 |
chandolia/python-social-auth | social/backends/google.py | 41 | 7834 | """
Google OpenId, OAuth2, OAuth1, Google+ Sign-in backends, docs at:
http://psa.matiasaguirre.net/docs/backends/google.html
"""
from social.utils import handle_http_errors
from social.backends.open_id import OpenIdAuth, OpenIdConnectAuth
from social.backends.oauth import BaseOAuth2, BaseOAuth1
from social.exceptio... | bsd-3-clause |
indradhanush/dnsimple2-python | dnsimple2/tests/services/test_domains.py | 1 | 10077 | from unittest import skip
from requests.exceptions import HTTPError
from dnsimple2.resources import (
CollaboratorResource,
DomainResource,
EmailForwardResource,
ResourceList
)
from dnsimple2.tests.services.base import BaseServiceTestCase
from dnsimple2.tests.utils import (
get_test_domain_name,
... | mit |
pku9104038/edx-platform | common/djangoapps/student/migrations/0032_add_field_UserProfile_country_add_field_UserProfile_city.py | 53 | 10819 | # -*- 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 'UserProfile.country'
db.add_column('auth_userprofile', 'country',
self... | agpl-3.0 |
zyw-200/decaf-platform | scripts/simpletrace.py | 115 | 4736 | #!/usr/bin/env python
#
# Pretty-printer for simple trace backend binary trace files
#
# Copyright IBM, Corp. 2010
#
# This work is licensed under the terms of the GNU GPL, version 2. See
# the COPYING file in the top-level directory.
#
# For help see docs/tracing.txt
import struct
import re
import inspect
header_ev... | gpl-2.0 |
gurneyalex/account-invoicing | account_invoice_uom/__init__.py | 24 | 1054 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014-15 Agile Business Group sagl (<http://www.agilebg.com>)
# Author: Lorenzo Battistini <lorenzo.battistini@agilebg.com>
#
# This program is free software: you can redistribute it and/or m... | agpl-3.0 |
frankvdp/django | django/core/management/commands/loaddata.py | 10 | 14542 | import functools
import glob
import gzip
import os
import sys
import warnings
import zipfile
from itertools import product
from django.apps import apps
from django.conf import settings
from django.core import serializers
from django.core.exceptions import ImproperlyConfigured
from django.core.management.base import Ba... | bsd-3-clause |
Coelhon/MasterRepo.repository | plugin.video.RabbitMovies/resources/lib/resolvers/vidlockers.py | 10 | 1567 | # -*- coding: utf-8 -*-
'''
Specto Add-on
Copyright (C) 2015 lambda
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 l... | gpl-2.0 |
samuknet/servo | components/script/dom/bindings/codegen/parser/tests/test_special_method_signature_mismatch.py | 241 | 6622 | def WebIDLTest(parser, harness):
threw = False
try:
parser.parse("""
interface SpecialMethodSignatureMismatch1 {
getter long long foo(long index);
};
""")
results = parser.finish()
except:
threw = True
harness.ok(threw, "Should have... | mpl-2.0 |
abhiii5459/sympy | sympy/simplify/tests/test_epathtools.py | 126 | 3460 | """Tests for tools for manipulation of expressions using paths. """
from sympy.simplify.epathtools import epath, EPath
from sympy.utilities.pytest import raises
from sympy import sin, cos, E
from sympy.abc import x, y, z, t
def test_epath_select():
expr = [((x, 1, t), 2), ((3, y, 4), z)]
assert epath("/*",... | bsd-3-clause |
mmckinst/pykickstart | pykickstart/commands/timezone.py | 5 | 5420 | #
# Chris Lumens <clumens@redhat.com>
#
# Copyright 2005, 2006, 2007 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the GNU
# General Public License v.2. This program is distributed in the hope that it
# ... | gpl-2.0 |
jegger/kivy | kivy/core/image/img_pil.py | 1 | 3781 | '''
PIL: PIL image loader
'''
__all__ = ('ImageLoaderPIL', )
import Image as PILImage
from kivy.logger import Logger
from kivy.core.image import ImageLoaderBase, ImageData, ImageLoader
try:
# Pillow
PILImage.frombytes
PILImage.Image.tobytes
except AttributeError:
# PIL
# monkey patch frombytes an... | mit |
doge-search/webdoge | xiaoqiqi/Rochester/scrap_professors.py | 1 | 1636 | #!/usr/bin/python2
#coding=utf-8
import urllib2
import HTMLParser
import sys
import xml.dom.minidom as minidom
from htmlentitydefs import entitydefs
import glob
reload(sys)
sys.setdefaultencoding('utf8')
class MyParser(HTMLParser.HTMLParser):
def __init__(self):
HTMLParser.HTMLParser.__init__(self)
... | unlicense |
sevein/archivematica | src/MCPClient/lib/clientScripts/transcoder.py | 1 | 5830 | #!/usr/bin/env python2
# This file is part of Archivematica.
#
# Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com>
#
# Archivematica is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, e... | agpl-3.0 |
epeios-q37/epeios | tools/xdhq/Atlas/PYH/__init__.py | 1 | 1259 | """
MIT License
Copyright (c) 2018 Claude SIMON (https://q37.info/s/rmnmqd49)
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
... | agpl-3.0 |
jank3/django | tests/lookup/tests.py | 89 | 37440 | from __future__ import unicode_literals
import collections
from datetime import datetime
from operator import attrgetter
from unittest import skipUnless
from django.core.exceptions import FieldError
from django.db import connection
from django.test import TestCase, TransactionTestCase, skipUnlessDBFeature
from .mode... | bsd-3-clause |
seann1/portfolio5 | .meteor/dev_bundle/python/Lib/test/test_long_future.py | 129 | 9026 | from __future__ import division
# When true division is the default, get rid of this and add it to
# test_long.py instead. In the meantime, it's too obscure to try to
# trick just part of test_long into using future division.
import sys
import random
import math
import unittest
from test.test_support import run_unitt... | gpl-2.0 |
le9i0nx/ansible | lib/ansible/module_utils/remote_management/ucs.py | 70 | 3697 | # This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own license
# to the complete wo... | gpl-3.0 |
kui/dotfiles | installs/keyhac-mac-config.py | 1 | 5415 | import sys
import os
import datetime
import subprocess
import string
import ckit
from keyhac import *
from ckit.ckit_const import *
IGNORED_APP_NAMES = [
"org.gnu.Emacs",
"com.apple.Terminal",
"com.googlecode.iterm2",
"com.factorio",
]
IGNORED_WINDOW_TITLES = [
"Alacritty",
]
IDE_APP_NAMES = [
... | unlicense |
darktears/chromium-crosswalk | tools/telemetry/telemetry/internal/results/buildbot_output_formatter.py | 10 | 5205 | # 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 telemetry import decorators
from telemetry.internal.results import output_formatter
from telemetry.util import perf_tests_helper
from telemetry import v... | bsd-3-clause |
rahul67/hue | desktop/core/ext-py/boto-2.38.0/boto/sts/credentials.py | 153 | 8210 | # Copyright (c) 2011 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2011, Eucalyptus Systems, Inc.
#
# 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
# withou... | apache-2.0 |
2013Commons/HUE-SHARK | build/env/lib/python2.7/site-packages/Pygments-1.3.1-py2.7.egg/pygments/plugin.py | 74 | 1862 | # -*- coding: utf-8 -*-
"""
pygments.plugin
~~~~~~~~~~~~~~~
Pygments setuptools plugin interface. The methods defined
here also work if setuptools isn't installed but they just
return nothing.
lexer plugins::
[pygments.lexers]
yourlexer = yourmodule:YourLexer
formatter pl... | apache-2.0 |
QISKit/qiskit-sdk-py | qiskit/providers/basejob.py | 1 | 1785 | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modif... | apache-2.0 |
dyoung418/tensorflow | tensorflow/python/kernel_tests/fft_ops_test.py | 49 | 19978 | # 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 |
Ritsyy/fjord | fjord/settings/log_settings.py | 6 | 2319 | import logging
import logging.handlers
import socket
from django.conf import settings
from django.utils.log import dictConfig
import commonware.log
class NullHandler(logging.Handler):
def emit(self, record):
pass
base_fmt = ('%(name)s:%(levelname)s %(message)s '
':%(pathname)s:%(lineno)s')... | bsd-3-clause |
angelapper/edx-platform | openedx/core/lib/tests/test_graph_traversals.py | 20 | 6440 | """
Tests for graph traversal generator functions.
"""
from collections import defaultdict
from unittest import TestCase
from nose.plugins.attrib import attr
from ..graph_traversals import traverse_post_order, traverse_pre_order, traverse_topologically
@attr(shard=2)
class TestGraphTraversals(TestCase):
"""
... | agpl-3.0 |
mcollins12321/anita | venv/lib/python2.7/site-packages/setuptools/py31compat.py | 570 | 1637 | import sys
import unittest
__all__ = ['get_config_vars', 'get_path']
try:
# Python 2.7 or >=3.2
from sysconfig import get_config_vars, get_path
except ImportError:
from distutils.sysconfig import get_config_vars, get_python_lib
def get_path(name):
if name not in ('platlib', 'purelib'):
... | mit |
mission-liao/pyswagger | pyswagger/tests/v1_2/test_auth.py | 1 | 2803 | from pyswagger import App, Security
from ..utils import get_test_data_folder
import unittest
app = App._create_(get_test_data_folder(version='1.2', which='simple_auth'))
class BasicAuthAndApiKeyTestCase(unittest.TestCase):
""" test cases for authorzation related """
def setUp(self):
self.s = Secur... | mit |
Slang104/blender | archimesh/src/arch_tools.py | 3 | 34150 | # ***** BEGIN GPL LICENSE BLOCK *****
#
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distribute... | gpl-2.0 |
TieWei/nova | nova/virt/baremetal/db/sqlalchemy/migrate_repo/versions/005_drop_unused_columns_from_nodes.py | 19 | 1210 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2013 NTT DOCOMO, 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-... | apache-2.0 |
baliga-lab/sygnal | python/src/miRvestigator.py | 1 | 27872 | #################################################################
# @Program: miRvestigator.py #
# @Version: 1 #
# @Author: Chris Plaisier #
# @Sponsored by: ... | lgpl-3.0 |
lissyx/build-mozharness | configs/b2g/releng-fota-updates.py | 1 | 4153 | #!/usr/bin/env python
import os
config = {
"default_actions": [
'clobber',
'checkout-sources',
'get-blobs',
'update-source-manifest',
'build',
'build-symbols',
'make-updates',
'prep-upload',
'upload',
'make-socorro-json',
'uploa... | mpl-2.0 |
amenonsen/ansible | lib/ansible/module_utils/facts/virtual/base.py | 199 | 2298 | # base classes for virtualization facts
# -*- coding: utf-8 -*-
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your optio... | gpl-3.0 |
apparena/docs | readthedocs/core/management/commands/build_files.py | 12 | 1523 | import logging
from optparse import make_option
from django.core.management.base import BaseCommand
from django.conf import settings
from projects import tasks
from builds.models import Version
log = logging.getLogger(__name__)
class Command(BaseCommand):
help = ('Delete and re-create ImportedFile objects for... | mit |
clld/csd | csd/adapters.py | 1 | 4838 | try:
from xhtml2pdf import pisa
except ImportError: # pragma: no cover
class pisa(object):
@staticmethod
def CreatePDF(*args, **kw):
print("ERROR: xhtml2pdf is not installed!")
from clld.db.meta import DBSession
from clld.db.models.common import Parameter, Dataset, Language, Value
... | apache-2.0 |
kmonsoor/python-for-android | python3-alpha/python3-src/Lib/copyreg.py | 48 | 6633 | """Helper to provide extensibility for pickle.
This is only useful to add pickle support for extension types defined in
C, not for instances of user-defined classes.
"""
__all__ = ["pickle", "constructor",
"add_extension", "remove_extension", "clear_extension_cache"]
dispatch_table = {}
def pickle(ob_typ... | apache-2.0 |
opf-attic/ref | tools/fido/1.1.0/fido/opfpronomutils.py | 2 | 4879 | # -*- coding: utf-8 -*-
#
# OPF PRONOM UTILS
#
# Open Planets Foundation (http://www.openplanetsfoundation.org)
# See License.txt for license information.
# Download from: http://github.com/openplanets/fido/downloads
# Author: Maurice de Rooij (OPF/NANETH), 2012
#
# FIDO uses the UK National Archives (TNA) PR... | apache-2.0 |
coolceph/gtest | test/gtest_catch_exceptions_test.py | 2139 | 9901 | #!/usr/bin/env python
#
# Copyright 2010 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 o... | bsd-3-clause |
TarasLevelUp/asynqp | src/asynqp/connection.py | 1 | 9039 | import asyncio
import sys
from . import spec
from . import routing
from . import frames
from .channel import ChannelFactory
from .exceptions import (
AMQPConnectionError, ConnectionClosed)
from .log import log
class Connection(object):
"""
Manage connections to AMQP brokers.
A :class:`Connection` is ... | mit |
xxvii27/gae-pushtest | bp_includes/external/babel/messages/tests/frontend.py | 30 | 29828 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007 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://babel.edgewall.org/wiki/License.
#
# This software consists of v... | lgpl-3.0 |
cloudbase/cinder | cinder/api/contrib/scheduler_hints.py | 11 | 1769 | # Copyright 2013 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 ... | apache-2.0 |
EmadMokhtar/Django | tests/transaction_hooks/tests.py | 78 | 6992 | from django.db import connection, transaction
from django.test import TransactionTestCase, skipUnlessDBFeature
from .models import Thing
class ForcedError(Exception):
pass
class TestConnectionOnCommit(TransactionTestCase):
"""
Tests for transaction.on_commit().
Creation/checking of database object... | mit |
40223219/w16_test | static/Brython3.1.1-20150328-091302/Lib/_csv.py | 639 | 21705 | """CSV parsing and writing.
[Copied from PyPy
https://bitbucket-assetroot.s3.amazonaws.com/pypy/pypy/1400171824.19/641/_csv.py?Signature=cc%2Bc8m06cBMbsxt2e15XXXUDACk%3D&Expires=1404136251&AWSAccessKeyId=0EMWEFSGA12Z1HF1TZ82
and adapted to Python 3 syntax for Brython]
This module provides classes that assist in the ... | agpl-3.0 |
openrisc/or1k-src | gdb/testsuite/gdb.python/py-framefilter.py | 15 | 3646 | # Copyright (C) 2013 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later version.
#
# This program is... | gpl-2.0 |
akhilari7/pa-dude | lib/python2.7/site-packages/nltk/sem/linearlogic.py | 10 | 16617 | # Natural Language Toolkit: Linear Logic
#
# Author: Dan Garrette <dhgarrette@gmail.com>
#
# Copyright (C) 2001-2015 NLTK Project
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
from __future__ import print_function, unicode_literals
from nltk.internals import Counter
from nltk.compat import strin... | mit |
Darknet-Crypto/Darknet | test/functional/mining_pos_fakestake.py | 1 | 12040 | #!/usr/bin/env python3
# Copyright (c) 2019-2020 The PIVX developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
Covers various scenarios of PoS blocks where the coinstake input is already spent
(either in a previous block... | mit |
krafczyk/spack | var/spack/repos/builtin/packages/py-mappy/package.py | 5 | 1555 | ##############################################################################
# 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 |
MoKee/android_kernel_motorola_msm8960-common | tools/perf/scripts/python/syscall-counts.py | 11181 | 1522 | # system call counts
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide system call totals, broken down by syscall.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os
import sys
sys.path.append(os.envir... | gpl-2.0 |
robin900/sqlalchemy | examples/performance/large_resultsets.py | 27 | 5398 | """In this series of tests, we are looking at time to load a large number
of very small and simple rows.
A special test here illustrates the difference between fetching the
rows from the raw DBAPI and throwing them away, vs. assembling each
row into a completely basic Python object and appending to a list. The
time sp... | mit |
opendatakosovo/vitia-workshop-viz | venv/lib/python2.7/site-packages/pip/req.py | 74 | 77505 | from email.parser import FeedParser
import os
import imp
import pkg_resources
import re
import sys
import shutil
import tempfile
import textwrap
import zipfile
from distutils.util import change_root
from pip.locations import (bin_py, running_under_virtualenv,PIP_DELETE_MARKER_FILENAME,
write... | gpl-2.0 |
jfmartinez64/test | couchpotato/runner.py | 28 | 12513 | from logging import handlers
from uuid import uuid4
import locale
import logging
import os.path
import sys
import time
import traceback
import warnings
import re
import tarfile
import shutil
from CodernityDB.database_super_thread_safe import SuperThreadSafeDatabase
from argparse import ArgumentParser
from cache import... | gpl-3.0 |
dagwieers/ansible | lib/ansible/modules/windows/win_wait_for_process.py | 17 | 4029 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# this is a windows documentation stub, actual code lives in the .ps1
# file of the same name
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 |
zhaodelong/django | tests/admin_filters/tests.py | 86 | 44461 | from __future__ import unicode_literals
import datetime
from django.contrib.admin import (
AllValuesFieldListFilter, BooleanFieldListFilter, ModelAdmin,
RelatedOnlyFieldListFilter, SimpleListFilter, site,
)
from django.contrib.admin.views.main import ChangeList
from django.contrib.auth.admin import UserAdmin
... | bsd-3-clause |
waytai/odoo | addons/survey/__init__.py | 385 | 1037 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-TODAY OpenERP S.A. <http://www.openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms... | agpl-3.0 |
fedspendingtransparency/data-act-broker-backend | dataactcore/migrations/versions/e9c556a9f344_create_certified_comment_table.py | 1 | 1590 | """Create certified_comment table
Revision ID: e9c556a9f344
Revises: 0dc4a1fbb52e
Create Date: 2019-08-29 12:12:13.196702
"""
# revision identifiers, used by Alembic.
revision = 'e9c556a9f344'
down_revision = 'b998d20b46e6'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def ... | cc0-1.0 |
jenalgit/django | tests/template_tests/filter_tests/test_autoescape.py | 513 | 1342 | from django.test import SimpleTestCase
from ..utils import SafeClass, UnsafeClass, setup
class AutoescapeStringfilterTests(SimpleTestCase):
"""
Filters decorated with stringfilter still respect is_safe.
"""
@setup({'autoescape-stringfilter01': '{{ unsafe|capfirst }}'})
def test_autoescape_string... | bsd-3-clause |
BeATz-UnKNoWN/python-for-android | python-build/python-libs/gdata/tests/atom_tests/http_interface_test.py | 87 | 1493 | #!/usr/bin/python
#
# Copyright (C) 2008 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
#
# Unless required by applicable law ... | apache-2.0 |
marcosmodesto/django-testapp | django/django/contrib/formtools/wizard/storage/cookie.py | 81 | 1058 | from django.core.exceptions import SuspiciousOperation
from django.core.signing import BadSignature
from django.utils import simplejson as json
from django.contrib.formtools.wizard import storage
class CookieStorage(storage.BaseStorage):
encoder = json.JSONEncoder(separators=(',', ':'))
def __init__(self, *... | bsd-3-clause |
psiphi75/SailBoatSim-pyconn | TwistedWebRemoteControl/client.py | 1 | 4093 | import sys
import json
from twisted.internet.defer import Deferred
from twisted.internet.protocol import ClientFactory
from twisted.internet.protocol import Protocol
class WebRemoteClient(Protocol, object):
def __init__(self):
self.message_data = ''
self.message_continues = False
self.uids... | apache-2.0 |
ruilin/RLMap | 3party/protobuf/protobuf/python/compatibility_tests/v2.5.0/tests/google/protobuf/internal/wire_format_test.py | 571 | 10848 | #! /usr/bin/python
#
# Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# http://code.google.com/p/protobuf/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# ... | apache-2.0 |
clarkfitzg/dask | dask/order.py | 4 | 6435 | """ Static order of nodes in dask graph
We can make decisions on what tasks to run next both
* Dynamically at runtime
* Statically before runtime
Dask's async scheduler runs dynamically and prefers to run tasks that were just
made available. However when several tasks become available at the same time
we have an ... | bsd-3-clause |
ville-k/tensorflow | tensorflow/contrib/learn/python/learn/utils/export.py | 48 | 13721 | # 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 |
harsh00008/pystache | pystache/tests/test_pystache.py | 33 | 4781 | # encoding: utf-8
import unittest
import pystache
from pystache import defaults
from pystache import renderer
from pystache.tests.common import html_escape
class PystacheTests(unittest.TestCase):
def setUp(self):
self.original_escape = defaults.TAG_ESCAPE
defaults.TAG_ESCAPE = html_escape
... | mit |
ShassAro/ShassAro | Bl_project/blVirtualEnv/lib/python2.7/site-packages/django/contrib/gis/geos/mutable_list.py | 105 | 10974 | # Copyright (c) 2008-2009 Aryeh Leib Taurog, all rights reserved.
# Released under the New BSD license.
"""
This module contains a base type which provides list-style mutations
without specific data storage methods.
See also http://www.aryehleib.com/MutableLists.html
Author: Aryeh Leib Taurog.
"""
from django.utils.f... | gpl-2.0 |
BoltzmannBrain/nupic | src/nupic/algorithms/__init__.py | 40 | 1229 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | agpl-3.0 |
learningequality/kolibri | kolibri/core/logger/management/commands/generateuserdata.py | 2 | 10485 | from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import csv
import io
import logging
import os
import random
from django.core.management.base import BaseCommand
from django.utils import timezone
from kolibri.core.auth.test.helpers import create_supe... | mit |
whitepyro/debian_server_setup | lib/sqlalchemy/sql/dml.py | 78 | 29493 | # sql/dml.py
# Copyright (C) 2009-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
"""
Provide :class:`.Insert`, :class:`.Update` and :class:`.Delete`.
"""
from .base import... | gpl-3.0 |
bbbenja/SickRage | autoProcessTV/lib/requests/packages/__init__.py | 147 | 4222 | """
Copyright (c) Donald Stufft, pip, and individual contributors
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,... | gpl-3.0 |
juju/juju | acceptancetests/repository/trusty/haproxy/hooks/charmhelpers/fetch/archiveurl.py | 7 | 5856 | # Copyright 2014-2015 Canonical Limited.
#
# This file is part of charm-helpers.
#
# charm-helpers is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License version 3 as
# published by the Free Software Foundation.
#
# charm-helpers is distributed in the hope ... | agpl-3.0 |
vmax-feihu/hue | desktop/core/ext-py/Pygments-1.3.1/external/markdown-processor.py | 46 | 1945 | # -*- coding: utf-8 -*-
"""
The Pygments Markdown Preprocessor
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This fragment is a Markdown_ preprocessor that renders source code
to HTML via Pygments. To use it, invoke Markdown like so::
from markdown import Markdown
md = Markdown()
md.tex... | apache-2.0 |
jdreaver/vispy | vispy/scene/__init__.py | 20 | 1472 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Vispy Development Team.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
"""
The vispy.scene subpackage provides high-level, flexible, and easy to use
functionality for creating scenes composed of multiple visual objects.
Overview
--------
Sceneg... | bsd-3-clause |
timkrentz/SunTracker | IMU/VTK-6.2.0/ThirdParty/AutobahnPython/autobahn/websocket/http.py | 2 | 19840 | ###############################################################################
##
## Copyright (C) 2011-2013 Tavendo GmbH
##
## 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
##
#... | mit |
KamalAwasthi/FullContact | myvenv/lib/python3.4/site-packages/django/core/mail/backends/base.py | 577 | 1573 | """Base email backend class."""
class BaseEmailBackend(object):
"""
Base class for email backend implementations.
Subclasses must at least overwrite send_messages().
open() and close() can be called indirectly by using a backend object as a
context manager:
with backend as connection:
... | apache-2.0 |
treycausey/scikit-learn | benchmarks/bench_multilabel_metrics.py | 8 | 7082 | #!/usr/bin/env python
"""
A comparison of multilabel target formats and metrics over them
"""
from __future__ import division
from __future__ import print_function
from timeit import timeit
from functools import partial
import itertools
import argparse
import sys
import matplotlib.pyplot as plt
import numpy as np
fr... | bsd-3-clause |
wong2/xiaohuangji | filter.py | 7 | 2227 | #-*-coding:utf-8-*-
"""
Copyright (c) 2012 Qijiang Fan <fqj1994@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, cop... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.