Skip to content

Instantly share code, notes, and snippets.

View dchud's full-sized avatar

Dan Chudnov dchud

  • @mitre (work) + CDC projects (work) + personal projects
  • Washington, DC, USA
View GitHub Profile
@JoeyBurzynski
JoeyBurzynski / 55-bytes-of-css.md
Last active May 6, 2024 10:42
58 bytes of css to look great nearly everywhere

58 bytes of CSS to look great nearly everywhere

When making this website, i wanted a simple, reasonable way to make it look good on most displays. Not counting any minimization techniques, the following 58 bytes worked well for me:

main {
  max-width: 38rem;
  padding: 2rem;
  margin: auto;
}
@rasmusab
rasmusab / significance_test.R
Last active June 10, 2020 21:01
A Significantly Improved Significance Test! Not! (More context in this blogpost: http://www.sumsar.net/blog/2014/02/a-significantly-improved-test/)
# Test of Significance, takes the same arguments as t.test() .
signif.test <- function(x, ...) {
p <- t.test(x, ...)$p.value
# List of p excuses retrieved from http://mchankins.wordpress.com/2013/04/21/still-not-significant-2/
p_excuses <- c(
"(barely) not statistically significant <p>",
"a barely detectable statistically significant difference <p>",
"a borderline significant trend <p>",
"a certain trend toward significance <p>",
@elmotec
elmotec / bootstrap_cmdline.py
Last active December 1, 2021 17:14
Minimal python program with logging and argparse.
#!python
"""See main.__doc__"""
import os
import logging
import glob
import unittest
import sys
@edsu
edsu / worldcat_live.py
Last active December 1, 2016 17:36
A Python module for interacting with the experimental OCLC Worldcat Live API.
#!/usr/bin/env python
"""
This is mainly a demonstration of OCLC's experimental Worldcat Live API [1]
from Python. You should be able to use this module like so:
import worldcat_live
for item in worldcat_live.items():
print item["title"]
<?php
// The gChart PHP library is required in order to make this work. You can download it from http://code.google.com/p/gchartphp/
// Make sure you put it in the same directory as this script
ini_set('display_errors','1');
$server_address = 'http://142.132.138.20:8983';
require ('gChart.php');
if ( isset($_GET['query'])) {
$query = 'mimetype:' . strtolower($_GET['query']) . '*';
anonymous
anonymous / gist:624733
Created October 13, 2010 19:38
<?xml version="1.0" encoding="UTF-8" ?>
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You 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
http://www.apache.org/licenses/LICENSE-2.0