Skip to content

Instantly share code, notes, and snippets.

View octaviordz's full-sized avatar

Octavio Rodríguez Castañeda octaviordz

View GitHub Profile
@octaviordz
octaviordz / Network.fsx
Created August 13, 2023 04:18 — forked from dlidstrom/output
Minimal neural network in F# with no dependencies
(*
This is a vanilla neural network implementation in about 60 lines of F# code.
It was implemented after reading Matt Mazur's step-by-step description found here:
https://mattmazur.com/2015/03/17/a-step-by-step-backpropagation-example/
- There are *no* dependencies.
- This code updates the biases too (which Matt Mazur doesn't)
This network can be used for simple image recognition (handwriting examples),
classification, prediction, and so on. Even if this is simple I think the
@octaviordz
octaviordz / parse-IIS-Log.cmd
Created June 2, 2023 22:07 — forked from dejanstojanovic/parse-IIS-Log.cmd
parse raw IIS logs using MS Log Parser into csv file
logparser -i:W3C -o:csv "SELECT * INTO c:\temp\results.csv FROM c:\temp\myLogFile.log"
logparser.exe "SELECT * FROM u_ex17020200.log WHERE cs-uri-query LIKE '%updvmsisdn.aspx%'" -o:CSV -q:ON -stats:OFF >> C:\Log1\output.csv
logparser.exe "SELECT * FROM u_ex*.log WHERE cs-uri-stem LIKE '%updvmsisdn.aspx%' AND cs-uri-query LIKE '%countryId=31%'" -o:CSV -q:ON -stats:OFF >> C:\Users\Administrator\Desktop\temp\output.csv
logparser.exe "SELECT * FROM u_ex17022402.log WHERE cs-uri-stem LIKE '%updvmsisdn.aspx%' AND cs-uri-query LIKE '%countryId=31%'" -o:CSV -q:ON -stats:OFF >> C:\Users\Administrator\Desktop\temp\TEMP.csv
@octaviordz
octaviordz / CleanArchitecture.md
Created September 19, 2020 02:31 — forked from ygrenzinger/CleanArchitecture.md
Summary of Clean Architecture by Robert C. Martin

Summary of book "Clean Architecture" by Robert C. Martin

Uncle Bob, the well known author of Clean Code, is coming back to us with a new book called Clean Architecture which wants to take a larger view on how to create software.

Even if Clean Code is one of the major book around OOP and code design (mainly by presenting the SOLID principles), I was not totally impressed by the book.

Clean Architecture leaves me with the same feeling, even if it's pushing the development world to do better, has some good stories and present robust principles to build software.

The book is build around 34 chapters organised in chapters.

@octaviordz
octaviordz / ants.clj
Created January 22, 2020 02:02 — forked from jjcomer/ants.clj
Ant Simulation -- From Clojure Concurrency Presentation
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ant sim ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Copyright (c) Rich Hickey. All rights reserved.
; The use and distribution terms for this software are covered by the
; Common Public License 1.0 (http://opensource.org/licenses/cpl.php)
; which can be found in the file CPL.TXT at the root of this distribution.
; By using this software in any fashion, you are agreeing to be bound by
; the terms of this license.
; You must not remove this notice, or any other, from this software.
;As shown in the presentation: http://blip.tv/clojure/clojure-concurrency-819147
@octaviordz
octaviordz / AuthenticationController.cs
Last active August 30, 2018 20:10
ASP.NET: How to create form authentication cookie and set HttpContext.User
[HttpGet]
public IHttpActionResult Authentication(string userName, string password)
{
// Authenticate by any application specific logic, like calling to a a database and validating username and password
var appUser = DbAuthentication(userName, password);
SetAuthenticationCookie(appUser);
}
private static void SetAuthenticationCookie(Security.AppUser user)
New feature git-svn
===================
Problem: When cloning from a svn repository that is corrupted, git-svn fails trying to fetch the revision that
is corrupted.
Lets explain it with an example:
git svn clone http://svn.server.com/project
# gits start getting the revisions from the svn server.
# when it gets to revision 1234 it fails with the next error