Skip to content

Instantly share code, notes, and snippets.

View mrWinston's full-sized avatar

Marius Schulz mrWinston

  • Red Hat
  • Rostock, Germany
View GitHub Profile
@louisbros
louisbros / MergeSort.java
Last active October 16, 2019 03:16
Java Merge Sort
package com.test;
import java.util.ArrayList;
import java.util.List;
public class MergeSort<T extends Comparable<T>> {
public void sort(List<T> values){
mergeSort(0, values.size() - 1, values, new ArrayList<T>(values));
}
@subudeepak
subudeepak / WebSockets.md
Last active May 31, 2024 09:36
The problems and some security implications of websockets - Cross-site WebSockets Scripting (XSWS)

WebSockets - An Introduction

WebSockets is a modern HTML5 standard which makes communication between client and server a lot more simpler than ever. We are all familiar with the technology of sockets. Sockets have been fundamental to network communication for a long time but usually the communication over the browser has been restricted. The general restrictions

  • The server used to have a permanent listener while the client (aka browser) was not designated any fixed listener for a more long term connection. Hence, every communication was restricted to the client demanding and the server responding.
  • This meant that unless the client requested for a particular resource, the server was unable to push such a resource to the client.
  • This was detrimental since the client is then forced to check with the server at regular intervals. This meant a lot of libraries focused on optimizing asynchronous calls and identifying the response of asynchronous calls. Notably t
@JensMeiners
JensMeiners / plot_decision_boundry.py
Last active February 9, 2016 14:33
For a model that generates a prediction probability, this script plots the respective descision line with colour coding the classes and assigning labels to gradient steps
'''
This program is free software. It comes without any warranty, to
the extent permitted by applicable law. You can redistribute it
and/or modify it under the terms of the Do What The Fuck You Want
To Public License, Version 2, as published by Sam Hocevar. See
http://www.wtfpl.net/ for more details.
'''
import numpy as np
import matplotlib.pyplot as plt