Skip to content

Instantly share code, notes, and snippets.

View sheecegardezi's full-sized avatar

Sheece Gardezi sheecegardezi

View GitHub Profile
@johnwbryant
johnwbryant / extract_aus.sh
Last active September 17, 2024 01:18
Extract Australia data in a usable format from Microsoft road detections data
#!/bin/bash
# see https://github.com/microsoft/RoadDetections
# 1) get the data
wget https://usaminedroads.blob.core.windows.net/road-detections/Oceania-Full.zip
# 2) extract the records for Australia, second column of tsv only
zgrep AUS Oceania-Full.zip | cut -f2 > AUS.geojson
# 3) convert to GPKG, works better in QGIS
@sheecegardezi
sheecegardezi / gist:f9e168ca476b11b48ffd17b7e1a45ba4
Created August 27, 2021 15:12
Run AOE 2 DE on Ubunutu 20.04
# Activating Proton with Steam Play
# https://www.linuxjournal.com/content/introduction-linux-gaming-thanks-protondb
# Select Proton Version 6.3-6
# Install AOE DE from steam
# Download vc_redist.x64.exe from Microsoft
# https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0
cd /home/$USER/.steam/steam/steamapps/compatdata/813780/pfx/drive_c/windows/system32
class XGBQuantile(XGBRegressor):
def __init__(self,quant_alpha=0.95,quant_delta = 1.0,quant_thres=1.0,quant_var =1.0,base_score=0.5, booster='gbtree', colsample_bylevel=1,
colsample_bytree=1, gamma=0, learning_rate=0.1, max_delta_step=0,max_depth=3, min_child_weight=1, missing=None, n_estimators=100,
n_jobs=1, nthread=None, objective='reg:linear', random_state=0,reg_alpha=0, reg_lambda=1, scale_pos_weight=1, seed=None,silent=True, subsample=1):
self.quant_alpha = quant_alpha
self.quant_delta = quant_delta
self.quant_thres = quant_thres
self.quant_var = quant_var
super().__init__(base_score=base_score, booster=booster, colsample_bylevel=colsample_bylevel,
@atheiman
atheiman / get-accounts-recursive.sh
Last active January 19, 2024 13:21
Get all accounts within an AWS Organizations organizational unit recursively (all accounts nested under any child OUs)
#!/bin/bash
if [ -z "$1" ]; then
echo "Error - Usage: $0 <parent-id>"
exit 1
fi
set -eu
# set -x
@stephanie-wang
stephanie-wang / test.py
Created September 2, 2020 00:29
Test zombie raylet processes
import ray
import numpy as np
import time
ray.init(address="auto")
@ray.remote
def f(x):
@ThomasG77
ThomasG77 / pyqgis-add-zoom-levels-3857.py
Last active February 25, 2025 22:11
Add this script in startup.py to now see zoom for EPSG 3857 when the canevas is using it
from math import cos, log, pi
from qgis.utils import iface
from qgis.PyQt.QtWidgets import QLabel
# Not needed here but could be useful later
# def getScale(zoom_level, screen_dpi=96, latitude=0):
# resolution = (6378137.0 * 2 * pi / 256) * cos(latitude) / (2**zoom_level)
# return (screen_dpi * 1/0.0254 * resolution)
def getZoomLevel(scale, screen_dpi=96, latitude=0):
@stephanie-wang
stephanie-wang / keybase.md
Created March 25, 2020 00:31
Keybase confirmation

Keybase proof

I hereby claim:

  • I am stephanie-wang on github.
  • I am swangster (https://keybase.io/swangster) on keybase.
  • I have a public key whose fingerprint is CCCD 57CE 7B21 D165 B132 632B D26B 31FD FDFF A3DB

To claim this, I am signing this object:

@heshamelmasry77
heshamelmasry77 / Error: Message failed: 553 Relaying disallowed as @ the solution NodeMail Zoho
Last active August 2, 2023 14:23
Error: Message failed: 553 Relaying disallowed as @ the solution NodeMail Zoho
After searching for more than 6 hours trying to understand what is zoho's mail problem to send emails!
After i red lots lots of there answer with no helpul solution i found the issue was that you need to have the ``` sender ``` option
in your nodemailer option same like email with same sender name and sender email. like this : ``` from: '"senderNameSameLikeTheZohoOne" <[email protected]>',```
my config :
```
const transporter = nodemailer.createTransport({
service:'Zoho',
host: 'smtp.zoho.com',
port: 465,
@Ishaan28malik
Ishaan28malik / AboutMe.gif
Last active September 16, 2019 07:24
Myself
AboutMe.gif
@abdallahokasha
abdallahokasha / Install_robo3t_Ubuntu.md
Last active April 8, 2025 13:16
Install Robo3t on Ubuntu18.04 and make a desktop icon for it

Install Robo3t On Ubuntu 18.04

Download the package form Robo3t or using wget
wget https://download.robomongo.org/1.2.1/linux/robo3t-1.2.1-linux-x86_64-3e50a65.tar.gz
Extract here using

tar -xvzf robo3t-1.2.1-linux-x86_64-3e50a65.tar.gz