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
# OCP Setup | |
ocp_enable = True | |
try: | |
from ocp_vscode import show, show_all, reset_show, set_port, set_colormap, ColorMap, Camera, show_object | |
except ImportError: | |
ocp_enable = False | |
else: | |
set_port(3939) | |
reset_show() |
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
ARG VARIANT=bullseye | |
FROM debian:${VARIANT} | |
ENV DEBIAN_FRONTEND=noninteractive | |
ENV LC_ALL=C.UTF-8 | |
ENV LANG=C.UTF-8 | |
# Arguments | |
ARG CONTAINER_USER=esp | |
ARG CONTAINER_GROUP=esp | |
ARG ESP_BOARD=all |
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
extern crate microbench; | |
use std::{cmp::Ordering, time::Duration}; | |
// use criterion::{Criterion, criterion_group, criterion_main, black_box, PlottingBackend}; | |
// use pprof::criterion::{PProfProfiler, Output}; | |
// use pprof::flamegraph::Options as FGOptions; | |
use microbench::{Options, retain, bench}; | |
type DataLine = (u16, u16, u16, u16); |
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
# copy and paste oneliner below to run | |
# curl -s https://gist.githubusercontent.com/ilude/32aec45964bc1207810f7e6e49544064/raw/%21proxmox_setup.sh?$(date +%s) | /bin/bash -s | |
# Disable Commercial Repo | |
sed -i "s/^deb/\#deb/" /etc/apt/sources.list.d/pve-enterprise.list | |
# Add PVE Community Repo | |
echo "deb http://download.proxmox.com/debian/pve $(grep "VERSION=" /etc/os-release | sed -n 's/.*(\(.*\)).*/\1/p') pve-no-subscription" > /etc/apt/sources.list.d/pve-no-enterprise.list | |
# setup no nag script to run on upgrade |
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 | |
for dev in /dev/sd[b-q]; do | |
[ -e "$dev" ] || continue | |
fdisk "$dev" <<EEOF | |
g | |
n | |
w |
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
0eNrtXdtuHUeS/JUBn8VB173K2H1YYD9h92kwMGTpjE0sRQokNRjvwP++51C2RZ3T0ZUZIQzdwL7YFi1GZmV31yUjKvOfVz/cfjp8fLi5e7r67p9XN+/u7x6vvvvLP68eb368e3t7+tnTzx8PV99d3TwdPly9ubp7++H0p4e3N7dXv7y5url7f/jH1XfhlzfTX3k6/s7d9ePT/ccXvxgNv3hmKxl+5fCPjw+Hx8fro827x4/3D0/XPxxun16A5F/++ubqcPd083Rz+Dzg5z/8/P3dpw8/HB6OI5phvbn6eP94/PX7u5MXR8jrkP5c3lz9fPyvOP5cfjm5eQYaCdAwA00EaJyBZj/omGEWwtFlBlr9oG2G2fyYfYbZ/Zh1hjn8mNNXNCzEU5qCEl/T9BUN/q9p+jYF4mOag/o/pnlE/R/TPKD+b2n+Ovm/pelrH/zf0vSTD/5vafrJR/+nNJ1Do/9Lms+h0f8lzZel6P+U5stSJD6l+apMLEzxC+rx3TruK97fPBzeff4bcc0GsU7F4LRBrFsxOm0Q61gYThvEuhYXn43ELHPdaYPZQzanDWZLWZ02mB1mcdrI0n67g60xs+XMTs+r5HkDnjfpqIDi0aWzAkIdEiqIQF6kCCDUoBxsQABylE42CDUprqLxZ8lVhFqUUxgaf1WOYQi0KZ6i4XfFUwQ6lBMjGH5ZFFDgaQnKORR5GhVQ5GlSDrcINCugaPhFOTEjT6sCijxtwjEcOdoFTOTnUI72wNG6KKDA0xqEfAFyNAqYyM8k5CCQn1nARH4WIa+BMJVcCRq7kitBfnYBE/k5hPwL8LMtQv4FYQbBTzD2FgU/EWYS8kRo7FnJEyHQIjiKBl8VRxFoUxJaaPRdSWgh0KGAguH3RRk+Ag1K6g0MvxPL0sb5vK6ZSIrfKBjE51Wdfvs/tq2ky6oJ4tvrThPEl9icJojvcjhN+L/SrYTkmonh/2a38sOrJvxf8FZ6eNWE/3veyqSvmkhStr4AKjVLqBWgFikjj3ytEmq |
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 python2 | |
from __future__ import print_function | |
import requests | |
from bs4 import BeautifulSoup | |
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
[Unit] | |
Description=rocketmap | |
[Service] | |
ExecStart=~/rocketmap.sh | |
[Install] | |
WantedBy=multiuser.target |
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 maven:3.3-jdk-8-alpine | |
RUN mkdir -p /mnt/usrdata | |
RUN mkdir -p /usr/src/app | |
ADD . /usr/src/app | |
WORKDIR /usr/src/app | |
RUN mvn package | |
ENTRYPOINT java -cp target/pokemongo-game-master-2.7.0.jar com.pokebattler.gamemaster.GenerateJSON ./versions/latest/GAME_MASTER.protobuf |
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 gmpy2 as g | |
def approxPi(randomState, numTrials=5000, randbits=1024, prec=200): | |
"""Compute one approximation of pi using pairs of random numbers.""" | |
with g.local_context(g.get_context()) as ctx: | |
ctx.precision = prec | |
coprime = g.mpz(0) | |
for i in range(numTrials): | |
a = g.mpz_urandomb(randomState, randbits)+1 | |
b = g.mpz_urandomb(randomState, randbits)+1 |
NewerOlder