Realizar o ping em uma url deteminada e anotar o IP, tempo médio e máximo.
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
| TIL: If you need to give firewall access to a VM that just have internal IP in Azure to another Azure VM, in another subscription, you can use `curl ifconfig.me` to discover the external ip from the machine, and allow in the other machine. | |
| Deal was: | |
| Subscription #1 form person one has one VM with only private ip, that need to access a VM in Subscripton #2 from person 2. So, they are anot connected in any way. | |
| Due VM #1 has "private only IP", something like 172.168.X.X, We could not allow it in VM#2. | |
| How we solve: | |
| In VM #1, run: `curl ifconfig.me` it will then show a "external ip", like 20.168.X.X. Add this IP in the "Allow List"of VM #2 and it worked. |
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
| Create a dockerfile for Context7 image: | |
| https://github.com/upstash/context7?tab=readme-ov-file#b-manual-configuration | |
| dockerfile.context7: | |
| ``` | |
| FROM node:18-alpine | |
| WORKDIR /app |
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
| AZURE_STORAGE_CONNECTION_STRING=DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://host.docker.internal:10000/devstoreaccount1;QueueEndpoint=http://host.docker.internal:10001/devstoreaccount1; | |
| AZURE_CONTAINER=ui-container | |
| SFTP_HOST=host.docker.internal | |
| SFTP_USER=foo | |
| SFTP_PASS=pass | |
| SFTP_FOLDER=/upload | |
| POSTGRES_HOST=host.docker.internal | |
| POSTGRES_PORT=5433 |
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
| @echo off | |
| for /F "usebackq tokens=1,2 delims==" %%i in (`wmic os get LocalDateTime /VALUE 2^>NUL`) do if '.%%i.'=='.LocalDateTime.' set ldt=%%j | |
| set actual_date=%ldt:~0,4%%ldt:~4,2%%ldt:~6,2% | |
| echo Local date is %actual_date% | |
| SET MY_PROGRAM=E:/TempoSilencio/silence_extractor.exe | |
| SET MY_BASE_PATH=I:\SPEECHMINER\PROCESSADO | |
| SET MY_COMMAND=%MY_PROGRAM% "%MY_BASE_PATH%" "%actual_date%" "%actual_date%" |
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
| library(foreach) | |
| library(doParallel) | |
| library(DBI) | |
| #Creating the cluster | |
| cl <- makeCluster(detectCores() -1) | |
| # Defining packages and variables for cluster | |
| clusterEvalQ(cl, { | |
| library(odbc) |
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
| library(keras) | |
| texts <- c("Today I got to the movie", | |
| "Yesterday we got to the movie", | |
| "Today was cold at the movie", | |
| "Somethign happened yesterday") | |
| tok <- keras::text_tokenizer(num_words = 5) | |
| keras::fit_text_tokenizer(tok, texts) |
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
| FROM rocker/tidyverse | |
| RUN echo "deb http://ftp.debian.org/debian sid main" | tee -a /etc/apt/sources.list.d/sid.list | |
| RUN apt-get update -qq && apt-get -y --no-install-recommends install \ | |
| apt-transport-https \ | |
| libssl-dev \ | |
| libsasl2-dev \ | |
| openssl \ | |
| curl \ |
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
| require(rvest) | |
| #website | |
| url <- ("http://www.anbima.com.br/est_termo/Curva_Zero.asp") | |
| pgsession <- html_session(url) | |
| pgform <-html_form(pgsession)[[1]] | |
| fake_submit <- list("name" = NULL, | |
| "type" = "submit", | |
| "value" = "Submit", |
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
| library(tidyverse) | |
| files <- list.files(path = "./data/", pattern = "*.csv") | |
| df <- files %>% | |
| map(function(x) { | |
| read.csv(paste0("./data/", x)) | |
| }) %>% | |
| reduce(rbind) | |
NewerOlder