Skip to content

Instantly share code, notes, and snippets.

View mrcrnkovich's full-sized avatar

Mike mrcrnkovich

  • Philadelphia, PA
View GitHub Profile
@mrcrnkovich
mrcrnkovich / index.html
Created February 11, 2021 02:50
PHL St Dept Fines table
<html>
<head>
</head>
<body>
<div id="layout">
</div>
</body>
</html>
@mrcrnkovich
mrcrnkovich / organizeDir.py
Last active June 24, 2020 06:15
#script to sort files by suffix into folders
'''
This is a command line program designed to identify and
group all files (non-directories) in a given directory and
move each file type (“.csv”, “.py”, “.txt”, etc) into a named
directory of the file type. The program will create a new directory
for any file type that does not have a directory but will not overwrite
existing directories. The program takes the following arguments:
directory: a string path to the directory to be organized
-v: verbose output option
'''
@mrcrnkovich
mrcrnkovich / kata_mean_concat.py
Last active September 4, 2019 16:10
Codewars kata: Calculate mean and concatenate string
"""
Return an array of length 2 with a[0] representing the mean of the ten integers as a floating point number.
There will always be 10 integers and 10 characters. Create a single string with the characters and
return it as a[1] while maintaining the original order.
"""
def mean(lst):
#split list into integers and strings
lst_mean = [int(i) for i in lst if i.isdigit()]
lst_str = list(filter(lambda x: not x.isdigit(), lst))