Skip to content

Instantly share code, notes, and snippets.

View aug2uag's full-sized avatar

Reza Fatahi aug2uag

  • Los Angeles, CA
View GitHub Profile
@aug2uag
aug2uag / runner.py
Created April 26, 2025 00:40
JAX model runner
// model runner
"""
JAX-based Model Runner for ARC Challenges
This module provides JAX implementations of the components needed for test-time training
and inference on ARC challenges.
"""
import json
import os, sys
import bz2
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@aug2uag
aug2uag / sentence_similarity.py
Created July 3, 2022 07:28 — forked from talhaanwarch/sentence_similarity.py
CALCULATE SENTENCE SIMILARITY using Pretrained BERT model
# -*- coding: utf-8 -*-
"""
Created on Fri Jun 11 18:58:05 2021
# CALCULATE SENTENCE SIMILARITY
@author: TAC
"""
import torch#pytorch
from transformers import AutoTokenizer, AutoModel#for embeddings
from sklearn.metrics.pairwise import cosine_similarity#for similarity
@aug2uag
aug2uag / socket.ioExpress.md
Last active January 4, 2022 07:20 — forked from patrickbrandt/socket.io_Express_Angular.md
socket.io Express routes

Create socket.io middleware

Include the following code in your app.js module (other standard Express module dependancies and middleware left out for brevity):

var express = require('express');
var http = require('http');
var io = require('socket.io');
var routes = require('./routes/index');

var app = express();
@aug2uag
aug2uag / plot.py
Created December 28, 2021 20:42
double y-axes plot
# Import Library
import numpy as np
import matplotlib.pyplot as plt
# Define Data
x = np.arange(0, 15, 0.2)
data_1 = np.sin(x)
data_2 = np.cos(x)
@aug2uag
aug2uag / gist:d276c0337597de0465890fe5380c8ca4
Last active December 12, 2021 08:16
NodeJS S3 upload image from URL
// https://stackoverflow.com/a/25564742/1546710
var AWS = require('aws-sdk');
var request = require('request');
AWS.config.loadFromPath('./config.json');
var s3 = new AWS.S3();
function put_from_url(url, bucket, key, callback) {
request({
url: url,

Linksys EA4500 Firmware Decryption

I recently pulled a Linksys EA4500 out of storage for evaluation. The first thing I wanted to do was to update the firmware for the device. https://www.linksys.com/us/support-article?articleNum=148385 offers the latest version of the firmware, which is 3.1.7 as of this writing.

However, we can see with the filename that its probably encrypted: FW_EA4500V3_3.1.7.181919_prod.gpg.img

When I run binwalk I don't get any meaningful results, confirming my suspcicions:

reverse R33-sysupgrade-20180510-910b5192.bin

file

Just to make sure it is a firmware image instead of a zip file:

1

strings

@aug2uag
aug2uag / installing-get-on-centos.md
Last active January 17, 2021 00:58 — forked from bradlucas/installing-get-on-centos.md
Installing Geth on Centos

This document installs Go LTS (1.13) as of the time it is written

1) Install Go (Git should already be installed)

$ cd /tmp/
$ wget https://dl.google.com/go/go1.13.linux-amd64.tar.gz
$ sha256sum go1.13.linux-amd64.tar.gz  # should end with "c48e856"
$ sudo tar -C /usr/local -xzf go1.13.linux-amd64.tar.gz
@aug2uag
aug2uag / interval.py
Created November 14, 2020 07:11 — forked from bbengfort/interval.py
Run a function every n seconds using Python threading.
from threading import Timer
from functools import partial
class Interval(object):
def __init__(self, interval, function, args=[], kwargs={}):
"""
Runs the function at a specified interval with given arguments.
"""
self.interval = interval