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
create table if not exists scientist (id integer primary key, firstname varchar(100), lastname varchar(100)); | |
insert into scientist (id, firstname, lastname) values (1, 'albert', 'einstein') on conflict DO NOTHING; | |
insert into scientist (id, firstname, lastname) values (2, 'isaac', 'newton') on conflict DO NOTHING; | |
insert into scientist (id, firstname, lastname) values (3, 'marie', 'curie') on conflict DO NOTHING; | |
CREATE OR REPLACE FUNCTION random_record( | |
table_name anycompatible | |
) | |
RETURNS SETOF anycompatible |
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
# Enable built-in syntax highlighting | |
include "/usr/share/nano/*.nanorc" | |
include "/usr/share/nano/extra/*.nanorc" | |
# Make the Home key smarter. When Home is pressed anywhere but at the | |
# very beginning of non-whitespace characters on a line, the cursor | |
# will jump to that beginning (either forwards or backwards). If the | |
# cursor is already at that position, it will jump to the true | |
# beginning of the line. | |
set smarthome |
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
#pragma once | |
#include <string> | |
#define EXPAND(...) EXPAND4(EXPAND4(EXPAND4(EXPAND4(__VA_ARGS__)))) | |
#define EXPAND4(...) EXPAND3(EXPAND3(EXPAND3(EXPAND3(__VA_ARGS__)))) | |
#define EXPAND3(...) EXPAND2(EXPAND2(EXPAND2(EXPAND2(__VA_ARGS__)))) | |
#define EXPAND2(...) EXPAND1(EXPAND1(EXPAND1(EXPAND1(__VA_ARGS__)))) | |
#define EXPAND1(...) __VA_ARGS__ | |
#define FOR_EACH(macro, ...) \ |
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
[[source]] | |
url = "https://pypi.org/simple" | |
verify_ssl = true | |
name = "pypi" | |
[packages] | |
pandas = "2.0.3" | |
openpyxl = "3.1.2" | |
tabulate = "0.9.0" | |
scipy = "1.10.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
#!/bin/bash | |
export LC_ALL=en_US.utf8 | |
set -o nounset | |
set -o pipefail | |
set +o histexpand | |
RED='\033[0;31m' | |
YELLOW='\033[33m' | |
GREEN='\033[0;32m' |
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
#Requires AutoHotkey v2.0 | |
#SingleInstance Force | |
#NoTrayIcon | |
MINIMIZED := [] | |
STATE_MINIMIZED := -1 | |
return | |
; Win + Shift + Down = Minimize Window |
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
from argparse import ArgumentParser | |
from itertools import repeat | |
from pathlib import Path | |
import shutil | |
def main(args): | |
invalid_sources = filter(lambda path: not path.is_file(), args["source"]) | |
if (source := next(invalid_sources, None)): | |
print("Provided source doesn't exist: %s" % source.absolute()) |
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
from argparse import ArgumentParser | |
import logging | |
from pathlib import Path | |
import shutil | |
DLL_LOCATIONS = ( | |
Path("C:\Program Files (x86)\Common Files\SecurIT"), | |
Path("C:\Program Files (x86)\Zecurion\Endpoint") | |
) |
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
function New-Monorepo | |
{ | |
[CmdletBinding()] | |
Param( | |
[Parameter(Mandatory, Position=0)] | |
[string] $Path | |
) | |
Process | |
{ |
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
Require Import Coq.Init.Nat Coq.Arith.PeanoNat Coq.Numbers.NatInt.NZPow Coq.Numbers.NatInt.NZBits Lia. | |
Theorem shiftr_div_pow2 : forall (a n : nat), | |
shiftr a n = a / 2 ^ n. | |
Proof. | |
intros. Nat.bitwise. rewrite Nat.shiftr_spec'. symmetry. apply Nat.div_pow2_bits. | |
Qed. | |
Lemma shiftl_mul_pow2 : forall (a n : nat), | |
shiftl a n = a * 2 ^ n. |
NewerOlder