Skip to content

Instantly share code, notes, and snippets.

View coralmw's full-sized avatar

Coral coralmw

View GitHub Profile
tumblr.com##article:not(:has(a[data-testid="tag-link"]:has-text(/ACAB|about|about me|abuse|acid|adderall|addict|addiction|adult|Alec Lightwood|Alice May|alpha|amphetamine|ana|anamia|animal abuse|antisemitism|anorexia|antiblackness|anxiety|armpits|arms|arse|ask to tag|ass|baby girl|back|balls|beaten|beating|begging|bbelcher|BDSM|beads|beard|bearded|belly|beta male|big|bimbo|binge|biphobia|bipolar|bitch|biting|BL|black tar|blonde|blood|body|body horror|body stims|bondage|bones|bong|booty|boys love|bra|breast|broken|brunette|bulimia|bulimic|burns|butt|cannibal|cannibalism|chopping|cocaine|COCSA|coke|concha|corpse|corset|CPTSD|crack|cream|CSA|cum|cut|cutting|CW|daddy|dailymlgifs|death|depression|diaper|dick|DILF|domestic abuse|donate|drool|drugs|dubcon|dying|dysphoria|eating disorder|eighteen|Eros|erotica|eye horror|eye trauma|feet|femaleidol|fentanyl|flashing|fucked|fucking|f4f|girl|girls|GL drama|goldie|gone wild|gore|gun |gunshot|guro|gynecology|hard|harassment|handcuffs|heels|heroin|hetero|high|high heels|hip
@coralmw
coralmw / modelsim_installation.md
Last active August 4, 2023 22:09 — forked from Razer6/modelsim_installation.md
Installing ModelSim on Ubuntu

ModelSim Installation issues

Installation requirements

The free version of Modelsim is a 32-bit binary and therefore requires certain 32-bit libraries in order to work correctly. For Ubunutu, install the following packages

sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32ncurses6 libxft2 libxft2:i386 libxext6 libxext6:i386 
@coralmw
coralmw / brightness.py
Created June 16, 2019 15:20
set connected monitor brightness.
#! /usr/bin/env python3
from plumbum import local
import argparse
parser = argparse.ArgumentParser(description='Set all connected monitor brightness.')
parser.add_argument("brightness", type=int, help="brightness percentage")
args = parser.parse_args()
ddcutil = local["/usr/local/bin/ddcutil"]
displays_output = ddcutil["detect"]()
# vague instructions for failing to repro the RedPitaya global timer crash in QEMU
git clone git://github.com/Xilinx/qemu.git Xqemu
cd Xqemu
git checkout xilinx-v2018.4
sudo apt install git libglib2.0-dev libfdt-dev libpixman-1-dev zlib1g-dev build-essential python
mkdir build && cd build
../configure --target-list="aarch64-softmmu,microblazeel-softmmu" --enable-fdt --disable-kvm --disable-xen
make -j
# obtain a Zynq image from https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18842389/Zynq+2014.4+Release?preview=/18842389/18849638/2014.4-release.tar.xz
@coralmw
coralmw / wtf
Created February 12, 2019 15:21
(base) ➜ ~ conda remove gcc
Solving environment: done
## Package Plan ##
environment location: /home/tparks/anaconda3
removed specs:
- gcc

Keybase proof

I hereby claim:

  • I am tomparks on github.
  • I am thomasparks (https://keybase.io/thomasparks) on keybase.
  • I have a public key ASDBRnlCtazmgH7n2LeTSCVJXGjzXi1x0weBFIliYzhgyQo

To claim this, I am signing this object:

@coralmw
coralmw / hashtext.jl
Created September 30, 2018 22:18
some cuda hash lookup code. probably not optimal!
using CUDAdrv, CUDAnative
using SparseArrays
NKMERS = 1000
NHAYSTACK = NKMERS * 10
# making a mapping bwteen 64bit "kmers" and "locations", 32bit ints.
# can't be stored in a dense array as 73 exabytes for 1000 values.
# so need some mapping. on CPU, we use a hashmap/dict. on GPU... more complex.
@coralmw
coralmw / log.md
Created September 27, 2018 14:15
Fedora 28 nvidia-docker

getting nvidia-docker installed on fedora:

  1. I had CUDA installed, with rpmfusion NVIDIA drivers (I think)
$ dnf list | grep nvidia
akmod-nvidia.x86_64                      3:396.54-1.fc28               @fedora-nvidia
cuda.x86_64                              1:9.2.148.1-2.fc28            @fedora-nvidia
cuda-cublas.x86_64                       1:9.2.148.1-2.fc28            @fedora-nvidia
cuda-cublas-devel.x86_64                 1:9.2.148.1-2.fc28            @fedora-nvidia
\usepackage{graphicx}
\newcommand\scalemath[2]{\scalebox{#1}{\mbox{\ensuremath{\displaystyle #2}}}}
#include <cfloat>
#include <cmath>
#include <cstdint>
#include <iostream>
int main(void){
float f;
uint64_t correct = 0;
uint64_t tried = 0;