Skip to content

Instantly share code, notes, and snippets.

View NateBrune's full-sized avatar
📈
decentralizing

Nate Brune NateBrune

📈
decentralizing
  • Reckless Capital
  • CA
View GitHub Profile
@folz
folz / genetics.py
Created January 28, 2011 02:36
Genetic programming in python
#!/usr/bin/env python
from random import random, randint, choice
from copy import deepcopy
from math import log
TAB = " "
### classes ##
#include <efi.h>
#include <efilib.h>
EFI_STATUS get_memory_map(EFI_SYSTEM_TABLE *systab, EFI_MEMORY_DESCRIPTOR *map, UINTN *key) {
UINTN size = sizeof(EFI_MEMORY_DESCRIPTOR);
EFI_STATUS status = EFI_LOAD_ERROR;
while (status != EFI_SUCCESS) {
// Spec says we should give it some extra space.
size += sizeof(EFI_MEMORY_DESCRIPTOR) * 2;
commit 3f5e3bdbb45bc2cd9ae95972420eb11b0340f120
Author: Matthew Garrett <mjg59@coreos.com>
Date: Mon Feb 1 13:31:00 2016 +1100
Block most UEFI variable deletions
Some systems appear to become upset if certain UEFI non-volatile variables
are delted, to the point of no longer POSTing successfully. For a short-term
fix, let's just block deletion of most variables while we figure out a
better approach.