Skip to content

Instantly share code, notes, and snippets.

Arthur arthurbarros

Block or report user

Report or block arthurbarros

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@arthurbarros
arthurbarros / index.html
Created Apr 1, 2018
Animate sprite with clipping audio
View index.html
<!doctype html>
<html>
<head>
<script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
<script src=" http://blaiprat.github.io/jquery.animateSprite/js/jquery.animateSprite.js"></script>
<style type="text/css">
.scott {
height: 140px;
@arthurbarros
arthurbarros / app.py
Last active Mar 22, 2018
Get all votes from the current day from CryptoPanic for a given currency
View app.py
import requests
def get_url(url, news):
res = requests.get(url)
for new in res.json()['results']:
news.append(new)
if res.json()['next']:
news = get_url(res.json()['next'], news)
return news
View dump_to_txt.py
import json
whitelist = []
def add_user_whitelist(user_id):
whitelist.append(user_id)
add_user_whitelist(12345678000)
@arthurbarros
arthurbarros / churn-keras-model.ipynb
Created Jul 31, 2017
How to build a simple Keras model with Tensorflow backend
View churn-keras-model.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@arthurbarros
arthurbarros / Anomaly Detection using Gaussian Distribution.ipynb
Last active Jul 27, 2017
Anomaly Detection with sklearn using Guassian Distribution #MachineLearning
View Anomaly Detection using Gaussian Distribution.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@arthurbarros
arthurbarros / extract_frame.sh
Created Jun 22, 2017
Extract a single frame from a live stream
View extract_frame.sh
ffmpeg -v 0 -y -i "http://calertahls-lh.akamaihd.net/i/calertahls_1@167570/master.m3u8" -vframes 1 img/output.jpeg
@arthurbarros
arthurbarros / app.css
Created Feb 12, 2017 — forked from koba04/app.css
socket.io chat sample by vue.js http://socket.io/get-started/chat/
View app.css
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font: 13px Helvetica, Arial;
}
View screen-crash-course.md

GNU Screen Crash Course

Introduction

A real quick GNU screen crash course with the key features I use.

man screen

  • Emulates terminals in a full-screen window manager
  • Detachable, so shell sessions aren't attached to a login process
@arthurbarros
arthurbarros / nginx.conf
Created May 11, 2016 — forked from atma/nginx.conf
Nginx + nodejs + socket.io websockets
View nginx.conf
# Add to nginx.conf http section
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
@arthurbarros
arthurbarros / docker-create-swarm.sh
Created Mar 29, 2016 — forked from lukemadera/docker-create-swarm.sh
jwilder/nginx-proxy using Compose + Swarm + Machine attempt 1
View docker-create-swarm.sh
#!/bin/bash
set -e
if [ -z "$DIGITALOCEAN_ACCESS_TOKEN" ]; then
echo >&2 "ERROR: You must export DIGITALOCEAN_ACCESS_TOKEN"
exit 1
fi
docker pull swarm > /dev/null
You can’t perform that action at this time.