Skip to content

Instantly share code, notes, and snippets.

View madranet's full-sized avatar

madra.net madranet

View GitHub Profile

Keybase proof

I hereby claim:

  • I am madranet on github.
  • I am stiobhart (https://keybase.io/stiobhart) on keybase.
  • I have a public key whose fingerprint is 4BAF 07A0 692E 2776 8F7F C235 D846 195B A179 F646

To claim this, I am signing this object:

@madranet
madranet / gist:7fb830f03ab3884945edbe5266eaa3da
Created August 14, 2017 11:17
Neatoshop PHP error -- Image upload
<pre>Array
(
[cart_id] => 219102202
[CLIENT_IP] => 80.229.156.228
[current_user_id] => 127733
[current_user_passhash] => e9438ce36cf759deb61fe92f22bbf686
[user_is_us] =>
[app_exception] => ImagickException Object
(
[message:protected] => Read Exception `/www/neatoshop.com/artist-uploads/T-REV-STOBHARTMATULEVICZ-French-Bulldog-Cartoon-Some-Big-Dogs-Did-It-and-Ran-Away.png' @ error/png.c/MagickPNGErrorHandler/1643
===========================================================
VERTICAL MESSAGE DECODING:
===========================================================
NI BEZONAS DIVERSECO DE PENSO EN LA MONDO POR ALFRONTI LA NOVAJI DEFIOJN
===========================================================
print("\n===========================================================")
print("VERTICAL MESSAGE DECODING:")
print("===========================================================\n")
esperanto = ""
for section in vertmessage:
#take 3 letters at a time and convert to morse
#join 3 morse letters together to create braille letter
#if the 'section' consists of 3 spaces, then interpret it s a single space between words'
#yes. I know this is a bit clunky but it doesn't need importing regex module!
if section == " ":
===========================================================
OPTION03 —VERTICAL READING
===========================================================
vertical message = ['INA', 'NAM', ' ', 'AAM', 'ANM', 'ANI', 'ANA', 'INA', 'AMM', 'NAA', ' ', 'INM', 'NAM', 'AAI', 'ANM'
, 'AIA', 'NAA', 'ANM', 'IMM', 'ANA', ' ', 'INM', 'ANM', ' ', 'IAA', 'ANM', 'INA', 'NAA', 'ANA', ' ', 'ANM', 'INA', ' ', 'AAA', 'AMM', ' ', 'IMA', 'ANA', 'INA', 'INM', 'ANA', ' ', 'IAA', 'ANA', 'AIA', ' ', 'AMM', 'AAA', 'IAM', 'AIA', '
ANA', 'INA', 'NIA', 'NAM', ' ', 'AAA', 'AMM', ' ', 'INA', 'ANA', 'AAI', 'AMM', 'NIM', 'NAM', ' ', 'INM', 'ANM', 'IAM',
'NAM', 'ANA', 'NIM', 'INA']
vertmessage = []
for index in enumerate(messageline01):
#take letters at a time from each line and group in threes
brailleletter = (messageline01[index[0]]+messageline02[index[0]]+messageline03[index[0]])
vertmessage.append(brailleletter)
print("vertical message: ",vertmessage)
#lined message
messageline01 = ("IN AAAAIAN INAAANAIA IA IAINA AI AA IAIIA IAA AAIAAINN AA IAAANN IAINANI")
messageline02 = ("NA ANNNNMA NAANIANMN NN ANNAN NN AM MNNNN ANI MAAINNIA AM NNAMIA NNAANIN")
messageline03 = ("AM MMIAAMA MMIMAAMMA MM AMAAA MA AM AAAMA AAA MAMAAAAM AM AAIMMM MMMMAMA")
===========================================================
OPTION02 —ALT MORSE
===========================================================
?????????????????B?I?L???R??L?LO???TZ??K??WG????WW??W??W???W
===========================================================
#try alt morse
print("\n===========================================================")
print("OPTION02 —ALT MORSE")
print("===========================================================\n")
for section in message:
#take 3 letters at a time and convert to morse
#join 3 morse letters together to create braille letter
brailleletter = (altmorse[section[0]]+altmorse[section[1]]+altmorse[section[2]])
#lookup braille letter
try:
#alternate morse code
altmorse = {
'A':'01',
'I':'00',
'M':'11',
'N':'10',
}