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 websocket | |
import json | |
class WebsocketHandlers: | |
def on_error(ws, error): | |
print("error") | |
print(error) | |
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
3.7.3 (default, Mar 27 2019, 09:23:15) | |
[Clang 10.0.1 (clang-1001.0.46.3)] on darwin | |
Type "help", "copyright", "credits" or "license" for more information. | |
>>> import cv2 | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "/usr/local/lib/python3.7/site-packages/cv2/__init__.py", line 89, in <module> | |
bootstrap() | |
File "/usr/local/lib/python3.7/site-packages/cv2/__init__.py", line 79, in bootstrap | |
import cv2 |
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 os | |
def get_memory_usage_in_kb(): | |
memory_usage = os.popen("cat /proc/meminfo").read().split("\n") | |
infos = {} | |
for s in memory_usage: | |
if (s.strip() == ""): | |
continue |
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
const fs = require('fs'); | |
const pathModelfile = "./dashboard_model.json" | |
const pathNewModelFile = "dashboard_new.json" | |
const obj = JSON.parse(fs.readFileSync(pathModelfile, 'utf8')); | |
const countFrequencyBand = 20 | |
const frequencyBandSize = 100 | |
const frequencyStart = 100 | |
const generateField = name => { | |
return [ |
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
package ch.rajakone.demo | |
import org.apache.kafka.clients.producer.KafkaProducer | |
import org.apache.kafka.clients.producer.ProducerRecord | |
import org.apache.kafka.common.serialization.Serdes | |
import org.apache.kafka.streams.KafkaStreams | |
import org.apache.kafka.streams.StreamsBuilder | |
import org.apache.kafka.streams.StreamsConfig | |
import org.apache.kafka.streams.kstream.Printed | |
import org.apache.kafka.streams.kstream.Suppressed |
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
Set-Location C:\report-collection | |
$errors = 0 | |
$ok = 0 | |
Get-ChildItem *random* | ForEach-Object { | |
$_.Name -match '\d+_random_md5_(\w+)\.txt' | out-null | |
if ($matches[1] -ne (Get-FileHash $_.Name -Algorithm md5).Hash) { | |
$errors += 1 | |
} else { |
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
imread | |
imwrite | |
imhist | |
imfinfo % fileinfo | |
imgetfile | |
imshow(I, [low high]) %show all values =< low and >= high | |
%convert matrix values to intensity values between 0 and 1 | |
I = mat2gray(A,[AMIN AMAX]) |
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
# Chocolately | |
Run as Admin | |
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin" | |
Untested | |
choco install chrome | |
choco install keepass |
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
gci C:\backup\folder | %{ | |
# Root Kundenordner | |
gci $_.fullname| %{ | |
#Client folder | |
gci $_.fullname | %{ | |
#$_.fullname | |
# Client/Application/Subfolder | |
if( $_.name.tolower().contains("sicherung")){ |
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
clear | |
$StartDatum = "01.01.13" | |
$EndDatum = "01.09.13" | |
$users = @{ "max müller" = @(); "peter pan" = @(); "mitz mausi" = @(); "fun farah" = @()} | |
$LookupCalender = "Calendar Name" | |
$usersKW = $users.Clone() | |
$outHash = $users.Clone() |