Skip to content

Instantly share code, notes, and snippets.

View kratsg's full-sized avatar

Giordon Stark kratsg

View GitHub Profile
@kratsg
kratsg / README.md
Last active July 19, 2021 20:34
Aeneas Alignment

Aligning Text with Aeneas

I've installed aeneas and I want to split text. Here's what I did. Taking the raw transcript from my captioner, I convert to plain text (on Mac OSX using textutil):

textutil 2021-01-28\ Machine\ Learning.rtf -convert txt

This gives me 2021-01-28\ Machine\ Learning.txt which I then process with split.py above (requires nltk):

@kratsg
kratsg / ATLASSUSY_ReproducibleSummaryPlots.ipynb
Last active December 7, 2023 10:59
ATLAS SUSY Reproducible Summary Plots
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@kratsg
kratsg / valgrind.cmd
Created September 15, 2017 06:38
valgrind command for mbj
valgrind --tool=memcheck --leak-check=full --show-leak-kinds=all --track-origins=yes --trace-children=yes --num-callers=8 --show-reachable=yes --suppressions=$ROOTSYS/etc/valgrind-root.supp --suppressions=valgrind-python.supp python MultibjetsAnalysis/scripts/MBJ_run.py --files "mc15_13TeV:mc15_13TeV.363372.Sherpa_NNPDF30NNLO_Zmumu_Pt140_280_BFilter.merge.DAOD_SUSY10.e4716_s2726_r7725_r7676_p2666" --inputSource grid --dataSource 1 --doTruth 0 --doWZReweighting 1 --doSyst 1 --doNTUPSyst 0 --baselineSelectionBT 3 --baselineSelectionHF 3 --doMuonCorrection 1 --doEWKvar 1 --doVRHiggs 1 --pTLepCount 20.0 --config MultibjetsAnalysis/SUSYTools_EW.conf --driver direct --nevents 10000 > valgrind10000.log 2>&1 &
@anythingcodes
anythingcodes / google-form-to-github-issue.md
Last active March 22, 2024 18:53
Generate GitHub Issue from Google Form submission

Generate GitHub Enterprise Issue from Google Form submission

To generate a nicely-formatted GitHub issue (even for GitHub Enterprise accounts) from a Google Form submission, you can use Google's script editor along with a GitHub personal access token that connects to the API. This is particularly useful when you need to triage bugs or feature requests directly to developers, but those who are submitting issues do not have access to your GitHub Enterprise instance.

Once this is up and running, on the development end, you can do some cool things within the body of each issue, like automatically closing GitHub issues via your commit messages and CCing your dev group or individual team members for each issue.

Here's how to set it up.

Step 1: Create Your Form

  • Go to Google Drive and create a form with fields
  • Click the Responses tab
@jgomezdans
jgomezdans / hessian.py
Created July 19, 2012 15:21
Finite difference approach to calculating the Hessian
#!/usr/bin/env python
"""
Some Hessian codes
"""
import numpy as np
from scipy.optimize import approx_fprime
def hessian ( x0, epsilon=1.e-5, linear_approx=False, *args ):
"""
@jimbojsb
jimbojsb / gist:1630790
Created January 18, 2012 03:52
Code highlighting for Keynote presentations

Step 0:

Get Homebrew installed on your mac if you don't already have it

Step 1:

Install highlight. "brew install highlight". (This brings down Lua and Boost as well)

Step 2:

@brendano
brendano / autolog.py
Created October 10, 2008 23:00
python decorators to log all method calls, show call graphs in realtime too
# Written by Brendan O'Connor, brenocon@gmail.com, www.anyall.org
# * Originally written Aug. 2005
# * Posted to gist.github.com/16173 on Oct. 2008
# Copyright (c) 2003-2006 Open Source Applications Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#