Skip to content

Instantly share code, notes, and snippets.

View vrthra's full-sized avatar

Rahul Gopinath vrthra

View GitHub Profile
@kylog
kylog / gist:7cff4f2eac5683de32d9
Last active August 29, 2015 14:02
FreeBSD installs for native facter
# these packages are new enough
pkg install git
pkg install cmake
pkg install boost-libs
# build/install yaml-cpp b/c the one provided by 'pkg' is too old
pkg install wget
wget https://yaml-cpp.googlecode.com/files/yaml-cpp-0.5.1.tar.gz
tar xzvf https://yaml-cpp.googlecode.com/files/yaml-cpp-0.5.1.tar.gz
cd yaml-cpp
@dhakkada
dhakkada / companion
Created September 13, 2012 18:58
Life and Companion
Someone, somewhere is made for you....
I had known this when I was a teenager. It was such a romantic and beautiful
feeling while nervously and curiously trying to know who that someone was!
Time passes and we grow. Yet, to believe that someone is just for you really
matters. In my journey it was a quest which was fulfilled eventually. Today,
when I think about my someone I feel so special. Day by day I feel attached to
this individual. When I think of other couples I bet those are the same feelings.
Most of us do get to meet someone who makes us feel that they are made of us.
Again the time passes and we grow. Sometimes these relationships changes, new
dynamics are encountered and we get a different frame of reference for the same
@martinlindhe
martinlindhe / gdb.rb
Created June 29, 2016 21:51 — forked from Congee/gdb.rb
For gdb to execute python3 script on OSX 10.10 or later
class UniversalBrewedPython < Requirement
satisfy { archs_for_command("python").universal? }
def message; <<-EOS.undent
A build of GDB using a brewed Python was requested, but Python is not
a universal build.
GDB requires Python to be built as a universal binary or it will fail
if attempting to debug a 32-bit binary on a 64-bit host.
EOS
@cheery
cheery / leo_algorithm.py
Created November 13, 2015 01:49
Leo algorithm?
from structures import *
# This is described in the marpa thesis.
# could someone check out that it's correct?
# Joop Leo presented a method for dealing with right
# recursion in O(n) time. With his modification, earley
# algorithm is O(n) for all LR-regular grammars.
# spot potential right recursions and memoize them.
# Leo restricts the memoization to where right recursion
@theSage21
theSage21 / regex-engine.py
Created May 14, 2016 07:24
A very simple regular expression engine for learning purposes
# Define some special things
SPECIAL = '*|'
ALPHABET = '10'
EPSILON = None
# functions
def automaton_print(automaton):
"Neatly prints the automaton"
states, alphabet, start, final, transfer = automaton
print('STATES : ', states)
@guedou
guedou / GhidraDecompiler.java
Last active March 3, 2022 10:39
Call the Ghidra decompiler from the command line
// Copyright (C) 2019 Guillaume Valadon <guillaume@valadon.net>
// This program is published under a GPLv2 license
/*
* Decompile a function with Ghidra
*
* analyzeHeadless . Test.gpr -import $BINARY_NAME -postScript GhidraDecompiler.java $FUNCTION_ADDRESS -deleteProject -noanalysis
*
*/
#!/bin/bash
# Convert a live CD iso so that it's bootable off of a USB stick
# Copyright 2007 Red Hat, Inc.
# Jeremy Katz <katzj@redhat.com>
#
# overlay/persistence enhancements by Douglas McClendon <dmc@viros.org>
# GPT+MBR hybrid enhancements by Stewart Adam <s.adam@diffingo.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
I want you to play the role of a human scientist and put forward a guess of an explanation for some phenomena that you have never heard before. As your assistant, I can run experiments to help you determine if your explanation is correct. Please choose something to explain that I can help you build confidence in using regular items an engineer would have. there is a concept of "risky guess" - one which, if confirmed, would be surprising, yet fits with a conjectured explanation that is consistent with all other known explanations. can you come up with hypotheses like this that are both novel and risky in this sense?
Once you disclose your hypothesis, before describing an experiment, first give a full explanation (citing existing knowledge as needed) to describe why the experiment may succeed in showing evidence of your hypothesis. Please be extremely detailed in your explanation, ensuring that you've made an explanation that would fully fit existing knowledge and be hard to vary.
@graydon
graydon / LLM.md
Created March 29, 2023 03:59 — forked from rain-1/LLM.md
LLM Introduction: Learn Language Models

Purpose

Bootstrap knowledge of LLMs ASAP. With a bias/focus to GPT.

Avoid being a link dump. Try to provide only valuable well tuned information.

Prelude

Neural network links before starting with transformers.