Skip to content

Instantly share code, notes, and snippets.

@nlhepler
nlhepler / mythic_leads.rs
Last active February 8, 2023 03:18
quick-n-dirty brute-force optimizer for mythic leads in FN:STW
#[derive(Clone, Copy, Debug, Hash, PartialEq, Eq)]
enum Personality {
Adventurous,
Analytical,
Competitive,
Cooperative,
Curious,
Dependable,
Dreamer,
Pragmatic,
@nlhepler
nlhepler / example.cpp
Last active September 3, 2015 17:19
mono/multi-molecular integrator usage
// monomolecular
string mdl = "P6C4.NoCov"; // maybe we should just have a default model for each chemistry? e.g. just "P6C4"?
IntegratorConfig icfg; // ParameterTable::Default, minZScore=-5
string tpl = ...; // do POA
vector<string> reads = ...;
vector<tuple<size_t, size_t>> extents = ...; // get extents from POA
SNR snr = { ..., ..., ..., ... };
MonoMolecularIntegrator mmi(tpl, icfg, snr, mdl);
for (size_t i = 0; i < reads.size(); ++i)
{
@nlhepler
nlhepler / gist:7627f46d8df73ffec062
Last active August 29, 2015 14:09
patches to fix mono-3.10.0 parsing/relocation issues
diff --git a/mcs/mcs/cs-tokenizer.cs b/mcs/mcs/cs-tokenizer.cs
index 8637fda..9647a4b 100644
--- a/mcs/mcs/cs-tokenizer.cs
+++ b/mcs/mcs/cs-tokenizer.cs
@@ -1268,6 +1268,7 @@ namespace Mono.CSharp
int next_token;
int parens = 0;
int generics = 0;
+ int brackets = 0;