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
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 / 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("}","]")
//Star Wars Imperial March -
//Simple 2 pin Buzzer Arduino - Source: https://goo.gl/eH33Vh - Arduino Tone: https://goo.gl/ptlXDj -
// NB: ALL NOTES DEFINED WITH STANDARD ENGLISH NAMES, EXCEPT FROM "A"
//THAT IS CALLED WITH THE ITALIAN NAME "LA" BECAUSE A0,A1...ARE THE ANALOG PINS ON ARDUINO.
// (Ab IS CALLED Ab AND NOT LAb)
#define C0 16.35
#define Db0 17.32
#define D0 18.35
#define Eb0 19.45
@AgustinParmisano
AgustinParmisano / tp-link_tl-wn722N_kernel4_linux
Last active March 4, 2020 19:52
pasos para hacer andar la antena TP-LINK TL-WN722N en el kernel 4 de linux
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)