Skip to content

Instantly share code, notes, and snippets.

View juliusmh's full-sized avatar

Julius Hinze juliusmh

View GitHub Profile
@juliusmh
juliusmh / python_projector_tk.py
Last active August 29, 2015 14:15
Python Projections, printet in Tkinter Canvas
#PROJECTOR VERSION 2 USING MATPLOTLIB (AKA PYPLOT)
#BY JULIUS HINZE
from math import *
from time import *
from tkinter import *
#UPDATER
master = Tk()
master.title("3D Plotter")
@juliusmh
juliusmh / python_soundcloud_dl.py
Last active August 29, 2015 14:18
Simple Soundcloud Download Script
#SIMPLE SC DOWNLOAD SCRIPT BY JULIUS HINZE
#07.04.2015
#USE THIS SCRIPT AS YOU WANT (WAS ONLY 5 MINUTES OF WORK SO I DO NOT CARE)
import json
import urllib2
#ALL PARAMETER FOR DOWNLOAD HERE
@juliusmh
juliusmh / python_facebook_login.py
Last active December 5, 2023 09:57
Facebook Login through HTTP using python requests.
#-------------------------------------------------------------------------------
# Name: FACEBOOK TEST
# Purpose:
#
# Author: Julius
#
# Created: 16.06.2015
# Copyright: (c) Julius 2015
# Licence: <APACHE>
#-------------------------------------------------------------------------------
import requests, math, os
from bs4 import BeautifulSoup
SAMPLESPERPAGE = 15
SAMPLEDIRECTORY = "samples"
class Fetcher:
def __init__(self):
self.s = requests.session()
alert("X S S");
@juliusmh
juliusmh / chat.py
Created June 9, 2016 15:52
Hacking-Lab.com python chat client
# !/usr/bin/env python
# Please dont judge me the code is shity i just was anooyed by the website
# Please some body clean up the mess below and implement a nicer one. Thanks!
# This code needs Ghost.py installed. (Run install.sh)
import thread
import ghost
import sys
@juliusmh
juliusmh / dock.sh
Last active February 21, 2017 04:01
modify the dock on Mac to be much more productive (autohide, no delay, short animation)
osascript -e 'tell application "System Events" to set the autohide of the dock preferences to true'; # Autohiding dock
defaults write com.apple.dock autohide-delay -float 0; # Autohiding delay 0ms
defaults write com.apple.dock autohide-time-modifier -float 0.2; # Animation time 200ms
killall Dock; # Restart dock application
@juliusmh
juliusmh / dining_philosophers.c
Created June 26, 2017 19:00
Solution to the "Dining Philosophers" Problem in C using UNIX semaphores.
/*
Same includes as in u6_1.c. Copy Pasted some code of the given source code.
*/
#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/ipc.h>
@juliusmh
juliusmh / tetris.py
Created September 1, 2017 02:00
Tetris implemented in python
#!/usr/bin/env python2
import Tkinter
import random
import sys
# Represents one block in tetris
class TetrisBlock():
SHAPES = [[(0,0), (1,0), (0,1), (1,1)], # BOX
@juliusmh
juliusmh / givensqr.sage
Created November 15, 2017 19:39
QR Decomposition in SAGE MATH (Givens rotation)
K = RR
# Input matrix here
A = matrix(K, [[-3, 32/5, 4 ],
[4, 24/5, 3 ],
[5, 6*sqrt(2), 5*sqrt(2)]])
m,n = (3,3)