Endpoint: https://api.github.com/graphql Authentication: Bearer {token}
query ($number_of_repos: Int!) {
viewer {
name
repositories(last: $number_of_repos) {
nodes {
name
| # Count total EBS based storage in AWS | |
| aws ec2 describe-volumes | jq "[.Volumes[].Size] | add" | |
| # Count total EBS storage with a tag filter | |
| aws ec2 describe-volumes --filters "Name=tag:Name,Values=CloudEndure Volume qjenc" | jq "[.Volumes[].Size] | add" | |
| # Describe instances concisely | |
| aws ec2 describe-instances | jq '[.Reservations | .[] | .Instances | .[] | {InstanceId: .InstanceId, State: .State, SubnetId: .SubnetId, VpcId: .VpcId, Name: (.Tags[]|select(.Key=="Name")|.Value)}]' | |
| # Wait until $instance_id is running and then immediately stop it again | |
| aws ec2 wait instance-running --instance-id $instance_id && aws ec2 stop-instances --instance-id $instance_id | |
| # Get 10th instance in the account |
Endpoint: https://api.github.com/graphql Authentication: Bearer {token}
query ($number_of_repos: Int!) {
viewer {
name
repositories(last: $number_of_repos) {
nodes {
name
| origin: | |
| CLAVE: | |
| - 1 | |
| - 2 | |
| - 99 | |
| DESCRIPCION: | |
| - USMER | |
| - FUERA DE USMER | |
| - NO ESPECIFICADO | |
| sector: |
| library(dplyr) | |
| # this function will soon be added to my R Package: https://github.com/mayrop/r-covid19in-mx | |
| # also get the yaml file from: https://gist.github.com/mayrop/83c955e5038390095aef9e5405c632b6 | |
| source("functions.R") | |
| # download CSV from: https://www.gob.mx/salud/documentos/datos-abiertos-152127 | |
| input <- read.csv("covid19_mexico_13_04_2020.csv", stringsAsFactors=FALSE, fileEncoding="latin1") |
Given a number n, find the sum of all n-digit palindromes.
Given that an "even word" is a word in which each character appears an even number of times, write a function that takes in a string and returns the minimum number of letters to be removed to make that string an even word.
| # Interview Question of the Week: Jan 13, 2020 | |
| # 126 of rendezvous with cassidoo | |
| # https://cassidoo.co/newsletter/ | |
| # Given a number n, find the sum of all n-digit palindromes. | |
| # >> nPalindromes(2) | |
| # >> 495 // 11 + 22 + 33 + 44 + 55 + 66 + 77 + 88 + 99 | |
| # Removing exponential notation | |
| options(scipen=999) |
| FROM ubuntu:18.04 | |
| # Replace shell with bash so we can source files | |
| RUN rm /bin/sh && ln -s /bin/bash /bin/sh | |
| RUN apt-get update --fix-missing | |
| RUN apt-get install -y curl | |
| RUN apt-get install -y build-essential libssl-dev | |
| RUN apt-get install -y git |
| # https://thisisnic.github.io/2018/03/31/what-the-heck-is-quasiquotation/ | |
| > enquo(Species) | |
| Error in (function (x) : object 'Species' not found | |
| > quo(Species) | |
| <quosure> | |
| expr: ^Species | |
| env: global | |
| > my_test <- function(col) { |
| import numpy as np... | |
| import numpy as np | |
| import pandas as pd | |
| import re | |
| def get_patterns(ids, debug=False): | |
| max_char = len(str(np.max(ids))) # getting max length | |
| ids = list(map(str, ids)) # changing to chars |
I hereby claim:
To claim this, I am signing this object: