Skip to content

Instantly share code, notes, and snippets.

View aicam's full-sized avatar

ali risheh aicam

  • Cal State, LA
View GitHub Profile
@aicam
aicam / HttpProxy.go
Created March 16, 2020 11:26 — forked from yowu/HttpProxy.go
A simple HTTP proxy by Golang
package main
import (
"flag"
"io"
"log"
"net"
"net/http"
"strings"
)
@aicam
aicam / rsa_util.go
Created May 11, 2020 09:49 — forked from miguelmota/rsa_util.go
Golang RSA encrypt and decrypt example
package ciphers
import (
"crypto/rand"
"crypto/rsa"
"crypto/sha512"
"crypto/x509"
"encoding/pem"
"log"
)
@aicam
aicam / golang-jwt-example.go
Created June 5, 2020 15:40
This file contains two function to create and sign JWT token, the generation needs a token which is declared global in file but token key passes to check function
package cryptoUtils
import (
"github.com/dgrijalva/jwt-go"
"time"
)
type Credentials struct {
Password string `json:"password"`
Username string `json:"username"`
@aicam
aicam / autoencoder.py
Created June 15, 2020 04:46
this method returns two models : first is a complete autoencoder model with training option and an encoder to use to encode your data
from sklearn.metrics import confusion_matrix,classification_report
import keras.backend as K
from keras.engine.topology import Layer, InputSpec
from keras.layers import Dense, Input
from keras.models import Model
from keras.optimizers import SGD
from keras import callbacks
from keras.initializers import VarianceScaling
from sklearn.cluster import KMeans
@aicam
aicam / convolutions.py
Created July 2, 2020 20:09 — forked from jdumont0201/convolutions.py
Image processing with convolutions in Python
import cv2
import numpy as np
img = cv2.imread('images/input.jpg')
gray=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
rows,cols = img.shape[:2]
cv2.imshow('Original',img)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aicam
aicam / min-char-rnn.py
Created March 26, 2021 16:51 — forked from karpathy/min-char-rnn.py
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@aicam
aicam / gist:860d3b7d561230dd30688abadd935471
Created November 25, 2021 18:56 — forked from Aokromes/gist:cb3f80d5b84169cd6a01223833e6eda2
how to compile and setup trinitycore 3.3.5a and 4.3.4 on debian linux
#######################################
# HOW TO COMPILE TRINITYCORE ON LINUX #
#######################################
#####################
# TRINITYCORELEGACY #
#####################
###########################
# TRINITYCORE SETUP GUIDE #
package main
// This file create a new server which you can send requests like http://localhost:4999/https://google.com (url starts after
// port) and it will return the response with all cors headers and save the response in a file, next time if the url file
// exists, the file will be returned and no request will be sent
import (
"crypto/md5"
"encoding/hex"