This file contains hidden or 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 Main where | |
import Control.Monad (forM_, mapM_) | |
import Control.Applicative ((<$>)) | |
import Data.Bifunctor (bimap, first, second) | |
import Data.Array.MArray (newArray, writeArray) | |
import Data.Array.ST (runSTArray) | |
import Data.Array (Array, bounds, (!)) | |
import Text.Read (readMaybe) |
This file contains hidden or 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/sh | |
wget --base=http://dl.xonotic.co/ -i maps.txt |
This file contains hidden or 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 python3 | |
import getpass | |
import crypt | |
import argparse | |
import sys | |
METHODS_DICT = dict((meth.name.lower(), meth) for meth in crypt.methods) | |
This file contains hidden or 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
Section "ServerLayout" | |
Identifier "X.org Configured" | |
Screen 0 "Screen0" 0 0 | |
InputDevice "Mouse0" "CorePointer" | |
InputDevice "Keyboard0" "CoreKeyboard" | |
EndSection | |
Section "Files" | |
ModulePath "/usr/lib/xorg/modules" | |
FontPath "/usr/share/fonts/X11/misc" |
This file contains hidden or 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 python3 | |
import os | |
import sys | |
import time | |
import fcntl | |
import socket | |
import signal | |
import argparse | |
import subprocess | |
import struct |
This file contains hidden or 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 cv2 | |
import numpy as np | |
import argparse | |
from collections import namedtuple | |
import time | |
def draw_rotated_rect(image, rect, color=(0, 255, 0), thickness=1): | |
vertices = np.round(rect.points()).astype(int) |
This file contains hidden or 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 python3 | |
import argparse | |
import time | |
import logging | |
import psutil | |
FILENAME_FORMAT = "/sys/devices/system/cpu/cpu{0:d}/power/pm_qos_resume_latency_us" | |
logger = logging.getLogger(__name__) |
This file contains hidden or 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
$ ./test | |
1.0 | |
0.1000 | |
0.112 | |
0.112 | |
2652 49490604 |
This file contains hidden or 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(echo_server). | |
-export([start/0, loop/2]). | |
-define(LISTEN_PORT, 1234). | |
start() -> | |
listen(). | |
listen() -> | |
{ok, LSock} = gen_tcp:listen(?LISTEN_PORT, [binary, {active, false}, | |
{reuseaddr, true}]), |
This file contains hidden or 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
cmake_minimum_required(VERSION 3.6) | |
project(CORE) | |
find_program(BASH bash HINTS /bin) | |
find_package(ZLIB) | |
if(NOT DEFINED BPFTOOL_PATH) | |
set(BPFTOOL_PATH "${CMAKE_CURRENT_SOURCE_DIR}/bin/bpftool") | |
endif() |