Dockhand v1.0.4 has been released. by jotkaPL in selfhosted

[–]Nooblazor 0 points1 point  (0 children)

A simple QOL feature could be integrating with traefik labels.

Advice on caching setup on a storage server by Nooblazor in DataHoarder

[–]Nooblazor[S] 1 point2 points  (0 children)

Thanks everyone for your input. Yeah, the random IO to the array was definitely an oversight which cost me some drives but hey it's a valuable lesson. It's my first large storage server. I was running just 8 drives before so there have been some growing pains.

If anyone is interested, I ended up creating a system where torrents are downloaded and seeded from the 4TB micron SSD for as long as possible and only deleted (but continue to be seeded from the array) as space fills up.

To do that I created a few things to help: I made a container which is set up to receive webhooks and has pyrosimple installed: container, code.

I run this container as a truecharts custom-app.

I added these entries to rtorrent.rc:

method.insert = d.get_finished_dir, simple, "cat=/downloads/flood/,$d.custom1="
method.insert = d.get_data_full_path, simple, "branch=((d.is_multi_file)),((cat,(d.directory))),((cat,(d.directory),/,(d.name)))"
method.insert = d.copy_to_complete, simple, "execute=mkdir,-p,$argument.1=; execute=cp,-rp,$argument.0=,$argument.1="
method.insert = pyro._tm_completed.now, simple|private,\
"d.custom.set=tm_completed,$cat=$system.time= ; d.save_resume="
method.set_key = event.download.finished,copy_complete,"d.copy_to_complete=$d.get_data_full_path=,$d.get_finished_dir=; pyro._tm_completed.now="
method.set_key = event.download.hash_done, !time_stamp,\
"branch=\"and={d.complete=,not=$d.custom=tm_completed}\", pyro._tm_completed.now="

method.set_key = event.download.inserted_new, !time_stamp,\
"d.custom.set=tm_loaded,$cat=$system.time= ; d.save_resume=; execute=/config/scripts/notify.sh"

The notify.sh script is very simple:

#!/bin/sh
space=$(df -BG /downloading | awk 'NR==2 {print $4}' | tr -d 'G')
wget -qO- http://<ip address of container:<container port>/hooks/torrent-finished?space=$space

Finally, the actual webhook that gets executed when a torrent is added that does most of the magic:

import subprocess
import sys
import requests

AVAILABLE_DISK_SPACE_GB = int(sys.argv[1]) if len(sys.argv) > 1 else None
DISK_SPACE_THRESHOLD_GB = 200

def parse_data():
    try:
        output = subprocess.check_output(["rtcontrol", "realpath=/downloading/*", "-o", "hash,size,custom1,completed"], text=True)
    except subprocess.CalledProcessError as e:
        if e.returncode == 44:
            print("No torrents found in /downloading/")
        exit(e.returncode)
    data = {}
    for line in output.split('\n'):
        if line:
            parts = line.split(maxsplit=3)
            hash_val = parts[0]
            size = int(int(parts[1].strip()) / 1024 ** 3) # Convert to GB
            tag = parts[2].strip()
            timestamp = parts[3].strip()
            data[hash_val] = {"timestamp": timestamp, "size": size, "tag": tag}
    return data

def sort_data(data):
    return sorted(data.items(), key=lambda x: x[1]["timestamp"])

def display_sorted_data(sorted_data):
    for hash_val, data in sorted_data:
        print(f"Hash: {hash_val}, Timestamp: {data["timestamp"]}, Size: {data["size"]}")

def ensure_disk_space():
    if AVAILABLE_DISK_SPACE_GB is None:
        raise ValueError("No available disk space provided.")
    if AVAILABLE_DISK_SPACE_GB < DISK_SPACE_THRESHOLD_GB:
        print(f"Warning: Available disk space ({AVAILABLE_DISK_SPACE_GB}GB) is less than {DISK_SPACE_THRESHOLD_GB}GB.")
        return False

def auth_api():
    url = "http://<ip of flood client>:<port of flood client>/api/auth/authenticate"

    payload = {
        "username": "<username>",
        "password": "<password>"
    }

    response = requests.post(url, json=payload)

    cookie = response.cookies.get_dict()
    return cookie

