Skip to content

Instantly share code, notes, and snippets.

View fabsta's full-sized avatar

Fabian Schreiber fabsta

View GitHub Profile

[TOC]

Apply function to column

df['TitleLength'] = df.Title.apply(len)

df.columns = map(str.lower, df.columns) # lowercase function to column
@fabsta
fabsta / Readme.md
Last active December 22, 2015 22:09
TreeFam gene tree widget

Readme file for the TreeFam gene tree widget

@fabsta
fabsta / index.html
Last active December 21, 2015 15:59
Species Tree View
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8">
<title>Gene tree</title>
<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"></script>
<link href="../libs/css/tipsy.css" rel="stylesheet" type="text/css" />
<!-- <link href="../libs/css/control_panel.css" rel="stylesheet" type="text/css" /> -->
@fabsta
fabsta / index.html
Last active December 21, 2015 15:59
<!DOCTYPE html>
<meta charset="utf-8">
<title>Hive Plots</title>
<style>
@import url(../style.css?20120427);
.axis {
stroke: #000;
stroke-width: 1.5px;
@fabsta
fabsta / perl.snippets
Created February 2, 2013 11:51
Perl code snippets for vim
# #!/usr/bin/perl
snippet #!
#!/usr/bin/perl
# Hash Pointer
snippet .
=>
# Function
snippet sub
sub ${1:function_name} {