code stringlengths 2 1.05M | repo_name stringlengths 5 104 | path stringlengths 4 251 | language stringclasses 1
value | license stringclasses 15
values | size int32 2 1.05M |
|---|---|---|---|---|---|
# -*- coding: utf-8 -*-
#
# Copyright (c) 2005,2006,2007,2008,2009 Brett Adams <brett@belizebotanic.org>
# Copyright (c) 2012-2015 Mario Frasca <mario@anche.no>
#
# This file is part of bauble.classic.
#
# bauble.classic is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Pub... | mfrasca/bauble.classic | bauble/meta.py | Python | gpl-2.0 | 2,702 |
# -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009,
## 2010, 2011, 2012, 2013, 2014, 2015, 2016 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published b... | inspirehep/invenio | modules/bibindex/lib/bibindex_engine.py | Python | gpl-2.0 | 105,731 |
# -*- coding: utf-8 -*-
import sys
import math
from pylab import *
try:
import moose
except ImportError:
print("ERROR: Could not import moose. Please add the directory containing moose.py in your PYTHONPATH")
import sys
sys.exit(1)
from moose.utils import * # for BSplineFill
class GluSyn_STG(moose.... | BhallaLab/moose-examples | neuroml/lobster_pyloric/synapses/GluSyn_STG.py | Python | gpl-2.0 | 2,442 |
# -*-coding:utf-8 -*-
class A(object):
def __init__(self):
print("class A--->enter A")
print("class A--->leave A")
class B(object):
def __init__(self):
print("class B--->enter B")
print("class B--->leave B")
class C(A):
def __init__(self):
print("class C--->ente... | huangshaoqi/learn | test/OOP/learn-1/oop_super.py | Python | gpl-2.0 | 1,316 |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2003-2006 Donald N. Allingham
# Copyright (C) 2007-2012 Brian G. Matherly
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2012-2014 Paul Franklin
# Copyright (C) 2012 Nicolas Adenis-Lamarre
# Copyright (C) 2012 Benny Malengier
#
# This... | jralls/gramps | gramps/plugins/drawreport/fanchart.py | Python | gpl-2.0 | 33,745 |
from enigma import eDVBFrontendParametersSatellite, eDVBFrontendParametersCable, eDVBFrontendParametersTerrestrial, eDVBFrontendParametersATSC
from Components.NimManager import nimmanager
def orbpos(pos):
return pos > 3600 and "N/A" or "%d.%d\xc2\xb0%s" % (pos > 1800 and ((3600 - pos) / 10, (3600 - pos) % 10, "W") or... | fairbird/OpenPLI-BlackHole | lib/python/Tools/Transponder.py | Python | gpl-2.0 | 11,703 |
from __future__ import division
from __future__ import print_function
from __future__ import absolute_import
from __future__ import unicode_literals
import os
import fs_uae_launcher.fsui as fsui
from ..Settings import Settings
from ..I18N import _, ngettext
from .Skin import Skin
class LauncherFileDialog(fsui.FileDia... | cnvogelg/fs-uae-gles | launcher/fs_uae_launcher/ui/LauncherFileDialog.py | Python | gpl-2.0 | 2,280 |
#! /usr/bin/env python2
# -*- coding: utf-8 -*-
# Copyright (c) 2011-2012, The Linux Foundation. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain t... | kogone/AK-Angler | scripts/gcc-wrapper.py | Python | gpl-2.0 | 3,610 |
# This is a sample quisk_conf.py configuration file for a SoftRock Rx/Tx Ensemble or
# other SoftRock that has both transmit and receive capability. You need two sound
# cards, a high quality card to capture radio samples and play microphone sound; and
# a lower quality card to play radio sound and capture the microph... | gonesurfing/Quisk_rpi_remote | softrock/conf_rx_tx_ensemble.py | Python | gpl-2.0 | 2,177 |
#
# Copyright (c) 2008--2011 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... | dmacvicar/spacewalk | backend/server/action_extra_data/reboot.py | Python | gpl-2.0 | 1,085 |
from __future__ import print_function, division, absolute_import
from mdtraj.utils.six import PY2
from mdtraj.utils.six.moves import xrange
import sys
import types
import random
import numpy as np
try:
import fastcluster
except ImportError:
pass
import scipy.cluster.hierarchy
import mdtraj as md
from msmbuild... | mpharrigan/msmbuilder | MSMBuilder/clustering.py | Python | gpl-2.0 | 49,464 |
# -*- coding: utf-8 -*-
import pytest
from cfme import test_requirements
from cfme.services.myservice import MyService
from cfme.services.service_catalogs import ServiceCatalogs
from cfme.utils import testgen
from cfme.utils.blockers import GH
from cfme.utils.log import logger
pytestmark = [
test_requirements.se... | Yadnyawalkya/integration_tests | cfme/tests/services/test_config_provider_servicecatalogs.py | Python | gpl-2.0 | 4,833 |
from Screen import Screen
from Components.ServiceEventTracker import ServiceEventTracker
from Components.ActionMap import ActionMap
from Components.ConfigList import ConfigListScreen
from Components.ChoiceList import ChoiceList, ChoiceEntryComponent
from Components.config import config, ConfigSubsection, getConfigListE... | popazerty/e2-dmm | lib/python/Screens/AudioSelectionExtended.py | Python | gpl-2.0 | 9,756 |
# -*- 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 ... | marnnie/Cable-buenaventura | plugin.video.genesis/modules/resolvers/played.py | Python | gpl-2.0 | 1,169 |
# pylint: disable=missing-docstring
import asyncio
async def bla1():
await asyncio.sleep(1)
async def bla2():
await asyncio.sleep(2)
async def combining_coroutine1():
await bla1()
await bla2()
async def combining_coroutine2():
future1 = bla1()
future2 = bla2()
await asyncio.gather(f... | kczapla/pylint | pylint/test/functional/assignment_from_no_return_py3.py | Python | gpl-2.0 | 495 |
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... | kohoumas/ns-3-click-mac-dev | src/point-to-point-layout/bindings/modulegen__gcc_LP64.py | Python | gpl-2.0 | 416,617 |
# -*- coding: utf-8 -*-
# vi:si:et:sw=4:sts=4:ts=4
##
## Copyright (C) 2007 Async Open Source <http://www.async.com.br>
## All rights reserved
##
## 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 Foundati... | andrebellafronte/stoq | stoqlib/gui/dialogs/tillhistory.py | Python | gpl-2.0 | 4,857 |
# Copyright (C) 2009 Canonical Ltd
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in ... | Distrotech/bzr | bzrlib/tests/per_workingtree/test_check.py | Python | gpl-2.0 | 2,606 |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2003-2006 Donald N. Allingham
# 2009 Gary Burton
#
# 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... | pmghalvorsen/gramps_branch | gramps/gui/selectors/selectobject.py | Python | gpl-2.0 | 3,463 |
#! /usr/bin/env python
###############################################################################
#
# simulavr - A simulator for the Atmel AVR family of microcontrollers.
# Copyright (C) 2001, 2002 Theodore A. Roth
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of th... | zouppen/simulavr | regress/modules/gdb_rsp.py | Python | gpl-2.0 | 7,633 |
# -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2012, 2013, 2014, 2015 CERN.
#
# Zenodo 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 o... | otron/zenodo | zenodo/shell.py | Python | gpl-3.0 | 3,274 |
# (c) 2013-2014, Michael DeHaan <michael.dehaan@gmail.com>
# Stephen Fromm <sfromm@gmail.com>
# Brian Coca <briancoca+dev@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 publish... | himyouten/ansible | lib/ansible/runner/action_plugins/assemble.py | Python | gpl-3.0 | 5,733 |
#
# Turn off logging in extensions (too loud!)
import vb2py.extensions
vb2py.extensions.disableLogging()
from vb2py.vbparser import buildParseTree, VBParserError
#
# Set some config options which are appropriate for testing
import vb2py.config
Config = vb2py.config.VB2PYConfig()
Config.setLocalOveride("General", "Rep... | reingart/vb2py | vb2py/test/testparser.py | Python | gpl-3.0 | 41,055 |
# -*- 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 'Cluster.disable_instance_creation'
db.add_column('ganeti_cluster', 'disable_instance_creatio... | irregulator/ganetimgr | ganeti/migrations/0012_auto__add_field_cluster_disable_instance_creation.py | Python | gpl-3.0 | 6,975 |
#!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import with_statement
__license__ = 'GPL v3'
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import os, cPickle, re, shutil, marshal, zipfile, glob, time, subprocess, sys
from zl... | yeyanchao/calibre | setup/resources.py | Python | gpl-3.0 | 12,158 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('course', '0032_auto_20170215_0953'),
('exercise', '0025_auto_20170215_0953'),
]
operations = [
migrations.CreateMode... | teemulehtinen/a-plus | threshold/migrations/0001_initial.py | Python | gpl-3.0 | 2,684 |
import os
print "Tic Tac Toe".center(50,'-')
l = [['_','_','_'],['_','_','_'],['_','_','_']]
def show(l) :
os.system("clear")
for i in range(0,3) :
for j in range(0,3) :
print l[i][j]," ",
print "\n"
def base() :
print "provided numbers for provided positions"
num = 0
for i in range (0,3) :
for j in ... | avinash-n/work-1 | python_program/day_3/tic_tac_toe.py | Python | gpl-3.0 | 2,433 |
#!/usr/bin/env python3
import argparse
import feedparser
import logging
import praw
import requests
from config import *
from bs4 import BeautifulSoup
from html2text import html2text
logging.basicConfig(format='%(asctime)s::%(levelname)s:%(message)s',
filename='redditbot.log',
... | dbxnr/redditbot | redditbot.py | Python | gpl-3.0 | 4,394 |
# GPL3
import bpy
import sverchok
node_classes = {}
def register_node_class(class_ref):
node_classes[class_ref.bl_idname] = class_ref
bpy.utils.register_class(class_ref)
def unregister_node_class(class_ref):
del node_classes[class_ref.bl_idname]
bpy.utils.unregister_class(class_ref)
def register_n... | elfnor/sverchok | utils/__init__.py | Python | gpl-3.0 | 2,778 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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 = {
'metadat... | cchurch/ansible | lib/ansible/modules/cloud/vmware/vmware_host_ssl_facts.py | Python | gpl-3.0 | 4,711 |
"""
Simple Excel addin, requires www.pyxll.com
"""
from pyxll import xl_func, get_config, xl_macro, get_active_object
from pyxll import xl_menu
import win32api
import webbrowser
import os
import win32com.client
from pycel.excelwrapper import ExcelComWrapper
from pycel.excelcompiler import ExcelCompiler
@xl_menu("Open... | gdementen/pycel | src/pycel/addin.py | Python | gpl-3.0 | 1,779 |
""" This module exposes the BaseClient class,
which serves as base for InnerRPCClient and TransferClient.
"""
__RCSID__ = "$Id$"
import time
import thread
import DIRAC
from DIRAC.Core.DISET.private.Protocols import gProtocolDict
from DIRAC.FrameworkSystem.Client.Logger import gLogger
from DIRAC.Core.Utilities imp... | Andrew-McNab-UK/DIRAC | Core/DISET/private/BaseClient.py | Python | gpl-3.0 | 26,577 |
from couchpotato import get_session
from couchpotato.api import addApiView
from couchpotato.core.event import addEvent
from couchpotato.core.helpers.encoding import toUnicode
from couchpotato.core.helpers.request import jsonified, getParams
from couchpotato.core.helpers.variable import mergeDicts, md5, getExt
from couc... | jayme-github/CouchPotatoServer | couchpotato/core/plugins/quality/main.py | Python | gpl-3.0 | 8,674 |
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | nortikin/sverchok | nodes/object_nodes/getsetprop.py | Python | gpl-3.0 | 9,277 |
from solver_base import *
from copy import copy
class IntegratedRateControlSolver(SolverBase):
"""Class for estimating rates based on the degree of rate control
screening method {citation after published}"""
def __init__(self,reaction_model=None):
SolverBase.__init__(self,reaction_model)
v... | montoyjh/catmap | catmap/solvers/integrated_rate_control_solver.py | Python | gpl-3.0 | 2,678 |
# -*- coding: utf-8 -*-
"""
vcs.backends.git.repository
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Git repository implementation.
:created_on: Apr 8, 2010
:copyright: (c) 2010-2011 by Marcin Kuzminski, Lukasz Balcerzak.
"""
import os
import re
import time
import urllib
import urllib2
import logging
import posix... | zhumengyuan/kallithea | kallithea/lib/vcs/backends/git/repository.py | Python | gpl-3.0 | 25,623 |
import phasing
| andyofmelbourne/crappy-crystals | utils/gpu/__init__.py | Python | gpl-3.0 | 15 |
#!/usr/bin/env python
"""
@file checkSvnProps.py
@author Michael Behrisch
@date 2010
@version $Id: checkSvnProps.py 14493 2013-08-24 21:24:04Z behrisch $
Checks svn property settings for all files.
SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
Copyright (C) 2010-2013 DLR (http://www.dlr.de/) and... | cathyyul/sumo | tools/build/checkSvnProps.py | Python | gpl-3.0 | 6,649 |
#!/usr/bin/python -tt
# -*- coding: utf-8 -*-
# For debugging
NPLUS = True
class FakePlugin(object):
def log(self, text):
print text
from urllib import urlopen
try:
from pynicotine.pluginsystem import BasePlugin
except ImportError:
NPLUS = False
print "It seems this plugin is not loaded from ... | gfarmerfr/nicotine-plus | plugins/allmusic-url2search/__init__.py | Python | gpl-3.0 | 2,542 |
# -*- coding: utf-8 -*-
class Charset:
common_name = u'Google Fonts: Extras'
native_name = u''
def glyphs(self):
glyphs = [0xe0ff] # PUA: Font logo
glyphs += [0xeffd] # PUA: Font version number
glyphs += [0xf000] # PUA: font ppem size indicator: run `ftview -f 1255 10 Ubuntu-Regula... | davelab6/pyfontaine | fontaine/charsets/internals/google_extras.py | Python | gpl-3.0 | 372 |
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Copyright (c) 2014 Mozilla Corporation
class message(object):
def __init__(self):
'''
intended to... | Phrozyn/MozDef | tests/mozdef_util/test_plugins/plugin4.py | Python | mpl-2.0 | 567 |
# -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2018-08-13 15:29
from __future__ import unicode_literals
import django.core.validators
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0002_pytz_2018_5_and_username'),
]
operatio... | jwhitlock/kuma | kuma/users/migrations/0003_user_discourse_url.py | Python | mpl-2.0 | 650 |
# Copyright 2015 ETH Zurich
#
# 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, sof... | caterinaurban/Typpete | typpete/tests/scion_err/lib/defines.py | Python | mpl-2.0 | 4,117 |
###############################################################################
#
# Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>).
#
# 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 ... | Micronaet/micronaet-mx8 | mx_pick_in/__openerp__.py | Python | agpl-3.0 | 1,557 |
"""
This module provides an abstraction for working with XModuleDescriptors
that are stored in a database an accessible using their Location as an identifier
"""
import logging
import re
import json
import datetime
from pytz import UTC
from collections import defaultdict
import collections
from contextlib import cont... | CourseTalk/edx-platform | common/lib/xmodule/xmodule/modulestore/__init__.py | Python | agpl-3.0 | 55,549 |
# -*- coding: utf-8 -*-
############################################################################################
#
# Zoook. OpenERP e-sale, e-commerce Open Source Management Solution
# Copyright (C) 2011 Zikzakmedia S.L. (<http://www.zikzakmedia.com>). All Rights Reserved
# $Id$
#
# This program is free... | maheshnakarmi/django-zoook-master | django_zoook/base/models.py | Python | agpl-3.0 | 3,534 |
# -*- coding: utf-8 -*-
# Copyright 2021 El Nogal - Pedro Gómez <pegomez@elnogal.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import registry
from openerp.addons import jasper_reports
def parser(cr, uid, ids, data, context):
parameters = {}
name = 'report.invoice_report_j... | Comunitea/CMNT_00040_2016_ELN_addons | eln_reports/report/invoice/invoice_report_parser.py | Python | agpl-3.0 | 2,501 |
import pymongo
import gridfs
from gridfs.errors import NoFile
from xmodule.contentstore.content import XASSET_LOCATION_TAG
import logging
from .content import StaticContent, ContentStore, StaticContentStream
from xmodule.exceptions import NotFoundError
from fs.osfs import OSFS
import os
import json
from bson.son imp... | xiandiancloud/edxplaltfom-xusong | common/lib/xmodule/xmodule/contentstore/mongo.py | Python | agpl-3.0 | 17,630 |
# -*- coding: utf-8 -*-
#########################################################################
## This scaffolding model makes your app work on Google App Engine too
#########################################################################
if request.env.web2py_runtime_gae: # if running on Google App E... | google-code/ampatu | models/db.py | Python | agpl-3.0 | 4,254 |
# The Hazard Library
# Copyright (C) 2015, GEM Foundation
#
# 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 later version.
#
# T... | g-weatherill/oq-hazardlib | openquake/hazardlib/tests/gsim/gsim_table_test.py | Python | agpl-3.0 | 29,750 |
#!/usr/bin/env python
# This file mainly exists to allow python setup.py test to work.
#
# You can test all the variations of tests by running:
#
# ./manage.py test && python runtests.py && ./setup.py test && echo OK
#
import os, sys
os.environ['DJANGO_SETTINGS_MODULE'] = 'test_settings'
from django.core.managemen... | ciudadanointeligente/popit-django | runtests.py | Python | agpl-3.0 | 621 |
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2004-2012 Pexego Sistemas Informáticos All Rights Reserved
# $Marta Vázquez Rodríguez$ <marta@pexego.es>
#
# This program is free software: you can redistribute it and/or modify
# it unde... | Pexego/alimentacion | performance_calculation/stock.py | Python | agpl-3.0 | 1,773 |
import os
import sys
from sqlobject.compat import load_module_from_file
def load_module(module_name):
mod = __import__(module_name)
components = module_name.split('.')
for comp in components[1:]:
mod = getattr(mod, comp)
return mod
def load_module_from_name(filename, module_name):
if mod... | drnlm/sqlobject | sqlobject/util/moduleloader.py | Python | lgpl-2.1 | 1,175 |
##############################################################################
# Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | krafczyk/spack | var/spack/repos/builtin/packages/perl-soap-lite/package.py | Python | lgpl-2.1 | 1,976 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# This file is part of Cockpit.
#
# Copyright (C) 2015 Red Hat, Inc.
#
# Cockpit is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the Lice... | haiyangd/cockpit_view | test/storagelib.py | Python | lgpl-2.1 | 6,735 |
"""Spyse OODA behaviour module"""
import time
# http://www.mindsim.com/MindSim/Corporate/OODA.html
# http://www.d-n-i.net/second_level/boyd_military.htm
# http://www.belisarius.com/modern_business_strategy/boyd/essence/eowl_frameset.htm
# http://www.valuebasedmanagement.net/methods_boyd_ooda_loop.html
# http:... | davidko/evolspyse | core/behaviours/ooda.py | Python | lgpl-2.1 | 1,291 |
import pytest
from sqlobject import boundattributes
from sqlobject import declarative
pytestmark = pytest.mark.skipif(
True,
reason='The module "boundattributes" and its tests were not finished yet')
class SOTestMe(object):
pass
class AttrReplace(boundattributes.BoundAttribute):
__unpackargs__ = ... | drnlm/sqlobject | sqlobject/tests/test_boundattributes.py | Python | lgpl-2.1 | 1,672 |
from hpp.corbaserver.rbprm.rbprmbuilder import Builder
from hpp.corbaserver.rbprm.rbprmfullbody import FullBody
from hpp.gepetto import Viewer
from hpp.gepetto import PathPlayer
import down_spidey_path as path_planner
#~ import hrp2_model as model
import time
tp = path_planner
packageName = 'hpp-rbprm-corba'
meshPa... | pFernbach/hpp-rbprm-corba | script/scenarios/sandbox/siggraph_asia/spiderman/down_spidey_interp.py | Python | lgpl-3.0 | 4,445 |
# -*- coding: utf-8 -*-
#
# This file is part of Glances.
#
# Copyright (C) 2014 Nicolargo <nicolas@nicolargo.com>
#
# Glances is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the Lic... | jamesblunt/glances | glances/plugins/glances_diskio.py | Python | lgpl-3.0 | 5,679 |
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import scoped_session, sessionmaker, mapper
from sqlalchemy.engine import Engine
from sqlalchemy import event, create_engine, func
from sqlalchemy import and_, or_, schema, types, MetaData, Sequence, Column, ForeignKey, UniqueConstraint, Tabl... | edawine/fatools | fatools/lib/sqlmodels2/schema.py | Python | lgpl-3.0 | 25,673 |
__all__ = ['deque', 'defaultdict', 'namedtuple', 'UserDict', 'UserList',
'UserString', 'Counter', 'OrderedDict', 'ChainMap']
# For backwards compatibility, continue to make the collections ABCs
# available through the collections module.
from _collections_abc import *
import _collections_abc
__all__... | Orav/kbengine | kbe/src/lib/python/Lib/collections/__init__.py | Python | lgpl-3.0 | 43,096 |
#!/usr/bin/python
#
# Copyright (C) 2010-2015 Gordon Fraser, Andrea Arcuri and EvoSuite
# contributors
#
# This file is part of EvoSuite.
#
# EvoSuite is free software: you can redistribute it and/or modify it
# under the terms of the GNU Lesser Public License as published by the
# Free Software Foundation, either vers... | SoftwareEngineeringToolDemos/FSE-2011-EvoSuite | release_results/script/experiments_base.py | Python | lgpl-3.0 | 5,733 |
"""
Test APIs.
"""
import json
import pytest
from mock import patch
from coursera import api
from coursera.test.utils import slurp_fixture
@pytest.fixture
def course():
course = api.CourseraOnDemand(session=None, course_id='0')
return course
@patch('coursera.api.get_page_json')
def test_ondemand_programm... | iemejia/coursera-dl | coursera/test/test_api.py | Python | lgpl-3.0 | 4,808 |
#!python3
"""
This script downloads the favicons
Usage:
python3 update_alexa path/to/data.csv
"""
import os
import requests
favicon_path = os.path.join(os.path.dirname(__file__), "..", "icons")
def download_favicons(links):
for link in links:
netloc = link['netloc']
url = 'http://' + netloc... | engineerapart/TheRemoteFreelancer | docs/scripts/download_favicons.py | Python | unlicense | 964 |
# Django settings for trywsk project.
DEBUG = False
TEMPLATE_DEBUG = DEBUG
import os
from unipath import Path
PROJECT_ROOT = Path(__file__).ancestor(2)
PROJECT_ROOT = os.path.join(PROJECT_ROOT,'whisk_tutorial')
ADMINS = (
('IBM jStart', 'jstart@us.ibm.com'),
)
MANAGERS = ADMINS
DATABASES = {}
TEST_RUNNER = ... | ZmG/openwhisk-tutorial | deploy_settings/base.py | Python | apache-2.0 | 6,242 |
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from builtins import *
import numpy as np
from .rnn_base import RNNBase
from .utils import SymbolTable
class TextRNN(RNNBase):
"""TextRNN for strings of text."""
... | HazyResearch/snorkel | snorkel/learning/tensorflow/rnn/text_rnn.py | Python | apache-2.0 | 1,044 |
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2008,2009,2010,2011,2012,2013 Contributor
#
# 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... | stdweird/aquilon | lib/python2.6/aquilon/worker/commands/show_organization_all.py | Python | apache-2.0 | 1,252 |
from dtest import Tester, debug, PRINT_DEBUG
from tools import no_vnodes
from ccmlib.cluster import Cluster
import re, os, time
from collections import defaultdict
from cassandra.query import SimpleStatement
from cassandra import ConsistencyLevel
TRACE_DETERMINE_REPLICAS = re.compile('Determining replicas for mutation... | yukim/cassandra-dtest | replication_test.py | Python | apache-2.0 | 10,925 |
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2008,2009,2010,2011,2012,2013,2014,2015 Contributor
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obt... | quattor/aquilon | lib/aquilon/worker/commands/del_filesystem.py | Python | apache-2.0 | 1,059 |
# Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apark263/tensorflow | tensorflow/contrib/tensorrt/test/memory_alignment_test.py | Python | apache-2.0 | 2,982 |
from __future__ import absolute_import
import random
from six import text_type
from typing import Any, Dict, Optional, SupportsInt
from zerver.models import PushDeviceToken, UserProfile
from zerver.models import get_user_profile_by_id
from zerver.lib.timestamp import timestamp_to_datetime
from zerver.decorator import... | peguin40/zulip | zerver/lib/push_notifications.py | Python | apache-2.0 | 10,547 |
"""Add sort index to task_groups and cycle_task_groups
Revision ID: 468290d5494f
Revises: 1f1ab1d371b6
Create Date: 2014-07-25 08:25:39.074611
"""
# revision identifiers, used by Alembic.
revision = '468290d5494f'
down_revision = '1f1ab1d371b6'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql imp... | vladan-m/ggrc-core | src/ggrc_workflows/migrations/versions/20140725082539_468290d5494f_add_sort_index_to_task_groups_and_cycle_.py | Python | apache-2.0 | 2,077 |
#!/usr/bin/python
#
# Copyright 2012 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 b... | iLotus/googleads-adsensehost-examples | python/v4.x/get_all_ad_units_for_publisher.py | Python | apache-2.0 | 2,497 |
# -*- coding: iso-8859-15 -*-
#
# 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 appli... | forslund/mycroft-core | test/unittests/util/test_format.py | Python | apache-2.0 | 30,604 |
# Copyright 2012 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 requ... | yanheven/neutron | neutron/agent/dhcp/agent.py | Python | apache-2.0 | 24,464 |
#
# 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... | nathanielvarona/airflow | airflow/contrib/sensors/sagemaker_tuning_sensor.py | Python | apache-2.0 | 1,201 |
# 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 a... | google/rappor | tests/fastrand.py | Python | apache-2.0 | 1,198 |
# -*- coding: utf-8 -*-
import mockups
from datetime import datetime
from django.contrib.auth.models import User, UNUSABLE_PASSWORD
from mockups import Mockup, Factory
from mockups import generators
class UserFactory(Factory):
username = generators.UUIDGenerator(max_length=30)
first_name = generators.LoremWor... | CarlosMart626/umusicfy | umusicfy/mockups/contrib/auth.py | Python | apache-2.0 | 3,112 |
#
# 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
# ... | dims/heat | heat/engine/clients/os/glance.py | Python | apache-2.0 | 4,221 |
"""Class to hold all switch accessories."""
import logging
from pyhap.const import (
CATEGORY_FAUCET,
CATEGORY_OUTLET,
CATEGORY_SHOWER_HEAD,
CATEGORY_SPRINKLER,
CATEGORY_SWITCH,
)
from homeassistant.components.switch import DOMAIN
from homeassistant.components.vacuum import (
DOMAIN as VACUUM_... | turbokongen/home-assistant | homeassistant/components/homekit/type_switches.py | Python | apache-2.0 | 7,993 |
from __future__ import absolute_import
import datetime
import pytz
from django.core.management.base import BaseCommand
from django.db.models import Count
from zerver.models import UserProfile, Realm, Stream, Message, Recipient, UserActivity, \
Subscription, UserMessage, get_realm
MOBILE_CLIENT_LIST = ["Android",... | gkotian/zulip | analytics/management/commands/realm_stats.py | Python | apache-2.0 | 7,855 |
# 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 ... | ninefold/libcloud | libcloud/storage/drivers/ninefold.py | Python | apache-2.0 | 1,037 |
"""Support for INSTEON dimmers via PowerLinc Modem."""
import logging
from homeassistant.helpers.entity import Entity
from .insteon_entity import InsteonEntity
_LOGGER = logging.getLogger(__name__)
async def async_setup_platform(hass, config, async_add_entities, discovery_info=None):
"""Set up the INSTEON devi... | postlund/home-assistant | homeassistant/components/insteon/sensor.py | Python | apache-2.0 | 876 |
#----------------------------------------------------------------------
# Copyright (c) 2010 Raytheon BBN Technologies
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and/or hardware specification (the "Work") to
# deal in the Work without restriction, including witho... | dana-i2cat/felix | expedient/src/python/expedient/common/federation/geni/ch.py | Python | apache-2.0 | 15,839 |
# 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 agre... | nett55/caniusepypy | caniusepypy/command.py | Python | apache-2.0 | 1,565 |
#!/usr/bin/env python
import sys
import time
import signal
import optparse
try:
import whisper
except ImportError:
raise SystemExit('[ERROR] Please make sure whisper is installed properly')
# Ignore SIGPIPE
signal.signal(signal.SIGPIPE, signal.SIG_DFL)
now = int(time.time())
option_parser = optparse.OptionPars... | deniszh/whisper | bin/whisper-update.py | Python | apache-2.0 | 1,129 |
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | mlperf/training_results_v0.7 | Google/benchmarks/resnet/implementations/resnet-cloud-TF2.0-tpu-v3-32/resnet_ctl_imagenet_test_tpu.py | Python | apache-2.0 | 4,107 |
# EMACS settings: -*- tab-width: 2; indent-tabs-mode: t -*-
# vim: tabstop=2:shiftwidth=2:noexpandtab
# kate: tab-width 2; replace-tabs off; indent-width 2;
#
# ==============================================================================
# Authors: Patrick Lehmann
#
# Python Class: TODO
#
# Description:
# -... | hoangt/PoC | py/Base/Exceptions.py | Python | apache-2.0 | 2,252 |
from rest_framework import generics
from rest_framework import permissions as drf_permissions
from rest_framework.exceptions import NotFound
from framework.auth.oauth_scopes import CoreScopes
from osf.models import (
Guid,
BaseFileNode,
FileVersion,
QuickFilesNode
)
from api.base.exceptions import Go... | chennan47/osf.io | api/files/views.py | Python | apache-2.0 | 5,890 |
from google.protobuf.timestamp_pb2 import Timestamp
from protobuf_example.addressbook.pb_addressbook import addressbook_pb2
if __name__ == '__main__':
ts = Timestamp()
ts.GetCurrentTime()
person1 = addressbook_pb2.Person()
person1.id = 1
person1.name = "Mikasa"
person1.email = "mikasa@gmail.c... | fs714/concurrency-example | protobuf_example/addressbook/addressbook.py | Python | apache-2.0 | 1,357 |
# Copyright 2015 Tigera, 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 writing, ... | caseydavenport/calico-docker | tests/st/policy/test_profile.py | Python | apache-2.0 | 15,579 |
# Copyright DataStax, 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 writing, softwa... | mambocab/python-driver | tests/unit/test_exception.py | Python | apache-2.0 | 2,365 |
# Copyright (c) 2010-2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | psachin/swift | swift/common/ring/builder.py | Python | apache-2.0 | 79,375 |
import unittest
import random, sys
sys.path.extend(['.','..','py'])
import h2o, h2o_cmd, h2o_rf, h2o_hosts, h2o_import as h2i
# RF train parameters
paramsTrainRF = {
'ntree' : 100,
'depth' : 300,
'bin_limit' : 20000,
'ignore' : None,
'stat_ty... | janezhango/BigDataMachineLearning | py/testdir_ec2/test_rf_iris.py | Python | apache-2.0 | 2,017 |
# -*- coding: utf-8 -*-
import os
from django.db import models
from django.db.models import Q
from seahub.tags.models import FileUUIDMap
from seahub.utils import normalize_file_path
class RelatedFilesManager(models.Manager):
def get_related_files_uuid(self, uuid):
related_files_uuid = super(RelatedFi... | miurahr/seahub | seahub/related_files/models.py | Python | apache-2.0 | 2,806 |
# -*- coding: utf-8 -*-
'''
:codeauthor: :email:`Jayesh Kariya <jayeshk@saltstack.com>`
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing Libs
from salttesting import skipIf, TestCase
from salttesting.mock import (
NO_MOCK,
NO_MOCK_REASON,
MagicMock,
patch)
from... | stephane-martin/salt-debian-packaging | salt-2016.3.3/tests/unit/states/openstack_config_test.py | Python | apache-2.0 | 3,668 |
from .maxrects import MaxRectsBssf
import operator
import itertools
import collections
import decimal
# Float to Decimal helper
def float2dec(ft, decimal_digits):
"""
Convert float (or int) to Decimal (rounding up) with the
requested number of decimal digits.
Arguments:
ft (float, int): Numb... | secnot/rectpack | rectpack/packer.py | Python | apache-2.0 | 17,585 |
'''
Copyright 2015 University of Auckland
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... | alan-wu/neon | src/opencmiss/neon/ui/editors/spectrumeditorwidget.py | Python | apache-2.0 | 26,338 |
# Copyright 2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | blueboxgroup/keystone | keystone/controllers.py | Python | apache-2.0 | 6,964 |
# -*- coding: utf-8 -*-
"""Configuration introspection and defaults."""
from __future__ import absolute_import, unicode_literals
import sys
from collections import deque, namedtuple
from datetime import timedelta
from celery.five import items, keys, python_2_unicode_compatible
from celery.utils.functional import memo... | cloudera/hue | desktop/core/ext-py/celery-4.2.1/celery/app/defaults.py | Python | apache-2.0 | 12,860 |