This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
import traceback | |
import StringIO | |
from copy_reg import dispatch_table, pickle | |
def exc_info(hide_calls = 0): | |
'''as sys.exc_info() but returns a remote exception object''' | |
ErrorType, thrownError, traceback = sys.exc_info() | |
for i in range(hide_calls): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Response to | |
http://stackoverflow.com/a/22904200/1320237 | |
""" | |
import json.scanner | |
import json.decoder | |
from json.decoder import JSONDecoder | |
class FileString(object): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## The MIT License (MIT) | |
## --------------------- | |
## | |
## Copyright (C) 2014 Nicco Kunzmann | |
## | |
## https://gist.github.com/niccokunzmann/6038331 | |
## | |
## Permission is hereby granted, free of charge, to any person obtaining | |
## a copy of this software and associated documentation files (the "Software"), |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## MIT License | |
## | |
## Copyright 2014 Nicco Kunzmann | |
## | |
## Permission is hereby granted, free of charge, to any person obtaining a copy of this | |
## software and associated documentation files (the "Software"), to deal in the Software | |
## without restriction, including without limitation the rights to use, copy, modify, merge, | |
## publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons | |
## to whom the Software is furnished to do so, subject to the following conditions: | |
## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
''' | |
This is crated as an answer to the stackoverflow qustion: | |
http://stackoverflow.com/questions/21960514/can-i-use-a-processpoolexecutor-from-within-a-future | |
The updated code can be found here: | |
https://gist.github.com/niccokunzmann/9170072 | |
The RecursiveThreadPoolExecutor allows the usage of futures in the | |
submitted functions. | |
It uses the yield and yield from statements to suspend the execution of the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
print(requests.get("http://owncloud.quelltext.eu").text) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
## The MIT License (MIT) | |
## | |
## Copyright (c) 2014 Nicco Kunzmann | |
## | |
## https://gist.github.com/niccokunzmann/9c60cb40d3d3975ef830 | |
## | |
## Permission is hereby granted, free of charge, to any person obtaining a copy | |
## of this software and associated documentation files (the "Software"), to deal |
NewerOlder