This file contains hidden or 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
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) | |
This file contains hidden or 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 csv | |
import datetime | |
import time | |
indexes = [] | |
def save_value (index, title, file): | |
indexes.append(index) | |
file.write(f'"{title}" ,') | |
keys = { |
This file contains hidden or 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 React from 'react'; | |
import { | |
Button, | |
Dialog, | |
DialogActions, | |
DialogContent, | |
DialogTitle, | |
Grid, | |
makeStyles, | |
Typography |
This file contains hidden or 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
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()); | |
} |
This file contains hidden or 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
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: [ | |
{ |
This file contains hidden or 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
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; |
This file contains hidden or 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
<!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> |
This file contains hidden or 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
<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"> |
This file contains hidden or 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
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; |
This file contains hidden or 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
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; |