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
# Check IOMMU is working | |
# To ensure IOMMU has been enabled, check for the string Directed I/O, which will be prefixed with either DMAR or PCI-DMA. | |
dmesg | grep -i 'Directed I/O' |
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
# Languages | |
export LC_ALL="en_US.UTF-8" | |
export LANG="en_US.UTF-8" | |
# Brew | |
export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH" | |
export MANPATH="/home/linuxbrew/.linuxbrew/share/man:$MANPATH" | |
export INFOPATH="/home/linuxbrew/.linuxbrew/share/info:$INFOPATH" | |
# Windows |
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
$status = get-service -name "XTU3SERVICE" | Select-Object {$_.status} | format-wide | |
if ($status -ne "Running") { | |
start-service -name "XTU3SERVICE" | |
} | |
& 'C:\Program Files (x86)\Intel\Intel(R) Extreme Tuning Utility\Client\XTUCli.exe' -t -id 34 -v -140 | |
sleep 4 |
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
Python 57 mins █████████▌░░░░░░░░░░░ 45.8% | |
Bash 30 mins █████░░░░░░░░░░░░░░░░ 24.2% | |
YAML 16 mins ██▊░░░░░░░░░░░░░░░░░░ 13.1% | |
Nix 10 mins █▊░░░░░░░░░░░░░░░░░░░ 8.3% | |
JSON 6 mins █░░░░░░░░░░░░░░░░░░░░ 5.3% |
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 glob | |
from struct import unpack | |
marker_mapping = { | |
0xffd8: "Start of Image", | |
0xffe0: "Application Default Header", | |
0xffdb: "Quantization Table", | |
0xffc0: "Start of Frame", | |
0xffc4: "Define Huffman Table", |
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
# If we are a computer with nix available, then use that to setup | |
# the build environment with exactly what we need. | |
if has nix; then | |
use flake | |
fi | |
# Automatically setup a virtualenv | |
layout python | |
# Add well known WSL CUDA library |
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 { Token } from "@uniswap/sdk-core"; | |
import { abi as IUniswapV3PoolABI } from "@uniswap/v3-core/artifacts/contracts/interfaces/IUniswapV3Pool.sol/IUniswapV3Pool.json"; | |
import { Pool } from "@uniswap/v3-sdk"; | |
import { ethers } from "ethers"; | |
async function main() { | |
const provider = new ethers.providers.InfuraProvider(); | |
const poolAddress = "0x07a6e955ba4345bae83ac2a6faa771fddd8a2011"; |
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 { useEffect } from "react"; | |
import { | |
atom, | |
useRecoilCallback, | |
useRecoilValue, | |
useResetRecoilState, | |
useSetRecoilState, | |
} from "recoil"; | |
export const optionsState = atom<PositionOptions>({ |
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
terraform { | |
required_version = ">= 1.0.7" | |
required_providers { | |
google = { | |
source = "hashicorp/google" | |
version = "3.84.0" | |
} | |
google-beta = { | |
version = "3.84.0" |
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 shutil | |
from google.cloud import storage | |
from google.cloud.storage.blob import BlobWriter | |
import urllib.request | |
with urllib.request.urlopen("https://jsonplaceholder.typicode.com/todos/1") as f: | |
storage_client = storage.Client() | |
bucket = storage_client.get_bucket("cel-em-gcs-dpf-ing-01-dev") | |
blob = bucket.blob("foo.txt") | |
blob_file = blob.open(mode="wb", content_type="text/plain") |
OlderNewer