Skip to content

Instantly share code, notes, and snippets.

View h3ct0rjs's full-sized avatar
🦁
O₂⇒CO₂

Héctor F. Jiménez. S h3ct0rjs

🦁
O₂⇒CO₂
View GitHub Profile
#!/bin/bash
# [email protected]
# automatically turn on the second display
xrandrOut=$(xrandr)
hdmiName=$(echo "${xrandrOut}" | grep -i 'HDMI' | awk '{print $1}')
edpName=$(echo "${xrandrOut}" | grep -i 'eDP' | awk '{print $1}')
activeDisplays=$(echo "${xrandrOut}" | grep " connected" | sed -e "s/\([A-Z0-9]\+\) connected.*/\1/" | tr -s '\n' ' ')
displayFile='/tmp/.displays'
@h3ct0rjs
h3ct0rjs / reader.py
Last active September 3, 2017 17:47
a simple implementation to read multiple files, just tested xlsx with <1000 rows
#-*-coding:utf-8 -*-
import openpyxl
import os
#feedback:[email protected]
# Notes :
#There're differents options to work with excel files, they are:
#openpyxl,xlsxwriter,xlrd,xlwt...and many others you can find the list here:
#http://www.python-excel.org/,Pyxl is the best option because in all my test
#was the optimal in temporal and spacial time, without mention that if you have
#large big files your script could fail. I used the book Automating boring stuff
#This was the easy I just solve this problem, in c++ for permutations I need to do this using next_permutation.
from itertools import permutations
def solve(n):
cols=(range(n))
for vec in permutations(cols):
if(n == len(set(vec[i]+i for i in cols)) == len(set(vec[i]-i for i in cols))):
print map(lambda x:x+1, vec)
%programa familia Buen Dia
%Hector F. Jimenez, Kevin Moreno H.
%Programacion Logica.2017-2
%
hombre('Jose I Buendia')
mujer('Ursula Iguaran')
hombre('Jose II Buendia')
hombre('Aureliano Buendia')
mujer('Amaranta Buendia')
mujer('Rebeca')
@h3ct0rjs
h3ct0rjs / solve.py
Created March 29, 2017 20:15
testangel, parcial 1
#!/usr/bin
#-*- coding :utf-8 -*-
#Usage of Product Class, WhiteProduct
from solveparcial import *
HEADER = '\033[95m'
OK = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
Listas de Seleccion
>SELECT IDFAB,IDPRODUCTO,DESCRIPCION,PRECIO,(PRECIO+PRECIO*0.16) FROM PRODUCTOS;
>SELECT NUMPEDIDO,FAB,PRODUCTO,CANT,(IMPORTE/CANT),IMPORTE FROM pedidos;
>SELECT NOMBRE,CURRENT_TIME(CONTRATO) FROM empleados;
Ordenacion de Filas
@h3ct0rjs
h3ct0rjs / final.pl
Created May 31, 2017 15:43
Kevin and Hector Final Project Term, Computer Programming iii
%Final Term Project Computer Programming III,
%Kevin A. Moreno, Hector F. Jimenez S.
%uso: en la consola de prolog :
%menu.
%opciones : number. eg: 1.
%ToDo:
%Punto 2, Busqueda Binaria.
%Punto 5. Reinas
banner:-
Job description
Early stage startup seeks like minded Sr. Network Automation Engineer to help conquer planet. PacketFabric is creating a new platform for networks to connect and exchange traffic, regardless of location. The technical team is a small, talented, and close knit group. We have a bond formed from the love of running head long at difficult problems and finding highly effective solutions.
You are an ace software engineer who understands all the fundamentals of design patterns, the ins and outs of concurrency, and working on large scale systems, while simultaneously maintaining a good working knowledge of how networks actually function. You should definitely be the type that appreciates diversity in your day, and challenges outside of your comfort level! A typical day might include these types of activities:
- Tuning, tweaking and refactoring the existing metrics collection system to get the collection intervals down another second or two.
- Troubleshooting complex issues in interactions bet
#!/bin/bash
#for C4rias...hfjimenez
echo -e "[*] Telegram Installer"
wget https://updates.tdesktop.com/tlinux/tsetup.1.1.19.tar.xz -O tel
tar -xvf tel
sudo mv Telegram/ /opt/telegram
sudo ln -s /opt/telegram/Telegram /usr/bin/telegram
@h3ct0rjs
h3ct0rjs / uk.js
Created August 22, 2017 21:14
correct version
//! moment-holiday.js locale configuration
//! locale : UK
//! author : Kodie Grantham : https://github.com/kodie
//! locale-author: DMCooper : https://github.com/SilentGamelan
//
/* regions :
EN : England
SL : Scotland
WL : Wales
NI : Northern Island