Skip to content

Instantly share code, notes, and snippets.

@Ephraim-Bryski
Ephraim-Bryski / client.js
Last active June 25, 2025 17:52
reading and writing files in electron
const FILE_A = 'a.json'
const FILE_B = 'b.json'
const files = [FILE_A,FILE_B]
const contents = {}
window.api.receive("sendReadContent", (file_name,data) => {
@Ephraim-Bryski
Ephraim-Bryski / client.js
Created March 25, 2024 14:31
Electron-File-Access-Test
fetch('/load_file', {
method: "POST",
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({file: "public/example.json"})
}).then(response => response.text()).then(a=>{console.log(a)})
from tkinter import *
tk=Tk()
WIDTH=4000
HEIGHT=4000
canvas=Canvas(tk,width=WIDTH,height=HEIGHT)
tk.title('conduction')
canvas.pack()
COLUMNS=20
import numpy as np
import math
from tkinter import *
tk=Tk()
WIDTH=5000
HEIGHT=4000
canvas=Canvas(tk,width=WIDTH,height=HEIGHT)
tk.title('mesh')
canvas.pack()
from tkinter import *
import random
import time
import math
tk=Tk()
WIDTH=500
HEIGHT=400
canvas=Canvas(tk,width=WIDTH,height=HEIGHT)
tk.title('Spring')
canvas.pack()
from tkinter import *
import math
tk=Tk()
WIDTH=5000
HEIGHT=400
canvas=Canvas(tk,width=WIDTH,height=HEIGHT)
tk.title('Viscosity')
canvas.pack()
from tkinter import *
import time
import numpy as np
import math
tk=Tk()
WIDTH=500
HEIGHT=400
canvas=Canvas(tk,width=WIDTH,height=HEIGHT)
tk.title('Mesh')
canvas.pack()
from tkinter import *
import time
import numpy as np
import math
tk=Tk()
WIDTH=500
HEIGHT=500
canvas=Canvas(tk,width=WIDTH,height=HEIGHT)
tk.title('Viscosity')
canvas.pack()
from tkinter import *
import random
import math
import pickle
SIDE=500
DIAM=5
dt=.001
R=8.314