This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\usepackage{listings} | |
\usepackage{lstautogobble} % Fix relative indenting | |
\usepackage{color} % Code coloring | |
\usepackage{zi4} % Nice font | |
\definecolor{bluekeywords}{rgb}{0.13, 0.13, 1} | |
\definecolor{greencomments}{rgb}{0, 0.5, 0} | |
\definecolor{redstrings}{rgb}{0.9, 0, 0} | |
\definecolor{graynumbers}{rgb}{0.5, 0.5, 0.5} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax on | |
filetype plugin indent on | |
set encoding=utf-8 | |
set showcmd | |
set relativenumber | |
set noswapfile | |
set undofile | |
set undodir=~/.vim/undo | |
set undolevels=1000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rate = 8000 | |
freqs = [494 440 392 440 494 494 494] | |
x = 0:1/rate:3.5 | |
y = zeros(x) | |
range = 1:4001 | |
for i = 1:length(freqs) | |
y(range) = exp(-10 * x(range) + 5 * (i - 1)) .* sin(2 * %pi * freqs(i) * x(range)) | |
range = range + 4000 | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [magnitude, phase] = fourierSeries(x) | |
// FOURIERSERIES - Return the magnitude and phase of each | |
// sinusoidal component in the Fourier series expansion for | |
// the argument, which is interpreted as one cycle of a | |
// periodic signal. The argument is assumed to have an | |
// even number p of samples. The first returned value is an | |
// array containing the amplitudes of the sinusoidal | |
// components in the Fourier series expansion, with | |
// frequencies 0, 1/p, 2/p, ... 1/2. The second returned | |
// value is an array of phases for the sinusoidal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [] = pre1() | |
clf() | |
x = [1, zeros(1,99)] | |
y = filter([1], [1, 0.95], x) | |
plot2d3(y) | |
endfunction | |
function [] = pre2() | |
clf() | |
h = iir(10, 'lp', 'butt', 0.125, [0 0]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import logging | |
import sys | |
import time | |
import rtmidi | |
import liblo | |
from rtmidi.midiutil import open_midiinput, open_midioutput | |
from PyQt5.QtWidgets import QWidget, QApplication | |
from PyQt5.QtGui import QPainter, QColor, QFont | |
from PyQt5.QtCore import Qt, QPointF, QRectF, QTimer, pyqtSlot, pyqtSignal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
\documentclass[12pt, a4paper]{article} | |
\usepackage[utf8]{inputenc} | |
\usepackage[brazilian]{babel} % Hifenização e dicionário | |
\usepackage[left=3.00cm, right=2.00cm, top=3.00cm, bottom=2.00cm]{geometry} | |
\usepackage{enumitem} % Para itemsep etc | |
\usepackage{longtable} % Dependência do longtabu | |
\usepackage{tabu} % Para melhor criação de tabelas | |
\usepackage{listings} % Para códigos | |
\usepackage{lstautogobble} % Códigos indentados corretamente | |
\usepackage{color} % Para coloração de códigos |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
:%s/'<,'>s/href="\([^"]*\)"/href="{{ url_for('static', filename='\1') }}"/g | |
copy from minibuffer with C-x h + M-w (https://emacs.stackexchange.com/a/37181) | |
paste with C-y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bindsym $mod+d exec "rofi -matching fuzzy -show run -modi \\"run,window\\"" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(require '[clojure.java.io :as io]) | |
(defn visit-print | |
"println approach" | |
[path level] | |
(when (some #(clojure.string/includes? % ".md") (file-seq (io/file path))) | |
(println (str (apply str (repeat level " ")) "- " (.getName (io/file path)))) | |
(doseq [path (.listFiles (io/file path))] (visit-print path (inc level))))) | |
(defn visit-print |
OlderNewer