Skip to content

Instantly share code, notes, and snippets.

View arthurbarros's full-sized avatar
🏠
Working from home

Arthur Barros arthurbarros

🏠
Working from home
View GitHub Profile
@arthurbarros
arthurbarros / index.html
Created April 1, 2018 09:37
Animate sprite with clipping audio
<!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 March 22, 2018 20:27
Get all votes from the current day from CryptoPanic for a given currency
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
import json
whitelist = []
def add_user_whitelist(user_id):
whitelist.append(user_id)
add_user_whitelist(12345678000)
@arthurbarros
arthurbarros / churn-keras-model.ipynb
Created July 31, 2017 20:56
How to build a simple Keras model with Tensorflow backend
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 July 27, 2017 23:13
Anomaly Detection with sklearn using Guassian Distribution #MachineLearning
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 June 22, 2017 20:04
Extract a single frame from a live stream
ffmpeg -v 0 -y -i "http://calertahls-lh.akamaihd.net/i/calertahls_1@167570/master.m3u8" -vframes 1 img/output.jpeg
@arthurbarros
arthurbarros / btce.js
Last active April 28, 2017 18:17
PoC: how your wallet reacts on panic buy/sell on litecoin currency
var WebSocket = require('ws'),
Entities = require('html-entities').XmlEntities,
http = require('https');
var TransportHelper = function(){}
TransportHelper.prototype.parse = function(data)
{
data = JSON.parse(JSON.parse(data).data);
if(typeof data == 'string'){
@arthurbarros
arthurbarros / app.css
Created February 12, 2017 21:43 — forked from koba04/app.css
socket.io chat sample by vue.js http://socket.io/get-started/chat/
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font: 13px Helvetica, Arial;
}
@arthurbarros
arthurbarros / screen-crash-course.md
Created January 24, 2017 17:24 — forked from andrewsardone/screen-crash-course.md
GNU Screen Crash Course

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 03:38 — forked from atma/nginx.conf
Nginx + nodejs + socket.io websockets
# Add to nginx.conf http section
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}