Skip to content

Instantly share code, notes, and snippets.

View paulochf's full-sized avatar
⌨️

Paulo Haddad paulochf

⌨️
View GitHub Profile
@Xunnamius
Xunnamius / pz_sp_mod_order.md
Last active February 10, 2024 23:58
Mod load order for Project Zomboid 41

You can skip combing through these settings and copying them over one-by-one if you instead place/overwrite the saved_modlists.txt and modmanager-mods.txt files into your C:\Users\(your username)\Zomboid\Lua folder. When you next start the game, load the "Essential" mod preset in the game's Mods menu for a Single Player game. Load the "Multiplayer" mod preset if you're playing on my server.

These mods are listed in ascending order of priority, meaning mod #1 must have lowest relative priority (i.e. nearest the top of your mod load order list) and will have any conflicting code be overridden by the mods that come after it.

For map mods, however, this is reversed! The map mod that loads first claims its cells first, meaning it has the highest priority. This is why St. Bernard's Hill is the last map mod in its block but Common Sense is

@chaotic3quilibrium
chaotic3quilibrium / Effective Scala Case Class Patterns.md
Last active April 16, 2024 13:59
Article: Effective Scala Case Class Patterns - The guide I wished I had read years ago when starting my Scala journey

Effective Scala Case Class Patterns

Version: 2022.03.02

Available As

@smoothml
smoothml / scikit-learn-predictions-on-spark.py
Last active October 18, 2023 19:07
How to apply a Scikit Learn machine learning model at scale using Apache Spark.
from pyspark.sql import functions as F
from pyspark.sql.types import DoubleType
import pandas as pd
from sklearn.externals import joblib
def make_predictions(sc, df, feature_cols, model_path):
"""
Make predictions.
@fperez
fperez / README.md
Last active July 1, 2021 04:43
Polyglot Data Science with IPython

Polyglot Data Science with IPython & friends

Author: Fernando Pérez.

A demonstration of how to use Python, Julia, Fortran and R cooperatively to analyze data, in the same process.

This is supported by the IPython kernel and a few extensions that take advantage of IPython's magic system to provide low-level integration between Python and other languages.

See the companion notebook for data preparation and setup.

@ljvmiranda921
ljvmiranda921 / tlsetup.sh
Created February 4, 2018 08:04
Set-up script to install a minimal TexLive 2015 Distribution
#!/usr/bin/env bash
#
# Minimal Travis Set-up Script
#
# This script sets-up a minimal TexLive 2015 distribution with the
# additional packages being installed when needed. This is intended
# for Travis continuous integration and is expected to work with the
# Ubuntu Trusty (14.04) Distribution
#
# Copyright (C) 2018 Lester James V. Miranda <ljvmiranda@gmail.com>
@lucasmarqs
lucasmarqs / .gitconfig
Last active December 1, 2020 22:05
My options for ~/.gitconfig
[user]
name = My name
email = my_github_email@example.com
[alias]
a = add
ap = add -p
can = commit -S --amend --no-edit
cm = commit -S -m
co = checkout
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jnothman
jnothman / resample.py
Last active February 22, 2017 23:53
Scikit-learn resampling as CV wrapper
import numpy as np
class Resample(object):
def __init__(self, cv, method='under'):
self.cv = cv
self.method = method
def split(self, X, y, **kwargs):
for train_idx, test_idx in self.cv.split(X, y, **kwargs):
counts = np.bincount(y[train_idx]) # assumes y are from {0, 1..., n_classes-1}
@5agado
5agado / Pandas and Seaborn.ipynb
Created February 20, 2017 13:33
Data Manipulation and Visualization with Pandas and Seaborn — A Practical Introduction
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dusenberrymw
dusenberrymw / spark_tips_and_tricks.md
Last active February 8, 2023 05:11
Tips and tricks for Apache Spark.

Spark Tips & Tricks

Misc. Tips & Tricks

  • If values are integers in [0, 255], Parquet will automatically compress to use 1 byte unsigned integers, thus decreasing the size of saved DataFrame by a factor of 8.
  • Partition DataFrames to have evenly-distributed, ~128MB partition sizes (empirical finding). Always err on the higher side w.r.t. number of partitions.
  • Pay particular attention to the number of partitions when using flatMap, especially if the following operation will result in high memory usage. The flatMap op usually results in a DataFrame with a [much] larger number of rows, yet the number of partitions will remain the same. Thus, if a subsequent op causes a large expansion of memory usage (i.e. converting a DataFrame of indices to a DataFrame of large Vectors), the memory usage per partition may become too high. In this case, it is beneficial to repartition the output of flatMap to a number of partitions that will safely allow for appropriate partition memory sizes, based upon the