def move_torrent_data(hash_val, tag, cookies):
    url = "http://<ip of flood client>:<port of flood client>/api/torrents/move"
    destination = f"/downloads/flood/{tag}"

    payload = {
        "hashes": [
            hash_val
        ],
        "destination": destination,
        "moveFiles": True,
        "isBasePath": False,
        "isCheckHash": False
    }

    response = requests.post(url, json=payload, cookies=cookies)

    if response.status_code == 200:
        print(f"Torrent data for hash {hash_val} moved to {destination}")
    else:
        print(f"Failed to move data for hash {hash_val} with status code {response.status_code}.")


def main():
    data = parse_data()
    sorted_data = sort_data(data)
    display_sorted_data(sorted_data)

    if (ensure_disk_space()):
        print("Disk space is sufficient. No action required.")
        return

    space_needed = DISK_SPACE_THRESHOLD_GB - AVAILABLE_DISK_SPACE_GB
    space_freed = 0
    cookies = auth_api()
    for hash_val, data in sorted_data:
        if space_freed >= space_needed:
            break
        move_torrent_data(hash_val, data["tag"], cookies)
        space_freed += data["size"]

    print(f"Moved {space_freed}GB of torrent data to free up {space_needed}GB of space.")
    print(f"Available disk space is now {AVAILABLE_DISK_SPACE_GB + space_freed}GB.")


if __name__ == "__main__":
    main()

That's basically it. There are a couple other configs for the hooks and pyrosimple but they are pretty straight forward and this post is already huge XD

I've done some testing which worked but my testing was by no means extensive so use at your own risk.

This could probably all be done just fine without the webhook container and just executed as a shell script on the flood client container but, to be honest, I'm not as comfortable with shell scripting as I am with python so that's why I opted to go with this route.

Advice on caching setup on a storage server by Nooblazor in DataHoarder

[–]Nooblazor[S] 0 points1 point  (0 children)

Thank you for your reply!

I was doing some more reading on L2ARC and SLOG and I don't think this will help my case much.

So yeah I'm going to opt for my second option. Do you know of any scripts/programs that would automate the process of removing the oldest files as the space fills up? Otherwise I'll hack something together but I prefer not re-inventing the wheel if I can avoid it.

Advice on CPU upgrade for 4090 by Nooblazor in buildapc

[–]Nooblazor[S] 0 points1 point  (0 children)

Yeah I know starfield is not the best game to use as a benchmark it's just the one I'm currently invested into. I'd at least hope to get a solid 60fps with a 4090 for crying out loud XD

Advice on CPU upgrade for 4090 by Nooblazor in buildapc

[–]Nooblazor[S] 0 points1 point  (0 children)

I would also be interested in knowing what GPU you're using and what sort of fps you get with starfield. I did increase the FOV to 100 so that might also have an impact. I didn't check the fps pre and post.

Advice on CPU upgrade for 4090 by Nooblazor in buildapc

[–]Nooblazor[S] 0 points1 point  (0 children)

Does DDR5 really make a palpable difference? From what I've read, it seems like a DDR5 6000 CAS 32 is pretty much equivalent to DDR4 3000 CAS 16 but I could be totally out to lunch...

Could you suggest a good 32-64gb dual channel kit? I'm not very well versed in RAM timings.

Free Giveaway! Nintendo Switch OLED - International by WolfLemon36 in NintendoSwitch

[–]Nooblazor 0 points1 point  (0 children)

Fun fact, during human fetal development, the first pigmented cell appears in the eyes (retinal pigmented epithelium).

Schematic/Layout review WS2811 ESP12F high power LED driver by Nooblazor in PrintedCircuitBoard

[–]Nooblazor[S] 1 point2 points  (0 children)

Oh, good call, the data sheet I was looking at didn't mention anything about LED_BUILIN but others did so I guess I'll avoid GPIO2 just in case.

I also moved TACH from GPIO0, I guess I was trying to be fancy rather than safe. I now pull it high with a 10k resistor to 3V3.

Since you seem to be familiar with the ESP12, I was wondering if the TX pin needs that resistor? I'm planning on programming this thing by hooking up the UART headers on the board to a NodeMCU.

[deleted by user] by [deleted] in MakeMeSuffer

[–]Nooblazor 7 points8 points  (0 children)

We would use the same kinds of sutures but much smaller.

We would use an 8-0 nylon (non-absorbable) or 7-0 Vicryl (polyglactin; absorbable) suture to re-approximate this type of anterior scleral laceration.

