Skip to content

Instantly share code, notes, and snippets.

View runscible's full-sized avatar
🍞

Gustavo runscible

🍞
View GitHub Profile
def get_data():
if __name__ == '__main__':
try:
raw_csv = open(f'./raw_csv.csv', 'w')
client = paramiko.SSHClient()
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
client.connect(HOST, username=USER)
channel = client.get_transport().open_session()
channel.settimeout(5)
@runscible
runscible / csv_parser.py
Last active February 3, 2021 19:21
little csv and filter in vanilla python
import csv
import datetime
import time
indexes = []
def save_value (index, title, file):
indexes.append(index)
file.write(f'"{title}" ,')
keys = {
@runscible
runscible / index.js
Created August 3, 2019 19:59
custom logic for keyboard react and material ui
import React from 'react';
import {
Button,
Dialog,
DialogActions,
DialogContent,
DialogTitle,
Grid,
makeStyles,
Typography
package com.logger;
public class TestLogger {
public static void getCallerClassName() {
StackTraceElement[] stElements = Thread.currentThread().getStackTrace();
for (int i=1; i<stElements.length; i++) {
StackTraceElement ste = stElements[i];
if (!ste.getClassName().equals(TestLogger.class.getName()) && ste.getClassName().indexOf("java.lang.Thread")!=0) {
System.out.println("nombreMeodo "+ste.getMethodName()+ "nombreClase"+ ste.getClassName());
}
const htmlLoader = require('html-webpack-plugin'),
miniCss = require('mini-css-extract-plugin'),
cleanWebpackPlugin = require('clean-webpack-plugin'),
autoPrefixer = require('autoprefixer');
module.exports = {
devtool: 'source-map',
module : {
rules: [
{
function shuffle(array) {
var currentIndex = array.length, temporaryValue, randomIndex;
// While there remain elements to shuffle...
while (0 !== currentIndex) {
// Pick a remaining element...
randomIndex = Math.floor(Math.random() * currentIndex);
currentIndex -= 1;
<!DOCTYPE html>
<html>
<head>
<title>test</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script type="text/javacript" src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
</head>
<body>
<DOCTYPE! html>
<meta charset="utf-8">
<title>test</title>
<header>
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" integrity="sha384-/Y6pD6FV/Vv2HJnA6t+vslU6fwYXjCFtcEpHbNJ0lyAFsXTsjBbfaDjzALeQsN6M" crossorigin="anonymous">
</header>
<body>
<div class="container">
<div class="jumbotron">
public class BufferedSize{
public static BufferedImage resize(BufferedImage img, int newW, int newH) {
Image tmp = img.getScaledInstance(newW, newH, Image.SCALE_SMOOTH);
BufferedImage dimg = new BufferedImage(newW, newH, BufferedImage.TYPE_INT_ARGB);
Graphics2D g2d = dimg.createGraphics();
g2d.drawImage(tmp, 0, 0, null);
g2d.dispose();
return dimg;
package lstas.contar;
import java.security.KeyStore.Entry;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.Comparator;
import java.util.Hashtable;
import java.util.List;
import java.util.Scanner;