download and install Solr from http://lucene.apache.org/solr/.
you can access Solr admin from your browser: http://localhost:8983/solr/
use the port number used in installation.
### Libraries | |
library(shiny) | |
library(dplyr) | |
library(DT) | |
### Data | |
input_data <- data.frame(Brand = c("Brand1", "Brand2","Brand3"), | |
ratio = c (.5, .5, .5), | |
cost = c(2000, 3000, 4000), | |
stringsAsFactors = FALSE) %>% |
download and install Solr from http://lucene.apache.org/solr/.
you can access Solr admin from your browser: http://localhost:8983/solr/
use the port number used in installation.
-- show running queries (pre 9.2) | |
SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
FROM pg_stat_activity | |
WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
ORDER BY query_start desc; | |
-- show running queries (9.2) | |
SELECT pid, age(clock_timestamp(), query_start), usename, query | |
FROM pg_stat_activity | |
WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
DROP TABLE IF EXISTS matrices; | |
CREATE TABLE matrices ( | |
matrix_id int NOT NULL, -- unique identifier for each matrix | |
i int NOT NULL, -- row number | |
j int NOT NULL, -- column number | |
val decimal NOT NULL, -- the value in this cell | |
PRIMARY KEY (matrix_id, i, j) | |
); | |
-- insert sparse representation of |
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the \
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)First, we'll look at the SOAP URL and see what Prefixes
, Global Elements
, Global Types
, Bindings
, and Services
are provided by the SOAP Service.
You can do this by running zeep as a CLI tool.
export WSDL_URL="http://www.dneonline.com/calculator.asmx?WSDL"
python -m zeep $WSDL_URL
import openai | |
import tiktoken | |
from scipy import spatial | |
import pandas as pd | |
df=pd.read_csv('./data/oscars.csv') | |
print(df.head()) | |
df=df.loc[df['year_ceremony'] == 2023] | |
df=df.dropna(subset=['film']) |