Skip to content

Instantly share code, notes, and snippets.

View elaOnMars's full-sized avatar

eom elaOnMars

  • Student
  • Germany
View GitHub Profile
@elaOnMars
elaOnMars / private_fork.md
Created January 30, 2022 20:45 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@elaOnMars
elaOnMars / load_multiple_files_in_numpy.md
Created April 4, 2021 20:42 — forked from salticus/load_multiple_files_in_numpy.md
Load multiple files using numpy.loadtxt

Load multiple files using numpy.loadtxt

A functional approach

#!/usr/bin/env python
"""
The examples below show how to load multiple files via numpy loadtext.

Sorting the files may or may not be necessary depending on your problem.
## View NixOS builds:
ls -l /nix/var/nix/profiles/
<snip>
lrwxrwxrwx 1 root root 14 25. Apr 01:29 default -> default-1-link
lrwxrwxrwx 1 root root 60 25. Apr 01:29 default-1-link -> /nix/store/1ny6g20kvqq5xq0vrby49k6alpa76xhn-user-environment
drwxrwxrwt 6 root root 4096 25. Apr 18:21 per-user
lrwxrwxrwx 1 root root 13 25. Apr 16:49 system -> system-9-link
lrwxrwxrwx 1 root root 88 24. Apr 15:49 system-1-link -> /nix/store/jvl660mg3xhh5mq5hrnwjc3qmvr2i3j-nixos-system-me-18.03.131807.489a14add9a
lrwxrwxrwx 1 root root 88 24. Apr 16:25 system-2-link -> /nix/store/61q3125mq5hrnwkaml9hr18vyz1i6kh1-nixos-system-me-18.03.131807.489a14add9a
@elaOnMars
elaOnMars / NixOS_MacBook_Installation-fails.log
Created April 26, 2018 13:12
NixOS installation (re-mastered ISO) fails on MacBook 2009
MacBook 2009 No MacOS installed!!
EFI boot is not possible with the normal isos!
I needed to re-master the iso to be
able to boot by holding the option (Alt) key on my Mac.
This issue cannot resolved now.
The DVD boots in Bios mode.
Maybe this issue is related:
https://github.com/NixOS/nixpkgs/issues/38477
@elaOnMars
elaOnMars / keybase.md
Created August 4, 2016 00:34
Keybase

Keybase proof

I hereby claim:

  • I am ElaOnMars on github.
  • I am datentupel (https://keybase.io/datentupel) on keybase.
  • I have a public key whose fingerprint is 9779 6D13 62DA 99FF 0FC2 4C2E 647B EE4C 4D00 5619

To claim this, I am signing this object:

// tables with germany shape and the cities we are using in our application
var germany = ee.FeatureCollection('ft:1KDrYXBDlAx1fhcfmWRx7u_qqN2O_gwBNInjnGmnZ')
var cities = ee.FeatureCollection('ft:1w4PgU3okfzwKFEIpH32oPMlOtei6hUWa9tkXv5Rt');
// landsat properties we need to create our image collection over different years
// we use a feature collection here, because we can easily filter it
var landsats = ee.FeatureCollection([
ee.Feature(null, { collection: ee.ImageCollection('LANDSAT/LT5_L1T_TOA'), nir: 'B4', red: 'B3', from: 1984, to: 1992 }),
ee.Feature(null, { collection: ee.ImageCollection('LANDSAT/LT4_L1T_TOA'), nir: 'B4', red: 'B3', from: 1992, to: 1994 }),
ee.Feature(null, { collection: ee.ImageCollection('LANDSAT/LT5_L1T_TOA'), nir: 'B4', red: 'B3', from: 1994, to: 1999 }),
@elaOnMars
elaOnMars / xml-parser-simple.py
Created April 16, 2016 12:06
xml-parser-simple.py
"""
This code parses a xml site and prints the elements (tags) you like
to read.
"""
from lxml import html
import requests
# Page http://somesite.cjjj?format=xml
page = requests.get('http://....xml', stream=True)
@elaOnMars
elaOnMars / xlrd-xls-to-csv.py
Created April 12, 2016 15:47 — forked from dannguyen/xlrd-xls-to-csv--treer.py
example of using Python's xlrd library to do a batch process of opening a Excel workbook, extract the content from the first sheet as txt, and then save as CSV
"""
This code processes each xlsx file in the xlsx/* path,
then writes the data (a list of values) to CSV files stored in the csv/ path
"""
from csv import writer
from glob import glob
from os.path import basename, join
from os import makedirs
from xlrd import open_workbook
@elaOnMars
elaOnMars / find-https-debian-archives.py
Created October 9, 2015 13:03 — forked from eighthave/find-https-debian-archives.py
Script to find official Debian mirrors that support HTTPS
#!/usr/bin/python
import urllib2
import re
import ssl
import sys
# # find generic mirrors
mirrors = urllib2.urlopen('http://www.debian.org/mirror/list')
https = []