-
abs(float)- Returns the absolute value of a given float. Example:abs(1)returns1, andabs(-1)would also return1, whereasabs(-3.14)would return3.14. See also thesignumfunction. -
basename(path)- Returns the last element of a path. -
base64decode(string)- Given a base64-encoded string, decodes it and returns the original string.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/python | |
| import glob | |
| import socket | |
| import time | |
| from threading import Timer | |
| import picamera | |
| import RPi.GPIO as GPIO | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import ( | |
| "fmt" | |
| "time" | |
| "github.com/aws/aws-sdk-go/aws" | |
| "github.com/aws/aws-sdk-go/aws/session" | |
| "github.com/aws/aws-sdk-go/service/athena" | |
| ) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -- | |
| -- This will register the "planet" table within your AWS account | |
| -- | |
| CREATE EXTERNAL TABLE planet ( | |
| id BIGINT, | |
| type STRING, | |
| tags MAP<STRING,STRING>, | |
| lat DECIMAL(9,7), | |
| lon DECIMAL(10,7), | |
| nds ARRAY<STRUCT<ref: BIGINT>>, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class PWindow extends PApplet { | |
| PWindow() { | |
| super(); | |
| PApplet.runSketch(new String[] {this.getClass().getSimpleName()}, this); | |
| } | |
| void settings() { | |
| size(500, 200); | |
| } |
- disk point picking http://mathworld.wolfram.com/DiskPointPicking.html
- Simulate movement across landscape similar to Charlie Deck's Noon Dunes design? http://bigblueboo.tumblr.com/post/142516604819/noon-dunes
- Games
- space invades
- snake game
- pong
- simon game
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // array utils | |
| // ================================================================================================= | |
| const combine = (...arrays) => [].concat(...arrays); | |
| const compact = arr => arr.filter(Boolean); | |
| const contains = (() => Array.prototype.includes | |
| ? (arr, value) => arr.includes(value) | |
| : (arr, value) => arr.some(el => el === value) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var os = require("os"); | |
| //Create function to get CPU information | |
| function cpuAverage() { | |
| //Initialise sum of idle and time of cores and fetch CPU info | |
| var totalIdle = 0, totalTick = 0; | |
| var cpus = os.cpus(); | |
| //Loop through CPU cores |
NewerOlder