This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
# | |
# build-xnu-4903.221.2.sh | |
# Initial script by Brandon Azad (https://gist.github.com/bazad/654959120a423b226dc564073b435453) | |
# Updated on 12/11/18 by matteyeux | |
# | |
# A script showing how to build XNU version 4570.1.46 on MacOS High Sierra | |
# 10.13 with Xcode 9. | |
# | |
# Note: This process will OVERWRITE files in Xcode's MacOSX10.13.sdk. Make a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <errno.h> | |
#include <fcntl.h> // open | |
#include <stdint.h> | |
#include <stdio.h> // printf, fprintf, stderr | |
#include <stdlib.h> // exit | |
#include <string.h> // strerror, strncmp | |
#include <sys/mman.h> // mmap | |
#include <sys/stat.h> // fstat | |
#include <mach-o/loader.h> | |
#include <mach-o/nlist.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
""" | |
a proof of concept implementation of SQLite FTS tokenizers in Python | |
""" | |
from __future__ import print_function, unicode_literals | |
import sys | |
import ctypes | |
from ctypes import POINTER, CFUNCTYPE | |
import struct |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* bling.js | |
*/ | |
window.$ = document.querySelectorAll.bind(document); | |
window.$id = document.getElementById.bind(document); | |
Array.prototype.each = Array.prototype.forEach; | |
NodeList.prototype.__proto__ = Array.prototype; | |
NodeList.prototype.on = function(name, delegate, fn) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"vars": { | |
"@gray-base": "#000", | |
"@gray-darker": "lighten(@gray-base, 13.5%)", | |
"@gray-dark": "lighten(@gray-base, 20%)", | |
"@gray": "lighten(@gray-base, 33.5%)", | |
"@gray-light": "lighten(@gray-base, 46.7%)", | |
"@gray-lighter": "lighten(@gray-base, 93.5%)", | |
"@brand-primary": "darken(#428bca, 6.5%)", | |
"@brand-success": "#5cb85c", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from scipy.sparse import csc_matrix | |
def pageRank(G, s = .85, maxerr = .001): | |
""" | |
Computes the pagerank for each of the n states. | |
Used in webpage ranking and text summarization using unweighted | |
or weighted transitions respectively. |