This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This code is for backup | |
| // Original Aritcle Reference | |
| // https://nickharbour.wordpress.com/2010/07/01/writing-shellcode-with-a-c-compiler/ | |
| #include <stdio.h> | |
| #include <Windows.h> | |
| #include <winternl.h> | |
| #include <wchar.h> | |
| #include <tlhelp32.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'File: VBUtils.vb | |
| 'Author: Nauman Mustafa | |
| 'License: MIT | |
| 'Modified: 05-July-2017 | |
| 'Description: Small List of Utility functions for general use, just include file in your project to use | |
| Public Module VBUtils | |
| 'Private Variables | |
| Dim Rnd As New Random |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'File: Pointer.vb | |
| 'Author: Nauman Mustafa | |
| 'License: MIT | |
| 'Modified: 14-July-2017 | |
| 'Description: Basic implementation of C++ pointers in VB.NET, is used for unsafe C# code conversion via Telerik Code Converter (Unofficial) | |
| ' If you convert c# unsafe code via Telerik code converter, pointers in C# get reference to Pointer(Of T) structure | |
| ' It can't be exactly as C# one because there is no function to get pointer of .net variable. | |
| Imports System.Runtime.InteropServices |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Imports System | |
| Imports System.Threading | |
| Module Program | |
| Dim r As New Random | |
| Private Function RewardOf(value As Integer, thresh As Integer) As Integer | |
| Return If(value < thresh, 1, -1) | |
| End Function | |
| Public Function GetReward(actId As Integer) As Integer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'Ref: https://medium.com/emergent-future/simple-reinforcement-learning-with-tensorflow-part-0-q-learning-with-tables-and-neural-networks-d195264329d0 | |
| Imports System.Threading | |
| Module Program | |
| Public Sub Main() | |
| Dim actionNames = {"Left", "Top", "Right", "Bottom"} | |
| Dim env As New FrozenLake(10) | |
| Dim agent As New QAgent(env.StateCount, env.ActionCount, True) | |
| Dim state = env.Reset() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 'License: https://creativecommons.org/licenses/by/4.0/legalcode | |
| Imports System.IO | |
| Imports System.Linq.Expressions | |
| Imports System.Reflection | |
| Imports System.Runtime.InteropServices | |
| Module Program | |
| Private Function CreateDrive(name As String, len As Integer) As Stream | |
| Dim fx = File.Open(name, FileMode.OpenOrCreate) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import cv2 | |
| import numpy as np | |
| from collections import namedtuple as Tuple | |
| from recordclass import recordclass as Record | |
| Line = Tuple('Line', 'x y count spacing staff') | |
| Staff = Tuple('Staff', 'x sy ey w h points spacing lncount') | |
| Point = Tuple('Point', 'x y group spacing') | |
| if __name__ == '__main__': |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # EAST - Efficient & Advanced Scene Text Detector | |
| # Python Tensorflow Frozen Implementation | |
| # Used for Generating Embedded Executable | |
| import os | |
| import cv2 | |
| import sys | |
| import time | |
| import numpy as np | |
| import tensorflow as tf |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This script converts msra ground truth format to east training format | |
| # Download and extract MSRA, cd <MSRA_DIR>, mkdir out and run this script | |
| # https://github.com/argman/EAST | |
| import os | |
| import math | |
| import shutil | |
| import numpy as np | |
| rotate = lambda xy, theta: [xy[0] * math.cos(theta) - xy[1] * math.sin(theta),xy[0] * math.sin(theta) + xy[1] * math.cos(theta)] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Pure TF implm. | |
| # Fibonacci series using tensorflow | |
| import tensorflow as tf | |
| import numpy as np | |
| import time | |
| def build_graph2(max_count): | |
| init = np.zeros([max_count], dtype=int) | |
| m0 = tf.Variable(init,dtype=tf.int32) | |
| i0 = tf.constant(2) |