Skip to content

Instantly share code, notes, and snippets.

View jkotra's full-sized avatar
🎯
Focusing

Jagadeesh Kotra jkotra

🎯
Focusing
View GitHub Profile
@jkotra
jkotra / 2dvecfn.rs
Created July 30, 2019 12:27
2d vec return from fn
fn vec_opr<'a> () -> Vec<Vec<&'a str>>{
let loki = vec![
vec!["smart","deceitful","clever"],
vec!["Lying","Jelous","Brother"]
];
return loki;
}
fn main(){
@jkotra
jkotra / primes.rs
Created July 27, 2019 18:00
primes
fn main(){
let mut flag = true;
for i in 2..100{
for j in 2..i{
if i%j==0{
flag=false;
break;
}else{
@jkotra
jkotra / pdbs.py
Created June 19, 2019 18:00
parallel db
#initial database
db = torch.rand(num_entries) > 0.5
pd = []
for r in range(num_entries):
pd.append(
torch.cat((db[:r],db[r+1:num_entries]))
)
Jun 10 00:31:53 maxfunc systemd[1]: [email protected]: Succeeded.
Jun 10 00:31:53 maxfunc kernel: audit: type=1131 audit(1560106913.903:43): pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@0-1583-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jun 10 00:31:53 maxfunc audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 msg='unit=systemd-coredump@0-1583-0 comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
Jun 10 00:31:54 maxfunc kdeinit5[724]: Service ":1.42" unregistered
Jun 10 00:31:54 maxfunc kwin_x11[763]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 56338, resource id: 44040205, major code: 18 (ChangeProperty), minor code: 0
Jun 10 00:31:54 maxfunc kdeinit5[724]: Service "org.kde.StatusNotifierHost-769" unregistered
Jun 10 00:31:54 maxfunc plasmashell[769]: org.kde.plasma.pulseaudio: No object for name "alsa_output.pci-0000_00_1f.3.analog-stereo"
Jun 10 00:
# calculate size during Conv opr.
F = 5 # kernel
P = 0 # padding
S = 1 # Strides
shape = [38, 18]
new_shape = []
for i in range(2):
#include <iostream>
#include <conio>
using namespace std;
int main()
{
long a = 0;
int b = 0;
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
today = total_x[-1].reshape(-1).tolist()
last_price = scaler.transform(infered['Open_Predicted'][-1].reshape(-1, 1))
today.append(last_price[0])
today = today[1:]
today = np.array(today).reshape(-1,60,1)
tomorrow = model.predict(today)
tomorrow = scaler.inverse_transform(tomorrow)[0]
print(tomorrow)
(charm) [jagadeesh@maxfunc Downloads]$ conda install anaconda-clean
WARNING: The conda.compat module is deprecated and will be removed in a future release.
Collecting package metadata: done
Solving environment: done
==> WARNING: A newer version of conda exists. <==
current version: 4.6.11
latest version: 4.6.14
EPOCHS = 30
trn_loss = []
val_loss = []
for epoch in range(EPOCHS):
train_iter = mx.io.NDArrayIter(trn_x, trn_y, 1000, shuffle=True)
val_iter = mx.io.NDArrayIter(val_x, val_y, 1000, shuffle=True)