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 |
|---|---|---|---|---|---|
geotagx/geotagx-pybossa-archive | pybossa/auth/task.py | 1 | 1535 | # -*- coding: utf8 -*-
# This file is part of PyBossa.
#
# Copyright (C) 2013 SF Isle of Man Limited
#
# PyBossa 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, either version 3 of the License, or
# (at... | agpl-3.0 |
MasterGowen/moonrain | moonrain/accounts/models.py | 1 | 2939 | from django.db import models
from django.contrib.auth.models import BaseUserManager, AbstractBaseUser
from ..projects.models import Project
class UserManager(BaseUserManager):
def create_user(self, email, username, password=None):
if not email:
raise ValueError('Необходимо ввести электронный а... | gpl-2.0 |
weety/rt-thread | tools/rt_studio.py | 6 | 34261 | import os
import re
from string import Template
import rtconfig
import shutil
# version
MODULE_VER_NUM = 1
cproject_temp = """<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
<storageModule moduleId="org.eclips... | apache-2.0 |
rosudrag/Freemium-winner | VirtualEnvironment/Lib/site-packages/pip-7.1.0-py3.4.egg/pip/locations.py | 59 | 6362 | """Locations where we look for configs, install stuff, etc"""
from __future__ import absolute_import
import getpass
import os
import os.path
import site
import sys
from distutils import sysconfig
from distutils.command.install import install, SCHEME_KEYS # noqa
from pip.compat import WINDOWS
from pip.utils import a... | mit |
dfranco/shinken | test/test_db_mysql.py | 19 | 1856 | #!/usr/bin/env python
# Copyright (C) 2009-2014:
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
#
# This file is part of Shinken.
#
# Shinken 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 F... | agpl-3.0 |
lmEshoo/st2contrib | packs/dripstat/sensors/dripstat_alert_sensor.py | 12 | 2855 | import eventlet
import requests
from datetime import datetime
from st2reactor.sensor.base import PollingSensor
__all_ = [
'DripstatAlertSensor'
]
BASE_URL = 'https://api.dripstat.com/api/v1'
eventlet.monkey_patch(
os=True,
select=True,
socket=True,
thread=True,
time=True)
class DripstatAle... | apache-2.0 |
agaveapi/SC17-container-tutorial | content/images/jupyter/examples/setvars.py | 1 | 2421 | # Here we define some utility commands to simplify interaction with the shell.
# You don't need to read or understand this, but it's here in case you want to.
import re
import os
def repvar(v):
"""
repvar() is short for "Replace Variables." The idea is that this
function looks for strings of the form $VAR o... | bsd-3-clause |
wklken/flask | flask/testsuite/views.py | 561 | 5068 | # -*- coding: utf-8 -*-
"""
flask.testsuite.views
~~~~~~~~~~~~~~~~~~~~~
Pluggable views.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import flask
import flask.views
import unittest
from flask.testsuite import FlaskTestCase
from werkzeug.http import par... | bsd-3-clause |
EmmanuelJohnson/ssquiz | flask/lib/python2.7/site-packages/openid/__init__.py | 139 | 1623 | """
This package is an implementation of the OpenID specification in
Python. It contains code for both server and consumer
implementations. For information on implementing an OpenID consumer,
see the C{L{openid.consumer.consumer}} module. For information on
implementing an OpenID server, see the C{L{openid.server.se... | bsd-3-clause |
jaredweiss/nupic | tests/integration/nupic/algorithms/temporal_memory_performance_test.py | 9 | 4753 | #!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2014, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions ... | gpl-3.0 |
atomicjets/twitter-for-bigquery | libs/requests/packages/charade/__init__.py | 122 | 1327 | ######################## BEGIN LICENSE BLOCK ########################
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any late... | apache-2.0 |
ltilve/chromium | tools/telemetry/telemetry/core/browser_finder.py | 3 | 5942 | # Copyright 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.
"""Finds browsers that can be controlled by telemetry."""
import logging
import operator
from telemetry.core.backends.chrome import android_browser_finder
... | bsd-3-clause |
GitHublong/hue | desktop/core/ext-py/Django-1.6.10/django/utils/importlib.py | 105 | 1384 | # Taken from Python 2.7 with permission from/by the original author.
import sys
from django.utils import six
def _resolve_name(name, package, level):
"""Return the absolute name of the module to be imported."""
if not hasattr(package, 'rindex'):
raise ValueError("'package' not set to a string")
do... | apache-2.0 |
mrichie/node-mwp | node_modules/weibo/node_modules/emoji/bin/create_emoji_js.py | 6 | 2090 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# install pyquery first: $ sudo easy_install pyquery
import os
from pyquery import PyQuery as pq
project_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# d = pq(url='https://raw.github.com/iamcal/php-emoji/master/table.htm')
d = pq(open(project_dir + '/li... | mit |
CTSRD-SOAAP/chromium-42.0.2311.135 | build/android/gyp/javac.py | 2 | 8917 | #!/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.
import fnmatch
import optparse
import os
import shutil
import re
import sys
import textwrap
from util import build_utils
from util i... | bsd-3-clause |
h2oai/h2o | h2o-docs-theme/setup.py | 84 | 1313 | # -*- coding: utf-8 -*-
"""`sphinx_rtd_theme` lives on `Github`_.
.. _github: https://www.github.com/snide/sphinx_rtd_theme
"""
from setuptools import setup
from sphinx_rtd_theme import __version__
setup(
name='sphinx_rtd_theme',
version=__version__,
url='https://github.com/snide/sphinx_rtd_theme/',
... | apache-2.0 |
heromod/migrid | mig/shared/functionality/migadmin.py | 1 | 14406 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# migadmin - admin control panel with daemon status monitor
# Copyright (C) 2003-2015 The MiG Project lead by Brian Vinter
#
# This file is part of MiG.
#
# MiG is free software: you can redistribute it and/or modify
# it under the terms of the GNU G... | gpl-2.0 |
apocalypsebg/odoo | openerp/addons/base/ir/ir_attachment.py | 183 | 16487 | # -*- 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 |
DucQuang1/youtube-dl | youtube_dl/extractor/youku.py | 49 | 7678 | # coding: utf-8
from __future__ import unicode_literals
import base64
from .common import InfoExtractor
from ..utils import ExtractorError
from ..compat import (
compat_urllib_parse,
compat_ord,
compat_urllib_request,
)
class YoukuIE(InfoExtractor):
IE_NAME = 'youku'
IE_DESC = '优酷'
_VALID_U... | unlicense |
AsimmHirani/ISpyPi | tensorflow/contrib/tensorflow-master/tensorflow/tensorboard/lib/python/http_util_test.py | 21 | 6517 | # -*- coding: utf-8 -*-
# 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
#
# Un... | apache-2.0 |
MadCat34/Sick-Beard | lib/requests/status_codes.py | 56 | 3029 | # -*- coding: utf-8 -*-
from .structures import LookupDict
_codes = {
# Informational.
100: ('continue',),
101: ('switching_protocols',),
102: ('processing',),
103: ('checkpoint',),
122: ('uri_too_long', 'request_uri_too_long'),
200: ('ok', 'okay', 'all_ok', 'all_okay', 'all_good', '\\o/'... | gpl-3.0 |
kJhdnv9Za7Qh/Passport-Enquiries-Prototype | node_modules/node-sass/node_modules/pangyp/gyp/pylib/gyp/MSVSSettings.py | 437 | 43606 | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Code to validate and convert settings of the Microsoft build tools.
This file contains code to validate and convert settings of the Microsoft
build tools. The... | mit |
tailorian/Sick-Beard | lib/bs4/builder/_lxml.py | 446 | 8661 | __all__ = [
'LXMLTreeBuilderForXML',
'LXMLTreeBuilder',
]
from io import BytesIO
from StringIO import StringIO
import collections
from lxml import etree
from bs4.element import Comment, Doctype, NamespacedAttribute
from bs4.builder import (
FAST,
HTML,
HTMLTreeBuilder,
PERMISSIVE,
Parse... | gpl-3.0 |
gurneyalex/OpenUpgrade | addons/report_intrastat/report_intrastat.py | 39 | 5615 | # -*- 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 |
Tilo15/PhotoFiddle2 | PF2/Tools/HueEqualiser.py | 1 | 5526 | import cv2
import numpy
import Tool
class HueEqualiser(Tool.Tool):
def on_init(self):
self.id = "hueequaliser"
self.name = "Hue Equaliser"
self.icon_path = "ui/PF2_Icons/HueEqualiser.png"
self.properties = [
Tool.Property("header", "Hue Equaliser", "Header", None, has_t... | gpl-3.0 |
OCA/sale-workflow | sale_product_set/wizard/product_set_add.py | 1 | 3428 | # Copyright 2015 Anybox S.A.S
# Copyright 2016-2018 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from odoo import models, fields, api, exceptions, _
import odoo.addons.decimal_precision as dp
class ProductSetAdd(models.TransientModel):
_name = 'product.set.add'
_rec_name ... | agpl-3.0 |
MjAbuz/django-social-auth | setup.py | 3 | 2193 | # -*- coding: utf-8 -*-
"""Setup file for easy installation"""
from os.path import join, dirname
from setuptools import setup
version = __import__('social_auth').__version__
LONG_DESCRIPTION = """
Django Social Auth is an easy to setup social authentication/registration
mechanism for Django projects.
Crafted using ... | bsd-3-clause |
xfumihiro/powerline | powerline/lint/markedjson/error.py | 33 | 6948 | # vim:fileencoding=utf-8:noet
from __future__ import (unicode_literals, division, absolute_import, print_function)
import sys
import re
from powerline.lib.encoding import get_preferred_output_encoding
NON_PRINTABLE_STR = (
'[^'
# ASCII control characters: 0x00-0x19
+ '\t\n' # Tab, newline: allowed ASCI... | mit |
pbrazdil/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/servers/rebaselineserver_unittest.py | 119 | 12052 | # 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 f... | bsd-3-clause |
alexax66/CM13_kernel_serranodsxx | scripts/gcc-wrapper.py | 234 | 4095 | #! /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 |
askeing/servo | tests/wpt/web-platform-tests/tools/third_party/pluggy/testing/test_details.py | 43 | 2753 | import warnings
import pytest
from pluggy import PluginManager, HookimplMarker, HookspecMarker, _Result
hookspec = HookspecMarker("example")
hookimpl = HookimplMarker("example")
def test_parse_hookimpl_override():
class MyPluginManager(PluginManager):
def parse_hookimpl_opts(self, module_or_class, name... | mpl-2.0 |
rjschof/gem5 | src/arch/x86/isa/insts/simd128/integer/data_conversion/convert_gpr_integer_to_floating_point.py | 91 | 2989 | # Copyright (c) 2007 The Hewlett-Packard Development Company
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implemen... | bsd-3-clause |
dungvtdev/upsbayescpm | bayespy/inference/vmp/nodes/tests/test_beta.py | 3 | 2667 | ################################################################################
# Copyright (C) 2014 Jaakko Luttinen
#
# This file is licensed under the MIT License.
################################################################################
"""
Unit tests for `beta` module.
"""
import numpy as np
from scipy i... | mit |
marguslaak/django-xadmin | xadmin/plugins/refresh.py | 28 | 1272 | # coding=utf-8
from django.template import loader
from xadmin.sites import site
from xadmin.views import BaseAdminPlugin, ListAdminView
REFRESH_VAR = '_refresh'
class RefreshPlugin(BaseAdminPlugin):
refresh_times = []
# Media
def get_media(self, media):
if self.refresh_times and self.request.G... | bsd-3-clause |
SiccarPoint/landlab | landlab/components/nonlinear_diffusion/examples/drive_perron.py | 6 | 2924 | from __future__ import print_function
import numpy
from landlab import RasterModelGrid, CLOSED_BOUNDARY
from landlab import ModelParameterDictionary
from landlab.components.nonlinear_diffusion.Perron_nl_diffuse import PerronNLDiffuse
import pylab
import time
inputs = ModelParameterDictionary('./drive_perron_params.t... | mit |
wolfelee/luokr.com | www.luokr.com/app/ctrls/admin/posts.py | 1 | 10035 | #coding=utf-8
from admin import admin, AdminCtrl
class Admin_PostsCtrl(AdminCtrl):
@admin
def get(self):
pager = {}
pager['qnty'] = min(int(self.input('qnty', 10)), 50)
pager['page'] = max(int(self.input('page', 1)), 1)
pager['list'] = 0;
cur_posts = self.dbase('posts'... | bsd-3-clause |
whn09/tensorflow | tensorflow/contrib/graph_editor/tests/util_test.py | 154 | 6110 | # 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 |
Telestream/telestream-cloud-python-sdk | telestream_cloud_notifications_sdk/test/test_params.py | 1 | 1740 | # coding: utf-8
"""
Notifications API
Notifications # noqa: E501
The version of the OpenAPI document: 2.1.0
Contact: cloudsupport@telestream.net
Generated by: https://openapi-generator.tech
"""
from __future__ import absolute_import
import unittest
import datetime
import telestream_cloud_not... | mit |
ppqm/fitting | fitter/fit.py | 1 | 9239 |
import sklearn
import sklearn.model_selection
import time
import itertools
import functools
import multiprocessing as mp
import os
import subprocess
import time
import copy
import json
import numpy as np
import pandas as pd
from numpy.linalg import norm
from scipy.optimize import minimize
import rmsd
import joblib
... | cc0-1.0 |
TheWardoctor/Wardoctors-repo | script.module.nanscrapers/lib/nanscrapers/scraperplugins/streamthis.py | 6 | 3297 | import re
import requests
import difflib
import xbmc
from ..scraper import Scraper
from ..common import clean_title
User_Agent = 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:56.0) Gecko/20100101 Firefox/56.0'
headers = {'User-Agent':User_Agent}
class streamthis(Scraper):
domains = ['streamthis.tv']
name = "streamt... | apache-2.0 |
konstruktoid/ansible-upstream | lib/ansible/plugins/action/ce_template.py | 95 | 3891 | #
# Copyright 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... | gpl-3.0 |
Fat-Zer/FreeCAD_sf_master | src/Mod/Show/mTempoVis.py | 22 | 24926 | #/***************************************************************************
# * Copyright (c) Victor Titov (DeepSOIC) *
# * (vv.titov@gmail.com) 2016 *
# * *
# * Th... | lgpl-2.1 |
dillia23/code-dot-org | blockly-core/appengine/report.py | 22 | 1677 | """Blockly Demo: Report
Copyright 2012 Google Inc.
http://blockly.googlecode.com/
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 |
cheral/orange3 | Orange/tests/sql/test_filter.py | 11 | 32037 | # Test methods with long descriptive names can omit docstrings
# pylint: disable=missing-docstring
import unittest
from Orange.data.sql.table import SqlTable, SqlRowInstance
from Orange.data import filter, domain
from Orange.tests.sql.base import PostgresTest, sql_version, sql_test
@sql_test
class TestIsDefinedSql(... | bsd-2-clause |
laurentgo/pants | src/python/pants/java/nailgun_executor.py | 5 | 11618 | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import hashlib
impor... | apache-2.0 |
advancedplotting/aplot | python/plotserv/api_annotations.py | 1 | 8009 | # Copyright (c) 2014-2015, Heliosphere Research LLC
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of c... | bsd-3-clause |
waseem18/oh-mainline | vendor/packages/gdata/src/gdata/blogger/data.py | 61 | 4551 | #!/usr/bin/env python
#
# Copyright (C) 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 ... | agpl-3.0 |
henriquegemignani/randovania | randovania/gui/main_window.py | 1 | 25113 | import functools
import json
import logging
import os
import platform
import subprocess
from functools import partial
from pathlib import Path
from typing import Optional, List
from PySide2 import QtCore, QtWidgets, QtGui
from PySide2.QtCore import QUrl, Signal, Qt
from qasync import asyncSlot
from randovania import ... | gpl-3.0 |
imron/scalyr-agent-2 | scalyr_agent/third_party/requests/packages/__init__.py | 838 | 1384 | '''
Debian and other distributions "unbundle" requests' vendored dependencies, and
rewrite all imports to use the global versions of ``urllib3`` and ``chardet``.
The problem with this is that not only requests itself imports those
dependencies, but third-party code outside of the distros' control too.
In reaction to t... | apache-2.0 |
paran0ids0ul/infernal-twin | build/reportlab/src/reportlab/graphics/charts/doughnut.py | 28 | 15381 | #Copyright ReportLab Europe Ltd. 2000-2012
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/graphics/charts/doughnut.py
# doughnut chart
__version__=''' $Id$ '''
__doc__="""Doughnut chart
Produces a circular chart like the doughnut charts pr... | gpl-3.0 |
andim/scipy | scipy/optimize/tests/test_zeros.py | 59 | 1963 | #!/usr/bin/env python
from __future__ import division, print_function, absolute_import
from math import sqrt, exp, sin, cos
from numpy.testing import (TestCase, assert_almost_equal, assert_warns,
assert_, run_module_suite, assert_allclose)
from scipy.optimize import zeros as cc
from scipy.... | bsd-3-clause |
pexip/os-kombu | kombu/utils/imports.py | 5 | 2072 | """Import related utilities."""
from __future__ import absolute_import, unicode_literals
import importlib
import sys
from kombu.five import reraise, string_t
def symbol_by_name(name, aliases={}, imp=None, package=None,
sep='.', default=None, **kwargs):
"""Get symbol by qualified name.
Th... | bsd-3-clause |
mancoast/CPythonPyc_test | cpython/213_test_re.py | 5 | 12461 | import sys
sys.path = ['.'] + sys.path
from test_support import verify, verbose, TestFailed
import re
import sys, os, traceback
# Misc tests from Tim Peters' re.doc
if verbose:
print 'Running tests on re.search and re.match'
try:
verify(re.search('x*', 'axx').span(0) == (0, 0))
verify(re.search('x*', 'a... | gpl-3.0 |
maltsev/LatexWebOffice | app/views/document.py | 1 | 15983 | # -*- coding: utf-8 -*-
"""
* Purpose : Dokument- und Projektverwaltung Schnittstelle
* Creation Date : 19-11-2014
* Last Modified : Di 24 Feb 2015 15:46:51 CET
* Author : mattis
* Coauthors : christian, ingo, Kirill
* Sprintnumber : 2, 5
* Backlog entry : TEK1, 3ED9, DOK8, DO14, KOL1
"""
import os
from djang... | gpl-3.0 |
DavidNorman/tensorflow | tensorflow/python/tpu/session_support.py | 5 | 15060 | # Copyright 2017 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 |
psyonara/agonizomai | sermons/models.py | 1 | 5153 | from __future__ import unicode_literals
from django.db import models
from django.template.defaultfilters import slugify
from bible.models import BibleBook
from useraccounts.models import UserAccount
class Author(models.Model):
name = models.CharField(null=False, blank=False, max_length=50)
name_slug = model... | mit |
funshine/rpidemo | mqtt_oled/oled_test_luma.py | 1 | 1273 | #!/usr/bin/python/
# coding: utf-8
import time
import datetime
from luma.core.interface.serial import i2c, spi
from luma.core.render import canvas
from luma.oled.device import ssd1306, ssd1325, ssd1331, sh1106
def do_nothing(obj):
pass
# rev.1 users set port=0
# substitute spi(device=0, port=0) below if using t... | mit |
VikParuchuri/evolve-music | midi/sequencer_alsa/sequencer.py | 5 | 16997 | import select
import sequencer_alsa as S
import midi
__SWIG_NS_SET__ = set(['__class__', '__del__', '__delattr__', '__dict__', '__doc__', '__getattr__', '__getattribute__', '__hash__', '__init__', '__module__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', '__swig_getmethods__', '__sw... | agpl-3.0 |
zhjunlang/kbengine | kbe/src/lib/python/Lib/encodings/iso2022_jp_3.py | 816 | 1061 | #
# iso2022_jp_3.py: Python Unicode Codec for ISO2022_JP_3
#
# Written by Hye-Shik Chang <perky@FreeBSD.org>
#
import _codecs_iso2022, codecs
import _multibytecodec as mbc
codec = _codecs_iso2022.getcodec('iso2022_jp_3')
class Codec(codecs.Codec):
encode = codec.encode
decode = codec.decode
class Incrementa... | lgpl-3.0 |
sahiljain/catapult | third_party/gsutil/third_party/boto/boto/logs/layer1.py | 146 | 22588 | # Copyright (c) 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights ... | bsd-3-clause |
nathandunn/jbrowse | tests/selenium_tests/jbrowse_selenium/JBrowseTest.py | 2 | 12948 | import os
import time
import re
import unittest
from selenium import webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from selenium.common.exceptions import NoSuchEle... | lgpl-2.1 |
alfkjartan/nvgimu | nvg/maths/matrices.py | 2 | 6689 | """
Utilities for working with matrices.
"""
# Copyright (C) 2009-2011 University of Edinburgh
#
# This file is part of IMUSim.
#
# IMUSim 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 th... | gpl-3.0 |
ppries/tensorflow | tensorflow/contrib/bayesflow/python/kernel_tests/monte_carlo_test.py | 23 | 6678 | # 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 |
jantman/nagios-scripts | check_icinga_ido.py | 1 | 6939 | #!/usr/bin/env python
"""
Script to check last update of core programstatus
and service checks in Icinga ido2db Postgres database
"""
#
# The latest version of this script lives at:
# <https://github.com/jantman/nagios-scripts/blob/master/check_puppetdb_agent_run.py>
#
# Please file bug/feature requests and submit pat... | gpl-3.0 |
google/contentbox | third_party/requests/cookies.py | 821 | 16686 | # -*- coding: utf-8 -*-
"""
Compatibility code to be able to use `cookielib.CookieJar` with requests.
requests.utils imports from here, so be careful with imports.
"""
import time
import collections
from .compat import cookielib, urlparse, urlunparse, Morsel
try:
import threading
# grr, pyflakes: this fixes... | apache-2.0 |
tseaver/google-cloud-python | talent/google/cloud/talent_v4beta1/gapic/transports/event_service_grpc_transport.py | 2 | 4874 | # -*- coding: utf-8 -*-
#
# Copyright 2019 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 |
rpm-software-management/yum-utils | repomanage.py | 7 | 7043 | #!/usr/bin/python
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it w... | gpl-2.0 |
aslamplr/shorts | lib/oauthlib/oauth1/rfc5849/errors.py | 17 | 2326 | # coding=utf-8
"""
oauthlib.oauth2.rfc6749.errors
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error used both by OAuth 2 clients and provicers to represent the spec
defined error responses for all four core grant types.
"""
from __future__ import unicode_literals
from oauthlib.common import urlencode, add_params_to_uri
class O... | mit |
3DLIRIOUS/BlendSCAD | examples/example014.scad.py | 1 | 1763 | # OpenSCAD example, ported by Michael Mlivoncic
# a beautiful dice...
# an interesting test case, to get the Boolean operations somehow fixed (TODO)
#import sys
#sys.path.append("O:/BlenderStuff")
import blendscad
#import imp
#imp.reload(blendscad)
#imp.reload(blendscad.core)
#imp.reload(blendscad.primitives)
... | gpl-3.0 |
MrLoick/python-for-android | python-build/python-libs/gdata/build/lib/gdata/spreadsheet/__init__.py | 147 | 17942 | #!/usr/bin/python
#
# Copyright (C) 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | apache-2.0 |
codekaki/odoo | addons/project_issue/project_issue.py | 13 | 31772 | #-*- 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 |
Fusion-Rom/android_external_chromium_org | tools/export_tarball/export_v8_tarball.py | 118 | 3960 | #!/usr/bin/env python
# Copyright (c) 2011 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.
"""Creates a tarball with V8 sources, but without .svn directories.
This allows easy packaging of V8, synchronized with browser re... | bsd-3-clause |
XiaosongWei/chromium-crosswalk | components/test/data/autofill/merge/tools/serialize_profiles.py | 137 | 2606 | #!/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.
import os.path
import sqlite3
import sys
from autofill_merge_common import SerializeProfiles, ColumnNameToFieldType
def main():
""... | bsd-3-clause |
stackunderflow-stackptr/stackptr_web | crossbarconnect/client.py | 1 | 8527 | ###############################################################################
##
## Copyright (C) 2012-2014 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
##
#... | agpl-3.0 |
scorphus/django | django/contrib/sites/models.py | 316 | 3743 | from __future__ import unicode_literals
import string
from django.core.exceptions import ImproperlyConfigured, ValidationError
from django.db import models
from django.db.models.signals import pre_delete, pre_save
from django.http.request import split_domain_port
from django.utils.encoding import python_2_unicode_com... | bsd-3-clause |
lexyan/SickBeard | lib/hachoir_parser/audio/modplug.py | 90 | 10667 | """
Modplug metadata inserted into module files.
Doc:
- http://modplug.svn.sourceforge.net/viewvc/modplug/trunk/modplug/soundlib/
Author: Christophe GISQUET <christophe.gisquet@free.fr>
Creation: 10th February 2007
"""
from lib.hachoir_core.field import (FieldSet,
UInt32, UInt16, UInt8, Int8, Float32,
RawByt... | gpl-3.0 |
VahidooX/DeepCCA | objectives.py | 1 | 2281 | import theano.tensor as T
def cca_loss(outdim_size, use_all_singular_values):
"""
The main loss function (inner_cca_objective) is wrapped in this function due to
the constraints imposed by Keras on objective functions
"""
def inner_cca_objective(y_true, y_pred):
"""
It is the loss ... | mit |
nagyistoce/nips14-ssl | anglepy/paramgraphics.py | 5 | 6074 | import numpy as np
import os
import PIL.Image
import pylab
def save_images(images, directory, filename):
if not os.path.exists(directory):
os.makedirs(directory)
w = sum(i.size[0] for i in images)
mh = max(i.size[1] for i in images)
result = PIL.Image.new("RGBA", (w, mh))
x = 0
for i in... | mit |
PLyczkowski/Sticky-Keymap | 2.74/scripts/addons/EWOCprojects_tools/EWOCprojects_tools/__init__.py | 2 | 6870 | # ##### 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 distrib... | gpl-2.0 |
stshine/servo | tests/wpt/web-platform-tests/old-tests/webdriver/modal/alerts_test.py | 141 | 6347 | import os
import sys
import unittest
sys.path.insert(1, os.path.abspath(os.path.join(__file__, "../..")))
import base_test
from selenium.common import exceptions
from selenium.webdriver.support import wait
class AlertsTest(base_test.WebDriverBaseTest):
def setUp(self):
self.wait = wait.WebDriverWait(self.... | mpl-2.0 |
bdh1011/cupeye | venv/lib/python2.7/site-packages/werkzeug/utils.py | 148 | 23063 | # -*- coding: utf-8 -*-
"""
werkzeug.utils
~~~~~~~~~~~~~~
This module implements various utilities for WSGI applications. Most of
them are used by the request and response wrappers but especially for
middleware development it makes sense to use them without the wrappers.
:copyright: (c) 2014 ... | bsd-3-clause |
tersmitten/ansible | lib/ansible/modules/cloud/google/gcp_compute_interconnect_attachment.py | 4 | 18037 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
... | gpl-3.0 |
openstack/ironic | ironic/common/release_mappings.py | 1 | 12857 | # Copyright 2016 Intel 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 agr... | apache-2.0 |
p0cisk/Quantum-GIS | python/plugins/processing/algs/grass7/ext/i_gensigset.py | 7 | 1995 | # -*- coding: utf-8 -*-
"""
***************************************************************************
i_gensigset.py
--------------
Date : March 2016
Copyright : (C) 2016 by Médéric Ribreux
Email : medspx at medspx dot fr
*********************************... | gpl-2.0 |
childresslab/MicrocavityExp1 | gui/manager/managergui.py | 1 | 25022 | # -*- coding: utf-8 -*-
""" This module contains a GUI through which the Manager core class can be controlled.
It can load and reload modules, show the configuration, and re-open closed windows.
Qudi 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 |
meteorcloudy/tensorflow | tensorflow/contrib/all_reduce/__init__.py | 38 | 1466 | # 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 |
soylentdeen/BlurryApple | Tools/Gendron/gral_zer.py | 2 | 7113 | # -*- coding: utf-8 -*-
"""
Created on Fri Oct 24 16:52:46 2014
Mix of various routines around Zernike modes
@author: tristanbuey
"""
# Load libraries
import numpy as np;
def gammX(n, i0):
"""
gammX(n, i0)
Computes Noll matrix for derivatives of Zernike Gx.
The matrix applies on a Zerni... | gpl-2.0 |
lisael/pg-django | django/core/files/base.py | 78 | 3910 | import os
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
from django.utils.encoding import smart_str, smart_unicode
from django.core.files.utils import FileProxyMixin
class File(FileProxyMixin):
DEFAULT_CHUNK_SIZE = 64 * 2**10
def __init__(self, file, name=None)... | bsd-3-clause |
balloob/home-assistant | homeassistant/components/locative/__init__.py | 10 | 4327 | """Support for Locative."""
import logging
from typing import Dict
from aiohttp import web
import voluptuous as vol
from homeassistant.components.device_tracker import DOMAIN as DEVICE_TRACKER
from homeassistant.const import (
ATTR_ID,
ATTR_LATITUDE,
ATTR_LONGITUDE,
CONF_WEBHOOK_ID,
HTTP_OK,
H... | apache-2.0 |
googleads/googleads-python-lib | examples/ad_manager/v202011/activity_group_service/get_active_activity_groups.py | 1 | 1957 | #!/usr/bin/env python
#
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | apache-2.0 |
macioosch/dynamo-hard-spheres-sim | convergence-plot.py | 1 | 6346 | #!/usr/bin/env python2
# encoding=utf-8
from __future__ import division, print_function
from glob import glob
from itertools import izip
from matplotlib import pyplot as plt
import numpy as np
input_files = glob("csv/convergence-256000-0.*.csv")
#input_files = glob("csv/convergence-500000-0.*.csv")
#input_files = glo... | gpl-3.0 |
piffey/ansible | lib/ansible/modules/storage/netapp/na_cdot_user.py | 23 | 10225 | #!/usr/bin/python
# (c) 2017, NetApp, 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',
'status': ['preview'],
... | gpl-3.0 |
amdouglas/OpenPNM | OpenPNM/Geometry/models/throat_misc.py | 1 | 1124 | r"""
===============================================================================
throat_misc -- Miscillaneous and generic functions to apply to throats
===============================================================================
"""
import scipy as _sp
def random(geometry, seed=None, num_range=[0, 1], **kwar... | mit |
Digmaster/TicTacToe | Agent.py | 1 | 2030 | from random import randint
from random import getrandbits
from copy import deepcopy
# Agent that will either be the human player or a secondary agent for the dual agent play
class DumbAgent:
#initialize the board for the first player
def __init__(self, board):
self.board = board
def __str__(self):
return "Hi, ... | apache-2.0 |
boooka/GeoPowerOff | venv/lib/python2.7/site-packages/django/contrib/syndication/views.py | 74 | 8760 | from __future__ import unicode_literals
from calendar import timegm
from django.conf import settings
from django.contrib.sites.shortcuts import get_current_site
from django.core.exceptions import ImproperlyConfigured, ObjectDoesNotExist
from django.http import HttpResponse, Http404
from django.template import loader,... | apache-2.0 |
mfit/PdfTableAnnotator | script/csv-compare.py | 1 | 8051 | """
Copyright 2014 Matthias Frey
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 i... | apache-2.0 |
michael-dev2rights/ansible | lib/ansible/modules/database/mssql/mssql_db.py | 29 | 7066 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Vedit Firat Arig <firatarig@gmail.com>
# Outline and parts are reused from Mark Theunissen's mysql_db module
# 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_functi... | gpl-3.0 |
jshiv/turntable | test/lib/python2.7/site-packages/scipy/lib/lapack/tests/test_gesv.py | 13 | 3510 | from __future__ import division, print_function, absolute_import
import numpy as np
from numpy.testing import TestCase, assert_array_almost_equal, dec, \
assert_equal, assert_, run_module_suite
from common import FUNCS_TP, FLAPACK_IS_EMPTY, CLAPACK_IS_EMPTY, FUNCS_FLAPACK, \
... | mit |
Garrett-R/scikit-learn | sklearn/datasets/samples_generator.py | 14 | 54612 | """
Generate samples of synthetic data sets.
"""
# Authors: B. Thirion, G. Varoquaux, A. Gramfort, V. Michel, O. Grisel,
# G. Louppe, J. Nothman
# License: BSD 3 clause
import numbers
import warnings
import array
import numpy as np
from scipy import linalg
import scipy.sparse as sp
from ..preprocessing impo... | bsd-3-clause |
plotly/python-api | packages/python/plotly/plotly/graph_objs/scatterpolargl/hoverlabel/_font.py | 2 | 11245 | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "scatterpolargl.hoverlabel"
_path_str = "scatterpolargl.hoverlabel.font"
_valid_props = {"color... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.