Skip to content

Instantly share code, notes, and snippets.

@lhl2617
lhl2617 / sir.js
Last active April 5, 2020 13:04
Simple SIR model with JS and Python
// by lhreeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee (I don't remember how many e's)
// NOTE I might've edited sections for correctness/improvements/issues!
/*
Please first copy & paste the contents, starting from line 5, from
https://github.com/scijs/ode-rk4/blob/master/lib/index.js
<for the motivated>
...alternatively you can use the npm package and install `ode-rk4` and use
// NB written for Linux g++, replace the #include with indiv. headers if required.
// C++11 used.
#include <bits/stdc++.h>
using namespace std;
#define LOG_DEBUG 0 // enable debug
#define debug if (!LOG_DEBUG) {} else cerr
@lhl2617
lhl2617 / log.do_populate_sysroot.5829
Last active July 31, 2020 10:57
perl-native-5.24.1-r0 build error
DEBUG: Executing python function sstate_task_prefunc
DEBUG: Python function sstate_task_prefunc finished
DEBUG: Executing python function do_populate_sysroot
DEBUG: Executing shell function sysroot_stage_all
0 blocks
0 blocks
0 blocks
DEBUG: Shell function sysroot_stage_all finished
DEBUG: Executing python function sysroot_strip
WARNING: File '/Wedge100/clean-attempt/openbmc/build/tmp/work/x86_64-linux/perl-native/5.24.1-r0/recipe-sysroot-native/usr/lib/perl-native/perl/5.24.1/auto/arybase/arybase.so' from perl-native was already stripped, this will prevent future debugging!
ERROR: perl-native-5.24.1-r0 do_populate_sysroot: Error executing a python function in exec_python_func() autogenerated:
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
0001:
*** 0002:sstate_hardcode_path(d)
0003:
File: '/Wedge100/clean-attempt/openbmc/yocto/rocko/poky/meta/classes/sstate.bbclass', lineno: 574, function: sstate_hardcode_path
0570: # This has the side effect of making sure the vfs cache is hot
0571: sstate_hardcode_cmd = "%s | xargs %s | %s | xargs %s %s" % (sstate_scan_cmd, sstate_grep_cmd, sstate_filelist_cmd, xargs_no_empty_run_cmd, sstate_sed_cmd)
<div class="col-md-4">
<div class="work-box">
<div id="chrome-inline-content" style="display: none;">
<img src="assets/img/chrome-popup.png" alt="" style="width: 60%; display: block; margin: auto;">
<h3 style="text-align: center; margin-left: 20px; margin-right: 20px;">Chromium Project Contributions
</h3>
<h5 style="text-align: center; margin-left: 20px; margin-right: 20px;">
Languages Used: C++, HTML, CSS, Javascript, Perl Data Language
</h5>
<p style="text-align: center; margin-left: 20px; margin-right: 20px;">

SOMAS Infra SLA 0.0.1

Infra Goals

  • To provide a low maintenance platform for the SOMAS coursework
  • To ensure developers working on SOMAS logic do not need to bother much on infra, effectively segregating the responsibility between infra/non-infra
  • To ensure high availability and reliability of the platform
  • To maintain a platform that acts in everyone's interests to reach all SOMAS goals

Design Requirements

Final tutorial

Why do markets sometimes fail? Describe one cause of market failure, and explain what might be done about it.

  • Externalities, Information Assymmetry, etc.

Is a rise in the money supply inevitably inflationary?

  • No. See Quantity Theory.
@lhl2617
lhl2617 / 1.txt
Last active February 4, 2021 18:40
solvers
[/tmp/fuzz-sat-07-92cfc10111709ee7/fuzz-sat-07-hardcoded-input-3603873-0.cnf]: RUNNING
[/tmp/fuzz-sat-07-92cfc10111709ee7/fuzz-sat-07-hardcoded-input-3603873-2.cnf]: RUNNING
[/tmp/fuzz-sat-07-92cfc10111709ee7/fuzz-sat-07-hardcoded-input-3603873-1.cnf]: RUNNING
[/tmp/fuzz-sat-07-92cfc10111709ee7/fuzz-sat-07-hardcoded-input-3603873-3.cnf]: RUNNING
[/tmp/fuzz-sat-07-92cfc10111709ee7/fuzz-sat-07-hardcoded-input-3603873-4.cnf]: RUNNING
[/tmp/fuzz-sat-07-92cfc10111709ee7/fuzz-sat-07-hardcoded-input-3603873-5.cnf]: RUNNING
[/tmp/fuzz-sat-07-92cfc10111709ee7/fuzz-sat-07-hardcoded-input-3603873-0.cnf]: FINISHED WITH ExitCode: ExitFailure 1
[/tmp/fuzz-sat-07-92cfc10111709ee7/fuzz-sat-07-hardcoded-input-3603873-2.cnf]: FINISHED WITH ExitCode: ExitFailure 1
[/tmp/fuzz-sat-07-92cfc10111709ee7/fuzz-sat-07-hardcoded-input-3603873-3.cnf]: FINISHED WITH ExitCode: ExitFailure 1
[/tmp/fuzz-sat-07-92cfc10111709ee7/fuzz-sat-07-hardcoded-input-3603873-5.cnf]: FINISHED WITH ExitCode: ExitSuccess
@lhl2617
lhl2617 / gist:78c612fca337cafa1df0ef344535ecb9
Last active March 18, 2021 12:29
~/.bashrc additions to setup CUDA on doc.
export PATH=$PATH:/vol/cuda/10.1.105-cudnn7.6.5.32/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/vol/cuda/10.1.105-cudnn7.6.5.32/lib64:/vol/cuda/10.1.105-cudnn7.6.5.32/lib
if [ -f /vol/cuda/10.1.105-cudnn7.6.5.32/setup.sh ]
then
. /vol/cuda/10.1.105-cudnn7.6.5.32/setup.sh
fi
export CUDA_HOME=/vol/cuda/10.1.105-cudnn7.6.5.32
@lhl2617
lhl2617 / gist:cde02a632036634727129378a104e209
Last active March 18, 2021 12:28
requirements.txt for DL
absl-py==0.11.0
appdirs==1.4.4
astunparse==1.6.3
black==20.8b1
cachetools==4.2.1
certifi==2020.12.5
cffi==1.14.5
chardet==4.0.0
click==7.1.2
cloudpickle==1.6.0