Forked from Michael Musgrove's Pen SVG Stroke Text Effect.
Forked from Michael Musgrove's Pen SVG Stroke Text Effect.
A Pen by Stephen Hawkes on CodePen.
| import pyb | |
| switch = pyb.Switch() | |
| leds = [pyb.LED(i+1) for i in range(4)] | |
| accel = pyb.Accel() | |
| i = 0 | |
| while not switch(): | |
| y = accel.y() | |
| i = (i + (1 if y > 0 else -1)) % len(leds) |
| #!/bin/sh | |
| # Output file for HTML5 video | |
| # requirements: ffmpeg .6+ | |
| # usage: ./html5video.sh infile.mp4 640x360 | |
| target_directory='converted' | |
| file=`basename $1` | |
| filename=${file%.*} | |
| filepath=`dirname $1` |
Forked from Michael Musgrove's Pen SVG Stroke Text Effect.
Forked from Michael Musgrove's Pen SVG Stroke Text Effect.
A Pen by Stephen Hawkes on CodePen.
| We code in Python when we're able. | |
| use 'geek' as a proud label. | |
| We script routines its in our genes: | |
| white space is so read-able. | |
| Learn PEP8 here as you'll be taught, | |
| in sprints and jams and talks the lot. | |
| We code in Python when we're able | |
| version 3. is fast. and stable |
| @main-font-size: 16px; | |
| .x-rem (@property, @value) { | |
| // This is a workaround, inspired by https://github.com/borodean/less-properties | |
| @px-fallback: @value * @main-font-size; | |
| -: ~`(function () { return ';@{property}: @{px-fallback}'; }())`; | |
| -: ~`(function () { return ';@{property}: @{value}rem'; }())`; | |
| } | |
| .x-rem (@property, @v1, @v2) { | |
| @px-v1: @v1 * @main-font-size; |
| print - lets you output numbers and characters to the console. | |
| if - let's you choose which statements are executed if an expression is true | |
| else - denotes the statements that execute if the expression isn't true | |
| elif - let's you combine if statements | |
| while - is a way of repeating statements in a loop until an expression is false. | |
| break - is a way to jump out of the statement flow of a loop. | |
| continue - let's you skip a cycle of the flow without ending it. | |
| for - is used to iterate over items of a collection in the order they appear in a container |