Skip to content

Instantly share code, notes, and snippets.

View waldyrious's full-sized avatar

Waldir Pimenta waldyrious

View GitHub Profile
@waldyrious
waldyrious / log_entry.m
Last active February 26, 2018 23:36
Matlab/Octave function to produce a formatted log entry
% Return a formatted string that can be added to a log.
% Available log levels and recommended use cases:
% -- TRACE: Leave breadcrumbs of the program flow; provide context.
% Printed in blue.
% -- DEBUG: Expose internal program state, for development or troubleshooting.
% Printed in purple
% -- INFOR: Notify user of normal/expected actions and events.
% Printed in green
% -- WARNG: Alert of incorrect/unexpected input; automatically recoverable.
@waldyrious
waldyrious / cx_conj_vs_pow2.m
Created February 15, 2018 19:06
Comparison of Matlab/Octave .^2 with multiplication by the complex conjugate
a = rand(5);
b = rand(5);
c = a + 1i*b;
% -------------------------------------------------------------------------
% POW
tic();
c1 = real(c).^2 + imag(c).^2;
toc()
@waldyrious
waldyrious / fft_mult_vs_conv2.m
Created February 15, 2018 17:50
Comparison of Matlab/Octave conv2() with FFT multiplication
a = rand(7);
b = rand(7);
% -------------------------------------------------------------------------
tic();
% CONV
c1p = conv2(a,b);

The Three Political Economies of the Welfare State
Gøsta Esping-Andersen
International Journal of Sociology
Vol. 20, No. 3, The Study of Welfare State Regimes (Fall, 1990), pp. 92-123

Welfare state regimes

(pp. 111--113)

Welfare states vary considerably with respect to their principles of rights and stratification. This results in qualitatively different arrangements among state, market, and the family. The welfare state variations we find are therefore not linearly distributed, but clustered by regime types.

@waldyrious
waldyrious / mako.py
Last active January 1, 2018 10:57 — forked from mwaskom/vernalis.py
Colormap with a similar aesthetic to viridis but with a broader luminance range.
# Data imported from https://github.com/mwaskom/seaborn/blob/master/seaborn/cm.py#L264-L521
from matplotlib.colors import ListedColormap
from numpy import nan, inf
cm_data = [
[ 0.04503935, 0.01482344, 0.02092227],
[ 0.04933018, 0.01709292, 0.02535719],
[ 0.05356262, 0.01950702, 0.03018802],
[ 0.05774337, 0.02205989, 0.03545515],
- __precompile__(true)
-
- module UnitfulAngles
-
- using Unitful
- using Unitful: @unit, Quantity, NoDims
- export @u_str
-
- import Base: sin, cos, tan, sec, csc, cot, asin, acos, atan, asec, acsc, acot, atan2, convert
-
@waldyrious
waldyrious / nomes-portugueses-ionline-2012.md
Last active November 19, 2017 23:58
Nomes portugueses. Manuel é passado e Maria será sempre Maria | ionline.pt

Nomes portugueses. Manuel é passado e Maria será sempre Maria

A evolução dos nomes ao longo de um século mostra que os portugueses não gostam de mudanças

Um século de distância separa Manuel de Rodrigo. Manuel fica na história como o nome mais popular em Portugal nas décadas de 20 e 30, segundo os números do Instituto de Registos e Notariado. Rodrigo é, em 2012, o preferido entre os rapazes, de acordo com os dados provisórios do Instituto Nacional de Estatística.

@waldyrious
waldyrious / disable-middle-click-paste.md
Last active November 13, 2017 18:55
Disable mouse middle click paste in Linux
@waldyrious
waldyrious / benchmarks.html
Created November 11, 2017 13:57
Julia benchmarks table html (PR #24565)
<!-- Table generated by the Perl script test/perf/micro/bin/table.pl in the main julia repository -->
<table class="benchmarks">
<colgroup>
<col class="name">
<col class="relative" span="12">
</colgroup>
<thead>
<tr>
<th></th>
<th class="system">C</th>
@waldyrious
waldyrious / ISC-GraphQL-query.gql
Last active February 29, 2020 11:58
Github GraphQL search repos by license
# ISC-licensed repositories with more than 1000 stars
{
search(query: "license:isc stars:>1000", type: REPOSITORY, first: 100) {
repositoryCount
edges {
node {
... on Repository {
nameWithOwner
url
primaryLanguage { name }