Skip to content

Instantly share code, notes, and snippets.

View pganti's full-sized avatar

Paddy Ganti pganti

  • Instart Logic
  • Bay Area,CA
View GitHub Profile
@pganti
pganti / plot.awk
Created April 15, 2024 21:15 — forked from katef/plot.awk
#!/usr/bin/awk -f
# This program is a copy of guff, a plot device. https://github.com/silentbicycle/guff
# My copy here is written in awk instead of C, has no compelling benefit.
# Public domain. @thingskatedid
# Run as awk -v x=xyz ... or env variables for stuff?
# Assumptions: the data is evenly spaced along the x-axis
# TODO: moving average
1. Set of questions or problems you hope your project will answer or address
This project addresses the problem of discovering and recommending unknown and unseen anomalies in access logs for large-scale security policy management. It presents a novel, non-standard recommender system called Helios that uses discrete categorical labels from access logs to build categorical combinations and offers a flexible and interpretable discovery engine for abnormal categorical combinations in access logs.
2. Description of methodologies and approaches used in the project
The approach to be used would be the following three steps
1. Constructing categorical combinations from discrete categorical labels in access logs
2. Using rank statistics based on the constructed categorical combinations to recommend highly abnormal patterns
3. Surface the reasoning behind the recommendation using visualization if possible (visualizing the vector space)
@pganti
pganti / fcast.py
Created December 18, 2021 04:47
montecarlo_fcast
import csv
import random
with open("input.csv") as f:
reader = csv.DictReader(f)
lines = list(reader)
samples = list()
results = []
for i in range (100):
for i in range(420):
@pganti
pganti / ats.txt
Created February 18, 2020 20:28
ATS Arch
function:
The main function of Trafficserver is caching, and of course you can use it as a pure reverse proxy (as usual with nginx). Often the best way to cut into a large system is to see how it works, with two main portals using traffic server: Profiles and Plug-ins. All users need a profile, and a plug-in is required for advanced users.
Traffic support for large-scale cluster processing, unlike the Nginx single point (which requires OSPF equalization links for redundancy), all profiles can be changed to one notification all. The program is divided into several subroutines according to the function, there are the procedures used in the service running, and the management is used. See below for details.
configuration file:
L Cache Cache.config
n Upstream pull data congestion control: Congestion.config
@pganti
pganti / ats.yaml
Created February 17, 2020 20:58
k8s for ats
# Example Kubernetes Deployment configuration for running the Traffic Server
# ingress controller. It will listen internally on ports 8080 and 8443, and
# expose ports 30080 and 30443 as a NodePort service. Use an external load
# balancer of some sort to route incoming traffic to those ports.
#
# For an example using a DaemonSet and a hostPort, see example-daemonset.yaml.
apiVersion: v1
kind: Namespace
metadata:
@pganti
pganti / ats.md
Created February 17, 2020 20:18
ATS install

CentOS 7 + Apache Traffic Server 8.0.1 安装记录

注意下文中,步骤1和2可以同时进行,完毕后再进行第3步,第4、5步可选,最后第6步。

1. 下载并编译安装

# 同步下系统时间
yum install -y ntpdate tmux
ntpdate time1.aliyun.com
@pganti
pganti / book2.html
Created January 3, 2020 22:41
bookamraks
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><H3 ADD_DATE="1537404388" LAST_MODIFIED="1574914328" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks Bar</H3>
@pganti
pganti / book1.html
Created January 3, 2020 22:40
bookmarks
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><H3 ADD_DATE="1536191792" LAST_MODIFIED="1577056661" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks Bar</H3>
@pganti
pganti / networkx.py
Created December 22, 2019 20:20
crunchbase to network
# Crunchbase to NetworkX network builder
#
# Builds a network from the Crunchbase database and outputs it in graphml format.
#
# Required modules:
# simplejson (http://undefined.org/python/#simplejson)
# networkx (http://networkx.lanl.gov/)
import urllib2, simplejson as json, networkx as nx
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>