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 / prime.cpp
Created March 9, 2019 13:18
Prime number generator.
#include <iostream>
using namespace std;
void gen_prime(int limit);
int main() {
int limit;
cout << "generate prime numbers upto:";
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#include <iostream>
#include <fstream>
#include <string>
#include <array>
using namespace std;
class Cycling{
private:
float place_finished;
import mxnet as mx
from mxnet import nd, gluon, autograd
from mxnet.gluon import nn
import mxnet.ndarray as F
class Net(gluon.Block):
def __init__(self, **kwargs):
super(Net, self).__init__(**kwargs)
with self.name_scope():
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)
(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
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)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#include <iostream>
#include <conio>
using namespace std;
int main()
{
long a = 0;
int b = 0;
# calculate size during Conv opr.
F = 5 # kernel
P = 0 # padding
S = 1 # Strides
shape = [38, 18]
new_shape = []
for i in range(2):