This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- stuff.html 2024-11-04 18:33:00 | |
+++ right.html 2024-11-04 17:09:24 | |
@@ -1,15 +1,21 @@ | |
-<head></head> | |
+<head> | |
+ <meta name="tsr-meta" /> | |
+ <title>TanStack Start Starter</title> | |
+ <meta charset="utf-8" /> | |
+ <meta name="viewport" content="width=device-width, initial-scale=1" /> | |
+ <link rel="stylesheet" href="/_build/app/styles/app.css" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- left.html 2024-11-04 16:36:50 | |
+++ right.html 2024-11-04 16:36:50 | |
@@ -1,79 +1,22 @@ | |
<head> | |
<meta name="tsr-meta" /> | |
<title>TanStack Start Starter</title> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1" /> | |
<link rel="stylesheet" href="/_build/app/styles/app.css" /> | |
- <script class="tsr-once"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9,43d8 | |
< <script class="tsr-once"> | |
< __TSR__ = { | |
< matches: [], | |
< streamedValues: {}, | |
< initMatch: (index) => { | |
< Object.entries(__TSR__.matches[index].extracted).forEach(([id, ex]) => { | |
< if (ex.type === "stream") { | |
< let controller; | |
< ex.value = new ReadableStream({ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from subprocess import Popen, PIPE | |
import pty | |
import os | |
from select import select | |
import sys | |
import tty | |
master, slave = pty.openpty() | |
p = Popen(['python'], stdin=slave, stdout=PIPE, stderr=PIPE) | |
pin = os.fdopen(master, 'w') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Board(object): | |
""" | |
>>> Board().rows | |
((' ', ' ', ' '), (' ', ' ', ' '), (' ', ' ', ' ')) | |
>>> print Board() | |
| | | |
----- | |
| | | |
----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#TODO | |
#1) Add measurement frame | |
#2) Save data part of nifti to its own file, and point to it in 'data file' field | |
import nibabel as nib | |
import sys |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""File format conversion | |
category: vtk, file conversion, tomb""" | |
import os, sys | |
import vtk | |
def vtk2vtp(invtkfile, outvtpfile, binary=False): | |
"""What it says on the label""" | |
reader = vtk.vtkPolyDataReader() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
"""An externally-accessible toy server whith several response strategies""" | |
import socket | |
import sys | |
from multiprocessing import Pool | |
def web_scrape(site): | |
s = socket.socket() | |
s.connect((site, 1333)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tty from 'tty' | |
import { emitKeypressEvents } from 'readline'; | |
let drain; | |
process.stdout.on('drain', () => { drain() }); | |
const waitForDrain = () => new Promise(r => {drain = r}); | |
function waitForDrainify(func) { | |
return async (...args) => { | |
if (!func(...args)) { | |
await waitForDrain(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Starting with Ubuntu 18.04.3 (LTS) x64 | |
# I'm using a local VMwareFusion vm instead of Docker or something because I want to be able to test with a video device. | |
# New install | |
# (not shown) make account, enable ssh, add vm to /etc/hosts | |
ssh vm | |
apt-get update | |
sudo apt install git | |
git clone https://github.com/endless-sky/endless-sky.git |
NewerOlder