Skip to content

Instantly share code, notes, and snippets.

View lissahyacinth's full-sized avatar

Lissa Hyacinth lissahyacinth

View GitHub Profile
pub enum Direction {
Left,
Right,
Up,
Down,
UpperLeft,
UpperRight,
DownLeft,
DownRight,
}
@lissahyacinth
lissahyacinth / pyarrowmetatest.py
Created October 28, 2021 08:55
Stripped down PyArrow Metatest
import ast
import base64
import itertools
import os
import signal
import struct
import tempfile
import threading
import time
import traceback
from typing import TypeVar, Generic, Union, Optional
from dataclasses import dataclass
from enum import Enum, auto
carrier = TypeVar('carrier')
item = TypeVar('item')
@dataclass
class List(Generic[item]):
def cata(self,a):
minikube start --memory=8gb --cpus=4 --driver=docker --kubernetes-version=v1.17.17 \
--extra-config=apiserver.service-account-signing-key-file=/var/lib/minikube/certs/sa.key \
--extra-config=apiserver.service-account-key-file=/var/lib/minikube/certs/sa.pub \
--extra-config=apiserver.service-account-issuer=kubernetes.default.svc.cluster.local \
--extra-config=apiserver.service-account-api-audiences=api,spire-server,nats \
--extra-config=apiserver.authorization-mode=Node,RBAC \
--extra-config=kubelet.authentication-token-webhook=true
#![cfg(feature = "native")] // required for data i/o
extern crate coaster_blas as co_blas;
extern crate coaster as co;
use std::fmt;
use crate::co::backend::{Backend, IBackend};
use crate::co::framework::{IFramework};
use crate::co::plugin::numeric_helpers::{cast, Float, NumCast};
@lissahyacinth
lissahyacinth / column_dyn.rs
Last active August 11, 2019 23:02
RustDyn
pub fn map_column<'a, ColumnType: 'static, A: 'static, B: 'static>(
column_data: &'a ColumnInformation<ColumnType>,
column_idx: usize,
indexes: &[usize],
map_fn: A,
) -> Box<dyn Iterator<Item = B> + 'a>
where
A: Fn(ColumnType) -> B,
ColumnType: std::clone::Clone,
{
@lissahyacinth
lissahyacinth / .zshrc
Last active June 10, 2019 10:32
zsh profile
# Path to your oh-my-zsh installation.
export ZSH="~/.oh-my-zsh"
# Set name of the theme to load --- if set to "random", it will
# load a random theme each time oh-my-zsh is loaded, in which case,
# to know which specific one was loaded, run: echo $RANDOM_THEME
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
ZSH_THEME="agnoster"
plugins=(git osx history)
@lissahyacinth
lissahyacinth / bash_profile
Last active June 4, 2019 13:17
Current Bash Profile
# Aliases
alias ls='exa -la --git --header'
alias cat='bat'
alias java_ls='/usr/libexec/java_home -Vq 2>&1 | grep -E "\d\.\d\.\d(_\d+)?.*," | cut -d , -f 1 | cut -c 5-'
# Changing Prompt for Bash
inside_git_repo="\$(git rev-parse --is-inside-work-tree 2>/dev/null)"
#Exports for Ruby Installation
export CC=clang
let reducable a b =
{code for aA reducing to nothing etc}
let rec solve a x =
if a.length = 0
then match x with
# a :: b indicates that x is being split into a - the head and b - the tail of the list.
# [] indicates an empty element
elem :: list_of_elems -> (solve elem list_of_elems)
// Design copied from emk's Rust Streaming (github.com/emk/rust-streaming)
use std::cell::Cell;
pub struct StreamingView<'a, T> {
cur: Cell<usize>,
limit: usize,
reference: &'a[T]
}
#[macro_export]