Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
echo "removing config"
rm ~/.jprofiler*/jprofiler_config.xml
echo "clearing preferences"
rm -f ~/Library/Preferences/com.jprofiler.*.plist
rm -f ~/Library/Preferences/jprofiler.vmoptions
echo "restarting cfprefsd"
killall cfprefsd
@bound2
bound2 / deepfake_ubuntu_linux
Last active September 21, 2018 05:33
0-100 deepfake ubuntu linux setup
# 0-100 deepfake ubuntu setup 17.10 version:
# general stuff
sudo apt-get install git
sudo apt-get install cmake
# install nvidia drivers
sudo add-apt-repository ppa:graphics-drivers
sudo apt-get update
sudo apt-get purge nvidia-*
@bound2
bound2 / mcc-parser.py
Created August 1, 2017 08:01
extract mobile country codes from webpage
from bs4 import BeautifulSoup
import urllib2
from collections import defaultdict
if __name__ == '__main__':
page = urllib2.urlopen("http://mcc-mnc.com")
html = page.read()
soup = BeautifulSoup(html, "html.parser")
from PIL import Image, ImageOps
image = Image.open("test.png")
width = image.size[0]
minimum_height = int(width / 1.9)
background = Image.new('RGB', (image.size[0], minimum_height))
background.paste(image, (0, minimum_height / 2 - image.size[1] / 2), image.convert('RGBA'))
background.save("output.png")
import ConfigParser
class BasicUser:
def __init__(self, username, password):
self.username = username
self.password = password
def __str__(self):
return "(username={:s}, password={:s})".format(self.username, self.password)
#!/usr/bin/env python
import os
import json
import re
raw_input = """
ID : fa5bd3ba-5e60-4499-be7c-3b9556b89e7b
Gossip active : true
Thrift active : true
Native Transport active: true