Skip to content

Instantly share code, notes, and snippets.

Avatar

Sheila Miguez codersquid

View GitHub Profile
@codersquid
codersquid / another_example.py
Last active May 3, 2020
a learning example for using a pushgateway with prometheus
View another_example.py
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Canonical Ltd.
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free
# Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
@codersquid
codersquid / debug-launch.sh
Last active Oct 17, 2016
quick script to troubleshoot what is going on with recursive push
View debug-launch.sh
#!/bin/sh
set -ex
LXC=/home/sheila/gopath/bin/lxc
COUNT=${1:-5}
echo making $COUNT test files
rm -rf exampledir
@codersquid
codersquid / zoteroworkflow.md
Last active Jul 15, 2016
quick run through of how I handle adding records for the pdfs in the shared folder. please share advice.
View zoteroworkflow.md

Race and Policing Research Zotero group.

Dropbox folder (Contact @aasewell, status, for password details)

Hi all,

I will describe how I've been using zotero to import records based on the existing PDFs in the folder.

Zotero has browser plugins and desktop clients. I use the browser plugin for Firefox and I have Zotero toolbar buttons on my browser.

View setup.sh
#!/bin/bash
ID=400000 # some large uid outside of typical range, and outside of already mapped ranges in /etc/sub{u,g}id
_UID=$(id -u)
GID=$(id -g)
GROUP=$(id -gn)
# give lxd permission to map your user/group id through
sudo usermod --add-subuids ${_UID}-${_UID} --add-subgids ${GID}-${GID} root
# create a profile to control this, name it after $USER
@codersquid
codersquid / intro_api.ipynb
Last active Oct 18, 2015
Intro API Lesson
View intro_api.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@codersquid
codersquid / cleandata.py
Created Aug 23, 2015
pyconza 2014 scratchpad
View cleandata.py
#!/usr/bin/env python
# coding: utf-8
from __future__ import unicode_literals
from collections import defaultdict
from steve.util import (
#get_from_config,
get_project_config,
save_json_files,
#load_json_files,
)
@codersquid
codersquid / djangotalks.csv
Last active Aug 29, 2015
Schedule info for Djangocon Europe 2015 provided for pyvideo/pyvideo issue #127 https://github.com/pyvideo/pyvideo/issues/127
View djangotalks.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 4 columns, instead of 1. in line 7.
title,speaker,time,description
Welcome,missing,09.00,Welcome to Cardiff
Baptiste's adventures in Djangoland,Baptiste Mispelon,09.20,"Our keynote speaker describes how he tackled burnout by travelling around Europe, eating Welsh cakes, pierogi and stroopwafel."
Avoiding monoliths,Hanna Kollo,10.10,"Hanna explains how to take advantage of Django's flexibility to build modular systems, when working with large projects with ever-changing requirements."
Injecting Django into the work environment,Abdulrahman Alotaibi,10.30,Abdulrahman discusses what makes users willing to switch from one framework or language to another.
Cardiff University Wellbeing service,missing,10.50,A brief introduction to the support the Wellbeing service is offering at the event
Pushing the pony’s boundaries,Ola Sitarska,11.30,"Ola is a Django core developer and has spent five years pushing Django's admin to its limits. She'll discuss some of the things you can do, and some you really should try, with this amazing toolbox."
the Cardiff Maths
@codersquid
codersquid / cleandata.py
Last active Jul 27, 2017
code in unknown shape from when last I was scraping SciPy2015 schedule. I added html from the talk list page and a description page.
View cleandata.py
#!/usr/bin/env python
# coding: utf-8
from __future__ import unicode_literals
import re
from bs4 import BeautifulSoup
from steve.util import (
#get_from_config,
get_project_config,
save_json_files,
load_json_files,
@codersquid
codersquid / archive.py
Created Aug 10, 2015
example scripts so that you can see making an item on archive.org with metadata for that item
View archive.py
#! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
I had a script to upload some conference files to archive.org a while back, and I can't remember
if this is the file I used. It could be. It's very krufty. Also, the internetarchive package has
reved a few times since.
this is only for an example
"""
@codersquid
codersquid / foo.md
Last active Aug 29, 2015
this is an example
View foo.md

header

  • one
  • two
  • three

hello

foo