This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| from scipy.optimize import linprog | |
| class simplex(object): | |
| def __init__(self, A, b, c): | |
| self.make_tableau(A, b, c) | |
| self.nvars = c.shape[0] | |
| # self.run_simplex() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| define WEBSERVER:= | |
| (define (handler req reqb) (values '((content-type . (text/plain) )) "Hello world from a makefile!!!") ) | |
| (use-modules (web server)) | |
| (use-modules (web http)) | |
| (run-server handler 'http '(#:port 9999)) | |
| endef |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (defprotocol my-protocol-1 | |
| (my-func-1 [this value])) | |
| (deftype my-type-1 [x] | |
| my-protocol-1 | |
| (my-func-1 [this value] | |
| (* value 2))) | |
| (def z1 (my-type-1. 123)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \NewCommandCopy\originalfootnotetext\footnotetext | |
| \NewCommandCopy\originalfootnotemark\footnotemark | |
| \renewcommand{\footnotemark}{% | |
| \stepcounter{footnote}% | |
| \textsuperscript{\hyperref[footnotebody:\thefootnote]{\thefootnote}}} | |
| \renewcommand{\footnotetext}[1]{% | |
| \originalfootnotetext{\phantomsection\label{footnotebody:\thefootnote}#1}} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/env python3 | |
| # run doing `./archlinux_mirror_list_updater > /etc/pacman.d/mirrorlist` | |
| import urllib.request | |
| import re | |
| import time | |
| import sys |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import sqlite3 | |
| import zlib | |
| import pickle | |
| class PickleSQLDict: | |
| def __init__(self, filename): | |
| self._filename = filename | |
| self.__db = None |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \usepackage{listings} | |
| %\usepackage{fancyvrb} % because everything sucks sometimes | |
| \usepackage{fvextra} | |
| \usepackage{longtable} | |
| \usepackage{multirow} | |
| % \usepackage{multicol} | |
| \usepackage{framed} | |
| \usepackage{mdframed} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| WAITNAME=$0 | |
| SNAME=$1 | |
| if [ -z "$SNAME" ]; then | |
| echo "use wait-for 'proc-search-string'" | |
| exit 1 | |
| fi |
OlderNewer