Skip to content

Instantly share code, notes, and snippets.

@aht
aht / repro.md
Last active February 24, 2022 01:15
Reproduce make-format errors and issues due to typed-ast-1.4.3 for python 3.9.10 Darwin on feast v0.17.0-13-gb4d12bd0

Expected Behavior

make format and make lint should work and is able to format newly contributed code, not reformat the current code base.

Current Behavior

make format fails with ImportError undefined symbol _PyUnicode_DecodeUnicodeEscape due to issue with typed-ast 1.4.3 on python3.10 (python/typed_ast#169 , https://stackoverflow.com/questions/69912264/python-3-9-8-fails-using-black-and-importing-typed-ast-ast3).

(venv) ➜  feast git:(b4d12bd0) make format
# Sort
cd /Users/aht/src/feast/sdk/python; python -m isort feast/ tests/
import "container/ring"
// Use a goroutine to receive values from `out` and store them
// in an auto-expanding buffer, so that sending to `out` never blocks.
// Return a channel which serves as a sending proxy to to `out`.
func sendproxy(out chan<- int) chan<- int {
in := make(chan int, 100)
go func() {
n := 1000 // the allocated length of the circular queue
first := ring.New(n)
@aht
aht / Impreza
Last active June 16, 2020 00:11
shape issue
==================
training car_model = Impreza
==================
len(train_files) = 15272
len(val_files) = 2917
len(train_files) = 15272
len(val_files) = 2917
mkdir: Impreza: File exists
2020-06-15 17:10:06.090889: I tensorflow/core/profiler/lib/profiler_session.cc:159] Profiler session started.
FEATURES = ['CarSpeed', 'SteeringAngle', 'YawRate', 'Gx', 'Gy', 'CarSpeed_is_na', 'SteeringAngle_is_na', 'YawRate_is_na', 'Gx_is_na', 'Gy_is_na', 'TimeDiff']
#!/usr/bin/env python
import getpass
import os
import sys
## Application specific
SDK_DIR = '/usr/local/google_appengine'
APP_DIR = '/home/username/src/app'
APPID = 'something-awesome'
@aht
aht / gist:5097702
Created March 6, 2013 08:45
ansible postgres playbook with PostGIS on Ubuntu, setting up postgis_template and creating databases from this postgis_template
# Based on https://github.com/ansible/ansible/blob/devel/examples/playbooks/postgresql.yml
---
- hosts: postgres.vm
sudo: yes
tasks:
- name: ensure latest postgres & postgis packages are latest
action: apt pkg=$item update_cache=yes state=latest
with_items:
@aht
aht / xgb-workflow.sh
Last active September 21, 2016 20:26
xgb-workflow.sh
#!/bin/bash
set -e
SCRIPT_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
echo SCRIPT_DIR=$SCRIPT_DIR
cd $SCRIPT_DIR
S3_INPUT_URL=${1}
@aht
aht / README.md
Created March 27, 2016 21:36
fresh block
@aht
aht / README.md
Last active January 29, 2016 05:22 — forked from mbostock/.block
Reingold–Tilford Tree

The tree layout implements the Reingold-Tilford algorithm for efficient, tidy arrangement of layered nodes. The depth of nodes is computed by distance from the root, leading to a ragged appearance. Radial orientations are also supported. Implementation based on work by Jeff Heer and Jason Davies using Buchheim et al.'s linear-time variant of the Reingold-Tilford algorithm. Data shows the Flare class hierarchy, also courtesy Jeff Heer.

Compare to this radial layout.

@aht
aht / index.html
Created August 12, 2013 05:42
footest
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<link rel='stylesheet' href='http://nvd3.org/src/nv.d3.css'>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js' type='text/javascript'></script>
<script src='http://d3js.org/d3.v2.min.js' type='text/javascript'></script>
<script src='http://nvd3.org/nv.d3.js' type='text/javascript'></script>
<script src='http://nvd3.org/lib/fisheye.js' type='text/javascript'></script>
@aht
aht / index.html
Created August 12, 2013 05:27
Scatterplot
<!doctype HTML>
<meta charset = 'utf-8'>
<html>
<head>
<script src='http://polychart.com/s/third_party/polychart2.standalone.js' type='text/javascript'></script>
<style>
.rChart {
display: block;