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
#!/usr/bin/env python | |
from datetime import datetime | |
from pathlib import Path | |
import duckdb | |
import sql_statements | |
def main(): |
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
export do="--dry-run=client -o yaml" | |
alias k=kubectl | |
alias kn='kubectl config set-context --current --namespace ' | |
alias kga='kubectl get all' | |
alias kgj='kubectl get jobs' | |
alias kgp='kubectl get pods' | |
alias kg='kubectl get ' | |
alias ka='kubectl apply ' |
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
set expandtab | |
" the filetype plugin determines filetypes from file contents | |
filetype plugin on | |
" use indent rules based on the filetype | |
filetype indent on | |
" turn on syntax highlighting | |
syntax on | |
" guess indentation |
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
def is_imo(num: int): | |
""" | |
Validates IMO number using the checksum digit. | |
""" | |
ns = str(num) | |
sm = sum(d * d2 for d, d2 in zip(map(int, ns[:6]), range(7, -9, -1))) | |
return str(sm)[-1] == ns[-1] |
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
127.0.0.1 localhost | |
127.0.0.1 localhost.localdomain | |
127.0.0.1 local | |
255.255.255.255 broadcasthost | |
::1 localhost | |
::1 ip6-localhost | |
::1 ip6-loopback | |
fe80::1%lo0 localhost | |
ff00::0 ip6-localnet | |
ff00::0 ip6-mcastprefix |
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
# Both foo and bar trigger the "blacklisted-name" pylint rule. | |
# Placing a #pylint pragma inside the foo block ensures that only this function is not triggering the rule. | |
def foo(): | |
"""docstr""" | |
# pylint: disable=blacklisted-name | |
a=2 | |
return a | |
def bar(): |
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
#!/bin/bash | |
exec docker run --rm -v "$(cygpath -aw .):/mnt" koalaman/shellcheck:stable "$@" |
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
@contextlib.contextmanager | |
def cd(directory): | |
pre_directory = os.getcwd() | |
os.chdir(str(directory)) | |
try: | |
yield | |
finally: | |
os.chdir(str(pre_directory)) |
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
program archaic | |
implicit none | |
! This is actually a program input | |
integer, parameter :: M = 10000 | |
integer, allocatable, dimension(:) :: iwork | |
integer, pointer, dimension(:) :: ptr | |
integer, pointer, dimension(:,:) :: ptr_remap | |
integer :: i, start, length | |
nullify(ptr) |
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
.PHONY: all pgi intel gcc nag clean | |
all: gcc intel nag pgi | |
pgi: | |
pgfortran -V | |
pgfortran -Minform=inform -Mbounds intertest.f90 -o intertest-pgi | |
./intertest-pgi | |
intel: |
NewerOlder