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 json | |
import sys | |
from datetime import datetime, timedelta | |
def parse(d): | |
return datetime.fromisoformat(d) | |
def proc(d): | |
s, e = map(parse, d) | |
return e - s |
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
use rayon::prelude::*; | |
use sha256::digest; | |
fn src(n: usize) -> String { | |
format!("zdimension/5900X/60MHs/{}", n) | |
} | |
fn hash(n: usize) -> String { | |
digest(src(n)) | |
} |
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
#include <netinet/ip.h> | |
#include <sys/socket.h> | |
#include <unistd.h> | |
#include <arpa/inet.h> | |
#include <string.h> | |
#include <stdio.h> | |
const char leng[] = "1025"; | |
/* Sends a *null-terminated* string to the specified port. |
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
A[32] B[32] Shift[5] CarryIn[1] Codop[4] S[32] Flags[4] | |
# NZCV | |
# A B Shift CarryIn Codop S Flags | |
# AND | |
11111111111111111111111111111111 11111111111111111111111111111111 00000 0 0000 11111111111111111111111111111111 1000 | |
11111111111111111111111111111111 11111111111111111111111111111111 00001 0 0000 11111111111111111111111111111111 1000 | |
11111111111111111111111111111111 11111111111111111111111111111111 01111 0 0000 11111111111111111111111111111111 1000 | |
11111111111111111111111111111111 11111111111111111111111111111111 11111 0 0000 11111111111111111111111111111111 1000 | |
11111111111111111111111111111111 11111111111111111111111111111111 00000 1 0000 11111111111111111111111111111111 1000 |
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
A[32] B[32] Shift[5] CarryIn[1] Codop[4] S[32] Flags[4] | |
# NZCV | |
# A B Shift CarryIn Codop S Flags | |
# AND | |
11111111111111111111111111111111 11111111111111111111111111111111 00000 0 0000 11111111111111111111111111111111 1000 | |
11111111111111111111111111111111 11111111111111111111111111111111 00001 0 0000 11111111111111111111111111111111 1000 | |
11111111111111111111111111111111 11111111111111111111111111111111 01111 0 0000 11111111111111111111111111111111 1000 | |
11111111111111111111111111111111 11111111111111111111111111111111 11111 0 0000 11111111111111111111111111111111 1000 | |
11111111111111111111111111111111 11111111111111111111111111111111 00000 1 0000 11111111111111111111111111111111 1000 |
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
identification division. | |
program-id. aoc3. | |
author. zdimension | |
environment division. | |
input-output section. | |
file-control. | |
*> expects input from stdin | |
select sysin assign to keyboard organization line sequential. |
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
;============================================================================== | |
; | |
; Fichier d'initialisation Emacs | |
; | |
; Creation date: Quelque part en 1984 !!! | |
; Last file update: 10-Sep-2001 21:36 (eg) | |
; | |
;============================================================================== | |
;============================================================================== |
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
use aes::cipher::{block_padding::Pkcs7, BlockDecryptMut, KeyIvInit}; | |
use itertools::Itertools; | |
use pbkdf2::pbkdf2_hmac_array; | |
use rayon::iter::ParallelBridge; | |
use rayon::iter::ParallelIterator; | |
use std::process::exit; | |
use chrono::Local; | |
type Aes128CbcDec = cbc::Decryptor<aes::Aes128>; | |
use sha1::Sha1; |
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 nicegui import ui, app | |
import alsaaudio as audio | |
cards = audio.cards() | |
card = cards[2] | |
assert card == "ICUSBAUDIO7D" | |
mixer = audio.Mixer("Speaker", cardindex=2) | |
def get_volume(): | |
return muted_volume or mixer.getvolume()[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
isatty (3) - test whether a file descriptor refers to a terminal | |
open (2) - open and possibly create a file | |
dup2 (2) - duplicate a file descriptor | |
close (2) - close a file descriptor | |
sigaction (2) - examine and change a signal action | |
execvp (3) - execute a file |
NewerOlder