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) 2011-2016 Red Hat, Inc.
#
# Authors:
# Thomas Woerner <twoerner@redhat.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 Li... | hos7ein/firewalld | src/firewall/core/io/service.py | Python | gpl-2.0 | 11,872 |
# Generated by Django 2.0 on 2018-01-04 11:58
import _socket
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('edc_sync', '0003_auto_20170518_1233'),
]
operations = [
migrations.AlterModelOptions(
name='incomingtransaction',
... | botswana-harvard/edc-sync | edc_sync/migrations/0004_auto_20180104_1158.py | Python | gpl-2.0 | 3,466 |
"""
This module contains steps for handling Image uploads. Docker v2 objects (Manifests and Blobs) are
not handled at this time.
If you feel the need to blame this file, don't use git blame. The code was taken from this commit,
which was later negative committed:
https://github.com/pulp/pulp_docker/commit/cc624a1c9ca... | rbarlow/pulp_docker | plugins/pulp_docker/plugins/importers/upload.py | Python | gpl-2.0 | 6,722 |
"""
Module contains tools for processing files into DataFrames or other objects
"""
from __future__ import print_function
from collections import defaultdict
import re
import csv
import sys
import warnings
import datetime
from textwrap import fill
import numpy as np
from pandas import compat
from pandas.compat import... | Ziqi-Li/bknqgis | pandas/pandas/io/parsers.py | Python | gpl-2.0 | 119,743 |
'''app.routing.sheet'''
import re, time
from flask import g
from .. import get_keys
from app.lib import gdrive
from app.lib.gsheets_cls import SS
from app.main.parser import has_postal
from logging import getLogger
log = getLogger(__name__)
#-----------------------------------------------------------------------------... | SeanEstey/Bravo | app/routing/sheet.py | Python | gpl-2.0 | 6,147 |
import os, re, itertools, yaml
from base64 import b32decode
import simplejson
from twisted.trial import unittest
from twisted.internet import defer, address
from twisted.python import log
from twisted.python.filepath import FilePath
from foolscap.api import Tub, Referenceable, fireEventually, flushEventualQueue
from... | pombredanne/tahoe-lafs | src/allmydata/test/test_introducer.py | Python | gpl-2.0 | 57,753 |
# Austin Jenchi
# 1/30/2015
# 8th Period
# Paycheck
print "Welcome to How to Job"
print
wage_per_hour = raw_input("How much is your hourly wage? ==> $")
if not wage_per_hour == "":
try:
wage_per_hour = float(wage_per_hour)
except:
wage_per_hour = 12.00
else:
wage_per_hour = 12.00
print "You... | timtim17/IntroToGameProg | Labs/Paycheck.py | Python | gpl-2.0 | 746 |
from modes import *
# mode_traffic
field_rate_down = 'rate_down'
field_bw_down = 'bw_down'
field_rate_up = 'rate_up'
field_bw_up = 'bw_up'
# mode_temp
field_cpum = 'cpum'
field_cpub = 'cpub'
field_sw = 'sw'
field_hdd = 'hdd'
# mode_fan_speed
field_fan_speed = 'fan_speed'
# mode_xdsl
field_snr_down = 'snr_down'
fiel... | chteuchteu/Freebox-OS-munin | fields.py | Python | gpl-2.0 | 4,648 |
# -*- python -*-
# Copyright (C) 2009-2017 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3 of the License, or
# (at your option) any later versio... | jocelynmass/nrf51 | toolchain/arm_cm0/arm-none-eabi/lib/thumb/v7-ar/libstdc++.a-gdb.py | Python | gpl-2.0 | 2,483 |
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011 UNINETT AS
#
# This file is part of Network Administration Visualized (NAV).
#
# NAV 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... | sigmunau/nav | python/nav/web/seeddb/utils/edit.py | Python | gpl-2.0 | 6,406 |
import httplib
import urllib
import json
client_id = "UkDnoQzEWYdVMkvbtQeNfP0B"
client_secret = "LoooyWceGKIrxNyG0niwiwjCYLB8X0xw"
parameters_code = {"client_id": client_id,
"response_type": "device_code",
"scope": "netdisk"}
parameters_token = {"grant_type": "device_token",
"code": ... | Tefx/turnip | storage/auth/baidu_auth.py | Python | gpl-2.0 | 1,525 |
from app import application
from flask import render_template, flash, redirect, url_for, request, Response
from datetime import datetime
from kartograph import Kartograph
from .forms import SearchForm
import json
import os
import httplib2
import pycountry
from aviato import *
#Used as the filtering function
def southe... | hrishioa/Aviato | app/views.py | Python | gpl-2.0 | 5,183 |
print "Mary had a little lamb."
print "Its fleece was white as %s." % 'snow'
print "And everywhere that Mary went."
print "." * 10 #what'd that do?
end1 = "C"
end2 = "h"
end3 = "e"
end4 = "e"
end5 = "s"
end6 = "e"
end7 = "B"
end8 = "u"
end9 = "r"
end10 = "g"
end11 = "e"
end12 = "r"
# watch that comma at the end. try ... | mohitbs/mohitrepo | python/examples/lpthw/ex7.py | Python | gpl-2.0 | 448 |
# -*- coding: utf-8 -*-
import attr
from navmazing import NavigateToSibling, NavigateToAttribute
from cfme.common import Taggable, TagPageView
from cfme.containers.provider import (ContainerObjectAllBaseView,
ContainerObjectDetailsBaseView, Labelable,
... | anurag03/integration_tests | cfme/containers/volume.py | Python | gpl-2.0 | 3,601 |
import pytest
from deepdiff import DeepDiff
from cfme.roles import role_access_ui_59z, role_access_ui_510z
from cfme.utils.appliance import ViaUI, find_appliance
from cfme.utils.appliance.implementations.ui import navigate_to
from cfme.utils.blockers import BZ
from cfme.utils.conf import credentials
from cfme.utils.lo... | anurag03/integration_tests | cfme/tests/integration/test_aws_iam_auth_and_roles.py | Python | gpl-2.0 | 4,448 |
from setuptools import setup, find_packages
setup(
name='pulp-server',
version='2.7.0a1',
license='GPLv2+',
packages=find_packages(exclude=['test']),
author='Pulp Team',
author_email='pulp-list@redhat.com',
entry_points={
'console_scripts': [
'../libexec/pulp-manage-wor... | mhrivnak/pulp | server/setup.py | Python | gpl-2.0 | 684 |
# -*- coding: utf-8 -*-
"""This testing module tests the behaviour of the search box in the Provider section
It does not check for filtering results so far."""
import fauxfactory
import pytest
from selenium.common.exceptions import NoSuchElementException
from cfme.infrastructure import host
from cfme.infrastructure.p... | rananda/cfme_tests | cfme/tests/infrastructure/test_advanced_search_providers.py | Python | gpl-2.0 | 10,078 |
#
# Martin Kolman <mkolman@redhat.com>
#
# Copyright 2016 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the GNU
# General Public License v.2. This program is distributed in the hope that it
# will be use... | M4rtinK/anaconda | tests/unit_tests/pyanaconda_tests/test_installation_tasks.py | Python | gpl-2.0 | 15,098 |
# -*- coding: utf-8 -*-
import signal
class Alarm(Exception):
pass
class BasicTest:
def alarmHandler(self, signum, frame):
raise Alarm
def withTimeout(self, seconds, cmd, *args, **kwds):
signal.signal(signal.SIGALRM, self.alarmHandler)
signal.alarm(seconds)
ret = cmd(*args,... | wikimedia/operations-debs-contenttranslation-lttoolbox | tests/basictest.py | Python | gpl-2.0 | 1,044 |
from google.appengine.ext import webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from model import FreebieItem, Distributor, Contributor
import datetime
import logging
head = '''
<html>
<head>
<title>%s</title>
<script src="/static/sorttable.js"></script>
<style>
body {
background-c... | nirea/collardata | freebielist.py | Python | gpl-2.0 | 4,787 |
# -*- coding: utf-8 -*-
#
# test_weight_recorder.py
#
# This file is part of NEST.
#
# Copyright (C) 2004 The NEST Initiative
#
# NEST 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 Li... | terhorstd/nest-simulator | pynest/nest/tests/test_weight_recorder.py | Python | gpl-2.0 | 11,135 |
# Copyright (c) 2011 Matej Laitl <matej@laitl.cz>
# Distributed under the terms of the GNU General Public License v2 or any
# later version of the license, at your option.
"""
An extension to distutils' Distribution to handle Python/Cython build of PyBayes
"""
try:
# 3.x
from distutils.command.build_py import... | cdondrup/PyBayes | support/dist.py | Python | gpl-2.0 | 4,637 |
#
# gPrime - A web-based genealogy program
#
# Copyright (C) 2004-2007 Donald N. Allingham
# Copyright (C) 2008,2011 Gary Burton
# Copyright (C) 2010 Jakim Friant
# Copyright (C) 2011-2012 Paul Franklin
# Copyright (C) 2012 Brian G. Matherly
#
# This program is free software; you can redistribute it and/... | sam-m888/gprime | gprime/plug/report/_options.py | Python | gpl-2.0 | 38,042 |
# -*- coding: utf-8 -*-
# Automatically generated - don't edit.
# Use `python setup.py build_ui` to update it.
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MetadataOptionsPage(object):
def setupUi(self, MetadataOptionsPage):
MetadataOptionsPage.setObjectName("MetadataOptionsPage")
Metada... | phw/picard | picard/ui/ui_options_metadata.py | Python | gpl-2.0 | 9,138 |
# messageentry.py - TortoiseHg's commit message editng widget
#
# Copyright 2011 Steve Borho <steve@borho.org>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2, incorporated herein by reference.
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from ... | seewindcn/tortoisehg | src/tortoisehg/hgqt/messageentry.py | Python | gpl-2.0 | 9,500 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script re-constucts the Qt Creator installation to include Qt libraries, plugins, QtQuick.
Windows:
|-- bin
| |-- qt.conf -> Prefix=..
| |-- qt dlls
| |-- csdataquick executibles
| |-- csdataquick dlls
| |-- qt-creator executibles... | xiaoqiangwang/CSDataQuick | tools/fixup_qtcreator.py | Python | gpl-2.0 | 9,584 |
from django.template import Library, Context
from django.conf import settings
from django.utils.timezone import utc
from django.db.models import Q, Avg, Max, Min, Sum, Count
from calfire_tracker.models import CalWildfire, WildfireDisplayContent
from dateutil import parser
from datetime import datetime, date, time... | SCPR/firetracker | calfire_tracker/templatetags/tracker_tags.py | Python | gpl-2.0 | 5,772 |
"""Package initialization file for pynoddy"""
import os.path
import sys
import subprocess
# save this module path for relative paths
package_directory = os.path.dirname(os.path.abspath(__file__))
# paths to noddy & topology executables
# noddyPath = os.path.join(package_directory,'../noddy/noddy')
# topologyPath = os... | flohorovicic/pynoddy | pynoddy/__init__.py | Python | gpl-2.0 | 7,504 |
__author__ = 'bromix'
class AbstractSystemVersion(object):
def __init__(self, version, releasename, appname):
if not isinstance(version, tuple):
self._version = (0, 0, 0, 0)
else:
self._version = version
if not releasename or not isinstance(releasename, basestring)... | repotvsupertuga/tvsupertuga.repository | plugin.video.youtube/resources/lib/youtube_plugin/kodion/impl/abstract_system_version.py | Python | gpl-2.0 | 978 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import yaml
from parse import *
import sys
import cmath
import numpy as np
from getData import *
def NtoEps(matVec):
matVec=np.array(matVec)
lamb=matVec[:,0]
n=matVec[:,1]
k=matVec[:,2]
N=n[:]+1j*k[:]
eps=N[:]*N[:]
matEps=[... | cinek810/refractiveindex.info | plot.py | Python | gpl-2.0 | 2,040 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# @author: Elivis.Zhang <elivis.zhang@aliyun.com>
# QQ Group:99798703
# Created on Aug 8, 2015
# -*- coding: utf-8 -*-
import MySQLdb
import settings
class db_operate:
def mysql_command(self,conn,sql_cmd):
try:
ret = []
conn=MySQLdb.con... | Elivis/opsa-master | opsa/mysql.py | Python | gpl-2.0 | 1,197 |
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mklogin', '0003_myuser_activationcode'),
]
operations = [
migrations.AlterField(
model_name='myuser',
... | marcinNS/mklogindjango | migrations/0004_auto_20151023_2245.py | Python | gpl-2.0 | 403 |
"""
/*******BLNexp
A QGIS plugin
Exports to Vector data to SurferBLN
-------------------
begin : 2014-16-09
copyright : (C) 2014 by Mario Noriega
email : mario.noriegaf@gmail.com
************... | Mariopilot808/BLNExporter | __init__.py | Python | gpl-2.0 | 1,407 |
# -*- coding: utf-8 -*-
"""
Created on Sun Sep 3 17:20:04 2017
@author: Michy
@name: AutoCAD drawing printer BOT.
@description:
This program is a BOT that prints to pdf all the .dwg files in a given folder.
Given a folder (data_wd) the program will try to print every .dwg file in that
folder.
... | mick001/utility-scripts | print_autocad_drawings.py | Python | gpl-2.0 | 8,162 |
# -*- coding: utf-8 -*-
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2002 Bruce J. DeGrasse
# Copyright (C) 2000-2007 Donald N. Allingham
# Copyright (C) 2007-2012 Brian G. Matherly
# Copyright (C) 2008 James Friedmann <jfriedmannj@gmail.com>
# Copyright (C) 2009 Benny Malengier <b... | beernarrd/gramps | gramps/plugins/textreport/detancestralreport.py | Python | gpl-2.0 | 41,493 |
from django.core.urlresolvers import reverse
from django.db import models
# Stores information about what h5p uses what libraries
class h5p_contents_libraries(models.Model):
content_id = models.PositiveIntegerField(null=False)
library_id = models.PositiveIntegerField(null=False)
dependency_type = models.... | DrClockwork/H5PP | h5pp/models.py | Python | gpl-2.0 | 9,008 |
# ~*~ coding: utf-8 ~*~
#
from ops.utils import run_AdHoc
def test_admin_user_connective_manual(asset):
if not isinstance(asset, list):
asset = [asset]
task_tuple = (
('ping', ''),
)
summary, _ = run_AdHoc(task_tuple, asset, record=False)
if len(summary['failed']) != 0:
ret... | choldrim/jumpserver | apps/assets/utils.py | Python | gpl-2.0 | 361 |
from hachoir_core.field import (
RawBits, Bit, Bits, PaddingBits,
RawBytes, Bytes, PaddingBytes,
GenericString, Character,
isInteger, isString)
from field import FakeField
class EditableField(FakeField):
"""
Pure virtual class used to write editable field class.
"""
_is_altered = Fals... | jubalh/MAT | libmat/hachoir_editor/typed_field.py | Python | gpl-2.0 | 8,361 |
# Copyright (C) 2012, Ansgar Burchardt <ansgar@debian.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 of the License, or
# (at your option) any later version.
#
# This pr... | Debian/dak | daklib/upload.py | Python | gpl-2.0 | 20,230 |
###############################################################################
#PPAM is a pulseaudio interface.
#Copyright (C) 2013 Denis Doria (Thuck)
#
#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... | thuck/ppam | ui/tabs.py | Python | gpl-2.0 | 13,310 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2008 Zuza Software Foundation
#
# This file is part of translate.
#
# translate 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... | lehmannro/pootle | local_apps/pootle_app/urls.py | Python | gpl-2.0 | 1,109 |
# -*- coding: utf-8 -*-
# __author__: Yixuan LI
# __email__: yl2363@cornell.edu
import numpy as np
import os
from sklearn import svm
import matplotlib.pyplot as plt
import pickle
from sklearn import preprocessing
from sklearn.preprocessing import StandardScaler
from sklearn.feature_selection import SelectKBest
from sk... | YixuanLi/geo-tweet | LIWC-train/LIWC_classify.py | Python | gpl-2.0 | 10,894 |
#!/usr/bin/env python
# coding: utf-8
"""
Created On Jul 2, 2014
@author: jwang
"""
import logging
# from pymongo import DESCENDING
from weibonews.utils.decorators import perf_logging
from weibonews.db.utils import cursor_to_array
_LOGGER = logging.getLogger('weibonews.wechat')
DB = None
IDS = None
INDEXES = {
... | vispeal/VoteHelper | wechat/wechat/db/wechatdb.py | Python | gpl-2.0 | 2,009 |
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2015- Serge Noiraud
#
# 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 opti... | gramps-project/gramps | gramps/gen/utils/symbols.py | Python | gpl-2.0 | 7,831 |
'''
This program uses Scarab_IBM to implement Simulation 1.
Copyright (C) 2015 Fabio Soares Frazao
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 L... | fsfrazao/Scarab-IBM | sim2.py | Python | gpl-2.0 | 9,111 |
#! /usr/bin/env python
import sys
import math
import collections
import dendropy
def count_set_size_difference(v1, v2):
c1 = collections.Counter(v1)
c2 = collections.Counter(v2)
counted_matched = c1 & c2
matched = sorted(list(counted_matched.elements()))
counted_diffs = (c1 - c2) + (c2 - c1)
u... | jeetsukumaran/pstrudel | test/scripts/calc-tree-unlabeled-symmetric-difference.py | Python | gpl-2.0 | 1,420 |
# -*- coding: utf-8 -*-
#loadmodelcontroller
"""Survey Controller"""
from tg import expose, flash, require, url, lurl, request, redirect, tmpl_context,validate,session
from tg.i18n import ugettext as _, lazy_ugettext as l_
from tg.exceptions import HTTPFound
from tg import predicates
from pollandsurvey import model
#f... | tongpa/PollSurveyWeb | pollandsurvey/controllers/script/loadmodelcontroller.py | Python | gpl-2.0 | 29,441 |
import HaloRadio.TopWeb as TopWeb
class plugin(TopWeb.TopWeb):
def GetReqs(self):
return "amv"
def handler(self, context):
import HaloRadio.UserListMaker as UserListMaker
import HaloRadio.User as User
ulm = UserListMaker.UserListMaker()
ulm.GetAll()
users = []
is_admin=0
enable=0... | ph1l/halo_radio | WebRoot/UserList.py | Python | gpl-2.0 | 2,144 |
# -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2011 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 your option) a... | valkyriesavage/invenio | modules/bibauthorid/lib/bibauthorid_tables_utils.py | Python | gpl-2.0 | 54,551 |
# coding: utf8
# OeQ autogenerated lookup function for 'Window/Wall Ratio East in correlation to year of construction, based on the source data of the survey for the "German Building Typology developed by the "Institut für Wohnen und Umwelt", Darmstadt/Germany, 2011-2013'
import math
import numpy as np
import oeqLooku... | UdK-VPT/Open_eQuarter | mole/stat_corr/window_wall_ratio_east_MFH_by_building_age_lookup.py | Python | gpl-2.0 | 2,380 |
#!/usr/bin/python
# DFF -- An Open Source Digital Forensics Framework
# Copyright (C) 2009-2010 ArxSys
# This program is free software, distributed under the terms of
# the GNU General Public License Version 2. See the LICENSE file
# at the top of the source tree.
#
# See http://www.digital-forensic.org for more info... | elthariel/dff | api/exceptions/patch.py | Python | gpl-2.0 | 898 |
#!/home/executor/Ice/python2.4/bin/python
# Copyright (C) 2012 CEDIANT <info@cediant.es>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License v2
# as published by the Free Software Foundation.
#
# This program is distributed in the hope that it... | cediant/hpcservergridscheduler | CLIENT/client.py | Python | gpl-2.0 | 7,365 |
#!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "eksi.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
| hanakamer/eskisozluk-clone | App/eksi/manage.py | Python | gpl-2.0 | 247 |
#Bai tap ve nha ngay 3 (20150827)
a = raw_input ("Nhap vao 1 chuoi so:")
#print "So nay:", a
print "So ki tu a la:", a.count("a")
print "So ki tu b la:", a.count("b")
print "So ki tu c la:", a.count("c") | pythonvietnam/pbc082015 | vumanhcuong/Day3/khonghieu.py | Python | gpl-2.0 | 204 |
# handleTorrent.py
# function to manipulate all the torrent part
import requests
from requests.auth import HTTPBasicAuth
import ClassUsers
# file used to store sensible data, like API key
def hash2magnet(hashlink):
magnet = "magnet:?xt=urn:btih:" + hashlink[2:-2]
return magnet
def addmagnet(torrent, chat_i... | pazpi/ruTorrent-bot | handleTorrent.py | Python | gpl-2.0 | 1,580 |
# copies.py - copy detection for Mercurial
#
# Copyright 2008 Matt Mackall <mpm@selenic.com>
#
# 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 heapq
from . import (
node,
pathu... | dscho/hg | mercurial/copies.py | Python | gpl-2.0 | 19,523 |
# -*- coding: utf-8 -*-
## This file is part of Invenio.
## Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 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 ... | fjorba/invenio | modules/websearch/lib/websearch_templates.py | Python | gpl-2.0 | 196,591 |
# Base class for text window screens.
#
# This file is part of Simpleline Text UI library.
#
# Copyright (C) 2020 Red Hat, Inc.
#
# Simpleline 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 ver... | rhinstaller/python-simpleline | simpleline/render/screen/__init__.py | Python | gpl-2.0 | 10,460 |
# -*- coding: utf-8 -*-
"""
***************************************************************************
hugeFileNormalize.py
---------------------
Date : May 2014
Copyright : (C) 2014 by Martin Isenburg
Email : martin near rapidlasso point com
*************... | luca76/QGIS | python/plugins/processing/algs/lidar/lastools/hugeFileNormalize.py | Python | gpl-2.0 | 5,671 |
#!/usr/bin/env python
#coding=utf-8
import sys
sys.path.append("..")
import urllib
import myjson
from datetime import datetime, date, timedelta
import time
from define import *
from data_interface.stock_dataset import stock_dataset
class turtle(object):
"""
turtle model
"""
def get_mean(self, data, ... | icemoon1987/stock_monitor | model/turtle.py | Python | gpl-2.0 | 6,761 |
#!/usr/bin/env python
"""Handle records from /proc/self/status data files"""
import regentest as RG
import ProcHandlers as PH
PFC = PH.ProcFieldConstants
PDC = PH.ProcDataConstants
# ---
# pylint: disable=R0914
def re_self_status(inprecs):
"""Iterate through parsed records and re-generate data file"""
_... | cnamejj/PyProc | regentest/self_status.py | Python | gpl-2.0 | 4,347 |
import csv
import operator
import itertools
import math
import logger1
import re
#main piece of code for calculating & wwriting alignments from processed data
def calculateAlignments(utterances, markers, smoothing, outputFile, shouldWriteHeader, corpusType='CHILDES'):
markers = checkMarkers(markers)
groupedUtterance... | langcog/alignment | parsers/alignment.py | Python | gpl-2.0 | 7,365 |
#!/usr/bin/env python
import system as sys
import traces as tra
import info as nf
import pylab as pl
pos_info = '+0+600'
pos_tra = '+300+600'
pos_sys = '+0+0'
i = nf.info(position=pos_info)
s = sys.system(info=i, position=pos_sys)
t = tra.traces(s, info=i, position=pos_tra)
if pl.get_backend() == 'TkAgg':
s.fig.... | jusjusjus/Motiftoolbox | Fitzhugh_n-cell/run.py | Python | gpl-2.0 | 368 |
# Multiprocessing with Pipe
# Written by Vamei
import multiprocessing as mul
def proc1(pipe):
pipe.send('hello')
print('proc1 rec:',pipe.recv())
def proc2(pipe):
print('proc2 rec:',pipe.recv())
pipe.send('hello, too')
if __name__ == '__main__':
#1) Pipe可以是单向(half-duplex),也可以是双向(duplex)。
#我们... | KennyLv/learnPython | src/24.modules.multiprocessing_Pipe.py | Python | gpl-2.0 | 1,154 |
"""
urlresolver XBMC Addon
Copyright (C) 2011 t0mm0
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.
... | VioletRed/script.module.urlresolver | lib/urlresolver/plugins/videohut.py | Python | gpl-2.0 | 5,173 |
# The root bicyclerepairman package
# do:
# ---------------------
# import bike
# ctx = bike.load()
# ---------------------
# to instantiate a bicyclerepairman context object
from facade import init, NotAPythonModuleOrPackageException, CouldntLocateASTNodeFromCoordinatesException, UndoStackEmptyException
| lebauce/artub | bike/__init__.py | Python | gpl-2.0 | 308 |
#
# livef1
#
# f1item.py - Storage class for the drivers information
#
# 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; e... | livef1/Livef1-web | src/item.py | Python | gpl-2.0 | 2,348 |
import os,sys
import serial
import time
from websocket import create_connection
ws = create_connection("ws://echo.websocket.org/")
class Motor(object):
def __init__(self, which_motor, speed = 0):
global ser
self._speed = speed
if which_motor == 0:
self.motor_side = "left"
... | RoboArmadillo/JSIM | motor.py | Python | gpl-2.0 | 1,123 |
import os
import sys
import unittest
from logilab.common import testlib
from pylint.testutils import make_tests, LintTestUsingFile, cb_test_gen, linter
import ConfigParser
HERE = os.path.dirname(os.path.abspath(__file__))
PLUGINPATH = os.path.join(HERE, "..")
linter.prepare_import_path(PLUGINPATH)
linter.load_plugin_... | ancho85/pylint-playero-plugin | tests/fulltest.py | Python | gpl-2.0 | 2,139 |
"""
Reads the cardio data from GPX files and generates plots with it.
Requires the following libraries:
* matplotlib
Author: Javier Espigares Martin
Email: javierespigares@gmail.com
GNU v2.0 License
"""
from datetime import datetime, date, time
class GPXCardio():
"""
GPX Cardio class. Opens the filename gi... | javiere/GPXCardio | GPXCardio.py | Python | gpl-2.0 | 4,530 |
# Cheroke Admin
#
# Authors:
# Alvaro Lopez Ortega <alvaro@alobbs.com>
#
# Copyright (C) 2010 Alvaro Lopez Ortega
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of version 2 of the GNU General Public
# License as published by the Free Software Foundation.
#
# This pro... | mdavid/cherokee-webserver-svnclone | admin/plugins/extensions.py | Python | gpl-2.0 | 2,529 |
# -*- coding: utf8 -*-
#
# Created by 'myth' on 2/19/16
import matplotlib as mpl
import settings
mpl.use('TkAgg')
| myth/trashcan | it3708/project3/modules/__init__.py | Python | gpl-2.0 | 116 |
#!/usr/bin/env python
# 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... | vrbagalkote/avocado-misc-tests-1 | generic/service_check.py | Python | gpl-2.0 | 3,084 |
from django.contrib import admin
from django.conf import settings
from django.core.mail import send_mail
from django.utils.translation import ugettext as _
from django.contrib.sites.models import Site
from django.shortcuts import render
from django.http import HttpResponseRedirect
from django_bigbluebutton.models im... | ABlogiX/django-bigbluebutton | admin.py | Python | gpl-2.0 | 4,847 |
# coding: utf-8
#--------------//////////----------------------
#Projeto Criado por: Lário Diniz
#Contatos: developer.lario@gmail.com
#data: 29/09/2015
#--------------//////////----------------------
from django.test import TestCase
from django.test import Client
from ..models import User, Cliente_Model
class lo... | lariodiniz/OramaBankTest | OramaBank/pynetbanking/tests/test_views.py | Python | gpl-2.0 | 2,719 |
import os
import sys
filenames = [
'Albuquerque_6x6.tfix',
'Atlanta_6x6.tfix',
'Austin_6x6.tfix',
'Baltimore_6x6.tfix',
'Boston_6x6.tfix',
'Charlotte_6x6.tfix',
'Chicago_6x6.tfix',
'Cleveland_6x6.tfix',
'Columbus_6x6.tfix',
'Dallas_6x6.tfix',
'Denver_6x6.tfix',
'Detroit_6x6.tfix',
'El_Paso_6x6.tfix',
'Fort_Worth_6x6.t... | nesl/mercury | Services/Mapping/tmpBatch.py | Python | gpl-2.0 | 1,450 |
from horizon import tables
from openstack_dashboard.dashboards.admin.log import tables as log_tables
from openstack_dashboard.models import log
from horizon.utils import functions as utils
from django.conf import settings
import itertools
from horizon import exceptions
from django.utils.translation import ugette... | ChinaMassClouds/copenstack-server | openstack/src/horizon-2014.2/openstack_dashboard/dashboards/admin/log/views.py | Python | gpl-2.0 | 3,412 |
# -*- coding: utf-8 -*-
"""Setup/installation tests for this package."""
from atrealtheme.alderamin.testing import IntegrationTestCase
from plone import api
class TestInstall(IntegrationTestCase):
"""Test installation of atrealtheme.alderamin into Plone."""
def setUp(self):
"""Custom shared utility ... | atreal/atrealtheme.alderamin | src/atrealtheme/alderamin/tests/test_setup.py | Python | gpl-2.0 | 1,242 |
#!/home/longbin/install/apps/Python-2.5_gcc/bin/python
import sys
import math
import getopt
import string
import fileinput
clrs = ['ff0000', '00ff00', '0000ff']
def printheader(n):
print '<?xml version="1.0" encoding="UTF-8" standalone="no"?>'
print ' <graphml xmlns="http://graphml.graphdrawing.org/xmln... | ucsb-ilabs/shapematching | src/main/python/edu/ucsb/ilab/shapematching/pt2graph.py | Python | gpl-2.0 | 5,365 |
"""
Configuration class.
Copyright 2010 Kelsey Hightower
Kelsey Hightower <kelsey.hightower@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 License, or
(at your op... | cobbler/koan | koan/configurator.py | Python | gpl-2.0 | 10,535 |
#!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import time
from creds import get_nova_obj
from scit_config import *
from scit_db import *
#get authed nova obj
nova = get_nova_obj()
def create_nova_vm(logger, server_name, usr_dst):
conf = getScitConfig()
retry = int(conf["scit"]["scit_clean_retry"])
... | Colstuwjx/scit-sys | openstack_api.py | Python | gpl-2.0 | 7,352 |
# SecuML
# Copyright (C) 2016-2017 ANSSI
#
# SecuML 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.
#
# SecuML is distributed in the h... | ah-anssi/SecuML | SecuML/core/ActiveLearning/QueryStrategies/AnnotationQueries/AnnotationQueries.py | Python | gpl-2.0 | 3,837 |
def setUp(self):
pass
def test_stuff(self):
pass
| mattrenquist/fabric | test/test_operations.py | Python | gpl-2.0 | 57 |
# -----------------------------------------------------------------------------
#
# This file is the copyrighted property of Tableau Software and is protected
# by registered patents and other applicable U.S. and international laws and
# regulations.
#
# Unlicensed use of the contents of this file is prohibited. Please... | corystreet/pyOdbcToTde | Static/TableauSDK-9100.15.0828.1711/tableausdk/Exceptions.py | Python | gpl-2.0 | 1,040 |
import sys
import setuptools
with open('README.md', 'r') as fh:
long_description = fh.read()
with open('version.h', 'r') as fh:
version = fh.read().split('"')[1]
setuptools.setup(
name='ENigMApy',
version=version,
author='bjaraujo',
author_email='',
description='ENigMA - Extended Numerica... | bjaraujo/ENigMA | trunk/wrappers/swig/python/setup.py | Python | gpl-2.0 | 831 |
#!/usr/bin/env python
from __future__ import print_function
import os, platform
from argparse import ArgumentParser
import numpy as np
import time
import resource
from mayavi import mlab
from netCDF4 import Dataset
from mpl_toolkits.basemap import Basemap
from numba import jit
@jit
def add_triangles_from_square(x, ... | NEMO-NOC/NEMOsphere | lego5.py | Python | gpl-2.0 | 14,256 |
from flask import Flask
from flask import request
from flask import render_template
from flask import redirect
from flask import url_for
app = Flask(__name__)
from app import views
| DavidAwad/HeroquestBot | app/__init__.py | Python | gpl-2.0 | 184 |
#!/usr/bin/env python
import json, logging, sys
import python_sqs
log = None
line = None
encodings = ('UTF-8', 'WINDOWS-1252', 'ISO-8859-1')
try:
python_sqs.init(json_input=True)
log = logging.getLogger(__name__)
line = sys.stdin.readline()
while line:
line = line.strip()
for encoding i... | Praesidio/syslog-ng-python-sqs | python_sqs_stdin.py | Python | gpl-2.0 | 871 |
#!/usr/bin/env python2
def genprimes(n):
primes = sieve(n)
answer = [y for y in xrange(2, n+1) if primes[y] == 1]
return answer
def sieve(n):
primes = [1]*(n+1)
primes[0] = 0
primes[1] = 0
for i in xrange(2, n+1):
if primes[i] == 1:
x = i*i
inc = 2 if i !=... | svb2357/projecteuler | 10/answer.py | Python | gpl-2.0 | 484 |
#!/usr/bin/python
# compute new sensitivity from formulae in manual
import math
print "Tilt Sensitivity Calculator"
print "X1 refers to the tilt measurement, in arc sec"
print "R0/R1 refer to the gravimeter readings, in mGal"
print "Get the current tilt sensitivity from data files or the Setup menu"
oldSens = float(ra... | inkenbrandt/Earth_Tides | Micrograv/util/tilt_sens.py | Python | gpl-2.0 | 593 |
# -*- coding: utf-8 -*-
"""
Created on Wed Jun 24 12:05:24 2015
@author: jean
"""
def hill_climbing(neighborhood, x):
y = neighborhood.randomNeighbor(x)
if y is not None and y.isBetterThan(x):
return y
return x
| jeanpm/pof | methods/hc.py | Python | gpl-2.0 | 234 |
"""Twitter plugin for Kegbot."""
from pykeg.plugin import plugin
from pykeg.plugin import util
from pykeg.core.models import KegbotSite
from pykeg.core.util import SuppressTaskErrors
from . import forms
from . import tasks
from . import views
from .client import TwitterClient
from unicodedata import normalize
KEY_... | Kegbot/kegbot-server | pykeg/contrib/twitter/plugin.py | Python | gpl-2.0 | 12,130 |
from Screen import Screen
from Screens.DefaultWizard import DefaultWizard
from ServiceScan import ServiceScan
from Components.config import config, ConfigSubsection, ConfigSelection, \
ConfigYesNo, ConfigInteger, getConfigListEntry, ConfigSlider, ConfigEnableDisable
from Components.ActionMap import NumberActionMap, Ac... | libo/Enigma2 | lib/python/Screens/ScanSetup.py | Python | gpl-2.0 | 45,681 |
import os
import logging
import unittest
try:
import configparser as ConfigParser
except ImportError:
import ConfigParser
try:
from unittest.mock import patch, Mock
except ImportError:
from mock import patch, Mock
import pyzor.config
from tests.util import mock_open
class MockData(list):
def c... | SpamExperts/pyzor | tests/unit/test_config.py | Python | gpl-2.0 | 9,903 |
# coding=utf-8
# Author: Dustyn Gibson <miigotu@gmail.com>
# URL: https://sickrage.github.io
#
# This file is part of SickRage.
#
# SickRage 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 ... | adaur/SickRage | sickbeard/providers/thepiratebay.py | Python | gpl-3.0 | 6,703 |
#!/usr/bin/env python
"""
Copyright (C) 2016 Elliott Mitchell <ehem+android@m5p.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 3 of the License, or
(at your option) any late... | ehem/kdztools | libexec/gpt.py | Python | gpl-3.0 | 8,879 |
'''
Download URLs
'''
from django.conf.urls import url
from tardis.tardis_portal.download import (
download_datafile,
streaming_download_datafiles,
streaming_download_experiment,
streaming_download_dataset,
download_api_key
)
download_urls = [
url(r'^datafile/(?P<datafile_id>\d+)/$', download_... | wettenhj/mytardis | tardis/urls/download.py | Python | gpl-3.0 | 1,724 |
from django.db import models
from django.core.urlresolvers import reverse
class Album(models.Model):
artist = models.CharField(max_length=250)
album_title = models.CharField(max_length=500)
genre = models.CharField(max_length=100)
album_logo = models.FileField()
def get_absolute_url(self):
... | davcastroruiz/boston-django-project | webSite/music/models.py | Python | gpl-3.0 | 878 |
# coding=utf-8
"""
InaSAFE Disaster risk assessment tool developed by AusAid and World Bank
- **GUI Test Cases.**
Contact : ole.moller.nielsen@gmail.com
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Fre... | danylaksono/inasafe | safe_qgis/impact_statistics/test/test_postprocessor_manager.py | Python | gpl-3.0 | 5,425 |
from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# Examples:
# url(r'^$', 'surda.views.home', name='home'),
# url(r'^blog/', include('blog.urls')),
url(r'^admin/', include(admin.site.urls)),
)
| codebio/gmvv | surda/surda/urls.py | Python | gpl-3.0 | 300 |