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
"""Reads a har file from the filesystem, converts to CSV, then dumps to | |
stdout. | |
""" | |
import argparse | |
import json | |
from urllib.parse import urlparse | |
def main(harfile_path): | |
"""Reads a har file from the filesystem, converts to CSV, then dumps to |
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 pygame | |
import pygame_gui | |
import math | |
import pyaudio | |
import struct | |
SCREEN_X = 800 | |
SCREEN_Y = 600 | |
SCOPE_DIMS = (SCREEN_X//4, SCREEN_Y // 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
With the default mysqldump format, each record dumped will generate an individual INSERT command in the dump file (i.e., the sql file), each on its own line. This is perfect for source control (e.g., svn, git, etc.) as it makes the diff and delta resolution much finer, and ultimately results in a more efficient source control process. However, for significantly sized tables, executing all those INSERT queries can potentially make restoration from the sql file prohibitively slow. | |
Using the --extended-insert option fixes the multiple INSERT problem by wrapping all the records into a single INSERT command on a single line in the dumped sql file. However, the source control process becomes very inefficient. The entire table contents is represented on a single line in the sql file, and if a single character changes anywhere in that table, source control will flag the entire line (i.e., the entire table) as the delta between versions. And, for large tables, this negates many of the benefits of using a formal sourc |
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 pygame | |
import pygame_gui | |
import math | |
import pyaudio | |
import struct | |
SCREEN_X = 800 | |
SCREEN_Y = 600 | |
SCOPE_DIMS = (SCREEN_X//4, SCREEN_Y // 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
import pygame | |
import numpy as np | |
SCREEN_X = 256 | |
SCREEN_Y = 256 | |
GRID_SIZE = SCREEN_X //6 | |
CELL_W = SCREEN_X // GRID_SIZE | |
CELL_H = SCREEN_Y // GRID_SIZE |
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 pygame | |
import pygame_gui | |
import math | |
import pyaudio | |
import struct | |
SCREEN_X = 800 | |
SCREEN_Y = 600 | |
SCOPE_DIMS = (SCREEN_X//4, SCREEN_Y // 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
package main | |
import ( | |
"crypto/sha256" | |
"fmt" | |
"github.com/btcsuite/btcd/btcec" | |
"github.com/btcsuite/btcutil/base58" | |
"golang.org/x/crypto/ripemd160" | |
) |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<title>whatever</title> | |
<script> | |
/* | |
This is a completly disorganised mess of shoehorning old code into a new proof of concept. |
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 rand::Rng; | |
use std::io; | |
static HINT_HIGHER: &str = "higher"; | |
static HINT_LOWER: &str = "lower"; | |
fn main() { | |
println!("Guess the integer between 0 and 9."); | |
let target: u8 = rand::thread_rng().gen_range(1..10); |
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
<!DOCTYPE html> | |
<html><head> | |
<style> | |
.finfo-list{ | |
list-style: none; | |
display: flex; | |
flex-wrap: wrap; | |
align-items: flex-start; | |
flex-direction: row; | |
max-height: 80vh; |
NewerOlder