could not execute menu item (internal error) [exception] could not perform service action: o servico nao foi iniciado
==> visual c++
| from difflib import SequenceMatcher | |
| def get_similar_records(df, column, input_string, num_records): | |
| # Create an empty list to store the similar records | |
| similar_records = [] | |
| # Loop through the records in the column | |
| for record in df[column]: | |
| # Calculate the similarity between the input string and the record | |
| similarity = SequenceMatcher(None, input_string, record).ratio() |
| import re | |
| def sanitize_text(text): | |
| # remove extra white space | |
| text = ' '.join(text.split()) | |
| # remove white space at start/end of text | |
| text = text.lstrip() | |
| text = text.rstrip() |
| import os | |
| cmd = 'wget -O products.csv --user="xxx" --password="xxx" http://online.xxx.com/download_xxx_products.php' | |
| os.system(cmd) |
| #!/bin/bash | |
| echo "Installing python3.10" | |
| sudo apt update | |
| sudo apt install software-properities-common | |
| sudo add-apt-repository ppa:deadsnakes/ppa | |
| sudo apt install python3.10 | |
| python3.10 --version | |
| echo "python3.10 is installed" | |
| echo "---------------------" | |
| echo "---------------------" |
| library(data.table) | |
| data <- rio::import("compensation1.xls") | |
| data <- janitor::clean_names(data) | |
| colnames(data) | |
| filename <- tools::file_path_sans_ext(file) #get filename sans extension or path | |
| getwd() | |
| slicer <- c("manager_first_name") | |
| prefix <- c("") #end with _ |
| ## Install old packages | |
| ## https://stackoverflow.com/questions/25721884/how-should-i-deal-with-package-xxx-is-not-available-for-r-version-x-y-z-wa | |
| ## update R in windows | |
| library(installr) | |
| updateR() | |
| ## update R in linux | |
| #FIXME |
| # Create a function programmatically by creating its constituents: | |
| # an argument list, a function body of expressions, and an enclosing environment | |
| args <- alist(x=,y=) | |
| exps <- expression(z <- x^2 + y^2, z <- sqrt(z), return(z)) | |
| body <- as.call(c(as.name("{"), exps)) | |
| f <- as.function(x = c(args,body), envir = parent.frame()) | |
| f(x=1,y=1) |