Skip to content

Instantly share code, notes, and snippets.

View zepadovani's full-sized avatar

Jose Henrique Padovani zepadovani

View GitHub Profile
@zepadovani
zepadovani / PopChord.sc
Last active July 21, 2018 11:24 — forked from vanderaalle/C.sc
SuperCollider Chord Generator
// see bossa nova example below
PopChord {
var <>symbol, <>root, <>name, <>structure, <>transp ;
classvar <>symbols ;
classvar <>decay, <>release ;
*initClass {
var t ;
decay = 0.5;
@zepadovani
zepadovani / fix_exfat_drive.md
Created June 13, 2021 15:14 — forked from scottopell/fix_exfat_drive.md
Fix corrupted exFAT disk macOS/OSX

exFAT support on macOS seems to have some bugs because my external drives with exFAT formatting will randomly get corrupted.

Disk Utility is unable to repair this at first, but the fix is this:

  1. Use diskutil list to find the right drive id.
  2. You want the id under the IDENTIFIER column, it should look like disk1s1
  3. Run sudo fsck_exfat -d <id from above>. eg sudo fsck_exfat -d disk1s3
  4. -d is debug so you'll see all your files output as they're processed.
  5. Answer YES if it gives you the prompt Main boot region needs to be updated. Yes/No?
pip install opencv-contrib-python==4.4.0.46
brew install bazel
cd "/usr/local/Cellar/bazel/4.1.0/libexec/bin" && curl -fLO https://releases.bazel.build/3.7.2/release/bazel-3.7.2-darwin-x86_64 && chmod +x bazel-3.7.2-darwin-x86_64
brew install protobuf
git clone https://github.com/google/mediapipe
cd mediapipe
@zepadovani
zepadovani / wacom-sketchbook-mode
Last active September 4, 2022 20:09
Shell Script to configure Wacom to use with sketchbook
#!/usr/bin/env bash
# script to use Wacom One CTL-472 with Sketchbook in Wine (button2 => pan+zoom; button3 => alternate brush)
xsetwacom set "Wacom One by Wacom S Pen stylus" "Button" "2" "key +space "
xsetwacom set "Wacom One by Wacom S Pen stylus" "Button" "3" "key +s "
@zepadovani
zepadovani / om-sharp.deb_to_manjaro.md
Created September 4, 2022 20:17
Convert om-sharp deb package to arch/manjaro #om-sharp #manjaro #debtap #mime-support
## 1. download of to folder:
https://github.com/openframeworks/openFrameworks/releases/tag/0.11.2
## 2. patch sources (it seems that there is some problem with libsndfile)
cd of_v0.11.2_linux64gcc6_release && curl https://gist.githubusercontent.com/kerrickstaley/7f8c65a27a1f4e79a942235b87c1f0c0/raw/28f7d0dd94237076f72b8eaf2e009831d7d61a5d/fix-libsndfile-error.patch | patch -p1
## 3. instal dependencies and codecs
## 1. instalar AUR do ndi-sdk-embedded
instalei o SDK do NDI (versão 4) via pacote AUR: ndi-sdk-embedded (4.5.3....)
## 2. GEM instalado via pamac:
pacote pd-gem
### 3. download da versão compilada do pd_ndi
import snscrape.modules.twitter as sntwitter
trecho_do_palindromo = "marrocos"
palindromos = []
for i,tweet in enumerate(sntwitter.TwitterSearchScraper(f'#palindromo + {trecho_do_palindromo}').get_items()):
if i>100:
break
palindromos.append([tweet.date, "@"+tweet.user.username, tweet.rawContent])
@zepadovani
zepadovani / gist:0969a2ab5ecc7cf9a6e401c614158ee7
Created May 7, 2023 13:42
bindkey configs to allow to use combinations of control and alt as modifiers to emulate Home, End, PageUp, and PageDown keybinds
## Xbindkey configs to allow to use combinations of control and alt as modifiers to emulate Home, End, PageUp, and PageDown keybinds
## enter these lines in ~/.xbindkeysrc
"xdotool keyup Control+Alt_L+Left && xdotool key Home"
control+alt + Left
"xdotool keyup Shift+Control+Alt_L+Left && xdotool key Shift+Home"
shift+control+alt + Left
@zepadovani
zepadovani / wikiaves_species_table_to_df_and_csv.py
Last active May 16, 2023 00:51
Make a dataframe (and a csv) with the names of bird species and portuguese common names of birds
import requests
from bs4 import BeautifulSoup
from selenium import webdriver
import pandas as pd
def getWikiAvesDF(filename=None,savecsv=False):
"""
Scrape the Wikipedia Aves table and return a DataFrame with 'Espécie' and 'Nome Comum' columns.
Parameters: