Skip to content

Instantly share code, notes, and snippets.

View AgustinParmisano's full-sized avatar
🏠
Working from home

Agustin Parmisano AgustinParmisano

🏠
Working from home
View GitHub Profile
@AgustinParmisano
AgustinParmisano / lorenz_cohvec.py
Last active February 11, 2022 23:34
lorenz cohvec con python
from ast import literal_eval
import numpy as np
from matplotlib import pyplot as plt
data_file = open("CohVec.txt", "r")
data = data_file.read()
list_data1 = data.replace("{","[")
list_data2 = list_data1.replace("}","]")
class Alumno:
def __init__(self, nombre, apellido, dni, materias, becado = False):
self.nombre = nombre
self.apellido = apellido
self.dni = dni
self.materias = materias
self.becado = becado
def mejorCursada(self):
class Cliente():
def __init__(self, nombre, apellido):
self.nombre = nombre
self.apellido = apellido
class Producto():
def __init__(self, nombre, precio, id):
self.nombre = nombre
self.precio = precio
@AgustinParmisano
AgustinParmisano / nessus_process_checker.sh
Last active April 16, 2019 15:04
nessus process resources checker
#!/bin/bash
top -b -c -p $(pgrep -d',' -f nessusd) > top.dat &
while :
do
for i in {1..50} :
do
cat top.dat | grep nessusd | cut -c 50-53 > nessus_cpu.txt
sleep 5
data=$(awk '/./{line=$0} END{print line}' nessus_cpu.txt)
@AgustinParmisano
AgustinParmisano / mili_sensor_simulation.py
Last active December 3, 2018 18:58
sensor simulation in mili time ranges
import time
import random
import paho.mqtt.client as mqtt
# The callback for when the client receives a CONNACK response from the server.
def on_connect(client, userdata, flags, rc):
print("Connected with result code "+str(rc))
# Subscribing in on_connect() means that if we lose the connection and
# reconnect then subscriptions will be renewed.
@AgustinParmisano
AgustinParmisano / base1
Created November 25, 2018 01:09
testing sonic pi
use_debug false
use_bpm 130
fadein = (ramp *range(0 ,2, 0.01))
live_loop :kick do
if (spread 1, 4).tick then
sample :bd_tek, amp: fadein.look, cutoff: 80
end
sleep 0.25
@AgustinParmisano
AgustinParmisano / cesar_cipher.py
Created November 16, 2018 17:54
cesar cipher with circular queue
import string
class ColaCircular:
def __init__(self):
self.datalist = []
def push(self, data):
self.datalist.append(data)
import paho.mqtt.client as mqtt
import paho.mqtt.publish as publish
import time
import datetime
import json
import ast
import requests
import Queue
import sys
import base64
@AgustinParmisano
AgustinParmisano / pattern_lambda_example.py
Created April 21, 2018 22:22
un pequeño ejemplo de lambda con pattern
#!/usr/bin/python3
import pattern.es
verbosInfinitivos = input("Ingrese una frase: ")
infs = map(lambda v : pattern.es.conjugate(v,'inf'), verbosInfinitivos.split(" "))
print(list(infs))
@AgustinParmisano
AgustinParmisano / scancat.sh
Last active April 17, 2018 04:05
host port scan with netcat
#!/bin/bash
if [ $# -ne 1 ]; then
echo "Usage: port"
exit 1
fi
local_ip=$(ifconfig | grep "inet " | tail -1 | awk -F ' ' '{print $2}')
port=$1
ips=($(fping -g $local_ip/24 2> /dev/null | grep alive | cut -d" " -f1 | sed -n '1!p'))