Skip to content

Instantly share code, notes, and snippets.

View hellow554's full-sized avatar
💭
/(°□°)/ ︵ ┻━┻

Marcel Hellwig hellow554

💭
/(°□°)/ ︵ ┻━┻
  • Hamburg, Germany
View GitHub Profile
use petgraph::prelude::*;
use regex_syntax::hir::{self, Hir, HirKind};
use regex_syntax::ParserBuilder;
use std::collections::{HashMap, HashSet};
use std::ops::Add;
type MyGraph = DiGraph<Pos, f32>;
type GraphMap = HashMap<Pos, NodeIndex>;
#[derive(Debug, Default, Clone, Copy, Hash, PartialEq, Eq)]
use std::collections::VecDeque;
fn solve_a(players: u32, last_marble: u32) -> u32 {
let mut score = vec![0; players as usize];
let mut playfield = VecDeque::new();
let mut cur_pos = 1usize;
playfield.push_back(0);
playfield.push_back(1);
@hellow554
hellow554 / Kernel Oops
Last active August 2, 2018 13:47
Kernel Panic
[ 1125.090000] Unable to handle kernel paging request at virtual address c14fe63a
[ 1125.100000] pgd = c14d8000
[ 1125.100000] [c14fe63a] *pgd=8140041e(bad)
[ 1125.100000] Internal error: Oops: 1 [#1] PREEMPT ARM
[ 1125.100000] Modules linked in:
[ 1125.100000] CPU: 0 Not tainted (3.4.113 #1)
[ 1125.100000] PC is at udp_recvmsg+0x284/0x33c
[ 1125.100000] LR is at 0x0
[ 1125.100000] pc : [<c0228adc>] lr : [<00000000>] psr: a0000013
#! /bin/bash
SC=https://raw.githubusercontent.com/astraw/svg_stack/master/svg_stack.py
SC_TMP=$(mktemp)
SVG=$(mktemp)
TMP_SVG=$(mktemp)
TMP_TMP_SVG=$(mktemp)
cat << EOF > $SVG
<?xml version="1.0" encoding="utf-8"?>
from myhdl import *
from functools import wraps
from argparse import *
from unittest import main
import sys
_trace = False
def testmain():
from myhdl import *
R0 = 0
R1 = 1
R2 = 2
R3 = 3
R4 = 4
R5 = 5
R6 = 6
R7 = 7