I hereby claim:
- I am dietercastel on github.
- I am dietercastel (https://keybase.io/dietercastel) on keybase.
- I have a public key ASAX77iupamFpZqv-aXDYiDQVOUfAIkUN96BFAqKsuKLUQo
To claim this, I am signing this object:
#!/bin/bash | |
#run adb as root | |
adb root | |
cat $1 | while read line; do adb shell "$line"; done |
#Finds pids that are listening to ports (atm tcp6 on all interfaces only) | |
netstat | grep LISTEN | grep tcp6 | awk '{print $4 }' | awk -F':' '{print $4}' > /tmp/ports.txt | |
#convert ports to hex | |
cat /tmp/ports.txt | while read myline; do printf '%x\\n' $myline ; done > /tmp/hexports.txt | |
#get inodes from hex ports | |
grep -i -f /tmp/hexports.txt /proc/net/tcp6 | awk '{print $10}' > /tmp/inodes.txt | |
#get pids tied to inodes | |
lsof | grep -f /tmp/inodes.txt | awk '{print $2}' > /tmp/pids.txt |
import sys | |
import os | |
import numpy as np | |
from keras.preprocessing import image as im | |
from keras.models import Model,load_model | |
from keras import activations | |
from keras.backend import image_data_format,image_dim_ordering | |
from keras.applications.inception_v3 import InceptionV3 |
I hereby claim:
To claim this, I am signing this object:
using IterTools | |
using Test | |
# This script counts the amount of 'winning' combinations for a n-player game of Rock, Paper Scissors (RPS). | |
# To test the mycount function I calculated I wanted to generate all possible combinations and programatically count them. | |
# That's what the actualcount function does. | |
x = [2,3,5] | |
#x = ['R','P','S'] |
from PIL import Image | |
import PIL.ImageOps | |
#Using PIL/pillow (install with 'pip3 install pillow' ) | |
name = 'RPS-g2.jpg' | |
outname = 'RPS-g2.png' #png extension | |
im = Image.open(name) | |
inv = PIL.ImageOps.invert(im) #invert opperation | |
inv.save(outname) |
#Plot of calculating the win chance for g-player Rock, Paper, Scissors. | |
# A winning RPS game contains exactly two options. | |
#Total amount of options BigInt function | |
tot(g) = 3^BigInt(g) | |
#Winning options BigInt function | |
win(g) = 3*2*(2^(BigInt(g)-1)-1) | |
#Calculate the win chance | |
winchance(g) = win(g)//tot(g) | |
xto(n) = range(3,stop=n) |
#Plot of calculating the win chance for g-player Rock, Paper, Scissors. | |
# A winning RPS game contains exactly two options. | |
#Total amount of options BigInt function | |
tot(g) = 3^BigInt(g) | |
#Winning options BigInt function | |
win(g) = 3*2*(2^(BigInt(g)-1)-1) | |
#Calculate the win chance | |
winchance(g) = win(g)//tot(g) | |
xto(n) = range(3,stop=n) |
#!/usr/local/bin/fish | |
# | |
# Finds masterkey files of Joplin. | |
echo "Searching: " $argv | |
find "$argv" -name "*.md" -print0 | xargs -0 grep -lrniE "content:|checksum:|encryption_method: 2" |
#!/usr/local/bin/julia | |
# Author: Dieter Castel | |
# | |
using Match | |
using Random | |
using Distributions | |
using Test | |
# Recursive function generating random numbers that sum to value t. | |
function genRandTot(n,t) |