Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Fariz Rahman farizrahman4u

View GitHub Profile
View python.java.downloaded
// Targeted by JavaCPP version 1.5-SNAPSHOT: DO NOT EDIT THIS FILE
package org.bytedeco.cpython.global;
import org.bytedeco.cpython.*;
import java.nio.*;
import org.bytedeco.javacpp.*;
import org.bytedeco.javacpp.annotation.*;
View python.java.decompiled
//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//
package org.bytedeco.cpython.global;
import java.nio.ByteBuffer;
import java.nio.DoubleBuffer;
import java.nio.IntBuffer;
View stack trace
C:\java\jdk1.8.0_181\bin\java -ea -Ddtype=float -Didea.test.cyclic.buffer.size=1048576 "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.3.4\lib\idea_rt.jar=52192:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.3.4\bin" -Dfile.encoding=UTF-8 -classpath "C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.3.4\lib\idea_rt.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.3.4\plugins\junit\lib\junit-rt.jar;C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.3.4\plugins\junit\lib\junit5-rt.jar;C:\java\jdk1.8.0_181\jre\lib\charsets.jar;C:\java\jdk1.8.0_181\jre\lib\deploy.jar;C:\java\jdk1.8.0_181\jre\lib\ext\access-bridge-64.jar;C:\java\jdk1.8.0_181\jre\lib\ext\cldrdata.jar;C:\java\jdk1.8.0_181\jre\lib\ext\dnsns.jar;C:\java\jdk1.8.0_181\jre\lib\ext\jaccess.jar;C:\java\jdk1.8.0_181\jre\lib\ext\jfxrt.jar;C:\java\jdk1.8.0_181\jre\lib\ext\localedata.jar;C:\java\jdk1.8.0_181\jre\lib\ext\nashorn.jar;C:\java\jdk1.8.0_181\jre\lib\ext\sunec.
View train.py
from utils import load_data
from model import get_model
print("Loading data...")
(x_train, y_train), (x_test, y_test) = load_data()
print("Data laoded.")
print(x_train.shape)
View utils.py
import numpy as np
import json
from keras.utils import Progbar
# dictionary management
idx2word = {20000: '<UNK>'}
word2idx = {'<UNK>': 20000}
frequencies = {}
View model.py
from keras.layers import *
from keras.models import *
from utils import max_len, max_words
def get_model():
model = Sequential()
model.add(Embedding(max_words, 128))
model.add(GRU(128))
model.add(Dense(1, activation='sigmoid'))
View setup_instructions.md

ML bootcamp recommended setup

Requirements

OS

  • Windows 10 / Ubuntu / MacOS

Text editor

View utils
from keras.preprocessing.sequence import pad_sequences
import numpy as np
import json
import random
# indexes
word2idx = {}
idx2word = {}
tag2idx = {}
idx2tag = {}
View preprocess
import json
with open('ner_dataset.csv', 'r') as f:
lines = f.readlines()
lines.pop(0)
lines.pop(0)
sentences = []
View libnd4j_cpu_build
[100%] Linking CXX shared library libnd4jcpu.dll
cd /C/libnd4j/blasbuild/cpu/blas && /C/msys64/mingw64/bin/cmake.exe -E remove -f CMakeFiles/nd4jcpu.dir/objects.a
cd /C/libnd4j/blasbuild/cpu/blas && /C/msys64/mingw64/bin/ar.exe cr CMakeFiles/nd4jcpu.dir/objects.a "CMakeFiles/nd4jcpu.dir/cpu/NativeOps.cpp.obj" "CMakeFiles/nd4jcpu.dir/cpu/GraphExecutioner.cpp.obj" "CMak eFiles/nd4jcpu.dir/cpu/NativeOpExcutioner.cpp.obj" "CMakeFiles/nd4jcpu.dir/cpu/NDArray.cpp.obj" "CMakeFiles/nd4jcpu.dir/cpu/NDArrayFactory.cpp.obj" "CMakeFiles/nd4jcpu.dir/__/include/cnpy/cnpy.cpp.obj" "CMak eFiles/nd4jcpu.dir/Environment.cpp.obj" "CMakeFiles/nd4jcpu.dir/__/include/loops/cpu/broadcasting.cpp.obj" "CMakeFiles/nd4jcpu.dir/__/include/loops/cpu/indexreduce.cpp.obj" "CMakeFiles/nd4jcpu.dir/__/include /loops/cpu/random.cpp.obj" "CMakeFiles/nd4jcpu.dir/__/include/loops/cpu/reduce.cpp.obj" "CMakeFiles/nd4jcpu.dir/__/include/loops/cpu/scalar.cpp.obj" "
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.