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 |
|---|---|---|---|---|---|
awalls-cx18/gnuradio | gr-channels/python/channels/phase_bal.py | 9 | 3692 | #!/usr/bin/env python
##################################################
# Gnuradio Python Flow Graph
# Title: IQ Phase Balancer
# Author: matt@ettus.com
# Generated: Thu Aug 1 11:49:41 2013
##################################################
from __future__ import unicode_literals
from gnuradio import blocks
from gnu... | gpl-3.0 |
jerem/Whoosh | src/whoosh/searching.py | 1 | 23724 | #===============================================================================
# Copyright 2007 Matt Chaput
#
# 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... | apache-2.0 |
aabbox/kbengine | kbe/src/lib/python/Lib/multiprocessing/reduction.py | 94 | 8108 | #
# Module which deals with pickling of objects.
#
# multiprocessing/reduction.py
#
# Copyright (c) 2006-2008, R Oudkerk
# Licensed to PSF under a Contributor Agreement.
#
import copyreg
import functools
import io
import os
import pickle
import socket
import sys
from . import context
__all__ = ['send_handle', 'recv_... | lgpl-3.0 |
pwoodworth/intellij-community | python/lib/Lib/wsgiref/simple_server.py | 104 | 4789 | """BaseHTTPServer that implements the Python WSGI protocol (PEP 333, rev 1.21)
This is both an example of how WSGI can be implemented, and a basis for running
simple web applications on a local machine, such as might be done when testing
or debugging an application. It has not been reviewed for security issues,
howev... | apache-2.0 |
joequery/django | tests/template_tests/filter_tests/test_slugify.py | 324 | 1430 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.template.defaultfilters import slugify
from django.test import SimpleTestCase
from django.utils.safestring import mark_safe
from ..utils import setup
class SlugifyTests(SimpleTestCase):
"""
Running slugify on a pre-escaped string le... | bsd-3-clause |
jmesteve/asterisk | openerp/addons/mrp/report/bom_structure.py | 56 | 2408 | ## -*- 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 GN... | agpl-3.0 |
ezbake/ezbake-platform-services | security/services/ca/service/lib/ezbakeca/ca.py | 4 | 10142 | # Copyright (C) 2013-2014 Computer Sciences Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | apache-2.0 |
aljscott/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/common/net/resultsjsonparser_unittest.py | 120 | 3897 | # Copyright (c) 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 of conditions and the... | bsd-3-clause |
ctuning/ck-env | soft/lib.rtl.polybench/customize.py | 1 | 3238 | #
# Collective Knowledge (individual environment - setup)
#
# See CK LICENSE.txt for licensing details
# See CK COPYRIGHT.txt for copyright details
#
# Developer: Grigori Fursin, Grigori.Fursin@cTuning.org, http://fursin.net
#
##############################################################################
# setup envir... | bsd-3-clause |
chongtianfeiyu/kbengine | kbe/res/scripts/common/Lib/encodings/raw_unicode_escape.py | 852 | 1208 | """ Python 'raw-unicode-escape' Codec
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""
import codecs
### Codec APIs
class Codec(codecs.Codec):
# Note: Binding these as C functions will result in the class not
# converting them to methods. This is ... | lgpl-3.0 |
XXMrHyde/android_external_chromium_org | chrome/test/pyautolib/pyauto.py | 23 | 213582 | #!/usr/bin/env python
# Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""PyAuto: Python Interface to Chromium's Automation Proxy.
PyAuto uses swig to expose Automation Proxy interfaces to Python.
For comp... | bsd-3-clause |
shaunduncan/helga-reviews | setup.py | 1 | 1221 | from setuptools import setup, find_packages
setup(
name='helga-reviews',
version='0.0.6',
description=('A helga command to query reviewboard pending reviews targeted at a user, group'
'or channel (using a channel-to-group mapping).'),
classifiers=[
'Development Status :: 4 - Be... | mit |
heuermh/cloudbiolinux | cloudbio/flavor/__init__.py | 10 | 2712 | """A Flavor reflects a specialization of a base install, the default being BioLinux.
If you want to create a new specialization (say for your own server), the
recommended procedure is to choose an existing base install (Edition) and write
a Flavor. When your Flavor is of interest to other users, it may be a good idea
... | mit |
jusdng/odoo | addons/analytic_user_function/analytic_user_function.py | 174 | 7775 | # -*- 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 |
josephcslater/scipy | scipy/_lib/_version.py | 71 | 4793 | """Utility to compare (Numpy) version strings.
The NumpyVersion class allows properly comparing numpy version strings.
The LooseVersion and StrictVersion classes that distutils provides don't
work; they don't recognize anything like alpha/beta/rc/dev versions.
"""
import re
from scipy._lib.six import string_types
... | bsd-3-clause |
jhs-s/gnucash-aqplus | src/optional/python-bindings/tests/test_split.py | 10 | 1976 | from unittest import main
from gnucash import Book, Account, Split, Transaction
from unittest_support import *
from test_book import BookSession
class SplitSession( BookSession ):
def setUp(self):
BookSession.setUp(self)
self.split = Split(self.book)
def tearDown(self):
pass
class ... | gpl-2.0 |
liorvh/infernal-twin | build/pillow/build/lib.linux-i686-2.7/PIL/IcoImagePlugin.py | 26 | 9171 | #
# The Python Imaging Library.
# $Id$
#
# Windows Icon support for PIL
#
# History:
# 96-05-27 fl Created
#
# Copyright (c) Secret Labs AB 1997.
# Copyright (c) Fredrik Lundh 1996.
#
# See the README file for information on usage and redistribution.
#
# This plugin is a refactored version of Win32IconImageP... | gpl-3.0 |
grevutiu-gabriel/sympy | sympy/functions/special/gamma_functions.py | 42 | 32475 | from __future__ import print_function, division
from sympy.core import Add, S, sympify, oo, pi, Dummy
from sympy.core.function import Function, ArgumentIndexError
from sympy.core.numbers import Rational
from sympy.core.power import Pow
from sympy.core.compatibility import range
from .zeta_functions import zeta
from .e... | bsd-3-clause |
calvingit21/h2o-2 | py/testdir_multi_jvm/test_GBM_with_cancels.py | 9 | 5764 | import unittest, time, sys, random
sys.path.extend(['.','..','../..','py'])
import h2o, h2o_cmd, h2o_browse as h2b, h2o_import as h2i, h2o_jobs, h2o_gbm
DELETE_KEYS = True
# FIX need to get exec workin
DO_CLASSIFICATION = False
class Basic(unittest.TestCase):
def tearDown(self):
h2o.check_sandbox_for_erro... | apache-2.0 |
thiagopena/djangoSIGE | djangosige/apps/financeiro/forms/lancamento.py | 1 | 6204 | # -*- coding: utf-8 -*-
from django import forms
from django.utils.translation import ugettext_lazy as _
from djangosige.apps.financeiro.models import Saida, Entrada, STATUS_CONTA_ENTRADA_ESCOLHAS, STATUS_CONTA_SAIDA_ESCOLHAS
from djangosige.apps.financeiro.models import PlanoContasGrupo
from djangosige.apps.login.mod... | mit |
scifiswapnil/Project-LoCatr | lib/python2.7/site-packages/pip/_vendor/webencodings/mklabels.py | 512 | 1305 | """
webencodings.mklabels
~~~~~~~~~~~~~~~~~~~~~
Regenarate the webencodings.labels module.
:copyright: Copyright 2012 by Simon Sapin
:license: BSD, see LICENSE for details.
"""
import json
try:
from urllib import urlopen
except ImportError:
from urllib.request import urlopen
def asser... | mit |
nwjs/chromium.src | third_party/logilab/logilab/common/ureports/nodes.py | 93 | 5838 | # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-common.
#
# logilab-common is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as publ... | bsd-3-clause |
kwagyeman/openmv | scripts/examples/OpenMV/27-Lepton/lepton_get_object_temp_color.py | 3 | 3355 | # Lepton Get Object Temp Example
#
# This example shows off how to get an object's temperature using color tracking.
# By turning the AGC off and setting a max and min temperature range you can make the lepton into
# a great sensor for seeing objects of a particular temperature. That said, the FLIR lepton is a
# micro... | mit |
hoosteeno/fjord | vendor/packages/pytz-2015.7/setup.py | 61 | 1601 | '''
pytz setup script
'''
import pytz, sys, os, os.path
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
me = 'Stuart Bishop'
memail = 'stuart@stuartbishop.net'
packages = ['pytz']
resources = ['zone.tab', 'locales/pytz.pot']
for dirpath, dirnames, filenames in os.walk(o... | bsd-3-clause |
jriegel/FreeCAD | src/Mod/MeshPart/Init.py | 55 | 1877 | # FreeCAD init script of the MeshPart module
# (c) 2001 Juergen Riegel
#***************************************************************************
#* (c) Juergen Riegel (juergen.riegel@web.de) 2002 *
#* *
#* T... | lgpl-2.1 |
xq262144/hue | desktop/core/ext-py/boto-2.46.1/boto/sdb/regioninfo.py | 167 | 1524 | # Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2010, Eucalyptus Systems, 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 res... | apache-2.0 |
ict-felix/stack | vt_manager_kvm/src/python/vt_manager_kvm/common/messaging/views.py | 5 | 1620 | '''
@author: jnaous
'''
from django.views.generic import date_based, create_update
from models import DatedMessage
from django.http import HttpResponseRedirect, HttpResponseNotAllowed
from django.core.urlresolvers import reverse
from forms import MessageForm
def list_msgs(request, number=None):
'''
Get a list ... | apache-2.0 |
4022321818/w16b_test | static/Brython3.1.1-20150328-091302/Lib/functools.py | 730 | 13596 | """functools.py - Tools for working with functions and callable objects
"""
# Python module wrapper for _functools C module
# to allow utilities written in Python to be added
# to the functools module.
# Written by Nick Coghlan <ncoghlan at gmail.com>
# and Raymond Hettinger <python at rcn.com>
# Copyright (C) 2006-2... | gpl-3.0 |
hbiyik/tribler | src/tribler-core/tribler_core/restapi/tests/test_settings_endpoint.py | 1 | 3691 | from tribler_core.modules.libtorrent.download_config import DownloadConfig
from tribler_core.restapi.base_api_test import AbstractApiTest
from tribler_core.tests.tools.base_test import MockObject
from tribler_core.tests.tools.tools import timeout
from tribler_core.utilities.path_util import Path
class TestSettingsEnd... | lgpl-3.0 |
cclauss/itinerant-tester | trending_python_tester.py | 1 | 4517 | #!/usr/bin/env python3
"""
Update the repo's '.travis.yml' to trigger Travis CI to run flake8 tests on
the top 25 GitHub Trending Python repos.
Requires: pip3 install --upgrade beautifulsoup4 github3.py requests lxml
If lxml is not available, html5lib should be a workable substitute
"""
import get... | apache-2.0 |
iohannez/gnuradio | gnuradio-runtime/apps/evaluation_random_numbers.py | 7 | 5284 | #!/usr/bin/env python
#
# Copyright 2015 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 option)
# ... | gpl-3.0 |
sffjunkie/home-assistant | homeassistant/helpers/state.py | 1 | 6390 | """Helpers that help with state related things."""
import json
import logging
from collections import defaultdict
import homeassistant.util.dt as dt_util
from homeassistant.components.media_player import (
ATTR_MEDIA_CONTENT_ID, ATTR_MEDIA_CONTENT_TYPE, ATTR_MEDIA_SEEK_POSITION,
ATTR_MEDIA_VOLUME_LEVEL, ATTR_M... | mit |
nexiles/odoo | openerp/addons/base/tests/test_ir_sequence.py | 136 | 8087 | # -*- coding: utf-8 -*-
# Run with one of these commands:
# > OPENERP_ADDONS_PATH='../../addons/trunk' OPENERP_PORT=8069 \
# OPENERP_DATABASE=yy PYTHONPATH=. python tests/test_ir_sequence.py
# > OPENERP_ADDONS_PATH='../../addons/trunk' OPENERP_PORT=8069 \
# OPENERP_DATABASE=yy nosetests tests/test_ir_se... | agpl-3.0 |
ikcalB/linuxcnc-mirror | src/emc/usr_intf/axis/scripts/axis.py | 1 | 142072 | #!/usr/bin/env python2
# This is a component of AXIS, a front-end for LinuxCNC
# Copyright 2004, 2005, 2006, 2007, 2008, 2009
# Jeff Epler <jepler@unpythonic.net> and Chris Radek <chris@timeguy.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU G... | lgpl-2.1 |
sirpercival/kivy | examples/widgets/lists/list_cascade_images.py | 53 | 4895 | from kivy.adapters.dictadapter import DictAdapter
from kivy.uix.selectableview import SelectableView
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.gridlayout import GridLayout
from kivy.uix.listview import ListView, ListItemButton
from kivy.lang import Builder
from kivy.factory import Factory
from fixtures im... | mit |
lidavidm/mathics-heroku | venv/lib/python2.7/site-packages/sympy/utilities/memoization.py | 2 | 1444 | from sympy.core.decorators import wraps
def recurrence_memo(initial):
"""
Memo decorator for sequences defined by recurrence
See usage examples e.g. in the specfun/combinatorial module
"""
cache = initial
def decorator(f):
@wraps(f)
def g(n):
L = len(cache)
... | gpl-3.0 |
trankmichael/numpy | numpy/doc/ufuncs.py | 172 | 5427 | """
===================
Universal Functions
===================
Ufuncs are, generally speaking, mathematical functions or operations that are
applied element-by-element to the contents of an array. That is, the result
in each output array element only depends on the value in the corresponding
input array (or arrays) a... | bsd-3-clause |
zanezam/boeffla-kernel-samsung-s3 | 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 |
datnamer/GLRM | examples/pca_nucnorm.py | 2 | 1153 | from glrm.loss import QuadraticLoss
from glrm.reg import QuadraticReg, ZeroReg
from glrm import GLRM
from glrm.util import pplot
from numpy.random import randn, choice, seed
from numpy.random import choice
from itertools import product
from numpy import sign
seed(1)
# Generate problem data
m, n, k = 50, 50, 10
eta = 0... | mit |
Awesomeomics/webserver | env/lib/python2.7/site-packages/setuptools/site-patch.py | 720 | 2389 | def __boot():
import sys
import os
PYTHONPATH = os.environ.get('PYTHONPATH')
if PYTHONPATH is None or (sys.platform=='win32' and not PYTHONPATH):
PYTHONPATH = []
else:
PYTHONPATH = PYTHONPATH.split(os.pathsep)
pic = getattr(sys,'path_importer_cache',{})
stdpath = sys.path[le... | mit |
mpare002/HackTech_2017 | env/Lib/site-packages/pip/_vendor/lockfile/linklockfile.py | 466 | 2649 | from __future__ import absolute_import
import time
import os
from . import (LockBase, LockFailed, NotLocked, NotMyLock, LockTimeout,
AlreadyLocked)
class LinkLockFile(LockBase):
"""Lock access to a file using atomic property of link(2).
>>> lock = LinkLockFile('somefile')
>>> lock = LinkL... | mit |
cpcloud/ibis | ibis/pandas/tests/test_client.py | 1 | 2779 | import numpy as np
import pandas as pd
import pandas.util.testing as tm
import pytest
from pytest import param
import ibis
from ibis.pandas.client import PandasTable # noqa: E402
pytestmark = pytest.mark.pandas
@pytest.fixture
def client():
return ibis.pandas.connect(
{
'df': pd.DataFrame({... | apache-2.0 |
misnyo/searx | searx/engines/wikipedia.py | 1 | 3795 | """
Wikipedia (Web)
@website https://{language}.wikipedia.org
@provide-api yes
@using-api yes
@results JSON
@stable yes
@parse url, infobox
"""
from json import loads
from lxml.html import fromstring
from searx.url_utils import quote, urlencode
# search-url
base_url = u'https://{language... | agpl-3.0 |
spacy-io/spaCy | spacy/lang/ky/tokenizer_exceptions.py | 2 | 2049 | from ..tokenizer_exceptions import BASE_EXCEPTIONS
from ...symbols import ORTH, NORM
from ...util import update_exc
_exc = {}
_abbrev_exc = [
# Weekdays abbreviations
{ORTH: "дүй", NORM: "дүйшөмбү"},
{ORTH: "шей", NORM: "шейшемби"},
{ORTH: "шар", NORM: "шаршемби"},
{ORTH: "бей", NORM: "бейшемби"},... | mit |
bepatient-fr/itools | test/test_workflow.py | 3 | 3351 | # -*- coding: UTF-8 -*-
# Copyright (C) 2002 Thilo Ernst <Thilo.Ernst@dlr.de>
# Copyright (C) 2002-2004, 2006-2007, 2009 J. David Ibáñez <jdavid.ibp@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Softw... | gpl-3.0 |
saurabh6790/OFF-RISAPP | selling/doctype/customer/customer.py | 7 | 7293 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.model.doc import Document, make_autoname
from webnotes import msgprint, _
import webnotes.defaults
from utilities.tr... | agpl-3.0 |
rhiever/tpot | tpot/config/classifier_mdr.py | 4 | 1756 | # -*- coding: utf-8 -*-
"""This file is part of the TPOT library.
TPOT was primarily developed at the University of Pennsylvania by:
- Randal S. Olson (rso@randalolson.com)
- Weixuan Fu (weixuanf@upenn.edu)
- Daniel Angell (dpa34@drexel.edu)
- and many more generous open source contributors
TPOT is f... | lgpl-3.0 |
bigswitch/snac-nox | src/nox/apps/directory/directorymanagerws.py | 1 | 30967 | #
# NOX 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.
#
# NOX is distributed in the hope that it will be useful,
# but WITHOUT ANY ... | gpl-3.0 |
SimplyMinimal/Liberarsi | calendar-cmd-line-sample/apiclient/channel.py | 120 | 9848 | """Channel notifications support.
Classes and functions to support channel subscriptions and notifications
on those channels.
Notes:
- This code is based on experimental APIs and is subject to change.
- Notification does not do deduplication of notification ids, that's up to
the receiver.
- Storing the Chan... | apache-2.0 |
shahar-stratoscale/nova | nova/tests/api/openstack/compute/test_v3_extensions.py | 16 | 7692 | # 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 agreed t... | apache-2.0 |
Plain-Andy-legacy/android_external_chromium_org | media/tools/constrained_network_server/traffic_control.py | 186 | 12569 | # 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.
"""Traffic control library for constraining the network configuration on a port.
The traffic controller sets up a constrained network configuration on a... | bsd-3-clause |
rodrigolucianocosta/ProjectParking | ProjectParking/Parking/django-localflavor-1.1/localflavor/generic/countries/sepa.py | 7 | 1241 | # -*- coding: utf-8 -*-
#: European Payments Council list of SEPA scheme countries as of 23 Jan 2014.
#: http://www.europeanpaymentscouncil.eu/index.cfm/knowledge-bank/epc-documents/epc-list-of-sepa-scheme-countries/
IBAN_SEPA_COUNTRIES = (
'AT', # Austria
'BE', # Belgium
'BG', # Bulgaria
'ES', # C... | mpl-2.0 |
golismero/golismero | thirdparty_libs/django/core/serializers/base.py | 83 | 5612 | """
Module for abstract serializer/unserializer base classes.
"""
from django.db import models
from django.utils.encoding import smart_text
from django.utils import six
class SerializerDoesNotExist(KeyError):
"""The requested serializer was not found."""
pass
class SerializationError(Exception):
"""Somet... | gpl-2.0 |
HybridF5/jacket | jacket/compute/virt/ironic/ironic_states.py | 38 | 4826 | # Copyright (c) 2012 NTT DOCOMO, INC.
# Copyright 2010 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/l... | apache-2.0 |
bjmorgan/bsym | tests/unit_tests/test_space_group.py | 2 | 4171 | import unittest
from bsym import SpaceGroup
from bsym import SymmetryOperation
from unittest.mock import Mock, patch, call
import numpy as np
class SpaceGroupTestCase( unittest.TestCase ):
"""Tests for SpaceGroup class"""
def test_spacegroup_is_initialised( self ):
s0, s1 = Mock( spec=SymmetryOperatio... | mit |
misfit211/Kernel-Grouper | tools/perf/scripts/python/sched-migration.py | 11215 | 11670 | #!/usr/bin/python
#
# Cpu task migration overview toy
#
# Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com>
#
# perf script event handlers have been generated by perf script -g python
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Fre... | gpl-2.0 |
wozz/electrum | lib/mnemonic.py | 12 | 5737 | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2014 Thomas Voegtlin
#
# 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 y... | gpl-3.0 |
hgomersall/pyFFTW | test/test_pyfftw_multithreaded.py | 2 | 3614 | # Copyright 2014 Knowledge Economy Developments Ltd
#
# Henry Gomersall
# heng@kedevelopments.co.uk
#
# 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 reta... | bsd-3-clause |
chubbymaggie/angr | tests/test_bindiff.py | 6 | 2147 | import nose
import angr
import logging
l = logging.getLogger("angr.tests.test_bindiff")
import os
test_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../binaries/tests'))
# todo make a better test
def test_bindiff_x86_64():
binary_path_1 = test_location + "/x86_64/bindiff_a"
bin... | bsd-2-clause |
factorlibre/OCB | addons/stock/report/product_stock.py | 376 | 4868 | # -*- 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 |
bryanesmond/gryffindorjedi | instant_messengr_files/node_modules/socket.io/node_modules/engine.io/node_modules/engine.io-parser/node_modules/utf8/tests/generate-test-data.py | 2214 | 1347 | #!/usr/bin/env python
import re
import json
# http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
# http://stackoverflow.com/a/13436167/96656
def unisymbol(codePoint):
if codePoint >= 0x0000 and codePoint <= 0xFFFF:
return unichr(codePoint)
elif codePoint >= 0x010000 and codePoint <= 0x10FFFF:
... | mit |
jim-easterbrook/pywws | src/pywws/filedata.py | 2 | 26389 | # pywws - Python software for USB Wireless Weather Stations
# http://github.com/jim-easterbrook/pywws
# Copyright (C) 2008-19 pywws contributors
# 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;... | gpl-2.0 |
mirzawaqasahmed/avocado-vt | selftests/unit/test_utils_misc.py | 8 | 7837 | #!/usr/bin/python
import os
import tempfile
import unittest
import sys
from avocado.utils import process
# simple magic for using scripts within a source tree
basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
if os.path.isdir(os.path.join(basedir, 'virttest')):
sys.path.append(basedir)
from ... | gpl-2.0 |
matthiasdiener/spack | var/spack/repos/builtin/packages/libffi/package.py | 5 | 1905 | ##############################################################################
# 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 |
JackKelly/neuralnilm_prototype | neuralnilm/tests/test_objectives.py | 2 | 1538 | #!/usr/bin/python
from __future__ import print_function, division
import unittest
from timeit import default_timer as timer
import numpy as np
import theano
import theano.tensor as T
from neuralnilm import objectives
from neuralnilm.utils import gen_pulse
SEQ_LENGTH = 512
N_SEQ_PER_BATCH = 8
N_OUTPUTS = 5
TARGET_SHAPE... | mit |
YongseopKim/crosswalk-test-suite | webapi/tct-touchevent-w3c-tests/inst.wgt.py | 294 | 6758 | #!/usr/bin/env python
import os
import shutil
import glob
import time
import sys
import subprocess
import string
from optparse import OptionParser, make_option
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PKG_NAME = os.path.basename(SCRIPT_DIR)
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=... | bsd-3-clause |
gochist/horizon | openstack_dashboard/test/api_tests/nova_tests.py | 6 | 9291 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
# Copyright (c) 2012 X.commerce, a business unit of eBay Inc.
#
# Licensed under th... | apache-2.0 |
mpvismer/gltk | offscreenrender.py | 1 | 3321 | """
For using OpenGL to render to an off screen buffer
Ref:
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from OpenGL.GL import *
from OpenGL.raw.GL.VERSION import GL_1_1,GL_1_2, GL_3_0
class OffScreenRender(... | mit |
alsrgv/tensorflow | tensorflow/python/training/saver.py | 1 | 71133 | # 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 |
googleads/google-ads-python | google/ads/googleads/v8/enums/types/sitelink_placeholder_field.py | 1 | 1270 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# 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... | apache-2.0 |
rlbabyuk/integration_tests | cfme/base/__init__.py | 3 | 2240 | import sentaku
from utils.appliance import Navigatable
from utils.pretty import Pretty
class Server(Navigatable, sentaku.Element):
def __init__(self, appliance, zone=None, name="EVM", sid=1):
Navigatable.__init__(self, appliance=appliance)
self.zone = zone or appliance.server.zone
self.na... | gpl-2.0 |
rajadhva/servo | tests/wpt/css-tests/tools/html5lib/html5lib/tests/test_parser.py | 451 | 3612 | from __future__ import absolute_import, division, unicode_literals
import os
import sys
import traceback
import warnings
import re
warnings.simplefilter("error")
from .support import get_data_files
from .support import TestData, convert, convertExpected, treeTypes
from html5lib import html5parser, constants
# Run t... | mpl-2.0 |
terbolous/SickRage | lib/twilio/rest/trunking.py | 23 | 2583 | from twilio.rest.base import TwilioClient
from twilio.rest.resources.trunking import (
CredentialLists,
IpAccessControlLists,
OriginationUrls,
PhoneNumbers,
Trunks
)
from twilio.rest.resources import UNSET_TIMEOUT
class TwilioTrunkingClient(TwilioClient):
"""
A client for accessing the Twi... | gpl-3.0 |
cs2c-zhangchao/nkwin1.0-anaconda | pyanaconda/ui/lib/disks.py | 2 | 3242 | # User interface library functions for filesystem/disk space checking
#
# Copyright (C) 2013 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, or (at your option) any la... | gpl-2.0 |
lmazuel/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_06_01/models/application_gateway_web_application_firewall_configuration_py3.py | 1 | 2590 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit |
prutseltje/ansible | lib/ansible/modules/cloud/ovirt/ovirt_auth.py | 7 | 11012 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
#... | gpl-3.0 |
viewfinderco/viewfinder | backend/logs/symbolicate_user_crashes.py | 13 | 9266 | # Copyright 2013 Viewfinder Inc. All Rights Reserved.
"""Symbolicate user crash logs.
This looks for unprocessed crash logs in s3://serverdata/merged_user_crashed/, symbolicates them, and sends a
summary email.
REQUIREMENTS:
- run on OSX for dependencies (mdfind, dwarfdump, atos)
- have the build dSyms on the local ... | apache-2.0 |
frewsxcv/servo | tests/wpt/css-tests/tools/manifest/manifest.py | 89 | 12720 | import json
import os
from collections import defaultdict
from item import item_types, ManualTest, WebdriverSpecTest, Stub, RefTest, TestharnessTest
from log import get_logger
from sourcefile import SourceFile
from utils import from_os_path, to_os_path
CURRENT_VERSION = 2
class ManifestError(Exception):
pass
... | mpl-2.0 |
Yen-Chung-En/2015cd_midterm2 | static/Brython3.1.1-20150328-091302/Lib/re.py | 626 | 15140 | #
# Secret Labs' Regular Expression Engine
#
# re-compatible interface for the sre matching engine
#
# Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved.
#
# This version of the SRE library can be redistributed under CNRI's
# Python 1.6 license. For any other use, please contact Secret Labs
# AB (info@py... | agpl-3.0 |
nikhilprathapani/python-for-android | python-build/python-libs/gdata/tests/gdata_tests/apps/emailsettings/service_test.py | 128 | 4764 | #!/usr/bin/python
#
# Copyright (C) 2008 Google
#
# 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... | apache-2.0 |
angelblue05/plugin.video.emby | resources/lib/entrypoint/context.py | 3 | 5743 | # -*- coding: utf-8 -*-
#################################################################################################
import json
import logging
import sys
import xbmc
import xbmcaddon
import database
from dialogs import context
from helper import _, settings, dialog, kodi_version, event
from emby import Emby
... | gpl-3.0 |
moisesber/floodlight | example/cli.py | 138 | 3376 | #!/usr/bin/python
import sys
import argparse
import json
import httplib
import urllib2
class RestApi(object):
def __init__(self, server,port):
self.server = server
self.port = port
def get(self, path):
#ret = self.rest_call(path, {}, 'GET')
#return ret[2]
f = urllib2.... | apache-2.0 |
JohnLunzer/flexx | flexx/util/logging.py | 1 | 5595 | """
Improved logging facilities:
* info and debug messages are printed to stdout instead of stderr.
* if level is set to debug, will show source of each message.
* ability to filter messages with a regexp.
* provides a context manager to capture log messages in a list.
This code can be put anywhere in your pr... | bsd-2-clause |
aakechin/BRCA-analyzer | convertResultToExcel.py | 1 | 14588 | # This script adds annotation by PredictSNPs
# which uses annotations of SIFT, PolyPhen, MAPP, PhD-SNP and SNAP
# As an input it uses:
# inputFile - file with variations
# siftOutput - file with SIFT output
# pphReportFile - file with PolyPhen output
# annDbDir - directory with annotations files
# outFile - file for ou... | gpl-3.0 |
wuzhy/autotest | client/common_lib/host_protections.py | 4 | 2069 | import logging
from autotest_lib.client.common_lib import enum, global_config
# Changing this file has consequences that need to be understood.
# Adding a protection level to the enum requires you to append your change to
# the end of the enum or a database migration needs to be added to migrate
# older protections to... | gpl-2.0 |
Onirik79/aaritmud | src/controllers/below_menu.py | 1 | 1452 | # -*- coding: utf-8 -*-
"""
Modulo per tutto quello che viene posizionato sotto il menù a sinistra.
"""
#= IMPORT ======================================================================
import string
from src.log import log
from src.web_resource import WebResource
#= COSTANTI ===========================... | gpl-2.0 |
amadeusproject/amadeuslms | goals/cron.py | 1 | 1201 | """
Copyright 2016, 2017 UFPE - Universidade Federal de Pernambuco
Este arquivo é parte do programa Amadeus Sistema de Gestão de Aprendizagem, ou simplesmente Amadeus LMS
O Amadeus LMS é um software livre; você pode redistribui-lo e/ou modifica-lo dentro dos termos da Licença Pública Geral GNU como publicada pela ... | gpl-2.0 |
wri/gfw-api | lib/ee/function.py | 9 | 6018 | """A base class for EE Functions."""
# Using lowercase function naming to match the JavaScript names.
# pylint: disable-msg=g-bad-name
import textwrap
import computedobject
import ee_exception
import encodable
import serializer
class Function(encodable.Encodable):
"""An abstract base class for functions callab... | gpl-2.0 |
Teisei/TaxiRobot | lib/pattern.py | 8 | 1191 | # Copyright 2016 Splunk, 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 writing,... | apache-2.0 |
iocast/libwebsocket | libwebsocket/websocket/broadcast.py | 1 | 2293 | import struct
import logging
from threading import Thread
from time import sleep
from base import BaseHandler
# WebSocket implementation
class BroadcastHandler(BaseHandler, Thread):
@property
def server(self):
return self._server
@property
def tick_time(self):
return self._tick_... | mit |
kwade00/xbmc | lib/gtest/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... | gpl-2.0 |
thefinn93/CouchPotatoServer | libs/sqlalchemy/dialects/informix/base.py | 12 | 26077 | # informix/base.py
# Copyright (C) 2005-2012 the SQLAlchemy authors and contributors <see AUTHORS file>
# coding: gbk
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Support for the Informix database.
This dialect is mostly functiona... | gpl-3.0 |
yencarnacion/jaikuengine | .google_appengine/lib/django-1.4/django/contrib/admindocs/utils.py | 95 | 3797 | "Misc. utility functions/classes for admin documentation generator."
import re
from email.parser import HeaderParser
from email.errors import HeaderParseError
from django.utils.safestring import mark_safe
from django.core.urlresolvers import reverse
from django.utils.encoding import smart_str
try:
import docutils... | apache-2.0 |
anakinsolo/backend | Lib/site-packages/zope.interface-4.1.3-py2.7-win32.egg/zope/interface/declarations.py | 18 | 27955 | ##############################################################################
# Copyright (c) 2003 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOFTW... | mit |
jeffbaumes/jeffbaumes-vtk | Wrapping/Python/vtk/gtk/GtkGLExtVTKRenderWindowInteractor.py | 8 | 9847 | """
Description:
Provides a pyGtk vtkRenderWindowInteractor widget. This embeds a
vtkRenderWindow inside a GTK widget and uses the
vtkGenericRenderWindowInteractor for the event handling. This is
similar to GtkVTKRenderWindowInteractor.py.
The extensions here allow the use of gtkglext rather than gtkgl an... | bsd-3-clause |
shakamunyi/neutron | neutron/wsgi.py | 7 | 35697 | # 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.apache.org/licenses/LICENSE-2.0
#
# Unless req... | apache-2.0 |
ud3sh/coursework | deeplearning.ai/coursera-improving-neural-networks/week1/assignment1/Initialization.py | 1 | 17555 |
# coding: utf-8
# # Initialization
#
# Welcome to the first assignment of "Improving Deep Neural Networks".
#
# Training your neural network requires specifying an initial value of the weights. A well chosen initialization method will help learning.
#
# If you completed the previous course of this specializatio... | unlicense |
OpenFacetracker/facetracker-core | lib/youtube-dl/youtube_dl/extractor/kaltura.py | 63 | 4867 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import compat_urllib_parse
from ..utils import (
ExtractorError,
int_or_none,
)
class KalturaIE(InfoExtractor):
_VALID_URL = r'''(?x)
(?:kaltura:|
https?://(:?(?:www|cdnapisec)\.)... | gpl-2.0 |
res2k/0install | zeroinstall/zerostore/optimise.py | 6 | 3712 | """Optimise the cache."""
# Copyright (C) 2009, Thomas Leonard
# See the README file for details, or visit http://0install.net.
from __future__ import print_function
from zeroinstall import _, logger
import os, sys
def _already_linked(a, b):
"""@type a: str
@type b: str
@rtype: bool"""
ai = os.stat(a)
bi = os.... | lgpl-2.1 |
brokenjacobs/ansible | lib/ansible/utils/module_docs_fragments/openswitch.py | 166 | 4001 | #
# (c) 2015, Peter Sprygada <psprygada@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 late... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.