Skip to content

Instantly share code, notes, and snippets.

Gordon Fleetwood gfleetwood

Block or report user

Report or block gfleetwood

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
View mkr_http.ino
#include <SPI.h>
#include <WiFiNINA.h>
// CHANGE: Insert Wifi info
char ssid[] = "<ssid>"; // your network SSID (name)
char pass[] = "<pwd>"; // your network password (use for WPA, or use as key for WEP)
int keyIndex = 0; // your network key Index number (needed only for WEP)
int status = WL_IDLE_STATUS;
// Initialize the Wifi client library
View bioinfo-coursera,py
import re
with open("/home/gordon/Downloads/Vibrio_cholerae.txt", "r") as f:
file = f.read().replace('\n', '')
def count_pattern(text, pattern):
"""
Count the number of times a pattern occurs in a gene sequence
"""
View EEG_for_classv2 (1).ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View bash-functions.sh
# Pretty View CSV
function pretty_csv {
column -t -s, -n "$@" | less -F -S -X -K
}
View DOITT_SUBWAY_STATION_01_13SEPT2010.csv
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 8.
URL,OBJECTID,NAME,the_geom,LINE,NOTES
http://web.mta.info/nyct/service/,1,Astor Pl,POINT (-73.99106999861966 40.73005400028978),4-6-6 Express,"4 nights, 6-all times, 6 Express-weekdays AM southbound, PM northbound"
http://web.mta.info/nyct/service/,2,Canal St,POINT (-74.00019299927328 40.71880300107709),4-6-6 Express,"4 nights, 6-all times, 6 Express-weekdays AM southbound, PM northbound"
http://web.mta.info/nyct/service/,3,50th St,POINT (-73.98384899986625 40.76172799961419),1-2,"1-all times, 2-nights"
http://web.mta.info/nyct/service/,4,Bergen St,POINT (-73.97499915116808 40.68086213682956),2-3-4,"4-nights, 3-all other times, 2-all times"
http://web.mta.info/nyct/service/,5,Pennsylvania Ave,POINT (-73.89488591154061 40.66471445143568),3-4,"4-nights, 3-all other times"
http://web.mta.info/nyct/service/,6,238th St,POINT (-73.90087000018522 40.88466700064975),1,"1-all times, exit only northbound"
http://web.mta.info/nyct/service/,7,Cathedral Pkwy (110th St),POINT (-73.95806670661364 40.800581558114956),A-B-C,"
View shiny-calendar.R
library(shiny)
library(fullcalendar)
data = data.frame(title = paste("Event", 1:3),
start = c("2017-03-01", "2017-03-01", "2017-03-15"),
end = c("2017-03-02", "2017-03-04", "2017-03-18"),
color = c("red", "blue", "green"))
#fullcalendar::fullcalendar(data)
View daily-coding-problem.py
# 1
'''
Given a list of numbers and a number k, return whether any two numbers from the list add up to k.
For example, given [10, 15, 3, 7] and k of 17, return true since 10 + 7 is 17.
'''
from itertools import combinations
def sum_exists(li, k):
You can’t perform that action at this time.