Day job: Technologist @ Local Projects
Favorite Python project: Requests
Favorite Conference: Eyeo Festival
Python Experience Level: Intermediate
Day job: Technologist @ Local Projects
Favorite Python project: Requests
Favorite Conference: Eyeo Festival
Python Experience Level: Intermediate
def before_filter(*args, **kwargs): | |
print "before" | |
def after_filter(*args, **kwargs): | |
print "after" | |
class Controller(object) | |
@RequestFilter(before=[before_filter], after=[after_filter]) | |
def GET(self): | |
return "Hello!" |
import settings | |
from django.core.management.base import BaseCommand | |
from subprocess import call | |
class Command(BaseCommand): | |
def _is_project_app(self, app_name): | |
return not 'django' in app_name and not 'south' in app_name | |
def handle(self, *args, **options): |
package net.nobien.cloudfoundry.example.config.database | |
import java.net.UnknownHostException; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.beans.factory.annotation.Value; | |
import org.springframework.context.annotation.Bean; | |
import org.springframework.context.annotation.Configuration; |
package net.nobien.cloudfoundry.example.config; | |
import java.util.Properties; | |
import org.cloudfoundry.runtime.env.CloudEnvironment; | |
import org.cloudfoundry.runtime.env.CloudEnvironmentPropertiesFactoryBean; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.context.ApplicationContextInitializer; | |
import org.springframework.core.env.ConfigurableEnvironment; |
package | |
{ | |
import flash.display.DisplayObject; | |
import flash.utils.getQualifiedClassName; | |
import nl.demonsters.debugger.MonsterDebugger; | |
/** | |
* The Out class is the application's logger console proxy. All messages are sent to a running | |
* instance of De MonsterDebugger. | |
* @see http://www.demonsterdebugger.com/ |
<!-- Compiles the unit tests and runs the FlexUnit task to analyze the results. --> | |
<target name="run-test" depends="init,run-flexunit"> | |
<if> | |
<equals arg1="${flexunit.failed}" arg2="true" /> | |
<then> | |
<fail message="Unit tests failed." /> | |
</then> | |
</if> | |
</target> |
<!-- Compiles the SWF and launches a browser for debugging. --> | |
<target name="run-debug" depends="compile-swf"> | |
<if> | |
<equals arg1="${os.name}" arg2="Mac OS X" /> | |
<then> | |
<exec executable="open" spawn="true"> | |
<arg line="-a ${env.DEFAULT_BROWSER} ${debug.compile.output}" /> | |
</exec> | |
</then> | |
<else> |
<!-- Runs the FlexUnit task on the compiled test output. --> | |
<target name="run-flexunit" depends="compile-test"> | |
<flexunit swf="${test.compile.output}" | |
toDir="${test.bin.dir}" | |
haltonfailure="false" | |
verbose="true" | |
localTrusted="true" | |
failureproperty="flexunit.failed" | |
timeout="5000" /> | |
</target> |
<!-- Compiles the project into a SWF. --> | |
<target name="compile-swf" depends="init,clean-bin"> | |
<java jar="${env.FLEX_HOME}/lib/mxmlc.jar" dir="${env.FLEX_HOME}/frameworks" fork="true" failonerror="true"> | |
<arg value="${debug.compile.target}" /> | |
<arg value="-output=${debug.compile.output}" /> | |
<arg value="-source-path=${src.dir}" /> | |
<arg value="-library-path+=${lib.dir}" /> | |
<arg value="-static-link-runtime-shared-libraries=true" /> | |
<arg value="-incremental=true" /> | |
<arg value="-verbose-stacktraces=true" /> |