This file contains 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 functools | |
def decorator(function): | |
"""A general decorator function""" | |
@functools.wraps(function) | |
def wrapper(*args, **kwargs): | |
# Write decorator function logic here | |
# Before function call |
This file contains 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 | |
import numba | |
from numba import deferred_type, optional, f8 | |
node_type = deferred_type() | |
spec = ( | |
("value", optional(f8[:, :])), | |
("center", f8[:]), | |
("length", f8), |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
module MultipleDispatch | |
export A, A1, A2, f | |
# Abstract type | |
abstract type A end | |
# Concrete types | |
struct A1 <: A end | |
struct A2 <: A end |
This file contains 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
# https://unix.stackexchange.com/a/124447 | |
add_to_path() { | |
case ":${PATH:=$1}:" in *:"$1":*) ;; *) PATH="$1:$PATH" ;; esac; | |
} | |
# Example | |
add_to_path $HOME/bin/julia-1.6.1/bin |
We can make this file beautiful and searchable if this error is corrected: It looks like row 7 should actually have 1 column, instead of 2. in line 6.
This file contains 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
# Unicode characters and corresponding LaTeX math mode commands | |
# ************************************************************* | |
# | |
# :Copyright: © 2011 Günter Milde | |
# :Date: Last revised 2011-11-08 | |
# :Licence: This work may be distributed and/or modified under the | |
# conditions of the `LaTeX Project Public License`_, | |
# either version 1.3 of this license or (at your option) | |
# any later version. | |
# |
This file contains 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
assets | |
business | |
accounts receivable | |
bank | |
personal | |
accounts receivable | |
bank | |
cash | |
gifts | |
online |
This file contains 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
# OBJECTIVE: Install Arch Linux with encrypted root and swap filesystems with an ENCRYPTED BOOT and boot from UEFI. We will | |
also decrypt and mount our entire encrypted system using a single LUKS passphrase entry. | |
# Note: This method supports both dedicated Arch installs and those who wish to install Arch on a multi-OS-UEFI booting system. | |
# External USB HDD/SSD Installers Notes: Encrypted Arch installs can be booted and run from an external USB HDD or SSD, but | |
# only when the installation is correctly set up. There are several necessary changes to my standard procedure you'll want | |
# to make during the install process. Read my External USB HDD/SSD Installation section below before proceeding. |
This file contains 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
using PkgTemplates | |
template = Template(; | |
user="jaantollander", | |
authors="Jaan Tollander de Balsch", | |
julia=v"1.6", | |
dir=".", | |
plugins=[ | |
License(; name="MIT"), | |
GitHubActions(), | |
Documenter{GitHubActions}(), |
This file contains 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
module ValueBasedDispatch | |
export MyType, A, B, C, f | |
abstract type MyType end | |
struct A <: MyType end | |
struct B <: MyType end | |
struct C <: MyType end | |
f(::Type{A}) = "Dispatch on argument A" |
NewerOlder