Skip to content

Instantly share code, notes, and snippets.

View Jzarecta's full-sized avatar
💭
new year new repos coming in.

JZA Jzarecta

💭
new year new repos coming in.
View GitHub Profile
@Jzarecta
Jzarecta / stopwatch.py
Created January 17, 2021 04:36
Un programa de cronometro
#! /usr/bin/python3
# stopwatch.py - Un programa de cronometro
import time
print('Presiona ENTER para iniciar. Despues, presiona ENTER para hacer "clic" \
al stopwatch. Presiona Ctrl-C para salir')
startTime=time.time()
lastTime = startTime
lapNum = 1
try:
@Jzarecta
Jzarecta / pyweb.py
Created January 17, 2021 04:35
Lanza ventana con pagina web embedida en PyQt5
#! /usr/bin/python3
# pyweb.py - Lanza ventana con pagina web embedida en PyQt5
import sys
from PyQt5.QtCore import *
from PyQt5.QtWebEngineWidgets import *
from PyQt5.QtWidgets import QApplication
app = QApplication(sys.argv)
web = QWebEngineView()
@Jzarecta
Jzarecta / mapIt.py
Created January 17, 2021 04:32
Lanza un mapa en un navegador usando la direccion desde el portatpapeles o linea de comando
#! /usr/bin/python3
# mapIt.py - Lanza un mapa en un navegador usando la direccion desde el
# portatpapeles o linea de comando
import webbrowser, sys, pyperclip
if len(sys.argv) > 1:
# Obten la direccion desde la linea de comando
address = ' '.join(sys.argv[1:])
else:
# Obten la direcci[on del portapapeles
@Jzarecta
Jzarecta / MySQL connection to a C program
Created October 21, 2020 15:21
You need to install the libmysqlclient-dev package on Linux
#include <mysql.h>
#include <stdio.h>
main() {
MYSQL *conn;
MYSQL_RES *res;
MYSQL_ROW row;
char *server = "localhost";
char *user = "root";
char *password = "root"; /* set me first */
@Jzarecta
Jzarecta / DataGrabber.py
Created March 4, 2020 00:43
Grab the data from CMC
import requests, time
from bs4 import BeautifulSoup
from selenium import webdriver
import cryptocurrencies
BASE_URL = 'http://coinmarketcap.com/currencies/'
CUR_URL = 'bitcoin' # This will be cycled
ATTR_URL = '/historical-data/?start=20130428&end=20200303'
page = BASE_URL+CUR_URL+ATTR_URL
@Jzarecta
Jzarecta / ytchromecast.py
Created December 11, 2019 05:11
PyChromecast broadcasting
#!/bin/env python
"""
YouTube Controller to use with pychromecast
you feed them a youtube URL and it will broadcast it to your device
Originally from the pychromecast examples
ToDo:
Support more youtube urls alias
"""

Keybase proof

I hereby claim:

  • I am jzarecta on github.
  • I am jzarecta (https://keybase.io/jzarecta) on keybase.
  • I have a public key ASAUa018PlNQj4NinsEqfke8oDMfJ-rPpwtMG4uldMazxAo

To claim this, I am signing this object:

@Jzarecta
Jzarecta / file.js
Created November 23, 2018 08:54
Filtrando la pregunta
/**
* Converts the given form URL into a JSON object.
*/
function onFormSubmit(e) {
var formResponses = FormApp.getActiveForm().getResponses();
var formResponse = formResponses[formResponses.length-1];
var itemResponses = formResponse.getItemResponses();
var result = getParamsForTrello( itemResponses );
Logger.log( result );
// Steven Schmatz
// Humanitas Labs
// 13 October, 2016.
// Sample URL. Note that this must be authenticated with the current user.
var URL = "https://docs.google.com/forms/d/1lyQ_wI6WBMV3YIdVj8I3D8w9yVfKdYdQtRoztNue8rQ/edit";
/**
* Converts the given form URL into a JSON object.
import hashlib as hasher
import datetime as date
# Define la estructura del bloque
class Block:
def __init__(self, index, timestamp, data, previous_hash):
self.index = index
self.timestamp = timestamp
self.data = data
self.previous_hash = previous_hash