Skip to content

Instantly share code, notes, and snippets.

Mark Cockburn MorkHub

Block or report user

Report or block MorkHub

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@MorkHub
MorkHub / tztool.py
Last active Jun 8, 2019
Timezone matcher
View tztool.py
import pytz
from datetime import datetime as dt, tzinfo
NOW = dt.now(tz=pytz.utc)
def get_timezone_code(tz: tzinfo = pytz.utc) -> str:
return tz.normalize(NOW).strftime("%Z")
View cloudSettings
{"lastUpload":"2020-03-06T14:59:31.080Z","extensionVersion":"v3.4.3"}
View pubkey.asc
-----BEGIN PGP PUBLIC KEY BLOCK-----
mQENBFviCsEBCADExtYbgP/v+Ss3mmrvPrX7raoYdGzsVRwIkK4eS3m7Y0Q45ETM
yff6p+u4ejjciwOk0+DwgQa8z8ycSDgKAsMVhXeSlsdbiyWJ8UxFxWozv8Y/cdXg
RblJQMYHQWcresY9tEq8JFqdNig5YJrED2N30TUGIrUYBcY10dCLnGXgRDyIe2Cu
QbeVPXQPDFFLq84i64NA0fwkeixCMRPy4Scywm1LDYnQdX3BW20MMBeK0nDmrEd8
JvmBuZxKsY3SpKIPOJHBcR5NZSIpPFYSp7yoopYSJyZnnmvPSZsa9zXSnvDE74i3
iOuE/2KTjreiDgh5272n8UOu/kYnElavouapABEBAAG0Ik1hcmsgQ29ja2J1cm4g
PE1vcmtAVGhlTW9yay5jby51az6JAVQEEwEIAD4WIQSK6JwUTaxa+dpSrsjpS8qw
Ka1w5QUCW+IKwQIbIwUJA8Mv/wULCQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRDp
View Keybase proof
### Keybase proof
I hereby claim:
* I am morkhub on github.
* I am themork (https://keybase.io/themork) on keybase.
* I have a public key ASAccGMW_UhXVRVXe8GGij4Vd0lBTbJU0JP_8pZgKkNDzAo
To claim this, I am signing this object:
@MorkHub
MorkHub / OpenCV attemp.py
Created Sep 8, 2017
trying to warp an image into a placeholder in another image
View OpenCV attemp.py
import numpy as np, cv2, imutils
image = cv2.imread("images/thumbscreen.png")
lower = np.array([250, 0, 250])
upper = np.array([255, 0, 255])
shapeMask = cv2.inRange(image, lower, upper)
cnts = cv2.findContours(shapeMask.copy(), cv2.RETR_EXTERNAL, cv2.CHAIN_APPROX_SIMPLE)
cnts = cnts[0] if imutils.is_cv2() else cnts[1]
c = max(cnts, key=cv2.contourArea)
View 4:20
Adah gave birth to Jabal; he was the father of those who dwell in tents and have livestock.
View apachectl -t -D DUMP_VHOSTS
mark@ubuntu ~ $ apachectl -t -D DUMP_VHOSTS
VirtualHost configuration:
*:443 is a NameVirtualHost
default server none (/etc/apache2/sites-enabled/000-default-ssl.conf:2)
port 443 namevhost none (/etc/apache2/sites-enabled/000-default-ssl.conf:2)
port 443 namevhost themork.co.uk (/etc/apache2/sites-enabled/themork.co.uk-ssl.conf:1)
alias www.themork.co.uk
*:80 is a NameVirtualHost
default server none (/etc/apache2/sites-enabled/000-default.conf:1)
@MorkHub
MorkHub / .gitignore
Last active Jan 23, 2017
SQL for python
View .gitignore
*.log*
secret.py
View app.py
################################################################################
import functools
commands = {}
def register(command_name):
def wrapped(fn):
@functools.wraps(fn)
def wrapped_f(*args, **kwargs):
return fn(*args, **kwargs)
wrapped_f.__doc__ += "(command=%s)" % command_name
wrapped_f.command_name = command_name
View week 8.py
sum = 0 # start sum at 0
count = 0 # start count at 0
number = float(input("Enter a number: ")) # get first number
while number != 0: # forever if number is not zero
sum += number # add number to the sum
count += 1 # count the number
number = float(input("Enter a number")) # get next number
print("Choose an option:");
print("[1] Count values")
You can’t perform that action at this time.