Skip to content

Instantly share code, notes, and snippets.

1 Bloodrage Brawler
1 Tah-Crop Skirmisher
1 Forsake the Worldly
1 Trial of Knowledge
1 Naga Oracle
1 Emberhorn Minotaur
1 Gift of Paradise
1 Spring/Mind
1 Cradle of the Accursed
@luisdelatorre012
luisdelatorre012 / installer.cfg
Created September 28, 2017 15:45
installer.cfg
[Application]
name=Guess the Number
version=1.0
entry_point=guessnumber:main
# We need to set this to get a console:
console=true
[Python]
version=3.5.1
bitness=64
@luisdelatorre012
luisdelatorre012 / tiny.mplstyle
Created September 29, 2017 16:37
tiny style file
axes.grid.axis: y
axes.grid: True
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
@luisdelatorre012
luisdelatorre012 / bootstrap.sh.out
Created February 13, 2018 22:51
output: trying to install libpostal following directions at https://github.com/openvenues/libpostal
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'
@luisdelatorre012
luisdelatorre012 / django_settings.py
Created March 7, 2018 17:06
Settings files from Wooey
"""
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/
@luisdelatorre012
luisdelatorre012 / cities_scratch.py
Created May 2, 2018 18:50
Cities Gateways distance example data
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?
@luisdelatorre012
luisdelatorre012 / docker_without_docker_desktop.md
Last active May 25, 2024 13:20
Instructions from chatgpt on how to run docker on windows 10 without using docker desktop
@luisdelatorre012
luisdelatorre012 / failed_requests_from_batch.md
Created May 24, 2024 02:27
Instructions from chat gpt on how to retry failed requests from a batch when using the microsoft graph api

You:

  • When calling the microsoft graph API using batch queries, sometimes some of the requests in my batch get a 400 invalid request error, and I don't know why. The same request will be invalid one time and return 200 the net

ChatGPT:

  • Batch requests in the Microsoft Graph API can sometimes result in 400 Invalid Request errors due to several factors. Here are some common reasons why this might be happening:
  1. Request Size and Limits : Ensure that your batch request does not exceed the maximum size limits. The Microsoft Graph API has constraints on the size of batch requests, including the number of individual requests and the overall payload size.
  2. Rate Limiting : The API imposes rate limits to prevent abuse. If you send too many requests in a short period, some might get throttled, leading to intermittent failures.
  3. Consistency of Individual Requests : Each request within the batch must be well-formed and meet the specific requirements of the endpoint it targets. Ensure that there
@luisdelatorre012
luisdelatorre012 / wsl_setup.md
Last active May 26, 2024 17:02
Setting up WSL for testing things like kubernetes

About

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