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 |
|---|---|---|---|---|---|
pjg101/SickRage | lib/pgi/codegen/cffi_backend.py | 19 | 12193 | # Copyright 2012,2013 Christoph Reiter
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.
import textwrap
from ... | gpl-3.0 |
hottwaj/django | django/forms/utils.py | 241 | 6131 | from __future__ import unicode_literals
import json
import sys
from django.conf import settings
from django.core.exceptions import ValidationError # backwards compatibility
from django.utils import six, timezone
from django.utils.encoding import force_text, python_2_unicode_compatible
from django.utils.html import e... | bsd-3-clause |
sillvan/hyperspy | hyperspy/drawing/_markers/horizontal_line_segment.py | 1 | 3320 | # -*- coding: utf-8 -*-
# Copyright 2007-2011 The Hyperspy developers
#
# This file is part of Hyperspy.
#
# Hyperspy 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... | gpl-3.0 |
dgsantana/arsenalsuite | cpp/lib/PyQt4/examples/widgets/spinboxes.py | 20 | 8877 | #!/usr/bin/env python
#############################################################################
##
## Copyright (C) 2010 Riverbank Computing Limited.
## Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
## All rights reserved.
##
## This file is part of the examples of PyQt.
##
## $QT_BEGIN_LICENS... | gpl-2.0 |
giacomov/lclike | lclike/duration_computation.py | 1 | 12141 | __author__ = 'giacomov'
# !/usr/bin/env python
# add |^| to the top line to run the script without needing 'python' to run it at cmd
# importing modules1
import numpy as np
# cant use 'show' inside the farm
import matplotlib
matplotlib.use("Agg")
import matplotlib.pyplot as plt
from matplotlib import gridspec
imp... | bsd-3-clause |
kingvuplus/boom | lib/python/Components/Button.py | 2 | 1147 | from HTMLComponent import HTMLComponent
from GUIComponent import GUIComponent
from VariableText import VariableText
from enigma import eButton
class Button(VariableText, HTMLComponent, GUIComponent):
def __init__(self, text = '', onClick = None):
if not onClick:
onClick = []
... | gpl-2.0 |
trianam/tkLayoutTests | TestRouting/test21/conf/xml/longbarrel_cmsIdealGeometryXML_cff.py | 43 | 6122 | import FWCore.ParameterSet.Config as cms
from Geometry.CMSCommonData.cmsIdealGeometryXML_cfi import *
XMLIdealGeometryESSource.geomXMLFiles = cms.vstring(
'SLHCUpgradeSimulations/Geometry/data/longbarrel/materials.xml',
'Geometry/CMSCommonData/data/rotations.xml',
'Geometry/CMSCommonData/data/no... | gpl-2.0 |
horizontracy/rpi_tool | api/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/mbcssm.py | 1783 | 19590 | ######################## 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... | mit |
davidcoallier/bigcouch | couchjs/scons/scons-local-2.0.1/SCons/Tool/qt.py | 61 | 13252 |
"""SCons.Tool.qt
Tool-specific initialization for Qt.
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) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
#
# Pe... | apache-2.0 |
blighj/django | django/conf/locale/hr/formats.py | 65 | 2039 | # This file is distributed under the same license as the Django package.
#
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j. E Y.'
TIME_FORMAT = 'H:i'
DATETIME_FORMAT = 'j. E Y. H:i'
YEAR_MONTH_FORMAT = 'F Y.'
MONTH_DAY_FO... | bsd-3-clause |
orchidinfosys/odoo | addons/crm/wizard/crm_merge_opportunities.py | 47 | 3563 | # Part of Odoo. See LICENSE file for full copyright and licensing details.
from openerp.osv import fields, osv
from openerp.tools.translate import _
class crm_merge_opportunity(osv.osv_memory):
"""
Merge opportunities together.
If we're talking about opportunities, it's just because it makes more sense
... | gpl-3.0 |
alingse/jsoncsv | jsoncsv/dumptool.py | 1 | 3539 | # coding=utf-8
# author@alingse
# 2015.10.09
import json
import unicodecsv as csv
import xlwt
class Dump(object):
def __init__(self, fin, fout, **kwargs):
self.fin = fin
self.fout = fout
self.initialize(**kwargs)
def initialize(self, **kwargs):
pass
def prepare(self):
... | apache-2.0 |
shaftoe/home-assistant | tests/components/light/test_mqtt_template.py | 8 | 20067 | """The tests for the MQTT Template light platform.
Configuration example with all features:
light:
platform: mqtt_template
name: mqtt_template_light_1
state_topic: 'home/rgb1'
command_topic: 'home/rgb1/set'
command_on_template: >
on,{{ brightness|d }},{{ red|d }}-{{ green|d }}-{{ blue|d }}
... | apache-2.0 |
adamtheturtle/flocker | flocker/route/functional/test_iptables_create.py | 15 | 17993 | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
"""
Tests for :py:mod:`flocker.route._iptables`.
"""
from __future__ import print_function
from time import sleep
from errno import ECONNREFUSED
from os import getuid, getpid
from socket import error, socket
from unittest import skipUnless
from subprocess ... | apache-2.0 |
armani-dev/android_kernel_xiaomi_armani | scripts/gcc-wrapper.py | 181 | 3495 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2011-2012, The Linux Foundation. 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 th... | gpl-2.0 |
DailyActie/Surrogate-Model | 01-codes/OpenMDAO-Framework-dev/examples/openmdao.examples.bar3simulation/openmdao/examples/bar3simulation/bar3_optimization.py | 1 | 4444 | """
bar3_optimization.py - Top level assembly for the example problem.
"""
# Optimize the bar3 design using the CONMIN optimizer.
# pylint: disable-msg=E0611,F0401
from openmdao.lib.drivers.api import CONMINdriver
from openmdao.main.api import Assembly
from openmdao.main.datatypes.api import Float
# from openmda... | mit |
agriffis/django-allauth | allauth/socialaccount/providers/amazon/views.py | 73 | 1304 | import requests
from allauth.socialaccount.providers.oauth2.views import (OAuth2Adapter,
OAuth2LoginView,
OAuth2CallbackView)
from .provider import AmazonProvider
class AmazonOAuth2Adapter(OAuth2Adapte... | mit |
hall1467/wikidata_usage_tracking | python_analysis_scripts/edit_analyses/session_stats.py | 1 | 2861 | """
Selects number of distinct revisions.
Usage:
session_stats (-h|--help)
session_stats <input> <output>
[--debug]
[--verbose]
Options:
-h, --help This help message is printed
<input> Path to input file to process.
<output> Where output will be writte... | mit |
barentsen/csvkit | csvkit/convert/xls.py | 21 | 4661 | #!/usr/bin/env python
import datetime
import six
import xlrd
from csvkit import table
from csvkit.exceptions import XLSDataError
def normalize_empty(values, **kwargs):
"""
Normalize a column which contains only empty cells.
"""
return None, [None] * len(values)
def normalize_text(values, **kwargs):... | mit |
asen6/amartyasenguptadotcom | django/test/_doctest.py | 152 | 100621 | # This is a slightly modified version of the doctest.py that shipped with Python 2.4
# It incorporates changes that have been submitted to the Python ticket tracker
# as ticket #1521051. These changes allow for a DoctestRunner and Doctest base
# class to be specified when constructing a DoctestSuite.
# Module doctest.... | bsd-3-clause |
Branlala/docker-sickbeardfr | sickbeard/lib/subliminal/services/__init__.py | 36 | 9247 | # -*- coding: utf-8 -*-
# Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com>
#
# This file is part of subliminal.
#
# subliminal is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 3 of... | mit |
jplusplus/detective.io | app/detective/migrations/0035_auto__add_subscription.py | 3 | 12870 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Subscription'
db.create_table(u'detective_subscription', ... | lgpl-3.0 |
StevenCHowell/code_sas_modeling | sas_modeling/calc_i0.py | 1 | 13051 | #!/usr/bin/env python
# coding:utf-8
'''
Author: Steven C. Howell --<steven.howell@nist.gov>
Purpose: calculating the Guinier fit
Created: 12/21/2016
00000000011111111112222222222333333333344444444445555555555666666666677777777778
123456789012345678901234567890123456789012345678901234567890123456789012345... | gpl-3.0 |
ChenJunor/hue | desktop/core/ext-py/Django-1.6.10/tests/comment_tests/tests/test_app_api.py | 58 | 2664 | from __future__ import absolute_import
from django.conf import settings
from django.contrib import comments
from django.contrib.comments.models import Comment
from django.contrib.comments.forms import CommentForm
from django.core.exceptions import ImproperlyConfigured
from django.test.utils import override_settings
fr... | apache-2.0 |
scripnichenko/glance | glance/tests/unit/common/test_wsgi.py | 5 | 26226 | # Copyright 2010-2011 OpenStack Foundation
# Copyright 2014 IBM Corp.
# 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/license... | apache-2.0 |
tijme/not-your-average-web-crawler | test/test_helpers_url_helper.py | 1 | 5609 | # -*- coding: utf-8 -*-
# MIT License
#
# Copyright (c) 2017 Tijme Gommers
#
# 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... | mit |
vishnugonela/boto | boto/kms/exceptions.py | 135 | 1523 | # The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL-
# ITY, FITNESS FOR A PARTICULAR PURPOS... | mit |
SeedScientific/polio | source_data/migrations/0053_auto__chg_field_sourcedatapoint_error_msg.py | 1 | 71250 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'SourceDataPoint.error_msg'
db.alter_column(u'source_da... | agpl-3.0 |
RandyMoore/mySiteDjango | my_site_django/weblog/models.py | 1 | 3693 | from django.db import models
from django.db.models.fields import CharField
from django.utils.safestring import mark_safe
from markdown import markdown
from pygments import highlight
from pygments.formatters import get_formatter_by_name
from pygments.lexers import get_lexer_by_name
from wagtail.core import blocks
fro... | gpl-3.0 |
sfam/home-assistant | homeassistant/components/sensor/torque.py | 6 | 3146 | """
homeassistant.components.sensor.torque
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get data from the Torque OBD application.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/sensor.torque/
"""
import re
from homeassistant.const import HTTP_OK
from ho... | mit |
2014c2g4/w16b_test | static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/locals.py | 603 | 1141 | ## pygame - Python Game Library
## Copyright (C) 2000-2003 Pete Shinners
##
## This library is free software; you can redistribute it and/or
## modify it under the terms of the GNU Library General Public
## License as published by the Free Software Foundation; either
## version 2 of the License... | gpl-3.0 |
brianchoate/chef2ldif | setup.py | 1 | 1553 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read().replace('.. :changelog:', ... | bsd-3-clause |
yamahata/tacker | tacker/openstack/common/db/sqlalchemy/utils.py | 2 | 24284 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2010-2011 OpenStack Foundation.
# Copyright 2012 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# ... | apache-2.0 |
numenta/nupic.vision | src/nupic/vision/data/OCR/characters/parseJPG.py | 3 | 7772 | #!/usr/bin/python2
'''
This script parses JPEG images of text documents to isolate and save images
of individual characters. The size of these output images in pixels is
specified by the parameters desired_height and desired_width.
The JPEG images are converted to grey scale using a parameter called
luminance_thre... | agpl-3.0 |
citrix-openstack-build/neutron-vpnaas | neutron_vpnaas/db/vpn/vpn_db.py | 1 | 31697 | # (c) Copyright 2013 Hewlett-Packard Development Company, L.P.
# 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... | apache-2.0 |
dgoedkoop/QGIS | python/plugins/processing/tools/vector.py | 3 | 3781 | # -*- coding: utf-8 -*-
"""
***************************************************************************
vector.py
---------------------
Date : February 2013
Copyright : (C) 2013 by Victor Olaya
Email : volayaf at gmail dot com
******************************... | gpl-2.0 |
LiveChains/Live-Coin | contrib/spendfrom/spendfrom.py | 1 | 10087 | #!/usr/bin/env python
#
# Use the raw transactions API to spend bitcoins received on particular addresses,
# and send any change back to that same address.
#
# Example usage:
# spendfrom.py # Lists available funds
# spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00
#
# Assumes it will talk to a livecoind or Li... | mit |
petteyg/intellij-community | python/helpers/pydev/third_party/wrapped_for_pydev/ctypes/macholib/dylib.py | 320 | 1828 | """
Generic dylib path manipulation
"""
import re
__all__ = ['dylib_info']
DYLIB_RE = re.compile(r"""(?x)
(?P<location>^.*)(?:^|/)
(?P<name>
(?P<shortname>\w+?)
(?:\.(?P<version>[^._]+))?
(?:_(?P<suffix>[^._]+))?
\.dylib$
)
""")
def dylib_info(filename):
"""
A dylib name can take one of the ... | apache-2.0 |
peak6/st2 | st2common/st2common/models/system/actionchain.py | 8 | 5983 | # Licensed to the StackStorm, Inc ('StackStorm') under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use th... | apache-2.0 |
podemos-info/odoo | openerp/tests/addons/test_exceptions/models.py | 66 | 1289 | # -*- coding: utf-8 -*-
import openerp
class m(openerp.osv.osv.Model):
""" This model exposes a few methods that will raise the different
exceptions that must be handled by the server (and its RPC layer)
and the clients.
"""
_name = 'test.exceptions.model'
def generate_except_osv(self,... | agpl-3.0 |
lmorchard/django-allauth | allauth/socialaccount/providers/xing/provider.py | 68 | 1229 | from allauth.socialaccount import providers
from allauth.socialaccount.providers.base import ProviderAccount
from allauth.socialaccount.providers.oauth.provider import OAuthProvider
class XingAccount(ProviderAccount):
def get_profile_url(self):
return self.account.extra_data.get('permalink')
def get_... | mit |
jhseu/tensorflow | tensorflow/python/feature_column/dense_features_v2.py | 7 | 3937 | # Copyright 2019 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 |
Hiestaa/RLViz | src/problems/base.py | 1 | 6050 | # -*- coding: utf8 -*-
from __future__ import unicode_literals
import logging
logger = logging.getLogger(__name__)
import gym
from parametizable import Parametizable
from consts import ParamsTypes, Spaces
class ProblemException(Exception):
pass
class BaseProblem(Parametizable):
"""
Mostly a wrapper a... | mit |
djangocon/symposion-2014 | symposion/cms/views.py | 7 | 3302 | from django.conf import settings
from django.db import transaction
from django.http import Http404, HttpResponse
from django.shortcuts import render, redirect, get_object_or_404
from django.views import static
from django.contrib.auth.decorators import login_required
from .models import Page, File
from .forms import P... | bsd-3-clause |
kosgroup/odoo | odoo/conf/deprecation.py | 20 | 1455 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
""" Regroup variables for deprecated features.
To keep the OpenERP server backward compatible with older modules, some
additional code is needed throughout the core library. This module keeps
track of those specific mea... | gpl-3.0 |
knehez/edx-platform | lms/djangoapps/shoppingcart/management/tests/test_retire_order.py | 105 | 2638 | """Tests for the retire_order command"""
from tempfile import NamedTemporaryFile
from django.core.management import call_command
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from xmodule.modulestore.tests.factories import CourseFactory
from shoppingcart.models import Order, CertificateItem
f... | agpl-3.0 |
JNRowe/cupage | setup.py | 1 | 2052 | #! /usr/bin/env python3
"""setup.py - Setuptools tasks and config for cupage."""
# Copyright © 2009-2014 James Rowe <jnrowe@gmail.com>
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publish... | gpl-3.0 |
nwjs/chromium.src | chrome/test/mini_installer/chrome_helper.py | 4 | 4785 | # 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.
"""Common helper module for working with Chrome's processes and windows."""
import logging
import os
import psutil
import re
import win32gui
import win32pro... | bsd-3-clause |
blabla1337/skf-flask | skf/rabbit_mq_workers/deletion-worker.py | 1 | 3009 | #!/usr/bin/env python
import pika, time, random, yaml
from os import path
from skf import settings
from kubernetes import client, config
creds = pika.PlainCredentials('admin', 'admin-skf-secret')
connection = pika.BlockingConnection(pika.ConnectionParameters(host=settings.RABBIT_MQ_CONN_STRING, credentials=creds))
cha... | agpl-3.0 |
pieleric/odemis | src/odemis/acq/align/transform.py | 4 | 3925 | # -*- coding: utf-8 -*-
"""
Created on 29 Nov 2013
@author: Kimon Tsitsikas
Copyright © 2012-2013 Kimon Tsitsikas, Delmic
This file is part of Odemis.
Odemis is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License version 2 as published by the Free
Software Fou... | gpl-2.0 |
google-research/social_cascades | news/graph_processing.py | 1 | 1943 | # 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 agreed to in writing, ... | apache-2.0 |
jlspyaozhongkai/Uter | third_party_backup/Python-2.7.9/Demo/tix/samples/SHList1.py | 9 | 3965 | # -*-mode: python; fill-column: 75; tab-width: 8; coding: iso-latin-1-unix -*-
#
# $Id$
#
# Tix Demostration Program
#
# This sample program is structured in such a way so that it can be
# executed from the Tix demo program "tixwidgets.py": it must have a
# procedure called "RunSample". It should also have the "if" sta... | gpl-3.0 |
signed/intellij-community | python/lib/Lib/pickle.py | 86 | 44800 | """Create portable serialized representations of Python objects.
See module cPickle for a (much) faster implementation.
See module copy_reg for a mechanism for registering custom picklers.
See module pickletools source for extensive comments.
Classes:
Pickler
Unpickler
Functions:
dump(object, file)
... | apache-2.0 |
joyxu/autotest | client/shared/iscsi.py | 3 | 10227 | """
Basic iscsi support for Linux host with the help of commands
iscsiadm and tgtadm.
This include the basic operates such as login and get device name by
target name. And it can support the real iscsi access and emulated
iscsi in localhost then access it.
"""
import re
import os
import logging
from autotest.client ... | gpl-2.0 |
gunchleoc/django | tests/auth_tests/test_middleware.py | 86 | 1251 | from django.contrib.auth.middleware import AuthenticationMiddleware
from django.contrib.auth.models import User
from django.http import HttpRequest
from django.test import TestCase
class TestAuthenticationMiddleware(TestCase):
def setUp(self):
self.user = User.objects.create_user('test_user', 'test@exampl... | bsd-3-clause |
Pablo126/SSBW | Entrega1/lib/python3.5/site-packages/setuptools/command/setopt.py | 299 | 5085 | from distutils.util import convert_path
from distutils import log
from distutils.errors import DistutilsOptionError
import distutils
import os
from setuptools.extern.six.moves import configparser
from setuptools import Command
__all__ = ['config_file', 'edit_config', 'option_base', 'setopt']
def config_file(kind="... | gpl-3.0 |
miyakz1192/neutron | neutron/plugins/ml2/drivers/cisco/apic/apic_model.py | 39 | 7320 | # Copyright (c) 2014 Cisco Systems 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 re... | apache-2.0 |
Plexxi/st2 | st2client/st2client/shell.py | 3 | 17406 | #!/usr/bin/env python
# Copyright 2020 The StackStorm Authors.
# Copyright 2019 Extreme Networks, 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/... | apache-2.0 |
ryfeus/lambda-packs | Tensorflow/source/numpy/__init__.py | 49 | 6274 | """
NumPy
=====
Provides
1. An array object of arbitrary homogeneous items
2. Fast mathematical operations over arrays
3. Linear Algebra, Fourier Transforms, Random Number Generation
How to use the documentation
----------------------------
Documentation is available in two forms: docstrings provided
with the c... | mit |
kevinmel2000/sl4a | python-build/python-libs/gdata/samples/finance/test_finance.py | 128 | 10785 | #!/usr/bin/python
#
# Copyright (C) 2009 Tan Swee Heng
#
# 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 la... | apache-2.0 |
euroscipy/www.euroscipy.org | papercall_grabbing.py | 1 | 4306 | """
Functions to grab info from papercall.io
"""
import os
import time
import requests
token = 'your_papercall_token' # ,<-- fill this in
THIS_DIR = os.path.abspath(os.path.dirname(__file__))
des_template = """
Title: {title}
URL: 2017/descriptions/{id}.html
save_as: 2017/descriptions/{id}.html
{description}
""".... | mit |
lmazuel/azure-sdk-for-python | azure-mgmt-batchai/azure/mgmt/batchai/operations/file_servers_operations.py | 1 | 22642 | # 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 |
tlakshman26/cinder-new-branch | cinder/api/contrib/qos_specs_manage.py | 18 | 19517 | # Copyright (c) 2013 eBay Inc.
# Copyright (c) 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
#
# ... | apache-2.0 |
GoogleChrome/chromium-dashboard | internals/processes_test.py | 1 | 9385 | from __future__ import division
from __future__ import print_function
# Copyright 2020 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/LICEN... | apache-2.0 |
fusionbox/mezzanine | mezzanine/blog/migrations/south/0005_auto__del_comment__add_field_blogpost_comments_count__chg_field_blogpo.py | 8 | 10953 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
try:
from django.contrib.auth import get_user_model
except ImportError: # django < 1.5
from django.contrib.auth.models import User
else:
User = get_user_model()
user_orm_label = '%s... | bsd-2-clause |
anryko/ansible | lib/ansible/modules/cloud/amazon/aws_waf_condition.py | 9 | 29857 | #!/usr/bin/python
# Copyright (c) 2017 Will Thames
# Copyright (c) 2015 Mike Mochan
# 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 |
vivianli32/TravelConnect | flask/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/sbcharsetprober.py | 2927 | 4793 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | mit |
mojofunk/ardour | tools/bug_tool/ClientCookie/__init__.py | 11 | 1394 | # Import names so that they can be imported directly from the package, like
# this:
#from ClientCookie import <whatever>
try: True
except NameError:
True = 1
False = 0
import sys
# don't edit these here: do eg.
# import ClientCookie; ClientCookie.HTTP_DEBUG = 1
DEBUG_STREAM = sys.stderr
CLIENTCOOKIE_DEBUG = ... | gpl-2.0 |
Kilhog/odoo | addons/document/__openerp__.py | 260 | 2096 | # -*- 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 |
roopeshsivam/certify | certificates/CreateCertView.py | 1 | 5826 | from django.http import HttpResponse, HttpResponseRedirect
from django.contrib.auth import logout as django_logout
from django.shortcuts import redirect, render, get_object_or_404
from django.contrib.auth.decorators import login_required
from django.views import generic
from django.utils.decorators import method_decora... | gpl-3.0 |
rajeefmk/Barcamp-Bangalore-Android-App | gcm_flask/flask/config.py | 50 | 6150 | # -*- coding: utf-8 -*-
"""
flask.config
~~~~~~~~~~~~
Implements the configuration related objects.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from __future__ import with_statement
import imp
import os
import errno
from werkzeug.utils import import_... | apache-2.0 |
hollabaq86/haikuna-matata | env/lib/python2.7/site-packages/nltk/app/wordnet_app.py | 5 | 34430 | # Natural Language Toolkit: WordNet Browser Application
#
# Copyright (C) 2001-2017 NLTK Project
# Author: Jussi Salmela <jtsalmela@users.sourceforge.net>
# Paul Bone <pbone@students.csse.unimelb.edu.au>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
"""
A WordNet Browser application whic... | mit |
yongshengwang/hue | desktop/core/ext-py/markdown/regression-tests.py | 44 | 8693 | #!/usr/bin/python
"""
Python-Markdown Regression Tests
================================
Tests of the various APIs with the python markdown lib.
"""
import unittest
from doctest import DocTestSuite
import os
import markdown
class TestMarkdown(unittest.TestCase):
""" Tests basics of the Markdown class. """
d... | apache-2.0 |
nordri/check_domains | lib/python2.7/site-packages/django/db/backends/mysql/base.py | 5 | 23626 | """
MySQL database backend for Django.
Requires MySQLdb: http://sourceforge.net/projects/mysql-python
"""
from __future__ import unicode_literals
import datetime
import re
import sys
import warnings
try:
import MySQLdb as Database
except ImportError as e:
from django.core.exceptions import ImproperlyConfigur... | gpl-3.0 |
sweetycode/omaha | installers/generate_resource_script.py | 65 | 2015 | #!/usr/bin/python2.4
#
# Copyright 2009 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 o... | apache-2.0 |
exocad/exotrac | trac/tests/contentgen.py | 5 | 2360 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2008-2013 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac.edgewall.org/wiki/TracLicense.
#
# This software consi... | bsd-3-clause |
waseem18/oh-mainline | vendor/packages/scrapy/docs/conf.py | 17 | 6109 | # -*- coding: utf-8 -*-
#
# Scrapy documentation build configuration file, created by
# sphinx-quickstart on Mon Nov 24 12:02:52 2008.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# The contents of this file are pickled, so don't put values in the namespace
# that aren't pickleab... | agpl-3.0 |
beiko-lab/gengis | bin/Lib/lib-tk/test/test_ttk/test_extensions.py | 7 | 9460 | import sys
import unittest
import Tkinter
import ttk
from test.test_support import requires, run_unittest
import support
requires('gui')
class LabeledScaleTest(unittest.TestCase):
def setUp(self):
support.root_deiconify()
def tearDown(self):
support.root_withdraw()
... | gpl-3.0 |
diN0bot/ProcrasDonate | lib/html_emailer.py | 1 | 1392 | import smtplib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
import settings
def send_email(sender, recipient, subject, text, html):
if settings.DJANGO_SERVER:
print "="*60
print "FROM:", sender
print "TO:", recipient
print "SUBJECT:", subject... | agpl-3.0 |
mgsergio/omim | tools/python/ResponseProvider.py | 3 | 7085 | from __future__ import print_function
import jsons
import logging
import os
BIG_FILE_SIZE = 47684
class Payload:
def __init__(self, message, response_code=200, headers={}):
self.__response_code = response_code
self.__message = message
self.__headers = headers
def respo... | apache-2.0 |
JING-TIME/ustc-course | tests/resize_avatar.py | 1 | 1146 | #!/usr/bin/env python3
import sys
sys.path.append('..') # fix import directory
from app import app
from app.models import User
from PIL import Image
from app.utils import rand_str
ctx = app.test_request_context()
ctx.push()
users = User.query.all()
for u in users:
if u._avatar:
with Image.open('../uploa... | agpl-3.0 |
equialgo/scikit-learn | sklearn/utils/tests/test_random.py | 85 | 7349 | from __future__ import division
import numpy as np
import scipy.sparse as sp
from scipy.misc import comb as combinations
from numpy.testing import assert_array_almost_equal
from sklearn.utils.random import sample_without_replacement
from sklearn.utils.random import random_choice_csc
from sklearn.utils.testing import ... | bsd-3-clause |
srcLurker/home-assistant | homeassistant/components/switch/flux.py | 2 | 8700 | """
Flux for Home-Assistant.
The idea was taken from https://github.com/KpaBap/hue-flux/
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/switch.flux/
"""
from datetime import time
import logging
import voluptuous as vol
from homeassistant.components.li... | mit |
prechelt/pyth | pyth/__init__.py | 1 | 1207 | """
Pyth -- Python text markup and conversion
"""
from __future__ import absolute_import
import os.path
__version__ = '0.5.6'
writerMap = {
'.rtf': 'pyth.plugins.rtf15.writer.Rtf15Writer',
'.html': 'pyth.plugins.xhtml.writer.XHTMLWriter',
'.xhtml': 'pyth.plugins.xhtml.writer.XHTMLWriter',
'.txt': 'py... | mit |
chauhanhardik/populo_2 | openedx/core/djangoapps/credit/models.py | 8 | 24732 | # -*- coding: utf-8 -*-
"""
Models for Credit Eligibility for courses.
Credit courses allow students to receive university credit for
successful completion of a course on EdX
"""
import datetime
from collections import defaultdict
import logging
import pytz
from django.conf import settings
from django.core.cache im... | agpl-3.0 |
CyanogenMod/android_kernel_samsung_t1 | scripts/rt-tester/rt-tester.py | 11005 | 5307 | #!/usr/bin/python
#
# rt-mutex tester
#
# (C) 2006 Thomas Gleixner <tglx@linutronix.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
import os
import sys
import getopt
import sh... | gpl-2.0 |
devclone/enigma2-9f38fd6 | lib/python/Components/Sensors.py | 104 | 1928 | from Components.FanControl import fancontrol
class Sensors:
# (type, name, unit, directory)
TYPE_TEMPERATURE = 0
# (type, name, unit, fanid)
TYPE_FAN_RPM = 1
def __init__(self):
# (type, name, unit, sensor_specific_dict/list)
self.sensors_list = []
self.addSensors()
def getSensorsCount(self, type = None)... | gpl-2.0 |
allanino/nupic | nupic/regions/ImageSensorFilters/Resize.py | 17 | 7903 | # ----------------------------------------------------------------------
# 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 |
gfyoung/pandas | pandas/io/formats/printing.py | 3 | 17290 | """
Printing tools.
"""
import sys
from typing import (
Any,
Callable,
Dict,
Iterable,
List,
Mapping,
Optional,
Sequence,
Sized,
Tuple,
TypeVar,
Union,
)
from pandas._config import get_option
from pandas.core.dtypes.inference import is_sequence
EscapeChars = Union[Map... | bsd-3-clause |
iuliat/nova | nova/tests/functional/v3/test_deferred_delete.py | 24 | 2132 | # Copyright 2012 Nebula, Inc.
# 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... | apache-2.0 |
civisanalytics/ansible-modules-core | windows/win_reboot.py | 61 | 2471 | #!/usr/bin/python
# -*- 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 option) any later version.
#... | gpl-3.0 |
qtumproject/qtum | test/functional/feature_versionbits_warning.py | 17 | 5111 | #!/usr/bin/env python3
# Copyright (c) 2016-2019 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 version bits warning system.
Generate chains with block versions that appear to be signalling unk... | mit |
jonnyhtw/cylc | lib/cylc/batch_sys_manager.py | 1 | 33030 | #!/usr/bin/env python
# THIS FILE IS PART OF THE CYLC SUITE ENGINE.
# Copyright (C) 2008-2018 NIWA
#
# 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 yo... | gpl-3.0 |
srsman/odoo | addons/account/installer.py | 381 | 8404 | # -*- coding: utf-8 -*-
##############################################################################
#
# 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... | agpl-3.0 |
jhseu/tensorflow | tensorflow/python/kernel_tests/random/stateless_random_ops_test.py | 1 | 7104 | # Copyright 2018 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 |
kailIII/emaresa | trunk.pe.bk/web_printscreen_zb/__openerp__.py | 3 | 1527 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2013 ZestyBeanz Technologies Pvt. Ltd.
# (http://wwww.zbeanztech.com)
# contact@zbeanztech.com
#
# This program is free software: you can redistribute it and/or modify
# it under the... | agpl-3.0 |
akarki15/mozillians | vendor-local/lib/python/djcelery/tests/test_models.py | 13 | 3460 | from __future__ import absolute_import
from datetime import datetime, timedelta
from celery import current_app
from celery import states
from celery.utils import gen_unique_id
from djcelery.models import TaskMeta, TaskSetMeta
from djcelery.tests.utils import unittest
from djcelery.utils import now
class TestModels... | bsd-3-clause |
polysquare/polysquare-ci-scripts | setup.py | 1 | 1485 | # /setup.py
#
# Installation and setup script for polysquare-ci-scripts
#
# See /LICENCE.md for Copyright information
"""Installation and setup script for polysquare-ci-scripts."""
from setuptools import (find_packages, setup)
setup(name="polysquare-ci-scripts",
version="0.0.1",
description="Polysquare Co... | mit |
YOTOV-LIMITED/kuma | vendor/packages/translate/storage/test_properties.py | 24 | 16806 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pytest import deprecated_call, raises
from translate.misc import wStringIO
from translate.storage import properties, test_monolingual
def test_find_delimiter_pos_simple():
"""Simple tests to find the various delimiters"""
assert properties._find_delimiter(u... | mpl-2.0 |
jinghaomiao/apollo | cyber/python/cyber_py3/record.py | 3 | 7813 | #!/usr/bin/env python3
# ****************************************************************************
# Copyright 2019 The Apollo 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... | apache-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.