Skip to content

Instantly share code, notes, and snippets.

View AGenchev's full-sized avatar

Angel G. AGenchev

  • EU / Bulgaria
View GitHub Profile
losses = [] # to keep track of the epoch lossese
slope_list = [] # to keep track of the slope learnt by the model
intercept_list = [] # to keep track of the intercept learnt by the model
EPOCHS = 2500
print('\nTRAINING...')
for epoch in range(EPOCHS):
# We need to clear the gradients of the optimizer before running the back-propagation in PyTorch
optimizer.zero_grad()
@kentwait
kentwait / mount_vbox_shared_boot.md
Last active June 20, 2024 12:53
Mount VirtualBox shared folder on boot using fstab

How to mount a VirtualBox shared folder when the Guest OS boots

Problem

While using VirtualBox's Guest Additions to mount shared folders provides a seamless way to mount shared folders, there are also disadvantages.

  • Shared folders will always mount in /media/sf_(share name) unless specified using through vbox drivers in the guest OS
  • Mounting does not happen at boot-time. Applications that require paths at boot will not be able to access the shared folder even after it is mounted - such as Docker.

Solution

Instead of relying on Guest Additions, if you have sudo permissions, shared folders can be mounted at boot-time using fstab. Using this approach allows

@bkaradzic
bkaradzic / orthodoxc++.md
Last active November 18, 2024 07:53
Orthodox C++

Orthodox C++

What is Orthodox C++?

Orthodox C++ (sometimes referred as C+) is minimal subset of C++ that improves C, but avoids all unnecessary things from so called Modern C++. It's exactly opposite of what Modern C++ suppose to be.

Why not Modern C++?