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
#! python3 | |
# coding: utf-8 | |
"""Script to mangle images. | |
This script mangles images by switching color comparable spots in the image. | |
This script uses the pillow python package. | |
""" | |
from __future__ import print_function |
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
#! python3 | |
# coding: utf-8 | |
import argparse | |
import collections | |
from http.server import BaseHTTPRequestHandler | |
from http.server import HTTPServer | |
import json | |
from urllib import parse |
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
data = [] | |
def hamming(n): | |
return data[n - 1] | |
def calc_hamming(i, j, k): | |
return 2**i * 3**j * 5**k | |
for i in range(50): | |
for j in range(50): |
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
def decompose(n): | |
# your code | |
num, _, den = n.partition('/') | |
if not den: | |
den = 1 | |
if '.' in num: | |
pred, _, postd = num.partition('.') | |
num = int(pred) * 10**(len(postd)) | |
num += int(postd) | |
den *= 10**(len(postd)) |
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
"""Python 3 implementation of a linked list and a circular link list.""" | |
import collections | |
class LinkedNode(object): | |
def __init__(self, value): | |
self.next = None | |
self.value = value | |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.