code
stringlengths
1
1.72M
language
stringclasses
1 value
#!/usr/bin/python import os, sys _PROJECT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, _PROJECT_DIR) sys.path.insert(0, os.path.dirname(_PROJECT_DIR)) _PROJECT_NAME = _PROJECT_DIR.split('/')[-1] os.environ['DJANGO_SETTINGS_MODULE'] = "%s.settings" % _PROJECT_NAME from django.c...
Python
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "miniupload.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
Python
from miniupload.models import * from django.contrib import admin admin.site.register(package) admin.site.register(user)
Python
# -.- coding: utf-8 -.- from django.shortcuts import render_to_response from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse from forms import SendingForm from models import user, package from django.template import RequestContext import urllib, urllib2 import tweepy import setting...
Python
from django.db import models from django.core.files.storage import FileSystemStorage from django.conf import settings from django.contrib.auth.models import User from django.utils.translation import ugettext_lazy as _ fs = FileSystemStorage(location = settings.BASE_DIR) class user(models.Model): user = models.OneTo...
Python
# -.- coding: utf-8 -.- from django import forms from models import * class SendingForm(forms.ModelForm): class Meta: model = package fields = ('comment','package') def save(self, destinatario, sendr): #Pedimos a twitter el id del receptor en base a su nombre try: recvr = user.objects.get(id_twitter=des...
Python
# Django settings for miniupload project. import os.path DEBUG = True TEMPLATE_DEBUG = DEBUG BASE_DIR = os.path.normpath(os.path.dirname(__file__)) ADMINS = ( # ('Pelayo', 'phazonius@gmail.com'), ) # KEY y SECRET de nuestra aplicación facilitado por Twitter. TWITTER_KEY = 'MgcoF6aTNnlosQV28OA' TWITTER_SECRET = 'Nv...
Python
""" WSGI config for miniupload 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...
Python
from django.conf.urls import patterns, include, url from django.conf import settings # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', 'miniupload.views.home', name='home'), # Uncomment the admin/do...
Python
#!/usr/bin/python a, b = 0, 1 while b < 1000: print b a, b = b, a+b
Python
#!/usr/bin/python a, b = 0, 1 while b < 1000: print b a, b = b, a+b
Python
#!/usr/bin/env python """ackermann_controller.py Control the wheels of a vehicle with Ackermann steering. Subscribed Topics: ackermann_cmd (ackermann_msgs/AckermannDriveStamped) Ackermann command. It contains the vehicle's desired speed and steering angle. Published Topics: <left steering co...
Python
#!/usr/bin/env python """ackermann_controller.py Control the wheels of a vehicle with Ackermann steering. Subscribed Topics: ackermann_cmd (ackermann_msgs/AckermannDriveStamped) Ackermann command. It contains the vehicle's desired speed and steering angle. Published Topics: <left steering co...
Python
#!/usr/bin/python from math import sqrt from sys import stderr wp = [(0.0, 0.0), (5.0, 5.0), (7.0, 2.0), (4.0, 1.0)] def plot(f1=['plot']): f2 = f1[0] f1[0] = 'replot' return f2 def length(v): return sqrt(v[0] ** 2 + v[1] ** 2) def normalize(v): magnitude = length(v) return (v[0] / magnitud...
Python
#!/usr/bin/python from math import sqrt from sys import stderr wp = [(0.0, 0.0), (5.0, 5.0), (7.0, 2.0), (4.0, 1.0)] def plot(f1=['plot']): f2 = f1[0] f1[0] = 'replot' return f2 def length(v): return sqrt(v[0] ** 2 + v[1] ** 2) def normalize(v): magnitude = length(v) return (v[0] / magnitud...
Python
#!/usr/bin/python3 import sys from Segment import * from Waypoint import * def plot(f1=['plot']): f2 = f1[0] f1[0] = 'replot' return f2 with open(sys.argv[1], 'r') as f: s = f.read().strip() waypoints = parse_waypoints(s) min_X = min([ wp.axis[X].loc for wp in waypoints ]) - 1 max_X = max([ wp.axis[...
Python
#!/usr/bin/python3 import sys from Segment import * from Waypoint import * def plot(f1=['plot']): f2 = f1[0] f1[0] = 'replot' return f2 with open(sys.argv[1], 'r') as f: s = f.read().strip() waypoints = parse_waypoints(s) min_X = min([ wp.axis[X].loc for wp in waypoints ]) - 1 max_X = max([ wp.axis[...
Python
#!/usr/bin/python3 import math, re, sys from Waypoint import * def magnitude(vector): return math.sqrt(vector[X] ** 2 + vector[Y] ** 2) # Create a list of waypoints from the command-line arguments. state = X waypoints = [] prev = None tokens = [token.strip() for arg in sys.argv[1:] for token in re.sp...
Python
X = 0 Y = 1 class QuinticSegment: def __init__(self): self.P0 = None self.P1 = None self.P2 = None self.P3 = None self.P4 = None self.P5 = None def __str__(self): return '[P0:{0}, P1:{1}, P2:{2}, P3:{3}, P4:{4}, P5:{5}]'.\ format(str(sel...
Python
import re X = 0 Y = 1 class Axis: def __init__(self): self.loc = None self.d1 = None self.d2 = None def __str__(self): return '[loc:{0} d1:{1} d2:{2}]'.\ format(str(self.loc), str(self.d1), str(self.d2)) class Waypoint: def __init__(self): self.axi...
Python
#!/usr/bin/python3 import math, re, sys from Waypoint import * def magnitude(vector): return math.sqrt(vector[X] ** 2 + vector[Y] ** 2) # Create a list of waypoints from the command-line arguments. state = X waypoints = [] prev = None tokens = [token.strip() for arg in sys.argv[1:] for token in re.sp...
Python
#!/usr/bin/python from math import sqrt from sys import stderr wp = [(0.0, 0.0), (2.0, 4.0), (5.0, 2.0)] def length(v): return sqrt(v[0] ** 2 + v[1] ** 2) def normalize(v): magnitude = length(v) return (v[0] / magnitude, v[1] / magnitude) # d1s d1s = [((wp[len(wp) - 1][0] - wp[len(wp) - 2][0]) / 2.0, ...
Python
#!/usr/bin/python from math import sqrt from sys import stderr wp = [(0.0, 0.0), (2.0, 4.0), (5.0, 2.0)] def length(v): return sqrt(v[0] ** 2 + v[1] ** 2) def normalize(v): magnitude = length(v) return (v[0] / magnitude, v[1] / magnitude) # d1s d1s = [((wp[len(wp) - 1][0] - wp[len(wp) - 2][0]) / 2.0, ...
Python
#!/usr/bin/python from math import sqrt from sys import argv def segment(x): y = dy / dx * x + b return y def dist(x0, y0, f, x): y = f(x) d = sqrt((x - x0) ** 2 + (y - y0) ** 2) return d def hill_climb(x, delta, f): y0 = f(x - delta) y1 = f(x) y2 = f(x + delta) if y0 < y1: ...
Python
#!/usr/bin/python from math import sqrt from sys import argv def segment(x): y = dy / dx * x + b return y def dist(x0, y0, f, x): y = f(x) d = sqrt((x - x0) ** 2 + (y - y0) ** 2) return d def hill_climb(x, delta, f): y0 = f(x - delta) y1 = f(x) y2 = f(x + delta) if y0 < y1: ...
Python
#!/usr/bin/python from math import sqrt from sys import argv def segment(x): y = dy / dx * x + b return y def dist(x0, y0, f, x): y = f(x) d = sqrt((x - x0) ** 2 + (y - y0) ** 2) return d def quadratic_optimization(x1, x2, x3, f): for i in range(1, 5): y1 = f(x1) y2 = f(x2) ...
Python
#!/usr/bin/python from math import sqrt from sys import argv def segment(x): y = dy / dx * x + b return y def dist(x0, y0, f, x): y = f(x) d = sqrt((x - x0) ** 2 + (y - y0) ** 2) return d def quadratic_optimization(x1, x2, x3, f): for i in range(1, 5): y1 = f(x1) y2 = f(x2) ...
Python
#!/usr/bin/python import numpy as np import cv2 from matplotlib import pyplot as plt def find_center(image, keypoints): min_y, min_x = image.shape max_y, max_x = (0, 0) for kp in keypoints: min_x, max_x = min(min_x, kp.pt[0]), max(max_x, kp.pt[0]) min_y, max_y = min(min_y, kp.pt[1]), max(m...
Python
#!/usr/bin/python import sys import math # a, b, and c are lengths of the triangle sides. d is the distance, # or delta, from "straight ahead" vs the location of the car. f is # the camera's focal distance. This code assumes that d has the same # units as f, and I still need to figure out how to make that happen. ...
Python
#!/usr/bin/python import sys import math # a, b, and c are lengths of the triangle sides. d is the distance, # or delta, from "straight ahead" vs the location of the car. f is # the camera's focal distance. This code assumes that d has the same # units as f, and I still need to figure out how to make that happen. ...
Python
#!/usr/bin/python import numpy as np import cv2 from matplotlib import pyplot as plt def find_center(image, keypoints): min_y, min_x = image.shape max_y, max_x = (0, 0) for kp in keypoints: min_x, max_x = min(min_x, kp.pt[0]), max(max_x, kp.pt[0]) min_y, max_y = min(min_y, kp.pt[1]), max(m...
Python
import os from setuptools import setup from distutils.extension import Extension import sys if 'setuptools.extension' in sys.modules: m = sys.modules['setuptools.extension'] m.Extension.__dict__ = m._Extension.__dict__ def read(fname): return open(os.path.join(os.path.dirname(__file__), fname)).read() C...
Python
#!/usr/bin/env python2.6 import sys from time import clock from p2t import * # PyGame Constants import pygame from pygame.gfxdraw import trigon, line from pygame.locals import * from pygame import Color head_hole = [[325, 437],[320, 423], [329, 413], [332, 423]] chest_hole = [[320.72342,480],[338.90617,465.96863],[...
Python
CPP_SOURCES = """./poly2tri/common/shapes.cc ./poly2tri/sweep/advancing_front.cc ./poly2tri/sweep/cdt.cc ./poly2tri/sweep/sweep.cc ./poly2tri/sweep/sweep_context.cc""".split("\n")
Python
#!/usr/bin/env python """Universal feed parser Handles RSS 0.9x, RSS 1.0, RSS 2.0, CDF, Atom 0.3, and Atom 1.0 feeds Visit http://feedparser.org/ for the latest version Visit http://feedparser.org/docs/ for the latest documentation Required: Python 2.1 or later Recommended: Python 2.3 or later Recommended: CJKCodecs...
Python
#!/usr/bin/env python # # Copyright 2008 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
""" Implementation of JSONDecoder """ import re import sys import struct from simplejson.scanner import make_scanner try: from simplejson._speedups import scanstring as c_scanstring except ImportError: c_scanstring = None FLAGS = re.VERBOSE | re.MULTILINE | re.DOTALL def _floatconstants(): _BYTES = '7FF8...
Python
""" JSON token scanner """ import re try: from simplejson._speedups import make_scanner as c_make_scanner except ImportError: c_make_scanner = None __all__ = ['make_scanner'] NUMBER_RE = re.compile( r'(-?(?:0|[1-9]\d*))(\.\d+)?([eE][-+]?\d+)?', (re.VERBOSE | re.MULTILINE | re.DOTALL)) def py_make_sca...
Python
import unittest import doctest def additional_tests(): import simplejson import simplejson.encoder import simplejson.decoder suite = unittest.TestSuite() for mod in (simplejson, simplejson.encoder, simplejson.decoder): suite.addTest(doctest.DocTestSuite(mod)) suite.addTest(doctest.DocFi...
Python
""" Implementation of JSONEncoder """ import re try: from simplejson._speedups import encode_basestring_ascii as c_encode_basestring_ascii except ImportError: c_encode_basestring_ascii = None try: from simplejson._speedups import make_encoder as c_make_encoder except ImportError: c_make_encoder = None ...
Python
r""" A simple, fast, extensible JSON encoder and decoder JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. simplejson exposes an API familiar to uses of the standard library marshal and pickle modules. Encoding b...
Python
r""" Using simplejson from the shell to validate and pretty-print:: $ echo '{"json":"obj"}' | python -msimplejson { "json": "obj" } $ echo '{ 1.2:3.4}' | python -msimplejson Expecting property name: line 1 column 2 (char 2) Note that the JSON produced by this module's default settings ...
Python
#!/usr/bin/env python js = open('bookmarklet.min.js').read() config = open('bookmarklet_config.template').read() print config % {'bookmarklet_min_js': js}
Python
#!/usr/bin/python # This code is original from jsmin by Douglas Crockford, it was translated to # Python by Baruch Even. The original code had the following copyright and # license. # # /* jsmin.c # 2007-05-22 # # Copyright (c) 2002 Douglas Crockford (www.crockford.com) # # Permission is hereby granted, free of ch...
Python
#!/usr/bin/env python # # Copyright 2010 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/env python # # Copyright 2010 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/env python js = open('bookmarklet.min.js').read() config = open('bookmarklet_config.template').read() print config % {'bookmarklet_min_js': js}
Python
#!/usr/bin/python # This code is original from jsmin by Douglas Crockford, it was translated to # Python by Baruch Even. The original code had the following copyright and # license. # # /* jsmin.c # 2007-05-22 # # Copyright (c) 2002 Douglas Crockford (www.crockford.com) # # Permission is hereby granted, free of ch...
Python
#!/usr/bin/env python # # Copyright 2010 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/env python # # Copyright 2008 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/env python """THIS IS AN EMPTY FILE."""
Python
#!/usr/bin/env python # # Copyright 2008 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/env python # # Copyright 2009 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/env python # # Copyright 2009 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/env python # # Copyright 2008 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/env python # # Copyright 2009 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/env python # # Copyright 2009 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/env python # # Copyright 2008 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/env python # # Copyright 2009 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/env python # # Copyright 2010 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/env python # # Copyright 2009 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/env python # # Copyright 2009 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/env python # # Copyright 2008 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/env python # # Copyright 2009 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/env python # # Copyright 2009 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/env python # # Copyright 2007 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/env python # # Copyright 2010 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/env python # # Copyright 2010 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/env python # # Copyright 2009 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/env python # # Copyright 2009 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/env python # # Copyright 2009 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/env python # # Copyright 2009 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#!/usr/bin/env python # # Copyright 2009 Google Inc. # # 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.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
Python
#==================================================================== # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you ...
Python
from setuptools import setup from abcesac import __version__ as version setup( name="abc2esac", version=version, description="abc2esac is an ABC to EsAC music format converter", license='GPLv3', author="Marcus Weseloh", author_email="mawe42@gmail.com", url="http://abc2esac.googlecode.com/"...
Python
#!/usr/bin/env python """ ================================================================================ abc2esac - ABC to EsAC conversion Copyright (C) 2010, Marcus Weseloh This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as ...
Python
#!/usr/bin/env python """ ================================================================================ abc2esac - ABC to EsAC conversion Copyright (C) 2010, Marcus Weseloh This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as ...
Python
import unittest from abcesac.tests.parser import * from abcesac.tests.music import * from abcesac.tests.grouper import * if __name__ == '__main__': unittest.main()
Python
import unittest from fractions import Fraction as F from abcesac.music import * class KeyTestCase(unittest.TestCase): def test_get_notes(self): got = Key('C').get_notes() want = ['C','D','E','F','G','A','B'] self.assertEquals(got, want) got = Key('D').get_notes() want = [...
Python
import unittest import math import os import difflib import sys from fractions import Fraction as F from abcesac import abc_to_esac from abcesac.parser import ABCParser from abcesac.music import Song from abcesac.grouper import TemperleyGrouper class TemperleyGrouperTestCase(unittest.TestCase): def test_grouper(...
Python
import unittest import difflib import sys from fractions import Fraction as F from abcesac import abc_to_esac from abcesac.parser import ABCParser from abcesac.music import Song class ParseABCHeaderTestCase(unittest.TestCase): def setUp(self): self.song = Song() self.parser = ABCParser(self.song) ...
Python
""" ================================================================================ abc2esac - ABC to EsAC conversion Copyright (C) 2010, Marcus Weseloh 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 Fr...
Python
""" ================================================================================ abc2esac - ABC to EsAC conversion Copyright (C) 2010, Marcus Weseloh 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 Fr...
Python
""" ================================================================================ abc2esac - ABC to EsAC conversion Copyright (C) 2010, Marcus Weseloh 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 Fr...
Python
""" ================================================================================ abc2esac - ABC to EsAC conversion Copyright (C) 2010, Marcus Weseloh 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 Fr...
Python
""" ================================================================================ abc2esac - ABC to EsAC conversion Copyright (C) 2010, Marcus Weseloh 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 Fr...
Python
from setuptools import setup from abcesac import __version__ as version setup( name="abc2esac", version=version, description="abc2esac is an ABC to EsAC music format converter", license='GPLv3', author="Marcus Weseloh", author_email="mawe42@gmail.com", url="http://abc2esac.googlecode.com/"...
Python
#!/usr/bin/env python """ ================================================================================ abc2esac - ABC to EsAC conversion Copyright (C) 2010, Marcus Weseloh This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as ...
Python
#!/usr/bin/env python """ ================================================================================ abc2esac - ABC to EsAC conversion Copyright (C) 2010, Marcus Weseloh This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as ...
Python
import unittest from abcesac.tests.parser import * from abcesac.tests.music import * from abcesac.tests.grouper import * if __name__ == '__main__': unittest.main()
Python
import unittest from fractions import Fraction as F from abcesac.music import * class KeyTestCase(unittest.TestCase): def test_get_notes(self): got = Key('C').get_notes() want = ['C','D','E','F','G','A','B'] self.assertEquals(got, want) got = Key('D').get_notes() want = [...
Python
import unittest import math import os import difflib import sys from fractions import Fraction as F from abcesac import abc_to_esac from abcesac.parser import ABCParser from abcesac.music import Song from abcesac.grouper import TemperleyGrouper class TemperleyGrouperTestCase(unittest.TestCase): def test_grouper(...
Python
import unittest import difflib import sys from fractions import Fraction as F from abcesac import abc_to_esac from abcesac.parser import ABCParser from abcesac.music import Song class ParseABCHeaderTestCase(unittest.TestCase): def setUp(self): self.song = Song() self.parser = ABCParser(self.song) ...
Python
""" ================================================================================ abc2esac - ABC to EsAC conversion Copyright (C) 2010, Marcus Weseloh 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 Fr...
Python
""" ================================================================================ abc2esac - ABC to EsAC conversion Copyright (C) 2010, Marcus Weseloh 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 Fr...
Python
""" ================================================================================ abc2esac - ABC to EsAC conversion Copyright (C) 2010, Marcus Weseloh 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 Fr...
Python
""" ================================================================================ abc2esac - ABC to EsAC conversion Copyright (C) 2010, Marcus Weseloh 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 Fr...
Python
""" ================================================================================ abc2esac - ABC to EsAC conversion Copyright (C) 2010, Marcus Weseloh 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 Fr...
Python
## R-tree. # see doc/ref/r-tree-clustering-split-algo.pdf MAXCHILDREN=10 MAX_KMEANS=5 import math, random, sys import time import array from rect import Rect, union_all, NullRect class RTree(object): def __init__(self): self.count = 0 self.stats = { "overflow_f" : 0, "avg...
Python
#!/usr/bin/env python # quick'n'dirty benchmark viewer. import pylab as pl import sys, csv if (__name__ == "__main__"): file_counts = len(sys.argv) - 1 def pos(row,col): rr= (row * file_counts) + col return rr + 1 for (column_number, filename) in enumerate(sys.argv[1:]): ...
Python