Skip to content

Instantly share code, notes, and snippets.

View williln's full-sized avatar

Lacey Henschel williln

View GitHub Profile
@williln
williln / django-girls-pdx-childcare.md
Last active August 29, 2015 14:24
Information about childcare for Django Girls Portland

Child Care at Django Girls Portland

First of all, thanks for signing up for childcare for Django Girls Portland! We're excited to be able to offer free childcare to the women attending our workshop. We want to take this opportunity to go over a couple of things that you should know.

Please fill out this emergency contact form and waiver so we have all of your child's information easily at hand.

Our provider

Avery Fisher, a nurse-midwifery student at OHSU, is our nanny for the day. She is about 2 months away from being a certified Registered Nurse, and will spend the next two years studying midwifery. She has several years of experience caring for young children as a nanny. She's CPR and first aid trained, and has passed rigorous background checks to be part of OHSU' competitive program. She is also a personal friend of the organizers, and is very excited to be spending the day with your little ones.

@williln
williln / django-girls-accessibility.md
Last active August 29, 2015 14:24
A More Accessible Django Girls (Slides + Script)

A More Accessible Django Girls

(Slides, Video)

Good morning! Thank you so much for having me.

If you’d like to follow along, the script and a link to the slides on slideshare is at this link.. This link will be at the bottom of the next few slides, so you’ll be able to catch it if you need it.

Hi! I’m Lacey. I’m a developer at the University of Texas at Austin, and I’m an organizer for Django Girls and DjangoCon, and this is my first ever conference presentation.

Keybase proof

I hereby claim:

  • I am williln on github.
  • I am laceynwilliams (https://keybase.io/laceynwilliams) on keybase.
  • I have a public key whose fingerprint is 8C5B 3605 08A1 54A0 3DC7 750B C37D 05FA 2429 1117

To claim this, I am signing this object:

@williln
williln / codeblock.py
Last active October 31, 2018 16:15
Adding code blocks and markdown to Wagtail pages
# blocks.py
from django.utils.safestring import mark_safe
from markdown import markdown # Requires Markdown library
from pygments import highlight # Requires Pygments library
from pygments.formatters import get_formatter_by_name
from pygments.lexers import get_lexer_by_name
from wagtail.core import blocks
import re
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.sites.models import Site
from django.core.mail import send_mail
from django.db import models
from django.template.loader import render_to_string
from django.utils.crypto import salted_hmac
from django.utils.translation import ugettext_lazy as _
version: '3'
services:
db:
[your DB info]
web:
[your web info]
@williln
williln / drf-yasg-examples.py
Last active December 15, 2022 19:49
Some drf-yasg examples
from drf_yasg import openapi
from drf_yasg.utils import no_body, swagger_auto_schema
"""
For actions, a lot of times Swagger will pick up on the serializer you pass to serializer_class in the decorator.
But when you're using different input and output serializers or doing anything fancy, Swagger doesn't like it.
Swagger also isn't great at picking up on the status you return if you're not returning a 200 or 201.
"""
@williln
williln / choose.py
Created November 19, 2020 16:49
Choose someone from a list
import random
def choose(people):
return people[random.randint(0, len(people) - 1)]
people = ["Amelia", "Manuel"]
print(choose(people))