Skip to content

Instantly share code, notes, and snippets.

View zmughal's full-sized avatar
🌿
fiddling with attribute grammars.

Zaki Mughal [sivoais] zmughal

🌿
fiddling with attribute grammars.
View GitHub Profile
#!/bin/sh
set -eu
[ -d conformer-setup ] || mkdir conformer-setup
cd conformer-setup
# https://drive.google.com/uc?export=download&id=1p46Ny6IVVdEmXUYhtj_X_EGgJIlAfh3C
[ -f pretrained-subword-conformer.zip ] || wget -O pretrained-subword-conformer.zip 'https://drive.google.com/uc?export=download&id=1p46Ny6IVVdEmXUYhtj_X_EGgJIlAfh3C&confirm=t&uuid=471ed14f-bd17-4f06-9f46-c00ab7bd21b4'
[ -d pretrained-subword-conformer ] || unzip -d pretrained-subword-conformer pretrained-subword-conformer.zip
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env perl
# PODNAME: inline-python-named-args
# ABSTRACT: Example of passing named args to Python via Inline::Python
use strict;
use warnings;
use 5.16.3;
use Test2::V0;
#!/bin/bash
MY_USER=$(gh repo list --json owner -q '.[0].owner.login')
BOTS="dependabot renovate snyk-bot"
BOTS_CONDITION=$(echo $BOTS | tr ' ' '\n' | sed 's/^/ and .author.login != "/; s/$/" /' )
SELECT_AUTHORS=".author.login != \"$MY_USER\" $BOTS_CONDITION"
gh api graphql --paginate -f query='
query($endCursor: String) {
viewer {

Running with SciPy:

#!/usr/bin/python3
import scipy.integrate as integ
import numpy as np
def normalProbabilityDensity(x):
    constant = 1.0 / np.sqrt(2*np.pi)
    return(constant * np.exp((-x**2) / 2.0) )
neg_percentile, _ = integ.quad(normalProbabilityDensity, np.NINF, -1.00)
#!/usr/bin/env perl
# Gist: <https://gist.github.com/zmughal/cfbbbd66ed0e6d4a5403951230520dce>
use strict;
use warnings;
use feature qw(say);
use Carton ();
use Path::Tiny;
use List::AllUtils qw(any first);
@zmughal
zmughal / method.pl
Created May 2, 2021 00:48 — forked from jberger/method.pl
PDL::_data_printer
sub _data_printer {
my ($self, $props) = @_;
################################################
# Get Data, Build Structure #
# add new things as [ tag => data ] to @data #
################################################
my @data;
# type
@zmughal
zmughal / bret_victor-reading_list.md
Created July 24, 2020 07:53 — forked from nickloewen/bret_victor-reading_list.md
Bret Victor’s Reading List

This is a plain-text version of Bret Victor’s reading list. It was requested by hf on Hacker News.


Highly recommended things!

This is my five-star list. These are my favorite things in all the world.

A few of these works have had an extraordinary effect on my life or way of thinking. They get a sixth star. ★

# vim: ft=gitconfig
[alias]
branch-name = rev-parse --abbrev-ref HEAD
last-tag = describe --tags --abbrev=0
log-commits-since-last-tag = "! f() { git log `git last-tag`..HEAD $@; }; f"
log-commits-since-last-tag-oneline = !git log-commits-since-last-tag --oneline
last-tag-dotdot-or-nothing = "! f() { git last-tag >/dev/null 2>&1 && echo $(git last-tag).. || echo ''; }; f"
last-tag-or-root = "! f() { git last-tag >/dev/null 2>&1 && echo tag $(git last-tag) || echo 'ROOT'; }; f"
date-of-last-commit-on-head = ! git rev-list --format=%ci HEAD^! | tail -1
count-commits-since-last-tag-or-root = "! f() { git rev-list $(git last-tag-dotdot-or-nothing)HEAD --count; }; f"

𝒫̃ : <𝒫> 119979, Hex 0001d4ab, Octal 352253 < ̃> 771, Hex 0303, Octal 1403

P̃ : 80, Hex 50, Octal 120 &lt; ̃&gt; 771, Hex 0303, Octal 1403