This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from bs4 import BeautifulSoup | |
import requests | |
import json | |
def unlistIfSingle(givenList): | |
""" | |
Remove first element from given list if it is the only element in the list. | |
""" | |
if len(givenList) == 1: | |
output = givenList[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#script to plot onzo bike locations on google maps. | |
#After running, open onzoMap.html to view map. | |
#ToDo: Add overlay of bike info: charge level, times used, id, etc. | |
import pandas as pd | |
import gmplot | |
import requests | |
apiUrl = 'https://app.onzo.co.nz/nearby/-36.848123/174.765588/50.0' | |
response = requests.get(apiUrl) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
title: 'Regression Models Project: mtcars' | |
author: "Tim F" | |
date: "4 March 2018" | |
output: pdf_document | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE) | |
knitr::opts_chunk$set() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#ROS node to adapt output of realsense camera driver (testing with D435i) | |
#to be used for input to Rovio | |
# | |
# Specifically, the node resolves two issues: | |
# | |
# 1) The realsense driver publishes images with encoding set as "8UC1" | |
# This leads to the following error in Rovio: | |
# "CvBridgeError: [8UC1] is not a color format. but [mono8] is" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
#realsense_spencer_adaptor.py | |
# node for connecting realsence d435i output to spencer tracking package | |
import rospy | |
import cv_bridge | |
import cv2 | |
from sensor_msgs.msg import Image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<launch> | |
<include file="$(find realsense2_camera)/launch/rs_rgbd.launch"> | |
<arg name="camera" value="/spencer/sensors/rgbd_front_top"/> | |
<arg name="tf_prefix" value="rgbd_front_top"/> | |
</include> | |
<node pkg="realsense_spencer_adaptor" type="realsense_spencer_adaptor.py" name="realsense_spencer_adaptor" ns="/spencer/sensors/rgbd_front_top"/> | |
<include file="$(find spencer_people_tracking_launch)/launch/tracking_single_rgbd_sensor.launch"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# adapted from https://github.com/SteveMacenski/slam_toolbox/blob/noetic-devel/Dockerfile | |
FROM ros:noetic-ros-base-focal | |
# USE BASH | |
SHELL ["/bin/bash", "-c"] | |
# RUN LINE BELOW TO REMOVE debconf ERRORS (MUST RUN BEFORE ANY apt-get CALLS) | |
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections | |
RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# script to install apt packages that I like to have available on an ubuntu machine | |
# to install straight from github: | |
# curl https://gist.githubusercontent.com/tim-fan/8819805d8e429308618e33a99d4ec39a/raw/install_prefered_apt_pkgs.sh | sudo bash | |
apt install -y \ | |
bash-completion \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pathlib import Path | |
from git import Repo | |
import pandas as pd | |
import numpy as np | |
from datetime import datetime, timedelta | |
import dateutil.parser as dateparser | |
import plotly.express as px | |
# # requirements.txt: | |
# gitpython |
We can make this file beautiful and searchable if this error is corrected: Unclosed quoted field in line 4.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
,id,Event,Location,City,Start,End,Advice,LAT,LNG,Added,Updated,source_sha1,check,Information | |
0,a0l4a0000004EOW,Star and Garter Hotel Coromandel,"5 Kapanga Road, Coromandel 3506",Coromandel,2021-08-13 18:39:00,2021-08-13 19:40:00,"Isolate at home for 14 days from date of last exposure. Test immediately, and on days 5 & 12 after last exposure. Call Healthline for what to do next.",-36.760007,175.49723799999998,2021-08-13 18:39:00,2021-08-13 18:39:00,1560942d9537ba83510a3206f4841c1bf811f4fa,, | |
1,a0l4a0000004EOX,Umu Cafe Coromandel,"22 Wharf Road, Coromandel 3506",Coromandel,2021-08-13 19:40:00,2021-08-13 20:30:00,"Isolate at home for 14 days from date of last exposure. Test immediately, and on days 5 & 12 after last exposure. Call Healthline for what to do next.",-36.760098,175.497078,2021-08-13 19:40:00,2021-08-13 19:40:00,1560942d9537ba83510a3206f4841c1bf811f4fa,, | |
2,a0l4a0000004EPA,Jaks Cafe & Bar Coromandel,"104 Kapanga Road, Coromandel 3506",Coromandel,2021-08-14 10:50:00,2021-08-14 11:30:00,"Isolate at home |
OlderNewer