repo_name stringlengths 5 100 | path stringlengths 4 375 | copies stringclasses 991
values | size stringlengths 4 7 | content stringlengths 666 1M | license stringclasses 15
values |
|---|---|---|---|---|---|
avinetworks/avi-heat | avi/heat/resources/ssl.py | 1 | 35692 | # GENERATED FILE - DO NOT EDIT THIS FILE UNLESS YOU ARE A WIZZARD
#pylint: skip-file
from heat.engine import properties
from heat.engine import constraints
from heat.engine import attributes
from heat.common.i18n import _
from avi.heat.avi_resource import AviResource
from avi.heat.avi_resource import AviNestedResource... | apache-2.0 |
trujunzhang/djzhang-targets | cwcraigs/cwcraigs/spiders/craigs.py | 1 | 2305 | # -*- coding: utf-8 -*-
import scrapy
from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.selector import HtmlXPathSelector
from cwcraigs.items import CraigslistSampleItem
class CraigsSpider(CrawlSpider):
name = "craigs"
allowed_dom... | mit |
kenshay/ImageScripter | ProgramData/SystemFiles/Python/Lib/site-packages/OpenGL/GL/ARB/sync.py | 9 | 3182 | '''OpenGL extension ARB.sync
This module customises the behaviour of the
OpenGL.raw.GL.ARB.sync to provide a more
Python-friendly API
Overview (from the spec)
This extension introduces the concept of "sync objects". Sync
objects are a synchronization primitive - a representation of events
whose completion stat... | gpl-3.0 |
anant-dev/django | tests/custom_managers/models.py | 238 | 6791 | """
Giving models a custom manager
You can use a custom ``Manager`` in a particular model by extending the base
``Manager`` class and instantiating your custom ``Manager`` in your model.
There are two reasons you might want to customize a ``Manager``: to add extra
``Manager`` methods, and/or to modify the initial ``Q... | bsd-3-clause |
goddardl/cortex | test/IECoreRI/MultipleContextsTest.py | 7 | 2940 | ##########################################################################
#
# Copyright (c) 2008-2013, 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:
#
# * Redis... | bsd-3-clause |
kustodian/ansible | lib/ansible/modules/cloud/vmware/vmware_dvs_host.py | 23 | 10278 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2015, Joseph Callen <jcallen () csc.com>
# Copyright: (c) 2018, Ansible Project
# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
# Copyright: (c) 2019, VMware Inc.
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl... | gpl-3.0 |
bruderstein/PythonScript | PythonLib/min/encodings/raw_unicode_escape.py | 852 | 1208 | """ Python 'raw-unicode-escape' Codec
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""
import codecs
### Codec APIs
class Codec(codecs.Codec):
# Note: Binding these as C functions will result in the class not
# converting them to methods. This is ... | gpl-2.0 |
isnnn/Sick-Beard-TPB | lib/rtorrent/rpc/__init__.py | 158 | 10775 | # Copyright (c) 2013 Chris Lucas, <chris@chrisjlucas.com>
# 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, ... | gpl-3.0 |
marcore/edx-platform | lms/djangoapps/gating/tests/test_api.py | 11 | 6365 | """
Unit tests for gating.signals module
"""
from mock import patch
from nose.plugins.attrib import attr
from ddt import ddt, data, unpack
from xmodule.modulestore.tests.factories import CourseFactory, ItemFactory
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase
from courseware.tests.helpers impor... | agpl-3.0 |
benoitsteiner/tensorflow-opencl | tensorflow/contrib/timeseries/examples/multivariate_test.py | 91 | 1330 | # 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 |
quanvm009/codev7 | openerp/addons/base/res/res_country.py | 46 | 4208 | # -*- 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 |
fpiot/mbed-ats | workspace_tools/compliance/ioper_runner.py | 106 | 4777 | #!/usr/bin/env python2
"""
mbed SDK
Copyright (c) 2011-2015 ARM Limited
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... | apache-2.0 |
aprefontaine/TMScheduler | django/contrib/localflavor/ca/ca_provinces.py | 199 | 1397 | """
An alphabetical list of provinces and territories for use as `choices`
in a formfield., and a mapping of province misspellings/abbreviations to
normalized abbreviations
Source: http://www.canada.gc.ca/othergov/prov_e.html
This exists in this standalone file so that it's only imported into memory
when explici... | bsd-3-clause |
htc-msm8660/android_kernel_htc_msm8660 | 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 |
raymondxyang/tensorflow | tensorflow/python/training/session_run_hook.py | 23 | 10423 | # 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 |
vmanoria/bluemix-hue-filebrowser | hue-3.8.1-bluemix/apps/filebrowser/src/filebrowser/forms.py | 22 | 7669 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | gpl-2.0 |
tulir/maubot | maubot/management/api/plugin_upload.py | 1 | 4301 | # maubot - A plugin-based Matrix bot system.
# Copyright (C) 2019 Tulir Asokan
#
# 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 version 3 of the License, or
# (at your option) any... | agpl-3.0 |
cuboxi/android_external_chromium_org | gpu/gles2_conform_support/generate_gles2_embedded_data.py | 138 | 3451 | #!/usr/bin/env python
# Copyright (c) 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.
"""generates files to embed the gles2 conformance test data in executable."""
import os
import sys
class GenerateEmbeddedFiles(ob... | bsd-3-clause |
clemkoa/scikit-learn | sklearn/cluster/__init__.py | 364 | 1228 | """
The :mod:`sklearn.cluster` module gathers popular unsupervised clustering
algorithms.
"""
from .spectral import spectral_clustering, SpectralClustering
from .mean_shift_ import (mean_shift, MeanShift,
estimate_bandwidth, get_bin_seeds)
from .affinity_propagation_ import affinity_propagati... | bsd-3-clause |
AMOboxTV/AMOBox.LegoBuild | plugin.video.titan/resources/lib/resolvers/hdcastorg.py | 3 | 1464 | # -*- coding: utf-8 -*-
'''
Genesis Add-on
Copyright (C) 2015 lambda
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 ... | gpl-2.0 |
vikatory/kbengine | kbe/src/lib/python/Lib/test/test_io.py | 60 | 128793 | """Unit tests for the io module."""
# Tests of io are scattered over the test suite:
# * test_bufio - tests file buffering
# * test_memoryio - tests BytesIO and StringIO
# * test_fileio - tests FileIO
# * test_file - tests the file interface
# * test_io - tests everything else in the io module
# * test_univnewlines - ... | lgpl-3.0 |
LinTeX9527/linux | tools/perf/scripts/python/check-perf-trace.py | 1997 | 2539 | # perf script event handlers, generated by perf script -g python
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# This script tests basic functionality such as flag and symbol
# strings, common_xxx() calls back into perf, begin, end, unhandled
# events, etc. ... | gpl-2.0 |
aferr/LatticeMemCtl | src/arch/x86/isa/insts/general_purpose/control_transfer/xreturn.py | 20 | 3641 | # Copyright (c) 2007-2008 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 imp... | bsd-3-clause |
mickele77/FreeCAD | src/Mod/Test/TestApp.py | 1 | 4140 | #***************************************************************************
#* (c) Juergen Riegel (juergen.riegel@web.de) 2002 *
#* *
#* This file is part of the FreeCAD CAx development system. *
#* ... | lgpl-2.1 |
inasafe/inasafe | safe/gui/tools/shake_grid/shakemap_converter_dialog.py | 3 | 14355 | # coding=utf-8
"""A dialog for converting grid.xml file."""
import logging
import os
from qgis.core import (QgsApplication, QgsProject, QgsRasterLayer,
QgsVectorLayer)
# noinspection PyPackageRequirements
from qgis.PyQt import QtCore, QtGui
# noinspection PyPackageRequirements
from qgis.PyQt.Qt... | gpl-3.0 |
CapOM/ChromiumGStreamerBackend | tools/telemetry/telemetry/story/story_unittest.py | 24 | 1797 | # 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.
import unittest
from telemetry import story
from telemetry.story import shared_state
# pylint: disable=abstract-method
class SharedStateBar(shared_state.S... | bsd-3-clause |
tinkerinestudio/Tinkerine-Suite | TinkerineSuite/Cura/util/util3d.py | 1 | 1819 | from __future__ import absolute_import
__copyright__ = "Copyright (C) 2013 David Braam - Released under terms of the AGPLv3 License"
import math
class Vector3(object):
def __init__(self, x=0.0, y=0.0, z=0.0):
self.x = x
self.y = y
self.z = z
def __copy__(self):
return Vector3(self.x, self.y, self.z)
def ... | agpl-3.0 |
kubat/drqueue | etc/vray_sg.py | 4 | 2629 | #
# THIS IS A PYTHON SCRIPT FILE
#
# Default configuration for V-Ray script generator
#
# Python variables
# SCENE
#
# shell variables
# DRQUEUE_BLOCKSIZE, DRQUEUE_COMPID, DRQUEUE_ENDFRAME, DRQUEUE_ETC, DRQUEUE_FRAME,
# DRQUEUE_JOBID, DRQUEUE_JOBNAME, DRQUEUE_OS, DRQUEUE_OWNER, DRQUEUE_PADFRAME,
# DRQUEUE_PADFRAMES... | gpl-3.0 |
luzpaz/QGIS | tests/src/python/test_qgsrelationeditwidget.py | 21 | 17425 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for edit widgets.
.. 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 Software Foundation; either version 2 of the License, or
(at your option) any later version.
"""
__au... | gpl-2.0 |
Craig-Macomber/Panda3D-Shader-Generator | shaderBuilder.py | 1 | 22044 | import itertools
import collections
import os
import renderState
import param
import nodes
import inspect
from panda3d.core import Shader
from direct.showbase.AppRunnerGlobal import appRunner
isP3d=bool(appRunner)
"""
A system for generating shader generators based on the generator specifications (the graph files)... | bsd-2-clause |
sag-enorman/selenium | py/selenium/webdriver/firefox/firefox_profile.py | 3 | 14701 | # 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 |
sander76/home-assistant | homeassistant/components/starline/entity.py | 3 | 1861 | """StarLine base entity."""
from __future__ import annotations
from typing import Callable
from homeassistant.helpers.entity import Entity
from .account import StarlineAccount, StarlineDevice
class StarlineEntity(Entity):
"""StarLine base entity class."""
def __init__(
self, account: StarlineAccou... | apache-2.0 |
cathook/PTTArticleRecommander | src/app_server/modules/proxy_client.py | 2 | 2619 | import logging
import socket
import time
from modules.protocol import net
from modules.protocol import types
class ProxyClientError(Exception):
def __init__(self, *args, **kwargs):
super(ProxyClientError, self).__init__(*args, **kwargs)
class ProxyClient(object):
'''A proxy to the server.
Attr... | mit |
zverevalexei/trex-http-proxy | trex_client/external_libs/scapy-2.3.1/python2/scapy/contrib/ppi_cace.py | 7 | 2627 | ## This file is (hopefully) part of Scapy
## See http://www.secdev.org/projects/scapy for more informations
## <jellch@harris.com>
## This program is published under a GPLv2 license
# scapy.contrib.description = PPI CACE
# scapy.contrib.status = loads
"""
CACE PPI types
"""
import logging,struct
from scapy.config im... | mit |
eviljeff/olympia | src/olympia/devhub/tests/test_tasks.py | 2 | 46598 | # -*- coding: utf-8 -*-
import json
import os
import shutil
import tempfile
from contextlib import contextmanager
from datetime import datetime, timedelta
from decimal import Decimal
from django.conf import settings
from django.core import mail
from django.core.files.storage import default_storage as storage
from un... | bsd-3-clause |
hgl888/web-testing-service | wts/tests/csp/csp_frame-src_cross-origin_multi_allowed_one-manual.py | 30 | 2514 | def main(request, response):
import simplejson as json
f = file('config.json')
source = f.read()
s = json.JSONDecoder().decode(source)
url1 = "http://" + s['host'] + ":" + str(s['ports']['http'][1])
url2 = "http://" + s['host'] + ":" + str(s['ports']['http'][0])
_CSP = "frame-src " + url1 + ... | bsd-3-clause |
dlakata/flask-security | tests/test_registerable.py | 18 | 4132 | # -*- coding: utf-8 -*-
"""
test_registerable
~~~~~~~~~~~~~~~~~
Registerable tests
"""
import pytest
from flask import Flask
from flask_security.core import UserMixin
from flask_security.signals import user_registered
from utils import authenticate, logout
pytestmark = pytest.mark.registerable()
@pyt... | mit |
datalogics/scons | test/scons-time/help/all-subcommands.py | 2 | 2017 | #!/usr/bin/env python
#
# __COPYRIGHT__
#
# 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,
... | mit |
anrl/gini | frontend/src/gbuilder/UI/SendDirectoryWindow.py | 11 | 2028 | """The window to specify which directory to send a file to"""
from PyQt4 import QtCore, QtGui
from Core.globals import options, mainWidgets
class SendDirectoryWindow(QtGui.QDialog):
def __init__(self, parent = None):
"""
Create a send directory window to send a file to the server.
... | mit |
haniehrajabi/ryu | ryu/controller/ofp_event.py | 33 | 2338 | # Copyright (C) 2012 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2011 Isaku Yamahata <yamahata at valinux co jp>
#
# 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://... | apache-2.0 |
Outernet-Project/librarian-core | librarian_core/contrib/cache/decorators.py | 2 | 2707 | import functools
from bottle import request
from ...utils import is_string
from .utils import generate_key
def cached(prefix='', timeout=None):
"""Decorator that caches return values of functions that it wraps. The
key is generated from the function's name and the parameters passed to
it. E.g.:
@c... | gpl-3.0 |
aktech/sympy | sympy/physics/mechanics/tests/test_linearize.py | 11 | 12048 | from __future__ import division
import warnings
from sympy import symbols, Matrix, solve, simplify, cos, sin, atan, sqrt
from sympy.physics.mechanics import dynamicsymbols, ReferenceFrame, Point,\
dot, cross, inertia, KanesMethod, Particle, RigidBody, Lagrangian,\
LagrangesMethod
from sympy.utilities.pytest imp... | bsd-3-clause |
fernandezcuesta/ansible | lib/ansible/modules/packaging/os/opkg.py | 7 | 5205 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Patrick Pelletier <pp.pelletier@gmail.com>
# Based on pacman (Afterburn) and pkgin (Shaun Zinck) modules
#
# 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... | gpl-3.0 |
sergiosvieira/ns3-dtn | src/visualizer/visualizer/plugins/show_last_packets.py | 182 | 9460 | import gobject
import gtk
import ns.core
import ns.network
import ns.visualizer
from visualizer.base import InformationWindow
from visualizer.higcontainer import HIGContainer
from kiwi.ui.objectlist import ObjectList, Column
class ShowLastPackets(InformationWindow):
class PacketList(gtk.ScrolledWindow):
... | gpl-2.0 |
daenamkim/ansible | lib/ansible/modules/monitoring/sensu_client.py | 49 | 9532 | #!/usr/bin/python
# (c) 2017, Red Hat 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 |
gaddman/ansible | lib/ansible/module_utils/ovirt.py | 7 | 28387 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) ... | gpl-3.0 |
RENCI/xDCIShare | hs_model_program/migrations/0004_auto_20151012_1656.py | 3 | 4593 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('hs_model_program', '0003_auto_20150813_1730'),
]
operations = [
migrations.RemoveField(
model_name='mpmetadata',... | bsd-3-clause |
douggeiger/gnuradio | gnuradio-runtime/python/gnuradio/gru/hexint.py | 78 | 1351 | #
# Copyright 2005 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 version.
#
#... | gpl-3.0 |
satishgoda/learningqt | basics/qmainwindow/jamming.py | 1 | 1233 | from PySide import QtGui
from PySide import QtCore
self = QtGui.QMainWindow()
self.setWindowTitle("Qt MainWindow")
self.show()
menuBar = self.menuBar()
fileMenu = menuBar.addMenu('File')
exitAction = fileMenu.addAction("Exit")
exitAction.triggered.connect(self.close)
dockWidgetWidget = QtGui.QWidget(parent=self)... | mit |
Andrerm124/Snapprefs | docs/conf.py | 3 | 9834 | # -*- coding: utf-8 -*-
#
# Snapprefs documentation build configuration file, created by
# sphinx-quickstart on Sun Oct 16 14:42:43 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.
#
#... | gpl-3.0 |
sbesson/zeroc-ice | cs/test/IceSSL/certs/makecerts.py | 1 | 2044 | #!/usr/bin/env python
# **********************************************************************
#
# Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# *************************************... | gpl-2.0 |
DavidBreuer/CytoSeg | tests/test.py | 1 | 1464 | ################################################################################
# Module: test.py
# Description: Test imports and network extraction
# License: GPL3, see full license in LICENSE.txt
# Web: https://github.com/DavidBreuer/CytoSeg
###########################################################################... | gpl-3.0 |
JQIamo/artiq | artiq/frontend/artiq_flash.py | 1 | 5247 | #!/usr/bin/env python3
# Copyright (C) 2015 Robert Jordens <jordens@gmail.com>
import argparse
import os
import subprocess
import tempfile
import shutil
from artiq import __artiq_dir__ as artiq_dir
from artiq.frontend.bit2bin import bit2bin
def scripts_path():
p = ["share", "openocd", "scripts"]
if os.name ... | lgpl-3.0 |
Tictrac/django-push-notifications | tests/test_models.py | 2 | 17633 | import json
from django.test import TestCase
from django.utils import timezone
from push_notifications.gcm import GCMError, send_bulk_message
from push_notifications.models import GCMDevice, APNSDevice
from ._mock import mock
# Mock responses
GCM_PLAIN_RESPONSE = "id=1:08"
GCM_JSON_RESPONSE = '{"multicast_id":108,"s... | mit |
garmann/playground | python/python_mysql_queue/app.py | 1 | 2098 | #!/usr/bin/env python3
from classes.myqueue import MyQueue
import time # time.sleep(0.02)
import random # random.randint(1, 100)
import socket # socket.gethostname()
import sys
import argparse
CONF_DB = {
'server': 'localhost',
'user': 'root',
'pass': 'x',
'db': 'myqueue'
}
def worker_create(q, amount... | mit |
danieldresser/cortex | python/IECore/CompoundVectorParameter.py | 12 | 3505 | ##########################################################################
#
# Copyright (c) 2008-2010, 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:
#
# * Redis... | bsd-3-clause |
naver/nbase-arc | integration_test/testrunner.py | 4 | 10208 | # Copyright 2015 Naver Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 |
irvingprog/pilas | pilas/actores/menu.py | 1 | 6200 | # -*- encoding: utf-8 -*-
# Pilas engine - A video game framework.
#
# Copyright 2010 - Hugo Ruscitti
# License: LGPLv3 (see http://www.gnu.org/licenses/lgpl.html)
#
# Website - http://www.pilas-engine.com.ar
from pilas.actores import Actor
import pilas
DEMORA = 14
class Menu(Actor):
"""Un actor que puede mostra... | lgpl-3.0 |
devzero2000/RPM5 | python/test/test_rpm.py | 2 | 1590 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2009 Per Øyvind Karlsen <peroyvind@mandriva.org>
#
import unittest
from test.test_support import rmtree
import rpm
class Test_evrCompare(unittest.TestCase):
def test_e(self):
self.assertEqual(rpm.evrCompare("1", "2"), -1)
self.asser... | lgpl-2.1 |
Ditmar/plugin.video.pelisalacarta | pelisalacarta/channels/peliculasmx.py | 8 | 15499 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Canal para peliculasmx
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import urlparse,urllib2,urllib,re
import os, sys
from core... | gpl-3.0 |
digitalghost/pycv-gameRobot | ToolUtils.py | 1 | 4528 | # -*- coding: utf-8 -*
import subprocess
import time
import Settings
from com.android.monkeyrunner import MonkeyRunner, MonkeyDevice
class ToolUtils(object):
"""docstring for ClassName"""
def __init__(self):
super(ClassName, self).__init__()
@staticmethod
def getTouchPoint(region):
... | gpl-3.0 |
mhugo/QGIS | python/core/additions/processing.py | 26 | 1417 | # -*- coding: utf-8 -*-
"""
***************************************************************************
processing.py
---------------------
Date : May 2018
Copyright : (C) 2018 by Denis Rouzaud
Email : denis@opengis.ch
**************************************... | gpl-2.0 |
lecaoquochung/ddnb.django | tests/indexes/models.py | 46 | 1681 | from django.db import connection
from django.db import models
class CurrentTranslation(models.ForeignObject):
"""
Creates virtual relation to the translation with model cache enabled.
"""
# Avoid validation
requires_unique_target = False
def __init__(self, to, from_fields, to_fields, **kwargs... | bsd-3-clause |
jdreaver/vispy | examples/basics/visuals/markers.py | 17 | 2332 | # -*- coding: utf-8 -*-
# vispy: gallery 30
# -----------------------------------------------------------------------------
# Copyright (c) 2015, Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -----------------------------------------------------... | bsd-3-clause |
kartikp1995/gnuradio | gr-uhd/examples/python/usrp_wfm_rcv_fmdet.py | 58 | 14253 | #!/usr/bin/env python
#
# Copyright 2005-2007,2011,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 ... | gpl-3.0 |
zasdfgbnm/tensorflow | tensorflow/contrib/distributions/python/ops/vector_student_t.py | 15 | 10043 | # 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 |
pedropena/iteexe | twisted/tap/manhole.py | 20 | 1714 |
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
I am the support module for making a manhole server with mktap.
"""
from twisted.manhole import service
from twisted.spread import pb
from twisted.python import usage, util
from twisted.cred import portal, checkers
from twisted.ap... | gpl-2.0 |
gerddie/nipype | nipype/interfaces/cmtk/convert.py | 14 | 10363 | """
Change directory to provide relative paths for doctests
>>> import os
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
>>> datadir = os.path.realpath(os.path.join(filepath, '../../testing/data'))
>>> os.chdir(datadir)
"""
import os, os.path as op
import datetime
import string
imp... | bsd-3-clause |
cancro7/gem5 | util/pbs/job.py | 77 | 7221 | #!/usr/bin/env python
# Copyright (c) 2005 The Regents of The University of Michigan
# 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 copyrigh... | bsd-3-clause |
scizen9/kpy | NPK/Bar.py | 1 | 1338 | """
Create a console bar indicating the amount of time that's passed
"""
import sys
def setup(toolbar_width=40):
""" Initialize console with toolbar_width spaces between [ ]
Args:
toolbar_width: Number of spaces between the brackets
Returns:
toolbar_width [int]"""
# toolbar_wid... | gpl-2.0 |
plotly/python-api | packages/python/plotly/plotly/graph_objs/histogram2d/colorbar/_title.py | 2 | 6722 | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Title(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "histogram2d.colorbar"
_path_str = "histogram2d.colorbar.title"
_valid_props = {"font", "side"... | mit |
patochectp/navitia | source/jormungandr/jormungandr/interfaces/v1/ResourceUri.py | 2 | 9951 | # Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobility and open public tr... | agpl-3.0 |
blacklin/kbengine | kbe/src/lib/python/Lib/asyncio/base_subprocess.py | 63 | 6135 | import collections
import subprocess
from . import protocols
from . import transports
from .coroutines import coroutine
from .log import logger
class BaseSubprocessTransport(transports.SubprocessTransport):
def __init__(self, loop, protocol, args, shell,
stdin, stdout, stderr, bufsize,
... | lgpl-3.0 |
cccfran/sympy | sympy/physics/hep/gamma_matrices.py | 19 | 30764 | from sympy import S
from sympy.tensor.tensor import TensorIndexType, TensorIndex,\
TensMul, TensorHead, tensorsymmetry, TensorType,\
TensAdd, tensor_mul, get_lines
from sympy.core.containers import Tuple
DiracSpinorIndex = TensorIndexType('DiracSpinorIndex', dim=4, dummy_fmt="S")
class _LorentzContainer(obj... | bsd-3-clause |
flavour/cedarbluff | controllers/doc.py | 3 | 6605 | # -*- coding: utf-8 -*-
"""
Document Library - Controllers
"""
module = request.controller
if module not in deployment_settings.modules:
raise HTTP(404, body="Module disabled: %s" % module)
# =============================================================================
def index():
"Module's Home Page"
... | mit |
dutchbot/FoscamBackupper | test/unit/test_file_wrapper.py | 1 | 2868 |
import unittest
import unittest.mock as umock
from unittest.mock import call
import progressbar
from foscambackup.download_file_tracker import DownloadFileTracker
from test.mocks import mock_file_helper
WRITE = mock_file_helper.WRITE
WRITE.return_value = WRITE
class TestFileWrapper(unittest.TestCase):
def set... | gpl-3.0 |
tylertian/Openstack | openstack F/horizon/horizon/dashboards/syspanel/networks/ports/tables.py | 2 | 2941 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 NEC Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#... | apache-2.0 |
leansoft/edx-platform | common/lib/xmodule/xmodule/modulestore/tests/utils.py | 39 | 5990 | """
Helper classes and methods for running modulestore tests without Django.
"""
from importlib import import_module
from opaque_keys.edx.keys import UsageKey
from unittest import TestCase
from xblock.fields import XBlockMixin
from xmodule.x_module import XModuleMixin
from xmodule.modulestore import ModuleStoreEnum
fro... | agpl-3.0 |
0k/OpenUpgrade | addons/l10n_th/__init__.py | 893 | 1045 | # -*- 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 |
xdatravelbug/N909D_Kernel_JB_4.1.2 | tools/perf/scripts/python/check-perf-trace.py | 11214 | 2503 | # perf script event handlers, generated by perf script -g python
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# This script tests basic functionality such as flag and symbol
# strings, common_xxx() calls back into perf, begin, end, unhandled
# events, etc. ... | gpl-2.0 |
Servir-Mekong/ecodash | lib/httplib2/__init__.py | 48 | 71030 | from __future__ import generators
"""
httplib2
A caching http interface that supports ETags and gzip
to conserve bandwidth.
Requires Python 2.3 or later
Changelog:
2007-08-18, Rick: Modified so it's able to use a socks proxy if needed.
"""
__author__ = "Joe Gregorio (joe@bitworking.org)"
__copyright__ = "Copyright... | gpl-3.0 |
kybriainfotech/iSocioCRM | addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tools.py | 384 | 1576 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved
# $Id$
#
# This program is free software: you can redistribute it and/or modify
# ... | agpl-3.0 |
mwillmott/techbikers | server/api/urls.py | 1 | 2189 | from django.conf.urls import url, include
from .views.rides import RidesList, RideDetails, RideRidersList, RideRiderDetails, RideRiderCharge, RideRiderFundraiser
from .views.riders import RidersList, RiderProfile, RiderRides
from .views.chapters import ChaptersList, ChapterDetails, ChapterMembersList
from .views.sponso... | mit |
quarckster/cfme_tests | cfme/tests/automate/test_common_methods.py | 1 | 4431 | # -*- coding: utf-8 -*-
"""This module contains tests that test the universally applicable canned methods in Automate."""
import fauxfactory
import pytest
from datetime import timedelta, date
from cfme import test_requirements
from cfme.infrastructure.virtual_machines import InfraVmSummaryView
from cfme.infrastructur... | gpl-2.0 |
ironbox360/django | django/contrib/sessions/base_session.py | 348 | 1623 | """
This module allows importing AbstractBaseSession even
when django.contrib.sessions is not in INSTALLED_APPS.
"""
from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
class BaseSes... | bsd-3-clause |
ytjiang/django | tests/model_formsets/test_uuid.py | 45 | 1295 | from django.forms.models import inlineformset_factory
from django.test import TestCase
from .models import UUIDPKChild, UUIDPKParent
class InlineFormsetTests(TestCase):
def test_inlineformset_factory_nulls_default_pks(self):
"""
#24377 - If we're adding a new object, a parent's auto-generated pk
... | bsd-3-clause |
deandunbar/bitwave | hackathon_version/venv/lib/python2.7/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py | 56 | 13461 | from __future__ import unicode_literals
import os
from collections import OrderedDict
from optparse import make_option
from django.core.files.storage import FileSystemStorage
from django.core.management.base import CommandError, NoArgsCommand
from django.utils.encoding import smart_text
from django.utils.six.moves im... | mit |
damonkohler/sl4a | python/src/Lib/plat-irix5/GET.py | 132 | 1025 | # Symbols from <gl/get.h>
from warnings import warnpy3k
warnpy3k("the GET module has been removed in Python 3.0", stacklevel=2)
del warnpy3k
BCKBUFFER = 0x1
FRNTBUFFER = 0x2
DRAWZBUFFER = 0x4
DMRGB = 0
DMSINGLE = 1
DMDOUBLE = 2
DMRGBDOUBLE = 5
HZ30 = 0
HZ60 = 1
NTSC = 2
HDTV = 3
VGA = 4
IRIS3K = 5
PR60 = 6
PAL = 9
HZ3... | apache-2.0 |
mahak/keystone | keystone/common/policies/policy.py | 2 | 3808 | # 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
# distributed under t... | apache-2.0 |
u2009cf/spark-radar | examples/src/main/python/mllib/streaming_linear_regression_example.py | 77 | 2117 | #
# 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 |
Wattpad/luigi | luigi/mrrunner.py | 65 | 2641 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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 requ... | apache-2.0 |
chris-chris/tensorflow | tensorflow/contrib/seq2seq/python/ops/attention_wrapper.py | 8 | 27110 | # 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 |
ctbrennan/cross-platform-message-analytics | parse_analyze.py | 1 | 33998 | import sys
#sys.path.insert(0, '/home/connor/Documents/prj/parser/FB-Message-Parser/')
import fb_parser
import imessage_export
from collections import OrderedDict
import json
from datetime import datetime
from wordcloud import WordCloud
import calendar
import os, os.path #parseAllThreads
import nltk
import xml.etree.El... | mit |
Basis/webargs | webargs/core.py | 1 | 18589 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import collections
import functools
import inspect
import logging
import warnings
try:
import simplejson as json
except ImportError:
import json
import marshmallow as ma
from marshmallow.compat import iteritems
from marshmallow.utils import missi... | mit |
crosswalk-project/chromium-crosswalk-efl | tools/telemetry/telemetry/page/page_test.py | 25 | 12426 | # 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.
from telemetry.core import command_line
from telemetry.page import test_expectations
from telemetry.page.actions import action_runner as action_runner_module... | bsd-3-clause |
oVirt/ovirt-register | src/ovirt_register/system.py | 2 | 3282 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2015 Red Hat, 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, version 2 of the License.
#
# This program is distributed in the hope that it will ... | gpl-2.0 |
solashirai/edx-platform | cms/djangoapps/contentstore/tests/test_users_default_role.py | 115 | 5183 | """
Unit tests for checking default forum role "Student" of a user when he creates a course or
after deleting it creates same course again
"""
from contentstore.tests.utils import AjaxEnabledTestClient
from contentstore.utils import delete_course_and_groups, reverse_url
from courseware.tests.factories import UserFactor... | agpl-3.0 |
iivic/BoiseStateX | lms/djangoapps/lms_migration/migrate.py | 80 | 8921 | #
# migration tools for content team to go from stable-edx4edx to LMS+CMS
#
import json
import logging
import os
import xmodule.modulestore.django as xmodule_django
from xmodule.modulestore.django import modulestore
from django.http import HttpResponse
from django.conf import settings
import track.views
try:
fro... | agpl-3.0 |
akaariai/django | django/contrib/staticfiles/management/commands/runserver.py | 248 | 1361 | from django.conf import settings
from django.contrib.staticfiles.handlers import StaticFilesHandler
from django.core.management.commands.runserver import \
Command as RunserverCommand
class Command(RunserverCommand):
help = "Starts a lightweight Web server for development and also serves static files."
d... | bsd-3-clause |
mjs/juju | acceptancetests/repository/charms/mysql/hooks/common.py | 2 | 3867 | # vim: syntax=python
import os
import sys
import MySQLdb
import subprocess
import uuid
def get_service_user_file(service):
return '/var/lib/mysql/%s.service_user2' % service
def status_set(mode, message):
subprocess.check_call(["status-set", mode, message])
def get_service_user(service):
if service == '... | agpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.