Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Agustin Parmisano AgustinParmisano

🏠
Working from home
View GitHub Profile
View parcial_segunda_fecha_programacion2.py
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):
View parcial101_programacion2.py
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 Apr 16, 2019
nessus process resources checker
View nessus_process_checker.sh
#!/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 Dec 3, 2018
sensor simulation in mili time ranges
View mili_sensor_simulation.py
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.
View base1
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 Nov 16, 2018
cesar cipher with circular queue
View cesar_cipher.py
import string
class ColaCircular:
def __init__(self):
self.datalist = []
def push(self, data):
self.datalist.append(data)
View mqtt_aes_basics.py
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 Apr 21, 2018
un pequeño ejemplo de lambda con pattern
View pattern_lambda_example.py
#!/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 Apr 17, 2018
host port scan with netcat
View scancat.sh
#!/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'))
@AgustinParmisano
AgustinParmisano / magic_cursor.py
Last active Apr 21, 2018
pygame + lambda example
View magic_cursor.py
#!/usr/bin/python3
#Desarrolle un programa en Python3 utilizando Pygame y expresiones lambda
#que genere figuras de distintos colores según la posicion del puntero y el tiempo.
#Las figuras no deben exeder los 100 píxeles de diámetro.
#Debe dar la sesación que el cursor pinta en la pantalla.
import pygame
import datetime