Skip to content

Instantly share code, notes, and snippets.

View zepadovani's full-sized avatar

Jose Henrique Padovani zepadovani

View GitHub Profile
@zepadovani
zepadovani / idyom_install.md
Created March 7, 2024 13:36
Tutorial to install/configure IDyOM and run it using Visual Studio Code

1. Only if you need to install sbcl and Visual Studio Code (here, using homebrew)

  1. If you don’t have homebrew (just type brew -v in a terminal to test), I adviseyou to install it as it makes it easier to install apps, command line tools, and similar things, as well to update them. To do that, just run this from command line:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

  2. Test if you have sbcl (sbcl -v) otherwise install by running: brew install sbcl

  3. Install Visual Studio Code if you don't have it. You can do this by running: brew install --cask visual-studio-code

@zepadovani
zepadovani / librosa_normalization_factor_calculation.py
Last active November 15, 2023 22:33
librosa_normalization_factor_calculation.py
import numpy as np
import scipy.signal.windows as sciwins
import librosa
import matplotlib.pyplot as plt
## The idea of this script is to calculate the normalization factor for a given window function
## The normalization factor is the reciprocal of the sum of the values of the chosen frame
## The normalization factor is first calculated for a very short sinusoidal signal, with the
## frequency set in the middle of the spectrum and amplitude set to 1
@zepadovani
zepadovani / notes.md
Created November 8, 2023 19:01
Configure and run pywebview in a miniconda environment

1. create a miniconda environment

conda create --name pywebview                                                                                                    ✔  took 15s  pywebview Py 

2. enter the environment

conda activate pywebview  ✔ took 15s pywebview Py 
@zepadovani
zepadovani / receive_osc_any_pattern.sc
Created October 19, 2023 16:38
SuperCollider, receive osc with any path pattern
// By using this, it is possible to get all messages coming in a specific port
thisProcess.openUDPPort(9000);
(
f = { |msg, time, replyAddr, recvPort|
msg.postln;"Working with any OSC path".postln;
};
thisProcess.addOSCRecvFunc(f);
);
@zepadovani
zepadovani / 05_sambinha.py
Created September 19, 2023 15:17
sambinha algorítmico SCAMP+Python+VST
import scamp
import random
### IDEIA GERAL: criar duas camadas rítmicas, independentes, que façam a base e o tamborim do samba
### além disso, vamos usar um plugin VST (no reaper ou outro programa) e criar uma parte MIDI ao invés de uma parte usual
### (se tiver dificuldade, adapte o código usando notas de um piano apenas para compreender o processo geral)
## sessão SCAMP
s = scamp.Session()
@zepadovani
zepadovani / manjaro_tensorflow_miniconda3_GPU.md
Last active June 15, 2023 18:31
Manjaro + Tensorflow 2.12 + miniconda + GPU
@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:
@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
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])
## 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