Skip to content

Instantly share code, notes, and snippets.

@dginev
dginev / cargo-doc-gh-upload.sh
Created December 19, 2017 01:50
Simple bash script for quickly uploading the "cargo doc" documentation to gh-pages
#!/bin/bash
export TMPGITURL=$(git remote -v |grep origin|grep push|awk '{print $2}')
cargo doc
rm -rf generated-doc
mv target/doc generated-doc
cd generated-doc
git init
git add .
git commit -m 'Deployed to Github Pages'
git push --force $TMPGITURL master:gh-pages
@dginev
dginev / .bashrc
Created December 19, 2017 14:19
Speed up Perl test runs on modern CPUs
# Add this line to your ~/.bashrc file, or equivalent for your Linux distribution
export HARNESS_OPTIONS=j$(grep -c ^processor /proc/cpuinfo):c
@dginev
dginev / babel.def
Created March 1, 2018 19:37
babel.def 2017.20180110-1
%%
%% This is file `babel.def',
%% generated with the docstrip utility.
%%
%% The original source files were:
%%
%% babel.dtx (with options: `core')
%%
%%
%% Copyright (C) 2012-2017 Javier Bezos and Johannes L. Braams.
@dginev
dginev / indicator_function.xml
Created April 4, 2018 13:26
Indicator Function XMath
<?xml version="1.0" encoding="UTF-8"?>
<?latexml searchpaths="/home/dreamweaver/testbed"?>
<?latexml class="article"?>
<?latexml package="amsmath"?>
<?latexml RelaxNGSchema="LaTeXML"?>
<document xmlns="http://dlmf.nist.gov/LaTeXML">
<resource src="LaTeXML.css" type="text/css"/>
<resource src="ltx-article.css" type="text/css"/>
<para xml:id="p1">
<equation xml:id="S0.Ex1">
@dginev
dginev / update_arxiv.pl
Created April 12, 2018 17:56
update_arxiv.pl
#!/usr/bin/env perl
# expected: s3cmd version 1.6.1 , properly configured
# Run this script from the directory with your existing arXiv download, e.g. /data/arXiv/
use strict;
use warnings;
# Note: you need s3cmd properly setup on your machine first!
my $available = ` s3cmd ls --requester-pays s3://arxiv/src/`;
@dginev
dginev / conversion.log
Created May 8, 2018 10:43
Cagin's conversion log, May 4 2018 latexml mailing list
ctpargentina:information cagin.yunus$ latexml --includestyles derivation-entropy.tex
latexml (LaTeXML version 0.8.2)
processing started Fri May 4 15:42:27 2018
(Digesting TeX derivation-entropy...
(Loading /opt/local/lib/perl5/vendor_perl/5.26/LaTeXML/Package/TeX.pool.ltxml...
(Loading /opt/local/lib/perl5/vendor_perl/5.26/LaTeXML/Package/eTeX.pool.ltxml... 0.00 sec)
(Loading /opt/local/lib/perl5/vendor_perl/5.26/LaTeXML/Package/pdfTeX.pool.ltxml... 0.00 sec) 0.09 sec)
(Processing content /Users/cagin.yunus/Dropbox/notes/information/derivation-entropy.tex...
(Loading /opt/local/lib/perl5/vendor_perl/5.26/LaTeXML/Package/LaTeX.pool.ltxml...
@dginev
dginev / 1995.tex
Created June 21, 2018 15:38
An etoolbox-inspired way of printing 1995 (latexml deficient)
\documentclass{article}
\makeatletter
\newcommand{\ifblank}[1]{% from expl3
\expandafter\ifx\expandafter\relax\detokenize\expandafter{\@gobble#1?}\relax
\expandafter\@firstoftwo
\else
\expandafter\@secondoftwo
\fi}
@dginev
dginev / super_words_in_arxiv.txt
Last active June 27, 2018 23:36
Words starting with "super", with frequencies from arXiv.org (source: https://sigmathling.kwarc.info/resources/arxmliv-embeddings-082017/)
super 332168
supersymmetric 320564
supersymmetry 311743
superconducting 296234
supergravity 199224
supernova 168793
superposition 165574
superconductivity 145324
superfluid 140739
superpotential 132038
@dginev
dginev / demo.md
Created July 13, 2018 03:06
Demo: Ambiguous math lexemes with Marpa

GRAMMAR INPUT:

SUMOP|FUNCTION:Σ:0 _:: UNKNOWN:x:1 _:: MULOP:*:2 _:: UNKNOWN:y:3 

Demo Parse

<ltx:XMApp>
  <ltx:XMTok meaning="set" omcd="cdlf"/>
 
@dginev
dginev / integral_example.xml
Last active August 20, 2018 21:08
Integral snippet for eq 7.2.1 of DLMF, August 2018
<apply>
<apply>
<csymbol cd="ambiguous">superscript</csymbol>
<apply>
<csymbol cd="ambiguous">subscript</csymbol>
<int />
<cn type="integer">0</cn>
</apply>
<ci>italic-z</ci>
</apply>