Skip to content

Instantly share code, notes, and snippets.

View smks17's full-sized avatar

mahdi kashani smks17

  • Iran,Karaj
View GitHub Profile
@enochkan
enochkan / adam_optim.py
Last active December 31, 2022 16:16
class definition of adam optimizer
import numpy as np
class AdamOptim():
def __init__(self, eta=0.01, beta1=0.9, beta2=0.999, epsilon=1e-8):
self.m_dw, self.v_dw = 0, 0
self.m_db, self.v_db = 0, 0
self.beta1 = beta1
self.beta2 = beta2
self.epsilon = epsilon
self.eta = eta
def update(self, t, w, b, dw, db):
@chriscandy
chriscandy / install-arch-linux-using-efi-and-grub.md
Last active November 9, 2024 22:27
Install Arch Linux using EFI and GRUB

Installing Arch linux with EFI

  1. Change keyboard layout:

    • loadkeys no
  2. Verify boot mode:

    • ls /sys/firmware/efi/efivars (If the directory exist your computer supports EFI)
  3. Ping some site on the Internet to verify connection:

  • ping archlinux.org
@graphitemaster
graphitemaster / T0.md
Last active May 6, 2024 10:18
Vulkan Tutorial

Tutorial 0

What is Vulkan

Vulkan is a low-overhead, cross-platform 3D graphics and compute API.

Vulkan targets

Vulkan targets high-performance realtime 3D graphics applications such as games and interactive media across multiple platforms providing higher performance and lower CPU usage.

0 = Success
1 = Operation not permitted
2 = No such file or directory
3 = No such process
4 = Interrupted system call
5 = Input/output error
6 = No such device or address
7 = Argument list too long
8 = Exec format error
@yohhoy
yohhoy / threads.h
Last active September 25, 2024 12:28
C11 <threads.h> emulation library
/*
* C11 <threads.h> emulation library
*
* (C) Copyright yohhoy 2012.
* Distributed under the Boost Software License, Version 1.0.
* (See copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef EMULATED_THREADS_H_INCLUDED_
#define EMULATED_THREADS_H_INCLUDED_