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 config import * from get_values import * from map_data import * from read_data import *
beiko-lab/gengis
bin/Lib/site-packages/pybioclim-20131009220535_53eb0b0-py2.7-win32.egg/pybioclim/__init__.py
Python
gpl-3.0
97
# What if you just wanted to split a word in half and return each half on its own: # You could do the following: def reverse(st): words = list(st.split(' ')) print(words) rev_word = words[::-1] print(rev_word) return ' '.join(rev_word) # but this can be condensed to one sentence: def reverse(...
Matt-Stammers/Python-Foundations
Simple Functions/Reversing_split_words.py
Python
gpl-3.0
450
import fileinput X, Y, Z, N = map(int, fileinput.input()) nums=[[x, y, z] for x in range(X+1) for y in range(Y+1) for z in range(Z+1) if x + y + z != N] print nums
shree-shubham/Unitype
List Comprehensions.py
Python
gpl-3.0
164
# ============================================================================= # Copyright (C) 2014 Ryan Holmes # # This file is part of pyfa. # # pyfa 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 v...
DarkFenX/Pyfa
service/port/multibuy.py
Python
gpl-3.0
3,507
# Copyright (C) 2012,2013 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the terms of the G...
espressopp/espressopp
src/integrator/MDIntegrator.py
Python
gpl-3.0
3,045
#!/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 3 of the License, or # (at your option) any later version. # # Written (W) 2010 Vipin T Sreedharan # Copyri...
ratschlab/rQuant
tools/ParseGFF.py
Python
gpl-3.0
19,046
def collatzSequence(n): length = 0 while n != 1: if n % 2 == 0: n //= 2 else: n = 3 * n + 1 length += 1 return length + 1 max_length = 0 max_number = 0 for i in range(1000000, 0, -1): if i % 100000 == 0: print("Crossed {}".format(i/100000)) result = collatzSequence(i) if result > max_length: ...
CodeVITap/ProjectEuler
python/014-1.py
Python
gpl-3.0
395
# -*- coding: utf-8 -*- from sdl2 import SDL_Delay,\ SDL_GetTicks,\ SDL_KEYDOWN,\ SDL_KEYUP,\ SDL_QUIT,\ SDL_Rect,\ SDL_RenderCopy,\ SDLK_ESCAPE,\ SDLK_UP,\ SDLK_DOWN,\ SDLK_RETURN,\ SDL_Quit from sdl2.ext import Resources,\ get_events from const import WindowSize, Col...
ep0s/soulmaster
menu.py
Python
gpl-3.0
4,205
# @@ maybe these should go in a team.py from zope.interface import Interface, Attribute from zope.interface import implements from Products.TeamSpace.interfaces.membership import ITeamMembership class IOpenMembership(ITeamMembership): """ Interface provided by OpenMembership objects. """ class IMembershi...
socialplanning/opencore
opencore/interfaces/membership.py
Python
gpl-3.0
2,171
#------------------------------------------------------------------------------ # # This file is part of the fontQA framework # Copyright (C) 2005 published by FSI Fonts und Software GmbH # written by Andreas (Eigi) Eigendorf # # This programming framework is free software; you can redistribute it # and/or modify it...
davelab6/fontqa
FontLab/Macros/System/Modules/fontQA_Vmetric.py
Python
gpl-3.0
7,526
import sys, os def timeSplit( ETR ): h = int(ETR/3600) m = int(ETR - 3600*h)/60 s = int(ETR - 3600*h - 60*m) return h, m, s def printProgress( current, total, deltaIter, deltaTime ): terminalString = "\rProgress: " if total==0: total+=1 percent = 100.*current/total nDots = int(percent/5) dotsStri...
bvillasen/phyGPU
tools/tools.py
Python
gpl-3.0
1,660
#!/usr/bin/python # # GEOMTERY.OUT to OpenDX # # Created: April 2009 (AVK) # Modified: February 2012 (AVK) # import math import sys def r3minv(a, b): t1 = a[0][2] * (a[1][0] * a[2][1] - a[1][1] * a[2][0]) + \ a[0][1] * (a[1][2] * a[2][0] - a[1][0] * a[2][2]) + \ a[0][0] * (a[1][1] * a[2][2]...
toxa81/elk-git
utilities/geometry2dx__mtrx.py
Python
gpl-3.0
21,225
import glob import pickle import numpy as np import cv2 import matplotlib.pyplot as plt import matplotlib.image as mpimg #corners nx, ny = 9, 6 channels = 3 #calibration image list image_names = glob.glob('./camera_cal/calibration*.jpg') #imgpoints and objpoints imgpoints = [] #2D in image plane objpoints = [] #3D i...
drewdru/AOI
roadLaneFinding/calibration.py
Python
gpl-3.0
1,559
"""Module containing Lifemapper XML utilities Note: Mainly wraps elementTree functionality to fit Lifemapper needs """ from types import (BuiltinFunctionType, BuiltinMethodType, FunctionType, LambdaType, MethodType) from LmCommon.common.attribute_object import LmAttList, LmAttObj import xml.etree.E...
lifemapper/core
LmCommon/common/lm_xml.py
Python
gpl-3.0
14,471
from pyramid.view import view_config from externals.lib.misc import strip_non_base_types from externals.lib.log import log_event from . import web, action_ok, action_error from ..model import DBSession from ..model.model_feedback import Feedback import logging log = logging.getLogger(__name__) @view_config(route_n...
richlanc/KaraKara
website/karakara/views/feedback.py
Python
gpl-3.0
1,173
#!/usr/bin/env python import gspyce.simulation gspyce.simulation.main()
qsantos/spyce
gspyce/__main__.py
Python
gpl-3.0
73
# -*- coding: utf-8 -*- # This file is part of Tautulli. # # Tautulli 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. # # Tautul...
JonnyWong16/plexpy
plexpy/log_reader.py
Python
gpl-3.0
3,708
# custom initializer in the style of pytorch's import math # call it by the original class name from tensorflow.contrib.layers import variance_scaling_initializer from tensorflow.python.framework import dtypes def pytorch_initializer(uniform=True, seed=None, dtype=dtypes.float32): return variance_scaling_initializ...
BayesWatch/tf-variational-dropout
models/init.py
Python
gpl-3.0
392
#***************************************************************************** # Copyright 2004-2008 Steve Menard # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www....
Beyond-Imagination/BlubBlub
ChatbotServer/ChatbotEnv/Lib/site-packages/jpype/_windows.py
Python
gpl-3.0
2,127
#!/usr/bin/env python3 # -*- coding: utf-8 -*- __author__ = "pwxc" import os, sys, time, subprocess from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler def log(s): print('[Monitor] %s' % s) class MyFileSystemEventHander(FileSystemEventHandler): def __init__(self, fn)...
LBatsoft/python3-webapp
www/pymonitor.py
Python
gpl-3.0
1,748
# 272. Closest Binary Search Tree Value II Add to List # DescriptionHintsSubmissionsSolutions # Total Accepted: 15854 # Total Submissions: 41240 # Difficulty: Hard # Contributor: LeetCode # Given a non-empty binary search tree and a target value, find k values in the BST that are closest to the target. # # Note: # Giv...
shawncaojob/LC
PY/272_closet_binary_search_tree_value_ii.py
Python
gpl-3.0
1,979
# coding: utf-8 """ DragonPy - Dragon 32 emulator in Python ======================================= :created: 2013 by Jens Diemer - www.jensdiemer.de :copyleft: 2013-2014 by the DragonPy team, see AUTHORS for more details. :license: GNU GPL v3 or above, see LICENSE for more details. """ from __fu...
JuhaniImberg/DragonPy
dragonpy/core/configs.py
Python
gpl-3.0
4,067
# -*- coding: utf-8 -*- from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import as_declarative import settings def db_connect(): """ Performs database connection using database settings from settings.py. :return: sqlalchemy engine instance ...
drewdru/AutoTags
vk_base/models/modelsHelper.py
Python
gpl-3.0
984
from contextlib import suppress import asyncio from concurrent.futures import CancelledError from .exceptions import SetupException class AsyncioRunning: "base runner class that sets up and runs the loop & payload" RESTART_DELAY = 15 # seconds until waiter & runner are restarted # these three required per ...
koodaamo/asynciohelpers
asynciohelpers/service.py
Python
gpl-3.0
6,449
# encoding: latin1 import urllib2, re from Tkinter import * import tkMessageBox import sqlite3 def extraer_datos(): f = urllib2.urlopen("http://www.us.es/rss/feed/portada") s = f.read() l = re.findall(r'<item>\s*<title>(.*)</title>\s*<link>(.*)</link>\s*<description>.*</description>\s*<author>.*...
manuelgomezsuarez/practicasAII
practicasAII/Practica1/practica1.py
Python
gpl-3.0
2,831
#!/usr/bin/env python import sys from nexus import NexusReader, VERSION from nexus.tools import multistatise, combine_nexuses __author__ = 'Simon Greenhill <simon@simon.net.nz>' __doc__ = """nexus_binary2multistate - python-nexus tools v%(version)s Converts binary nexuses to a multistate nexus. """ % {'version': VERS...
zhangjiajie/PTP
nexus/bin/nexus_binary2multistate.py
Python
gpl-3.0
1,202
import unittest import threading import serial from iotile_transport_bled112.hardware.emulator.mock_bled112 import MockBLED112 from iotile.mock.mock_ble import MockBLEDevice from iotile.core.hw.virtual.virtualdevice_simple import SimpleVirtualDevice import util.dummy_serial from iotile_transport_bled112.bled112 import ...
iotile/coretools
transport_plugins/bled112/test/test_bled112_passive.py
Python
gpl-3.0
1,805
#!/usr/bin/env python ''' map display module Andrew Tridgell June 2012 ''' import sys, os, math import functools import time from MAVProxy.modules.mavproxy_map import mp_elevation from MAVProxy.modules.lib import mp_util from MAVProxy.modules.lib import mp_settings from MAVProxy.modules.lib import mp_module from MAVPr...
gmorph/MAVProxy
MAVProxy/modules/mavproxy_map/__init__.py
Python
gpl-3.0
27,717
# Copyright (C) Anton Liaukevich 2011-2020 <leva.dev@gmail.com> # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 3 of the License, or (at your option) any later version....
saintleva/limited-apt
src/limitedapt/enclosure.py
Python
gpl-3.0
8,559
# -*- coding : utf-8 -*- # # Copyright (C) 2011 Michael Pitidis, Hussein Abdulwahid. # # This file is part of Labelme. # # Labelme 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 Licens...
a2ialabelme/LabelMeAnnotationTool
labelFile.py
Python
gpl-3.0
10,321
import math from map_utils import * def calc_field_grad(m, pt): w = len(m[0]) h = len(m) if pt[0]>=w or pt[0]<0: return None if pt[1]>=h or pt[1]<0: return None px_s = pt[0]-1 px_e = pt[0]+1 if px_s>=w or px_s<0: px_s = pt[0] if px_e>=w or px_e<0: ...
snegovick/dswarm_simulator
path_finding/smoothing_algorithms.py
Python
gpl-3.0
6,317
#!/usr/bin/env python import json import numpy import scipy.sparse as sp from optparse import OptionParser __author__ = "Gregory Ditzler" __copyright__ = "Copyright 2014, EESI Laboratory (Drexel University)" __credits__ = ["Gregory Ditzler"] __license__ = "GPL" __version__ = "0.1.0" __maintainer__ = "Gregory Ditzler...
gditzler/BigLS2014-Code
src/bmu.py
Python
gpl-3.0
2,945
#!/bin/python3 # -*-coding:utf-8 -* import curses; from .Creature import Creature; from random import choice; """A module containing the Monster class""" class Monster(Creature): """The Monster class""" def __init__(self, env, y, x, char): """Constructor""" super(Monster, self).__init__(env, y, x, char, 7,...
ribacq/utaxc
items/Monster.py
Python
gpl-3.0
519
#! /usr/bin/env python # -*- coding: utf-8 -*- # Copyright (C) 2011 ~ 2012 Deepin, Inc. # 2011 ~ 2012 Hou Shaohui # # Author: Hou Shaohui <houshao55@gmail.com> # Maintainer: Hou Shaohui <houshao55@gmail.com> # # This program is free software: you can redistribute it and/or modify # it under the ter...
hillwoodroc/deepin-music-player
src/widget/combo.py
Python
gpl-3.0
10,334
import re import random from util import hook # @hook.regex(r'^uguubot(.*)') @hook.command('decide') @hook.command def choose(inp): "choose <choice1>, [choice2], [choice3], [choice4], ... -- " \ "Randomly picks one of the given choices." try: inp = inp.group(1) except: inp = inp replacewords = {...
bytebit-ch/uguubot
plugins/choose.py
Python
gpl-3.0
632
# -*- coding: utf-8 -*- """ The Renderer class provides the infrastructure for generating template-based code. It's used by the .grammars module for parser generation. """ from __future__ import generator_stop import itertools import string from tatsu.util import indent, isiter, trim def render(item, join='', **fie...
EternityForest/KaithemAutomation
kaithem/src/thirdparty/tatsu/rendering.py
Python
gpl-3.0
3,873
#!/usr/bin/python3 import random import copy import enum import jsonpickle import pickle import argparse from sharedlib import Attr, Card, Config import json class Die: def __init__(self, attack, defense, magic, mundane, numSides=12): self.attack = attack self.defense = defense self.magic = magic self.mundane...
psywolf/cardfight
cardfight.py
Python
gpl-3.0
6,620
from test_support import * do_flow(opt=["-u", "indefinite_bounded.adb"])
ptroja/spark2014
testsuite/gnatprove/tests/NB19-026__flow_formal_vectors/test.py
Python
gpl-3.0
73
#This macro outputs 3D plots of the x,y,z co-ordinates of the particles. Main movie script import sys import matplotlib.pyplot as plt import numpy as np import glob import math pi = math.pi from mpl_toolkits.mplot3d import Axes3D import re from subprocess import call def natural_key(string_): return [int(s) if s....
silburt/rebound2
examples/planetesimals2/movie/body_movie_output.py
Python
gpl-3.0
2,192
def main(): print(sumMultiplesOf(3, 5, 1000)) def sumMultiplesOf(a, b, cap): s = 0 for i in range(cap): if i % a == 0 or i % b == 0: s += i return s if __name__ == "__main__": main()
ZachOhara/Project-Euler
python/p001_p010/problem001.py
Python
gpl-3.0
196
# -*- coding: utf-8 -*- ############################################################################ # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU Affero General Public License as # # published by the Free Software Foundation, either version 3 of ...
estaban/pyload
module/plugins/hoster/MegareleaseOrg.py
Python
gpl-3.0
1,724
#!/usr/bin/env python3 # -*- coding: utf-8 -*- import unittest as ut import numpy as np import scipy.spatial.distance as spd from .mock_data import Data from ....algorithms.similarities import cosine_binary, cosine, dice, jaccard from ....algorithms.similarities import kulsinski, russellrao, sokalsneath MATRIX = np.a...
yedivanseven/bestPy
tests/algorithms/similarities/test_similarities.py
Python
gpl-3.0
2,753
import sys import operator import collections import random import string import heapq # @include def find_student_with_highest_best_of_three_scores(name_score_data): student_scores = collections.defaultdict(list) for line in name_score_data: name, score = line.split() if len(student_scores[na...
meisamhe/GPLshared
Programming/MPI — AMath 483 583, Spring 2013 1.0 documentation_files/average_top_3_scores.py
Python
gpl-3.0
1,767
#---------------------------------------------------------------------------- # Persistent element grouping support. # #---------------------------------------------------------------------------- # Copyright 2017, Martin Kolman # # This program is free software: you can redistribute it and/or modify # it under the ter...
M4rtinK/tsubame
core/group.py
Python
gpl-3.0
3,816
import argparse import json import datetime import os import sys from codecs import open def run(cohort_id, threshold, period, course_range): from django.contrib.auth.models import User from django.db.models import Sum, Max, Min, Avg from django.utils.html import strip_tags from oppia.mode...
DigitalCampus/oppia-data-scripts-hews-2015
scripts/hews-quiz-progress-threshold.py
Python
gpl-3.0
5,647
""" Module contains functions to minimize boolean function with Quine-McCluskey algorithm and Petrick's method. """ from .common import * from .flip_flops import * from .minimization import * from .petricks import * from .quine_mccluskey import *
matbur95/counter
minimization/__init__.py
Python
gpl-3.0
252
# (c) Nelen & Schuurmans. GPL licensed, see LICENSE.txt # -*- coding: utf-8 -*- """ Lizard-security's ``admin.py`` contains two kinds of model admins: - Our own model admins to make editing data sets, permission mappers and user groups easier. - ``SecurityFilteredAdmin`` as a base class for admins of models that u...
lizardsystem/lizard-security
lizard_security/admin.py
Python
gpl-3.0
5,909
import ecj import scipy import numpy import operator import networkx as nx #from progressbar import ProgressBar, Percentage numpy.random.RandomState() import bfutils as bfu import numpy as np import gmpy as gmp def num2CG(num,n): """num2CG - converts a number whose binary representaion encodes edge presence/a...
pliz/gunfolds
tools/comparison.py
Python
gpl-3.0
2,830
import logging import os from galaxy.web.framework.helpers import grids from galaxy.web.framework.helpers import time_ago from galaxy.webapps.tool_shed import model from galaxy.model.orm import and_ import tool_shed.util.shed_util_common as suc from tool_shed.util import hg_util from tool_shed.grids.repository_grids im...
mikel-egana-aranguren/SADI-Galaxy-Docker
galaxy-dist/lib/tool_shed/grids/admin_grids.py
Python
gpl-3.0
22,408
# coding: utf-8 from django.conf import settings from django.contrib.auth.models import User from django.core import mail from django.core.urlresolvers import reverse from oauth2_provider.models import Application, AccessToken from rest_framework import status from rest_framework.test import APITestCase from rest_fram...
DevHugo/zds-site
zds/member/api/tests.py
Python
gpl-3.0
52,616
GSD_BUS_NAME = 'org.gnome.SettingsDaemon.Power' GSD_OBJ_PATH = '/org/gnome/SettingsDaemon/Power' GSD_SCR_NAME = 'org.gnome.SettingsDaemon.Power.Screen' BRI_PRO_NAME = 'Brightness' FD_PRO_IFACE = 'org.freedesktop.DBus.Properties' BRIGHTNESS_S = 1.6875
ambasta/mcmd
mcmd/config.py
Python
gpl-3.0
251
import boto3 import logging logger = logging.getLogger() logger.setLevel(logging.INFO) def lambda_handler(event, context): logger.info("RECEIVED EVENT: %s"%( str( event )) ) params = event['params'] sid = params['MessageSid'] from_number = params['From'] to_number = params['To'] body = params['B...
sswaner/twilio-aws
resources/lambda_functions/sms_message_handler.py
Python
gpl-3.0
671
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is part of GNUWiNetwork, # Copyright (C) 2014 by # Pablo Belzarena, Gabriel Gomez Sena, Victor Gonzalez Barbone, # Facultad de Ingenieria, Universidad de la Republica, Uruguay. # # GNUWiNetwork is free software: you can redistribute it ...
git-artes/GNUWiNetwork
gwn/gwnevents/api_events.py
Python
gpl-3.0
2,996
#!/usr/bin/python3 # vim:fileencoding=utf-8:sw=4:et """ GtkShortcutsWindow helper for generating GtkBuilder XML file. ``` shortcuts1 = [ shortcut_entry("Quit", gesture="gesture-two-finger-swipe-left"), ] shortcuts2 = [ shortcut_entry("Import channels from file", "<ctrl>o"), shortcu...
mozbugbox/liferea-plugin-studio
accels/gtkshortcutgen.py
Python
gpl-3.0
5,205
# -*- coding: latin-1 -*- from PyQt4 import QtCore, QtGui import platform, shutil import os from ui_vboxlogin import Ui_VBoxLogIn from ui_parambox import Ui_ParamBox class Ui_MainWindow(QtGui.QMainWindow): def __init__(self, debug, parent=None): #super(Ui_clickdial, self).__init__() self.debug = debug if (self....
guigeek208/clickdial
ui_mainwindow.py
Python
gpl-3.0
4,125
""" Common Django settings for the project. See the local, test, and production settings modules for the values used in each environment. 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...
adjustive/caller
caller/settings/common.py
Python
gpl-3.0
4,021
# Copyright (C) 2001,2002 Python Software Foundation # Author: barry@zope.com (Barry Warsaw) """Class representing image/* type MIME documents. """ import imghdr from email import Errors from email import Encoders from email.MIMENonMultipart import MIMENonMultipart class MIMEImage(MIMENonMultipart)...
DarioGT/OMS-PluginXML
org.modelsphere.sms/lib/jython-2.2.1/Lib/email/MIMEImage.py
Python
gpl-3.0
1,794
import numpy as np import pandas as pd # from matplotlib.pyplot import plot,show,draw import scipy.io import sys sys.path.append("../") from functions import * from pylab import * from sklearn.decomposition import PCA import _pickle as cPickle import matplotlib.cm as cm import os #####################################...
gviejo/ThalamusPhysio
python/figure_article/main_article_fig_6.py
Python
gpl-3.0
14,479
#!/usr/bin/env python2 """ :Synopsis: Specialized Class for installing essential components. :Install-logs: All logs are saved in the directory **hackademic-logs**. """ import os import sys import subprocess from logging_manager import LoggingManager sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(_...
a0xnirudh/hackademic
ContainerManager/install.py
Python
gpl-3.0
4,749
# coding=utf-8 # Author: Dennis Lutter <lad1337@gmail.com> # Author: Jonathon Saine <thezoggy@gmail.com> # URL: http://code.google.com/p/sickbeard/ # # 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 ...
Mhynlo/SickRage
sickbeard/webapi.py
Python
gpl-3.0
114,568
#httpy server #A simple HTTP server written in Python import socket #Import sockets import os #Import os import mimetypes #Import mimetypes import subprocess import datetime conf = { 'port': '80', 'max_request_size': '2048', 'server_dir': '/etc/httpy', 'www_dir': '/var/www', 'log_dir': '/var/log/httpy', 'main_l...
isaacdixon274/httpy
server.py
Python
gpl-3.0
3,664
# -*- coding: utf-8 -*- # Copyright (c) 2020, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt from __future__ import unicode_literals # import frappe import unittest class TestTriage(unittest.TestCase): pass
ESS-LLP/erpnext
erpnext/healthcare/doctype/triage/test_triage.py
Python
gpl-3.0
228
#!/usr/bin/env python # -*- coding: utf-8 -*- # # TekScope.py # # Copyright 2016 Samuel Hill <samuel.hill@warwick.ac.uk> # # 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...
UltrasoundSam/TekDPO2000
TekScope.py
Python
gpl-3.0
7,366
__license__ = 'GPL v3' __copyright__ = '2014, Emily Palmieri <silentfuzzle@gmail.com>' from PyQt5.Qt import QWidget import abc # This class sets the default behaviors of all table of contents interfaces. class TOCContainer(QWidget): # toc_sections (TOCSections) - a object that determines how the sections of t...
silentfuzzle/calibre
src/calibre/gui2/viewer/toc_container/toc_container.py
Python
gpl-3.0
2,064
# -*- coding: utf-8 -*- from matplotlib import pyplot as plt import random k=9 xx=[[1,0,1,0,1,0,1,0,1]] d=[1] def rndB(): return random.uniform(0.5, 0.9) def rndL(): return random.uniform(0.1, 0.5) for i in range(50): xx.append([rndB(), rndL(),rndB(), rndL(),rndB(),rndL(),...
dangorlov/Neuronable
Primer.py
Python
gpl-3.0
4,428
#!/usr/bin/python # # This source code is part of tcga, a TCGA processing pipeline, written by Ivana Mihalek. # Copyright (C) 2014-2016 Ivana Mihalek. # # 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 Foun...
ivanamihalek/tcga
tcga/01_somatic_mutations/old_tcga_tools/007_mutation_type_cleanup.py
Python
gpl-3.0
5,786
""" Test completions from *.pyc files: - generate a dummy python module - compile the dummy module to generate a *.pyc - delete the pure python dummy module - try jedi on the generated *.pyc """ import compileall import os import shutil import sys import jedi from ..helpers import cwd_at SRC = """class Foo: ...
ldong/vim_youcompleteme
third_party/jedi/test/test_evaluate/test_pyc.py
Python
gpl-3.0
1,546
#!/usr/bin/env python import sys import socket import colorsys import time try: s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) except: print('Failed to create socket') sys.exit(1) host = sys.argv[1]; port = 1337; r = int(sys.argv[3]) g = int(sys.argv[4]) b = int(sys.argv[5]) msg = bytes([ 0x20 + i...
Cytrill/tools
led_tools/set_led.py
Python
gpl-3.0
407
#!/usr/bin/env python # # dutycycleviz.py # # Copyright (C) 2013, Andre Puschmann <andre.puschmann@tu-ilmenau.de> # # 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 Licens...
andrepuschmann/dutycycleviz
dutycycleviz.py
Python
gpl-3.0
5,638
# ARandR -- Another XRandR GUI # Copyright (C) 2008 -- 2011 chrysn <chrysn@fsfe.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 3 of the License, or # (at your option) any...
wdv4758h/arandr
screenlayout/widget.py
Python
gpl-3.0
16,992
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{cookiecutter.project_slug}}.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
divick/cookiecutter-django-vagrant-ansible
{{cookiecutter.project_slug}}/manage.py
Python
gpl-3.0
272
from django.contrib import admin from django.utils.safestring import mark_safe from django.urls import reverse from .models import Kingdom, Province, Military, Race from .models import Infrastructure, InfrastructureItem, Building from .models import Effect, Instance from .models import Spell # Register your models he...
lucidmotifs/newtopia
newtopia/ntgame/admin.py
Python
gpl-3.0
2,300
from .frontend import Session, Page from . import frontend from .gamemap import GameMap from .util import find_files, load_json, debug, filename_parser from .character import Character from .item import Item from .combat import attack_roll from json import loads import copy class MAPS(Session): def __init__(self)...
ajventer/ezdm
ezdm_libs/all_maps.py
Python
gpl-3.0
15,818
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2018 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source # & Institut Laue - Langevin # SPDX - License - Identifier: GPL - 3.0 + from mantid.simpleapi import FindSatellitePea...
mganeva/mantid
Testing/SystemTests/tests/analysis/FindSatellitePeaksTest.py
Python
gpl-3.0
2,531
import datetime import logging from html import escape import dateutil.parser from dateutil.relativedelta import relativedelta from django.contrib import messages from django.contrib.auth.decorators import login_required, permission_required from django.http import HttpResponseRedirect from django.shortcuts import get...
BdEINSALyon/resa
bookings/views/occurrences.py
Python
gpl-3.0
11,880
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (C) 2016 Bitergia # # 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 ...
sanacl/GrimoireELK
mordred/utils/watch_eclipse_projects.py
Python
gpl-3.0
2,859
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2018-03-08 07:20 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('gardens', '0025_auto_20180216_1951'), ] operations = [ migrations.AlterMode...
bengosney/rhgd3
gardens/migrations/0026_auto_20180308_0720.py
Python
gpl-3.0
653
############################################################################## # # Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOFT...
Donkyhotay/MoonPy
zope/structuredtext/__init__.py
Python
gpl-3.0
2,116
# -*- coding: utf-8 -*- # # Copyright (c) 2013 Rodolphe Quiédeville <rodolphe@quiedeville.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 3 of the License, or #...
boblefrag/lolyx
lolyx/resume/models.py
Python
gpl-3.0
1,603
__author__ = 'Scott Davey' """ Base for connecting and querying BFH/BFP4F/BF2 servers using RCON. Copyright (C) 2013 Scott Davey, www.sd149.co.uk 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...
SDavey149/BFHRCONPython
BFHServer.py
Python
gpl-3.0
7,989
"""Tests for DataStream objects.""" import pytest from iotile.core.exceptions import InternalError from iotile.sg import DataStream, DataStreamSelector def test_stream_type_parsing(): """Make sure we can parse each type of stream.""" # Make sure parsing stream type works stream = DataStream.FromString('...
iotile/coretools
iotilesensorgraph/test/test_datastream.py
Python
gpl-3.0
8,473
#!/usr/bin/env python3 """ Test of offline signing using KSR and SKR with pre-planned KSK rollover and automatic ZSK rollover. """ import collections import os import shutil import datetime import subprocess import time import random from subprocess import check_call from dnstest.utils import * from dnstest.keys imp...
CZ-NIC/knot
tests-extra/tests/dnssec/offline_ksk/test.py
Python
gpl-3.0
9,849
# -*- coding: utf-8 -*- """Display download counts of GitHub releases.""" __program__ = 'github-download-count' __version__ = '0.0.1' __description__ = 'Display download counts of GitHub releases'
brbsix/github-download-count
gdc/__init__.py
Python
gpl-3.0
198
#!/usr/bin/env python import unittest from textwrap import dedent, indent from unittest_helpers import FIXTURE_DIR, load_fixture # NOTE: This test file file only works with scripts/ added to PYTHONPATH so pylint can't find the imports # pragma pylint: disable=import-error from isolate_tests import extract_solidity_...
ethereum/solidity
test/scripts/test_isolate_tests.py
Python
gpl-3.0
3,398
import datetime import json import os import psycopg2 as dbapi2 import re from flask import Flask from flask import redirect from flask import render_template from flask.helpers import url_for app = Flask(__name__) def get_elephantsql_dsn(vcap_services): """Returns the data source name for Elep...
itucsdb1510/itucsdb1510
examples/server_pg.py
Python
gpl-3.0
2,330
# -*- coding: utf-8 -*- """Family module for Meta Wiki.""" # # (C) Pywikibot team, 2005-2018 # # Distributed under the terms of the MIT license. # from __future__ import absolute_import, unicode_literals from pywikibot import family # The meta wikimedia family class Family(family.WikimediaOrgFamily): """Family ...
Wesalius/EloBot
pywikibot/families/meta_family.py
Python
gpl-3.0
641
""" Django settings for quixotic_webapp project. Generated by 'django-admin startproject' using Django 1.10.5. For more information on this file, see https://docs.djangoproject.com/en/1.10/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.10/ref/settings/ """ i...
zcarwile/quixotic_webapp
quixotic_webapp/settings.py
Python
gpl-3.0
3,517
#!/usr/bin/env python # encoding: utf-8 # # Copyright (c) 2008 Doug Hellmann All rights reserved. # """ """ __version__ = "$Id$" #end_pymotw_header import smtpd import asyncore server = smtpd.DebuggingServer(('127.0.0.1', 1025), None) asyncore.loop()
qilicun/python
python2/PyMOTW-1.132/PyMOTW/smtpd/smtpd_debug.py
Python
gpl-3.0
255
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2018-12-18 09:09 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0004_auto_20181218_0905'), ('registration',...
Ameriks/velo.lv
velo/registration/migrations/0008_companyparticipant_bike_brand.py
Python
gpl-3.0
668
import sys sys.path.append('../../../') from cx_Freeze import setup, Executable build_options = {'packages': ['PIL', 'mmfparser'], 'excludes': ['tcl', 'tk', 'Tkinter']} executables = [ Executable('hfatiler.py', base='Console', targetName='hfatiler.exe') ] setup(options={'build_exe': build_option...
joaormatos/anaconda
tools/hfatiler/setup.py
Python
gpl-3.0
349
#!/usr/bin/python # -*- coding: utf-8 -*- import logging def logcall(func): def _logcall(*args, **kw): logging.debug("%s.%s" % (args[0], func.__name__)) return func(*args, **kw) return _logcall
luisgustavossdd/TBD
framework/logger.py
Python
gpl-3.0
224
# -*- coding: utf-8 -*- ### BEGIN LICENSE # Copyright (C) 2009 Philip Peitsch <philip.peitsch@gmail.com> #This program 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 ...
necolt/hudson-notifier
hudsonnotifier/AboutHudsonnotifierDialog.py
Python
gpl-3.0
2,628
from PyQt4 import QtGui, QtCore, Qt from ui.ui_takestep_explorer import Ui_MainWindow as UI import numpy as np class QMinimumInList(QtGui.QListWidgetItem): def __init__(self, minimum): text="%.4f (%d)"%(minimum.energy, minimum._id) QtGui.QListWidgetItem.__init__(self, text) self.minimu...
js850/pele
pele/gui/takestep_explorer.py
Python
gpl-3.0
4,352
""" This is the config file for the Migration There are 3 things to configure. - the old Database to migrate from - the new Database to save the migration - FTP connection to save the files """ # Old Database. # This is where the Data is taken from dbOld = { 'host': "", # host ip 'port': ...
TeachForAustria/Naschmarkt
migrationscript/config.py
Python
gpl-3.0
1,043
from numpy import * from matplotlib import pyplot import scripts.skewtools as st import sys X,Y,t,Pe = st.importDatasets(sys.argv[1],'X','Y','Time','Peclet') figscale = 5. fig,ax = pyplot.subplots(1,1,figsize=(4*figscale,figscale)) uwall = 2./3. xmax = X.max() + uwall*Pe*t[-1] for i in range(len(t)): #for i in [5...
maminian/skewtools
scripts/animate_particles_2d_labframe.py
Python
gpl-3.0
1,101
""" Django settings for simplemooc project. Generated by 'django-admin startproject' using Django 1.8. 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/ """ # Build pat...
gleniooliveira/simplemooc
simplemooc/simplemooc/settings.py
Python
gpl-3.0
2,753
import os from .provider_manager import ProviderManager from .resolvers import resolver_registry field_registry = {} def register_field(name): """add resolver class to registry""" def add_class(clazz): field_registry[name] = clazz return clazz return add_class class Field: def __in...
2pisoftware/cmfive-boilerplate
.build/setup/resolver/fields.py
Python
gpl-3.0
1,839
#!/usr/bin/python ## Copyright (C) 2007, 2008, 2009, 2010 Red Hat, Inc. ## Author: Tim Waugh <twaugh@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 Lice...
Alberto-Beralix/Beralix
i386-squashfs-root/usr/share/system-config-printer/authconn.py
Python
gpl-3.0
18,164
from django.contrib.gis.geos import LineString, Point from django.core.management.base import BaseCommand from mta_data_parser import parse_schedule_dir from mta_data.models import * from mta_data.utils import st_line_locate_point from subway_stop_to_gid import stop_id_to_gid, end_of_line from zipfile import ZipFile i...
novalis/BusTracker
mta_data/management/commands/mta_to_gtfs.py
Python
gpl-3.0
23,554
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. from collections import OrderedDict from dj...
claudep/pootle
pootle/core/views/translate.py
Python
gpl-3.0
3,056