Skip to content

Instantly share code, notes, and snippets.

"""
An example of the determinism of pymunk by coloring balls according to their
position, and then respawning them to verify each ball ends up in the same
place. Inspired by Pymunk user Nam Dao.
"""
import os
import random
from os.path import join
from pythonforandroid.recipe import CompiledComponentsPythonRecipe
class PymunkRecipe(CompiledComponentsPythonRecipe):
name = "pymunk"
version = "6.0.0"
url = "https://pypi.python.org/packages/source/p/pymunk/pymunk-{version}.zip"
depends = ["cffi", "setuptools"]
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@viblo
viblo / run.bat
Last active June 27, 2018 15:30
Metabase config for Azure web app
set MB_JETTY_PORT=%MB_JETTY_PORT: =%
"%JAVA_HOME%\bin\java.exe" -Djava.net.preferIPv4Stack=true -jar ./metabase.jar
@viblo
viblo / __init__.py
Last active February 25, 2017 16:20
pymunk p4a recipe
from pythonforandroid.toolchain import PythonRecipe
from pythonforandroid.recipe import CompiledComponentsPythonRecipe
import os.path
class PymunkRecipe(CompiledComponentsPythonRecipe):
name = "pymunk"
version = '5.1.0'
url = 'https://pypi.python.org/packages/6e/c3/ac05e3309dc4b4a2f450822fa0de569bf5fe40f57a56e009319f99636955/pymunk-{version}.zip'
import os, os.path
import platform
import sys
from distutils.command.build_ext import build_ext
import distutils.ccompiler as cc
from setuptools import Extension
from setuptools import setup
def get_arch():
import time
import pyglet
import pymunk
import pymunk.pyglet_util
import sys
window = pyglet.window.Window(width = 800, height = 600)
space = pymunk.Space()
space.gravity = 0, -980
"""This module contain functions used to load the chipmunk dll/lib file"""
__version__ = "$Id$"
import os.path
import platform
import sys, imp, os
import ctypes
def platform_specific_functions():
# use stddecl on windows, cdecl on all other platforms
@viblo
viblo / gist:7409083
Last active December 27, 2015 23:49
global response object with swagger
package main
import (
"log"
"net/http"
"github.com/emicklei/go-restful"
"github.com/emicklei/go-restful/swagger"
)
@viblo
viblo / gist:7407666
Created November 11, 2013 04:06
swagger models problem
package main
import (
"log"
"net/http"
"github.com/emicklei/go-restful"
"github.com/emicklei/go-restful/swagger"
)
type User struct {