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
def radix_tree_push_last_subtree_down(tree, level, segment_index): | |
prev_word_old_segment, prev_word_old_next_child_pos = tree[level][-1] | |
assert segment_index < len(prev_word_old_segment) | |
prev_word_new_segment_prefix = prev_word_old_segment[:segment_index] | |
prev_word_new_segment_suffix = prev_word_old_segment[segment_index:] | |
tree[level][-1] = (prev_word_new_segment_prefix, prev_word_old_next_child_pos) | |
old_next_level = tree[level + 1][prev_word_old_next_child_pos:] | |
tree[level + 1] = tree[level + 1][:prev_word_old_next_child_pos] |
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
#!/usr/bin/env python3 | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import matplotlib.animation as animation | |
from collections import namedtuple | |
import heapq | |
fig, ax = plt.subplots() | |
fig.tight_layout() | |
ax.set_axis_off() |
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
#!/usr/bin/env python3 | |
''' | |
Original idea by red Ants Aasma at | |
http://stackoverflow.com/a/1667789/2122529 | |
''' | |
import numpy as np | |
import numpy.random as rnd | |
import itertools | |
import matplotlib.pyplot as plt |
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 <avr/io.h> | |
#include <avr/interrupt.h> | |
#include <avr/sleep.h> | |
#include <stdint.h> | |
// First four bits encode morse code - 1 is dash and 0 is dot | |
// then goes length of code | |
char message[] = { | |
0x04, // .... - H | |
0x01, // . - E |
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 "Test1.h" | |
#include "PhysInstancedStaticMeshComponent.h" | |
#include "PhysXIncludes.h" | |
#include "PhysicsPublic.h" | |
#include "Private/PhysicsEngine/PhysXSupport.h" | |
UPhysInstancedStaticMeshComponent::UPhysInstancedStaticMeshComponent(const FObjectInitializer& initializer) | |
: Super(initializer) | |
{ |
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 | |
PREFIX=$(readlink -m $(dirname $0)) | |
if [[ ! $(command -v wget) && ! $(command -v curl) ]]; then | |
echo "You need either 'wget' or 'curl' programm to download necessary files" | |
exit 1 | |
fi | |
if [[ ! $(command -v perl) ]]; then | |
echo "You'll need some perl. Consider installing it." |
NewerOlder