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
#include <IOKit/IOKitLib.h> | |
#include <CoreFoundation/CoreFoundation.h> | |
#include <stdio.h> | |
#include <stdint.h> | |
#include <mach/mach_port.h> | |
typedef struct { | |
uint32_t spaceType; | |
uint32_t bitWidth; | |
uint64_t options; |
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
from selenium import webdriver | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.chrome.options import Options | |
from selenium.webdriver.support.ui import WebDriverWait | |
from selenium.webdriver.support import expected_conditions as EC | |
from selenium.webdriver.common.keys import Keys | |
import time | |
import subprocess | |
# Set up Chrome options to attach to an existing Chrome session |
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
\documentclass[11pt, letterpaper]{article} | |
\usepackage[utf8]{inputenc} | |
\usepackage[T1]{fontenc} | |
\usepackage[margin=1in]{geometry} | |
\usepackage{amsmath, amssymb} % For math symbols like \S | |
\usepackage{hyperref} | |
\usepackage{times} % Use Times New Roman font family | |
\hypersetup{ |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Secure File Upload</title> | |
<!-- Load JSEncrypt from a CDN --> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/jsencrypt/3.0.0-rc.1/jsencrypt.min.js"></script> | |
</head> | |
<body> | |
<form id="uploadForm" enctype="multipart/form-data"> |
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
# Download IRS 990 data set | |
# clean it it up, should load into memory | |
# populate good data structure for it | |
# list physical address with a sus number of nonprofits or dollar amount | |
# list accountants wiht sus number of nonprofits or dollar amount | |
# apply various statistical algorithms to detect money laundering |
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
yes "Write a better code in Python given a list of 1 million random integers between 1 and 100,000, find the difference between the smallest and the largest numbers whose digits sum up to 30.\n" | head -n 1000 | ollama run llama3.3:70b |
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
# Remember: The environment can be both x86_64 Linux, or https://github.com/pyodide/pyodide wasm32 with missing modules like subprocess. | |
import platform | |
import sys | |
import os | |
import socket | |
from datetime import datetime | |
import pkgutil | |
import urllib.request | |
import logging |
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
#generate a list of small primes represented as a u64 array that fit into an OS page. | |
#calculate their inverse mod u64 so we can test them without division | |
import subprocess | |
import os | |
import math | |
from typing import List, Tuple | |
def get_page_size() -> int: | |
"""Get the system's page size""" |
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 ctypes | |
import os | |
def get_compilers_with_dlopen(): | |
try: | |
# Load libc for system commands | |
libc = ctypes.CDLL("libc.so.6") | |
# Define popen from libc | |
libc.popen.restype = ctypes.c_void_p |
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/zsh | |
# Process bc package | |
tempdir=$(mktemp -d) | |
# Get bc source | |
cd $tempdir | |
brew fetch bc | |
brew unpack bc |
NewerOlder