Skip to content

Instantly share code, notes, and snippets.

carlynorama carlynorama

Block or report user

Report or block carlynorama

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
@carlynorama
carlynorama / BotanicalName
Created Jan 24, 2019
Botanical Name Script Filemaker
View BotanicalName
Let ( [
BasicName = If(IsEmpty(Genus);Family;Genus & " " & Species)
];
TextStyleAdd ( BasicName ; Italic ) )
&
If ( IsEmpty ( subspecies ) ; "";
Let (
@carlynorama
carlynorama / trangle_segment_generator.py
Last active Oct 28, 2018
Generates pattern of triangles, one segment at a time
View trangle_segment_generator.py
import math
save_file_name = "pattern"
def triangle(origin_x, origin_y):
A_x = triangle_half_base + origin_x
A_y = origin_y
B_x = triangle_side + origin_x
B_y = origin_y + triangle_height
C_x = origin_x
View mastodon_instances.csv
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 0.
In no particular order:
mastodon.social
mastodon.cloud
cybre.space
octodon.social
hackers.town
social.coop
chaos.social
mastodon.art
@carlynorama
carlynorama / sshkey.sh
Created Aug 14, 2018
RSA SSH Key Reminder Crib Sheet
View sshkey.sh
ssh-keygen -t rsa
#Enter file in which to save the key (/Users/$YOUR_USER_NAME/.ssh/id_rsa): $NAME_TO_USE
#Option 1, no sever exists yet
cat /Users/$YOUR_USER_NAME/.ssh/$NAME_TO_USE.pub
#copy paste that into wherever
sudo nano ~/.ssh/config
# Add host information into file
Host $HOST_SHORTCUT_NAME
Hostname $IP.ADD.ER.ESS
@carlynorama
carlynorama / last_tuesdays.py
Created May 31, 2018
Get the last Tuesday of the month
View last_tuesdays.py
#https://rosettacode.org/wiki/Find_the_last_Sunday_of_each_month#Python
import sys
import calendar
year = 2018
if len(sys.argv) > 1:
try:
year = int(sys.argv[-1])
except ValueError:
pass
@carlynorama
carlynorama / is_it_a_tuesday.py
Last active May 31, 2018
check if any date is a Tuesday
View is_it_a_tuesday.py
import datetime
import dateutil.parser #dateutil module
date = datetime.datetime.today()
def is_it_tuesday(date_to_check):
if date_to_check.weekday() == 1:
print("yes")
else:
print("no")
View is_it_tuesday.py
import datetime
date = datetime.datetime.today()
def is_it_tuesday(date_to_check):
if date_to_check.weekday() == 1:
print("yes")
else:
print("no")
@carlynorama
carlynorama / tuesdayspermonth.py
Created May 29, 2018
What months have 5 Tuesdays?
View tuesdayspermonth.py
#Thank you https://stackoverflow.com/questions/12973691/count-number-of-sundays-in-current-month
import calendar
year = 2018
for m in range(1,13):
len([1 for i in calendar.monthcalendar(year, m) if i[1] != 0])
View everytuesday.py
#code taken from example on
#https://stackoverflow.com/questions/2003870/how-can-i-select-all-of-the-sundays-for-a-year-using-python
from datetime import date, timedelta
dstart = date(2018,1,1)
dend = date(2018,12,31)
# this will return all sundays between start-end dates.
days = [dstart + timedelta(days=x) for x in range((dend-dstart).days + 1) if (dstart + timedelta(days=x)).weekday() == 1]
print len(days)
@carlynorama
carlynorama / MyFirstSpiral.py
Last active Mar 26, 2018
Fusion360 Script that draws a spiral, basic
View MyFirstSpiral.py
#Author- carlyn
#Description- draw a kinda ugly spiral
import adsk.core, adsk.fusion, traceback
def getFibbCords(num_cords):
#numbers in the Fibonacci sequence
myCords = [0,1]
for i in range(2, num_cords):
myCords.append(myCords[i-1]+ myCords[i-2])
You can’t perform that action at this time.