I hereby claim:
- I am reale on github.
- I am reale (https://keybase.io/reale) on keybase.
- I have a public key ASC7prRw88qck0mao3uzp2TtsM1ZxhzzIMwGA62Z1s7llAo
To claim this, I am signing this object:
| # the order of the two statements is crucial (of course) | |
| find \( -path ./.git -prune -false -o -executable \) -a -type f -exec git update-index --chmod=-x {} \; | |
| find \( -path ./.git -prune -false -o -executable \) -a -type f -exec chmod -x \{} \; |
| #!/bin/sh | |
| # Download summaries of all Guardian articles for a given keyword | |
| TAG=${1:-covid} | |
| APIKEY=test | |
| APIROOT=https://content.guardianapis.com | |
| # LOOP 1: get all tags containing $TAG |
| #!/bin/sh | |
| # pnrr2wordcloud | |
| # | |
| # Generates a wordcloud from the most recent version of the Italian National | |
| # recovery and resilience plan (Piano Nazionale di Ripresa e Resilienza - PNRR) | |
| # | |
| # Author: Roberto Reale <[email protected]> | |
| # Last updated: 2021-02-11 |
| #!/usr/bin/tclsh | |
| # | |
| # approximate PI with the aid of Wallis' product | |
| # | |
| proc wallis {{n 1000000}} { | |
| set value 1.0 | |
| set i 1 |
| #!/usr/bin/tclsh | |
| # we need Tcl 8.5 for lrepeat to be defined | |
| package require Tcl 8.5 | |
| # | |
| # recursively calculate Chebyshev polynomials | |
| # | |
| # (see http://en.wikipedia.org/wiki/Chebyshev_polynomials) | |
| # |
| #!/usr/bin/tclsh | |
| # | |
| # approximate e using the power series expansion | |
| # | |
| proc approx_e {{n 20}} { | |
| set value 1 | |
| set factorial 1 | |
| set i 1 |
I hereby claim:
To claim this, I am signing this object:
| BEGIN | |
| FOR cur_rec IN (SELECT object_name, object_type | |
| FROM user_objects | |
| WHERE object_type IN | |
| ('TABLE', | |
| 'VIEW', | |
| 'PACKAGE', | |
| 'PROCEDURE', | |
| 'FUNCTION', | |
| 'SEQUENCE', |
| #!/bin/sh | |
| # create a tarball from inside a folder | |
| dirname=$(cat PROJECT)-$(cat VERSION) | |
| tarball=${dirname}.tar.gz | |
| # avoid tar's error message ``file changed as we read it'' | |
| touch "$tarball" | |
| tar cfz "$tarball" \ |
| #!/bin/bash | |
| # Convert a file mode string (e.g., -rw-rw-r--) into the octal value | |
| function perm2octal() | |
| { | |
| local perm=${1:1} # remove first char (the file type) | |
| res=$(echo "$perm" | sed 's/[^-]/1/g; s/-/0/g') | |
| res=$(echo "ibase=2; obase=8; $res" | bc) |