Skip to content

Instantly share code, notes, and snippets.

View pamelafox's full-sized avatar

Pamela Fox pamelafox

View GitHub Profile
@pamelafox
pamelafox / babyhint.js
Created December 2, 2013 05:13
BabyHint
/*
* BabyHint does a line-by-line check for common beginner programming mistakes,
* such as misspelling, missing spaces, missing commas, etc. It is used in
* conjunction with JSHINT to report errors to the user.
*
* Each error returned contains the members:
* {
* row : the row at which the error was found
* column : the column at which the error was found
* text : the error messaage
@pamelafox
pamelafox / with_yappi.py
Last active October 24, 2023 23:12
profiling with yappi
import os
from collections import namedtuple
import aiohttp
import pytest
from azure.core.exceptions import ResourceNotFoundError
from azure.core.pipeline.transport import (
AioHttpTransportResponse,
AsyncHttpTransport,
HttpRequest,
@pamelafox
pamelafox / bootstrap.datepicker.js
Created February 8, 2012 05:12
jQuery/Zepto Bootstrap Datepicker
/* ===========================================================
* bootstrap-datepicker.js v1.3.0
* http://twitter.github.com/bootstrap/javascript.html#datepicker
* ===========================================================
* Copyright 2011 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
@pamelafox
pamelafox / datepicker.scss
Created February 8, 2012 05:49
Zepto Bootstrap Datepicker SASS
.datepicker {
background-color: $white;
border-color: #999;
border-color: rgba(0, 0, 0, 0.2);
border-style: solid;
border-width: 1px;
@include border-radius(4px);
@include box-shadow(0 2px 4px rgba(0,0,0,.2));
@include background-clip(padding-box);
@pamelafox
pamelafox / settings.json
Last active September 19, 2023 16:46
Pamela's VS Code settings
{
"html.autoCreateQuotes": false,
"editor.autoClosingBrackets": "never",
"html.autoClosingTags": false,
"cmake.configureOnOpen": true,
"editor.quickSuggestions": {
"other": "off"
},
"azureFunctions.showPysteinModel": true,
"workbench.colorTheme": "Solarized Light",
@pamelafox
pamelafox / selenium_dom.py
Created January 17, 2012 02:36
Python Selenium Dom Helper Functions
from selenium.common.exceptions import NoSuchElementException, TimeoutException
class DomHelper(object):
driver = None
waiter = None
def open_page(self, url):
self.driver.get(url)
@pamelafox
pamelafox / Dockerfile
Created June 16, 2023 23:43
Dockerfile for single Python version
FROM python:3.11.2-slim
# Install Git
RUN apt-get update && apt-get install -q -y --fix-missing \
git && \
rm -rf /var/lib/apt/lists/*
#[Optional] If your pip requirements rarely change, uncomment this section to add them to the image.
COPY .devcontainer/requirements.txt /tmp/pip-tmp/
RUN pip3 --disable-pip-version-check --no-cache-dir install -r /tmp/pip-tmp/requirements.txt \
@pamelafox
pamelafox / links.md
Last active June 9, 2023 21:22
SF Reactor AI Fair
@pamelafox
pamelafox / warandpeace.py
Last active May 30, 2023 21:00
War and Peace Insertion Showdown
import timeit
class Link:
empty = ()
def __init__(self, first, rest=empty):
self.first = first
self.rest = rest
def insert_at_start(self, value):