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 pippi import dsp, tune from hcj import snds, keys key = 'g' rhodes = snds.load('hcj/rhodes1.wav') rhodes = dsp.transpose(rhodes, 16.0/15.0) def chord(length, freqs, amp): layers = [ keys.rhodes(length, freq, amp * dsp.rand(0.25, 0.5)) for freq in freqs ] layers = [ dsp.pan(layer, dsp.rand()) for layer i...
hecanjog/pattern.studies
orc/rhodes.py
Python
cc0-1.0
1,488
# coding=utf-8 from rolepermissions.roles import AbstractUserRole class Student(AbstractUserRole): pass class Tutor(AbstractUserRole): available_permissions = { 'create_course': False } class SystemAdmin(AbstractUserRole): pass
gileno/curso-amadeus
simplemooc/roles.py
Python
cc0-1.0
262
# formula #MA def MA(xArr, yArr, N): lenY = len(yArr); lenX = len(xArr); for idx in range(lenY, lenX): ss = 0; av = 0; for k in range(0, N): nidx = idx - k; if nidx < 0: av = ss / float(k); break; else...
WaitGodot/peatio-client-python
formula/Formula.py
Python
cc0-1.0
3,523
#! /usr/bin/env python # -*- coding: utf-8 -*- from flask import Flask from flask_restplus import Api, Resource, fields from subprocess import check_output import sys import os import shutil app = Flask(__name__) api = Api(app, version='0.1', title='Speak API', description='Get phonemes of a text from vari...
boltomli/RESTfulSpeak
api.py
Python
cc0-1.0
5,635
''' Created on 03/mar/2014 @author:Sonya ''' from numpy.random.mtrand import np import random from FCM.Class_File_Manager import FileManager import numpy ################################################################################ # Peach - Computational Intelligence for Python # Jose Alexandre Nalo...
fabiolapozyk/IncrementalFCM
Python/FCM/Class_FCM.py
Python
cc0-1.0
14,194
#< ab || cd > = [[ a,b ] , [ c,d ]] #A script to find the optimal alignment of diagrams used in the CCDT t3 amplitude equation def perm(a, i,e): ai= a[1][e] ae = a[1][i] api = a[3][e] ape = a[3][i] a[1][i] = ai a[1][e] = ae a[3][i] = api a[3][e] = ape def perm2(a, ...
CompPhysics/ThesisProjects
doc/MSc/msc_students/former/AudunHansen/Audun/Pythonscripts/t3_align.py
Python
cc0-1.0
11,625
def yoda(text): return " ".join(text.split(" ")[::-1]) print(yoda("it. invent is do can we All all. at future the predict really can't We"))
alaudo/coderdojo-python
code/25 - decode3.py
Python
cc0-1.0
147
level_1 = [ list("........."), list("........."), list("........."), list("........."), list("........."), list("........."), list("........."), list("........G"), list(".SSSSSSSS"), ] level_2 = [ list("........."), list("........."), list("........."), list("....
2065983Y/spinner
levels.py
Python
cc0-1.0
921
volumes={ 'oil': [], 'gas': [], 'ngl': [], }
WaltXon/curvey
templates.py
Python
cc0-1.0
58
import getopt, sys import requests import json api_key = "" secret_key = "" api_url = "http://ws.audioscrobbler.com/2.0/" artists = [] tags = {} tagcloud = {} #default to an awesome user user_name = "iLikeSpoons" # Reat the api-key and secret-key for the last.fm api from a # file given as a parameter. def read_confi...
ivandervisevic/lastfm-vis
get_data.py
Python
gpl-2.0
4,216
#Written by Reid McIlroy-Young for Dr. John McLevey, University of Waterloo 2015 import os.path import re from setuptools import setup, find_packages with open('metaknowledge/constants.py') as f: versionString = re.search(r"__version__ = '(.+)'", f.read()).group(1) long_descriptionLOC = "README.rst" if os.path.is...
networks-lab/isilib
setup.py
Python
gpl-2.0
2,376
import os, sys, getopt import glob import json import ConfigParser config = ConfigParser.ConfigParser() config.read('/var/www/lib/config.ini') media_folder = config.get('system', 'usb_folder') filter = False path=media_folder + '/' destination="" filters_extensions=[".gcode",".nc",".gc",".stl",".obj"...
FABtotum/FAB-UI
fabui/python/usb_browser.py
Python
gpl-2.0
1,657
# -*- coding: utf-8 -*- """ Created on Sun Nov 08 23:40:43 2015 @author: Ben """ import scipy.signal as signal import numpy as np import threading from scipy.signal.signaltools import _next_regular from numpy.fft import rfftn, irfftn _rfft_lock = threading.Lock() def get_g2(P1, P2, lags=20): ''' Returns the Top ...
benschneider/Generic-Sweepscript
covfunc.py
Python
gpl-2.0
7,868
# -*- coding: utf-8 -*- # # This file is part of EventGhost. # Copyright © 2005-2016 EventGhost Project <http://www.eventghost.net/> # # EventGhost 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...
WoLpH/EventGhost
eg/Classes/FolderItem.py
Python
gpl-2.0
1,066
""" WSGI config for untitled project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ """ from django.core.wsgi import get_wsgi_application application = get_wsgi_application()
sql-viewer/SQLGlimpse
sqlviewer/wsgi.py
Python
gpl-2.0
313
verbose_names = ( "Cash & Short Term Investments", "Cash Only", "Short-Term Investments", "Cash & Short Term Investments Growth", "Cash & ST Investments / Total Assets", "Total Accounts Receivable", "Accounts Receivables, Net", "Accounts Receivables, Gross", "Bad Debt/Doubtful Accoun...
kakarukeys/algo-fa
fa/database/balancesheet_numerical_columns.py
Python
gpl-2.0
3,230
""" /*************************************************************************** Name : QTableWidget Combo Box Description : Custom Combo Box that stores the row number of its container Date : 14/October/11 copyright : (C) 2011 by John Gitau email ...
olivierdalang/stdm
ui/customcontrols/table_combobox.py
Python
gpl-2.0
1,313
#!/usr/bin/env python class tree: def __init__(self, l): N = len(l) + 1 m = [] for i in range(N): m.append({"nearest": []}) for i, j in l: m[i]["nearest"].append(j) m[j]["nearest"].append(i) self.t = [] for i in range(N): self.t.append({"children":[]}) self.t[0]...
ryota-sugimoto/hackerrank
search/journey_scheduling.py
Python
gpl-2.0
3,055
#!/usr/bin/python import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, Gdk from monitor import Monitor import threading def refresh_host(server_list_file = None): if server_list_file is None: server_list_file = "servers.list" list_store = builder.get_object("host_ListStore"...
SimonTheCoder/server_monitor
wmonitor.py
Python
gpl-2.0
2,078
# This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. from Bio._py3k import range from Bio._py3k import basestring from Bio.Seq import UnknownSeq from Bio.SeqUtils.CheckSum import seguid from Bio.SeqFeatu...
updownlife/multipleK
dependencies/biopython-1.65/Tests/seq_tests_common.py
Python
gpl-2.0
15,350
# -*- coding: utf-8 -*- import simplejson import urllib import httplib2 from lxml import etree from datetime import datetime from linkedtv.model import Enrichment from linkedtv.api.dimension.DimensionService import DimensionService """ SPARQL END-POINT https://nwr_hack:[email protected]/nwr/cars-hack...
beeldengeluid/linkedtv-editortool
src/linkedtv/api/dimension/public/NewsReaderAPI.py
Python
gpl-2.0
5,284
import re import time import requests import pbl.pollers from pbl.pollers.baseentry import BaseEntry from pbl.pollers.recentitemspoller import RecentItemsDownloader from pbl.pollers.recentitemspoller import RecentItemsPoller class KdeEntry(BaseEntry): def __init__(self, data, metadata): BaseEntry.__ini...
EiNSTeiN-/pbl
pollers/kde.py
Python
gpl-2.0
2,406
# -*- coding: utf-8 -*- import wx import widgetUtils from .home import homeTab class audioTab(homeTab): def create_list(self): self.lbl = wx.StaticText(self, wx.NewId(), _("Mu&sic")) self.list = widgetUtils.multiselectionList(self, *[_("Title"), _("Artist"), _("Duration")], style=wx.LC_REPORT, name...
manuelcortez/socializer
src/wxUI/tabs/audio.py
Python
gpl-2.0
1,849
changelog = """ # 0.1-alpha * added code to check if scaned filenames have any BSE,AsB or BEI part, and setting one as base image. If it don't - then dialog to chose from scaned types appears to user (so if in Esprit settings it was aliased differently you have to tell that) * tided up the project dir structure (drope...
sem-geologist/Qstitch
etc/changelog.py
Python
gpl-2.0
2,076
# -*- coding: utf-8 -*- # Micha Wildermuth, [email protected] 2020 from qkit.core.instrument_base import Instrument class mfc_dummy(Instrument): ''' This is a driver for a dummy mass flow controller as used for sputter deposition monitoring qkit.services.qdepokit.sdi. Usage: Initialize wi...
qkitgroup/qkit
qkit/drivers/mfc_dummy.py
Python
gpl-2.0
863
from dataclasses import dataclass from typing import Tuple Point = Tuple[int, int] Position = Tuple[int, int] Size = Tuple[int, int] @dataclass class WindowState: x: int y: int width: int height: int maximized: bool # Import Widget last to resolve any import cycles # from fsui import Widget
FrodeSolheim/fs-uae-launcher
fswidgets/types.py
Python
gpl-2.0
317
from .appointment_view_mixin import AppointmentViewMixin
botswana-harvard/edc-appointment
edc_appointment/view_mixins/__init__.py
Python
gpl-2.0
57
#!/usr/bin/env python # -*- coding: utf-8 -*- # generated by wxGlade 0.6.3 on Wed Oct 7 22:13:19 2009 # # Project: VYPe - Conversion from regular expressions to finite automata # Authors: # Libor Polčák, [email protected] # Petr Zemek, [email protected] # Date: 4.10.2009 # import wx from Mai...
s3rvac/fit-projects
VYPe/src/gui/VYPe2009.py
Python
gpl-2.0
636
# -*- coding: utf-8 -*- # This file is part of the Horus Project __author__ = 'Jesús Arroyo Torrens <[email protected]>' __copyright__ = 'Copyright (C) 2014-2015 Mundo Reader S.L.\ Copyright (C) 2013 David Braam from Cura Project' __license__ = 'GNU General Public License v2 http://www.gnu.org/licen...
3cky/horus
src/horus/util/resources.py
Python
gpl-2.0
2,307
from django.conf.urls import patterns, include, url from django.contrib import admin admin.site.site_header="Scanner Admin" urlpatterns = patterns('', # Examples: url(r'^admin/', include(admin.site.urls), name='admin'), url(r'^', include('scans.urls')), )
sixdub/Minions
minions/urls.py
Python
gpl-2.0
270
"""Pylons environment configuration""" import os from mako.lookup import TemplateLookup from pylons.configuration import PylonsConfig from pylons.error import handle_mako_error from sqlalchemy import engine_from_config import quickcms.lib.app_globals as app_globals import quickcms.lib.helpers from quickcms.config.rou...
CentroGeo/QuickCMS
quickcms/config/environment.py
Python
gpl-2.0
1,917
# -*- coding: utf-8 -*- #------------------------------------------------- #-- miki - my kivy like creation tools #-- #-- microelly 2016 #-- #-- GNU Lesser General Public License (LGPL) #------------------------------------------------- def creatorFunction(name): if name.startswith('Part::'): return "App.activeD...
microelly2/Animation
Miki.py
Python
gpl-2.0
7,029
# -*- coding: utf-8 -*- #Copyright (C) Fiz Vazquez [email protected] # Modified by dgranda #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) ...
pytrainer/pytrainer
imports/file_garmintcxv2.py
Python
gpl-2.0
8,236
# -*- coding: utf-8 -*- # Gedit External Tools plugin # Copyright (C) 2006 Steve Frécinaux <[email protected]> # # 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 o...
nacho/gedit
plugins/externaltools/tools/library.py
Python
gpl-2.0
15,886
## Copyright (C) 2012 Red Hat Inc., Bryn M. Reeves <[email protected]> ## 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. ...
beagles/sosreport-neutron
sos/plugins/cloudforms.py
Python
gpl-2.0
1,683
# This file is part of creddump. # # creddump 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. # # creddump is distributed in the hope t...
HarmJ0y/ImpDump
framework/win32/lsasecretsw2k8.py
Python
gpl-2.0
3,709
# -*- coding: utf-8 -*- """ (c) 2015-2016 - Copyright Vivek Anand Authors: Vivek Anand <[email protected]> """ from anitya.lib.backends import BaseBackend, get_versions_by_regex from anitya.lib.exceptions import AnityaPluginException REGEX = 'class="name">([^<]*[^tip])</td' class BitBucketBackend(Ba...
pombredanne/anitya
anitya/lib/backends/bitbucket.py
Python
gpl-2.0
2,631
#!/usr/bin/python import webapp class AcortadorApp(webapp.webApp): Dic = {} Index = 0 Form = '<form name="input" method="post">\nURL: <input type="text" name="URL">\n<input type="submit" value="Enviar">\n</form>' def parse(self, request): lines = request.splitlines() method = lines[0].split(' ')[0] resource...
rodrigobersan/X-Serv-18.1-Practica1
webapp-acortador.py
Python
gpl-2.0
1,938
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('here', '0022_auto_20151222_2207'), ] operations = [ migrations.AddField( model_name='user', name='av...
chenjunqian/here
HereServer-deprecated/here/migrations/0023_user_avatarthumb.py
Python
gpl-2.0
443
from django.conf.urls import url import userprofile.admin urlpatterns = [ url(r'^admin/user/download/$', userprofile.admin.download_view, name='user_list_download'), ]
oriel-hub/api
django/idsapi/userprofile/urls.py
Python
gpl-2.0
182
from nose.tools import assert_not_equal from gcodeutils.tests import open_gcode_file, gcode_eq __author__ = 'olivier' def test_identity_equality(): gcode_eq(open_gcode_file('simple1.gcode'), open_gcode_file('simple1.gcode')) def test_trivial_difference(): assert_not_equal(open_gcode_file('simple1.gcode'),...
zeograd/gcodeutils
gcodeutils/tests/test_equality.py
Python
gpl-2.0
855
from crispy_forms.helper import FormHelper from crispy_forms.layout import Submit from django import forms from models import Player def get_transfer_choices(player_id): players = Player.objects.all() player_list = [('bank', 'Bank')] for player in players: if player.id != player_id: pl...
beneboy/pyopoly-banker
bank/forms.py
Python
gpl-2.0
1,635
#!/usr/bin/python """ English to Piglatin translator It takes a word or a whole sentence from stdin, lower cases it and transforms it then based upon the first character of the given string. """ """ detectWords() Takes a sentence and splits it by searching for whitespaces. input arguments: string - Sentence or...
shitsumon/random_py_stuff
english2piglatin.py
Python
gpl-2.0
4,939
# coding=utf-8 from misc.brain import Brain from core.baseclass import PluginBase from random import random, choice from pkg_resources import resource_filename class MioMarkov(PluginBase): def __init__(self, database, handler): super().__init__(database, handler, 'MioMarkov') self.brain = Brain(r...
DarkMio/RedditRoverPlugins
MioMarkov.py
Python
gpl-2.0
1,846
class Solution(object): # @staticmethod # def makeRect(leftLowerCornerX, leftLowerCornerY, # RightUpperCornerX, RightUpperCornerY): # """ # :type leftLowerCornerX: int # :type leftLowerCornerY: int # :type RightUpperCornerX: int # :type RightUpperCornerY...
TanakritBenz/leetcode-adventure
Rectangle_Area.py
Python
gpl-2.0
2,070
1# this module is populated at initialization from the c++ part of PythonUI """Runtime variables, populated at yade startup.""" # default value hasDisplay=False # find out about which ipython version we use -- 0.10* and 0.11 are supported, but they have different internals import IPython try: # attempt to get numeri...
bchareyre/trial
py/runtime.py
Python
gpl-2.0
684
import sys import os import argparse import re from time import time import boto from boto import ec2 from boto import rds from boto import route53 import ConfigParser from collections import defaultdict try: import json except ImportError: import simplejson as json class Ec2Inventory(object): def _empty...
grizax/AWS-Lambda
describe-EC2instances.py
Python
gpl-2.0
27,681
""" Django settings for moo project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) import...
dwagon/pymoo
moo/moo/settings.py
Python
gpl-2.0
2,358
import numpy as np import sympy as sy import sympy.physics.mechanics as me from sympy.utilities.lambdify import lambdify, implemented_function import itertools from functools import partial import math import pickle picklefile_ode = 'ode.pkl' picklefile_lin = 'lin.pkl' def get_pickled(fname): try: with op...
alfkjartan/pendulum
double_pendulum_symbolic.py
Python
gpl-2.0
30,118
############################################################################### # This file is part of openWNS (open Wireless Network Simulator) # _____________________________________________________________________________ # # Copyright (C) 2004-2007 # Chair of Communication Networks (ComNets) # Kopernikusstr. 5, D-5...
creasyw/IMTAphy
modules/nl/ip/PyConfig/ip/VirtualDHCP.py
Python
gpl-2.0
2,275
import copy from copy import deepcopy as cp class Concordancer: def __init__(self, args): self.args = args self.negations = set([]) self.intervals = [] self.pattern = [] self.indexes = set([]) deduction = 0 for i, (boolean, target) in enumerate(self.args['ta...
JordiCarreraVentura/concordancer
Concordancer.py
Python
gpl-2.0
3,301
# -*- coding: utf-8 -*- # Copyright (c) Pilot Systems and Libération, 2010-2011 # This file is part of SeSQL. # SeSQL 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 # (a...
liberation/sesql
sesql/typemap.py
Python
gpl-2.0
3,541
# -*- coding: utf-8 -*- from hls_server.fields import Field, BasicField user_fields = { 'name': BasicField(title='Pseudonyme', weight=0.8, ftype='char'), 'sexe': BasicField(title='Sexe', weight=0.7, ftype='qcm'), 'firstname': BasicField(title='Prénom', weight=0.2, ftype='char'), 'lastname': BasicFiel...
Nabellaleen/hacklasante_052015
hls_server/user.py
Python
gpl-2.0
2,289
#!/usr/bin/env python3 # - * -coding: utf - 8 - * - import argparse import logging import os import time from tqdm import tqdm import sys def main(): """ It takes in input a variant statistics file ( in output from get.var_stats.py ) and returns how many SNPs heterozygous and homozygous are present usin...
AlgoLab/HapCol
utils/statistics.py
Python
gpl-2.0
5,723
import logging from django import forms from django.contrib.auth import get_user_model from ..bus.models import Route from ..users.models import Email, Grade, Phone, Website logger = logging.getLogger(__name__) class BusRouteForm(forms.Form): def __init__(self, *args, **kwargs): super().__init__(*args,...
tjcsl/ion
intranet/apps/preferences/forms.py
Python
gpl-2.0
5,148
""" Django settings for office project. For more information on this file, see https://docs.djangoproject.com/en/1.6/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.6/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) imp...
ShovanSarker/mango_office
office/settings.py
Python
gpl-2.0
2,569
import filecmp import os import unittest from mascpcr import pipeline, genbankfeatures from ._common import RECODED_GENOME_FP, REFERENCE_GENOME_FP, TEST_OUTPUT_DIR, \ TEST_CACHE_DIR, REFERENCE_GB_STR, RECODED_GB_STR, \ REFERENCE_GB, RECODED_GB class TestPipeline(unittest.Tes...
Wyss/mascpcr
tests/test_pipeline.py
Python
gpl-2.0
2,863
# -*- coding: utf-8 -*- from django.db.models import get_model from django.conf import settings from transifex.resources.signals import post_save_translation from transifex.addons.lotte.signals import lotte_save_translation def save_copyrights(sender, **kwargs): """ Save copyright info for po files. """ ...
hfeeki/transifex
transifex/addons/copyright/handlers.py
Python
gpl-2.0
881
# -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*- # vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 # # MDAnalysis --- https://www.mdanalysis.org # Copyright (c) 2006-2017 The MDAnalysis Development Team and contributors # (see the file AUTHORS for the full list of names) # # Released under t...
MDAnalysis/mdanalysis
package/MDAnalysis/lib/__init__.py
Python
gpl-2.0
1,706
import numpy as np def my_funct(t): p = np.sin(t) + 2*np.sin(2*t) + 7*np.sin(22*t)+30*np.sin(50*t) return p
algebrato/Exercise
FFT/funct.py
Python
gpl-2.0
120
# # # Copyright (C) 2008, 2009, 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 progr...
ekohl/ganeti
lib/hypervisor/hv_kvm.py
Python
gpl-2.0
44,067
import os N_FILTERS = [1, 2, 5, 10, 20, 32] KERNEL_SIZE = [2, 4, 6, 8] SUBSAMPLE = [2, 3, 4, 5] for filter_size in N_FILTERS: for kernel in KERNEL_SIZE: for sampling in SUBSAMPLE: yaml_file = open('yaml/convolutional_net2.yaml', 'r') yaml = yaml_file.read() ...
saahil/MSSegmentation
conv_train.py
Python
gpl-2.0
1,381
# -*- coding: iso-8859-1 -*- #------------------------------------------------------------ # tvalacarta - XBMC Plugin # Canal para Plus TV # http://blog.tvalacarta.info/plugin-xbmc/tvalacarta/ #------------------------------------------------------------ import urlparse,urllib2,urllib,re import os import sys import xb...
titienmiami/mmc.repository
plugin.video.tvalacarta/tvalacarta/channels/plus.py
Python
gpl-2.0
11,175
import mmap, struct, cPickle, threading, platform import numpy as np LOCAL = threading.local() LOCAL.storage = None pypy = platform.python_implementation() == 'PyPy' if pypy: import cffi ffi = cffi.FFI() ffi.cdef('typedef size_t off_t;') ffi.cdef('void *mmap(void *addr, size_t length, int prot, int f...
Victorian-Bioinformatics-Consortium/nesoni
nesoni/storage.py
Python
gpl-2.0
5,763
from json import loads class DescribeCommonActionTestCase(object): def test_description_is_updated(self): self.client.add_fake_response({}) self.client.parse_args([self.subcommand, 'res', 'describe', 'This is my description']) assert len(self.client.submitt...
jexhson/rbx
tests/base_action_describe.py
Python
gpl-2.0
590
#qpy:kivy #qpy:2 #-*-coding:utf8;-*- import random from kivy.app import App from kivy.uix.widget import Widget from kivy.graphics import Rectangle, Color from kivy.clock import Clock from kivy.uix.boxlayout import BoxLayout from kivy.uix.label import Label from kivy.uix.popup import Popup from kivy.uix.button import ...
zopo803/python-tetris
main.py
Python
gpl-2.0
28,053
# # Copyright (C) 2003-2005 Norwegian University of Science and Technology # Copyright (C) 2008-2013 UNINETT AS # # This file is part of Network Administration Visualized (NAV). # # NAV is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License version 2 as published ...
sigmunau/nav
python/nav/web/report/views.py
Python
gpl-2.0
16,385
#! /usr/bin/env python # -*- coding: utf-8 -*- ''' file generate_contributions.py This file is part of LyX, the document processor. Licence details can be found in the file COPYING. author Angus Leeming Full author contact details are available in file CREDITS This script both stores and manipulates the raw data nee...
apex-hughin/LyX
lib/generate_contributions.py
Python
gpl-2.0
68,489
import os import jsonrpc import socket from library import configure from svnup import update from invalidate import invalidate from catalog import index from sensible.loginit import logger log = logger(os.path.basename(__file__)) class Dispatcher(object): def __init__(self, broker_url): self.br...
viswimmer1/PythonGenerator
data/python_files/29592144/dispatch.py
Python
gpl-2.0
1,504
import tarfile import os.path def make_tarfile(output_filename, source_dir): with tarfile.open(output_filename, "w:gz") as tar: tar.add(source_dir, arcname=os.path.basename(source_dir)) def extract (file, location): print(location) tar = tarfile.open(file) tar.extractall(lo...
semitable/g2b
tar_interface.py
Python
gpl-2.0
329
#CHIPSEC: Platform Security Assessment Framework #Copyright (c) 2010-2015, Intel Corporation # #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; Version 2. # #This program is distributed in t...
naterh/chipsec
tools/edk2/PythonEFI/build/compilePythonEDK2.py
Python
gpl-2.0
9,081
from game import Game from console_user_interface import take_user_choice, user_input, output_prompt from sqlalchemy import create_engine from sqlalchemy.orm import Session from create_db import User from getpass import getpass import re def start_menu(session): options = {"sign_in": sign_in, "regi...
valentina-zhekova/Yin-VS-Yang-Game-For-FMI-Python-Course
gameplay.py
Python
gpl-2.0
10,362
#!/usr/bin/python # -*- coding: utf-8 -*- # Pardus Desktop Services # Copyright (C) 2010, TUBITAK/UEKAE # 2010 - Gökmen Göksel <gokmen:pardus.org.tr> # 2010 - H. İbrahim Güngör <ibrahim:pardus.org.tr> # 2011 - Comak Developers <comak:pardus.org.tr> # This program is free software; you can redistribute it and/or modif...
Pardus-Linux/pds
pds/__init__.py
Python
gpl-2.0
7,554
# encoding: utf-8 # module apt_pkg # from /usr/lib/python2.7/dist-packages/apt_pkg.so # by generator 1.135 """ Classes and functions wrapping the apt-pkg library. The apt_pkg module provides several classes and functions for accessing the functionality provided by the apt-pkg library. Typical uses might include readin...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/apt_pkg/Hashes.py
Python
gpl-2.0
1,533
# Copyright (C) 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 distributed in...
msimacek/koschei
koschei/data.py
Python
gpl-2.0
10,829
# # Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved. # # 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; version 2 of the License. # # This program is distributed in th...
ioggstream/mysql-utilities
mysql/utilities/command/indexcheck.py
Python
gpl-2.0
7,144
#!/usr/bin/env python #coding: utf-8 #Filename: try_except.py import sys try: s = raw_input('Enter something -->') except EOFError: print '\nWhy did you do an EOF on me?' sys.exit() except: print '\nSome error/exception occured.' print 'Done'
daya-prac/Python-prac
python/try_except.py
Python
gpl-2.0
261
from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib import admin from django.conf import settings from kirt.settings import LOGIN_URL """ All the URLs that can be possibly called by user are working here. """ urlpatterns = patterns('', url(r'^account...
KamalKaur/kirt
kirt/urls.py
Python
gpl-2.0
1,433
#!/usr/bin/python3 import gi gi.require_version('Gtk', '3.0') from gi.repository import Gio, Gtk, GObject, Gdk from GSettingsWidgets import * class Module: name = "windows" category = "prefs" comment = _("Manage window preferences") def __init__(self, content_box): keywords = _("windows, ti...
collinss/Cinnamon
files/usr/share/cinnamon/cinnamon-settings/modules/cs_windows.py
Python
gpl-2.0
12,390
# Author: Hannah Brock from agent import WumpusAgent from knowledge_base import KnowledgeBase class LogicalAgent(WumpusAgent): """Implementation of a logcial wumpus agent""" def __init__(self): self.kb = KnowledgeBase() def get_action(self, percept): """See WumpusAgent.get_action for fur...
hjbrock/AI-trials
wumpus-world-first-step/agents/logical_agent.py
Python
gpl-2.0
644
import pythonlab import agros2d import scipy.io as sio import numpy as np from test_suite.scenario import Agros2DTestCase from test_suite.scenario import Agros2DTestResult class TestInternalMatrixSolvers(Agros2DTestCase): @classmethod def setUpClass(self): # store state self.save_matrix_and_...
hpfem/agros2d
resources/test/test_suite/core/matrix_solvers.py
Python
gpl-2.0
8,536
#!/usr/bin/python # -*- coding: utf-8 -*- from yapsy.IPlugin import IPlugin from PyQt4 import QtCore, QtGui from threading import Thread, RLock import websocket import csv import time #l = RLock(False) class ListenWebsocket(QtCore.QThread): def __init__(self, parent=None, adress = None): super(ListenWeb...
roman-dvorak/TelescopeTools-extensions
RA_HBSTEP_driver/RA_HBSTEP_driver.py
Python
gpl-2.0
21,395
from scipy.io import wavfile import bark, os def dat_from_wav(wav, barkname, **attrs): rate, data = wavfile.read(wav) return bark.write_sampled(barkname, data, rate,**attrs) def _main(): ''' Function for getting commandline args.''' import argparse p = argparse.ArgumentParser(description=''' ...
gfetterman/bark
bark/io/datfromwav.py
Python
gpl-2.0
910
# -*- coding: utf-8 -*- # # # TheVirtualBrain-Framework Package. This package holds all Data Management, and # Web-UI helpful to run brain-simulations. To use it, you also need do download # TheVirtualBrain-Scientific Package (for simulators). See content of the # documentation-folder for more details. See also http:/...
rajul/tvb-framework
tvb/tests/framework/interfaces/web/controllers/burst_controller_test.py
Python
gpl-2.0
15,161
############### # Brian Burns # MATH 238 # x' = ax + by, y' = cx + dy # system.py ############### import sys import math import sympy as sy def main(): # make sure we have enough arguments if len(sys.argv) != 5: print("Usage: \"python system.py [a] [b] [c] [d]\"") sys.exit(0) # grab the ...
brnbrns/DifferentialEquations
system.py
Python
gpl-2.0
891
from jira.client import JIRA from jira.client import GreenHopper from optparse import OptionParser import time __author__ = 'mattdyer' #this class manages creating the individual issues that we are parsing from a file class IssueManager: ## The constructor # @param self The object pointer # @param optio...
dyermd/legos
scripts/add_story_to_jira.py
Python
gpl-2.0
7,685
########################################################################## # # # cp.py # # by Shane # # ...
shaneatdit/OOP
cp.py
Python
gpl-2.0
855
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('dept', '0003_auto_20150518_0845'), ] operations = [ migrations.AddField( model_name='department', na...
bpain2010/kgecweb
dept/migrations/0004_department_deptintake.py
Python
gpl-2.0
405
# -*- coding: utf-8 -*- """ /*************************************************************************** A QGIS plugin CaigosConnector: Connect CAIGOS-GIS with QGIS copyright : (C) 2019 by EZUSoft email : qgis (at) makobo.de ********************************************...
EZUSoft/CaigosConnector
fnc4CaigosConnector.py
Python
gpl-2.0
2,684
# -*- coding: utf-8 -*- # Copyright 2018-2021 Mike Fährmann # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. """Execute processes""" from .common import PostProcessor from .. impor...
mikf/gallery-dl
gallery_dl/postprocessor/exec.py
Python
gpl-2.0
2,293
""" Constants used in ABED """ #: Default filename for the abed config file. CONFIG_FILENAME = "abed_conf.py" #: Default dataset directory name DATASET_DIRNAME = "datasets" #: Default executables directory name EXECS_DIRNAME = "execs" #: Default tasksfile filename TASKS_FILENAME = "abed_tasks.txt" #: Default auto...
GjjvdBurg/ABED
abed/constants.py
Python
gpl-2.0
362
# Copyright (C) 2013 Stanislav Golovanov <[email protected]> # Google Inc. # # This file is part of ycmd. # # ycmd 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...
NorfairKing/sus-depot
shared/shared/vim/dotvim/bundle/YouCompleteMe/third_party/ycmd/ycmd/completers/general/general_completer_store.py
Python
gpl-2.0
3,879
"""Multiple-producer-multiple-consumer signal-dispatching dispatcher is the core of the PyDispatcher system, providing the primary API and the core logic for the system. Module attributes of note: Any -- Singleton used to signal either "Any Sender" or "Any Signal". See documentation of the _Any class. Anonymous...
fregaham/DISP
sqlobject/include/pydispatch/dispatcher.py
Python
gpl-2.0
14,593
from django.contrib.auth import get_user_model from django.utils.translation import ugettext_lazy as _ from django.utils.translation import ungettext from misago.conf import settings from misago.core import forms from ..models import AUTO_SUBSCRIBE_CHOICES, PRIVATE_THREAD_INVITES_LIMITS_CHOICES from ..validators impo...
1905410/Misago
misago/users/forms/options.py
Python
gpl-2.0
2,957
#!/usr/bin/env python #coding=utf8 ''' Given integers n and k, find the lexicographically k-th smallest integer in the range from 1 to n. Note: 1 ≤ k ≤ n ≤ 109. Example: Input: n: 13 k: 2 Output: 10 Explanation: The lexicographical order is [1, 10, 11, 12, 13, 2, 3, 4, 5, 6, 7, 8, 9], so the second smallest num...
mornsun/javascratch
src/topcoder.py/LC_440_K-th_Smallest_in_Lexicographical_Order.py
Python
gpl-2.0
3,037
# -*- coding: utf-8 # Several spheres falling down into the box. # Their weight is measured and compares with real mass particles from yade import utils,pack,export,geom tc=0.001 en=.003 es=.003 frictionAngle=radians(35) density=2300 params=utils.getViscoelasticFromSpheresInteraction(tc,en,es) defMat=O.materials.ap...
ThomasSweijen/yadesolute2
scripts/checks-and-tests/checks/checkWeight.py
Python
gpl-2.0
1,385
# -*- coding: utf-8 -*- # Dropbox appModule for NVDA # Improves accessibility of the Dropbox Metro app for Windows 8 # Copyright (C) 2015 Filaos, Patrick ZAJDA <[email protected]> and other contributors # Windows 8 compatibility contributed by David Parduhn <[email protected]> # This file is covered by the GNU General Pub...
pzajda/dropbox
addon/appModules/dropbox.py
Python
gpl-2.0
1,581
# -*- coding: utf-8 -*- # copyright (C) 2006 Marek Schmidt # 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 prog...
fregaham/DISP
disp/application.py
Python
gpl-2.0
3,611
""" User management tests package. """ from seleniumTests.tests.userManagement.addUser import AddUser TESTS_TO_RUN = [ AddUser ]
allembedded/t-case-mx
unitTest/seleniumTests/tests/userManagement/__init__.py
Python
gpl-2.0
133
import coverage from unittest import TextTestRunner, TestLoader from os.path import split, join, abspath from os import chdir if __name__ == "__main__": project_dir = split(split(abspath(__file__))[0])[0] chdir(project_dir) cov = coverage.coverage(branch=True) cov.start() suite = TestLoader().disco...
mkli90/Taz
bin/runcoverage.py
Python
gpl-2.0
447