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 functools import reduce | |
from operator import and_, or_ | |
def select(df, **kwargs): | |
'''Builds a boolean array where columns indicated by keys in kwargs are tested for equality to their values. | |
In the case where a value is a list, a logical or is performed between the list of resulting boolean arrays. | |
Finally, a logical and is performed between all boolean arrays. | |
''' | |
res = [] |
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 matplotlib.patches import Ellipse | |
def plot_point_cov(points, nstd=2, ax=None, **kwargs): | |
""" | |
Plots an `nstd` sigma ellipse based on the mean and covariance of a point | |
"cloud" (points, an Nx2 array). | |
Parameters |
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 <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <unistd.h> | |
#include <fcntl.h> | |
#include <errno.h> | |
#include <linux/input.h> | |
#include <linux/uinput.h> | |
#define die(str, args...) do { \ |
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
{ | |
"draw_white_space": "all", | |
"font_size": 11, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"rulers": | |
[ | |
80, |