Skip to content

Instantly share code, notes, and snippets.

Avatar

Andrea Zonca zonca

View GitHub Profile
View convert_pdf1a.sh
gs -dPDFA -dBATCH -dNOPAUSE -dUseCIEColor -sProcessColorModel=DeviceCMYK -sDEVICE=pdfwrite -sPDFACompatibilityPolicy=1 -sOutputFile=output.pdf "$1"
View planck_gnilc_dust_index.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View reproduce_pysm2_sync.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View read_model_files.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zonca
zonca / example_twitter_block_list.csv
Last active Oct 12, 2020
Example blocklist for the Python package `twitter_blocklist`
View example_twitter_block_list.csv
372575989 TwitterNews
3282859598 TwitterVideo
@zonca
zonca / Code.gs
Created Oct 5, 2020
Google Script Truly Muting, need to create the label "mutedlabel"
View Code.gs
function labelMutetoIgnore() {
var threads = GmailApp.search('is:muted');
var label = GmailApp.getUserLabelByName("mutedlabel");
for (var t in threads.slice(0,10)) { # only process the last 10 threads, otherwise it takes forever
threads[t].addLabel(label);
}
}
function archiveMuted() {
var batchSize = 100 // Process up to 100 threads at once
@zonca
zonca / concat_mp4.sh
Created Sep 25, 2020
FFMPEG scripts to speedup and concatenate videos, useful for prerecording videos for conferences
View concat_mp4.sh
ffmpeg -safe 0 -f concat -i <(find . -type f -name '*.mp4' -printf "file '$PWD/%p'\n" | sort) -c copy output.mp4
@zonca
zonca / gwcs_bounding_box.ipynb
Created Sep 19, 2020
GWCS bounding box units
View gwcs_bounding_box.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View fix_iris_simulator_fits.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@zonca
zonca / localtoc.html
Last active Sep 1, 2020
Sphinx templates for sphinx-multiversion
View localtoc.html
{% if versions %}
<h3>{{ _('Releases') }}</h3>
<ul>
{%- for item in versions.tags %}
<li><a href="{{ item.url }}">{{ item.name }}</a></li>
{%- endfor %}
</ul>
<h3>{{ _('In Development') }}</h3>
<ul>
{%- for item in versions.branches %}
You can’t perform that action at this time.