I hereby claim:
- I am bradmerlin on github.
- I am melin (https://keybase.io/melin) on keybase.
- I have a public key ASCpXHWN4Pt1oQSO_ugKcQDqAe2G-i4kqKR7oUMJJYGSWwo
To claim this, I am signing this object:
class Slice(object): | |
def __init__(self, root, leng): | |
self.root = root # The original word | |
self.leng = leng # How many morphemes should be used as the prefix for the new portmanteau | |
self.morphemes = [] | |
self.output = '' # | |
self.slice() | |
def slice(self): | |
import re |
<?php | |
add_action('pre_get_posts', 'fix_title'); | |
function fix_title(){ | |
global $wp_query; | |
if ( $wp_query->is_post_type_archive && $wp_query->is_tax ) { | |
global $queried_object; | |
$queried_object = get_queried_object(); | |
$queried_object->labels = new stdClass(); | |
$queried_object->labels->name = $queried_object->name; | |
return $queried_object; |
$('.jp-volume-bar').mousedown(function() { | |
var parentOffset = $(this).offset(), | |
width = $(this).width(); | |
$(window).mousemove(function(e) { | |
var x = e.pageX - parentOffset.left, | |
volume = x/width | |
if (volume > 1) { | |
$("#JPID").jPlayer("volume", 1); | |
} else if (volume <= 0) { | |
$("#JPID").jPlayer("mute"); |
// Test for Media Query support | |
mediaQuery = function() { | |
if (window.matchMedia || window.msMatchMedia) { return true; } | |
return false; | |
} | |
// Remove queries. | |
removeMediaQueries = function(css) { | |
if (!mediaQuery()) { | |
while (css.match(/@media/) !== null) { // If CSS syntax is correct there should always be a "@media" str matching a "}\s*}" string |
function plot(points, diameter, offset){ | |
var x, y, | |
angle = 0, | |
links = $('nav a'), | |
increase = Math.PI * 2 / points; | |
for (var i=0; i <= points; i++) { | |
x = diameter * Math.cos(angle) + offset | |
y = diameter * Math.sin(angle) + offset | |
angle += increase |
I hereby claim:
To claim this, I am signing this object:
def dataframe_requires(column_names: List[str]): | |
""" | |
Wraps a function that takes a pandas.DataFrame as its first argument. | |
Ensures that functions wrapped by this can safely assume that the required | |
columns are available. | |
Also ensures that a copy of the given dataframe is used by the function to | |
prevent modifying parent dataframes kept in memory. |
def dataframe_requires(column_names: List[str]): | |
""" | |
Wraps a function that takes a pandas.DataFrame as its first argument. | |
Ensures that functions wrapped by this can safely assume that the required | |
columns are available. | |
Also ensures that a copy of the given dataframe is used by the function to | |
prevent modifying parent dataframes kept in memory. |