Skip to content

Instantly share code, notes, and snippets.

View Butch78's full-sized avatar
🎯
Focusing

Matthew Aylward Butch78

🎯
Focusing
View GitHub Profile
/// Implementation for the 1 Billion Row Challenge, set here: https://www.morling.dev/blog/one-billion-row-challenge/
use std::collections::BTreeMap;
use std::fmt::{Display, Formatter};
use std::fs::File;
use std::io::{BufRead, BufReader};
use std::str::FromStr;
use std::time::Instant;
struct Aggregate {
@Butch78
Butch78 / cargo.toml
Last active April 9, 2024 05:22
1BRC
[package]
name = "rust_1brc"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
polars = { version = "0.36.2", features = ["csv", "lazy", "nightly", "streaming"]}
@Butch78
Butch78 / pydanitc_factories_example.py
Last active July 1, 2023 06:18
An example of how to create Generic Factories with Pydantic Factories
from datetime import date, datetime
from enum import Enum
from pydantic import BaseModel, UUID4
from typing import Any, Dict, List, TypeVar, Union, Generic, Optional
from pydantic_factories import ModelFactory
class Species(str, Enum):
CAT = "Cat"
DOG = "Dog"
@Butch78
Butch78 / GitCommitEmoji.md
Created January 5, 2022 10:35 — forked from parmentf/GitCommitEmoji.md
Git Commit message Emoji
@Butch78
Butch78 / Base_Query.py
Last active May 14, 2022 21:22
Pydantic Query Object
# -------------------------------------------------
# BaseQuery Model
# -------------------------------------------------
# The Base schema for query objects
class BaseQuery(BaseModel):
skip: int = Query(0, title='Skip', description='How many pages to skip')
limit: int = Query(100, title='Limit',
description='The limit of results to be returned')
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Mail MailId="1510970148">
<ApprovalStatus>Approved</ApprovalStatus>
<Attachments>
<LocalFileAttachment attachmentId="949133621490188993">
<FileSize>10732</FileSize>
<FileName>170505 AJJV WGT Tender directory report.xlsx</FileName>
</LocalFileAttachment>
</Attachments>
<Attribute1>
@Butch78
Butch78 / CSVFile.java
Last active October 15, 2017 11:13
TempJava
package swindroid.suntime.calc;
import android.content.res.Resources;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.util.ArrayList;
@Butch78
Butch78 / Book.java
Created October 15, 2017 09:25
SimpleCustomList
package com.example.matthew.simplecustomerlist;
/**
* Created by Matthew on 12/10/2017.
*/
public class Book {
private String bookTitle;
@Butch78
Butch78 / CSVFile.java
Last active October 7, 2017 07:42
ListView Mobile App
package swindroid.suntime.calc;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.ArrayList;
/**
@Butch78
Butch78 / Form.java
Created September 27, 2017 12:55
ImageMetaDataEditor
package com.example.matthew.imagemetadataeditor;
import android.app.Activity;
import android.app.DatePickerDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.support.v7.app.AlertDialog;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;