This file contains 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
execfile("/your/path/to/videomaker.py") | |
videomaker( | |
ts_min=1352261778000, # "from" timestamp.. | |
ts_max=1352262378000, # .."to" timestamp | |
frames=20, # number of images in the video. eg 200 frames for a video at 20 frames per seconds = 10 seconds of video | |
output_prefix="/path/to/output/dir/frame_", # path where to write the png. images will be prefixed with "frame_" | |
output_format=".png" # you probably want to leave png here | |
) |
This file contains 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
void main(void) { | |
vec2 pos = mod(gl_FragCoord.xy, vec2(50.0)) - vec2(25.0); | |
gl_FragColor = mix(vec4(.90, .90, .90, 1.0), vec4(.20, .20, .40, 1.0), smoothstep(380.25, 420.25, dot(pos, pos))); | |
} |
This file contains 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
const React = require('react'); | |
const IdyllComponent = require('idyll-component'); | |
const Graph = require('react-graph-vis').default; | |
const options = { | |
layout: { | |
hierarchical: true | |
}, | |
edges: { | |
color: "#000000" |
This file contains 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
Unicode = { | |
/* Strings to match Unicode characters in the BMP according to their Unicode category. | |
Extracted from Unicode specification, version 5.0.0, source: | |
http://unicode.org/versions/Unicode5.0.0/ | |
*/ | |
/* | |
Abbr Long Description | |
Lu Uppercase_Letter an uppercase letter | |
Ll Lowercase_Letter a lowercase letter | |
Lt Titlecase_Letter a digraphic character, with first part uppercase |
This file contains 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
'use strict' | |
import React, { Component, PropTypes } from 'react' | |
import { findDOMNode } from 'react-dom' | |
import c3 from 'c3' | |
import 'c3/c3.css' | |
const emptyFunc = () => {}; |
This file contains 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
// Execution time: 1048 | |
// { rss: 1028186112, heapTotal: 1015271424, heapUsed: 969132048 } | |
var start = new Date().getTime(); | |
var arr = []; | |
for (i = 0; i < 10000000; ++i) { | |
arr.push([Math.random(), Math.random()]) | |
} |
This file contains 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
function total(opts){ | |
var plats = opts.plats.reduce((r,p) => r + p) | |
return plats + (opts.livraison / opts.nbPersonnes) - (plats * opts.reduction) | |
} | |
total({ | |
plats: [3.10, 8.20, 0.30], // prix des plats d'une personne | |
livraison: 1.50, // 12h-13h | |
reduction: 0.15, // 15% |
This file contains 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
(new AWS.S3()).getObject(Bucket: 'myBucket', Key: 'myImageFile.jpg').createReadStream().pipe(require('fs').createWriteStream('/path/to/file.jpg')) |
This file contains 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
#!/bin/bash | |
cd modules/application && mvn nbm:cluster-app nbm:run-platform |
This file contains 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
result = do (value=some(operation(42))) -> | |
throw Error "too low" if value < 0.5 | |
value |
NewerOlder