Skip to content

Instantly share code, notes, and snippets.


Ayush Kaushal Ayushk4

View GitHub Profile
Ayushk4 / ner.html
Created Aug 20, 2019
NER Tagger NB
View ner.html
<!DOCTYPE html>
<head><meta charset="utf-8" />
<script src=""></script>
<script src=""></script>
Ayushk4 / listInsert.cpp
Created Nov 25, 2019
Linked list (sorted)
View listInsert.cpp
#include <iostream>
using namespace std;
// For a single node.
struct Node
int data;
Node * next;
Ayushk4 / Basics of Julia
Created Nov 30, 2019
Julia Workshop in OSS
View Basics of Julia
- Set up.
- Types and Variables and I/O.
- Strings and Char.
- Bool (1==2 && print("this").
- Subtypes supertype and Abstract Data Types and `nothing`.
- If-else.
- Tuples and Lists (1-Index | insert civil-war meme on 0-indexing vs 1-indexing).
- Looping and array slicing.
- Functions, Lambda function.
- Dicts.
Ayushk4 / Stacktrace
Created Dec 24, 2019
BSON fails to load 32-bit from 64-bit system. Appveyor tests for
View Stacktrace
Test threw exception
Expression: (BSON.load(joinpath(#= C:\projects\bson-jl\test\runtests.jl:87 =# @__DIR__(), "saved_on_64bit.bson")))[:a] == ones(Float32, 2, 2)
MethodError: no method matching reshape(::Array{Float32,1}, ::Int64, ::Int64)
Closest candidates are:
reshape(::Array{T,N}, !Matched::Tuple{Vararg{Int32,N}}) where {N, T} at array.jl:303
reshape(::Array{T,N} where N, !Matched::Tuple{Vararg{Int32,N}}) where {N, T} at array.jl:314
reshape(::AbstractArray, !Matched::Int32...) at reshapedarray.jl:99
[1] (::getfield(BSON, Symbol("##39#40")))(::Dict{Symbol,Any}) at C:\projects\bson-jl\src\extensions.jl:76
Ayushk4 / weird.cpp
Last active Mar 18, 2020
What's up with C++ function pointers (Check line 10-13)
View weird.cpp
#include <iostream>
using namespace std;
float Plus (float a, float b) {return a + b;}
float Minus (float a, float b) {return a - b;}
float Mult (float a, float b) {return a * b;}
float Div (float a, float b) {return a / b;}
void apply_this(float a, float b, float (*funct_ptr)(float , float))
You can’t perform that action at this time.