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
// static/scripts/fixedsearch/fixedsearch.js | |
/*-------------------------------------------------------------- | |
fixedsearch — Super fast, client side search for Hugo.io with Fusejs.io | |
based on https://gist.github.com/cmod/5410eae147e4318164258742dd053993 | |
--------------------------------------------------------------*/ | |
if (typeof variable !== 'undefined') { | |
console.log('fixedsearch.js already loaded'); | |
} else { | |
fixedsearch = function(){ |
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 | |
# Wrapper script for git mergetool | |
# This requires the .gitconfig file to have: | |
# - mergetool entry for "wdiff"; | |
# - mergetool entry for "fw_def"; | |
# These merge tool entries must both specify the | |
# cmd field. The command to call this script: | |
# [mergetool "merge_wrapper"] | |
# cmd = $HOME/merge-wrapper \"$BASE\" \"$LOCAL\" \"$REMOTE\" \"$MERGED\" | |
# Locate this script in your $HOME |
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
# | |
# Copyright (C) 2010-2012 Vinay Sajip. All rights reserved. Licensed under the new BSD license. | |
# | |
import ctypes | |
import logging | |
import os | |
class ColorizingStreamHandler(logging.StreamHandler): | |
# color names to indices | |
color_map = { |
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
from __future__ import with_statement | |
import random | |
def create_chain(file_paths): | |
markov_chain = {} | |
word1 = "\n" | |
word2 = "\n" | |
for path in file_paths: | |
with open(path) as file: | |
for line in file: |