Skip to content

Instantly share code, notes, and snippets.

View eaglebh's full-sized avatar

Pablo Marcondes Fonseca eaglebh

View GitHub Profile
@eaglebh
eaglebh / config.plist
Created August 22, 2023 12:44
Asus TUF FX505DU plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key># BASE EFI for AMD Ryzen and Threadripper - 1XXX, 2XXX, 3XXX, 4XXX, 5XXX - RELEASE Version</key>
<string></string>
<key># DISCORD: https://discord.universohackintosh.com</key>
<string></string>
<key># BY: https://luchina.com.br</key>
<string></string>
@eaglebh
eaglebh / pythonenvs.md
Created July 25, 2023 18:03 — forked from ziritrion/pythonenvs.md
Cheatsheet for Conda, Pipenv

Conda

  1. Create a virtual environment
    • conda create --name my_env_name python=3.8 or whatever Python version you may need.
  2. List available envs (2 different ways
    • conda env list
    • conda info --envs
  3. Activate virtual env
    • conda activate my_env_name
  4. Deactivate current environment
@eaglebh
eaglebh / get_crop.py
Created July 19, 2023 13:33 — forked from rfezzani/get_crop.py
Crop extraction from tiled TIFF image file directory without whole page loading using tifffile
from tifffile import TiffFile
import numpy as np
def get_crop(page, i0, j0, h, w):
"""Extract a crop from a TIFF image file directory (IFD).
Only the tiles englobing the crop area are loaded and not the whole page.
This is usefull for large Whole slide images that can't fit int RAM.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css" />
<script src="http://d3js.org/d3.v3.min.js" type="text/javascript"></script>
<script src="http://cdn.leafletjs.com/leaflet-0.7/leaflet.js"></script>
<script src='https://api.tiles.mapbox.com/mapbox.js/v1.6.4/mapbox.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox.js/v1.6.4/mapbox.css' rel='stylesheet' />
ogr2ogr -f GeoJSON 55mu2500gsr.geojson 55mu2500gsr.shp
topojson -o 55mu2500gsr.json -- 55mu2500gsr.geojson
mapa <- readShapeSpatial('Brasil.shp')
plot(mapa)
summary(mapa)
y <- read.csv('prefeitos12.txt')
x <- attr(mapa,"data")
x
x$indice <- 1:dim(x)[1]
x
dados <- merge(x, y, by = "UF")
dados