Skip to content

Instantly share code, notes, and snippets.

View guerda's full-sized avatar

Philip Gillißen guerda

View GitHub Profile
@robinkraft
robinkraft / projected_area.py
Created December 12, 2014 00:37
get the area in square meters of a polygon using shapely and pyproj
import pyproj
from shapely.geometry import shape
from shapely.ops import transform
geom = {'type': 'Polygon',
'coordinates': [[[-122., 37.], [-125., 37.],
[-125., 38.], [-122., 38.],
[-122., 37.]]]}
s = shape(geom)
@derf
derf / nn.py
Created February 26, 2015 16:54
Neuronales Netzwerk in Python
# -*- coding: utf8
import numpy as np
import matplotlib.pyplot as plt
from matplotlib import animation, cm
class NeuralNetwork(object): # {{{
# Lernrate: 0.1 bis 0.3 ist sinnvoll (zu hoch -> Schießt über das Ziel hinaus)
# alpha: Steilheit des Sigmoid. Sollte < 5 bleiben, sonst gibts
# numerische Fehler
@albarki
albarki / rds.sh
Created July 7, 2018 21:46
Get List of RDS instances from All regions
for region in `aws ec2 describe-regions --output text | cut -f3`
do
echo -e "\nListing RDS in region:'$region'..."
aws rds describe-db-instances \
--region $region \
--query 'DBInstances[*].[DBInstanceIdentifier,ReadReplicaDBInstanceIdentifiers]'
done
@heardk
heardk / OneNote-to-MD.md
Last active June 24, 2024 07:16
Convert notes from OneNote into Markdown

Converting One Note to Markdown

This is an example of how to convert notes from OneNote into Markdown to use in other, less annoying Note applications. I am using PowerShell on Windows here, but other shell/scripting environments would work as well. If you want separate .md files, you'll need to export your OneNote pages separately. Exporting a section, or a selection of pages creates a single .docx file.

  • Download and install Pandoc
  • Export each of your note pages to a .docx (Word) format using OneNote export from the File menu
  • Gather all of these .docx files into a directory
  • Open directory in File Explorer
  • Open Powershell from the File Explorer using File -> Open Windows Powersell
  • Run the following command:
@tiberiucorbu
tiberiucorbu / README.md
Last active December 28, 2023 10:46
Retrive active devices on the network form the vodafone router : CGA4233DE

Retrive active devices on the network form the vodafone kabelbox (CGA4233DE)

In order to automate the network activity like getting the list of connected devices, notify the presensce of a device, log and debug wifi issues, it would be nice to have the list provided by the router of the current status.

In this aricle I am going to explore this posibility, reverse engenier the web app from the router and try to authentificate and retrive the active data table from the router.

The first step is to analyze the web console into the network tab and login to see which requests are beeing made.

Security Chanlenges

@gislars
gislars / get_route.py
Created September 5, 2023 13:53
get route from OSRM and within a buffer of that route all charging stations
from routingpy.routers import OSRM
import overpy
import json
from shapely.geometry import LineString, mapping
def query_overpass(route_file):
with open(route_file, 'r') as f:
route_data = json.load(f)