Place Holder
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
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
SET standard_conforming_strings = OFF; | |
DROP TABLE IF EXISTS "public"."california_counties" CASCADE; | |
DELETE FROM geometry_columns WHERE f_table_name = 'california_counties' AND f_table_schema = 'public'; | |
BEGIN; | |
CREATE TABLE "public"."california_counties" ( "ogc_fid" SERIAL, CONSTRAINT "california_counties_pk" PRIMARY KEY ("ogc_fid") ); | |
SELECT AddGeometryColumn('public','california_counties','wkb_geometry',4326,'MULTIPOLYGON',2); | |
CREATE INDEX "california_counties_wkb_geometry_geom_idx" ON "public"."california_counties" USING GIST ("wkb_geometry"); | |
COMMENT ON TABLE "public"."california_counties" IS NULL; | |
ALTER TABLE "public"."california_counties" ADD COLUMN "county_nam" VARCHAR(40); | |
ALTER TABLE "public"."california_counties" ADD COLUMN "county_abb" VARCHAR(3); |
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 numpy as np | |
# ROD, PB, PE, DivP, netIncomeTTM, ROA | |
px_0 = np.array([40, 40, 40, 40, 40, 40]) | |
px_1 = np.array([-49.54, -37.51, -16.38, 3.82, 27.54, 71.29]) | |
pc_0 = 0.01 | |
pc_1 = -0.02 |
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 requests | |
# Load the image | |
img = open("image.png", "rb") | |
# Send image to the /predict endpoint | |
response = requests.post( | |
"http://localhost:8001/predict", | |
files={ | |
"document_image": img |
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 numpy as np | |
import matplotlib | |
from matplotlib.axes import Axes | |
from matplotlib.animation import FuncAnimation | |
import matplotlib.pyplot as plt | |
import numpy as np | |
matplotlib.rcParams.update({'font.size': 48}) | |
sqrt2pi = np.sqrt(2*np.pi) |
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
# dc direct costs - usd/ha | |
# ps price soy - usd/tn | |
# qr cost of land in quintals of soy - qq/ha | |
# ya yield of the activity - qq/ha | |
# pa price of the activity if activity not soy - usd/tn | |
# td direction costs - percent | |
# fs fixed sharecropping - percent | |
# import numpy as np | |
# import matplotlib.pyplot as plt |
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
n = 10 | |
q = 2 | |
potential_solutions = sum([comb(n, i) * (2 ** (q * i)) for i in range(n + 1)]) |
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
/* | |
* @param {DateRange} index | |
*/ | |
let invertIndex = (index) => { | |
let invIndex = {}; | |
for (let i = 0; i < index.values.length; i++) { | |
invIndex[index.values[i]] = i; | |
} | |
return invIndex; |
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
# Run a container | |
docker run -it python:latest bash | |
# or | |
# will start the container using latest CMD or ENTRYPOINT | |
docker run -it python:latest | |
# Run dettach mode, if you don't the shell session will be attaced to the containers lifecycle | |
docker run -it -d python:latest | |
# Run with env --rm will remove the container upon exit of last proccess. | |
docker run --rm -it -e TRAINING_SESSION=DOCKER python:latest bash | |
# Create a directory to map a volume to and use in the container |
NewerOlder