Skip to content

Instantly share code, notes, and snippets.

@wbecher
wbecher / understanding-word-vectors.ipynb
Created October 10, 2020 14:26 — forked from aparrish/understanding-word-vectors.ipynb
Understanding word vectors: A tutorial for "Reading and Writing Electronic Text," a class I teach at ITP. (Python 2.7) Code examples released under CC0 https://creativecommons.org/choose/zero/, other text released under CC BY 4.0 https://creativecommons.org/licenses/by/4.0/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@wbecher
wbecher / altair.py
Last active September 16, 2020 16:32
Testes: Streamlit com Altair e Vega Datasets
# Antes de rodar:
# pip install streamlit altair vega_datasets
# streamlit run altair.py
import streamlit as st
import altair as alt
from vega_datasets import data
cars = data.cars()
@wbecher
wbecher / markdown-details-collapsible.md
Created August 21, 2020 14:02 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.

A collapsible section containing markdown

Click to expand!

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
@wbecher
wbecher / markdown-details-collapsible.md
Created August 21, 2020 14:02 — forked from pierrejoubert73/markdown-details-collapsible.md
How to add a collapsible section in markdown.

A collapsible section containing markdown

Click to expand!

Heading

  1. A numbered
  2. list
    • With some
    • Sub bullets
# Crie um algoritmo para geração de 200 imagens diferentes.
# Todas com 256x256. Escolha uma imagem de sua preferência.
# As transformações também são de sua escolha.
# Etapa 1: implementar um algoritmo para o problema acima e
# contabilizar o tempo de execução.
# Além das vantagens apresentadas em aula, a biblioteca
# imgaug permite tirar proveito dos múltiplos núcleos dos
# processadores (CPU).
@wbecher
wbecher / backup.py
Created June 4, 2019 19:30 — forked from tompaton/backup.py
Python backup script
#!/usr/bin/env python
"""
backup.py
Create an archive which will be suitable for rsyncing to a remote backup.
- will not copy data unnecessarily for common operations such as
renaming a file or reorganising the directory structure.
(assumes large files are generally going to be immutable, e.g. audio/video)
- doesn't try to do anything fancy with permissions etc.
@wbecher
wbecher / export-dashboard.json
Created March 1, 2019 12:47 — forked from ahmedalami/export-dashboard.json
Set up a quick monitoring environment for WildFly and Apache ActiveMQ using Logstash, Elasticsearch and Kibana
[
{
"_id": "Wildfly-Monitoring-Dashboard",
"_type": "dashboard",
"_source": {
"title": "Wildfly Monitoring Dashboard",
"hits": 0,
"description": "",
"panelsJSON": "[{\"col\":7,\"id\":\"Active-Sessions-Statistics-jboss-hibernate4.war\",\"row\":3,\"size_x\":3,\"size_y\":2,\"type\":\"visualization\"},{\"col\":10,\"id\":\"Datasource-Pool-Statistics-jboss-hibernate4.war\",\"row\":3,\"size_x\":3,\"size_y\":2,\"type\":\"visualization\"},{\"col\":7,\"id\":\"Http-Requests-By-Client-IP\",\"row\":1,\"size_x\":3,\"size_y\":2,\"type\":\"visualization\"},{\"col\":10,\"id\":\"Http-Response-Status\",\"row\":1,\"size_x\":3,\"size_y\":2,\"type\":\"visualization\"},{\"col\":7,\"id\":\"Prepared-Statement-Cache-Statistics-jboss-as-hibernate4\",\"row\":5,\"size_x\":3,\"size_y\":2,\"type\":\"visualization\"},{\"col\":1,\"id\":\"ActiveMQ-Broker-Memory-Metrics\",\"row\":1,\"size_x\":6,\"size_y\":3,\"type\":\"visualization\"},{\"col\":1,\"id\":\"ActiveMQ-Broker-Total-Metrics\",\"row\":4,\"size_x\"
@wbecher
wbecher / Instalar pgAdmin4 no Ubuntu 16.04
Last active September 13, 2017 18:57
Instalar pgAdmin4 no Ubuntu 16.04
Rodar os comandos no terminar, nesta ordem:
#1 - install
sudo apt-get -y install virtualenv python-pip libpq-dev python-dev
#2 - Criar virtual env
cd
virtualenv pgadmin4-1-6
cd pgadmin4-1-6
source bin/activate
@wbecher
wbecher / update_resolution.sh
Created September 8, 2017 19:53
Fix wrong resolution on Samsung SyncMaster B1930.
#!/usr/bin/env bash
# A workaround to fix wrong resolution on Samsung SyncMaster B1930.
# Samsung SyncMaster B1930 has a default resolution of 1360x768 but
# it appears in Ubuntu that the monitor is Unknown and using 1024x768
# output mode.
# http://bit.ly/1lyxcvH
# Generate the modeline using cvt
if hash cvt 2>/dev/null; then
@wbecher
wbecher / install_zsh.sh
Last active September 8, 2017 19:48
script to install zsh on linux (Ubuntu 16.04)
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get install git
git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh
cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc
chsh -s /bin/zsh
sudo shutdown -r 0