Skip to content

Instantly share code, notes, and snippets.

View codersquid's full-sized avatar

Sheila Miguez codersquid

View GitHub Profile
@codersquid
codersquid / another_example.py
Last active June 25, 2024 00:56
a learning example for using a pushgateway with prometheus
#!/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 October 17, 2016 19:40
quick script to troubleshoot what is going on with recursive push
#!/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 July 15, 2016 16:25
quick run through of how I handle adding records for the pdfs in the shared folder. please share advice.

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.

#!/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 October 18, 2015 23:52
Intro API Lesson
Loading
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 August 23, 2015 02:49
pyconza 2014 scratchpad
#!/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 August 29, 2015 14:27
Schedule info for Djangocon Europe 2015 provided for pyvideo/pyvideo issue #127 https://github.com/pyvideo/pyvideo/issues/127
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 July 27, 2017 01:37
code in unknown shape from when last I was scraping SciPy2015 schedule. I added html from the talk list page and a description page.
#!/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 August 10, 2015 15:12
example scripts so that you can see making an item on archive.org with metadata for that item
#! /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 August 29, 2015 14:26
this is an example

header

  • one
  • two
  • three

hello

foo