Skip to content

Instantly share code, notes, and snippets.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ftence
ftence / upload_movie.sh
Last active November 5, 2019 14:25
Quick and dirty scrip to upload a movie into a Warp 10™ instance
PATH=`realpath Bento4-SDK-1-5-1-628.x86_64-unknown-linux/bin`:$PATH
IN_FILE='what_is_warp_10.mp4'
OUT_DIR='tmp_movie_files'
WARP10_URL='http://127.0.0.1:8080/api/v0/update'
TOKEN='YOUR_WRITE_TOKEN'
SPLITS=50
rm -rf $OUT_DIR
mkdir -p $OUT_DIR
@ftence
ftence / serve_data.mc2
Last active November 5, 2019 15:23
Serve movie data
// Constants
'YOUR_READ_TOKEN' 'TOKEN' STORE
50 'SPLITS' STORE
'http://127.0.0.1:8080/api/v0/exec' 'data_warp10_url' STORE
{
'path' '/warpflix/data'
'prefix' false // Only respond to http(s)://endpoint/warpflix/data
'macro'
<%
@ftence
ftence / serve_player.mc2
Created November 5, 2019 15:39
Serve a simple web page with a player
<'
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>WarpTV #1: What is Warp10™?</title>
</head>
<body>
<video controls></video>
<script>
#!/usr/bin/python3 -u
#
# A very simple integration of Facebook Prophet for WarpScript CALL.
#
# Output the maximum number of instances of this 'callable' to spawn
# The absolute maximum is set in the configuration file via 'warpscript.call.maxcapacity'
print(16)
'60VCSr.iR54bOKxqPLKrRlg0X.GkNLS_2b0_TMGjQ_xhNLtiPLtb4V.L.0g..4N.59Zv6sg7.........5LRTKnKqMM.BwtBOXO8BwrL8aonHSBqPOhaPOi_PQdZQOeaIOeaPOdomSs_LxDaLtcqGJ.0JOFS3O0SF.GZJJ.4G4_3G3M0MKG.3JF3.GKG5mQrytpErzjfrMSzSnbrb6EEESixrrfG3lwNzSYYMrdGrxWYAsi8qMBWvga9IvvwlsMhElJ9goy5kiPbFq663u5kxBOF9Ev4J5WtBxpU5Fcbu6L7MZTT1cLuhsI1d_T5qMCyDSIFPNA1941RT2kJoZsz4ZfvEleuhzpTe5_x8WFPMWc9OlWcjvDMonzWvoAW.RisFvUsKP6k_uk1D2NKw5bm6L6uYbw61snInWG82AXKFiyjWoACdHS2zxsiadUx9P2xJXXBgDkG.AY4H5SU6VdvLEM0_RPAfFZjiRabrIx2slfaa8hzKOYrL07Fr4naPx5bFi6cQsI1PeYKmB70NCzEgJeFj8Ra1F1kygLWg7KEwHnZ9YLr9LGFD39WZeMpjH7J2fk3WV2ZpsG4jnzwM_uON5SDwfCMV1wKX1wkvcLU.5JJhY2IPpZAUAiU8HG0XyjJx2oLiPXEWSxz2QxlnEX8w2jCgA5Bhigb5GNLbPQI_pV.krUGDsS1ree75LjsJgF3WqV1JyKIJFtXN8Bi8WdwUL1CvhS0QGQxiu.DRDU0kYM5EUxolAVAI2Is0ZI6fsG1wey4kYQPA22I54lJl6YMLKBXexk246z3OVP7DCdaoziQsUR9UMQHxWWAX5MR4afiE0Ll_V3eqdaVb56.pK3epf.JF9X0nHsnUYphdRc2NCV9CQsGUejdS87jAkizg638VmHl1q8cehlYFvBxEgda.pYZLIKSXlLO46suzCs20xw5ZzGOltUYVEGi_gJVVlGigq93NkTYnC93YUMKwAiQ2zgNzfpWzuybvrcV58Tch3qZxk0fIbgmgj4q5fwnz6v
[
[
{
"jmhVersion": "1.23",
"benchmark": "io.warp10.script.ext.jmh.MacroBenchmark.benchmarkMacro",
"mode": "thrpt",
"threads": 1,
"forks": 5,
"jvm": "/usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java",
"jvmArgs": [