Skip to content

Instantly share code, notes, and snippets.

<button id="openModal">Open Modal</button>
<div id="modal" class="modal">
<div class="modal-content">
<span class="close">&times;</span>
<div class="iframe-container">
<iframe src="https://www.example.com/iframe1"></iframe>
<iframe src="https://www.example.com/iframe2"></iframe>
</div>
</div>
</div>
import random
# A group of N integer numbers need to be divided fairly into K subgroups.
# A fair division is that the max of the sums of K subgroups is minimal?
# greedy algorithm
def partitioning(n, k):
a = sum(n) / k
nums = sorted(n, reverse=True)
groups = []
@weyou
weyou / grouping_problem.py
Last active May 26, 2017 09:16
grouping_problem
# A group of N integer numbers need to be divided fairly into K subgroups.
# A fair division is that the max of the sums of K subgroups is minimal
def grouping(n, k):
a = sum(n) / k
nums = sorted(n, reverse=True)
groups = []
gsums = []
for _ in range(k):
@weyou
weyou / README.md
Last active April 19, 2017 07:50 — forked from jremus/README.md
My aria2 configuration and init script for Raspbian.

Description

Installation

File Locations

  • aria2.conf as /etc/aria2.conf
  • aria2.sh as /etc/init.d/aria