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 |
|---|---|---|---|---|---|
askin/GNazar | GNazar/gnazar.py | 1 | 6314 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Licensed under GPL v2
# Copyright 2010, Aşkın Yollu <askin@askin.ws>
#
# 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 L... | gpl-2.0 |
pofallon/cassandra | pylib/cqlshlib/test/test_cqlsh_commands.py | 147 | 1243 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 |
laurmurclar/mitmproxy | mitmproxy/tools/console/flowview.py | 1 | 23737 | import math
import os
import sys
from functools import lru_cache
from typing import Optional, Union # noqa
import urwid
from mitmproxy import contentviews
from mitmproxy import exceptions
from mitmproxy import export
from mitmproxy import http
from mitmproxy.net.http import Headers
from mitmproxy.net.http import sta... | mit |
kuzmoyev/Google-Calendar-Simple-API | tests/test_attachment.py | 1 | 3788 | from unittest import TestCase
from gcsa.attachment import Attachment
from gcsa.serializers.attachment_serializer import AttachmentSerializer
DOC_URL = 'https://docs.google.com/document/d/1uDvwcxOsXkzl2Bod0YIfrIQ5MqfBhnc1jusYdH1xCZo/edit?usp=sharing'
class TestAttachment(TestCase):
def test_create(self):
... | mit |
ghosteyezz/my-linux-kernel-study | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py | 11088 | 3246 | # Core.py - Python extension for perf script, core functions
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
from collections import defaultdict
def aut... | gpl-2.0 |
radoondas/apachebeat | vendor/github.com/elastic/beats/topbeat/tests/system/test_filtering.py | 6 | 4127 | from topbeat import BaseTest
"""
Contains tests for filtering.
"""
class Test(BaseTest):
def test_dropfields(self):
"""
Check drop_fields filtering action
"""
self.render_config_template(
system_stats=False,
process_stats=True,
filesystem_stats=... | apache-2.0 |
dgellis90/nipype | nipype/interfaces/slicer/filtering/extractskeleton.py | 10 | 2303 | # -*- coding: utf8 -*-
"""Autogenerated file - DO NOT EDIT
If you spot a bug, please report it on the mailing list and/or change the generator."""
from nipype.interfaces.base import CommandLine, CommandLineInputSpec, SEMLikeCommandLine, TraitedSpec, File, Directory, traits, isdefined, InputMultiPath, OutputMultiPath
i... | bsd-3-clause |
michaelpacer/networkx | networkx/algorithms/components/tests/test_semiconnected.py | 64 | 1901 | from itertools import chain
import networkx as nx
from nose.tools import *
class TestIsSemiconnected(object):
def test_undirected(self):
assert_raises(nx.NetworkXNotImplemented, nx.is_semiconnected,
nx.Graph())
assert_raises(nx.NetworkXNotImplemented, nx.is_semiconnected,
... | bsd-3-clause |
foss-transportationmodeling/rettina-server | flask/local/lib/python2.7/site-packages/jinja2/testsuite/inheritance.py | 414 | 8248 | # -*- coding: utf-8 -*-
"""
jinja2.testsuite.inheritance
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tests the template inheritance feature.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import unittest
from jinja2.testsuite import JinjaTestCase
from jinja2 import Env... | apache-2.0 |
goddardl/cortex | python/IECoreRI/__init__.py | 7 | 1918 | ##########################################################################
#
# Copyright (c) 2007, Image Engine Design 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:
#
# * Redistribu... | bsd-3-clause |
cvium/Flexget | tests/test_api.py | 2 | 7511 | import json
import os
from mock import patch
from flexget import __version__
from flexget.api import app, __version__ as __api_version__
from flexget.manager import Manager
from flexget.utils.database import with_session
from flexget.webserver import User
from tests import FlexGetBase, MockManager
@with_session
de... | mit |
andfoy/margffoy-tuay-server | env/lib/python2.7/site-packages/Mezzanine-3.1.10-py2.7.egg/mezzanine/utils/html.py | 13 | 3585 | from __future__ import absolute_import, unicode_literals
from future.builtins import chr, int, str
try:
from html.parser import HTMLParser, HTMLParseError
from html.entities import name2codepoint
except ImportError: # Python 2
from HTMLParser import HTMLParser, HTMLParseError
from htmlentitydefs impor... | gpl-2.0 |
egafford/sahara | sahara/plugins/cdh/health.py | 2 | 5255 | # Copyright (c) 2016 Mirantis 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 writ... | apache-2.0 |
twitchyliquid64/misc-scripts | s3tool/boto-develop/tests/integration/s3/test_multidelete.py | 25 | 6770 | # -*- coding: utf-8 -*-
# Copyright (c) 2011 Mitch Garnaat http://garnaat.org/
# 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
# witho... | mit |
ryfeus/lambda-packs | Tensorflow/source/tensorflow/contrib/nccl/python/ops/nccl_ops.py | 9 | 8253 | # 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... | mit |
makelove/OpenCV-Python-Tutorial | 官方samples/feature_homography.py | 6 | 2798 | #!/usr/bin/env python
'''
Feature homography
==================
Example of using features2d framework for interactive video homography matching.
ORB features and FLANN matcher are used. The actual tracking is implemented by
PlaneTracker class in plane_tracker.py
Inspired by http://www.youtube.com/watch?v=-ZNYoL8rzPY... | mit |
james-dibble/Embedded-Systems-Assignment | EmbeddedSystems.Applications/EmbeddedSystems.Client/jsoncpp-src-0.6.0-rc2/scons-local-1.2.0/SCons/Tool/tlib.py | 12 | 1761 | """SCons.Tool.tlib
XXX
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation
#
# 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, incl... | mit |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/operations/_web_application_firewall_policies_operations.py | 1 | 20908 | # 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 may ... | mit |
beckastar/django | django/contrib/auth/tests/test_forms.py | 13 | 19785 | from __future__ import unicode_literals
import os
import re
from django import forms
from django.contrib.auth import get_user_model
from django.contrib.auth.models import User
from django.contrib.auth.forms import (UserCreationForm, AuthenticationForm,
PasswordChangeForm, SetPasswordForm, UserChangeForm, Password... | bsd-3-clause |
imbugs/stock-3 | common/basic.py | 2 | 2604 | import datetime as dt
import re
# Progress calculation and printing
class Progress(object):
def __init__(self, maximum):
self.maximum = maximum
self.last_percent = 0
def show(self, current):
percent = round(current/self.maximum * 100)
if percent > self.last_percent:
... | gpl-3.0 |
abhinavsingh/proxy.py | examples/websocket_client.py | 1 | 1465 | # -*- coding: utf-8 -*-
"""
proxy.py
~~~~~~~~
⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on
Network monitoring, controls & Application development, testing, debugging.
:copyright: (c) 2013-present by Abhinav Singh and contributors.
:license: BSD, see LICENSE... | bsd-3-clause |
demarle/VTK | Common/DataModel/Testing/Python/scalarConn.py | 20 | 1863 | #!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# Quadric definition
quadric = vtk.vtkQuadric()
quadric.SetCoefficients([.5,1,.2,0,.1,0,0,.2,0,0])
sample = vtk.vtkSampleFunction()
sample.SetSampleDimensions(30,30,30)
sample.SetImpl... | bsd-3-clause |
zjj/trac_hack | contrib/sourceforge2trac.py | 2 | 24160 | """
Import a Sourceforge project's tracker items into a Trac database.
Requires:
Trac 0.11 from http://trac.edgewall.org/
Python 2.5 from http://www.python.org/
The Sourceforge tracker items can be exported from the 'Backup' page
of the project admin section. Substitute XXXXX with project id:
https:/... | bsd-3-clause |
InsomniaAOSP/platform_kernel_htc_m7 | tools/perf/scripts/python/netdev-times.py | 11271 | 15048 | # Display a process of packets and processed time.
# It helps us to investigate networking or network device.
#
# options
# tx: show only tx chart
# rx: show only rx chart
# dev=: show only thing related to specified device
# debug: work with debug mode. It shows buffer status.
import os
import sys
sys.path.append(os... | gpl-2.0 |
sebalas/fake-useragent | fake_useragent/utils.py | 1 | 2970 | import os
import re
from . import settings
try: # Python 2
from urllib import urlopen, quote_plus
except ImportError: # Python 3
from urllib.request import urlopen
from urllib.parse import quote_plus
try:
import json
except ImportError:
import simplejson as json
def get(url, annex=None):
i... | apache-2.0 |
Daeinar/norx-py | norx.py | 1 | 7942 | """
Python2 implementation of NORX.
------
:author: Philipp Jovanovic <philipp@jovanovic.io>, 2014-2015.
:license: CC0, see LICENSE for more details.
"""
from struct import pack, unpack
class NORX(object):
def __init__(self, w=64, r=4, d=1, t=256):
assert w in [32, 64]
assert r >= 1... | cc0-1.0 |
EconForge/Smolyak | doc/sphinxext/docscrape_sphinx.py | 62 | 7703 | import re, inspect, textwrap, pydoc
import sphinx
from docscrape import NumpyDocString, FunctionDoc, ClassDoc
class SphinxDocString(NumpyDocString):
def __init__(self, docstring, config={}):
self.use_plots = config.get('use_plots', False)
NumpyDocString.__init__(self, docstring, config=config)
... | mit |
lanen/youtube-dl | youtube_dl/extractor/beeg.py | 103 | 2066 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
class BeegIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?beeg\.com/(?P<id>\d+)'
_TEST = {
'url': 'http://beeg.com/5416503',
'md5': '1bff67111adb785c51d1b42959ec10e5',
'info_dict': {
... | unlicense |
timfreund/pycontrol-shed | pycontrolshed/model.py | 1 | 13233 | # Copyright (C) 2011 Tim Freund and contributors.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from functools import wraps
from pycontrol import pycontrol
import logging
import pycontrolshed
import socket
# In [1]: route_domai... | gpl-2.0 |
CarbonWolf/aff4 | scons-local-1.2.0/SCons/Tool/cvf.py | 12 | 2393 | """engine.SCons.Tool.cvf
Tool-specific initialization for the Compaq Visual Fortran compiler.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation file... | gpl-3.0 |
tntnatbry/tensorflow | tensorflow/user_ops/ackermann_test.py | 148 | 1394 | # 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 |
pombredanne/algos-urv | django/utils/version.py | 13 | 1403 | import django
import os.path
import re
def get_svn_revision(path=None):
"""
Returns the SVN revision in the form SVN-XXXX,
where XXXX is the revision number.
Returns SVN-unknown if anything goes wrong, such as an unexpected
format of internal SVN files.
If path is provided, it sho... | bsd-3-clause |
vanaf/mirrormanager-rfremix | mirrorlist-server/test/server_tester.py | 3 | 2120 | #!/usr/bin/python
#
# Copyright (c) 2007-2013 Dell, Inc.
# by Matt Domsch <Matt_Domsch@dell.com>
# Licensed under the MIT/X11 license
import socket, os
import cPickle as pickle
from string import zfill, atoi
from datetime import datetime
socketfile = '/var/run/mirrormanager/mirrorlist_server.sock'
pid = os.getpid()... | gpl-2.0 |
abhattad4/Digi-Menu | build/lib.linux-x86_64-2.7/django/db/migrations/questioner.py | 119 | 7690 | from __future__ import print_function, unicode_literals
import importlib
import os
import sys
from django.apps import apps
from django.db.models.fields import NOT_PROVIDED
from django.utils import datetime_safe, six, timezone
from django.utils.six.moves import input
from .loader import MIGRATIONS_MODULE_NAME
class... | bsd-3-clause |
GorK-ChO/selenium | py/conftest.py | 7 | 7314 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache-2.0 |
joergkappes/opengm | src/interfaces/python/examples/python_visitor_gui.py | 14 | 1377 | """
Usage: python_visitor_gui.py
This script shows how one can implement visitors
in pure python and inject them into OpenGM solver.
( not all OpenGM solvers support this kind of
code injection )
"""
import opengm
import numpy
import matplotlib
from matplotlib import pyplot as plt
shape=[100,100]
numLabels=... | mit |
chriskuehl/pre-commit-1 | tests/commands/run_test.py | 4 | 15170 | # -*- coding: UTF-8 -*-
from __future__ import unicode_literals
import functools
import io
import os
import os.path
import subprocess
import sys
import mock
import pytest
from pre_commit.commands.install_uninstall import install
from pre_commit.commands.run import _get_skips
from pre_commit.commands.run import _has_... | mit |
debugger22/sympy | sympy/concrete/summations.py | 7 | 24851 | from __future__ import print_function, division
from sympy.concrete.expr_with_limits import AddWithLimits
from sympy.concrete.expr_with_intlimits import ExprWithIntLimits
from sympy.core.function import Derivative
from sympy.core.relational import Eq
from sympy.core.singleton import S
from sympy.core.symbol import Dum... | bsd-3-clause |
Theshadow4all/ShadowCoin | test/functional/nulldummy.py | 11 | 6540 | #!/usr/bin/env python3
# Copyright (c) 2016 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 NULLDUMMY softfork.
Connect to a single node.
Generate 2 blocks (save the coinbases for later).
Genera... | mit |
Javiercerna/MissionPlanner | Lib/distutils/errors.py | 59 | 3582 | """distutils.errors
Provides exceptions used by the Distutils modules. Note that Distutils
modules may raise standard exceptions; in particular, SystemExit is
usually raised for errors that are obviously the end-user's fault
(eg. bad command-line arguments).
This module is safe to use in "from ... import *" m... | gpl-3.0 |
airodactyl/qutebrowser | tests/helpers/messagemock.py | 4 | 2576 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser 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 S... | gpl-3.0 |
ehirt/odoo | addons/l10n_be/wizard/__init__.py | 438 | 1145 | # -*- 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 |
wonder-sk/inasafe | safe/impact_functions/earthquake/itb_earthquake_fatality_model/impact_function.py | 2 | 14889 | # coding=utf-8
"""InaSAFE Disaster risk tool by Australian Aid - ITB Earthquake
Impact Function on Population.
Contact : ole.moller.nielsen@gmail.com
.. note:: 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 S... | gpl-3.0 |
ChristineLaMuse/mozillians | vendor-local/lib/python/celery/backends/base.py | 14 | 15413 | # -*- coding: utf-8 -*-
"""celery.backends.base"""
from __future__ import absolute_import
import time
import sys
from datetime import timedelta
from kombu import serialization
from .. import states
from ..datastructures import LRUCache
from ..exceptions import TimeoutError, TaskRevokedError
from ..utils import time... | bsd-3-clause |
skob/alerta | setup.py | 1 | 1622 | #!/usr/bin/env python
import setuptools
with open('VERSION') as f:
version = f.read().strip()
with open('README.md') as f:
readme = f.read()
setuptools.setup(
name='alerta-server',
version=version,
description='Alerta server WSGI application',
long_description=readme,
url='https://github... | apache-2.0 |
rouault/mapnik | scons/scons-local-2.3.4/SCons/Tool/docbook/__init__.py | 20 | 30069 |
"""SCons.Tool.docbook
Tool-specific initialization for Docbook.
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-7,2010 The SCons Foundation
#
# Permission is hereby granted, free of c... | lgpl-2.1 |
nttcom/eclcli | eclcli/api/auth_plugin.py | 3 | 3732 | # 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, software
# distrib... | apache-2.0 |
Scratchcat1/AATC | flask_app/Flask_Test_App.py | 1 | 5816 | from flask import Flask, flash, redirect, render_template, request, session, abort
import random,os,ast,prettytable
from flask_app import forms
import AATC_Server_002 as AATC_Server
import HedaBot
COMMANDS = HedaBot.CreateCommandDictionary()
COMMANDS["AddFlight"][2]["Type"] = lambda x: HedaBot.SplitWaypoints(x,... | gpl-3.0 |
ragupta-git/ImcSdk | imcsdk/mometa/comm/CommSnmp.py | 1 | 8759 | """This module contains the general information for CommSnmp ManagedObject."""
from ...imcmo import ManagedObject
from ...imccoremeta import MoPropertyMeta, MoMeta
from ...imcmeta import VersionMeta
class CommSnmpConsts:
ADMIN_STATE_DISABLED = "disabled"
ADMIN_STATE_ENABLED = "enabled"
COM2_SEC_NONE = "N... | apache-2.0 |
havt/odoo | addons/analytic_contract_hr_expense/analytic_contract_hr_expense.py | 223 | 7860 | # -*- 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 |
homework/nox | src/nox/netapps/tests/pyunittests/dhcp_parse_test.py | 10 | 4271 | # Copyright 2008 (C) Nicira, Inc.
#
# This file is part of NOX.
#
# 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 d... | gpl-3.0 |
HyperloopTeam/FullOpenMDAO | lib/python2.7/site-packages/traits-4.3.0-py2.7-macosx-10.10-x86_64.egg/traits/tests/dict_test_case.py | 1 | 3621 | #------------------------------------------------------------------------------
#
# Copyright (c) 2007, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in /LICENSE.txt and may be redistributed only
# under the conditions described ... | gpl-2.0 |
azaghal/ansible | test/units/module_utils/common/text/converters/test_to_str.py | 27 | 2519 | # -*- coding: utf-8 -*-
# (c) 2016 Toshio Kuratomi <tkuratomi@ansible.com>
# Copyright (c) 2017 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import itertools
import py... | gpl-3.0 |
mcking49/apache-flask | Python/Lib/site-packages/pip/_vendor/distlib/version.py | 132 | 23711 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2016 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""
Implementation of a flexible versioning scheme providing support for PEP-440,
setuptools-compatible and semantic versioning.
"""
import logging
import re
from .compat import string_types
... | mit |
furbrain/Coherence | misc/Nautilus/coherence_upnp_upload_extension.py | 2 | 3477 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Licensed under the MIT license
# http://opensource.org/licenses/mit-license.php
# Copyright 2008 Frank Scholz <coherence@beebits.net>
""" Coherence and Nautilus bridge to upload files into a DLNA/UPnP MediaServer
usable as Nautilus Extension or a Script
for use a... | mit |
wemanuel/smry | smry/server-auth/ls/google-cloud-sdk/platform/gsutil/third_party/boto/tests/integration/ec2/autoscale/__init__.py | 114 | 1098 | # Copyright (c) 2011 Reza Lotun http://reza.lotun.name
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, m... | apache-2.0 |
linuxipho/mycroft-core | mycroft/configuration/config.py | 1 | 8186 |
# Copyright 2017 Mycroft AI 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 writi... | apache-2.0 |
zaw9c1/p2pool | nattraverso/utils.py | 288 | 1563 | """
Various utility functions used in the nattraverso package.
@author: Raphael Slinckx
@copyright: Copyright 2005
@license: LGPL
@contact: U{raphael@slinckx.net<mailto:raphael@slinckx.net>}
@version: 0.1.0
"""
__revision__ = "$id"
def is_rfc1918_ip(ip):
"""
Checks if the given ip address is a rfc1918 one.
... | gpl-3.0 |
seewindcn/tortoisehg | src/mercurial/py3kcompat.py | 2 | 2156 | # py3kcompat.py - compatibility definitions for running hg in py3k
#
# Copyright 2010 Renato Cunha <renatoc@gmail.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from __future__ import absolute_import
import builtins
import ... | gpl-2.0 |
wevote/WebAppPublic | apis_v1/documentation_source/positions_count_for_one_ballot_item_doc.py | 1 | 2560 | # apis_v1/documentation_source/positions_count_for_one_ballot_item_doc.py
# Brought to you by We Vote. Be good.
# -*- coding: UTF-8 -*-
def positions_count_for_one_ballot_item_doc_template_values(url_root):
"""
Show documentation about positionsCountForOneBallotItem
"""
required_query_parameter_list =... | bsd-3-clause |
Glyfina-Fernando/pymtl | pisa/pisa_inst_andi_test.py | 4 | 3873 | #=========================================================================
# pisa_andi_test.py
#=========================================================================
import pytest
import random
import pisa_encoding
from pymtl import Bits, sext, zext
from PisaSim import PisaSim
from pisa_inst_test_utils import ... | bsd-3-clause |
djvoleur/V_925R4_BOF7 | tools/perf/scripts/python/event_analyzing_sample.py | 4719 | 7393 | # event_analyzing_sample.py: general event handler in python
#
# Current perf report is already very powerful with the annotation integrated,
# and this script is not trying to be as powerful as perf report, but
# providing end user/developer a flexible way to analyze the events other
# than trace points.
#
# The 2 dat... | gpl-2.0 |
kubermatic/kubernetes | cluster/juju/layers/kubeapi-load-balancer/reactive/load_balancer.py | 39 | 7034 | #!/usr/bin/env python
# Copyright 2015 The Kubernetes Authors.
#
# 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 appli... | apache-2.0 |
nhuntwalker/astroML | setup.py | 3 | 2016 | from distutils.core import setup
DESCRIPTION = "tools for machine learning and data mining in Astronomy"
LONG_DESCRIPTION = open('README.rst').read()
NAME = "astroML"
AUTHOR = "Jake VanderPlas"
AUTHOR_EMAIL = "vanderplas@astro.washington.edu"
MAINTAINER = "Jake VanderPlas"
MAINTAINER_EMAIL = "vanderplas@astro.washingt... | bsd-2-clause |
bregman-arie/ansible | lib/ansible/parsing/dataloader.py | 11 | 18574 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
# Copyright: (c) 2017, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# Make coding more python3-ish
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import c... | gpl-3.0 |
a-doumoulakis/tensorflow | tensorflow/compiler/tests/conv2d_test.py | 35 | 14570 | # 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 |
longde123/MultiversePlatform | server/config/common/character_factory.py | 1 | 4399 | #
# The Multiverse Platform is made available under the MIT License.
#
# Copyright (c) 2012 The Multiverse Foundation
#
# 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 restrict... | mit |
datadesk/panda | panda/migrations/0018_auto__add_field_taskstatus_task_description.py | 6 | 13100 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'TaskStatus.task_description'
db.add_column('panda_taskstatus', 'task_description',
... | mit |
uschmidt83/SublimeLinter-for-ST2 | sublimelinter/modules/notes.py | 9 | 2249 | '''notes.py
Used to highlight user-defined "annotations" such as TODO, README, etc.,
depending user choice.
'''
import sublime
from base_linter import BaseLinter
CONFIG = {
'language': 'Annotations'
}
class Linter(BaseLinter):
DEFAULT_NOTES = ["TODO", "README", "FIXME"]
def built_in_check(self, view,... | mit |
avinashkunuje/phantomjs | src/qt/qtwebkit/Tools/BuildSlaveSupport/build.webkit.org-config/htdigestparser.py | 123 | 2341 | # Copyright (C) 2011 Apple 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:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | bsd-3-clause |
ice9js/servo | tests/wpt/web-platform-tests/old-tests/webdriver/windows/window_manipulation.py | 142 | 1556 | # -*- mode: python; fill-column: 100; comment-column: 100; -*-
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
class WindowingTest(base_test.WebDriverBaseTest):
def test_maximize(self):
#sel... | mpl-2.0 |
shoopio/shoop | shuup/importer/admin_module/import_views.py | 1 | 7325 | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2019, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import hashlib
import logging
import os
from datetime import datet... | agpl-3.0 |
davidcusatis/horizon | openstack_dashboard/dashboards/admin/volumes/volumes/forms.py | 12 | 10196 | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the... | apache-2.0 |
navotsil/Open-Knesset | laws/migrations/0027_auto__add_candidatelistvotingstatistics.py | 14 | 36983 | # -*- 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):
depends_on = (
('polyorg','0001_initial'),
)
def forwards(self, orm):
# Adding model 'Can... | bsd-3-clause |
manjunaths/tensorflow | tensorflow/contrib/learn/python/learn/estimators/dynamic_rnn_estimator_test.py | 11 | 32370 | # 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 |
Universal-Model-Converter/UMC3.0a | data/Python/x86/Lib/site-packages/OpenGL/raw/GL/EXT/draw_range_elements.py | 3 | 1132 | '''OpenGL extension EXT.draw_range_elements
Automatically generated by the get_gl_extensions script, do not edit!
'''
from OpenGL import platform, constants, constant, arrays
from OpenGL import extensions
from OpenGL.GL import glget
import ctypes
EXTENSION_NAME = 'GL_EXT_draw_range_elements'
_DEPRECATED = False
GL_MAX... | mit |
zhangpf/vbox | src/VBox/Additions/common/crOpenGL/pack/packspu_beginend.py | 21 | 4869 | # Copyright (c) 2001, Stanford University
# All rights reserved.
#
# See the file LICENSE.txt for information on redistributing this software.
import sys
import apiutil
apiutil.CopyrightC()
print """/* DO NOT EDIT - AUTOMATICALLY GENERATED BY packspu_beginend.py */
#include "packspu.h"
#include "assert.h"
#include... | gpl-2.0 |
PeridotYouClod/gRPC-Makerboards | generated/proto_out/sensors_pb2_grpc.py | 1 | 20413 | # Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
import generated.proto_out.sensors_pb2 as sensors__pb2
class FrontEndStub(object):
"""http://www.grpc.io/docs/guides/concepts.html is good reference for #tags
#FrontEnd #Simple
The FrontEnd server is the endpoint that most clien... | mit |
skirpichev/omg | diofant/vector/dyadic.py | 1 | 8076 | from ..core import AtomicExpr, Integer, Pow
from ..matrices import ImmutableMatrix
from .basisdependent import (BasisDependent, BasisDependentAdd,
BasisDependentMul, BasisDependentZero)
class Dyadic(BasisDependent):
"""
Super class for all Dyadic-classes.
References
=====... | bsd-3-clause |
UCBerkeleySETI/blimpy | blimpy/plotting/plot_time_series.py | 1 | 1628 | from .config import *
from ..utils import rebin, db
from .plot_utils import calc_extent
def plot_time_series(wf, f_start=None, f_stop=None, if_id=0, logged=True, orientation='h', MJD_time=False, **kwargs):
""" Plot the time series.
Args:
f_start (float): start frequency, in MHz
f_stop (float)... | bsd-3-clause |
taestone/opennmt_merge | benchmark/getTests.py | 8 | 2786 | import requests
import argparse
import sys
import time
from datetime import date
import os
import json
import subprocess
import re
url = 'http://scorer.nmt-benchmark.net'
def main(args):
scriptpath=os.path.dirname(os.path.realpath(__file__))
parser = argparse.ArgumentParser(description='Benchmark test downlo... | mit |
Servir-Mekong/SurfaceWaterTool | lib/oauth2client/contrib/gce.py | 39 | 5431 | # Copyright 2014 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 required by applicable law or ... | gpl-3.0 |
adityacs/ansible | lib/ansible/modules/system/pamd.py | 16 | 20236 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Kenneth D. Evensen <kevensen@redhat.com>
#
# This file is part of Ansible (sort of)
#
# 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 vers... | gpl-3.0 |
fillycheezstake/MissionPlanner | Lib/email/iterators.py | 68 | 2275 | # Copyright (C) 2001-2006 Python Software Foundation
# Author: Barry Warsaw
# Contact: email-sig@python.org
"""Various types of useful iterators and generators."""
__all__ = [
'body_line_iterator',
'typed_subpart_iterator',
'walk',
# Do not include _structure() since it's part of the debuggi... | gpl-3.0 |
nozuono/calibre-webserver | src/calibre/ebooks/mobi/reader/ncx.py | 9 | 3485 | #!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2012, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import os
fro... | gpl-3.0 |
aplicatii-romanesti/allinclusive-kodi-pi | .kodi/userdata/addon_data/plugin.video.p2p-streams/acestream/ace/python-modules/M2Crypto/X509.py | 8 | 34646 | """M2Crypto wrapper for OpenSSL X509 API.
Copyright (c) 1999-2004 Ng Pheng Siong. All rights reserved.
Portions created by Open Source Applications Foundation (OSAF) are
Copyright (C) 2004-2007 OSAF. All Rights Reserved.
Author: Heikki Toivonen
"""
# M2Crypto
from M2Crypto import ASN1, BIO, Err, EVP, util
import m2
... | apache-2.0 |
ojengwa/osmc | package/mediacenter-skin-osmc/files/usr/share/kodi/addons/script.module.unidecode/lib/unidecode/x063.py | 252 | 4656 | data = (
'Bo ', # 0x00
'Chi ', # 0x01
'Gua ', # 0x02
'Zhi ', # 0x03
'Kuo ', # 0x04
'Duo ', # 0x05
'Duo ', # 0x06
'Zhi ', # 0x07
'Qie ', # 0x08
'An ', # 0x09
'Nong ', # 0x0a
'Zhen ', # 0x0b
'Ge ', # 0x0c
'Jiao ', # 0x0d
'Ku ', # 0x0e
'Dong ', # 0x0f
'Ru ', # 0x10
'Tiao ... | gpl-2.0 |
ragi14121989/plugin.video.live.ragi14 | pyaes.py | 189 | 16661 | """Simple AES cipher implementation in pure Python following PEP-272 API
Homepage: https://bitbucket.org/intgr/pyaes/
The goal of this module is to be as fast as reasonable in Python while still
being Pythonic and readable/understandable. It is licensed under the permissive
MIT license.
Hopefully the code is readabl... | gpl-2.0 |
JianyuWang/neutron | neutron/openstack/common/cache/cache.py | 28 | 2932 | # Copyright 2013 Red Hat, 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 agre... | apache-2.0 |
AndrewPeelMV/Blender2.78c | 2.78/scripts/addons/add_curve_extra_objects/add_curve_spirals.py | 2 | 13345 | '''bl_info = {
"name": "Spirals",
"description": "Make spirals",
"author": "Alejandro Omar Chocano Vasquez",
"version": (1, 2),
"blender": (2, 62, 0),
"location": "View3D > Add > Curve",
"warning": "", # used for warning icon and text in addons panel
"wiki_url": "http://wiki.blender.org/... | gpl-2.0 |
betoesquivel/fil2014 | build/django/django/contrib/gis/geos/tests/test_geos_mutation.py | 109 | 5305 | # Copyright (c) 2008-2009 Aryeh Leib Taurog, all rights reserved.
# Modified from original contribution by Aryeh Leib Taurog, which was
# released under the New BSD license.
from django.utils import unittest
from django.utils.unittest import skipUnless
from .. import HAS_GEOS
if HAS_GEOS:
from .. import *
fr... | mit |
beatrizjesus/my-first-blog | pasta/Lib/site-packages/django/db/models/fields/__init__.py | 77 | 89087 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import collections
import copy
import datetime
import decimal
import math
import uuid
import warnings
from base64 import b64decode, b64encode
from itertools import tee
from django.apps import apps
from django.db import connection
from django.db.models.lo... | mit |
avilaton/sqlalchemy-continuum | tests/test_delete.py | 5 | 1356 | import sqlalchemy as sa
from tests import TestCase
class TestDelete(TestCase):
def _delete(self):
article = self.Article()
article.name = u'Some article'
article.content = u'Some content'
self.session.add(article)
self.session.commit()
self.session.delete(article)
... | bsd-3-clause |
garyjyao1/ansible | lib/ansible/modules/core/cloud/digital_ocean/digital_ocean.py | 121 | 14578 | #!/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 |
openstack/horizon | openstack_dashboard/dashboards/admin/volumes/forms.py | 1 | 10388 | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the... | apache-2.0 |
ijmarshall/robotreviewer3 | robotreviewer/robots/rationale_robot.py | 1 | 13649 | """
the BiasRobot class takes the full text of a clinical trial as
input as a robotreviewer.data_structures.MultiDict, and returns
bias information in the same format, which can easily be converted
to JSON.
there are multiple ways to build a MultiDict, however the most common
way used in this project is as a PDF binar... | gpl-3.0 |
kapiziak/mtasa-blue | vendor/google-breakpad/src/testing/gtest/xcode/Scripts/versiongenerate.py | 3088 | 4536 | #!/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-3.0 |
AladdinSonni/phantomjs | src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/steps/ensurebugisopenandassigned.py | 135 | 2061 | # 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 |
CristinaCristescu/root | bindings/pyroot/JupyROOT/kernel/magics/jsrootmagic.py | 27 | 1240 | # -*- coding:utf-8 -*-
#-----------------------------------------------------------------------------
# Copyright (c) 2016, ROOT Team.
# Authors: Danilo Piparo <Danilo.Piparo@cern.ch> CERN
#-----------------------------------------------------------------------------
from JupyROOT.utils import enableJSVis, disableJS... | lgpl-2.1 |
MihaiMoldovanu/ansible | lib/ansible/plugins/connection/zone.py | 21 | 7937 | # Based on local.py (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
# and chroot.py (c) 2013, Maykel Moya <mmoya@speedyrails.com>
# and jail.py (c) 2013, Michael Scherer <misc@zarb.org>
# (c) 2015, Dagobert Michelsen <dam@baltic-online.de>
# (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com>
# Copyright (c... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.