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
import sublime, sublime_plugin class RunOnSave(sublime_plugin.EventListener): def on_post_save(self, view): # Check if project has run-on-save enabled. settings = view.settings() if settings.get('run_on_save') == 1: command = settings.get('command') if command is not None: option_d...
chrishadi/SublimeRunOnSave
runonsave.py
Python
mit
830
from django.test import SimpleTestCase class MaintenanceModeTestCase(SimpleTestCase): def test_maintenance_mode_enabled_home_page(self): with self.settings(MAINTENANCE_MODE=True): response = self.client.get("/", follow=True) self.assertEqual(503, response.status_code) s...
ministryofjustice/cla_frontend
cla_frontend/apps/core/testing/test_views.py
Python
mit
1,532
from django.conf.urls import url from django.views.generic import RedirectView from .views import wordcloud_demoview urlpatterns = [ url(r"wordcloud/?$", wordcloud_demoview, name="wordcloud") ]
grapeshot/django-wordcloud-demo
wordcloud_demo/urls.py
Python
mit
200
#!python #-*- encoding=utf-8 -*- import sys, sqlite3, logging, os, os.path import wx, time, re, copy, webbrowser import wx.grid, wx.html import json, math from cfg import config from util import * from model import * from view import * class App(wx.App): instance = None def __init__(self, conf, *args): wx.App._...
dlutxx/cement
main.py
Python
mit
3,137
import scipy as sp import matplotlib import matplotlib.pyplot as plt def simple_log_qqplot(quantiles_list, png_file=None, pdf_file=None, quantile_labels=None, line_colors=None, max_val=5, title=None, text=None, plot_label=None, ax=None, **kwargs): storeFig = False if ax is None: f = plt.fig...
timeu/PyGWAS
pygwas/core/plot.py
Python
mit
4,855
import forecastio class ForecastAPI: _API_KEY = "8eefab4d187a39b993ca9c875fef6159" _LAZY = False _LAT = 0 _LNG = 0 _forecast = () def __init__(self,key,lat,lng,lazy=False): self._LAT = lat self._LNG = lng self._API_KEY = key self._LAZY = lazy self._for...
GreatLakesEnergy/sesh-dash-beta
seshdash/api/forecast.py
Python
mit
1,952
import copy import os from visitor import * from stringstream import * class Rewriter(NodeVisitor): """ Class for rewriting of the original AST. Includes: 1. the initial small rewritings, 2. transformation into our representation, 3. transforming from our representation to C-executable code, 4. cre...
dikujepsen/OpenTran
v1.0/src/framework/rewriter.py
Python
mit
39,294
from re import compile # ----------------- Local variables ----------------- # __reCompiles = [] # ----------------- Global methods ----------------- # def compileTitleRe(): """Generates and compiles regex patterns""" rePats = [ r'[\{\(\[].*?[\)\]\}/\\]', r'^.*?\(', r'[\)\]\}\-\'\"...
kug3lblitz/Heat-Replay
src/code/settings/regexify.py
Python
mit
1,045
RegObj.dll is an ActiveX server--and, hence, has an automation interface--that is available with documentation in the distribution file known as RegObji.exe, from the following page: http://msdn.microsoft.com/vbasic/downloads/addins.asp To provide early binding for RegObj use >>> from win32com.client impo...
ActiveState/code
recipes/Python/137551_Using_RegObj_Automatiaccess_MSW/recipe-137551.py
Python
mit
1,024
#!/usr/bin/env python # -*- coding: utf-8 -*- import uuid from db.common import Base from db.specific_event import SpecificEvent from db.event import Event from db.player import Player from db.team import Team class Takeaway(Base, SpecificEvent): __tablename__ = 'takeaways' __autoload__ = True HUMAN_RE...
leaffan/pynhldb
db/takeaway.py
Python
mit
991
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import, unicode_literals import sys from RPLCD_i2c import CharLCD from RPLCD_i2c import Alignment, CursorMode, ShiftMode from RPLCD_i2c import cursor, cleared try: input = raw_input except NameError: pass ...
zador-blood-stained/RPLCD-i2c
test_20x4.py
Python
mit
3,707
from distutils.core import setup setup(name='jgcspendfrom', version='1.0', description='Command-line utility for jgcoin "coin control"', author='Gavin Andresen', author_email='gavin@jgcoinfoundation.org', requires=['jsonrpc'], scripts=['spendfrom.py'], )
cptecdfi/jgcoins
contrib/spendfrom/setup.py
Python
mit
297
#!/usr/bin/env python3.8 import os import sys import unittest SCRIPT_DIR = os.path.dirname( os.path.realpath(os.path.join(os.getcwd(), os.path.expanduser(__file__)))) sys.path.append( os.path.normpath(os.path.join(SCRIPT_DIR, os.path.pardir, os.path.pardir))) # pylint: disable=wrong-import-position from nono...
durante987/nonogram_solver
tests/rules/test_init.py
Python
mit
3,997
import json import os.path from hashlib import md5 class TargetFile: def __init__(self, path, data = None): self.path = path self.hash = None self.dependencies = {} if data is not None: self.hash = data['hash'] self.dependencies = data['dependencies'] def raw(self): return { 'hash': self.hash, ...
mlowen/Pyke
pyke/meta.py
Python
mit
2,310
# -*- coding: utf-8 -*- # Generated by Django 1.11.1 on 2018-01-07 16:16 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('taborniki', '0013_remove_oseba_rojstvo2'), ] opera...
markbaltic/TaborniskaBaza
taborniki/migrations/0014_auto_20180107_1716.py
Python
mit
1,457
import _plotly_utils.basevalidators class HoverlabelValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="hoverlabel", parent_name="scattermapbox", **kwargs): super(HoverlabelValidator, self).__init__( plotly_name=plotly_name, parent_name=parent...
plotly/python-api
packages/python/plotly/plotly/validators/scattermapbox/_hoverlabel.py
Python
mit
2,062
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('bookmarks', '0001_initial'), ] operations = [ migrations.AlterField( model_name='bo...
incuna/incuna-bookmarks
bookmarks/migrations/0002_auto_20160301_1154.py
Python
mit
897
# DO NOT EDIT THIS FILE! # # Python module CosCollection__POA generated by omniidl import omniORB omniORB.updateModule("CosCollection__POA") # ** 1. Stub files contributing to this module import CosCollection_idl # ** 2. Sub-modules # ** 3. End
amonmoce/corba_examples
omniORBpy-4.2.1/build/python/COS/CosCollection__POA/__init__.py
Python
mit
249
import json import os from AppKit import NSApplication, NSStatusBar, NSMenu, NSMenuItem, NSVariableStatusItemLength, NSImage from PyObjCTools import AppHelper from project_cron.models import Schedule from threading import Timer from project_cron.utils import logutil class App(NSApplication): def finishLaunching(...
ecleya/project_cron
main.py
Python
mit
2,772
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-02 09:52 from __future__ import unicode_literals import django.db.models.deletion from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [ ('cookiecutter_manager', '0002_auto_2017050...
MOOCworkbench/MOOCworkbench
experiments_manager/migrations/0002_auto_20170502_0952.py
Python
mit
2,437
from django.conf import settings from django.db import models from django_dropimages import settings as di_settings # if no custom image models is present I load my own if not di_settings.CONFIG['DROPIMAGEGALLERY_MODEL']: class DropimagesGallery(models.Model): gallery_identifier = models.CharField(max_le...
sittizen/django_dropimages
django_dropimages/models.py
Python
mit
859
from nose.tools import istest, eq_ from tetris.values.key import Key class TestKey(object): @istest def same_key_is_equal(self): eq_(Key("key"), Key("key")) @istest def key_is_usable_as_key(self): key_dict = { Key("key"): "Value" } eq_(key_dict[Key("key")],...
sirmar/tetris
tetris/values/test/test_key.py
Python
mit
330
# coding: utf-8 """参数验证相关工具 """ import re import ujson import types import numbers from girlfriend.util.lang import args2fields from girlfriend.exception import InvalidArgumentException class Rule(object): """描述参数验证规则,并执行验证过程 """ @args2fields() def __init__(self, name, type=None, ...
chihongze/girlfriend
girlfriend/util/validating.py
Python
mit
4,999
# -*- coding: utf-8 -*- class CrazyBoxError(Exception): """ The base class for custom exceptions raised by crazybox. """ pass class DockerError(Exception): """ An error occurred with the underlying docker system. """ pass
USTB-LETTers/judger
exceptions.py
Python
mit
256
"""superlists URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-...
rmelchorv/TDD-Cuervos
superlists/urls.py
Python
mit
896
# -*- coding: utf-8 -*- from __future__ import unicode_literals import numpy as np import matplotlib.pyplot as plt import matplotlib import scipy from sklearn.neighbors import KNeighborsClassifier from scipy.cluster import hierarchy as hier from scipy.spatial import distance import json import codecs import sys if le...
Shashwat986/thesis
vectoralign/get_nn.py
Python
mit
1,185
# -*- coding: utf-8 -*- __all__ = ["photometry", "epic", "Data", "Inject", "Likelihood", "Summary", "FP", "fit_traptransit"] from . import photometry, epic from .data import Data from .inject import Inject from .likelihood import Likelihood from .summary import Summary from .fp import FP from .traptransi...
dfm/ketu
ketu/k2/__init__.py
Python
mit
345
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('viewer', '0006_meter_on_auditlist'), ] operations = [ migrations.CreateModel( name='Group', fields=[...
impactlab/jps-handoff
webapp/viewer/migrations/0007_auto_20150408_1402.py
Python
mit
935
from django.utils.encoding import force_text import re from django.utils import six from ginger import serializer from jinja2 import Markup __all__ = ['html_json', 'html_attrs', "Element", "CssClassList", "CssStyle", 'add_css_class', 'empty'] def html_json(values): content = serializer.encode(values) try: ...
vivsh/django-ginger
ginger/html/common.py
Python
mit
6,023
# coding: utf-8 """ Onshape REST API The Onshape REST API consumed by all clients. # noqa: E501 The version of the OpenAPI document: 1.113 Contact: api-support@onshape.zendesk.com Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 im...
onshape-public/onshape-clients
python/onshape_client/oas/models/btp_function_declaration246.py
Python
mit
13,254
from wxPython.wx import * from twisted.internet import reactor class MyApp(wxApp): def OnInit(self): # Twisted Reactor Code reactor.startRunning() EVT_TIMER(self,999999,self.OnTimer) self.timer=wxTimer(self,999999) self.timer.Start(250,False) # End Twisted Code # Do...
ActiveState/code
recipes/Python/181780_Using_wxPythTwisted/recipe-181780.py
Python
mit
465
#!/usr/bin/env python ''' A WebSocket to TCP socket proxy with support for "wss://" encryption. Copyright 2011 Joel Martin Licensed under LGPL version 3 (see docs/LICENSE.LGPL-3) You can make a cert/key with openssl using: openssl req -new -x509 -days 365 -nodes -out self.pem -keyout self.pem as taken from http://doc...
SuperDARNCanada/realtimedisplay
websockets/websockify/websockify/websocketproxy.py
Python
mit
21,312
# -*- coding: utf-8 -*- # Generated by Django 1.11.6 on 2018-02-15 07:47 from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('studygroups', '0083_auto_20180209_1210'), ] operations = [ migrations.RenameModel( old_name='Facilitator', ...
p2pu/learning-circles
studygroups/migrations/0084_auto_20180215_0747.py
Python
mit
366
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-03-13 15:43 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ('accounts', '0001_initial'), ] o...
z0rr0/eshop
shop/sales/migrations/0001_initial.py
Python
mit
4,179
""" Tensor Contraction Engine output parser. This module provides parsers of the output of the Tensor Contraction Engine of So Hirata into Tensor objects in drudge. """ import collections import itertools import re from sympy import nsimplify, sympify, Symbol from drudge import Term # # The driver function # --...
tschijnmo/drudge
drudge/_tceparser.py
Python
mit
5,439
from pyd.support import setup, Extension, pydexe_sanity_check pydexe_sanity_check() projName = 'interpcontext' setup( name=projName, version='1.0', ext_modules=[ Extension(projName, ['interpcontext.d'], build_deimos=True, d_lump=True ) ], )
ariovistus/pyd
examples/interpcontext/setup.py
Python
mit
286
from selenium import webdriver from time import sleep driver=webdriver.Firefox() driver.get("http://www.baidu.com/") sleep(3) # driver.find_element_by_id('kw').send_keys('Selenium我要自学网') driver.find_element_by_name('wd').send_keys('Selenium我要自学网') sleep(3) driver.find_element_by_id('su').click() sleep(3) driver.quit...
1065865483/0python_script
four/Webdriver/FindElement/By_idName.py
Python
mit
343
def strip_headers(post): """Find the first blank line and drop the headers to keep the body""" if '\n\n' in post: headers, body = post.split('\n\n', 1) return body.lower() else: # Unexpected post inner-structure, be conservative # and keep everything return post.lower...
janusnic/21v-python
unit_20/parallel_ml/notebooks/solutions/07A_1_strip_headers.py
Python
mit
542
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
AutorestCI/azure-sdk-for-python
azure-mgmt-compute/azure/mgmt/compute/v2017_12_01/models/run_command_document.py
Python
mit
2,330
import sys IS_PY3 = sys.version_info[0] == 3 if IS_PY3: from http.client import NO_CONTENT from email import encoders as Encoders from urllib.parse import quote, urlencode unicode = str bytes = bytes else: from email import Encoders from httplib import NO_CONTENT from urllib import quo...
reclosedev/lathermail
lathermail/compat.py
Python
mit
421
"""BWA (https://github.com/lh3/bwa) """ import os import signal import subprocess from bcbio.pipeline import config_utils from bcbio import bam, utils from bcbio.distributed import objectstore from bcbio.distributed.transaction import file_transaction, tx_tmpdir from bcbio.ngsalign import alignprep, novoalign, postali...
lbeltrame/bcbio-nextgen
bcbio/ngsalign/bwa.py
Python
mit
17,449
from optparse import OptionParser import os,sys from oldowan.mitotype.matcher import HVRMatcher from oldowan.mitotype.prevalidate import prevalidate_submission def run_command(): """Perform automated human mtDNA haplotype identification.""" # Set up the options parser usage = "usage: %prog [options] sequ...
ryanraaum/oldowan.mitotype
oldowan/mitotype/commandline.py
Python
mit
3,160
import sys, socket, select, time from optparse import OptionParser XBOX_PORT = 5050 XBOX_PING = "dd00000a000000000000000400000002" XBOX_POWER = "dd02001300000010" help_text = "xbox-remote-power.py -a <ip address> -i <live id>" py3 = sys.version_info[0] > 2 def main(): parser = OptionParser() parser.add_opti...
JDQuackers/xbox-remote-power
xbox-remote-power.py
Python
mit
2,719
""" The Fibonacci Sequence is the series of numbers: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, ... The next number is found by adding up the two numbers before it. The 2 is found by adding the two numbers before it (1+1) Similarly, the 3 is found by adding the two numbers before it (1+2), And the 5 is (2+3), ...
crazcalm/PyTN_talk_proposal
recipies/recipe1/fib.py
Python
mit
2,169
# -*- coding: utf8 -*- "CountColumn filter" from .abstract import AbstractFilter class CountColumn(AbstractFilter): "Count a flux's column and put the result in a variable" name = 'Compter colonnes' description = "Compte le nombre de colonnes d'un flux et met le résultat dans une variable" node_in =...
Exanis/cannelloni
backend/filters/count_column.py
Python
mit
662
# -*- coding: utf-8 -*- """ A very thin wrapper on top of the FluidDB RESTful API Copyright (c) 2009-2010 Seo Sanghyeon, Nicholas Tollervey and others See README, AUTHORS and LICENSE for more information """ import sys import httplib2 import urllib import types if sys.version_info < (2, 6): import simplejson as ...
ntoll/fluiddb.py
fluiddb.py
Python
mit
5,024
from django.contrib import admin from isi_mip.sciencepaper.models import Paper admin.site.register(Paper)
bruecksen/isimip
isi_mip/sciencepaper/admin.py
Python
mit
107
from swappr import app app.run(debug=True, host="0.0.0.0", port=9000)
swappr-tanda-team/swappr
runserver.py
Python
mit
71
from __future__ import division #Para não truncar a divisão de inteiros from visual import * #Módulo com as funções gráficas do VPython from math import * scene_range = 15 scene.width = 1920 scene.height = 1080 scene.fullscreen = True scene.autoscale = False scene.range = (scene_range, scene_range, scen...
carlosmccosta/Electric-Dipole
Source code/Electric dipole field lines.py
Python
mit
5,205
#!/usr/bin/env python3 # # This script executes different GO BPScore algorithms # in order to compare their run times. # for timing import time # for the data connection import pappi.sql from pappi.data_config import * # import the GO association loading function from pappi.go.utils import load_go_associations_sql ...
patflick/tsppi
src/bpscore_benchmark.py
Python
mit
3,882
from aiohttp import web from aiohttp_session import get_session, SESSION_KEY as SESSION_COOKIE_NAME from aioweb.middleware.csrf.templatetags import CsrfTag, CsrfRawTag from aioweb.util import awaitable from aioweb.modules.template.backends.jinja2 import APP_KEY as JINJA_APP_KEY import random, string from aiohttp_sessi...
kreopt/aioweb
aioweb/middleware/csrf/__init__.py
Python
mit
3,212
from django.http import HttpResponse, HttpResponseForbidden from django.core.cache import cache from inboxtix.util import get_api_tree def autocomplete_category(request): if not request.is_ajax(): return HttpResponseForbidden() name = request.GET.get('q',None) limit = request.GET.get('limit', 10) ...
tdavis/inboxtix
inboxtix/home/views.py
Python
mit
594
#!/usr/bin/env python """ @file HybridVAControl.py @author Craig Rafter @date 19/08/2016 class for fixed time signal control """ import signalControl, readJunctionData, traci from math import atan2, degrees, hypot import numpy as np from collections import defaultdict class HybridVAControl(signalControl.signa...
cbrafter/TRB18_GPSVA
codes/sumoAPI/HybridVAControl.py
Python
mit
15,253
"""Helper functions Consists of functions to typically be used within templates, but also available to Controllers. This module is available to templates as 'h'. """ from routes import url_for from webhelpers.html import literal from webhelpers.html.secure_form import secure_form from webhelpers.html.tags import * fro...
leveille/blog.v1
wurdig/lib/helpers.py
Python
mit
1,130
""" Django settings for tiny_hands_pac project. For more information on this file, see https://docs.djangoproject.com/en/1.8/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.8/ref/settings/ """ import os from os.path import abspath, dirname, join, normpath from ...
DonaldTrumpHasTinyHands/tiny_hands_pac
tiny_hands_pac/settings/base.py
Python
mit
6,665
print("Greetings Earth! We come in peace.")
morepj/numerical-mooc
working/HelloWorld.py
Python
mit
44
""" Provides functionality to interact with hvacs. For more details about this component, please refer to the documentation at https://home-assistant.io/components/hvac/ """ import logging import os from homeassistant.helpers.entity_component import EntityComponent from homeassistant.config import load_yaml_config_f...
sffjunkie/home-assistant
homeassistant/components/hvac/__init__.py
Python
mit
14,456
# hello_asyncio.py import asyncio import tornado.ioloop import tornado.web import tornado.gen from tornado.httpclient import AsyncHTTPClient try: import aioredis except ImportError: print("Please install aioredis: pip install aioredis") exit(0) class AsyncRequestHandler(tornado.web.RequestHandler): ""...
rudyryk/python-samples
hello_tornado/hello_asyncio.py
Python
cc0-1.0
3,463
#40/40 #Part 1: Terminology (15 points) --> 15/15 #1 1pt) What is the symbol "=" used for? #to assign and store values to and in variables # 1pt # #2 3pts) Write a technical definition for 'function' #a named sequence of calculations which takes input and returns output # 3pts # #3 1pt) What does the keyword "return" d...
ieuan1630-cmis/ieuan1630-cmis-cs2
cs2quiz1.py
Python
cc0-1.0
2,934
import astropy.io.fits as fits import matplotlib matplotlib.use('Agg') import matplotlib.pyplot as p import numpy as n import os import sys from scipy.stats import scoreatpercentile as sc from scipy.interpolate import interp1d survey = sys.argv[1] z_min, z_max = 0., 1.6 imfs = ["Chabrier_ELODIE_", "Chabrier_MILES_",...
JohanComparat/pySU
spm/bin_SMF/create_table_snr.py
Python
cc0-1.0
8,566
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'Station' db.create_table('vcapp_station', ( ('id', self.gf('django.db.models.fie...
edwinsteele/visual-commute
vcapp/migrations/0002_initial.py
Python
cc0-1.0
5,957
parts = (('house', 'Jack built'), ('malt', 'lay in'), ('rat', 'ate'), ('cat', 'killed'), ('dog', 'worried'), ('cow with the crumpled horn', 'tossed'), ('maiden all forlorn', 'milked'), ('man all tattered and torn', 'kis...
Winawer/exercism
python/house/house.py
Python
cc0-1.0
886
#!/usr/bin/env python # 8 band Audio equaliser from wav file # import alsaaudio as aa # import smbus from struct import unpack import numpy as np import wave from time import sleep import sys ADDR = 0x20 #The I2C address of MCP23017 DIRA = 0x00 #PortA I/O direction, by pin. 0=output, 1=input DIR...
mprinc/FeelTheSound
src/PoC/fft.py
Python
cc0-1.0
4,053
try: from code import InteractiveConsole except ImportError: from pydevconsole_code_for_ironpython import InteractiveConsole import os import sys try: False True except NameError: # version < 2.3 -- didn't have the True/False builtins import __builtin__ setattr(__builtin__, 'True', 1) # Pyth...
aptana/Pydev
bundles/org.python.pydev/pysrc/pydevconsole.py
Python
epl-1.0
7,910
# # # Copyright 2012-2019 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (...
gppezzi/easybuild-framework
easybuild/tools/utilities.py
Python
gpl-2.0
11,107
#rewrite of original calTimer to use qthreads as opposed to native python threads #needed to make UI changes (impossible from native) #also attempting to alleviate need for sigterm to stop perm loop from PyQt4 import QtCore import time,os,ctypes import sys class calTimer(QtCore.QThread): xml_file = './data/data....
CPSC491FileMaker/project
calTimer.QThread.py
Python
gpl-2.0
717
from time import localtime, time, strftime, mktime from enigma import eServiceReference, eTimer, eServiceCenter, ePoint from Screen import Screen from Screens.HelpMenu import HelpableScreen from Components.About import about from Components.ActionMap import HelpableActionMap, HelpableNumberActionMap from Components.B...
schleichdi2/OpenNfr_E2_Gui-6.0
lib/python/Screens/EpgSelection.py
Python
gpl-2.0
58,072
# Get weather data from various online sources # -*- coding: utf-8 -*- import requests from wrappers import * @plugin class yweather: @command("weather") def weather(self, message): """Get the current condition in a given location, from the Yahoo! Weather Service """ w = self.get_yaho...
ellxc/piperbot
plugins/weather.py
Python
gpl-2.0
8,113
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('mainapp', '0007_auto_20151023_1012'), ] operations = [ migrations.AddField( model_n...
heolin123/day_or_night
mainapp/migrations/0008_auto_20151023_1317.py
Python
gpl-2.0
650
# # A PyGtk-based Python Trace Collector window # # Copyright (C) 2007 TK Soh <teekaysoh@gmail.com> # import pygtk pygtk.require("2.0") import gtk import gobject import pango import threading import Queue import win32trace try: from gitgtk.gitlib import toutf except ImportError: import locale _encoding = ...
tdjordan/tortoisegit
tracelog.py
Python
gpl-2.0
4,176
"""URL config for business tool""" from django.conf.urls import url, patterns from nav.web.business import views urlpatterns = patterns('', url(r'^$', views.BusinessView.as_view(), name='business-index'), url('^device_availability/$', views.DeviceAvailabilityReport.as_view(), name='business-re...
sigmunau/nav
python/nav/web/business/urls.py
Python
gpl-2.0
472
# encoding: utf-8 from yast import import_module import_module('UI') from yast import * class HCenter3Client: def main(self): UI.OpenDialog( Opt("defaultsize"), VBox( VCenter(PushButton(Opt("vstretch"), "Button 1")), VCenter(PushButton(Opt("vstretch"), "Button 2")), ...
yast/yast-python-bindings
examples/HCenter3.py
Python
gpl-2.0
462
import traceback import sys from gribapi import * INPUT = 'rap_130_20120822_2200_001.grb2' VERBOSE = 1 # verbose error reporting def example(): f = open(INPUT) while 1: gid = grib_new_from_file(f) if gid is None: break iterid = grib_keys_iterator_new(gid, 'ls') # Differen...
thomasvdv/flightbit
forecast/keys_iterator.py
Python
gpl-2.0
1,140
# ********************************************************************** # # 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/facets/TestI.py
Python
gpl-2.0
1,190
__author__ = 'en0' from http import context from uuid import uuid4 from redis import Redis from gevent import spawn from functools import wraps class AsyncJob(object): def __init__(self, target): assert isinstance(context.db, Redis) self._target = target self._db = context.db def __c...
en0/PivotalPoker
src/utils/async_job.py
Python
gpl-2.0
1,245
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 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 of the ## License, or (at your opt...
jrbl/invenio
modules/bibauthorid/lib/bibauthorid_prob_matrix.py
Python
gpl-2.0
4,586
#!/usr/bin/env python from canari.maltego.message import Entity, EntityField, EntityFieldType, MatchingRule __author__ = 'jaegeral' __copyright__ = 'Copyright 2014, Viper Project' __credits__ = [] __license__ = 'GPL' __version__ = '0.1' __maintainer__ = 'jaegeral' __email__ = 'mail@alexanderjaeger.de' __status__ = '...
deralexxx/maltego-viper
src/viper/transforms/common/entities.py
Python
gpl-2.0
804
from struct import unpack, pack, calcsize from mobi_languages import LANGUAGES from lz77 import uncompress def LOG(*args): pass MOBI_HDR_FIELDS = ( ("id", 16, "4s"), ("header_len", 20, "I"), ("mobi_type", 24, "I"), ("encoding", 28, "I"), ("UID", 32, "I"), ("generator_version", 36, "I"), ...
robwebset/script.ebooks
resources/lib/kiehinen/ebook.py
Python
gpl-2.0
8,604
import time, os, logging from autotest.client import utils from autotest.client.shared import error from virttest import remote, utils_misc @error.context_aware def run_multi_vms_file_transfer(test, params, env): """ Transfer a file back and forth between multi VMs for long time. 1) Boot up two VMs . ...
ehabkost/virt-test
qemu/tests/multi_vms_file_transfer.py
Python
gpl-2.0
6,006
# This code is licensed under The GNU General Public License version 2 (GPLv2) # If you decide to fork this code please obey by the licensing rules. # # Thanks go to the-one who initially created the initial speedtest code in early 2014 # That code broke but it didn't take too much to fix it, if you get problems it's m...
repotvsupertuga/repo
plugin.program.jogosEmuladores/speedtest.py
Python
gpl-2.0
6,577
#!/usr/bin/env python # -*- coding: utf-8 -*- """ About """ __version__ = '0.2.2'
ppizarror/korektor
bin/easyprocess/about.py
Python
gpl-2.0
83
#!/usr/bin/python # # Copyright (C) 2010, 2011 Google 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 p...
badp/ganeti
test/py/ganeti.rapi.client_unittest.py
Python
gpl-2.0
59,059
# -*- coding: utf-8 -*- ############################################################################### # # FinalizeOAuth # Completes the OAuth process by retrieving a Foursquare access token for a user, after they have visited the authorization URL returned by the InitializeOAuth choreo and clicked "allow." # # Pytho...
willprice/arduino-sphere-project
scripts/example_direction_finder/temboo/Library/Foursquare/OAuth/FinalizeOAuth.py
Python
gpl-2.0
5,006
# # Copyright (C) 2014 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 3 as published by # the Free Software Foundation. # # This program is distributed in the hope...
UNINETT/nav
python/nav/web/portadmin/forms.py
Python
gpl-2.0
1,575
# -*- coding: utf-8 -*- from django.conf.urls import url from . import views urlpatterns = [ url(r"^/android/setup$", views.android_setup_view, name="notif_android_setup"), url(r"^/chrome/setup$", views.chrome_setup_view, name="notif_chrome_setup"), url(r"^/chrome/getdata$", views.chrome_getdata_view, na...
jacobajit/ion
intranet/apps/notifications/urls.py
Python
gpl-2.0
483
# create a Session object by sessionmaker import os import ConfigParser import sqlalchemy.orm # get path to taskmanager. it is assumed that this script is in the lib directory of # the taskmanager package. tmpath = os.path.normpath( os.path.join( os.path.dirname( os.path.realpath(__file__) ) + '/..' ) ) etcpath =...
call-me-jimi/taskmanager
taskmanager/lib/hDBSessionMaker.py
Python
gpl-2.0
4,630
# -*- coding: utf-8 -*- """ Validators for wx widgets. Copyright (c) Karol Będkowski, 2006-2013 This file is part of wxGTD 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, version 2. """ __author...
KarolBedkowski/wxgtd
wxgtd/wxtools/validators/__init__.py
Python
gpl-2.0
638
from ._Recognized_objects import *
grandcat/robotics_g7
object_recognition/src/object_recognition/msg/__init__.py
Python
gpl-2.0
35
#!/usr/bin/env python # File created February 29, 2012 from __future__ import division __author__ = "William Walters" __copyright__ = "Copyright 2011, The QIIME Project" __credits__ = ["William Walters", "Emily TerAvest"] __license__ = "GPL" __version__ = "1.8.0-dev" __maintainer__ = "William Walters" __email__ = "Wil...
wasade/qiime
qiime/truncate_reverse_primer.py
Python
gpl-2.0
7,049
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8 # # MDAnalysis --- http://www.mdanalysis.org # Copyright (c) 2006-2016 The MDAnalysis Development Team and contributors # (see the file AUTHORS for the full list of names) # ...
kain88-de/mdanalysis
testsuite/MDAnalysisTests/core/test_segmentgroup.py
Python
gpl-2.0
3,335
import urllib2, urllib, sys, os, re, random, copy import htmlcleaner import httplib2 from BeautifulSoup import BeautifulSoup, Tag, NavigableString import xbmc,xbmcplugin,xbmcgui,xbmcaddon from t0mm0.common.net import Net from t0mm0.common.addon import Addon from scrapers import CommonScraper net = Net() class VidicsS...
jolid/script.module.donnie
lib/donnie/vidics.py
Python
gpl-2.0
10,939
from flask import Flask app = Flask(__name__) import views
miqueiaspenha/gerenciadordeprovas
quiz/__init__.py
Python
gpl-2.0
60
#! /usr/bin/env python # # CRC32 WJ103 # import zlib def crc32(filename): '''calculate CRC-32 checksum of file''' f = open(filename, 'r') if not f: return '' crc = 0 while 1: buf = f.read(16384) if not buf: break crc = zlib.crc32(buf, crc) f.close() str_crc = '%x' % crc # print 'TD: CRC32 : %s...
walterdejong/synctool
contrib/attic/crc32.py
Python
gpl-2.0
463
# subrepo.py - sub-repository handling for Mercurial # # Copyright 2009-2010 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. import errno, os, re, shutil, posixpath, sys import xml.dom.minidom import...
jordigh/mercurial-crew
mercurial/subrepo.py
Python
gpl-2.0
56,360
from aces.materials.POSCAR import structure as Material class structure(Material): def getPOSCAR(self): return self.getMinimized() def csetup(self): from ase.dft.kpoints import ibz_points #self.bandpoints=ibz_points['hexagonal'] import numpy as np x=0.5*np.cos(np.arange(8)/8.0*2.0*np.pi) y=0.5*np...
vanceeasleaf/aces
aces/materials/MoN2_alpha_rect.py
Python
gpl-2.0
1,320
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import tcms.core.models.base from django.conf import settings import tcms.core.models.fields class Migration(migrations.Migration): dependencies = [ ('management', '0001_initial'), ('testplan...
MrSenko/Nitrate
tcms/testcases/migrations/0001_initial.py
Python
gpl-2.0
9,258
#!/usr/bin/python ## func command line interface & client lib ## ## Copyright 2007,2008 Red Hat, Inc ## +AUTHORS ## ## This software may be freely redistributed under the terms of the GNU ## general public license. ## ## You should have received a copy of the GNU General Public License ## along with this program; if n...
kadamski/func
func/overlord/func_command.py
Python
gpl-2.0
2,133
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2010 Nick Hall # # 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...
arunkgupta/gramps
gramps/gen/filters/rules/_hastagbase.py
Python
gpl-2.0
2,181
#!/usr/bin/python3.4 ############################################################################# # # Dictionnary DB managing script. Add/Del/Search definitions # Copyright (C) 2014 bertrand # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public L...
bertrandF/DictionaryDB
db.py
Python
gpl-2.0
8,296
# # Copyright (c) 2008--2013 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a c...
moio/spacewalk
backend/server/rhnAuthPAM.py
Python
gpl-2.0
2,144