Skip to content

Instantly share code, notes, and snippets.

@mikea
mikea / kitty-tab.fish
Last active June 9, 2025 17:44
kitty-tab - fish command to open a new kitty tab in the current folder
# ~/.config/fish/functions/kitty-tab.fish
function kitty-tab
set sock (ls /tmp/mykitty-* | head -n 1)
if test (count $argv) -gt 0
kitty @ --to unix:$sock launch --type=tab --cwd=(pwd) fish -c (string join ' ' $argv)
else
kitty @ --to unix:$sock launch --type=tab --cwd=(pwd)
end
end
@mikea
mikea / betapdf.sql
Last active September 30, 2020 21:53
Computing gamma, beta and beta pdf functions in postgresql
-- numberical recipes 6.1
CREATE OR REPLACE FUNCTION gammaln(xx double precision) RETURNS double precision AS $$
DECLARE
x double precision;
tmp double precision;
ser double precision;
i integer;
cof double precision[] := ARRAY[
57.1562356658629235,
-59.5979603554754912,
@mikea
mikea / babel.conf.js
Created March 10, 2020 22:32
bluebird + webpacj
[
"@babel/plugin-transform-async-to-generator",
{
module: "bluebird",
method: "coroutine",
},
],
diff --git a/pipeline_v2/feature_schema.py b/pipeline_v2/feature_schema.py
index 680e231..1e7d600 100644
--- a/pipeline_v2/feature_schema.py
+++ b/pipeline_v2/feature_schema.py
@@ -55,17 +55,17 @@ column_types = {
'risk_inputs_session_ccn_had_deletion': pd.Int64Dtype(),
'risk_inputs_billing_address_is_commercial': pd.Int64Dtype(),
'risk_inputs_billing_address_resident_is_deceased': pd.Int64Dtype(),
- 'risk_inputs_ip_to_distinct_auth_decline_reasons': pd.Int64Dtype(),
- 'risk_inputs_shipping_address_matches_name': pd.Int64Dtype(),
diff --git a/pipeline_v2/feature_schema.py b/pipeline_v2/feature_schema.py
index 680e231..2186c46 100644
--- a/pipeline_v2/feature_schema.py
+++ b/pipeline_v2/feature_schema.py
@@ -55,7 +55,7 @@ column_types = {
'risk_inputs_session_ccn_had_deletion': pd.Int64Dtype(),
'risk_inputs_billing_address_is_commercial': pd.Int64Dtype(),
'risk_inputs_billing_address_resident_is_deceased': pd.Int64Dtype(),
- 'risk_inputs_ip_to_distinct_auth_decline_reasons': pd.Int64Dtype(),
+ 'risk_inputs_ip_to_distinct_auth_decline_reasons': np.str,
@mikea
mikea / devadvice.md
Last active August 24, 2019 16:32
Development Environment Advice

Invest into your development environment

Efficient setup makes it possible to produce changes in shortest time. Notice when you become (micro-)bored, distracted, frustrated: this is often because you have to do the same thing over and over or have to wait. Fix it.

Here’s some more specific advice on nurturing your development environment:

  • know it better: notice every tool you have to use, and try to study it (read man page, visit site, read docs)
  • keep all the things you need running all the time. don’t reboot your laptop if you can avoid it. Starting things up is a major time barrier. Measure uptime in weeks.
  • develop a morning routine: commit your changes to branches, pull, build, restart, merge all active prs, build&test them, push what you can.
  • get some understanding of bash. if what you do is mechanical (eg visit 3 windows and restart something in all of them) then figure out a way to do it in one command.

Keybase proof

I hereby claim:

  • I am mikea on github.
  • I am mikeaizatsky (https://keybase.io/mikeaizatsky) on keybase.
  • I have a public key ASA43y43bP0S0VqltRyXNrNGXh3gFly33AoWNU0cD_LxTwo

To claim this, I am signing this object:

struct Date {
Date() = delete;
class Reader;
class Builder;
class Pipeline;
};
alias docker-cleanup='docker ps -a -q | xargs -I {} docker rm {} ; docker images -q -f dangling=true | xargs -I {} docker rmi -f {}; docker volume ls -qf dangling=true | xargs -I {} docker volume rm {}'
===============
Unity generated
===============
Temp/
Library/
=====================================
Visual Studio / MonoDevelop generated
=====================================
ExportedObj/