[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-95032":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":17,"stars90d":15,"forks30d":15,"starsTrendScore":18,"compositeScore":19,"rankGlobal":9,"rankLanguage":9,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":9,"pushedAt":9,"updatedAt":25,"readmeContent":26,"aiSummary":27,"trendingCount":15,"starSnapshotCount":15,"syncStatus":14,"lastSyncTime":28,"discoverSource":29},95032,"desktop-fly","DenisSergeevitch\u002Fdesktop-fly","DenisSergeevitch","A 3D fruit fly living on your macOS desktop, driven by a live spiking simulation of the real FlyWire connectome",null,"Swift",703,42,218,2,0,12,232,132,98.9,"Other",false,"master",true,[],"2026-08-24 04:01:23","\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Ffly.png\" width=\"340\" alt=\"DesktopFly — a 3D fruit fly\">\n\u003C\u002Fp>\n\n\u003Ch1 align=\"center\">DesktopFly 🪰\u003C\u002Fh1>\n\n\u003Cp align=\"center\">\nA 3D fruit fly that lives on your macOS desktop — driven by a live spiking\nsimulation of the real \u003Ca href=\"https:\u002F\u002Fcodex.flywire.ai\">FlyWire\u003C\u002Fa>\nconnectome. It walks across your windows, grooms, sleeps, and decides to flee\nyour cursor with the same neurons a real fly uses.\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Fbrain.png\" width=\"560\" alt=\"Live brain window: 23,210 real neuron positions, spikes flashing\">\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\u003Csub>\nThe fly's brain window: 23,210 real neuron soma positions from FlyWire v783,\nwith live spikes flashing at real neuron locations. The two glowing yellow\nmarkers are the Giant Fibers — the escape command neurons. Click any region\nto stimulate it.\n\u003C\u002Fsub>\u003C\u002Fp>\n\n## What's real\n\n- **23,210 neuron soma positions** (of 139,255 in FlyWire v783) render the\n  rotating brain window, colored by super-class (FlyWire's coarse cell-type\n  grouping).\n- **A 668-neuron circuit with ~19,000 real synaptic connections** (synapse\n  counts, signed by neurotransmitter prediction) runs as a 1 kHz\n  leaky-integrate-and-fire (LIF) simulation:\n  - **LC4 (104) + LPLC2 (210)** looming-detector visual neurons\n  - **DNp01 \u002F Giant Fiber (GF) (2)** — the escape command neuron\n  - **DNa01 + DNa02 (4)** steering neurons · **DNp09 (2)** forward walking\n  - **DNg11 (6)** grooming · **MDN (4)** backward walking (\"moonwalker\")\n  - **DNp02\u002FDNp04\u002FDNp11 (6)** escape-maneuver (wing) neurons\n  - their 330 strongest partners, including ascending (proprioceptive) and\n    sensory (wind) neurons\n- **Escape is not scripted.** Your cursor's approach becomes looming input to\n  the real LC4\u002FLPLC2 cells; the fly takes off only when the Giant Fiber\n  actually spikes through its real synapses — ~1,200 synapses of feedforward\n  inhibition push back, which is why slow approaches are tolerated and fast\n  lunges trigger escape in ~4 ms, just like the real animal.\n\nThe body itself is procedural (FlyWire is a brain connectome — no body\ngeometry exists), with a tripod gait, visible wing-beat, altitude-scaled\nflight, grooming, and sleep postures.\n\n## Installation\n\nRequirements: **macOS 13+**, Xcode Command Line Tools (Swift 5.9+).\nNo permissions or entitlements needed — everything it senses\n(cursor, window frames, clicks-as-taps, thermal state) is permission-free.\n\n```sh\ngit clone https:\u002F\u002Fgithub.com\u002FDenisSergeevitch\u002Fdesktop-fly.git\ncd desktop-fly\n.\u002Fbuild.sh\n.\u002FDesktopFly\n```\n\nA 🪰 item appears in the menu bar; quit from there. The fly wanders your\ndesktop on a transparent, click-through overlay — it never intercepts your\nmouse or keyboard.\n\n## Controls (menu bar 🪰)\n\n| item | effect |\n|---|---|\n| Pause \u002F Resume | freeze the world |\n| Show\u002FHide Brain | toggle the live brain window |\n| Escape Test (loom) | inject a looming stimulus, watch the GF fire |\n| Move to Next Display | hop the fly across monitors (shown when >1 display) |\n| Add \u002F Remove Fly | extra flies (only fly #1 carries the brain) |\n| Scare Flies | startle everyone |\n\n**The brain window is interactive**: hovering pauses the rotation; clicking a\nregion \"optogenetically\" stimulates the ~60 nearest circuit neurons for\n400 ms. The fly's reaction is whatever the real network does downstream —\nclick the Giant Fiber and it escapes; click DNg11 and it grooms; click one\nside's DNa01\u002F02 and it turns.\n\n## How real neurons drive the body\n\n| body behavior | driven by |\n|---|---|\n| escape takeoff | DNp01 giant fiber spike |\n| walk vs. rest, walking speed | DNp09 rate |\n| steering | DNa01+DNa02 left−right rate difference |\n| grooming | DNg11 rate |\n| backward scoot | MDN burst |\n| nervous darting | LC4\u002FLPLC2 population rate |\n| wing-beat effort, threat wing-raise | DNp02\u002F04\u002F11 rate |\n| spontaneous takeoff | whole-population arousal |\n\nThe loop also closes body→brain: the gait rhythm feeds the circuit's real\nascending (proprioceptive) neurons in phase with the legs, and fast cursor\nmotion stimulates its sensory (wind) partners.\n\n## Desktop ecology (all permission-free macOS senses)\n\n- **Window terrain**: window top edges are ledges — the fly lands on them,\n  walks along them, rides a window you drag, and startles when one closes\n  under its feet.\n- **Window looms**: a window appearing near the fly feeds the looming\n  pathway; the circuit decides whether to flee your dialogs.\n- **Clicks are substrate taps**; clicking next to the fly startles it through\n  the wind→GF pathway. **Typing is vibration** (idle-time API — knows *when*\n  keys were pressed, never which).\n- **Circadian rhythm**: dawn\u002Fdusk activity peaks, midday siesta, night\n  quiescence. **Sleep**: idle at night → it sleeps, breathing slowly, with\n  raised arousal threshold; it grooms after waking.\n- **Temperature**: flies are ectotherms — a hot Mac is a faster fly.\n\n## Regenerating the data\n\n`data\u002F` ships with compact derived files. To rebuild them from the raw\nFlyWire Codex dumps (~60 MB download):\n\n```sh\nmkdir -p \u002Ftmp\u002Fflywire && cd \u002Ftmp\u002Fflywire\nB=https:\u002F\u002Fstorage.googleapis.com\u002Fflywire-data\u002Fcodex\u002Fdata\u002Ffafb\u002F783\ncurl -O \"$B\u002Fclassification.csv.gz\" -O \"$B\u002Fcoordinates.csv.gz\" \\\n     -O \"$B\u002Fconnections.csv.gz\" -O \"$B\u002Fconsolidated_cell_types.csv.gz\"\ncd - && python3 etl.py \u002Ftmp\u002Fflywire\n```\n\n## Diagnostics\n\n```sh\n.\u002FDesktopFly --simtest        # circuit invariants: GF silent at rest, 4 ms loom latency, ...\n.\u002FDesktopFly --behaviortest   # 17 end-to-end checks: stimulate neurons -> body reacts\n.\u002FDesktopFly --snapshot f.png  # offscreen fly render\n.\u002FDesktopFly --brainshot b.png # offscreen brain render\n```\n\n## What's modeled vs. measured\n\nHonesty section: the connectome gives wiring, not physiology. The LIF\ndynamics, neurotransmitter signs (ACh+, GABA−, Glu−), the gap-junction boost\non LC→GF and wind→GF (documented electrical coupling), synaptic delays, and\nthe sensory transduction (cursor → looming value) are standard modeling\nchoices layered on the real graph. Everything downstream of the sensory\nneurons — who connects to whom, and how strongly — is FlyWire data.\n\n## License & citation\n\nCode is MIT. The files in `data\u002F` are derived from FlyWire (FAFB v783) and\nare **CC BY-NC 4.0** — see [data\u002FDATA_LICENSE.md](data\u002FDATA_LICENSE.md).\nIf you use this, cite:\n\n- Dorkenwald, S. et al. *Neuronal wiring diagram of an adult brain.* Nature 634, 124–138 (2024). https:\u002F\u002Fdoi.org\u002F10.1038\u002Fs41586-024-07558-y\n- Schlegel, P. et al. *Whole-brain annotation and multi-connectome cell typing of Drosophila.* Nature 634, 139–152 (2024). https:\u002F\u002Fdoi.org\u002F10.1038\u002Fs41586-024-07686-5\n","DesktopFly 是一款运行在 macOS 桌面上的交互式 3D 果蝇模拟程序，其行为由基于真实 FlyWire 连接组的实时脉冲神经网络驱动。核心功能包括：23,210 个真实神经元位置渲染的可旋转脑图窗口、668 神经元\u002F约 19,000 突触的漏电积分-发放（LIF）仿真电路，支持光流检测、逃逸决策、行走、 grooming、睡眠等生物一致行为；所有响应（如对鼠标逼近的逃逸）均源于神经动力学而非脚本。适用于神经科学可视化教学、计算神经学演示及桌面交互式生物模型展示场景。","2026-08-20 02:30:06","CREATED_QUERY"]