Skip to content

Instantly share code, notes, and snippets.

Mike Aizatsky mikea

Block or report user

Report or block mikea

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:1722b30f519d1276fa110e8d141f1559
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(),
View gist:e01b5d5a66e362e3822f127154cda0a1
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 Aug 24, 2019
Development Environment Advice
View devadvice.md

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.
View keybase.md

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:

View test.cpp
struct Date {
Date() = delete;
class Reader;
class Builder;
class Pipeline;
};
View docker-cleanup
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 {}'
View gist:3c4b8fa5ab7f08b9ba58
===============
Unity generated
===============
Temp/
Library/
=====================================
Visual Studio / MonoDevelop generated
=====================================
ExportedObj/
@mikea
mikea / gist:6493bdccad356297d471
Last active Sep 13, 2015
LazyGroupBy for RxJava
View gist:6493bdccad356297d471
public static <K, T> Observable.Transformer<T, Pair<K, Observable<T>>> lazyGroupBy(
final Func1<? super T, ? extends K> keySelector) {
return new Observable.Transformer<T, Pair<K, Observable<T>>>() {
@Override
public Observable<Pair<K, Observable<T>>> call(Observable<T> observable) {
return Observable.create(s -> {
Map<K, Subscriber<? super T>> children = new HashMap<>();
Multimap<K, T> buffer = ArrayListMultimap.create();
Set<K> createdObservers = new HashSet<>();
View docker-cleanup
#!/bin/sh
# Cleanup docker files: untagged containers and images.
#
# Use `docker-cleanup -n` for a dry run to see what would be deleted.
untagged_containers() {
# Print containers using untagged images: $1 is used with awk's print: 0=line, 1=column 1.
# NOTE: "[0-9a-f]{12}" does not work with GNU Awk 3.1.7 (RHEL6).
# Ref: https://github.com/blueyed/dotfiles/commit/a14f0b4b#commitcomment-6736470
docker ps -a | tail -n +2 | awk '$2 ~ "^[0-9a-f]+$" {print $'$1'}'
@mikea
mikea / gist:4c053e72a60d6f187cb6
Created Jun 12, 2014
Put cursor on ints in Arrays.asList expression and invoke Analyze Dataflow To Here
View gist:4c053e72a60d6f187cb6
public class Test {
private static void foo(String value, int...ints) {
System.out.println(value + " " + Arrays.asList(ints));
}
private static void bar(String value, int...ints) {
foo(value, ints);
}
private static void baz(String value) {
You can’t perform that action at this time.