code stringlengths 6 947k | repo_name stringlengths 5 100 | path stringlengths 4 226 | language stringclasses 1
value | license stringclasses 15
values | size int64 6 947k |
|---|---|---|---|---|---|
from ._StabData import *
from ._AccelData import *
from ._MotorData import *
from ._GyroData import *
| WSCU/crazyflie_ros | src/crazyflie/msg/__init__.py | Python | gpl-2.0 | 102 |
# -*- coding: utf-8 -*-
#Copyright (C) Fiz Vazquez vud1@sindominio.net
#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.
#T... | pytrainer/pytrainer | pytrainer/extension.py | Python | gpl-2.0 | 5,489 |
'''
Created on Dec 31, 2011
@author: fli
'''
import logging
import base64
import urllib
import simplejson
from urllib2 import urlopen, URLError, Request
from weibonews.utils.decorators import perf_logging
_LOGGER = logging.getLogger('weibonews.external')
_ACCESS_URL_FORMAT = "http://%s/image/%s/%s"
_INFO_URL_FORMAT ... | vispeal/VoteHelper | weibonews/weibonews/utils/image.py | Python | gpl-2.0 | 2,495 |
#
# pyfeyner - a simple Python interface for making Feynman diagrams.
# Copyright (C) 2005-2010 Andy Buckley, Georg von Hippel
# Copyright (C) 2013 Ismo Toijala
#
# pyfeyner 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... | itoijala/pyfeyner | tests/test-bend90a.py | Python | gpl-2.0 | 1,085 |
from admin_views import * | grapesmoker/geogame2 | geogame_core/admin_views/__init__.py | Python | gpl-2.0 | 25 |
"""
Command line interface for cobbler.
Copyright 2006-2009, Red Hat, Inc and Others
Michael DeHaan <michael.dehaan AT gmail>
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 ... | nacc/cobbler | cobbler/cli.py | Python | gpl-2.0 | 28,939 |
from django.shortcuts import render, render_to_response
from django.contrib.auth import authenticate, login, logout
from django.http import HttpResponse
from django.http import HttpResponseRedirect
from django.views.generic import ListView
from bookrental.forms import UserCreateForm
from bookrental.models import Book
f... | AHaymanDev/CS453DjangoProj | bookrental/views.py | Python | gpl-2.0 | 8,027 |
# -*- coding: utf-8 -*-
import regexUtils
import re
import urllib
import urlparse
def findJS(data):
idName = '(?:f*id|ch)'
jsName = '([^\"\']+?\.js[^\"\']*?)'
regex = "(?:java)?scr(?:'\+')?ipt.*?" + idName + "\s*=\s*[\"']([^\"']+)[\"'][^<]*</scr(?:'\+')?ipt\s*>[^<]*<scr(?:'\+')?ipt[^<]*src=[\"']" + jsNa... | fkeles/sports | lib/utils/scrapingUtils.py | Python | gpl-2.0 | 7,381 |
#!/usr/bin/python
#
# pyku
# ====
# Python-based random haiku generator
#
# Chris Collins, <collins.christopher@gmail.com>
#
# v0.5 - 2013-11-15
#
# Copyright (C) 2013 Chris Collins
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publish... | clcollins/pyku | pyku-web.py | Python | gpl-2.0 | 6,637 |
## This file is part of CDS Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008 CERN.
##
## CDS 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 Foundation; either version 2 of the
## License, or (... | lbjay/cds-invenio | modules/websubmit/lib/functions/Check_Group.py | Python | gpl-2.0 | 2,200 |
import unittest
from geobricks_modis.core import modis_core as c
class GeobricksModisTest(unittest.TestCase):
def test_get_modis_product_table(self):
products = c.get_modis_product_table()
self.assertEqual(len(products), 68)
def test_list_products(self):
products = c.list_products()
... | geobricks/geobricks_modis | geobricks_modis_test/core/test_modis_core.py | Python | gpl-2.0 | 2,201 |
## This file is part of Invenio.
## Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2014, 2015 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 Foundation; either version 2 of the
## License, or (at... | egabancho/invenio | invenio/legacy/bibmatch/engine.py | Python | gpl-2.0 | 64,532 |
# This file is part of the qpopplerview package.
#
# Copyright (c) 2010 - 2014 by Wilbert Berendsen
#
# 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 yo... | shimpe/frescobaldi | frescobaldi_app/qpopplerview/cache.py | Python | gpl-2.0 | 10,059 |
# server.py -- Implementation of the server side git protocols
# Copryight (C) 2008 Jelmer Vernooij <jelmer@samba.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# or (at... | harsh-a1/repeater-testing | dulwich/dulwich/client.py | Python | gpl-2.0 | 5,919 |
import sys
import seq
import os
from logger import Logger
"""
right now this just chooses the longest
BEWARE, this writes over the file
"""
if __name__ == "__main__":
if len(sys.argv) != 4 and len(sys.argv) != 5:
print("python "+sys.argv[0]+" table clusterdir fending [logfile]")
sys.exit(0)
f... | FePhyFoFum/PyPHLAWD | src/choose_one_species_cluster.py | Python | gpl-2.0 | 1,407 |
from mmap import mmap
## exiftool -xmp-dc:subject=Metadatos XMP de prueba ./test.gif ##
class gifxmp:
def __init__(self,filename):
self.mmaped = self.__mmap(filename)
self.fst = self.__checkxmp()
if self.fst != -1:
self.xml = self.__loadxmppacket()
print self.xml
## dict = ModuleXML.parsexmp(self.xml... | overxfl0w/Grampus-Forensic-Utils | Metadata/Image/XMP/GIF/gifxmp.py | Python | gpl-2.0 | 1,117 |
# -*- coding: utf-8 -*-
##
## test_account.py
## Login : <dax@happycoders.org>
## Started on Wed Feb 14 08:23:17 2007 David Rousselie
## $Id$
##
## Copyright (C) 2007 David Rousselie
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General Public License as publi... | dax/jmc | src/jmc/model/tests/account.py | Python | gpl-2.0 | 54,705 |
"""
This file re-creates the major DFXML classes with an emphasis on type safety, serializability, and de-serializability.
With this module, reading disk images or DFXML files is done with the parse or iterparse functions. Writing DFXML files can be done with the DFXMLObject.print_dfxml function.
"""
__version__ = ... | thomaslaurenson/Vestigium | dfxml/Objects.py | Python | gpl-2.0 | 127,176 |
from action import *
from conn import *
from logic import *
from log import *
from protocol import *
from schedule import *
from server import *
from util import *
| goripcity/IceServer | server/__init__.py | Python | gpl-2.0 | 164 |
from django.core.exceptions import ImproperlyConfigured
from django import VERSION
if VERSION[0]<1 and VERSION[1]<7:
raise ImproperlyConfigured("""
The app_config required 1.7 or higher version of django.
""")
from .core import AppCache | hsfzxjy/wisecitymbc | site_packages/app_cache/__init__.py | Python | gpl-2.0 | 258 |
"""test passlib.hosts"""
#=============================================================================
# imports
#=============================================================================
from __future__ import with_statement
# core
import logging; log = logging.getLogger(__name__)
import warnings
# site
# pkg
fro... | theguardian/JIRA-APPy | lib/passlib/tests/test_hosts.py | Python | gpl-2.0 | 3,934 |
# -*- coding: utf-8 -*-
"""
***************************************************************************
BarPlot.py
---------------------
Date : January 2013
Copyright : (C) 2013 by Victor Olaya
Email : volayaf at gmail dot com
******************************... | drnextgis/QGIS | python/plugins/processing/algs/qgis/BarPlot.py | Python | gpl-2.0 | 3,271 |
###############################################################################
# test_sym_char_class.py: Test module for PATTERN MATCH - symbol char class
# class
# Copyright (C) 2011 Brno University of Technology, ANT @ FIT
# Author(s): Jaroslav Suchodol <xsucho04@stud.fit.vutbr.cz>
######... | vhavlena/appreal | netbench/pattern_match/tests/test_sym_char_class.py | Python | gpl-2.0 | 12,368 |
"""optparse - a powerful, extensible, and easy-to-use option parser.
By Greg Ward <gward@python.net>
Originally distributed as Optik; see http://optik.sourceforge.net/ .
If you have problems with this module, please do not file bugs,
patches, or feature requests with Python; instead, use Optik's
SourceForge project ... | inducer/jhbuild | jhbuild/cut_n_paste/optparse.py | Python | gpl-2.0 | 73,285 |
from matplotlib import rcParams, rc
import numpy as np
import sys
from fitFunctions import gaussian
import scipy.interpolate
import scipy.signal
from baselineIIR import IirFilter
import pickle
import smooth
# common setup for matplotlib
params = {'savefig.dpi': 300, # save figures to 300 dpi
'axes.labelsize'... | mstrader/MkidDigitalReadout | DarknessFilters/triggerPhotons.py | Python | gpl-2.0 | 7,378 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import swisseph as swe
import unittest
class TestSweLunEclipse(unittest.TestCase):
@classmethod
def setUpClass(cls):
swe.set_ephe_path()
def test_01(self):
jd = 2454466.5
flags = swe.FLG_SWIEPH
geopos = (12.1, 49.0, 330)
... | astrorigin/pyswisseph | tests/test_swe_lun_eclipse.py | Python | gpl-2.0 | 2,097 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
""" A set of utilities, mostly for post-processing and visualization
We put arrays on disk as raw bytes, extending along the first dimension.
Alongside each array x we ensure the value x.dtype which stores the string
description of the array's dtype.
See Also:
----------... | agiovann/Constrained_NMF | caiman/source_extraction/cnmf/utilities.py | Python | gpl-2.0 | 40,754 |
#!/usr/bin/env python
# Multiple URL Command Client
#
# Combine a list of mv, cp, rm, and put commands on URLs into a single commit
#
# To read the help for this program, type python mucc.py --help
import os
from csvn.core import *
from csvn.repos import RemoteRepository, RepositoryURI
from csvn.auth import User
from... | bdmod/extreme-subversion | BinarySourcce/subversion-1.6.17/subversion/bindings/ctypes-python/examples/mucc.py | Python | gpl-2.0 | 4,445 |
#!/usr/bin/env python3
import os
import re
import subprocess
import sys
import threading
import time
import urllib
from subprocess import Popen, PIPE
sys.path.append("..")
from check_with_sitemap import CheckWithSitemap
DEFAULT_JAVA_PATH = 'java'
class CheckWithSiteMapVpro(CheckWithSitemap):
"""
This specia... | npo-poms/scripts | python/vpro/check_with_sitemap_vpro.py | Python | gpl-2.0 | 6,894 |
import ntpath
import os
import sys
from test.test_support import TestFailed
from test import test_support, test_genericpath
import unittest
def tester0(fn, wantResult):
gotResult = eval(fn)
if wantResult != gotResult:
raise TestFailed, "%s should return: %r but returned: %r" \
... | j5shi/Thruster | pylibs/test/test_ntpath.py | Python | gpl-2.0 | 14,186 |
# blender CAM utils.py (c) 2012 Vilem Novak
#
# ***** 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... | vilemnovak/blendercam | scripts/addons/cam/utils.py | Python | gpl-2.0 | 65,143 |
#!/usr/bin/env python
"""
This is a collection of classes that contain data for files from a
sosreport in the directory:
var/log/*
@author : Shane Bradley
@contact : sbradley@redhat.com
@version : 2.16
@copyright : GPLv2
"""
class VarLogMessagesMsg:
def __init__(self, orginalMessage, timestamp, hostname,... | sbradley7777/sx | lib/sx/plugins/lib/log/syslogparser.py | Python | gpl-2.0 | 1,078 |
# -*- coding: utf-8 -*-
#
# This file is part of EUDAT B2Share.
# Copyright (C) 2016 CERN.
#
# B2Share 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... | SarahBA/b2share | b2share/modules/records/errors.py | Python | gpl-2.0 | 2,455 |
from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.selector import Selector
from lyricwiki.items import LyricWikiItem
class LyricWikiSpider(CrawlSpider):
name = "mastakilla" #CHANGE NAME
... | elainekmao/hiphoptextanalysis | lyricwiki-scraper/lyricwiki/spiders/mastakilla_spider.py | Python | gpl-2.0 | 1,143 |
from .Gender import Gender
from .Profile import Profile
from .Measurement import Measurement
from .MeasurementSource import MeasurementSource
from .MeasurementType import MeasurementType
from .MeasurementUnit import MeasurementUnit
| coco19/salud-api | app/mod_profiles/models/__init__.py | Python | gpl-2.0 | 232 |
#!/usr/bin/env python
__author__ = "Devin Kelly"
import pymongo
import time
import json
import re
import os
import daemon
from datetime import datetime
from tornado import httpclient, ioloop
def parseHTML(htmlData):
expr = re.compile("In current traffic: [0-9]{0,2} mins")
matches = re.finditer(expr, htmlData... | dwwkelly/trafficDownloader | trafficDownloader.py | Python | gpl-2.0 | 2,828 |
#!/usr/bin/env python
from tempfile import NamedTemporaryFile
from django.contrib.sites.models import Site
from django.template.loader import render_to_string
from django.utils import translation
import re, subprocess
import cStringIO as StringIO
from django.conf import settings
WETO_REQUEST_FORMAT_NAME = getattr(sett... | hixi/django-weto | weto/middleware.py | Python | gpl-2.0 | 4,312 |
__all__ = ["pval_task", "annotation_task"] | eeyorkey/ipac | tasks/__init__.py | Python | gpl-2.0 | 42 |
#!/usr/bin/env python
#
# This is only needed for Python v2 but is harmless for Python v3.
#
import PyQt5.sip as sip
sip.setapi('QString', 2)
#
from PyQt5 import QtCore, QtGui, QtWidgets
#
import sys
import os
import sqlite3 as sqlite
#
# this is needed for me to use unpickle objects
#
sys.path.append(os.path.join(os.g... | Csega/PythonCAD3 | pythoncad_qt.py | Python | gpl-2.0 | 1,067 |
# DO THIS FIRST to set project name !!!
import askapdev.sphinx
# CAN NOT contain spaces!
askapdev.sphinx.project = u'askap.parset'
from askapdev.sphinx.conf import *
version ... | ATNF/askapsdp | Code/Base/py-askap/current/doc/conf.py | Python | gpl-2.0 | 352 |
from django.contrib.auth.decorators import login_required, permission_required,\
user_passes_test
from django.shortcuts import render_to_response, get_object_or_404
from django.template.context import RequestContext
from project.tramitacao.forms import FormTipoCaixa
from django.http import HttpResponseRedirect
from... | waldenilson/TerraLegal | project/servidor/restrito/contratoservidor.py | Python | gpl-2.0 | 6,591 |
from kivy.support import install_twisted_reactor
install_twisted_reactor()
from twisted.internet import reactor
from twisted.internet import protocol
class EchoProtocol(protocol.Protocol):
def dataReceived(self, data):
response = self.factory.app.handle_message(data)
if response:
sel... | cmac4603/Home-Utilities-App | reactor_server.py | Python | gpl-2.0 | 1,031 |
import sys
from geopy import Point
from django.apps import apps as django_apps
from django.core.exceptions import ImproperlyConfigured
from django.core.management.color import color_style
from .geo_mixin import GeoMixin
LANDMARK_NAME = 0
LATITUDE = 2
LETTERS = list(map(chr, range(65, 91)))
LONGITUDE = 1
style = co... | botswana-harvard/edc-map | edc_map/mapper.py | Python | gpl-2.0 | 2,309 |
from __future__ import division
import numpy as np
from fatiando.gravmag.euler import Classic, ExpandingWindow, MovingWindow
from fatiando.gravmag import sphere, fourier
from fatiando.mesher import Sphere
from fatiando import utils, gridder
model = None
xp, yp, zp = None, None, None
inc, dec = None, None
struct_ind = ... | seancug/python-example | fatiando-0.2/test/test_gravmag_euler.py | Python | gpl-2.0 | 2,686 |
'''
Created on Jan 6, 2013
__author__ = "Elizabeth 'pidge' Flanagan"
__copyright__ = "Copyright 2012-2013, Intel Corp."
__credits__ = ["Elizabeth Flanagan"]
__license__ = "GPL"
__version__ = "2.0"
__maintainer__ = "Elizabeth Flanagan"
__email__ = "elizabeth.flanagan@intel.com"
'''
from buildbot.steps.shell import Sh... | joeythesaint/yocto-autobuilder | lib/python2.7/site-packages/autobuilder/buildsteps/BuildImages.py | Python | gpl-2.0 | 2,787 |
#
# commands.py - the GraalVM specific commands
#
# ----------------------------------------------------------------------------------------------------
#
# Copyright (c) 2007, 2012, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free ... | kevinmcain/graal | mx/commands.py | Python | gpl-2.0 | 58,280 |
#!/usr/bin/python3 -Es
#
# Copyright (C) 2013 Red Hat
# see file 'COPYING' for use and warranty information
#
# selinux gui is a tool for the examining and modifying SELinux policy
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# ... | rhatdan/selinux | policycoreutils/sepolicy/sepolicy/gui.py | Python | gpl-2.0 | 133,940 |
# coding: utf-8"
"""
Example demonstrating how to use the ``input_label`` to send images between
blocks.
This mechanism is useful to perform fake tests by using using generated images
instead of cameras to read images.
Required hardware:
- Any camera
"""
import crappy
if __name__ == "__main__":
cam1 = crappy.b... | LaboratoireMecaniqueLille/crappy | Examples/sending_img_through_links.py | Python | gpl-2.0 | 523 |
#!/usr/bin/python -tt
# 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 the hope that i... | Distrotech/yum | yum/__init__.py | Python | gpl-2.0 | 305,350 |
#
# Copyright 2009-2012 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 ... | txomon/vdsm | vdsm/storage/hsm.py | Python | gpl-2.0 | 138,543 |
#! /usr/bin/python
import cv2
import sys
from os import path, getenv
PPRZ_SRC = getenv("PAPARAZZI_SRC", path.normpath(path.join(path.dirname(path.abspath(__file__)), '../../../')))
sys.path.append(PPRZ_SRC + "/sw/ext/pprzlink/lib/v1.0/python")
from pprzlink.ivy import IvyMessagesInterface
from pprzlink.message impor... | TomasDuro/paparazzi | sw/tools/rtp_viewer/rtp_viewer.py | Python | gpl-2.0 | 2,844 |
'''
This module controls the dialog to set filter criteria
'''
from PyQt5 import QtCore, Qt, QtWidgets
from views.filter_dialog import Ui_FilterDialog
class FilterGamesController(QtWidgets.QDialog):
'''
Controller object for the filter games dialog.
'''
def __init__(self, table, parent=None):
... | pablosuau/pyBacklogger | controllers/filter_games_controller.py | Python | gpl-2.0 | 7,069 |
"""thumbbar.py - Thumbnail sidebar for main window."""
import urllib
import Queue
import gtk
import gobject
import threading
from mcomix.preferences import prefs
from mcomix import image_tools
from mcomix import tools
from mcomix import constants
from mcomix import callback
class ThumbnailSidebar(gtk.HBox):
""... | mxtthias/mcomix | mcomix/thumbbar.py | Python | gpl-2.0 | 15,561 |
from Components.Converter.Converter import Converter
from Components.Element import cached
from pprint import pprint
# the protocol works as the following:
# lines starting with '-' are fatal errors (no recovery possible),
# lines starting with '=' are progress notices,
# lines starting with '+' are PIDs to record:
#... | openatv/enigma2 | lib/python/Components/Converter/Streaming2.py | Python | gpl-2.0 | 1,029 |
# -*- coding: iso-8859-1 -*-
from enigma import eConsoleAppContainer
from Components.Console import Console
from Components.About import about
from Components.PackageInfo import PackageInfoHandler
from Components.Language import language
from Components.Sources.List import List
from Components.Ipkg import IpkgComponent... | atvcaptain/enigma2 | lib/python/Plugins/SystemPlugins/SoftwareManager/SoftwareTools.py | Python | gpl-2.0 | 9,405 |
__author__ = 'fatihka'
from sqlalchemy import Column, Integer, String, Unicode, Float, Boolean, create_engine, Table
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
# db_name = 'ww.db'
db_name = ':memory:'
tanimlar = {'company': 'Fatih Ka.', 'optional': 'NO'}
periodss =... | xybydy/kirilim | db.py | Python | gpl-2.0 | 1,832 |
from django.views.generic.base import TemplateView
from sarGraphs.lib.sar import get_cpu, get_load
from sarGraphs.lib.sar import get_swap, get_memory
class HomeView(TemplateView):
'Home Page View'
template_name = "home.html"
def get_context_data(self, **kwargs):
context = {}
context['cp... | jness/pysarGraphs | sarGraphs/views.py | Python | gpl-2.0 | 536 |
# -----------------------------------------------------------------------------
# Karajlug.org
# Copyright (C) 2010 Karajlug community
#
# 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 Found... | Karajlug/karajlug | projects/admin.py | Python | gpl-2.0 | 1,973 |
#!/usr/bin/env python3
from optparse import OptionParser
from datetime import datetime
from datetime import timedelta
import pyopencl as cl
import numpy as np
import time
MIN_ELAPSED = 0.25
KEY_LENGTH = 64
BUF_MAX_SIZE= 1024 * 1024
class BurnInTarget():
def __init__(self, platform, kernel):
self.name = ... | jimmysitu/jBenchmark | micro-benchmark/MixBurnIn/MixBurnIn.py | Python | gpl-2.0 | 4,944 |
# peppy Copyright (c) 2006-2010 Rob McMullen
# Licenced under the GPLv2; see http://peppy.flipturn.org for more info
"""Spell checking provider
"""
import os, sys
import wx
from wx.lib.pubsub import Publisher
from peppy.yapsy.plugins import *
from peppy.lib.stcspellcheck import *
class SpellCheck(IPeppyPlugin):
... | robmcmullen/peppy | peppy/plugins/spelling.py | Python | gpl-2.0 | 958 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""extends the standard Python gettext classes
allows multiple simultaneous domains... (makes multiple sessions with different languages easier too)"""
# Copyright 2002, 2003 St James Software
#
# This file is part of jToolkit.
#
# jToolkit is free software; you can redi... | cc-archive/jtoolkit | jToolkit/localize.py | Python | gpl-2.0 | 6,307 |
from setuptools import setup, find_packages
import sys, os
version = '0.1'
setup(
name='appserver',
version=version,
description="Sample application server for bilsbrowser",
long_description="""\
""",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_classifiers
... | 11craft/bilsbrowser | examples/appserver/setup.py | Python | gpl-2.0 | 720 |
#!/usr/bin/env python
# calculates safety factor in hoisting lines with various number of parts & rotating sheaves
# (c) 2013, D. Djokic
# No guaranties, whatsoever - use code on your own risk
# Released under GNU General Public License
'''
IADC safety factor recommendations:
drilling and other routine operations ... | ddjokic/Hoisting | hoisting_sf.py | Python | gpl-2.0 | 3,295 |
from distutils.core import setup, Extension
include_dirs = ['/usr/include', '/usr/local/include']
library_dirs = ['/usr/lib', '/usr/local/lib']
libraries = ['jpeg']
runtime_library_dirs = []
extra_objects = []
define_macros = []
setup(name = "pyjpegoptim",
version = "0.1.1",
author = "Guangming Li",
... | cute/pyjpegoptim | setup.py | Python | gpl-2.0 | 1,139 |
# ####################################################################
# gofed - set of tools to automize packaging of golang devel codes
# Copyright (C) 2014 Jan Chaloupka, jchaloup@redhat.com
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public Licen... | piotr1212/gofed | ggi.py | Python | gpl-2.0 | 8,925 |
#
# livef1
#
# f1comment.py - classes to store the live F1 comments
#
# Copyright (c) 2014 Marc Bertens <marc.bertens@pe2mbs.nl>
#
# 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; eit... | livef1/Livef1-web | src/comment.py | Python | gpl-2.0 | 3,104 |
#_PYTHON_INSERT_SAO_COPYRIGHT_HERE_(2007)_
#_PYTHON_INSERT_GPL_LICENSE_HERE_
from itertools import izip
import numpy
import time
import ds9
from sherpa.utils import get_keyword_defaults, SherpaFloat
from sherpa.utils.err import DS9Err
_target = 'sherpa'
def _get_win():
return ds9.ds9(_target)
def doOpen():
... | brefsdal/sherpa | sherpa/image/pyds9_backend.py | Python | gpl-2.0 | 5,145 |
#!/usr/bin/env python
# Generate the body of ieee.numeric_std and numeric_bit from a template.
# The implementation is based only on the specification and on testing (as
# the specifications are often ambiguous).
# The algorithms are very simple: carry ripple adder, restoring division.
# This file is part of GHDL.... | emogenet/ghdl | libraries/openieee/build_numeric.py | Python | gpl-2.0 | 32,279 |
import re
from widgetastic_patternfly import Input, BootstrapSelect
from wrapanapi.hawkular import Hawkular
from cfme.common import TopologyMixin
from cfme.common.provider import DefaultEndpoint, DefaultEndpointForm
from cfme.utils.appliance import Navigatable
from cfme.utils.appliance.implementations.ui import navig... | jkandasa/integration_tests | cfme/middleware/provider/hawkular.py | Python | gpl-2.0 | 7,860 |
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
#
# Easy AVR USB Keyboard Firmware Keymapper
# Copyright (C) 2018 David Howland
#
# 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 ... | dhowland/EasyAVR | keymapper/easykeymap/legacy.py | Python | gpl-2.0 | 6,758 |
import math
import numpy
import pyaudio
import time
import ntplib
def sine(frequency, length, rate):
length = int(length * rate)
factor = float(frequency) * (math.pi * 2) / rate
return numpy.sin(numpy.arange(length) * factor)
chunks = []
chunks.append(sine(440, 1, 44100))
chunk = numpy.concatenate(chun... | fardog/river | working/ntp-sync.py | Python | gpl-2.0 | 877 |
#
# Copyright (C) 2006 - 2007 Michael 'Mickey' Lauer
# Copyright (C) 2006 - 2007 Richard Purdie
#
# SPDX-License-Identifier: GPL-2.0-only
#
"""
Use this class to fork off a thread to recieve event callbacks from the bitbake
server and queue them for the UI to process. This process must be used to avoid
client/server... | schleichdi2/OPENNFR-6.3-CORE | bitbake/lib/bb/ui/uievent.py | Python | gpl-2.0 | 4,475 |
from Sire.IO import *
from Sire.MM import *
from Sire.System import *
from Sire.Mol import *
from Sire.Maths import *
from Sire.FF import *
from Sire.Move import *
from Sire.Units import *
from Sire.Vol import *
from Sire.Qt import *
import os
coul_cutoff = 20 * angstrom
lj_cutoff = 10 * angstrom
amber = Amber()
(... | chryswoods/SireTests | unittests/SireMM/testgridff2.py | Python | gpl-2.0 | 3,699 |
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
""" Dropbox upload daemon.
"""
from fnmatch import fnmatch
from operator import itemgetter
from os import listdir, path, mknod, stat
from time import strptime, sleep, time
from dropbox.client import DropboxClient, DropboxOAuth2FlowNoRedirect
from dropbox.rest import ... | MrgInfo/PiCam | upload.py | Python | gpl-2.0 | 5,086 |
# -- coding: utf-8 --
# ===========================================================================
# eXe
# Copyright 2012, Pedro Peña Pérez, Open Phoenix IT
#
# 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 Softwar... | exelearning/iteexe | exe/export/cmdlineexporter.py | Python | gpl-2.0 | 6,556 |
# -*- coding: utf-8; -*-
"""
Copyright (C) 2007-2013 Guake authors
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 progra... | piotrdrag/guake | guake/main.py | Python | gpl-2.0 | 11,423 |
#!/usr/bin/python
import socket
import re
import binascii
import struct
import time
import sys
import random
from base64 import b64encode
from hashlib import sha1
from thread import *
events = "/var/www/map/eventstream"
with open(events) as f:
content = f.read().splitlines()
f.close()
websocket_answer = (
'H... | belial1337/WorldAttackMap | wss.py | Python | gpl-2.0 | 1,664 |
# core-getapp.py
from wax import *
class MainFrame(Frame):
def Body(self):
app = core.GetApp()
print app
assert isinstance(app, Application)
app = Application(MainFrame, title="core-getapp")
app.Run()
| MSMBA/msmba-workflow | msmba-workflow/srclib/wax/examples/core-getapp.py | Python | gpl-2.0 | 233 |
#!/usr/bin/python -tt
# Quality scores from fastx
# Website: http://hannonlab.cshl.edu/fastx_toolkit/
# Import OS features to run external programs
import os
import glob
v = "Version 0.1"
# Versions:
# 0.1 - Simple script to run cutadapt on all of the files
fastq_indir = "/home/chris/transcriptome/fastq/trimmed/"
fa... | calandryll/transcriptome | scripts/old/quality_stats.py | Python | gpl-2.0 | 685 |
#!/usr/bin/env python
from sre_parse import isdigit
import sys
__author__ = 'jpijper'
import roslib; roslib.load_manifest('smach_tutorials')
import rospy
import smach_ros
from DialogStateMachine import SMDialog
def main():
# To restrict the amount of feedback to the screen, a feedback level can be given on the... | Rctue/DialogStateMachine | DialogTest_2_AskDeviceOnFinger.py | Python | gpl-2.0 | 1,079 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('mainapp', '0006_auto_20141207_2112'),
]
operations = [
migrations.AlterField(
m... | tigeorgia/fixmystreet | apps/mainapp/migrations/0007_auto_20150202_1422.py | Python | gpl-2.0 | 487 |
#
# The Python Imaging Library.
# $Id$
#
# standard image operations
#
# History:
# 2001-10-20 fl Created
# 2001-10-23 fl Added autocontrast operator
# 2001-12-18 fl Added Kevin's fit operator
# 2004-03-14 fl Fixed potential division by zero in equalize
# 2005-05-05 fl Fixed equalize for low number of values
... | ppizarror/Hero-of-Antair | data/images/pil/ImageOps.py | Python | gpl-2.0 | 13,229 |
# Copyright (C) 2006-2007, 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 distribut... | nemesiscodex/JukyOS-sugar | extensions/deviceicon/battery.py | Python | gpl-2.0 | 9,334 |
import numpy as np
mecanum_matrix = np.matrix([
[+1, +1, +1, +1], # Unitless! Shooting for rad/s
[+1, -1, +1, -1], # Unitless! Shooting for rad/s
[+1, +1, -1, -1], # Unitless! Shooting for rad/s
# [+1, -1, -1, +1], # This is the error row (May not be necessary)
], dtype=np.float32) / 4.0 # All of ... | ufieeehw/IEEE2015 | ros/ieee2015_controller/src/test.py | Python | gpl-2.0 | 436 |
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,1,1e-5],[traindat,testdat,label_trainda... | ratschlab/ASP | examples/undocumented/python_modular/classifier_mpdsvm_modular.py | Python | gpl-2.0 | 1,097 |
# -*- coding: utf-8 -*-
"""
Automatic generated reports can be edited by an healthprofessional during
handling filled in controls (questionnaires) by a patient. The report
can be exported in docX and PDF format.
"""
| acesonl/remotecare | remotecare/apps/report/__init__.py | Python | gpl-3.0 | 216 |
from __future__ import unicode_literals
from django.contrib.auth.models import User
from django.db import models
# Create your models here.
class Noticia(models.Model):
Publicado = 'Publicado'
Borrador = 'Borrador'
Titulo = models.CharField(max_length=30)
Subtitulo = models.CharField(max_length=50)
Imagen = mode... | magvugr/AT | AppAdiccionTic/models.py | Python | gpl-3.0 | 1,704 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
--------------------------------------------------------------------------------------------------
prc_aproximacao
procedimento de aproximação de acordo com o aeródromo e pista estabelecidos
This program is free software: you can redistribute it and/or modify
it under... | mlabru/ptracks | model/newton/cine/prc_aproximacao.py | Python | gpl-3.0 | 13,517 |
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# <https://code.activestate.com/recipes/580709-lines-of-code-loc/>
# Basic Lines-Of-Code counter in Python source files, reporting the
# number of blank, comment and source code lines and total number of
# lines in all Python files scanned.
# Usage example:
# % python ... | KamilKwiatkowski123/Repozytorium | recipe-580709-1.py | Python | gpl-3.0 | 4,433 |
'''apport package hook for udisks
(c) 2009 Canonical Ltd.
Author: Martin Pitt <martin.pitt@ubuntu.com>
'''
import os
import os.path
import apport.hookutils
import dbus
UDISKS = 'org.freedesktop.UDisks'
def add_info(report):
apport.hookutils.attach_hardware(report)
user_rules = []
for f in os.listdir('/... | Alberto-Beralix/Beralix | i386-squashfs-root/usr/share/apport/package-hooks/udisks.py | Python | gpl-3.0 | 1,236 |
# -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'mainwindow.ui'
#
# Created: Wed May 25 13:43:28 2016
# 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.fromUtf... | psvnl/podb | ui_mainwindow.py | Python | gpl-3.0 | 28,313 |
# Copyright (C) 2011 Mark Burnett
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program i... | mark-burnett/filament-dynamics | actin_dynamics/primitives/end_conditions/length.py | Python | gpl-3.0 | 1,203 |
#!/usr/bin/env python
# coding: utf-8
# Binary with Spots
# ============================
#
# Setup
# -----------------------------
# Let's first make sure we have the latest version of PHOEBE 2.2 installed. (You can comment out this line if you don't use pip for your installation or don't want to update to the lates... | phoebe-project/phoebe2-docs | 2.2/examples/binary_spots.py | Python | gpl-3.0 | 1,686 |
import json
import time
import git
import discord
import os
import aiohttp
from cogs.utils.dataIO import dataIO
from urllib.parse import quote as uriquote
try:
from lxml import etree
except ImportError:
from bs4 import BeautifulSoup
from urllib.parse import parse_qs, quote_plus
#from cogs.utils i... | Bluscream/Discord-Selfbot | cogs/utils/checks.py | Python | gpl-3.0 | 7,337 |
from tasty.types import conversions
from tasty.types import *
from tasty.types.driver import TestDriver
__params__ = {'la': 32, 'lb': 32, 'da': 10}
driver = TestDriver()
def protocol(client, server, params):
server.ga = Garbled(val=Unsigned(bitlen=764, dim=[1], signed=False, passive=True, empty=True), signed=False... | tastyproject/tasty | tasty/tests/functional/protocols/mul/garbled_server_server_client/protocol_setup_server.py | Python | gpl-3.0 | 756 |
# -*- coding: utf-8 -*-
#
# This file is part of hopr: https://github.com/hopr/hopr.
#
# Hopr is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later ve... | hopr/hopr | hopr/tool/test_run.py | Python | gpl-3.0 | 5,871 |
from django.views.decorators.csrf import csrf_exempt
from django.contrib.auth import authenticate, login
from django.contrib.auth import logout
from django.contrib.auth.decorators import login_required
import time
from ControlUsuarios.forms import *
from ControlUsuarios.models import UserProfile
# Create your views her... | hugobarzano/DispositivosMovilesBackEnd | ControlUsuarios/views.py | Python | gpl-3.0 | 16,446 |
from sklearn.ensemble import RandomForestClassifier
from sklearn.datasets import make_classification
import numpy as np
def predictClothesGeneral(temp):
dataFile = open("data.txt")
data = dataFile.read()
data = data.split("\n")
X = []
Y = []
Y2 = []
for i in ra... | epaglier/Project-JARVIS | jarvis-features/Weather AI/weatherai.py | Python | gpl-3.0 | 2,382 |
""" The benchmarks below are useful for testing performance when making changes to the maze algorithms. """
from datetime import datetime
from sysconfig import get_python_version
from timeit import Timer
from mazelib import __version__ as version
# CONFIG
SIZES = [5, 10, 25, 50, 100]
ITERATIONS = [100, 50, 20, 5, 1]
G... | theJollySin/mazelib | benchmarks.py | Python | gpl-3.0 | 2,537 |
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding M2M table for field last_read_by on 'Message'
m2m_table_name = d... | tsujamin/digi-approval | src/digiapproval_project/digiapproval_project/apps/digiapproval/migrations/0009_add_last_read_mm_auto.py | Python | gpl-3.0 | 8,804 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.