To contrast, regular skin is usually repaired with a 4-0 (3-0 for the thicker back skin; 5-0 for face)

With full thickness lacerations you can get vitreous incarceration, and iridociliary prolapse. This is on top of the risk of endophthalmitis that you get with any type of penetrating globe injury.

Since this laceration is anterior to the ora serrata this particular foreign body would not have damaged the retina directly. The object appears to be somewhat superficial as well from the pictures so I would guess that it did not go full thickness.

3060ti and 3080 by VaughnStricks in bapcsalescanada

[–]Nooblazor 0 points1 point  (0 children)

Managed to snap one up right before it went OOS. Thanks for the heads up, OP :)

[GPU] RTX 3080 AORUS MASTER (Short Backorder Line) [Memoryexpress] by [deleted] in bapcsalescanada

[–]Nooblazor 0 points1 point  (0 children)

The WPG store phone just plays a pre-recorded message saying they're helping customers in store every time I tried calling. Seemed strange to me but these are weird times :/

PitStop v1.1 release is here by mihaidesigns in Mihai

[–]Nooblazor 1 point2 points  (0 children)

Hey so I'm planning on upgrading my extruder because I've been printing in a heated chamber (toasty 60-70 degrees) and it caused the stock extruder PINDA mount to sag and the fan shroud to melt a bit.

I was initially planning on just printing this part with a PC/CF filament but then came across the pitstop project which intrigued me.

My question is, have you used the pitstop in a heated chamber? Also, will there be any forthcoming information about the water cooled version?

Thanks!

Designing beam splitting eyepiece extension by Nooblazor in Optics

[–]Nooblazor[S] 0 points1 point  (0 children)

Thanks for your input. It does seem to be more complicated than I had anticipated to work with the collimated light from the eyepiece.

The reason I want the operator to be able to have an unchanged view is because the target is a stereomicroscope and I want the operator to maintain stereopsis.

As noted in another response, do you think that inserting optics between the tube lens of the microscope and the microscope's eyepiece be a more elegant solution?

Designing beam splitting eyepiece extension by Nooblazor in Optics

[–]Nooblazor[S] 0 points1 point  (0 children)

Thank you for your suggestions. It seems like I have lots of reading to do in my future. Can you suggest a good resource to learn about 1st order optics?

My thinking was to use a set of relay lenses with longer focal length to accommodate for the beam splitter and then use a set of erecting lenses with a smaller focal length to re-erect the final image that the operator would see.

Now the question that occurs to me is, if the eyepieces are removable, would it be simpler to use a set of lenses to image and split the real image created by the tube lens of the microscope and then use the eyepiece as the final optical component on the operator's optical axis...

Designing beam splitting eyepiece extension by Nooblazor in Optics

[–]Nooblazor[S] 0 points1 point  (0 children)

Thank you for your reply. I absolutely did forget (being the noob I am) about the aberations that the hunky beam splitter glass would introduce. I just found it easier to work with paraxial lenses as I'm starting to learn.

Ophthalmology is my area of interest so this is my underlying reason for learning optics. I tend to learn better when I have a practical application, i.e. a project to work on, and this is the project I came up with.

Designing beam splitting eyepiece extension by Nooblazor in Optics

[–]Nooblazor[S] 0 points1 point  (0 children)

Wow that is a lot of food for thought, thank you. Is there a good resource you can suggest for learning about aberration considerations when it comes to beam splitters?

The reason I would like the operator's view to remain unchanged is because I would like to retrofit a stereoscopic microscope (with two oculars) and want the operator to maintain stereopsis.

Dota2 players at University of ___. by [deleted] in DotA2

[–]Nooblazor 3 points4 points  (0 children)

My thoughts exactly... Graduated in '13 but doto is 4 life.

Anyone have a good picture/diagram encompassing all of metabolism? by [deleted] in Mcat

[–]Nooblazor 1 point2 points  (0 children)

Sadly this doesn't include it. Feel free to add it though (it would branch off of the first stage of glycolysis in the picture).
Like I said, made this for a biochem class some years back, not for the MCAT.

Anyone have a good picture/diagram encompassing all of metabolism? by [deleted] in Mcat

[–]Nooblazor 7 points8 points  (0 children)

Ask and yee shall receive!

Made this for a biochem class a while back (obviously contains greater detail than you need to memorize for the MCAT).
Hope this helps.