This gist demonstrates how to setup a python project that process a numpy array from C language.
To compile the project, run
make all
To test it, run
make test
| # Knowledge system for AI-run scientific experiments | |
| ## Core idea | |
| This note proposes a knowledge system for long-running scientific projects where AI agents can execute experiments: machine learning, computational physics, computational biology, and similar domains with automated evaluation loops. The pattern is drawn from a year of operating an Obsidian-vault-backed lab notebook alongside a Claude Code agent on an event-vision ML project, but the structure generalizes. | |
| Auto-research systems such as [Sakana AI's AI Scientist](https://sakana.ai/ai-scientist/) and [Hugging Face's ml-intern](https://github.com/huggingface/ml-intern) already show how agents can generate ideas and execute individual experiments. For projects that run for months, the harder problem is keeping accumulated knowledge organized so both the agent and the human can return later and pick up the thread. | |
| The system below treats the project notebook as a layered, queryable knowledge base. Each layer is defined by who writes it, who read |
| """ | |
| Reference: | |
| 1. https://gist.github.com/ycopin/3342888 | |
| 2. http://matplotlib.org/mpl_toolkits/axes_grid/users/overview.html#axisartist | |
| """ | |
| import numpy as np | |
| import matplotlib.pyplot as plt |
This gist demonstrates how to setup a python project that process a numpy array from C language.
To compile the project, run
make all
To test it, run
make test
| { | |
| "cells": [ | |
| { | |
| "cell_type": "code", | |
| "execution_count": 48, | |
| "metadata": { | |
| "collapsed": true | |
| }, | |
| "outputs": [], | |
| "source": [ |
| # Calculate Pi using monte carlo method | |
| function estimate_pi_vec() | |
| # Vectorized way of calculating Pi | |
| # This style is commonly seen in python or Matlab/Octave to avoid for loops | |
| samplenum=100000000 | |
| mc_x=rand(samplenum,1) | |
| mc_y=rand(samplenum,1) |
| { | |
| "metadata": { | |
| "language": "Julia", | |
| "name": "", | |
| "signature": "sha256:999e48e1cfeb072e56d4089a89783a9483f6c014acc704990d74ba7079a57434" | |
| }, | |
| "nbformat": 3, | |
| "nbformat_minor": 0, | |
| "worksheets": [ | |
| { |
| { | |
| "metadata": { | |
| "language": "Julia", | |
| "name": "", | |
| "signature": "sha256:6394928c631f491d9b3776e1af071144d00c1446e0ec4d032c094af7b3d8edd6" | |
| }, | |
| "nbformat": 3, | |
| "nbformat_minor": 0, | |
| "worksheets": [ | |
| { |
| const ContinueGame=999 | |
| const WinGame=777 | |
| const LoseGame=444 | |
| const QuitGame=-99 | |
| function move(line,direction) | |
| lineLen=length(line) | |
| nonZeroLine=line[line.>0] |
| # Compiled source # | |
| ################### | |
| *.com | |
| *.class | |
| *.dll | |
| *.exe | |
| *.o | |
| *.so | |
| # Packages # |