This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $# -ne 2 ]; then | |
echo "Se requieren 2 parametros: {string} {directorio}" | |
exit 2 | |
fi | |
peso=$(ls -l $2 | grep "$1" | awk -F' ' '{sum+=$5;} END{print sum;}') | |
cant=$(ls -l | tail -n +2 | grep -c t) | |
ext=$(ls -l | grep $1 | awk -F"." '{ print $2 }' | sort | uniq -c | sort | tail -1) | |
echo "Cantidad de archivos encontrados: $cant" | |
echo "Peso total de los archivos: $peso" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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("}","]") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import string | |
class ColaCircular: | |
def __init__(self): | |
self.datalist = [] | |
def push(self, data): | |
self.datalist.append(data) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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)) |
NewerOlder