Skip to content

Instantly share code, notes, and snippets.

View niccokunzmann's full-sized avatar

Nicco Kunzmann niccokunzmann

View GitHub Profile
@niccokunzmann
niccokunzmann / example-output-dudle.txt
Last active February 11, 2019 08:12
Export respondent answers from survey monkey 2018-may-12 and compute the maximum participant number for 2 or more chosen dates.
user@programming:~/gists/subset$ ./find-biggest-common-subset-dudle.py # nur Ja, 3 Termine
total: 1331
17 22.02, 08.03, ... Fr ger. W. & 25.02, 11.03, ... Mo ungerade Wochen & 27.02, 13.03, ... Mi wie bisher common: An 2 Terminen können 6 Leute. An 3 Terminen können 1 Leute.
17 26.02, 12.03 Die ung. W. & 27.02, 13.03, ... Mi wie bisher & _01.03, 15.03, ... Fr ung. W. common: An 2 Terminen können 9 Leute. An 3 Terminen können 1 Leute.
17 25.02, 11.03, ... Mo ungerade Wochen & 27.02, 13.03, ... Mi wie bisher & _01.03, 15.03, ... Fr ung. W. common: An 2 Terminen können 5 Leute. An 3 Terminen können 2 Leute.
17 22.02, 08.03, ... Fr ger. W. & 26.02, 12.03 Die ung. W. & 27.02, 13.03, ... Mi wie bisher common: An 2 Terminen können 10 Leute.
16 18.02, 04.03, ... Mo gerade Wochen & 27.02, 13.03, ... Mi wie bisher & _01.03, 15.03, ... Fr ung. W. common: An 2 Terminen können 4 Leute. An 3 Terminen können 1 Leute.
16 22.02, 08.03, ... Fr ger. W. & 23.02, 09.03, ... Sa ger. W. & 27.02, 13.03, ... Mi wi
@niccokunzmann
niccokunzmann / olsr.py
Created April 6, 2018 15:42
Send olsr name service announcements with Python.
"""
This module allows sending OLSR v1 messages to announce host names.
You can find more information here:
https://github.com/servalproject/olsr/blob/master/lib/nameservice/README_NAMESERVICE
"""
import struct
import socket
import requests
print(requests.get("http://owncloud.quelltext.eu").text)
# see https://packaging.python.org/appveyor/#adding-appveyor-support-to-your-project
environment:
PYPI_USERNAME: niccokunzmann3
PYPI_PASSWORD:
secure: Gxrd9WI60wyczr9mHtiQHvJ45Oq0UyQZNrvUtKs2D5w=
# For Python versions available on Appveyor, see
# http://www.appveyor.com/docs/installed-software#python
# The list here is complete (excluding Python 2.6, which
# isn't covered by this document) at the time of writing.
{"version": "0.1", "type": "knitting pattern", "comment": {"source": "C:\\ayab-windows-0.80\\patterns\\stirnband.png"}, "patterns": [{"id": "stirnband", "connections": [{"to": {"id": 1}, "from": {"id": 0}}, {"to": {"id": 2}, "from": {"id": 1}}, {"to": {"id": 3}, "from": {"id": 2}}, {"to": {"id": 4}, "from": {"id": 3}}, {"to": {"id": 5}, "from": {"id": 4}}, {"to": {"id": 6}, "from": {"id": 5}}, {"to": {"id": 7}, "from": {"id": 6}}, {"to": {"id": 8}, "from": {"id": 7}}, {"to": {"id": 9}, "from": {"id": 8}}, {"to": {"id": 10}, "from": {"id": 9}}, {"to": {"id": 11}, "from": {"id": 10}}, {"to": {"id": 12}, "from": {"id": 11}}, {"to": {"id": 13}, "from": {"id": 12}}, {"to": {"id": 14}, "from": {"id": 13}}, {"to": {"id": 15}, "from": {"id": 14}}, {"to": {"id": 16}, "from": {"id": 15}}, {"to": {"id": 17}, "from": {"id": 16}}, {"to": {"id": 18}, "from": {"id": 17}}, {"to": {"id": 19}, "from": {"id": 18}}], "name": "stirnband", "rows": [{"id": 0, "instructions": [{"color": "white"}, {"color": "white"}, {"color": "white
import ssl
ssl.get_server_certificate(("google.tk", 443))
'-----BEGIN CERTIFICATE-----\nMIIEgDCCA2igAwIBAgIINVXgoqz86GwwDQYJKoZIhvcNAQELBQAwSTELMAkGA1UE\nBhMCVVMxEzARBgNVBAoTCkdvb2dsZSBJbmMxJTAjBgNVBAMTHEdvb2dsZSBJbnRl\ncm5ldCBBdXRob3JpdHkgRzIwHhcNMTYwNTI1MTQ0ODIzWhcNMTYwODE3MTQ0MjAw\nWjBoMQswCQYDVQQGEwJVUzETMBEGA1UECAwKQ2FsaWZvcm5pYTEWMBQGA1UEBwwN\nTW91bnRhaW4gVmlldzETMBEGA1UECgwKR29vZ2xlIEluYzEXMBUGA1UEAwwOd3d3\nLmdvb2dsZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCGrCmm\n/z9kB/Xp9MFUX8vFzs5vuFY/1bSE+ryHckI57dxgT4AztI8ArfezKge6cDvX3A6o\nl1bpnCbgYDq+ifny6+Z2esKPS1s04A7jkGsASwqOUqNELCcPG1BI7nnPJUguOGrg\nUgeMjLzYzBxvgGZ/o5wCQYx4c/7MJ+78ZT0/5R2TIhs2bXvWDsTJgl5PlNQDnxYO\nZaxY+p4Y7Q+GjT4DwWRwe6jwbnmK++jzEqVj4+wpuXMP+XI3l9zMUwq36PLqqevr\n2NHZndhnYzV5nhMkmYtI1p6AJSoAbN3xewX9pzV1OnBl54ZzFlxyxvgxLjkAhZcb\ndnxB4gJlsmqjvMCdAgMBAAGjggFLMIIBRzAdBgNVHSUEFjAUBggrBgEFBQcDAQYI\nKwYBBQUHAwIwGQYDVR0RBBIwEIIOd3d3Lmdvb2dsZS5jb20waAYIKwYBBQUHAQEE\nXDBaMCsGCCsGAQUFBzAChh9odHRwOi8vcGtpLmdvb2dsZS5jb20vR0lBRzIuY3J0\nMCsGCCsGAQUF
import socket
import traceback
MESSAGE = """GET / HTTP/1.1
Host: {host}
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:46.0) Gecko/20100101 Firefox/46.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
DNT: 1
Connection: close
rotespotsdam.tk: 91.203.147.147 (should be 91.203.147.147)
google.de: 216.58.213.3
--- (1) requesting now google.de ---
'<!doctype html><html itemscope="" itemtype="http://schema.org/WebPage" lang="de"><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"><meta content="/logos/doodles/2016/lotte-reinigers-117th-birthday-5079873255112704-hp.gif" itemprop="image"><meta content="117. Geburtstag von Lotte Reiniger #GoogleDoodle" property="og:description"><meta content="http://www.google.com/logos/doodles/2016/lotte-reinigers-117th-birthday-5079873255112704.5-thp.png" property="og:image"><meta content="391" property="og:image:width"><meta content="220" property="og:image:height"><title>Google</title><script>(function(){window.google={kEI:\'XvlPV46IHerA6ASUzJ7YBA\',kEXPI:\'1350654,1350876,1350948,3700290,3700389,4029815,4031109,4032678,4036509,4036527,4038012,4039268,4043492,4045841,4048347,4052305,4054551,4056038,4057739,4058335,4058720,4059767,4061155,4061180,4061552,4062331,4062706,4062972,406
>>> import kivy
[WARNING ] [Config ] Older configuration version detected (0 instead of 14)
[WARNING ] [Config ] Upgrading configuration in progress.
Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
import kivy
File "C:\Python34\lib\site-packages\kivy\__init__.py", line 306, in <module>
from kivy.config import Config
File "C:\Python34\lib\site-packages\kivy\config.py", line 670, in <module>
Config.setdefault('kivy', 'log_name', 'kivy_%y-%m-%d_%h_.txt')

LED Table @ FFII

This is a 20x14 Pixels LED table. Each of the pixels can display almost all colors.

You can play the game with the controllers. It is in ffii.ino on this page. You will need to upload it, see Programming. If you would like to see the making of the LED table, you can visit Youtube. If you have any questions, you can leave a comment below or contact me via email.

Usage

To use the LED table you can plug it into the power plug in the wall. If you would like to use the controllers, one of their ends should be plugged into A0 or A1 or A2 or A3 on the Arduino and the other end into Ground or GND or the blue line on the breadboard. You will notice if they are not plugged in correctly: They will not work. In rar cases where you connect 5V and ground directly to eachother, you will melt the cables or destroy the Arduino. Do not do that.