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 |
|---|---|---|---|---|---|
"""
Autotest command parser
@copyright: Don Zickus <dzickus@redhat.com> 2011
"""
import os, re, sys, logging
from autotest.client import os_dep, utils
from autotest.client.shared import global_config, logging_config, logging_manager
from autotest.client.shared import packages
GLOBAL_CONFIG = global_config.global_con... | ColinIanKing/autotest | client/cmdparser.py | Python | gpl-2.0 | 8,174 |
#!/bin/python
# coding: utf-8
import tornado.ioloop
import tornado.web
import mosquitto
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.write('<html><body>'
'<form action="/" method="post">'
'<... | aquaviter/speak_raspberry_pi | speak.py | Python | gpl-2.0 | 1,264 |
import os
from fabric.api import task, local, lcd, env
@task
def provision(args=''):
"""
Provision the box using ansible, optionally pass in some args,
e.g:
``fab use:vagrant provision:'--tags env'``
"""
with lcd(os.path.join(env.root, 'provisioning')):
local('ansible-playbook {}... | farridav/fabric-magento | provisioning.py | Python | gpl-2.0 | 689 |
# Django
from django import forms
# local Django
from volunteer.models import Volunteer
from shift.models import Report
class ReportForm(forms.Form):
event_name = forms.RegexField(
regex=r'^[(A-Z)|(a-z)|(0-9)|(\s)|(\.)|(,)|(\-)|(!)]+$',
max_length=75,
required=False)
job_name = forms.... | systers/vms | vms/volunteer/forms.py | Python | gpl-2.0 | 1,765 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# import required modules
import time
import subprocess
import RPi.GPIO as GPIO
# set GPIO pin with connected button
GPIOPin = 14
GPIOPinLED = 4
GPIOPinRelay1 = 22
GPIOPinRelay2 = 27
GPIO.setwarnings(False)
#GPIO.setmode(GPIO.BCM)
#GPIO.setup(GPIOPinLED, GPIO.OUT)
#GPIO.... | sbiermann/VE301 | scripts/radioswitch.py | Python | gpl-2.0 | 1,333 |
# -*- coding: utf-8 -*-
#
# bodhi documentation build configuration file, created by
# sphinx-quickstart on Sat Aug 10 09:29:50 2013.
#
# 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.
#
# All c... | tyll/bodhi | docs/conf.py | Python | gpl-2.0 | 9,195 |
# coding: utf-8
from qgis.gui import QgsFontMarkerSymbolLayerV2Widget
from qgis.utils import iface
layer = iface.activeLayer()
font_marker_symbol_layer_v2_widget = QgsFontMarkerSymbolLayerV2Widget(layer)
font_marker_symbol_layer_v2_widget.show()
| webgeodatavore/pyqgis-samples | gui/qgis-sample-QgsFontMarkerSymbolLayerV2Widget.py | Python | gpl-2.0 | 248 |
#!/usr/bin/env python
from __future__ import unicode_literals
| michellemorales/OpenMM | kaldi/egs/vystadial_cz/online_demo/__init__.py | Python | gpl-2.0 | 62 |
import os
from flask import Markup
import datetime
import markdown
import bleach
from bleach_whitelist import markdown_tags, markdown_attrs, all_styles
import yaml
class Page(object):
def __init__(self, name, md_path, history_path, history_file):
self.md_path = md_path
print(history_path)
... | edran/betterinformatics | betterinformatics/page.py | Python | gpl-2.0 | 2,699 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
This file is part of OpenMalaria.
Copyright (C) 2005-2014 Swiss Tropical Institute
OpenMalaria 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 ... | SwissTPH/openmalaria | util/assimilateForDBImport.py | Python | gpl-2.0 | 2,871 |
from utils import *
from scipy import ndimage
def get_dI(imgI, warp_params=np.eye(3)):
# convolve with dx, dy filters
# ? why is it not warp and then grad. BUT grad and then warp
dx_filter = np.array([[-1,-1,-1], [0,0,0], [1,1,1]]).T
imgI_dx = ndimage.correlate(imgI, dx_filter, mode='constant', cval=0.... | InnovArul/codesmart | computer_vision/lucas-kanade/lucas_kanade_additive.py | Python | gpl-2.0 | 3,640 |
from __future__ import print_function
import functools
import io
import logging
import os
import os.path
import sys
from pytest import mark
from libearth.compat import IRON_PYTHON, PY3
from libearth.compat.etree import fromstringlist
from libearth.parser.autodiscovery import get_format
from libearth.schema import wr... | Kjwon15/libearth | tests/parsing_test.py | Python | gpl-2.0 | 5,661 |
"""
WSGI config for diabetto project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "diabetto.settings")
from django.core... | umax/diabetto2 | diabetto/wsgi.py | Python | gpl-2.0 | 391 |
#!/usr/bin/env python
# vim: set expandtab:
###
# Copyright (c) 2013, Jim Richardson <weaselkeeper@gmail.com>
# 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... | weaselkeeper/repomonger | src/kojiscan.py | Python | gpl-2.0 | 6,620 |
#===============================================================================
# LICENSE XOT-Framework - CC BY-NC-ND
#===============================================================================
# This work is licenced under the Creative Commons
# Attribution-Non-Commercial-No Derivative Works 3.0 Unported Li... | SMALLplayer/smallplayer-image-creator | storage/.xbmc/addons/net.rieter.xot.smallplayer/resources/libs/cache/cachedhttpresponse.py | Python | gpl-2.0 | 4,532 |
# -*- coding: utf-8 -*-
# UFO-launcher - A multi-platform virtual machine launcher for the UFO OS
#
# Copyright (c) 2008-2010 Agorabox, Inc.
#
# This 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 ver... | vienin/vlaunch | src/macbackend.py | Python | gpl-2.0 | 15,766 |
Iz09PWlzZmF0YWxwbHVnaW49PT0NCiMgLSotIGNvZGluZzogdXRmLTggLSotDQoNCiMgIGZhdGFs
IHBsdWdpbg0KIyAgd2F0Y2hlcl9wbHVnaW4ucHkNCg0KIyAgQ29weXJpZ2h0IKkgMjAxMCB3ZC9s
b3R1c2ZlZXQgPGRhby95b2dhPg0KDQojICBUaGlzIHByb2dyYW0gaXMgZnJlZSBzb2Z0d2FyZTsg
eW91IGNhbiByZWRpc3RyaWJ1dGUgaXQgYW5kL29yIG1vZGlmeQ0KIyAgaXQgdW5kZXIgdGhlIHRl
cm1zIG9mIHRo... | darkvip3r/Tron | plugins/watcher_plugin.py | Python | gpl-2.0 | 8,425 |
from google.appengine.ext import db
from django.contrib.auth.models import User
class Greeting(db.Model):
author = db.ReferenceProperty(User)
content = db.StringProperty(multiline=True)
date = db.DateTimeProperty(auto_now_add=True) | adamfisk/littleshoot-client | server/appengine/users/models.py | Python | gpl-2.0 | 246 |
import Tkinter as tk
import matplotlib
#matplotlib.use('TkAgg')
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, NavigationToolbar2TkAgg
import matplotlib.pyplot as plt
import matplotlib.dates as mdates
import pandas as pd
def create(dataset, window):
# Create a figure
fig = plt.figure()
ax = f... | dekespo/DA_GUI_py | plots.py | Python | gpl-2.0 | 2,731 |
#!/usr/bin/python
# -*- coding: iso-8859-15 -*-
import csv
import networkx as nx
import sys
import os
import matplotlib.pyplot as plt
node_file = open('test-graph2.csv', 'r')
dicc_nodes = {}
data_final = open('info-out.csv', 'w')
data_final.close()
data_final = open('info-out.csv', 'a')
viewed_lines = {}
temp_cou... | LibreSoftTeam/R-SNA | net.py | Python | gpl-2.0 | 2,022 |
from django import template
import locale
register = template.Library()
#@register.filter(name='currency')
#def currency(value):
# try:
# locale.setlocale(locale.LC_ALL,'en_US.UTF-8')
# except:
# locale.setlocale(locale.LC_ALL,'')
# loc = locale.localeconv()
# return locale.currency(value, l... | mrpindo/openshift-estore | tokoku/tokoku/templatetags/TEMP/catalog_filters.py | Python | gpl-2.0 | 578 |
from django.core import mail
from django.conf import settings
from django.template import Context, loader
from django.utils.translation import ugettext as _
def colab_send_email(subject, message, to):
from_email = settings.COLAB_FROM_ADDRESS
return mail.send_mail(subject, message, from_email, [to])
def sen... | rafamanzo/colab | colab/super_archives/utils/email.py | Python | gpl-2.0 | 771 |
"""
BitBake 'Fetch' implementation for bzr.
"""
# Copyright (C) 2007 Ross Burton
# Copyright (C) 2007 Richard Purdie
#
# Classes for obtaining upstream sources for the
# BitBake build tools.
# Copyright (C) 2003, 2004 Chris Larson
#
# This program is free software; you can redistribute it and/or modify
# it un... | sentient-energy/emsw-bitbake-mirror | lib/bb/fetch2/bzr.py | Python | gpl-2.0 | 4,722 |
__copyright__ = """
Copyright (C) 2006, Robin Rosenberg <robin.rosenberg@dewire.com>
Modified by Catalin Marinas
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2 as
published by the Free Software Foundation.
This program is distributed... | guanqun/stgit | stgit/commands/float.py | Python | gpl-2.0 | 2,916 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# widgetskeywords - [insert a few words of module description on this line]
# Copyright (C) 2003-2009 The MiG Project lead by Brian Vinter
#
# This file is part of MiG.
#
# MiG is free software: you can redistribute it and/or modify
# it under the te... | heromod/migrid | mig/shared/widgetskeywords.py | Python | gpl-2.0 | 2,555 |
#!/usr/bin/env python
import os
import re
from setuptools import setup
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
PKG_NAME = "woogenerator"
# Get version from __init__.py file
VERSION = ""
with open("%s/__init__.py" % PKG_NAME, "r") as fd:... | derwentx/WooGenerator | setup.py | Python | gpl-2.0 | 1,886 |
from __future__ import division
import numpy as np
from matplotlib import pyplot as plt
plt.ion()
np.random.seed(0)
import pyhsmm
from pyhsmm.util.text import progprint_xrange
from pyhsmm.util.stats import whiten, cov
import autoregressive.models as m
import autoregressive.distributions as d
###################
# g... | mattjj/pyhsmm-autoregressive | examples/animation.py | Python | gpl-2.0 | 2,387 |
import os
from flask import Flask, redirect
import urllib2
import socket
import threading
import Queue
def time_connection(server, queue):
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
try:
s.connect(server)
print ("Connected to " + str(server))
if queue.empty:
queue... | Sistemas-Multimedia/Icecast-tracker | Flask/tracker2.py | Python | gpl-2.0 | 1,235 |
# -*- coding: utf-8 -*-
"""
***************************************************************************
roughness.py
---------------------
Date : October 2013
Copyright : (C) 2013 by Alexander Bruy
Email : alexander dot bruy at gmail dot com
***************... | SebDieBln/QGIS | python/plugins/processing/algs/gdal/roughness.py | Python | gpl-2.0 | 3,008 |
#!/usr/bin/python
import vertigo, sys, math
ravefactory=vertigo.RaveVertexFactory (
vertigo.RaveConstantMagneticField(0.,0.,4.), vertigo.RaveVacuumPropagator() )
eventfactory=vertigo.EventFactory ( "gun:kinematics-mass:142")
event=eventfactory.next()
simparticles=event.simParticles()
for simparticle in simpart... | newtrino/vertigo | examples/python/InvariantMass.py | Python | gpl-2.0 | 637 |
# -*- coding: utf-8 -*-
"""
Created 2015
@author: hrotzing
Modified 2017 by S1
"""
import logging
import os
import time
import qkit
alphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
class DateTimeGenerator(object):
"""DateTimeGenerator class to provide a timestamp for each measurement file
upon creation.
... | qkitgroup/qkit | qkit/storage/hdf_DateTimeGenerator.py | Python | gpl-2.0 | 4,039 |
import xbmc
import xbmcgui
import xbmcplugin
import xbmcaddon
import sys
import json
from .simple_logging import SimpleLogging
log = SimpleLogging(__name__)
addon = xbmcaddon.Addon()
class HomeWindow:
"""
xbmcgui.Window(10000) with add-on id prefixed to keys
"""
def __init__(self):
sel... | faush01/plugin.video.embycon | resources/lib/kodi_utils.py | Python | gpl-2.0 | 1,891 |
# -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt4 (Qt v4.8.7)
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore
qt_resource_data = "\
\x00\x00\x01\xd9\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x17\x00... | tsw-apropos/mapbiographer | mapBiographer/resources_rc.py | Python | gpl-2.0 | 78,437 |
# -*- coding: utf-8 -*-
import os
import sys
import imp
import ntpath
import cPickle
HERE = os.path.dirname(os.path.abspath(__file__))
def latinToAscii(unicrap):
"""This takes a UNICODE string and replaces Latin-1 characters with
something equivalent in 7-bit ASCII. It returns a plain ASCII string.
... | ancho85/pylint-playero-plugin | libs/tools.py | Python | gpl-2.0 | 5,066 |
#
# Copyright 2009-2011 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; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed ... | openSUSE/vdsm | vdsm/storage/sp.py | Python | gpl-2.0 | 80,533 |
# -*- encoding: utf-8 -*-
from app.database import init_db
init_db()
| berlotto/cinemark | criadb.py | Python | gpl-2.0 | 71 |
#! /usr/bin/env python
# encoding: utf-8
import os,shutil,sys,platform
import TaskGen,Task,Build,Options,Utils
from TaskGen import taskgen,feature,after,before
from Logs import error,debug
app_info='''
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd"... | diedthreetimes/VCrash | pybindgen-0.15.0.795/.waf-1.5.9-0c853694b62ef4240caa9158a9f2573d/wafadmin/Tools/osx.py | Python | gpl-2.0 | 4,973 |
from setuptools import setup
import io
import os
import re
import sys
if sys.version_info[0] > 2:
raise RuntimeError("esptool.py only supports Python 2.x")
# Example code to pull version from esptool.py with regex, taken from
# http://python-packaging-user-guide.readthedocs.org/en/latest/single_source_version/
... | IntellEyes/embeddedgurufirmware | setup.py | Python | gpl-2.0 | 2,778 |
#!/home/venturi/django/cms/env/bin/python2
#
# The Python Imaging Library.
# $Id$
#
# print image files to postscript printer
#
# History:
# 0.1 1996-04-20 fl Created
# 0.2 1996-10-04 fl Use draft mode when converting.
# 0.3 2003-05-06 fl Fixed a typo or two.
#
from __future__ import print_function
import ... | Venturi/cms | env/bin/pilprint.py | Python | gpl-2.0 | 2,418 |
from http.cookies import SimpleCookie
import json
import sys, os, requests, uuid
from threading import Thread
from time import sleep
from Crypto import Random
from Crypto.PublicKey import RSA
from PyQt5.QtCore import QThread
from PyQt5.QtGui import QIcon
from PyQt5.QtWidgets import QMenu
from PyQt5.QtWidgets import QS... | coremind-oss/ttasm-desktop-app | tray.py | Python | gpl-2.0 | 9,573 |
from tools.load import LoadMatrix
lm=LoadMatrix()
traindat = lm.load_numbers('../data/fm_train_real.dat')
testdat = lm.load_numbers('../data/fm_test_real.dat')
label_traindat = lm.load_labels('../data/label_train_twoclass.dat')
parameter_list= [[traindat,testdat,label_traindat],[traindat,testdat,label_traindat]]
def... | ratschlab/ASP | examples/undocumented/python_modular/kernel_combined_custom_poly_modular.py | Python | gpl-2.0 | 1,872 |
# -*- coding: utf-8 -*-
"""
Hall Effect Plugin
Copyright (C) 2013 Olaf Lüke <olaf@tinkerforge.com>
Copyright (C) 2014-2016 Matthias Bolte <matthias@tinkerforge.com>
hall_effect.py: Hall Effect Plugin Implementation
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Gene... | Tinkerforge/brickv | src/brickv/plugin_system/plugins/hall_effect/hall_effect.py | Python | gpl-2.0 | 5,198 |
'''
Copyright (C) 2012 mentalsmash.org <contact@mentalsmash.org>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
Thi... | mentalsmash/geek-map | mentalsmash/geekmap/Persistence.py | Python | gpl-2.0 | 9,045 |
#!/usr/bin/env python
## @package fill_missing
# \brief This script solves the Laplace equation as a method of filling holes in map-plane data.
#
# \details The script is an implementation of the SOR method with Chebyshev
# acceleration for the Laplace equation, as described in 'Numerical Recipes in
# Fortran: the art... | m8se/pism_refined | util/fill_missing.py | Python | gpl-2.0 | 13,675 |
self.description = "Sysupgrade of packages in 'IgnoreGroup'"
sp1 = pmpkg("pkg1", "1.0-2")
sp2 = pmpkg("pkg2", "1.0-2")
sp2.groups = ["grp"]
for p in sp1, sp2:
self.addpkg2db("sync", p)
lp1 = pmpkg("pkg1")
lp2 = pmpkg("pkg2")
for p in lp1, lp2:
self.addpkg2db("local", p)
self.option["IgnoreGroup"] = ["grp"]
self... | ronin13/Pacman | test/pacman/tests/sync138.py | Python | gpl-2.0 | 442 |
#!/usr/bin/env python
try:
import redis
import datetime
except Exception:
msg= 'WARNING: Please check deps'
ret=1
print msg
exit(ret)
def getTimeOfSettingValue(conn, key, value):
before_set_time = datetime.datetime.now()
conn.set(key,value)
set_time = (datetime.datetime.now() - before_set_time).total_second... | jmferrete/nagios-plugins | check_redis.py | Python | gpl-2.0 | 1,647 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Overxfl0w13 #
"""You can define more kernel functions to test its performance whenever it respect the following condition:
http://latex.codecogs.com/gif.latex?\forall i\in K(x,y)\rightarrow i\geq 0
Some examples: http://gyazo.com/3b1d3ae355c2638f5ac4d98c82c... | overxfl0w/AdaBoost | Classifiers/KernelPerceptron.py | Python | gpl-2.0 | 1,702 |
from proteibb.core.properties import *
from proteibb.util.factory import *
class PlatformsGroup:
"""
Example of platforms list which could be used in some json file:
{
"platforma" : { builder-dependent-platforma-info },
"platformb" : { builder-dependent-platformb-info },
}
"""
... | simonenkos/proteibb | proteibb/core/platforms.py | Python | gpl-2.0 | 1,513 |
from django.forms import models, DateTimeField
__author__ = 'chelox'
#from django.db import models
from django.contrib.auth.models import User, Group, Permission
from usuarios.models import Usuario
from proyectos.models import Proyecto
from sprint.models import Estado
from clientes.models import Cliente
from sprint.m... | alforro/sgpa2015 | poblacion.py | Python | gpl-2.0 | 60,019 |
import json
from django.db import models
from django.core.exceptions import ValidationError
class Poll(models.Model):
name = models.CharField(max_length=500, unique=True)
slug = models.SlugField(max_length=500, unique=True)
thread_id = models.CharField(max_length=256, unique=True)
status = models.Forei... | kappapolls/kappapolls | polls/models.py | Python | gpl-2.0 | 2,475 |
#!/usr/bin/env python
#
# Copyright 2011 Mike Wakerly <opensource@hoho.com>
#
# This file is part of the Pykeg package of the Kegbot project.
# For more information on Pykeg or Kegbot, see http://kegbot.org/
#
# Pykeg is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public... | Alwnikrotikz/kegbot | pykeg/src/pykeg/bin/kegboard-tester.py | Python | gpl-2.0 | 1,995 |
# 2013.05.22 08:34:34 UTC
#Embedded file name: /usr/lib/enigma2/python/Plugins/Extensions/IniAirPlayer/__init__.py
from enigma import getDesktop
from skin import loadSkin
import os
from sys import version_info
from Components.config import config, ConfigSubsection, ConfigSelection
def getSkins():
print '[AirPlayer... | popazerty/e2-gui | lib/python/Plugins/Extensions/IniAirPlayer/__init__.py | Python | gpl-2.0 | 3,530 |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2004 Donald N. Allingham
#
# 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 you... | Forage/Gramps | gramps/gen/utils/docgen/csvtab.py | Python | gpl-2.0 | 2,287 |
from django.db import models
from django.core.mail import send_mail
from django.core.validators import RegexValidator
from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin, BaseUserManager
from django.utils.translation import ugettext_lazy as _
from django.utils import timezone
class AuthUserManage... | cs98jrb/Trinity | mysite/accounts/models.py | Python | gpl-2.0 | 2,968 |
#!/usr/bin/env python3
import sys
import math
def readFile(fileName):
data=(open(fileName).readlines())
keyData=data[0].split()
brutData=[line.split() for line in data[1:]]
res={}
for index in range(len(keyData)):
fileNameKey=fileName.replace("res","")
dataIndex=[line[index] for l... | edf-hpc/verrou | unitTest/check-libM/genTab.py | Python | gpl-2.0 | 3,734 |
# -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 CERN.
##
## Invenio 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 Foundatio... | PXke/invenio | invenio/legacy/webuser.py | Python | gpl-2.0 | 59,307 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Tristan Fischer
#
# 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 ... | dersphere/plugin.video.dump | addon.py | Python | gpl-2.0 | 3,438 |
from builtins import str
from config import *
from util import *
import util
import helper
import dialogprogress
import xbmc
from dialogbase import DialogBase
from artworkupdater import ArtworkUpdater
ACTION_MOVEMENT_UP = (3,)
ACTION_MOVEMENT_DOWN = (4,)
ACTION_MOVEMENT = (3, 4, 5, 6, 159, 160)
ACTION_CANCEL_DIALOG ... | maloep/romcollectionbrowser | resources/lib/dialogupdateartwork.py | Python | gpl-2.0 | 4,551 |
# -*- coding: utf-8 -*-
import feedparser,re
from time import mktime
import datetime
def return_rsslist(url):
rssobj = feedparser.parse(url)
return_list = []
now = datetime.datetime.now()
datenow = datetime.datetime(int(now.year), int(now.month), int(now.day))
if rssobj:
rssdict=rssobj["entries"]
for ent... | enen92/script.sportscenter | resources/lib/centerutils/rssparser.py | Python | gpl-2.0 | 1,342 |
#!/usr/bin/env python2.7
#coding=utf-8
import logging
import time
import sys
sys.path.append("..")
import conf.conf as conf
import mylog
import MySQLdb
import tushare as ts
from sqlalchemy import create_engine
def getEngine(typeStr='mysql'):
return create_engine('mysql://%s:%s@%s/%s?charset=%s'%(
conf... | hisen630/my_stock | lib/utils.py | Python | gpl-2.0 | 2,942 |
# -*- coding: utf-8 -*-
__author__ = 'tobin'
from skimage import morphology
import numpy as np
import cv2
def get_skeleton(region):
result = cv2.threshold(region, 0, 255, cv2.THRESH_OTSU)[1]
result = morphology.skeletonize(result > 0)
result = result.astype(np.uint8) * 255
return result | skyczhao/silver | Road/marching/skeleton.py | Python | gpl-2.0 | 306 |
#!/usr/bin/env python3
import os
import subprocess
import sys
if not os.environ.get('DESTDIR'):
print('Compiling gsettings schemas...')
subprocess.call(['glib-compile-schemas', sys.argv[1]]) | GNOME/gnome-user-share | meson_post_install.py | Python | gpl-2.0 | 200 |
import pytest
import fauxfactory
from cfme.configure.settings import DefaultView
from cfme.automate.service_dialogs import DialogCollection
from cfme.services.catalogs.catalog_item import CatalogItem
from cfme.services.catalogs.catalog import Catalog
from cfme.services.catalogs.orchestration_template import Orchestrat... | okolisny/integration_tests | cfme/tests/services/test_provision_stack.py | Python | gpl-2.0 | 10,894 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib.request
import re
import csv
def download_page(url):
"""Downloads page by URL and puts it into the folder
'html_pages'"""
print(url)
success = True
try:
page = urllib.request.urlopen(url)
except HTTPError:
success = F... | school-tagger/school | crawler/crawler.py | Python | gpl-2.0 | 739 |
#! /usr/bin/env python
#
# Copyright (C) 2013-2016 Fabian Gieseke <fabian.gieseke@di.ku.dk>
# License: GPL v2
#
# Inspired by https://github.com/scikit-learn/scikit-learn/blob/master/setup.py
# Copyright (C) 2007-2009 Cournapeau David <cournape@gmail.com>
# 2010 Fabian Pedregosa <fabian.pedregosa@in... | gieseke/bufferkdtree | setup.py | Python | gpl-2.0 | 5,896 |
'''
Author: Julian van Eyken Date: May 15 2013
Package/class for handling of images created from photon lists that are derotated and
mapped to sky coordinates.
**Temporary version 2 of RADecImage, attempting to reduce memory useage a bit.
This is currently not the main version to use!**
'''
impo... | bmazin/ARCONS-pipeline | photonlist/RADecImage2.py | Python | gpl-2.0 | 28,302 |
player_size = 0.5
cycle_length = 0.1
steps_per_cycle = 100
game_duration = 200
indexi = [0 , 1.0/3 , -1.0/3 , 2.0/3 , -2.0/3]
indexj = [1 , 2.0/3 , 2.0/3 , 1.0/3 , 1.0/3 ]
gwidth = 90
glength = 120
gfriction = 1
nteams = 2
players_per_team = 5
visualizer_path = '../visualizer/a.out'
max_ball_dist = 2
ball_vel_unit... | sjazayeri/minifeet | engine/config.py | Python | gpl-2.0 | 358 |
#!/usr/bin/python
# -*- enconding: utf-8 -*-
{
"name" : "Sprint Kanban",#Module's name
"version" : "1.1", #Version's number
"depends" : [ 'project',
'web_kanban',
'base_setup',
'base_status',
'product',
'analytic',
'board',
'mail',
'resource',], #Dependent module
"author" : "Vaux... | 3dfxsoftware/cbss-addons | sprint_kanban/__openerp__.py | Python | gpl-2.0 | 759 |
# -*- coding: utf-8 -*-
# This file is part of MyPaint.
# Copyright (C) 2015 by Andrew Chadwick <a.tchadwick@gmail.com>
#
# 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 ... | dothiko/mypaint | lib/surface.py | Python | gpl-2.0 | 11,840 |
import sublime
import sublime_plugin
import re
DEFINITION_KEY = 'MarkdownEditing-footnote-definitions'
REFERENCE_KEY = 'MarkdownEditing-footnote-references'
REFERENCE_REGEX = "\[\^([^\]]*)\]"
DEFINITION_REGEX = "^ *\[\^([^\]]*)\]:"
def get_footnote_references(view):
ids = {}
for ref in view.get_regions(REFER... | JT5D/Alfred-Popclip-Sublime | Sublime Text 2/MarkdownEditing/footnotes.py | Python | gpl-2.0 | 6,711 |
#!/usr/bin/python
#
# Copyright (c) 2013 Simon Lukasik
#
# 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 ... | isimluk/bronte | backend/bronte/model/entities/brStockMarket.py | Python | gpl-2.0 | 948 |
# -*- coding: utf-8 -*-
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2004-2007 Donald N. Allingham
#
# 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 t... | arunkgupta/gramps | gramps/gen/datehandler/_date_sr.py | Python | gpl-2.0 | 13,117 |
import networkx as nx
import itertools as it
import random as rnd
import math
AVG_SPEED_OF_A_PEDESTRIAN = 1.5
STATION_NEVER_VISITED = -1
STATION_NOT_VISITED_AT_TIME = -2
def generateTrace(withConfigurationFile):
# Parse configuration file settings
configurationSettings = initSettings( withConfigurationFile )
... | cristiantanas/MCS-MobilityGenerator | graphwalk/GraphWalkMobilityModel.py | Python | gpl-2.0 | 8,640 |
# -*- coding: utf-8 -*-
import os
import sys
import django
from django.conf import settings
from django.test.utils import get_runner
def run_tests():
"""Wrapper for ./setup.py test."""
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "intranet.settings")
django.setup()
test_runner = get_runner(setting... | jacobajit/ion | intranet/test/test_suite.py | Python | gpl-2.0 | 389 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import division
from math import *
from ngspice.syntax import *
from ngspice.simulator import *
__env__ = {k:v for k,v in globals().iteritems()}
import sys, os
import code
from cStringIO import StringIO
__all__= ['Interpy']
class Interpy(code.InteractiveInt... | raphaelvalentin/QTModel | exec_script.py | Python | gpl-2.0 | 1,171 |
################################################################################
#
# Gene prediction pipeline
#
# $Id$
#
# Copyright (C) 2007 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 F... | AndreasHeger/pairsdb | pairsdb/src/IndexedFasta.py | Python | gpl-2.0 | 28,192 |
# -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
class MtgPipeline(object):
def process_item(self, item, spider):
return item
| BLannoo/MTG | MTG/pipelines.py | Python | gpl-2.0 | 283 |
# -*- coding: utf-8 -*-
'''
Bubbles Addon
Copyright (C) 2016 Exodus
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 l... | azumimuo/family-xbmc-addon | plugin.video.bubbles/resources/lib/sources/english/hoster/open/animeultima.py | Python | gpl-2.0 | 5,437 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2011-2017 University of Oslo, Norway
#
# This file is part of Cerebrum.
#
# Cerebrum 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... | unioslo/cerebrum | Cerebrum/modules/ad2/ADSync.py | Python | gpl-2.0 | 137,332 |
from numbers_app import app
app.run(host='0.0.0.0', debug=True)
| t4ec/numbers | runserver.py | Python | gpl-2.0 | 65 |
#!/usr/bin/env python
# DataSender.py
#
# Copyright (C) 2014-2019 Kano Computing Ltd.
# License: http://www.gnu.org/licenses/gpl-2.0.txt GNU GPL v2
#
# Functions related to sending feedback data
import os
import datetime
import json
import traceback
# Do not Import Gtk if we are not bound to an X Display
if 'DISPLA... | KanoComputing/kano-feedback | kano_feedback/DataSender.py | Python | gpl-2.0 | 20,436 |
#!/usr/bin/env python
import os
from PIL import Image
rootdir = '/srv/johnwiseheart.me/projects/bom2/images/'
for subdir, dirs, files in os.walk(rootdir):
for file in files:
try:
im = Image.open(os.path.join(subdir, file))
im.verify()
except Exception as e:
os.r... | johnwiseheart/bomslider | clean.py | Python | gpl-2.0 | 374 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'bc.ui'
#
# Created: Fri Dec 4 16:24:50 2015
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeEr... | jmarcelogimenez/petroFoam | bc_ui.py | Python | gpl-2.0 | 4,337 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# --- trame.py ---
# Author : Samuel Bucquet
# Date : 31.10.2014
# License : GPLv2
from collections import namedtuple, OrderedDict
import struct
import time
# coeffs
slong2deg = 180.0/(2**31)
sshort2deg = 180.0/(2**15)
ushort2deg = 360.0/(2**16)
class Trame(object):
... | samgratte/SimpleSHM | trame.py | Python | gpl-2.0 | 2,753 |
# -*- coding: utf-8 -*-
#
from django.dispatch import Signal
on_app_ready = Signal()
| liuzheng712/jumpserver | apps/assets/signals.py | Python | gpl-2.0 | 86 |
# -*- coding: utf-8 -*-
"""
Estnltk prettyprinter module.
Deals with rendering Text instances as HTML.
"""
from __future__ import unicode_literals, print_function, absolute_import
from .values import AESTHETICS, VALUES, AES_VALUE_MAP, DEFAULT_VALUE_MAP, LEGAL_ARGUMENTS
from .templates import get_mark_css, HEADER, MIDD... | estnltk/estnltk | estnltk/prettyprinter/prettyprinter.py | Python | gpl-2.0 | 4,437 |
# -*- coding: utf-8 -*-
"""
/***************************************************************************
vfkPluginDialog
A QGIS plugin
Plugin umoznujici praci s daty katastru nemovitosti
-------------------
begin : 2015-06-11
... | ctu-osgeorel/qgis-vfk-plugin | richTextDocument.py | Python | gpl-2.0 | 5,331 |
from django.conf import settings
from rest_framework import serializers
from misago.acl.testutils import override_acl
from misago.categories.models import Category
from misago.users.testutils import AuthenticatedUserTestCase
from .. import testutils
from ..api.postingendpoint import PostingEndpoint
from ..api.postin... | 1905410/Misago | misago/threads/tests/test_attachments_middleware.py | Python | gpl-2.0 | 9,002 |
#!/usr/bin/python
#generate the srs reprot sheet
#command line:
#xml_srs.py <the SRS blank file> <xml file you want output>
#e.g.
#./xml_srs.py ../mx50_test_manual/SRS/mx508_SRS_release SRS_release.xml
import sys
fin = sys.argv[1]
fon = sys.argv[2]
start = 0
count = 0
hsect = 0
try:
fi = open(fin, 'r')
fo = open(f... | wanghao-xznu/vte | tools/docbook/xml_srs.py | Python | gpl-2.0 | 1,424 |
"""
WSGI config for sampleapp project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/
"""
import os
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sampleapp.settings")
from django.co... | feifangit/dj-mongo-reader | example/sampleapp/sampleapp/wsgi.py | Python | gpl-2.0 | 512 |
#!/usr/bin/env python
import unittest
from werkzeug.exceptions import Forbidden
from .util import generate_ll
class PurgeAllDeletedTasksTest(unittest.TestCase):
def setUp(self):
self.ll = generate_ll()
self.pl = self.ll.pl
def test_purges_all_deleted_tasks(self):
# given
ad... | izrik/tudor | tests/logic_t/layer/LogicLayer/test_purge_all_deleted_tasks.py | Python | gpl-2.0 | 2,763 |
#!/usr/bin/env python
# **********************************************************************
#
# Copyright (c) 2003-2017 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.
#
# *************************************... | ljx0305/ice | python/test/Ice/dispatcher/Dispatcher.py | Python | gpl-2.0 | 1,991 |
"""
/***************************************************************************
Name : Export Data from STDM
Description : LEGACY CODE, NEEDS TO BE UPDATED.
Export data to selected OGR formats
Date : 24/March/12
copyright : (C) 2012 by Jo... | olivierdalang/stdm | ui/export_data.py | Python | gpl-2.0 | 13,651 |
from Cantera import *
# thermo parametrizations
#from Cantera.Species.Thermo.NasaPolynomial import NasaPolynomial
| HyperloopTeam/FullOpenMDAO | cantera-2.0.2/interfaces/python/MixMaster/config.py | Python | gpl-2.0 | 116 |
# coding=utf-8
# coding=utf-8
# Copyright (c) Meta Platforms, Inc. and affiliates.
# Copyright (c) Mercurial Contributors.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from __future__ import absolute_import
import time
from... | facebookexperimental/eden | eden/scm/tests/test-graft-t.py | Python | gpl-2.0 | 30,206 |
import tkinter.ttk as tk
import tkinter.messagebox as mb
#thanks to http://simeonfranklin.com/blog/2012/jul/1/python-decorators-in-12-steps/
#and http://stackoverflow.com/questions/6666882/tkinter-python-catching-exceptions
def showerrorbox(func):
def run(*args, **kwargs):
try:
func(*args, **kw... | willm/DDEXUI | tkinterutil.py | Python | gpl-2.0 | 450 |
import numpy as np
import datetime
import dateutil
import copy
from misc.datasets import BasicPropDataset, \
BasicPropAngleDataset, \
BasicPropAngleNoiseDataset, \
BasicPropAngleNoiseBGDataset, \
MnistDataset
import ... | fducau/infoVAE | experiments_2.py | Python | gpl-3.0 | 9,898 |
"""
Unpack Files
"""
import os, sys, shutil, errno
from ScotchPy.application import Application, get_root_directory
from ScotchPy.utils import folder_utils, file_utils
class UnpackFilesApp(Application):
def __init__(self):
super(UnpackFilesApp, self).__init__("Unpack Files")
def run(self):
""" Run the a... | admiraltoad/ScotchPy | scripts/unpackfiles.py | Python | gpl-3.0 | 1,350 |
from .ImageHandler import ImageHandler
from .DNN import DNN
import numpy as np
class DNNSwiftException(Exception):
pass
class DNNWrapper(object):
"""
This is an interface class that serves only to simplify the calls to this
package. Most of the functionality lies in the DNN and ImageHandler
clas... | DragonDuck/DNNSwift | dnnSwift/DNNWrapperClass.py | Python | gpl-3.0 | 14,146 |
import ArduinoUSB
connection = ArduinoUSB.ArduinoUSB()
| UCSD-AUVSI/NewOnboardSuite | OBC/serial_to_Arduino/globalvar_connection.py | Python | gpl-3.0 | 55 |