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
// add menu | |
function onOpen() { | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
var menuEntries = [{name:"Calcular Horas", functionName: "calculateHours"}]; | |
ss.addMenu("Hours", menuEntries); | |
// calcular al iniciar | |
calculateHours(); | |
} | |
function count_hours(cal_id, event_name){ |
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
# yum install -y rpm-build rpmdevtools yum-utils centos-release-scl-rh | |
# rpmdev-setuptree | |
# mkdir -p ~/rpmbuild/{BUILD,RPMS,SOURCES,SPECS,SRPMS,tmp} | |
# spectool -g -R rpmbuild/SPECS/neovim.spec | |
# yum-builddep -y rpmbuild/SPECS/neovim.spec | |
# source scl_source enable devtoolset-6 | |
# rpmbuild -ba rpmbuild/SPECS/neovim.spec | |
%define build_timestamp %(date +"%Y%m%d%H%M") |
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
# install gcc 6.x | |
# Install CentOS SCLo RH repository: | |
yum install centos-release-scl-rh | |
# Install devtoolset-6-gcc rpm package: | |
yum install devtoolset-6-gcc | |
# activate scl | |
scl enable devtoolset-6 bash | |
# Prerequisites | |
sudo yum -y install libtool autoconf automake cmake gcc gcc-c++ make pkgconfig unzip patch gettext |
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
# pip install ohlc; apt install jq | |
# with other token, ohlcbtc ETHUSDT | |
ohlcbtc () { | |
token=${1:-BTCUSDT} | |
while true; | |
do | |
ohlc --pab --ha -n <( curl "https://api.binance.com/api/v3/klines?symbol=${token}&interval=1h" 2>/dev/null | jq -r '.[][1:5]|join(" ")' ) | |
sleep 3600 | |
done |
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 web3 import Web3 | |
# https://web3py.readthedocs.io/en/stable/quickstart.html | |
# https://docs.matic.network/docs/develop/network-details/network/ | |
w3 = Web3(Web3.HTTPProvider("https://rpc-mainnet.matic.network")) | |
print(w3.isConnected()) | |
print(w3.eth.block_number) |
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
# /etc/systemd/system/docker_clean_old.service | |
[Unit] | |
Description=delete old containers | |
[Service] | |
CPUQuota=20% | |
TimeoutSec=3600 | |
ExecStart=/bin/bash /root/opt/bin/docker_clean_old |
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
# reference | |
# $HOME/Applications/IBM/ILOG/CPLEX_Studio1262/cplex/examples/x86-64_osx/static_pic/Makefile | |
SYSTEM = x86-64_osx | |
LIBFORMAT = static_pic | |
CPLEXDIR = /Users/$(shell whoami)/Applications/IBM/ILOG/CPLEX_Studio1262 | |
CONCERTDIR = $(CPLEXDIR)/concert | |
CPLEXLIBDIR = $(CPLEXDIR)/cplex/lib/$(SYSTEM)/$(LIBFORMAT) |
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 pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
import seaborn as sns | |
import matplotlib | |
sns.set(rc={'figure.figsize':(14,12)}) | |
file_name = "duration_per_project.csv" | |
df = pd.read_csv(file_name, ';') |
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
#include <M5StickCPlus.h> | |
// the setup routine runs once when M5StickC starts up | |
void setup() { | |
// initialize the M5StickC object | |
M5.begin(); | |
// Lcd display | |
M5.Lcd.fillScreen(WHITE); |
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 ( | |
"fmt" | |
"io/ioutil" | |
"time" | |
"github.com/dgrijalva/jwt-go" | |
) | |
func signingWithHMAC() { |