This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import torch | |
from torch import nn | |
# 1. | |
# register_forward_pre_hook(hook) | |
# The hook will be called every time before forward() is invoked. It should have the following signature: | |
# `hook(module, input) -> None` | |
# The hook should not modify the input |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <cuda_runtime.h> | |
//http://www.techdarting.com/2014/03/matrix-multiplication-in-cuda-using.html | |
// This code assumes that your device support block size of 1024 | |
#define MAX_RANGE 9999 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# gtk3 in Rocky Linux 8.5 | |
./configure --with-features=huge --enable-gui=gtk3 --enable-python3interp --prefix=/usr | |
make -j`nproc` | |
sudo make install |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow as tf | |
#aplly exponential decay on learning rate | |
global_step = tf.Variable(0, trainable=False) | |
stater_learning_rate = lr #for start | |
learning_rate = tf.train.exponential_decay(starter_learning_rate, global_step, | |
decay_steps, decay_rate, staircase=True) | |
optimizer = tf.train.AdamOptimizer(learning_rate) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo yum install openssl compat-openssl10 qca-qt5-ossl.x86_64 openssl-devel |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) gparted extend | |
2) | |
lvextend -l +100%FREE /dev/rl/root | |
3) | |
xfs_growfs /dev/mapper/rl-root | |
usefull command: | |
df -h | |
lvdisplay | |
fdisk -l |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
A = zeros(10,21); | |
n = [1:10]; | |
% post cursor | |
for m = 1:3 | |
A(m, 11+n(m)) = 0.5; | |
A(m, 11-n(m)) = 0.5; | |
end | |
% one |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
a: -> variable scope | |
s: -> current script’s namespace | |
b: -> local to the current buffer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
g:coc_snippet_next g:coc_snippet_next | |
Trigger key for going to the next snippet position, applied in insert | |
and select mode. | |
Only works when snippet session is activated. | |
Default: <C-j> | |
g:coc_snippet_prev g:coc_snippet_prev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git clone https://github.com/raytroop/svlangserver.git | |
cd svlangserver/ | |
npm pack | |
npm install -g imc-trading-svlangserver-0.3.4.tgz |
NewerOlder