Skip to content

Instantly share code, notes, and snippets.

View alokito's full-sized avatar

Alok Saldanha alokito

  • Novartis Institutes of Biomedical Research
  • Cambridge, MA
View GitHub Profile
@alokito
alokito / ufunc_a_python_func.ipynb
Last active September 29, 2021 01:03 — forked from wusixer/ufunc_a_python_func.ipynb
Vectorize a python function to speed up computation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@alokito
alokito / README.md
Last active May 26, 2019 16:22 — forked from sxywu/README.md
The Force with React + D3, Approach #2 (smooth drag)

This is a fork of The Force with React + D3, Approach #2 with force.drag applied to the entire selection nodes rather than the just the appended circles. This results in smoother dragging behavior as you can tell by dragging a circle in this gist vs the original (click on link to compare). See the "Revisions" for details on the change.

React + D3 exploration with the force layout:

  • React for structure
  • D3 for data calculation
  • D3 AND React for rendering
    • React for enter/exit
    • D3 for update