- 57
- 105
It costs $0 to start a business:
— Pascio (@IAmPascio) September 24, 2022
Social - Buffer
System - Notion
Design - Canva
Calendar - Zcal
Links - Znaplink
Store - Gumroad
Automations - Zapier
Website - Typedream
Copywriting - Hemingway
Welcome to the future.
Someone should post this to /r/antiwork or any other leftoid sub on reddit. Maybe as a screenshot with a juicy title.
- Snape : windows is as r-slur friendly as it gets, if you're too r-slurred to use it then keep yourself safe r-slur
- 89wc : majority of mods to #makewindowsgreatagain actually involve reintroducing XP behavior lol
- CREAMY_DOG_ORGASM : YWNBAW
- SPRINGWRWR : Bing isn't that bad!
- 96
- 99
Advent of Code is an annual coding competition/event with daily challenges. Even complete beginners can keep up for the first few days as the difficulty slowly ramps up.
Join the rDrama leaderboard and see how you compare to your fellow dramanauts with the following code:
632268-20c7d1d5
Enter it here https://adventofcode.com/2022/leaderboard/private
- BWC :
- 20
- 27
const axios = require("axios");
const { setTimeout } = require("timers/promises");
const HOST = "https://rdrama.net";
const REPLY_URL = `${HOST}/reply`;
const UNREAD_URL = `${HOST}/unread`;
const REPLY_MESSAGE = ":marse#ykys:";
const ACCESS_TOKEN = "YOUR_TOKEN_HERE";
async function execute() {
while (true) {
const config = { headers: { Authorization: ACCESS_TOKEN } };
console.log("CHECKING UNREADS");
const response = await axios.get(UNREAD_URL, config);
for (const unread of response.data.data) {
console.log("FOUND UNREAD\n", unread.author_name);
if (unread.author_name === "SomeStupidAsshole") {
const form = new FormData();
form.append("parent_id", unread.id);
form.append("body", REPLY_MESSAGE);
await axios.post(REPLY_URL, form, config);
console.log("SENT REPLY");
}
}
await setTimeout(60000);
}
}
execute().then(() => process.exit(0));
If you don't know how to into Javascript, reply here. This site doesn't yet allow you to check DMs without marking them as read, so I won't see any DMs while this script is needful for me
- 45
- 149
I can't believe it.
— TCNO/TroubleChute (@TCNOco) March 11, 2023
My official Microsoft Store Windows 10 Pro key wouldn't activate. Support couldn't help me yesterday.
Today it was elevated. Official Microsoft support (not a scam) logged in with Quick Assist and ran a command to activate windows.
BRO IT'S A CRACK
NO CAP pic.twitter.com/0vcRGu9PDE
Imagine buying Windows in 2023
- 4
- 16
orange sight: https://news.ycombinator.com/item?id=40237745
Completely free (video lectures and textbook) graduate level course on crypto
- 14
- 32
- 75
- 174
source for that is https://www.theinformation.com/articles/how-amazons-big-bet-on-just-walk-out-stumbled, which I cannot bypass the paywall on
- 23
- 35
The Official RDrama Computer Science Reading Group
My dear !codecels, hello and welcome to the first meeting of RDrama's Computer Science Reading Group! Here's the idea - we (read: I) pick a computer science textbook, then post a list of sections and exercises from that textbook each week. In the thread, feel free ask questions, post solutions, and bully people for asking stupid questions or posting stupid solutions. If you don't want to read along, I'll post the complete exercises in the OP, so you can solve them without needing to read the book.
SICP
The book I'm starting with is 'the Structure and Interpretation of Computer Programs' (abbreviated SICP). It's a software engineering textbook written by Gerald Jay Sussman and Hal Abelson from MIT. The book builds programming from the ground up: starting with a very simple dialect of Scheme and growing it into a language with lazy evaluation, object-orientation and a self-hosting compiler. It's a fun book: the exercises are hands-on and interesting, the writing is informative without being droll, and both the book itself and a corresponding lecture series (complete with a 80s synth rendition of 'Also Sprach Zarathustra') are available for free online.
Languages
The book uses (a small subset of) Scheme as its primary language, but feel free to try using a different language. The book's dialect of scheme is available through Racket, but most lisps will work with only minor changes. Other dynamically-typed, garbage-collected languages with higher-order functions will also not require much hacking: there is an edition written in JavaScript , as well as a partial adaptation to python . High-level, statically typed languages might also work: Java/Kotlin/C# seem doable, but I don't know those languages well. Strongly typed languages like Haskell will require some real hacks, and I'd avoid doing it in C, C++ or Rust.
Exercises
The book is split into five chapters:
- Building Abstractions with Procedures
- Building Abstractions with Data
- Modularity, Objects and State
- Metalinguistic Abstraction
- Computing with Register Machines
This week, I'll be posting exercises from the first chapter. The chapter is pretty easy for those familiar with programming already, so I just want to get it out of the way. Here are the selected exercises:
Exercise 1.8
Newton's method for cube roots is based on the fact that if
y
is an approximation to the cube root ofx
, then a better approximation is given by the value(x/y² + 2y) / 3
. Use this formula to implement a cube-root procedure which is wrong by at most0.01
.
Exercise 1.12
The following pattern of numbers is called Pascal's Triangle.
1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
...
The numbers at the edge of the triangle are all 1, and each number inside the triangle is the sum of the two numbers above it. Write a procedure that computes elements of Pascal's triangle.
Exercise 1.18
Devise a procedure generates an iterative process for multiplying two integers in terms of adding, doubling, and halving and uses a logarithmic number of steps.
Exercise 1.31
Write a procedure called
product
that returns the product of the values of a function at points over a given range (product(l, r,step,f) = f(l) * f(l+step) * f(l + 2 * step) * ... * f(r)
). Show how to definefactorial
in terms ofproduct
. Also use product to compute approximations to using the formulaπ/4 = (2 * 4 * 4 * 6 * 6 * 8 ...) / (3 * 3 * 5 * 5 * 7 * 7 ...)
Exercise 1.43
If
f
is a numerical function andn
is a positive integer, then we can form then
th repeated application off
, which is defined to be the function whose value atx
isf(f(...(f(x))...))
. For example, iff
is the functionx → x + 1
, then then
th repeated application off
is the functionx → x + n
. Iff
is the operation of squaring a number, then then
th repeated application off
is the function that raises its argument to the2 * n
th power. Write a procedure that takes as inputs a procedure that computesf
and a positive integern
and returns the procedure that computes then
th repeated application of f. Your procedure should be able to be used as follows:repeated(square,2)(5) = 625
Have fun!
- 63
- 42
I've been wanting to build a beginner home lab for a couple of months. I plan on using a type 2 hypervisor as I'm more familiar with workstation pro compared to bare metal. I want more practice with AD and also plan on setting up game servers for games like Minecraft. Don't plan on making a NAS or media server yet because I'm poor.
Got myself a 12600k and have an unused Netgear GS305E managed switch.
Any tips or resources to look at before completing my PC build?
Thinking of just using Sata ssd/nvme drives. I also have a gaming pc and laptop and wondering if I should use one of them as a terminal and /or just make one network instead of setting up the vlans.
- 59
- 72
What all did they get right?
The tech looks cooler in the ads as opposed to what we ended up with. These were directed by David Fincher, so maybe he's just good at making shit look cool
- 136
- 204
Apparently this lawsuit was the breaking point.
https://www.bbc.com/news/technology-64618791
Foid decided 10 years later to sue the site that allowed her and her abuser to meet. Not sure how omegle is responsible for the actions of the abuser. However, it doesn't matter because it seems omegle doesn't have the means to fight the battle and decided to close shop. RIP.
Here's an excerpt from the founder's final thoughts. This hit me pretty hard and kinda sums up the noticeable decline of the internet.
I worry that, unless the tide turns soon, the Internet I fell in love with may cease to exist, and in its place, we will have something closer to a souped-up version of TV – focused largely on passive consumption, with much less opportunity for active participation and genuine human connection.
- frozengarlic : slackernews
- 38
- 41
- 16
- 39
Similar to thingaverse
for 3D printers and CNC. PCBway has a community platform for PCB designs and chipsets that allow you to automatically order any popular product to be manufactured at will
This is really cool for modding game consoles, hobby electronics, DIY or home automation without globohomo IOT data mining. Very useful My relative is an electrician and raves about it being an amazing company.
Just wanted to make sure people here were aware of these resources for any fellow hobbyist
- 33
- 25
Bark is an AI text to speech generator
WARN: You will NOT be able to run the full sized model with this card, you need 12gb of VRAM for that. You can however use the small model
Following the guide here you can get the last supported version of rocm installed
sudo echo ROC_ENABLE_PRE_VEGA=1 >> /etc/environment
sudo echo HSA_OVERRIDE_GFX_VERSION=8.0.3 >> /etc/environment
# reboot
wget https://repo.radeon.com/amdgpu-install/22.40.3/ubuntu/focal/amdgpu-install_5.4.50403-1_all.deb
sudo apt install ./amdgpu-install_5.4.50403-1_all.deb
sudo amdgpu-install -y --usecase=rocm,hiplibsdk,mlsdk
sudo usermod -aG video $LOGNAME
sudo usermod -aG render $LOGNAME
WARN: Do NOT use default options for amdgpu-install (run without any flags)! This will install a non-working driver and your card will bootloop until the software is uninstalled!
Then you install to install NCCL. If you have a nVidia dev account you can download the deb, if not you'll need to compile it.
git clone https://github.com/NVIDIA/nccl.git
cd nccl/
make -j src.build
WARN: It took 16gb of ram and 32gb of swap for me to compile it. If you don't have enough swap run
sudo fallocate -l 32G ./swapfile
sudo chmod 600 ./swapfile
sudo mkswap ./swapfile
sudo swapon ./swapfile
You will also need to install nvidia-cuda-dev, but this is in Ubuntu repos!
sudo apt install nvidia-cuda-dev
From there run
git clone https://github.com/pytorch/pytorch.git -b v2.0.1
cd pytorch
export PATH=/opt/rocm/bin:$PATH ROCM_PATH=/opt/rocm HIP_PATH=/opt/rocm/hip
export PYTORCH_ROCM_ARCH=gfx803
export PYTORCH_BUILD_VERSION=2.0.1 PYTORCH_BUILD_NUMBER=2
python3 tools/amd_build/build_amd.py
USE_ROCM=1 USE_NINJA=1 python3 setup.py bdist_wheel
After compilation is finished the .whl file should be under /dist/
I strongly recommend NOT installing this system wide. Make a virtual env for the project you're going to use it in and install it there.
python -m venv venv --system-site-packages
source venv/bin/activate
pip install /path/to/pytorch-2.whl
Now you're ready to install torch audio
export BUILD_VERSION=2.0.2
git clone https://github.com/pytorch/audio.git
cd audio
mkdir build
cd build
MAKE_CXX_COMPILER=/usr/bin/hipcc cmake -DBUILD_BENCHMARK=ON -DCMAKE_PREFIX_PATH=/home/$USER/code/bark/venv/lib/python3.10/site-packages/torch ../.
FORCE_CUDA=1 ROCM_HOME=/opt/rocm/ python3 setup.py bdist_wheel
Make sure you build version 2.0.2! It's the only version that works with pytorch 2.0.1!
From start to finish counting download (pytorch is fucking massive!) it took me a little over 8 hours to get everything working.
Cuda init error:
To bypass the cuda init check (which our GPU will crash because cuda assumes we have a nVidia named card not gfx803) open the file venv/lib/python3.10/site-packages/torch/cuda/http://__init__.py
, search for def _check_capability():
and add return
under it. It should end up looking like
def _check_capability():
incorrect_binary_warn = """
Found GPU%d %s which requires CUDA_VERSION >= %d to
work properly, but your PyTorch was compiled
with CUDA_VERSION %d. Please install the correct PyTorch binary
using instructions from https://pytorch.org
"""
old_gpu_warn = """
Found GPU%d %s which is of cuda capability %d.%d.
PyTorch no longer supports this GPU because it is too old.
The minimum cuda capability supported by this library is %d.%d.
"""
if torch.version.cuda is not None: # on ROCm we don't want this check
return
CUDA_VERSION = torch._C._cuda_getCompiledVersion()
for d in range(device_count()):
capability = get_device_capability(d)
major = capability[0]
minor = capability[1]
name = get_device_name(d)
current_arch = major * 10 + minor
min_arch = min((int(arch.split("_")[1]) for arch in torch.cuda.get_arch_list()), default=35)
if current_arch < min_arch:
warnings.warn(old_gpu_warn % (d, name, major, minor, min_arch // 10, min_arch % 10))
You are now ready to test your bark install
from bark import SAMPLE_RATE, generate_audio, preload_models
from scipy.io.wavfile import write as write_wav
from IPython.display import Audio
import os
os.environ["SUNO_OFFLOAD_CPU"] = "True"
os.environ["SUNO_USE_SMALL_MODELS"] = "True"
# download and load all models
print("Preloading models")
preload_models()
print("Loaded")
# generate audio from text
text_prompt = """
Hello, my name is Suno. And, uh — and I like pizza. [laughs]
But I also have other interests such as playing tic tac toe.
"""
print("Generating text")
audio_array = generate_audio(text_prompt)
print("Done")
# save audio to disk
write_wav("bark_generation.wav", SAMPLE_RATE, audio_array)
# play text in notebook
Audio(audio_array, rate=SAMPLE_RATE)
Save the above to a file named test.py and run it.
YOU SHOULD NOT SEE ANY WARNINGS ABOUT AN UNUSED GPU. IF YOU DO REINSTALL TORCH pip install .//path/to/whl/
and try again.
If you see a bunch of errors about missing libs you probably forgot to source your venv source /venv/bin/activate
If you get undefined symbol errors (gsm_create, gsm_destroy ect) you compiled using your systems libgsm and not the version in torchaudio. You can work around this by running export LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libgsm.so.1
If everything's working at this point you'll see some warnings about "AMD Radeon RX 580 2048SP with CUDA capability sm_80 is not compatible with the current PyTorch installation." and "Can't initialize NVML" these are both false warnings and can be ignored.
On the first run you should see the script reach out and download a bunch of models
When finsihed you should have a file named "bark_generation.wav"
- 30
- 123
in the late 2000s there was a failed academic landgrab in the digital humanities called "critical code studies", where non-programmers tried to conduct critical readings of code snippets. it went about as well as you would expect
— you-have-just-experienced-things (@y_h_j_e_t) May 28, 2023
gonna post some of my fav quotes in this thread
Just lol