Skip to content

Instantly share code, notes, and snippets.

View MitchellSlavik's full-sized avatar

Mitchell Slavik MitchellSlavik

View GitHub Profile
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
import React, { Component, RefObject } from 'react';
import {
@MitchellSlavik
MitchellSlavik / frequencyAnalysis.py
Created September 10, 2018 03:40
Frequency analysis of a cipher text with a replacement mapping prompt
from math import ceil
def getBool(prompt):
while True:
try:
return {"yes":True,"no":False,"y":True,"n":False}[input(prompt).lower()]
except KeyError:
print("Invalid input please enter Yes or No!")
inputText = input("Input cipher text: ")