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
I got this kind of string | |
"101 Williges, Frank 102 Gimmler, Ursula 103 Meißner, Arno 104 Aufenanger, Michael 105 Kaiser-Wirz, Birgit 106 Becker, Friedhelm 107 Rüddenklau, Jutta 108 Mock, Andreas 118 Niemetz, Maria Luise 143 Rußhardt-Maurer, Iris" | |
and now I want to split it with a regular expression. One important point: the numbers should stay and be associated with the following name. | |
It would be really great, if someone could create a regex for this case. :) | |
Thank you! |
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
<ul id="parties"> | |
<?php | |
foreach($parties as $partei) { | |
$html = '<li title="'.$partei['label'].'">'.$partei['label'].' <input type="checkbox" /></li>'; | |
echo(utf8_encode($html)); | |
} | |
?> | |
</ul> |
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
via http://www.haha.at/sonstigetexte/sonstigetexte/Wie_man_selbst_gesund_bleibt_und_dabei_andere_in_den_Wahnsinn_treibt/ | |
1. Verlasse das Kopiergerät mit folgenden Einstellungen: 200% verkleinern, A5 Papier, 99 Kopien. | |
2. Sitz in deinem Garten und zeige mit einem Fön auf vorbeifahrende Autos, um zu sehen, ob sie langsamer werden. | |
3. Fülle drei Wochen lang entkoffeinierten Kaffee in die Kaffeemaschine. Sobald alle ihre Koffeinsucht überwunden haben, gehe über zu Espresso. | |
4. Falls du ein Glasauge hast, tippe mit dem Füllfederhalter dagegen, wenn du mit jemandem sprichst. | |
5. Schreibe "Für sexuelle Gefälligkeiten" in die Verwendungszweck Zeile all deiner Überweisungen. | |
6. Befestige Moskito-Netze rund um deinen Schreibtisch. | |
7. Singe in der Oper mit. | |
8. Bestehe darauf, die Scheibenwischer in allen Wetterlagen laufenzu lassen, um "deren Leistung zu erhöhen". |
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 pickle, os, sys, csv | |
def load_object(file_path): | |
"""Taken from https://github.com/pupil-labs/pupil/blob/master/pupil_src/shared_modules/file_methods.py | |
Args: | |
file_path (str): Annotation pickle file | |
Returns: | |
list: Annotation dicts |
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 numpy as np | |
deduplication_offset = 1e-9 | |
deduplication_counter = 0 | |
timestamp_file_path = 'world_timestamps.npy' | |
print('Loading timestamps...') | |
timestamps = np.sort(np.load(timestamp_file_path)) |
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 zmq | |
import msgpack as serializer | |
from time import sleep | |
# Connect to Pupil Capture | |
context = zmq.Context() | |
url = 'tcp://127.0.0.1:50020' | |
# Open a REQ socket. See http://zguide.zeromq.org/page:all#Ask-and-Ye-Shall-Receive | |
socket = zmq.Socket(context, zmq.REQ) |
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 ctypes.wintypes | |
import ctypes as C | |
_dsound_dll = C.windll.LoadLibrary("dsound.dll") | |
_DirectSoundEnumerateW = _dsound_dll.DirectSoundCaptureEnumerateW | |
_LPDSENUMCALLBACK = C.WINFUNCTYPE(C.wintypes.BOOL, | |
C.wintypes.LPVOID, | |
C.wintypes.LPCWSTR, | |
C.wintypes.LPCWSTR, |
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
from plugin import Plugin | |
from pyglui import ui | |
class Progress_Animator(Plugin): | |
def __init__(self, g_pool, animating=True): | |
super().__init__(g_pool) | |
self.accelerate = True | |
self.animating = animating |
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
""" | |
Receive world camera data from Pupil using ZMQ. | |
Make sure the frame publisher plugin is loaded and confugured to gray or rgb | |
""" | |
import zmq | |
from msgpack import unpackb, packb | |
import numpy as np | |
import cv2 | |
context = zmq.Context() |
OlderNewer