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 |
|---|---|---|---|---|---|
KiranSurath/Audacity-Endeavoru | tools/perf/scripts/python/sched-migration.py | 11215 | 11670 | #!/usr/bin/python
#
# Cpu task migration overview toy
#
# Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com>
#
# perf script event handlers have been generated by perf script -g python
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Fre... | gpl-2.0 |
thesuperzapper/tensorflow | tensorflow/python/kernel_tests/resource_variable_ops_test.py | 16 | 10281 | # 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 |
simongoffin/website_version | openerp/addons/base/ir/ir_default.py | 342 | 1883 | # -*- 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... | agpl-3.0 |
redtocatta/paycoin | share/qt/make_spinner.py | 4415 | 1035 | #!/usr/bin/env python
# W.J. van der Laan, 2011
# Make spinning .mng animation from a .png
# Requires imagemagick 6.7+
from __future__ import division
from os import path
from PIL import Image
from subprocess import Popen
SRC='img/reload_scaled.png'
DST='../../src/qt/res/movies/update_spinner.mng'
TMPDIR='/tmp'
TMPNAM... | mit |
aewhatley/scikit-learn | examples/linear_model/plot_sgd_separating_hyperplane.py | 260 | 1219 | """
=========================================
SGD: Maximum margin separating hyperplane
=========================================
Plot the maximum margin separating hyperplane within a two-class
separable dataset using a linear Support Vector Machines classifier
trained using SGD.
"""
print(__doc__)
import numpy as n... | bsd-3-clause |
ddolzhenko/jacis | jacis/plugins/sync.py | 1 | 2555 | # Copyright (c) 2016 Dmitry Dolzhenko
# 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, merge, publish, dis... | mit |
steventimberman/masterDebater | venv/lib/python2.7/site-packages/pbr/find_package.py | 101 | 1043 | # 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/LICENSE-2.0
#
# Unles... | mit |
hellais/libdnet | python/test.py | 14 | 8525 | #!/usr/bin/env python
import sys, unittest
sys.path.insert(0, './build')
import dnet
class AddrTestCase(unittest.TestCase):
def test_addr_cmp(self):
for atxt in ('1.2.3.0', '0:d:e:a:d:0', 'fe::ed:fa:ce:0'):
a = dnet.addr(atxt)
b = dnet.addr(atxt)
assert a == b
... | bsd-3-clause |
eepalms/gem5-newcache | src/arch/x86/isa/insts/system/undefined_operation.py | 41 | 2195 | # 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 |
schaubl/libcloud | libcloud/test/compute/test_cloudsigma_v2_0.py | 45 | 27901 | # 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 use ... | apache-2.0 |
johnkeepmoving/oss-ftp | python27/win32/Lib/idlelib/rpc.py | 65 | 20225 | """RPC Implemention, originally written for the Python Idle IDE
For security reasons, GvR requested that Idle's Python execution server process
connect to the Idle process, which listens for the connection. Since Idle has
only one client per server, this was not a limitation.
+---------------------------------+ +... | mit |
sfrenza/test-for-bot | venv/Lib/site-packages/nltk/sem/cooper_storage.py | 7 | 4067 | # Natural Language Toolkit: Cooper storage for Quantifier Ambiguity
#
# Copyright (C) 2001-2017 NLTK Project
# Author: Ewan Klein <ewan@inf.ed.ac.uk>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
from __future__ import print_function
from nltk.sem.logic import LambdaExpression, ApplicationExpres... | mit |
sanjeevtripurari/hue | desktop/core/ext-py/tablib-0.10.0/tablib/packages/yaml3/cyaml.py | 274 | 3294 |
__all__ = ['CBaseLoader', 'CSafeLoader', 'CLoader',
'CBaseDumper', 'CSafeDumper', 'CDumper']
from _yaml import CParser, CEmitter
from .constructor import *
from .serializer import *
from .representer import *
from .resolver import *
class CBaseLoader(CParser, BaseConstructor, BaseResolver):
def __ini... | apache-2.0 |
clar/gyp | test/errors/gyptest-errors.py | 13 | 2537 | #!/usr/bin/env python
# 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.
"""
Test that two targets with the same name generates an error.
"""
import os
import sys
import TestGyp
import TestCmd
# TODO(sbc): Remo... | bsd-3-clause |
nikste/tensorflow | tensorflow/contrib/learn/python/learn/datasets/synthetic.py | 120 | 6827 | # 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 |
rauburtin/mitmproxy | libmproxy/console/window.py | 26 | 3189 | import urwid
from . import signals
class Window(urwid.Frame):
def __init__(self, master, body, header, footer, helpctx):
urwid.Frame.__init__(
self,
urwid.AttrWrap(body, "background"),
header = urwid.AttrWrap(header, "background") if header else None,
footer... | mit |
landism/pants | src/python/pants/binaries/binary_util.py | 7 | 9303 | # coding=utf-8
# Copyright 2015 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 logging
impor... | apache-2.0 |
trudikampfschaf/flask-microblog | flask/lib/python2.7/site-packages/migrate/tests/versioning/test_repository.py | 30 | 8285 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import shutil
from migrate import exceptions
from migrate.versioning.repository import *
from migrate.versioning.script import *
from nose.tools import raises
from migrate.tests import fixture
from datetime import datetime
class TestRepository(fixture.Pathed)... | bsd-3-clause |
keithhendry/treadmill | treadmill/rest/api/cell.py | 3 | 3455 | """
Treadmill Cell REST api.
"""
import flask
import flask_restplus as restplus
from flask_restplus import fields
# Disable E0611: No 'name' in module
from treadmill import webutils # pylint: disable=E0611
# Old style classes, no init method.
#
# pylint: disable=W0232
def init(api, cors, impl):
"""Configures ... | apache-2.0 |
oppo-source/Find7-4.3-kernel-source | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py | 12980 | 5411 | # SchedGui.py - Python extension for perf script, basic GUI code for
# traces drawing and overview.
#
# Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com>
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
... | gpl-2.0 |
schambers/civmarket | civmarket/lib/python2.7/site-packages/django/contrib/gis/gdal/tests/test_srs.py | 109 | 11159 | from django.contrib.gis.gdal import HAS_GDAL
from django.utils import unittest
from django.utils.unittest import skipUnless
if HAS_GDAL:
from django.contrib.gis.gdal import SpatialReference, CoordTransform, OGRException, SRSException
class TestSRS:
def __init__(self, wkt, **kwargs):
self.wkt = wkt
... | apache-2.0 |
psanxiao/gtranslator | plugins/charmap/charmap/__init__.py | 3 | 4698 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2006 Steve Frécinaux <steve@istique.net>
# 2010 Ignacio Casal Quinteiro <icq@gnome.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, ... | gpl-3.0 |
brinbois/Sick-Beard | sickbeard/clients/requests/packages/urllib3/exceptions.py | 245 | 2258 | # urllib3/exceptions.py
# Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
## Base Exceptions
class HTTPError(Exception):
"Base exception used by this module."
... | gpl-3.0 |
lvdongr/spark | examples/src/main/python/mllib/k_means_example.py | 123 | 2028 | #
# 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 us... | apache-2.0 |
anand-c-goog/tensorflow | tensorflow/contrib/layers/python/layers/regularizers.py | 21 | 6968 | # 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 |
higgsmass/notify | docs/source/conf.py | 2 | 9919 | # -*- coding: utf-8 -*-
#
# pycookie documentation build configuration file, created by
# sphinx-quickstart on Sat May 28 22:40:15 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... | mit |
hofschroeer/gnuradio | gr-analog/python/analog/fm_demod.py | 4 | 4466 | #
# Copyright 2006,2007,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later ve... | gpl-3.0 |
spron-in/py-bind-adm | dns/dns_health_check.py | 1 | 2742 | #
#
# dns health check
#
#
import os
import subprocess
import simplejson as json
import re
from dns.config import config
class CheckHealthActions:
def __init__(self, check):
self.check = check
self.param_dict = json.loads(check['parameter'])
return
def run(self):
func_nam... | mit |
brianrodri/oppia | core/domain/opportunity_services.py | 2 | 35551 | # coding: utf-8
#
# Copyright 2019 The Oppia 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 requi... | apache-2.0 |
jeanmask/opps | opps/contrib/feeds/views.py | 4 | 5705 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from django.conf import settings
from django.contrib.syndication.views import Feed
from django.contrib.sites.models import get_current_site
from django.shortcuts import get_object_or_404
from django.utils import timezone
from django.utils.translation import uget... | mit |
pbrady/sympy | sympy/utilities/decorator.py | 3 | 5889 | """Useful utility decorators. """
from __future__ import print_function, division
import sys
import types
import inspect
from sympy.core.decorators import wraps
from sympy.core.compatibility import class_types, get_function_globals, get_function_name, iterable
def threaded_factory(func, use_add):
"""A factory f... | bsd-3-clause |
jzuhone/spectral-cube | spectral_cube/ytcube.py | 5 | 11170 | from __future__ import print_function, absolute_import, division
import six
import os
import subprocess
import numpy as np
import time
from astropy.utils.console import ProgressBar
from astropy import log
import warnings
__all__ = ['ytCube']
class ytCube(object):
""" Light wrapper of a yt object with ability to ... | bsd-3-clause |
ghchinoy/tensorflow | tensorflow/contrib/boosted_trees/estimator_batch/dnn_tree_combined_estimator.py | 16 | 38554 | # 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 |
brightchen/Impala | tests/beeswax/impala_beeswax.py | 14 | 17540 | # Copyright (c) 2012 Cloudera, Inc. All rights reserved.
#
# Talk to an impalad through beeswax.
# Usage:
# * impalad is a string with the host and port of the impalad
# with which the connection should be established.
# The format is "<hostname>:<port>"
# * query_string is the query to be executed, as a st... | apache-2.0 |
HybridF5/jacket | jacket/compute/scheduler/weights/io_ops.py | 1 | 1442 | # Copyright (c) 2014 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | apache-2.0 |
yland/coala-bears | bears/natural_language/LanguageToolBear.py | 4 | 2440 | import shutil
from guess_language import guess_language
from language_check import LanguageTool, correct
from coalib.bears.LocalBear import LocalBear
from coalib.results.Diff import Diff
from coalib.results.Result import Result
from coalib.results.SourceRange import SourceRange
from coalib.settings.Setting import typ... | agpl-3.0 |
proxysh/Safejumper-for-Desktop | buildlinux/env32/lib/python2.7/site-packages/twisted/conch/ssh/transport.py | 11 | 72343 | # -*- test-case-name: twisted.conch.test.test_transport -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
The lowest level SSH protocol. This handles the key negotiation, the
encryption and the compression. The transport layer is described in
RFC 4253.
Maintainer: Paul Swartz
"""
from... | gpl-2.0 |
cchurch/ansible | lib/ansible/template/__init__.py | 2 | 35014 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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) an... | gpl-3.0 |
SamR1/FitTrackee | fittrackee/tests/workouts/test_stats_api.py | 1 | 28228 | import json
from flask import Flask
from fittrackee.users.models import User
from fittrackee.workouts.models import Sport, Workout
from ..api_test_case import ApiTestCaseMixin
class TestGetStatsByTime(ApiTestCaseMixin):
def test_it_gets_no_stats_when_user_has_no_workouts(
self, app: Flask, user_1: User... | gpl-3.0 |
ds-hwang/chromium-crosswalk | tools/perf/page_sets/intl_ko_th_vi.py | 10 | 1671 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.page import page as page_module
from telemetry.page import shared_page_state
from telemetry import story
class IntlKoThViPage(page_module.Pag... | bsd-3-clause |
Pulgama/supriya | supriya/realtime/BufferProxy.py | 1 | 8402 | from supriya.system.SupriyaValueObject import SupriyaValueObject
class BufferProxy(SupriyaValueObject):
"""
A buffer proxy.
Acts as a singleton reference to a buffer on the server, tracking the state
of a single buffer id and responding to `/b_info` messages. Multiple Buffer
instances reference a... | mit |
kidmaple/CoolWall | user/python/Tools/scripts/which.py | 3 | 1130 | #! /usr/bin/env python
# Variant of "which".
# On stderr, near and total misses are reported.
# '-l<flags>' argument adds ls -l<flags> of each file found.
import sys
if sys.path[0] in (".", ""): del sys.path[0]
import sys, os, string
from stat import *
def msg(str):
sys.stderr.write(str + '\n')
pathlist = string.... | gpl-2.0 |
dreispt/geospatial | geoengine_project/tests/test_geoengine_project.py | 5 | 1905 | # -*- coding: utf-8 -*-
#
#
# Authors: Jonathan Nemry
# Copyright (c) 2015 Acsone SA/NV (http://www.acsone.eu)
#
# This program 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 vers... | agpl-3.0 |
dirtbag3/osmapi | tests/node_tests.py | 2 | 10554 | from __future__ import (unicode_literals, absolute_import)
from nose.tools import * # noqa
from . import osmapi_tests
import osmapi
import mock
import datetime
class TestOsmApiNode(osmapi_tests.TestOsmApi):
def test_NodeGet(self):
self._conn_mock()
result = self.api.NodeGet(123)
args, k... | gpl-3.0 |
dbertha/odoo | openerp/cli/__init__.py | 135 | 2016 | import logging
import sys
import os
import openerp
from openerp import tools
from openerp.modules import module
_logger = logging.getLogger(__name__)
commands = {}
class CommandType(type):
def __init__(cls, name, bases, attrs):
super(CommandType, cls).__init__(name, bases, attrs)
name = getattr(... | agpl-3.0 |
bmcfee/librosa | librosa/util/utils.py | 1 | 64787 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Utility functions"""
import warnings
import scipy.ndimage
import scipy.sparse
import numpy as np
import numba
from numpy.lib.stride_tricks import as_strided
from .._cache import cache
from .exceptions import ParameterError
# Constrain STFT block sizes to 256 KB
MAX_M... | isc |
keerts/home-assistant | tests/components/mqtt/test_init.py | 3 | 14663 | """The tests for the MQTT component."""
from collections import namedtuple
import unittest
from unittest import mock
import socket
import voluptuous as vol
from homeassistant.core import callback
from homeassistant.bootstrap import setup_component
import homeassistant.components.mqtt as mqtt
from homeassistant.const ... | apache-2.0 |
ducksboard/libsaas | test/test_googleoauth2.py | 4 | 1616 | import unittest
from libsaas.executors import test_executor
from libsaas.services import googleoauth2
from libsaas.port import urlencode
class GoogleOauth2TestCase(unittest.TestCase):
def setUp(self):
self.executor = test_executor.use()
self.executor.set_response(b'{}', 200, {})
self.se... | mit |
frouty/odoo_oph | openerp/tools/amount_to_text_en.py | 441 | 5103 | # -*- 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... | agpl-3.0 |
andrewleech/script.module.raven | lib/raven/utils/http.py | 20 | 1847 | """
raven.utils.http
~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import socket
import ssl
import sys
from raven.conf import defaults
from raven.utils.compat import urllib2, httplib... | bsd-3-clause |
samueljackson92/tsp-solver | tspsolver/ga/test/crossover_test.py | 1 | 3989 | import unittest
import nose.tools
import numpy as np
from scipy.spatial import distance_matrix
from tspsolver.tsp_generator import TSPGenerator
from ..population_generation import SimplePopulationGenerator
from ..crossover import OnePointPMX, TwoPointPMX, OrderCrossover
class OnePointCrossoverTest(unittest.TestCase)... | mit |
kbrebanov/ansible | lib/ansible/modules/cloud/rackspace/rax_files.py | 33 | 11750 | #!/usr/bin/python
# (c) 2013, Paul Durivage <paul.durivage@rackspace.com>
# 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 |
YeoLab/anchor | anchor/simulate.py | 1 | 7366 |
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import seaborn as sns
import six
from .visualize import violinplot, MODALITY_ORDER, MODALITY_TO_COLOR, barplot
def add_noise(data, iteration_per_noise=100,
noise_percentages=np.arange(0, 101, step=10), plot=True,
vio... | bsd-3-clause |
olemis/sqlalchemy | test/dialect/postgresql/test_compiler.py | 10 | 38258 | # coding: utf-8
from sqlalchemy.testing.assertions import AssertsCompiledSQL, is_, \
assert_raises
from sqlalchemy.testing import engines, fixtures
from sqlalchemy import testing
from sqlalchemy import Sequence, Table, Column, Integer, update, String,\
insert, func, MetaData, Enum, Index, and_, delete, select,... | mit |
vmware/nsxramlclient | tests/vdnConfig.py | 1 | 5003 | # coding=utf-8
#
# Copyright © 2015 VMware, Inc. All Rights Reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
# documentation files (the "Software"), to deal in the Software without restriction, including without limitation
# the rights to use, co... | mit |
wuga214/Django-Wuga | env/lib/python2.7/site-packages/whoosh/analysis/intraword.py | 92 | 18991 | # Copyright 2007 Matt Chaput. 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... | apache-2.0 |
waytai/odoo | addons/l10n_pe/__init__.py | 2120 | 1456 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 2011 Cubic ERP - Teradata SAC. (http://cubicerp.com).
#
# WARNING: This program as such is intended to be used by professional
# programmers who take t... | agpl-3.0 |
boto/botoflow | botoflow/history_events/event_bases.py | 2 | 1634 | # Copyright 2013 Amazon.com, Inc. or its affiliates. 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.
# A copy of the License is located at
#
# http://aws.amazon.com/apache2.0
#
# or in the "license" file accompa... | apache-2.0 |
bjzhang/xen | tools/python/xen/xend/server/BlktapController.py | 26 | 10719 | # Copyright (c) 2005, XenSource Ltd.
import string, re, os
from xen.xend.server.blkif import BlkifController
from xen.xend.XendLogging import log
from xen.util.xpopen import xPopen3
phantomDev = 0;
phantomId = 0;
blktap1_disk_types = [
'aio',
'sync',
'vmdk',
'ram',
'qcow',
'qcow2',
'ioemu... | gpl-2.0 |
SuperTaiyaki/paifu-tools | paifu.py | 1 | 3158 | import sys
import tenhou
tilelist = []
for x in range(0, 9):
# tilelist.append(Image(source="%sm.gif" % (x+1)))
tilelist.append("images/%sm.gif" % (x+1))
for x in range(0, 9):
# tilelist.append(Image(source="%sp.gif" % (x+1)))
tilelist.append("images/%sp.gif" % (x+1))
for x in range(0, 9)... | gpl-3.0 |
gdkar/pyglet | pyglet/lib.py | 20 | 12493 | # ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# 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 |
lpostema/gb | mpg.py | 1 | 5041 | import xml.etree.ElementTree as ET
import os, shutil
import datetime
import openpyxl
tree = ET.parse('Meeting Plan Generator.xml')
root = tree.getroot()
from PyPDF2.PyPDF2.pdf import PdfFileReader
while 1:
today = datetime.date.today()
daysToNextWednesday = datetime.timedelta((2 - datetime.date.weekday(today)) % 7)... | mit |
yl565/statsmodels | statsmodels/base/optimizer.py | 12 | 23025 | """
Functions that are general enough to use for any model fitting. The idea is
to untie these from LikelihoodModel so that they may be re-used generally.
"""
from __future__ import print_function
import distutils.version
from scipy import __version__ as scipy_version
import numpy as np
from scipy import optimize
def... | bsd-3-clause |
City-of-Turku/living-environment | assignments/migrations/0001_initial.py | 1 | 11292 | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-05-05 08:31
from __future__ import unicode_literals
import ckeditor_uploader.fields
from django.db import migrations, models
import django.db.models.deletion
import django.db.models.manager
import djgeojson.fields
class Migration(migrations.Migration):
... | mit |
BitTract/LibertyCoin | contrib/bitrpc/bitrpc.py | 2348 | 7835 | from jsonrpc import ServiceProxy
import sys
import string
# ===== BEGIN USER SETTINGS =====
# if you do not set these you will be prompted for a password for every command
rpcuser = ""
rpcpass = ""
# ====== END USER SETTINGS ======
if rpcpass == "":
access = ServiceProxy("http://127.0.0.1:8332")
else:
access = Ser... | mit |
tinkerinestudio/Tinkerine-Suite | TinkerineSuite/python/Lib/OpenGL/raw/GL/__init__.py | 3 | 183316 | # -*- coding: iso-8859-1 -*-
"""Raw (C-style) API for OpenGL.GL
Automatically generated by the generateraw script, do not edit!
"""
from OpenGL.raw.GL.constants import *
from ctypes import *
from OpenGL import platform, arrays
from OpenGL.constant import Constant
from OpenGL import constants as GLconstants
GLvoid = G... | agpl-3.0 |
pozdnyakov/chromium-crosswalk | tools/telemetry/telemetry/core/chrome/inspector_console.py | 29 | 1991 | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import json
import logging
class InspectorConsole(object):
def __init__(self, inspector_backend):
self._inspector_backend = inspector_backend
s... | bsd-3-clause |
IllusionRom-deprecated/android_platform_external_chromium_org | third_party/tlslite/tlslite/utils/Cryptlib_AES.py | 359 | 1364 | """Cryptlib AES implementation."""
from cryptomath import *
from AES import *
if cryptlibpyLoaded:
def new(key, mode, IV):
return Cryptlib_AES(key, mode, IV)
class Cryptlib_AES(AES):
def __init__(self, key, mode, IV):
AES.__init__(self, key, mode, IV, "cryptlib")
sel... | bsd-3-clause |
saurabh6790/medsynaptic-app | accounts/report/gross_profit/gross_profit.py | 29 | 4693 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.utils import flt
from stock.utils import get_buying_amount, get_sales_bom_buying_amount
def execute(filters=None):
if... | agpl-3.0 |
openstack/nova | nova/virt/hyperv/constants.py | 2 | 2669 | # Copyright 2012 Cloudbase Solutions Srl
# 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 r... | apache-2.0 |
aurelijusb/arangodb | 3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/win32com/demos/outlookAddin.py | 34 | 4637 | # A demo plugin for Microsoft Outlook (NOT Outlook Express)
#
# This addin simply adds a new button to the main Outlook toolbar,
# and displays a message box when clicked. Thus, it demonstrates
# how to plug in to Outlook itself, and hook outlook events.
#
# Additionally, each time a new message arrives in the Inbox, ... | apache-2.0 |
mousebrains/kayak | scripts/MyLogger.py | 1 | 1526 | #
# Construct a logger given a standard set of command line arguments
#
# Oct-2019, Pat Welch, pat@mousebrains.com
import logging
import logging.handlers
import argparse
def addArgs(parser: argparse.ArgumentParser):
""" Add my options to an argparse object """
grp = parser.add_argument_group('Log related opti... | gpl-3.0 |
ahu-odoo/odoo | addons/crm/wizard/crm_partner_binding.py | 177 | 4544 | # -*- 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 |
csrocha/OpenUpgrade | addons/base_import/models.py | 90 | 13824 | import csv
import itertools
import logging
import operator
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
import psycopg2
from openerp.osv import orm, fields
from openerp.tools.translate import _
FIELDS_RECURSION_LIMIT = 2
ERROR_PREVIEW_BYTES = 200
_logger = logging.ge... | agpl-3.0 |
meraki/provisioning-lib | python-3.5-api-module/sample-createbulkimport.py | 3 | 3116 | import merakiapi
import os
import re
from vars import org, apikey
# bulk network import filename
bncfile = 'bncimport.csv'
# API doesn't provide DNS information for device, these variables allow defining DNS manually
dns1 = '8.8.8.8'
dns2 = '8.8.4.4'
# API doesn't provide network mask information for device, this... | gpl-3.0 |
CN-UPB/upb-son-editor-backend | src/son_editor/tests/utils.py | 2 | 6214 | import son_editor.impl.functionsimpl
import son_editor.impl.projectsimpl
import son_editor.impl.servicesimpl
import son_editor.impl.workspaceimpl
import son_editor.impl.cataloguesimpl
import os
from son_editor.app.database import db_session
from son_editor.impl.usermanagement import get_user
from son_editor.models.user... | apache-2.0 |
songmonit/CTTMSONLINE_V8 | addons/hr_timesheet_sheet/__init__.py | 434 | 1127 | # -*- 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... | agpl-3.0 |
alanljj/oca_server-tools | users_ldap_mail/users_ldap_model.py | 51 | 2783 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Daniel Reis
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Gen... | agpl-3.0 |
wraiden/spacewalk | backend/satellite_tools/exporter/exportLib.py | 3 | 53510 | #
# Copyright (c) 2008--2016 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public License,
# version 2 (GPLv2). There is NO WARRANTY for this software, express or
# implied, including the implied warranties of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a c... | gpl-2.0 |
lupyuen/RaspberryPiImage | home/pi/GrovePi/Software/Python/others/temboo/Library/OneLogin/Roles/ListAll.py | 5 | 2799 | # -*- coding: utf-8 -*-
###############################################################################
#
# ListAll
# Retrieves a list of all roles.
#
# Python versions 2.6, 2.7, 3.x
#
# Copyright 2014, Temboo Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except i... | apache-2.0 |
BaladiDogGames/baladidoggames.github.io | mingw/bin/lib/distutils/command/install_scripts.py | 241 | 2068 | """distutils.command.install_scripts
Implements the Distutils 'install_scripts' command, for installing
Python scripts."""
# contributed by Bastian Kleineidam
__revision__ = "$Id$"
import os
from distutils.core import Command
from distutils import log
from stat import ST_MODE
class install_scripts (Command):
... | mit |
uwafsl/MissionPlanner | Lib/lib2to3/fixes/fix_map.py | 61 | 3153 | # Copyright 2007 Google, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
"""Fixer that changes map(F, ...) into list(map(F, ...)) unless there
exists a 'from future_builtins import map' statement in the top-level
namespace.
As a special case, map(None, X) is changed into list(X). (T... | gpl-3.0 |
xs2maverick/adhocracy3.mercator | src/adhocracy_core/adhocracy_core/messaging/test_init.py | 2 | 11153 | from unittest.mock import Mock
from pytest import fixture
from pytest import mark
from pytest import raises
from pyramid import testing
@fixture
def integration(config):
config.include('pyramid_mailer.testing')
config.include('pyramid_mako')
config.include('adhocracy_core.content')
config.include('ad... | agpl-3.0 |
broferek/ansible | test/units/modules/network/fortios/test_fortios_spamfilter_mheader.py | 21 | 7959 | # Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the... | gpl-3.0 |
AndreasHeger/alignlib | python/tests/test_Weightor.py | 1 | 2035 | # alignlib - a library for aligning protein sequences
#
# $Id: test_Alignment.py,v 1.3 2004/01/23 17:34:58 aheger Exp $
#
# Copyright (C) 2004 Andreas Heger
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Softw... | gpl-2.0 |
spacetelescope/stsci.tools | doc/source/conf.py | 1 | 7012 | # -*- coding: utf-8 -*-
#
# stsci.tools documentation build configuration file, created by
# sphinx-quickstart on Thu Oct 7 13:09:39 2010.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
#... | bsd-3-clause |
aldryn/aldryn-mailchimp | aldryn_mailchimp/south_migrations/0002_auto__chg_field_subscriptionplugin_list_id.py | 2 | 2877 | # -*- 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):
# Changing field 'SubscriptionPlugin.list_id'
db.alter_column('cmsplugin_subscriptionplugin', 'list_id', se... | bsd-3-clause |
sysadminmatmoz/ingadhoc | account_interests/interest.py | 9 | 2049 | # -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in module root
# directory
##############################################################################
from openerp import fields, models, api, _
class... | agpl-3.0 |
Agent007/deepchem | examples/qm7/qm7b_DTNN.py | 1 | 1237 | from __future__ import print_function
from __future__ import division
from __future__ import unicode_literals
import numpy as np
from trans import undo_transforms
np.random.seed(123)
import tensorflow as tf
tf.set_random_seed(123)
import deepchem as dc
# Load Tox21 dataset
tasks, datasets, transformers = dc.molnet... | mit |
apache/incubator-airflow | tests/utils/test_task_group.py | 5 | 20614 | #
# 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... | apache-2.0 |
glenjarvis/Lemonade | src/tests/line_entry_tests.py | 1 | 4202 | #!/usr/bin/env python
# pylint: disable=R0904,W0142,C0103
"""Unit Tests for the core data structures"""
import datetime
import decimal
import unittest
try:
# Help bootstrap (If PYTHONPATH isn't set); pylint: disable=W0611
from bootstrap import lemonade
except ImportError:
pass
from lemonade import models... | bsd-3-clause |
alexanderturner/ansible | lib/ansible/modules/packaging/os/pulp_repo.py | 21 | 23737 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2016, Joe Adams <@sysadmind>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# ... | gpl-3.0 |
reinaH/osf.io | scripts/migrate_inconsistent_file_keys.py | 64 | 2950 | #!/usr/bin/env python
# encoding: utf-8
"""Find all nodes with different sets of keys for `files_current` and
`files_versions`, and ensure that all keys present in the former are also
present in the latter.
NOTE: This is a one-time migration.
Log:
Run by sloria on production on 2014-10-16 at 16:00 EST. 15 nodes... | apache-2.0 |
hehongliang/tensorflow | tensorflow/contrib/testing/python/framework/util_test.py | 198 | 4128 | # 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 |
GwangJin/gwangmoney-core | qa/rpc-tests/listtransactions.py | 164 | 4718 | #!/usr/bin/env python2
# Copyright (c) 2014 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Exercise the listtransactions API
from test_framework import BitcoinTestFramework
from bitcoinrpc.authproxy... | mit |
samimoftheworld/google-appengine-wx-launcher | launcher/taskthread.py | 26 | 5287 | #!/usr/bin/env python
#
# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 |
krasin/omim | tools/testlog_to_xml_converter.py | 36 | 7619 | #!/usr/bin/env python
'''
This script generates jUnit-style xml files from the log written by our tests.
This xml file is used in Jenkins to show the state of the test execution.
Created on May 13, 2015
@author: t.danshin
'''
from __future__ import print_function
import sys
import xml.etree.ElementTree as ElementTr... | apache-2.0 |
zadgroup/edx-platform | lms/djangoapps/certificates/management/commands/resubmit_error_certificates.py | 120 | 4248 | """Management command for re-submitting certificates with an error status.
Certificates may have "error" status for a variety of reasons,
but the most likely is that the course was misconfigured
in the certificates worker.
This management command identifies certificate tasks
that have an error status and re-resubmits... | agpl-3.0 |
lancezlin/ml_template_py | lib/python2.7/site-packages/nbformat/v2/rwbase.py | 12 | 5997 | """Base classes and utilities for readers and writers.
Authors:
* Brian Granger
"""
#-----------------------------------------------------------------------------
# Copyright (C) 2008-2011 The IPython Development Team
#
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING,... | mit |
baoboa/pyqt5 | examples/qtdemo/headingitem.py | 3 | 4037 | #############################################################################
##
## Copyright (C) 2013 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_LICENSE:LGPL$
## Commercial Us... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.