Skip to content

Instantly share code, notes, and snippets.

@VioletDarkKitty
VioletDarkKitty / words.py
Last active October 18, 2017 21:32
Print most used words. Change the filename 'input' to another one to load files. Plain text only
#!/usr/bin/python3
content = ""
with open('input', 'r') as content_file:
content = content_file.read()
words = {}
for word in content.split():
if word in words:
words[word] = words[word] + 1
@VioletDarkKitty
VioletDarkKitty / outside_uk.py
Last active March 21, 2019 22:16
Find the total number of signatures by country outside of the UK for the revoke article 50 petition
#!/bin/python
import urllib2
import json
url = "https://petition.parliament.uk/petitions/241584.json"
response = urllib2.urlopen(url)
json_data = json.loads(response.read())
outside_uk = 0

Keybase proof

I hereby claim:

  • I am violetdarkkitty on github.
  • I am violetdarkkitty (https://keybase.io/violetdarkkitty) on keybase.
  • I have a public key ASBoaIX_KbdrZIHMLqxeaD_O3by7htCn-aFcVxtN-CDRzAo

To claim this, I am signing this object: