Skip to content

Instantly share code, notes, and snippets.

View ChaiBapchya's full-sized avatar
💭
Back to Work

Chaitanya Prakash Bapat ChaiBapchya

💭
Back to Work
View GitHub Profile
@ChaiBapchya
ChaiBapchya / Coursetro.sol
Last active April 5, 2018 05:25
Ethereum Blockchain Solidity sample contract
pragma solidity ^0.4.18;
contract Coursetro {
string fName;
uint age;
function setInstructor(string _fName, uint _age) public {
fName = _fName;
age = _age;
@ChaiBapchya
ChaiBapchya / Parity Error
Last active April 23, 2018 23:52
Parity Error
> systemctl status parity
● parity.service - "parity"
Loaded: loaded (/etc/systemd/system/parity.service; enabled; vendor preset: enabled)
Active: inactive (dead) (Result: exit-code) since Mon 2018-04-23 23:42:04 UTC; 1s ago
Process: 23035 ExecStart=/bin/bash -c parity --config /data/parity/node.toml (code=exited, status=1/FAILURE)
Main PID: 23035 (code=exited, status=1/FAILURE)
Apr 23 23:42:04 ip-172-31-78-2 systemd[1]: parity.service: Main process exited, code=exited, status=1/FAILURE
Apr 23 23:42:04 ip-172-31-78-2 systemd[1]: parity.service: Unit entered failed state.
Apr 23 23:42:04 ip-172-31-78-2 systemd[1]: parity.service: Failed with result 'exit-code'.
@ChaiBapchya
ChaiBapchya / surround.java
Created June 21, 2018 00:58
surrounding island
class Solution {
int n,m;
public void solve(char[][] board) {
n= board.length;
if(n==0)return;
m=board[0].length;
for(int i=0;i<n;i++){
for(int j=0;j<m;j++){
if(board[i][j]=='X')
dfsmark(board,i,j);
@ChaiBapchya
ChaiBapchya / machine_translation.py
Created December 4, 2018 02:15
Machine Translation with Hardmax for Decoder attention
import collections
import io
import math
from mxnet import autograd, gluon, init, nd
from mxnet.contrib import text
from mxnet.gluon import data as gdata, loss as gloss, nn, rnn
PAD, BOS, EOS = '<pad>', '<bos>', '<eos>'
dataset_num=2
file_path2 = 'tiny.europarl-v7.fr-en.en'
@ChaiBapchya
ChaiBapchya / numpy_randint.py
Created December 6, 2018 05:43
Generating random integers using numpy
import numpy as np
for i in range(100000):
a=np.random.randint(low =0, high=9223372036854775807 ,dtype='int64')
with open('run2_numpy.txt', 'a') as the_file:
the_file.write(str(a)+'\n')
{
"BatchNorm": [
{
"avg_time_backward_BatchNorm": 8.1367,
"avg_time_forward_BatchNorm": 7.7976,
"inputs": {
"beta": [
3
],
"data": [
{
"BatchNorm": [
{
"avg_time_backward_BatchNorm": 94.9822,
"avg_time_forward_BatchNorm": 67.2517,
"inputs": {
"beta": [
3
],
"data": [
@ChaiBapchya
ChaiBapchya / mxnet_op_count
Created July 23, 2019 21:40
mxnet_op_count
{
"Activation": {
"has_backward": "True"
},
"BatchNorm": {
"has_backward": "True"
},
"BatchNorm_v1": {
"has_backward": "True"
},
@ChaiBapchya
ChaiBapchya / mkl_off_lts_cpu.md
Last active August 1, 2019 20:42
Large Tensor Support ON vs OFF | MKL ON vs OFF | ctx=CPU

Runtime Features

  1. BLAS_APPLE : ✖ BLAS_APPLE
  2. BLAS_ATLAS : ✖ BLAS_ATLAS
  3. BLAS_MKL : ✖ BLAS_MKL
  4. BLAS_OPEN : ✔ BLAS_OPEN
  5. CAFFE : ✖ CAFFE
  6. CPU_AVX : ✔ CPU_AVX
  7. CPU_AVX2 : ✖ CPU_AVX2
  8. CPU_SSE : ✔ CPU_SSE
  9. CPU_SSE2 : ✔ CPU_SSE2
{
"BatchNorm": [
{
"avg_time_backward_BatchNorm": 156.6311,
"avg_time_forward_BatchNorm": 210.4633,
"inputs": {
"beta": [
3
],
"data": [