Skip to content

Instantly share code, notes, and snippets.

@molly
molly / gist:5253701
Last active December 15, 2015 11:29
Text that causes issues with pandoc

CFM International CFM56

Infobox from CFM International CFM56 causes pandoc to fail to build.

{|{{Infobox aircraft begin
 |name= CFM56
 |image= File:CFM56 P1220759.jpg
 |alt=An exposed jet engine at a trade show. The rear of the polished metal fan case is visible on the left. The outer casing of the compressor section, covered in fuel lines and electrical wires is in to the right of the fan case. The right of the image shows the back of the engine, the exhaust area of the turbine section.
 |caption= Rear view of CFM56-5
}}
@molly
molly / secrets.py
Created February 21, 2014 15:20
secrets.py
C_KEY = ""
C_SECRET = ""
A_TOKEN = ""
A_TOKEN_SECRET = ""
GUARDIAN_KEY = ""
r'reddit\.com/(?:u(?:ser)?/(?P<user>.+?)(?:\Z|#|/)|r/(?P<sub>.+?)(?:/?\Z|/comments/(?P<id>.+?)(?:/?\Z|/(?P<title>.+?)(?:/?\Z|/(?P<cid>.+?)(?:/|#|\Z)))))'
//Includes/namespaces
#include <Rcpp.h>
using namespace Rcpp;
// Recursive session counting function
// [[Rcpp::export]]
int session_count(NumericVector x, int local_minimum) {
//Create output object
int count = 1;
@molly
molly / molly_R.R
Last active August 29, 2015 14:07 — forked from Ironholds/molly_R.R
intertimes <- function(x, local_minimum){
return(sum(x > local_minimum) + 1)
}
list = ["asdfasdfasdfaasdf", "asdfasdfasdfaasdf", "asdfasdfasdfaasdf", "asdfasdfasdfaasdf",
"asdfasdfasdfaasdf", "asdfasdfasdfaasdf"]
@molly
molly / jagged
Created October 23, 2014 01:58
Jagged arrays
a = [1, 2, 3]
b = [4, 5]
c = [6, 7, 8, 9, 10]
all = [a, b, c]
print(all)
# > [[1, 2, 3], [4, 5], [6, 7, 8, 9, 10]]
for y in all:
for contact in contacts
tr
td= contact.firstName
td= contact.lastName
td= contact.age
@molly
molly / gist:18d5efba978afb04f838
Last active August 29, 2015 14:21
list comprehension
holding = [x for x in holding if x != item]
equivalent to
new_holding = []
for x in holding:
if x != item:
new_holding.append(item)'
holding = new_holding

Keybase proof

I hereby claim:

  • I am molly on github.
  • I am molly0x57 (https://keybase.io/molly0x57) on keybase.
  • I have a public key ASCI587Ud0bgqtIGOVgHCnYyx_UTE1MyTK3IwUiCXZjnEgo

To claim this, I am signing this object: