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
from py2neo.server import GraphServer from py2neo import Node,Relationship HISTO_LENGTH = 5 def insert(sentence, tokensAndType): """ Take a sentence and it's associate tokens and type and store all of it in the db as the last sentence of the dialogue @type sentence: string @param sentence: The inser...
Vongo/anna
src/talk/db.py
Python
gpl-2.0
5,871
#!/usr/bin/python def characterPictureGrid(grid): for dim1 in range(0, len(grid)): for dim2 in range(0, len(grid[dim1])): print grid[dim1][dim2], print "\n" grid = [['.', '.', '.', '.', '.', '.'], ['.', 'O', 'O', '.', '.', '.'], ['O', 'O', 'O', 'O', '.', '...
ajitabhpandey/learn-programming
python/characterPictureGrid.py
Python
gpl-2.0
597
inp = int(raw_input()) k = inp - 1 def generate(n): return [' ' for i in range(inp - n + 1)] \ + [str(i) for i in range(n)] + [str(i) for i in range(n-1)][::-1] for i in range(inp + 1): print " ".join(generate(i + 1)) while(k >= 0): print " ".join(generate(k + 1)) k -= 1
Sarthak30/Codeforces
present_from_lena.py
Python
gpl-2.0
302
import os from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth.decorators import login_required from django.core.servers.basehttp import FileWrapper from django.core.urlresolvers import reverse from django.http import Http404, HttpResponse, HttpResponseRedirect ...
willingc/vms
vms/volunteer/views.py
Python
gpl-2.0
7,224
import gettext import socket import sys import logging _ = lambda x: gettext.ldgettext("rhsm", x) import gtk gtk.gdk.threads_init() import rhsm sys.path.append("/usr/share/rhsm") # enable logging for firstboot from subscription_manager import logutil logutil.init_logger() log = logging.getLogger("rhsm-app." + _...
vritant/subscription-manager
src/subscription_manager/gui/firstboot/rhsm_login.py
Python
gpl-2.0
19,013
#!/usr/bin/env python ## Program: VMTK ## Module: $RCSfile: vmtkfebiowytet10.py,v $ ## Language: Python ## Date: $Date: 2016/08/19 09:49:59 $ ## Version: $Revision: 1.6 $ ## Copyright (c) Jingfeng Jiang, Yu Wang. All rights reserved. ## See LICENCE file for details. ## This software is di...
jjiang-mtu/virtual-breast-project
dynamic_SWE/write_FEBio_format_quadratic/vmtkfebiowytet10.py
Python
gpl-2.0
1,844
import os import sys # Make sure we import from working tree pynagbase = os.path.dirname(os.path.realpath(__file__ + "/..")) sys.path.insert(0, pynagbase) from tests import tests_dir import unittest2 as unittest from mock import MagicMock, patch, __version__ try: # open_mock comes with mock 1.0.1 from mock i...
kaji-project/pynag
tests/test_command.py
Python
gpl-2.0
27,749
# -*- coding: utf-8 -*- # # Project Tasks # from __future__ import print_function, unicode_literals import os import time import shutil import webbrowser from invoke import task SPHINX_AUTOBUILD_PORT = int(os.environ.get('SPHINX_AUTOBUILD_PORT', '8340')) def watchdog_pid(ctx): """Get watchdog PID via ``netstat...
pyroscope/pimp-my-box
tasks.py
Python
gpl-2.0
2,150
import subprocess import sys import csv import re import os, os.path from fnmatch import fnmatch CONFIG = "DATA_FILE={}\nALLOW_GREEDY=true\n" DATE_CHECK = re.compile("[0-9]{1,2}([/\\-\\.])[0-9]{1,2}\\1[0-9]{4}") def print_command_err(command, ret_code): make_arg = lambda x: x.replace(" ", "\\ ") command = [make_a...
Unit4TechProjects/ChoiceOptimization
run.py
Python
gpl-2.0
3,621
#!/usr/bin/env python import os import os.path import sys import numpy as np import pandas as pd from netCDF4 import Dataset from netCDF4 import num2date, date2num def main(args): ncfilein = args[0] dimens = args[1].split(',') #"time,x" "Time,Index" selvars = args[2].split(',')#"streamflo...
mrstu/flowbc_hamlee
scripts/nc2cell.flowsites.py
Python
gpl-2.0
2,528
# -*- coding: utf-8 -*- #This plugin is free software, you are allowed to #modify it (if you keep the license), #but you are not allowed to distribute/publish #it without source code (this version and your modifications). #This means you also have to distribute #source code of your modifications. from __future__ impo...
atvcaptain/enigma2
lib/python/Plugins/Extensions/AtileHD/plugin.py
Python
gpl-2.0
28,142
#! /usr/bin/env python #-*- coding: utf-8 -*- ################################################################# # Copyright (C) 2015 Sean Guo. All rights reserved. # # > File Name: < set_Chinese.py > # > Author: < Sean Guo > # > Mail: < iseanxp+code@gmail.com > # > Cre...
SeanXP/Nao-Robot
python/language/set_Chinese.py
Python
gpl-2.0
1,345
#!/usr/bin/python import sys sys.path.insert(0, '../src') from timeball_utils.configparser import backup_parser, config_parser, arg_parser def backup(): cparse = backup_parser(sys.argv[2]) backups = dict() while not cparse.empty(): date = cparse.parseString() if date is None: break ...
kev40293/timeball
src/tests/configtest.py
Python
gpl-2.0
1,218
import os import re from os import system, popen, path as os_path, listdir from Screens.Screen import Screen from Components.Harddisk import * from Components.Sources.StaticText import StaticText from Components.ActionMap import ActionMap, NumberActionMap from FactoryTestPublic import * import time from enigma import ...
openpli-arm/enigma2-arm
lib/python/Plugins/Extensions/FactoryTest/NetworkTest.py
Python
gpl-2.0
16,179
#!/usr/bin/env python """ Setup script for Rutgers Repository Utils. """ import distutils import sys from distutils.core import setup setup(name = 'rutgers-repository-utils', version = '1.3', description = 'Python scripts for repository management', author = ...
oss/rutgers-repository-utils
setup.py
Python
gpl-2.0
858
import random,collections def combine_fold(folds,i): testing=folds[i] del folds[i] training=reduce(lambda x,y:x+y,folds) folds.insert(i,testing) return training,testing def cv_folds(elems,k=10,classes=None,state=None): if state!=None: #save (or set) the state of random generator random...
sysbio-vo/bnfinder
BNfinder/CrossVal.py
Python
gpl-2.0
984
from random import random import render, player def process_events(events, server): new_blocks = {} for event in events: if event['time_remaining'] <= 0: new_blocks.update(event['func'](server, *event['args'])) events.remove(event) else: event['time_rema...
itsapi/pycraft
events.py
Python
gpl-2.0
1,083
# -*- coding: utf-8 -*- # ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # ...
PLyczkowski/Sticky-Keymap
2.74/scripts/addons_contrib/cursor_control/history.py
Python
gpl-2.0
9,295
"""distutils.errors Provides exceptions used by the Distutils modules. Note that Distutils modules may raise standard exceptions; in particular, SystemExit is usually raised for errors that are obviously the end-user's fault (eg. bad command-line arguments). This module is safe to use in "from ... import *" m...
edmundgentle/schoolscript
SchoolScript/bin/Debug/pythonlib/Lib/distutils/errors.py
Python
gpl-2.0
3,710
#! /usr/bin/env python #coding=utf-8 ## @Configuration of Preprocessing for SEIMS # # TODO, give more detailed description here. import os,platform ## Directionaries if platform.system() == "Windows": DATA_BASE_DIR = r'E:\github-zlj\model_data\model_dianbu_30m_longterm\data_prepare' PREPROC_SCRIPT_DIR = r'E...
SmileEric/SEIMS
preprocess/config.py
Python
gpl-2.0
6,003
import xbmc, xbmcaddon, xbmcgui, xbmcplugin,os,sys import shutil import urllib2,urllib import re import extract import time import downloader import plugintools import weblogin import zipfile import ntpath ARTPATH = 'http://totalxbmc.tv/totalrevolution/art/' + os.sep FANART = 'http://totalxbmc.tv/totalrev...
rlazojr/totalinstaller
plugin.program.totalinstaller/default.py
Python
gpl-2.0
104,757
# 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 it will be useful, # bu...
mathstuf/bodhi
bodhi/services/releases.py
Python
gpl-2.0
6,860
from pwn import * import base64 p = remote('dfa.eatpwnnosleep.com', 9999) p.recvline() p.recvline() p.recvline() p.recvline() p.recvline() p.sendline('auto.c') with open('auto.patch.c', 'r') as f: content = f.read() p.recvuntil('base64 : ') p.sendline(base64.b64encode(content)) print p.recvall()
Qwaz/solved-hacking-problem
SCTF/2017 Quals/dfa/solver.py
Python
gpl-2.0
308
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2013, 2014 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...
lnielsen/invenio
invenio/celery/config.py
Python
gpl-2.0
3,153
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright 2013-2015 Pervasive Displays, Inc. # Copyright 2015, Syed Faisal Akber # # 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...
VA3SFA/rpi_hw_demo
pcd8544/IP.py
Python
gpl-2.0
2,974
# SecuML # Copyright (C) 2016 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 hope t...
ah-anssi/SecuML
SecuML/core/DimensionReduction/Algorithms/Projection/Itml.py
Python
gpl-2.0
1,021
""" 2439 : 별 찍기 - 2 URL : https://www.acmicpc.net/problem/2439 Input : 5 Output : * ** *** **** ***** """ from itertools import repeat N = int(input()) for i in range(1, N + 1): print(''.join(list(repeat(' ', N - i)) + list(repeat('*', i))))
0x1306e6d/Baekjoon
baekjoon/2439.py
Python
gpl-2.0
326
from setuptools import setup, find_packages import os version = '1.0' setup(name='joomla2plone.policy', version=version, description="A policy package to manage a Plone installation", long_description=open("README.txt").read() + "\n" + open(os.path.join("docs", "HISTORY.txt"))...
macagua/joomla2plone-transmogrifier
src/joomla2plone.policy/setup.py
Python
gpl-2.0
1,795
# -*- coding: utf-8 -*- import KBEngine from KBEDebug import * import dialogmgr import skills def onInit(isReload): """ KBEngine method. 当引擎启动后初始化完所有的脚本后这个接口被调用 """ DEBUG_MSG('onInit::isReload:%s' % isReload) dialogmgr.onInit() skills.onInit() def onGlobalData(key, value): """ KBEngine method. globalData改变...
daaoling/KBEngine-LearnNote
kbengine_demos_assets/scripts/cell/kbengine.py
Python
gpl-2.0
1,646
from __future__ import unicode_literals from django.apps import AppConfig class PermsConfig(AppConfig): name = 'perms'
choldrim/jumpserver
apps/perms/apps.py
Python
gpl-2.0
126
import logging from pylons import config, request, response, session, tmpl_context as c from pylons.controllers.util import abort from fmod.lib.base import BaseController, render from fmod import model from sqlalchemy import desc log = logging.getLogger(__name__) from hashlib import md5 import time, datetime #usef...
wiredfool/fmod
fmod/controllers/ping.py
Python
gpl-2.0
5,311
#!/usr/bin/python # Terminator by Chris Jones <cmsj@tenshu.net> # GPL v2 only """terminalshot.py - Terminator Plugin to take 'screenshots' of individual terminals""" import os from gi.repository import Gtk import terminatorlib.plugin as plugin from terminatorlib.translation import _ from terminatorlib.util import widg...
guoxiao/terminator-gtk3
terminatorlib/plugins/terminalshot.py
Python
gpl-2.0
2,191
import optparse import numpy as np from ase.lattice import bulk from ase.tasks.task import OptimizeTask from ase.data import chemical_symbols, reference_states from ase.utils.eos import EquationOfState from ase.io.trajectory import PickleTrajectory class BulkTask(OptimizeTask): taskname = 'bulk' def __init...
JConwayAWT/PGSS14CC
lib/python/multimetallics/ase/tasks/bulk.py
Python
gpl-2.0
5,236
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import datetime from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('patchwork', '0002_fix_pat...
joselamego/patchwork
patchwork/migrations/0003_series.py
Python
gpl-2.0
2,993
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2000-2006 Donald N. Allingham # Copyright (C) 2011 Tim G L Lyons # # 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; eith...
arunkgupta/gramps
gramps/gui/editors/displaytabs/__init__.py
Python
gpl-2.0
2,332
AZ09 = ["A","B","C","D"] MorseAZ09 = [".-","-...","-.-.","-.."] def str2morse(string): string = string.upper() ret = "" for c in string: ret += MorseAZ09[AZ09.index(c)] +" " return ret # alphanumeric to morse code dictionary AN2Morse = {"A":".-", "B":"-...", ...
hgijeon/NetworkLayer
morse.py
Python
gpl-2.0
5,184
import fsui from fsgamesys.context import fsgs from launcher.i18n import gettext from launcher.launcher_config import LauncherConfig class CustomOptionsPage(fsui.Panel): def __init__(self, parent): fsui.Panel.__init__(self, parent) self.layout = fsui.VerticalLayout() label = fsui.MultiLin...
FrodeSolheim/fs-uae-launcher
launcher/ui/config/CustomOptionsPage.py
Python
gpl-2.0
2,973
from earyx.experiments import AFCExperiment from earyx.order import Sequential from earyx.utils import gensin, fft_rect_filt, hanwin, rms import numpy as np import earyx.ui as UI import earyx class SineAfterNoise(AFCExperiment,Sequential): def init_experiment(self, exp): """Set all parameters for one's ow...
TGM-Oldenburg/earyx
earyx/experiments/sine_after_noise.py
Python
gpl-2.0
2,853
class AppointmentStatusError(Exception): pass class AppointmentCreateError(Exception): pass class AppointmentSmsReminderError(Exception): pass
botswana-harvard/edc-appointment
edc_appointment/exceptions.py
Python
gpl-2.0
161
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
jimflim/blender-scripts
extend.py
Python
gpl-2.0
8,848
"""ShutIt module. See http://shutit.tk/ """ from shutit_module import ShutItModule class rsync(ShutItModule): def is_installed(self, shutit): return False def build(self, shutit): shutit.send('mkdir -p /tmp/build/rsync') shutit.send('cd /tmp/build/rsync') shutit.send('curl -L http://rsync.samba.org/ftp...
ianmiell/OLD-shutitdist
rsync/rsync.py
Python
gpl-2.0
1,111
from lazy.utils import isolate_namespace def test_isolate_namespace(): assert 'test' != isolate_namespace('test')
llllllllll/lazy_python
lazy/tests/test_utils.py
Python
gpl-2.0
120
# Copyright (C) 2014-2016 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distribute...
msimacek/koschei
test/__init__.py
Python
gpl-2.0
1,083
# -*- coding: utf-8 -*- """ Modulo per la gestione generica di una connessione al sito. """ #= IMPORT ====================================================================== import datetime from twisted.internet import protocol from src.config import config from src.enums import LOG, OPTION, TRUST from src.log ...
Onirik79/aaritmud
src/connection.py
Python
gpl-2.0
8,524
#!/usr/bin/env python ################################################## ## DEPENDENCIES import sys import os import os.path try: import builtins as builtin except ImportError: import __builtin__ as builtin from os.path import getmtime, exists import time import types from Cheetah.Version import MinCompatib...
MOA-2011/enigma2-plugin-extensions-openwebif
plugin/controllers/views/mobile/movies.py
Python
gpl-2.0
8,464
#!/usr/bin/env python # -*- coding: utf-8 -*- # ------------------------------------------------------------------------ # File Name: mul.py # Author: Zhao Yanbai # Thu Oct 1 15:10:27 2015 # Description: none # ------------------------------------------------------------------------ for j in range...
acevest/acecode
learn/python/mul.py
Python
gpl-2.0
462
from .cakesync import CakeSync from .caketable import CakeTable from .caketypes import CakeTypes from .cakemodel import CakeModel
bizoru/sqlite-cake
sqlitecake/core/__init__.py
Python
gpl-2.0
130
# -*- coding: utf-8 -*- # Generated by Django 1.9.2 on 2016-02-06 02:49 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models class Migration(migrations.Migration): initial = True dependencies = [migrations.swappable_dependency(settings.AUTH_USER_...
jacobajit/ion
intranet/apps/ionldap/migrations/0001_initial.py
Python
gpl-2.0
1,569
#!/usr/bin/python import sys """ My input is 2234,2234,765,2,3,44,44,55,33,33,2,33,33,33 my o/p 2234:2,765,2,3,44:2,55,33:2,2,33:3""" my_input = sys.argv[1] #my_input = "1,7,2234,2234,765,2,3,44,44,55,33,33,2,33,33,33,33,1" my_list = my_input.split(",") my_str = "" #print my_list init = my_list[0] count = 0 final_list...
hiteshagrawal/python
info/bkcom/problem8.py
Python
gpl-2.0
635
from PyQt4.QtCore import * from PyQt4.QtGui import * from PyQt4 import QtGui import matplotlib.pyplot as plt import matplotlib import matplotlib.cm as cm import numpy as np import sys import os from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg impo...
bmazin/ARCONS-pipeline
examples/skyAnalysis/statsExplorer.py
Python
gpl-2.0
12,388
# =========================================================================== # eXe # Copyright 2004-2006, University of Auckland # # 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 versio...
kohnle-lernmodule/palama
exe/webui/block.py
Python
gpl-2.0
12,877
# -*- coding: utf-8 -*- #------------------------------------------------------------ # pelisalacarta - XBMC Plugin # Conector para rtpa # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os from core import s...
titienmiami/mmc.repository
plugin.video.tvalacarta/servers/rtpa.py
Python
gpl-2.0
1,033
import logging import os import sys from tornado import ioloop from tornado import web from pyjobs import handlers logging.basicConfig(stream=sys.stdout, level=logging.INFO) logger = logging.getLogger(__name__) STATIC_PATH = os.path.join(os.path.dirname(__file__), 'static/') url_patterns = [ web.url('/', handle...
winstonf88/pyjobs
pyjobs/app.py
Python
gpl-2.0
750
''' Created on Dec 21, 2013 @author: Chris ''' import sys import hashlib from time import time as _time from time import sleep as _sleep from argparse import ArgumentParser from gooey import Gooey @Gooey def main(): desc = "Mock application to test Gooey's functionality" file_help_msg = "Name o...
garrettcap/Bulletproof-Backup
gooey/mockapplications/mockapp.py
Python
gpl-2.0
2,121
''' KMUX - a free and open source small business server. Copyright (C) 2015, Julian Thomé <julian.thome.de@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, ...
KMUX-Project/KMUX
kmux/modules/root/__init__.py
Python
gpl-2.0
837
#!/usr/bin/python # -*- coding: utf-8 -*- # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distr...
the-black-eagle/repository.blackeagle
script.radio.streaming.helper/resources/lib/utils.py
Python
gpl-2.0
28,638
def validate_file_extension(value): import os from django.core.exceptions import ValidationError ext = os.path.splitext(value.name)[1] # [0] returns path+filename valid_extensions = ['.csv','.xlsx', '.xls'] if not ext in valid_extensions: raise ValidationError(u'Unsupported file extension. ...
akmiller01/di-quick-vis
qv/core/validators.py
Python
gpl-2.0
356
from PyQt4 import QtGui from utils import * import pyqtgraph as pqg import numpy as np from colorButton import ColorButton import traceitem class ImageItem(): def __init__(self, imageTab): self.imageTab = imageTab self.sliceTable = None self.name = None self.sliceParams = {} ...
bencorbett90/Graph
graph/imageitem.py
Python
gpl-2.0
22,662
from django.core import serializers from django.http import HttpResponse from django.template import loader from django.utils import translation from django import http from django.conf import settings from .versions import versions def index(request): template = loader.get_template('index.html') return Http...
iHamsterball/stellaris_tech_tree
stellaris_tech_tree/views.py
Python
gpl-2.0
508
# -*- coding: utf-8 -*- import numpy as np import os import matplotlib.pyplot as plt from mpl_toolkits.axes_grid1 import make_axes_locatable def load_depthmap(depthmap_full_file_path, depthmap_rows, depthmap_cols, fileformat=np.float32, is_megapov_depthmap = 0): depth_array = [] if depthmap_ful...
JeffsanC/uavs
src/rpg_vikit/vikit_py/src/vikit_py/depthmap_utils.py
Python
gpl-2.0
1,962
# -*- coding: utf-8 -*- ''' Covenant Add-on This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This prog...
felipenaselva/felipe.repository
plugin.video.streamhub/resources/lib/sources/en/watchfree.py
Python
gpl-2.0
8,466
from django.contrib import admin from django.core.exceptions import ObjectDoesNotExist from django.core.urlresolvers import reverse from django.http import HttpResponse, HttpResponseRedirect import unicodecsv import base.admin # import default PaleoCore admin classes from models import Occurrence, Biology, Taxon, Tax...
paleocore/paleocore
mlp/admin.py
Python
gpl-2.0
12,404
def sqr(x): return x*x def cube(x): return x*x*x def quad(x): return cube(x)*x a = 10 print sqr(a) print cube(a) print quad(a)
jishnuv/Toy-Python-Virtual-Machine
Testcases/Functions/f2.py
Python
gpl-2.0
131
# This file is part of Superwas. # # Superwas 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. # # Superwas is distributed in the hope...
superclass/superwas
application.py
Python
gpl-2.0
26,210
print('I am:', __name__) def minmax(test, *args): res = args[0] for arg in args[1:]: if test(arg, res): res = arg return res def lessthan(x, y): return x < y def grtrthan(x, y): return x > y if __name__ == '__main__': print(minmax(lessthan, 4, 2, 1, 5, 6, 3)) # Sel...
simontakite/sysadmin
pythonscripts/learningPython/minmax2.py
Python
gpl-2.0
380
#!/usr/bin/env python ## ## nbody-slicer, an n-body viz tool written in python ## ben wibking <ben.wibking@gmail.com> ## basefilename = "" leftfile = basefilename+"" rightfile = basefilename+"" boxsize = 1000. numbins = 100 zaxis = 0 zmin = 0. zmax = 10. xmin = 500. xmax = 1000. ymin = 500. ymax = 1000. ####### ...
BenWibking/nbody-slicer
slicer.py
Python
gpl-2.0
3,467
#!/usr/bin/env python """ voronoi2svg.py Create Voronoi diagram from seeds (midpoints of selected objects) - Voronoi Diagram algorithm and C code by Steven Fortune, 1987, http://ect.bell-labs.com/who/sjf/ - Python translation to file voronoi.py by Bill Simons, 2005, http://www.oxfish.com/ Copyright (C) 2011 Vincent ...
Huluzai/DoonSketch
inkscape-0.48.5/share/extensions/voronoi2svg.py
Python
gpl-2.0
10,842
# encoding: utf-8 # module samba.dcerpc.dnsserver # from /usr/lib/python2.7/dist-packages/samba/dcerpc/dnsserver.so # by generator 1.135 """ dnsserver DCE/RPC """ # imports import dcerpc as __dcerpc import talloc as __talloc class DNS_RPC_ENUM_ZONES_FILTER(__talloc.Object): # no doc def __init__(self, *args,...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/samba/dcerpc/dnsserver/DNS_RPC_ENUM_ZONES_FILTER.py
Python
gpl-2.0
1,215
# -*- coding: utf-8 -*- # Copyright (C) 2015 Malte Loepmann (maloep@googlemail.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 option) any la...
maloep/xbmc-s04tv
default.py
Python
gpl-2.0
10,118
PROJECT_PATH = __path__[0] TIEMPO_REGISTRY = {} REDIS_GROUP_NAMESPACE = 'tiempogroup' RECENT_KEY = 'tiempo:recent_tasks' RESULT_PREFIX = 'tiempo:task_result' __version__ = "1.2.3"
hangarunderground/tiempo
tiempo/__init__.py
Python
gpl-2.0
183
# -*- coding: utf-8 -*- import model_recepcion
sani-coop/tinjaca
addons/recepcion/models/__init__.py
Python
gpl-2.0
48
class RuntimeValidationError(Exception): pass
lubokkanev/cloud-system
core/main/runtimes/runtime_validation_error.py
Python
gpl-2.0
50
# IVLE # Copyright (C) 2007-2009 The University of Melbourne # # 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 ...
dcoles/ivle
ivle/webapp/security/views.py
Python
gpl-2.0
6,811
#!/usr/bin/env python import pymysql import urllib2 import json import collections import types import time import datetime import sys from pprint import pprint # ---------------------- # Functions # ---------------------- # Read threads def readThreads(subredditUrl, conn, cur): threads = requestJson(subredditUrl)...
lucasdnd/league-sentiment
scripts/reader.py
Python
gpl-2.0
5,901
# -*- coding: utf-8 -*- ''' script.matchcenter - Football information for Kodi A program addon that can be mapped to a key on your remote to display football information. Livescores, Event details, Line-ups, League tables, next and previous matches by team. Follow what others are saying about the match ...
hwoods723/script.gamescenter
main.py
Python
gpl-2.0
2,988
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy class SexyItem(scrapy.Item): # define the fields for your item here like: name = scrapy.Field() dirname = scrapy.Field() file_urls = scr...
eryxlee/scrapy
sexy/sexy/items.py
Python
gpl-2.0
358
""" WSGI config for LAK_2014 project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION``...
aitoralmeida/geo-lak
LAK_2014/LAK_2014/wsgi.py
Python
gpl-2.0
1,138
def save_bacteria_dna(): """ 0 = A, 1 = T, 2 = C, 3 = G footnote: >>>ord('c') 99 >>>chr(97) 'c' same unichr() command """ char_list = [] binary_list = [] request_word = raw_input("Please enter the word," ...
dogancankilment/UnixTools
utils/biology/storage_in_bacterias.py
Python
gpl-2.0
2,800
# -*- coding: utf-8 -*- """ Created on Sat Nov 28 21:34:36 2015 @author: Zlati """ from .portfolios.offline.equal_weights_portfolio import EqualWeightsPortfolio from .portfolios.offline.tangency_portfolio import TangencyPortfolio from .portfolios.offline.minimum_variance_portfolio import MinimumVariancePortfolio from...
zlatiadam/PyPortfolio
pyportfolio/__init__.py
Python
gpl-2.0
863
#!/usr/bin/env python3 # -*- encoding: utf-8; py-indent-offset: 4 -*- from pathlib import Path from typing import Any, Dict from .bakery_api.v1 import FileGenerator, OS, Plugin, register def get_yum_files(conf: Dict[str, Any]) -> FileGenerator: yield Plugin(base_os=OS.LINUX, source=Path("yum"), ...
HenriWahl/checkmk-agent-plugin-yum
lib/python3/cmk/base/cee/plugins/bakery/yum.py
Python
gpl-2.0
445
#!/usr/bin/python3 """ Analyze the word frequencies on the main articles of a website """ import argparse import requests from bs4 import BeautifulSoup import re import itertools import string from collections import defaultdict import time import json import os import operator def load_ignored_words(words_file): ...
dmpalyvos/web-scripts
spider.py
Python
gpl-2.0
5,655
""" Program name: MPS-Proba Program purpose: The Alpha version of the APC 524 project. File name: radiatingboys.py File purpose: the radiating boys model Responsible person: Bin Xu """ from numpy import ndarray, zeros import numpy as np from model import Model class RadiatingBoys(Model): """ A probablistic mo...
binarybin/MPS_Proba
src/radiatingboys.py
Python
gpl-2.0
5,035
#!/usr/bin/python3 # @begin:license # # Copyright (c) 2015-2019, Benjamin Niemann <pink@odahoda.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 2 of the License, or # (at y...
odahoda/noisicaa
noisicaa/builtin_nodes/control_track/track_ui.py
Python
gpl-2.0
15,641
# coding=utf-8 import sys def read(client, vlans, cnames, print_warnings): lines = [] if cnames: for cname in client.list_cnames(): lines.append('cname\t' + cname['name']) lines.append('target\t' + cname['canonical']) lines.append('') for vlan in client.list_vla...
booski/hostdb9
dns_reader.py
Python
gpl-2.0
1,853
#! /usr/bin/env python """ This program is for renaming files (through symbolic links) using a file conversion table. The columns should be ordered as so: new directory, new id, old directory, old file name. Columns can be separated using any standard ASCII character. If files are paired-end and follow the standard co...
Brazelton-Lab/system
rename.py
Python
gpl-2.0
5,082
# Wasp: Discrete Design with Grasshopper plug-in (GPL) initiated by Andrea Rossi # # This file is part of Wasp. # # Copyright (c) 2017, Andrea Rossi <a.rossi.andrea@gmail.com> # Wasp is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published # by the ...
ar0551/Wasp
src/ghComp/Wasp_DisCo Rule Group.py
Python
gpl-3.0
3,209
# (C) British Crown Copyright 2014, Met Office # # This file is part of Iris. # # Iris 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 ve...
scollis/iris
lib/iris/tests/unit/plot/test_pcolor.py
Python
gpl-3.0
1,395
from .connections import * import threading import weakref class TcpConnection(NonLocalConnection): def __init__(self, handle: c_void_p): NonLocalConnection.__init__(self, handle) yogi.YOGI_CreateTcpClient.restype = api_result_handler yogi.YOGI_CreateTcpClient.argtypes = [POINTER(c_void_p), c_void_p, c_...
jmbergmann/yogi
yogi-python/yogi/private/tcp.py
Python
gpl-3.0
10,200
# -*- coding: UTF-8 -*- # bp_v1 from .api_v1 import bp_v1 # bp_v2 from .api_v2 import bp_v2 __author__ = 'lpe234' """ Controller """
lpe234/sanicDemo
controller/__init__.py
Python
gpl-3.0
137
import math class P4(object): def p4(self): '''4-momentum, px, py, pz, E''' return self._tlv def p3(self): '''3-momentum px, py, pz''' return self._tlv.Vect() def e(self): '''energy''' return self._tlv.E() def pt(self): '''transverse momentum ...
semkiv/heppy_fcc
particles/p4.py
Python
gpl-3.0
1,250
import weakref from sys import getrefcount import string import talkshowConfig style = talkshowConfig.config().parser.style from talkshowLogger import logger debug = logger.debug info = logger.info warn = logger.warn #?? pyglet.options['audio'] = ('directsound', 'openal', 'silent') from pyglet.gl import * from pygl...
regular/talkshow
wrappers.py
Python
gpl-3.0
20,806
# coding: utf8 # jmdict.py # 2/14/2014 jichi if __name__ == '__main__': import sys sys.path.append('..') def get(dic): """ @param dic str such as ipadic or unidic @return bool """ import rc return rc.runscript('getcabocha.py', (dic,)) if __name__ == "__main__": get('unidic') # EOF
Dangetsu/vnr
Frameworks/Sakura/py/libs/scripts/cabocha.py
Python
gpl-3.0
307
#!/usr/bin/python from lofar.messaging.RPC import RPC, RPCException, RPCWrapper import logging import sys logger = logging.getLogger(__name__) from lofar.sas.systemstatus.service.config import DEFAULT_SSDB_BUSNAME from lofar.sas.systemstatus.service.config import DEFAULT_SSDB_SERVICENAME class SSDBRPC(RPCWrapper): ...
jjdmol/LOFAR
SAS/ResourceAssignment/SystemStatusService/SSDBrpc.py
Python
gpl-3.0
2,363
from datetime import datetime import io import os import tempfile import zipfile from PIL import Image, ImageFont from PIL.Image import LANCZOS from PIL.ImageDraw import Draw from django.conf import settings from django.contrib.auth.models import Permission from django.contrib.contenttypes.fields import GenericForeign...
cmjatai/cmj
cmj/sigad/models.py
Python
gpl-3.0
49,449
# The Craftr build system # Copyright (C) 2016 Niklas Rosenstein # # 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. # # ...
winksaville/craftr
craftr/defaults.py
Python
gpl-3.0
10,759
# # controller_m15x.py # # Copyright (C) 2013-2014 Ashwin Menon <ashwin.menon@gmail.com> # Copyright (C) 2015-2018 Track Master Steve <trackmastersteve@gmail.com> # # Alienfx is free software. # # You may redistribute it and/or modify it under the terms of the # GNU General Public License, as published by the Free Soft...
ashwinm76/alienfx
alienfx/core/controller_m15x.py
Python
gpl-3.0
4,057
# -*- coding: utf-8 -*- # Copyright (c) 2010 Mark Sandstrom # Copyright (c) 2011-2015 Raphaël Barrois # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without ...
z1gm4/desarrollo_web_udp
env/lib/python2.7/site-packages/factory/base.py
Python
gpl-3.0
26,259
import cv2 from gym.spaces.box import Box import numpy as np import numpy import gym from gym import spaces import logging import universe from universe import vectorized from universe.wrappers import BlockingReset, GymCoreAction, EpisodeID, Unvectorize, Vectorize, Vision, Logger from universe import spaces as vnc_spac...
lily4630/test_4
envs.py
Python
gpl-3.0
14,078
from database.db import db import pymongo class UserMetadataService(object): def __init__(self): self.user_meta = db.user_metadata def get_active(self): return self.user_meta.find_one({'active': True}) def insert(self, user_meta_dict): return self.user_meta.insert(user_meta_dict...
iurykrieger96/morpy
app/api/services/UserMetadataService.py
Python
gpl-3.0
546
# -*- coding: UTF-8 -*- # Syntax definition automatically generated by hljs2xt.py # source: sml.js name = 'SML' file_patterns = ['*.sml', '*.ml'] built_in = """ array bool char exn int list option order real ref string substring vector unit word """.split() keyword = """ abstype and andalso as case da...
editxt/editxt
resources/syntax/sml.syntax.py
Python
gpl-3.0
1,797