This is all sourced from https://www.youtube.com/watch?v=CouuH3W6ZtA, with modifications from me for things that didn't quite work.
It assumes you started from a fresh ubuntu install of WSL.
sudo apt-get update && \
sudo apt-get upgrade -y
import pandas as pd | |
import numpy as np | |
import matplotlib.pyplot as plt | |
from ortools.sat.python import cp_model | |
# Initialize the random generator | |
rng = np.random.default_rng(seed=42) # For reproducibility | |
# Generate random data for 10 jobs | |
num_jobs = 10 |
# You: | |
# - I have two columns of a pandas table. | |
# One column is id. the second is billing_branch, a list stored as a "#;" separated string. | |
# Show me pandas code to transform this into a two column table with id and billing_branch, with the list pivoted into one value per row. | |
import pandas as pd | |
# Sample DataFrame | |
data = { |
You: | |
- #!/usr/bin/env bash | |
set -euo pipefail | |
SOURCE_DIR="/home/luis/job_files" | |
DEST_DIR="/etc/systemd/system" | |
# Function to check if the source directory exists |
This is all sourced from https://www.youtube.com/watch?v=CouuH3W6ZtA, with modifications from me for things that didn't quite work.
It assumes you started from a fresh ubuntu install of WSL.
sudo apt-get update && \
sudo apt-get upgrade -y
You:
ChatGPT:
These instructions were incredibly wrong.
This is better: https://dev.to/felipecrs/simply-run-docker-on-wsl2-3o8
cities_data = '{"City":{"0":"Laurel","1":"El Paso","2":"Laredo","3":"Milwaukee"},"Latitude":{"0":39.1050682068,"1":31.7591590881,"2":27.5309200287,"3":44.6417884827},"Longitude":{"0":-76.8656692505,"1":-106.487487793,"2":-99.5022277832,"3":-89.7367401123}}' | |
cities_df = pd.read_json(cities_data) | |
gateways_data = '{"Gateway":{"0":"LAX","1":"MIA","2":"ATL","3":"ORD","4":"DFW","5":"JFK","6":"IAH"},"Latitude":{"0":34.0534896851,"1":25.774810791,"2":33.7483100891,"3":41.8842506409,"4":32.7781486511,"5":40.6445388794,"6":29.7605800629},"Longitude":{"0":-118.2453231812,"1":-80.1977310181,"2":-84.3911132812,"3":-87.6324462891,"4":-96.7954025269,"5":-73.7953567505,"6":-95.369682312}}' | |
gateways_df = pd.read_json(gateways_data) | |
# which is the closest gateway to each city? |
""" | |
Django settings for CogSolver project. | |
Generated by 'django-admin startproject' using Django 1.9.13. | |
For more information on this file, see | |
https://docs.djangoproject.com/en/1.9/topics/settings/ | |
For the full list of settings and their values, see | |
https://docs.djangoproject.com/en/1.9/ref/settings/ |
libtoolize: putting auxiliary files in '.'. | |
libtoolize: copying file './ltmain.sh' | |
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. | |
libtoolize: copying file 'm4/libtool.m4' | |
libtoolize: copying file 'm4/ltoptions.m4' | |
libtoolize: copying file 'm4/ltsugar.m4' | |
libtoolize: copying file 'm4/ltversion.m4' | |
libtoolize: copying file 'm4/lt~obsolete.m4' | |
libtoolize: Consider adding '-I m4' to ACLOCAL_AMFLAGS in Makefile.am. | |
configure.ac:14: installing './compile' |
C:\Users\chq-luisd\PycharmProjects\cog_solver\dist\__init__>__init__.exe | |
Traceback (most recent call last): | |
File "cog_solver\__init__.py", line 8, in <module> | |
File "c:\users\chq-luisd\cog_solver_py35\lib\site-packages\PyInstaller\loader\ | |
pyimod03_importers.py", line 631, in exec_module | |
exec(bytecode, module.__dict__) | |
File "site-packages\p_median_solver\src\address_parser.py", line 2, in <module | |
> | |
File "c:\users\chq-luisd\cog_solver_py35\lib\site-packages\PyInstaller\loader\ | |
pyimod03_importers.py", line 631, in exec_module |