Skip to content

Instantly share code, notes, and snippets.

View svaksha's full-sized avatar
💭
zzZen()

svaksha ॥ स्वक्ष ॥ svaksha

💭
zzZen()
View GitHub Profile
@wolfv
wolfv / run_conda_builds.py
Created July 28, 2019 18:13
Run many conda builds in parallel, as fast as possible.
from pathlib import Path
import jinja2
import yaml
from conda.models.match_spec import MatchSpec
import networkx as nx
# import matplotlib.pyplot as plt
import os, random, time, json
import workerpool
NO_BUILD_LOCAL_PKGS = True

Dear British Airways,

I am concerned that you have not handled my personal information properly.

Recently, I tried to check-in online on your website, but the interstitial page did not redirect me, and thus I was unable to check-in. I discovered that this was because my adblocker was enabled. After disabling my adblocker, I discovered that your check-in page was leaking my booking reference and surname to countless third parties for advertising purposes, including Twitter, LinkedIn and Google Doubleclick. I've attached for some network logs from Chrome's web developer console for some example evidence.

I do not recall explicitly consenting for my information to be shared in this way, nor do I see any way to opt-out or withdraw my consent. This all appears to be a violation of article 7 of GDPR for conditions of consent, which states "where processing is based on consent, the controller shall be able to demonstrate that the data subject has consented to processing of his or her personal data" and "the data

@rkrzr
rkrzr / auto_tags.py
Last active April 10, 2024 11:14
Automatically generate ansible tags of the same name for each role in a playbook
"""
This module implements an Ansible plugin that is triggered at the start of a playbook.
The plugin dynamically generates a tag for each role. Each tag has the same name as its role.
The advantage of this is that it saves you some boilerplate, because you don't have to wrap
all tasks of a role in an additional block and assign a tag to that.
Additionally, it works automatically when you add new roles to your playbook.
Usage is exactly the same as without this plugin:
@umidjons
umidjons / youtube-dl-download-audio-only-on-best-quality.md
Last active March 9, 2024 07:54
Download Audio from YouTube with youtube-dl

Download Audio from YouTube

-i - ignore errors

-c - continue

-t - use video title as file name

--extract-audio - extract audio track

@fnielsen
fnielsen / imagenet_label_to_wordnet_synset.txt
Created August 23, 2017 12:44
ImageNet label to wordnet synset identifier
{0: {'id': '01440764-n',
'label': 'tench, Tinca tinca',
'uri': 'http://wordnet-rdf.princeton.edu/wn30/01440764-n'},
1: {'id': '01443537-n',
'label': 'goldfish, Carassius auratus',
'uri': 'http://wordnet-rdf.princeton.edu/wn30/01443537-n'},
2: {'id': '01484850-n',
'label': 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias',
'uri': 'http://wordnet-rdf.princeton.edu/wn30/01484850-n'},
3: {'id': '01491361-n',
@svaksha
svaksha / doi2bibtex.sh
Created August 22, 2017 07:49 — forked from konrad/doi2bibtex.sh
Returns a BibTeX entry for one or more given DOIs.
#!/usr/bin/env bash
# Returns a BibTeX (www.bibtex.org) entry for one or more given DOIs
# (https://www.doi.org/).
#
# Call it like this:
#
# $ doi2bibtex.sh 10.1093/bioinformatics/btu533
#
# Can also be used for several DOIs at once:
@konrad
konrad / doi2bibtex.sh
Last active August 23, 2017 08:52
Returns a BibTeX entry for one or more given DOIs.
#!/usr/bin/env bash
# Returns a BibTeX (www.bibtex.org) entry for one or more given DOIs
# (https://www.doi.org/).
#
# Call it like this:
#
# $ doi2bibtex.sh 10.1093/bioinformatics/btu533
#
# Can also be used for several DOIs at once:
@svaksha
svaksha / pythontojulia.md
Created May 12, 2017 12:27 — forked from cuckookernel/pythontojulia.md
Python to Julia Quick translation / conversion reference Guide

A quick and dirty syntax translation / conversion reference guide to ease the transition between Python and Julia. This is not meant as a reference to the language. For that you should read the manual.

Some important differences

  • Arrays in Julia are indexed starting from 1.
  • In Julia classes (i.e. types) don't own methods. Methods are implementations of generic functions and are invoked in a "static style", i.e. instead of Python's str1.rstrip(), we will have rstrip( str1 ), instead of file1.close(), close( file1 ).

Some important similarities.

( advice from @johnmyleswhite; ministorm starts with https://twitter.com/johnmyleswhite/status/766657182582513666 )
I keep planning on writing a post about contributing to OSS effectively, but I'm starting to doubt I ever will. So here's some tweets.
(1) Credibility is everything. People are busy, so they heavily use personal trust to inform their decisions. You must become credible.
(2) Credibility starts with technical competence, rather than shared aesthetics. Do *not* start contributing by engaging in design debates.
(3) Instead, work on simple projects where success or failure will be clear. Write unit tests. Write docs. Improve a function's performance.
(4) That kind of work will allow you to demonstrate skill, which will make you credible. After, people will want to hear your design goals.
(5) Don't engage in debates that are long-standing without being familiar with the entire past history of the debate.
(6) Especially don't focus on the shallow part of a debate where you can participate without kno
@svaksha
svaksha / jvm
Created October 20, 2015 11:48 — forked from tmlbl/jvm
JVM - Julia Version Manager
#!/bin/bash
# I keep Julia binaries in /opt/julia with the same directory structure
# as ~/.julia to store different versions, and use this script to switch
# between them. I also like to maintain a link of the ~/.julia folder to
# ~/julia, for easier package development.
JBIN=""
PDIR=""