On my machine, the timings are:
Fortran:
$ time ./a.out 249999999500000000 real 0m0.510s user 0m0.510s sys 0m0.000s
program test | |
implicit none | |
integer, parameter :: dp = 8 | |
real(dp) :: a, b | |
a = 1.0_dp | |
b = a + epsilon(1.0_dp) | |
print *, "First we show, that we have two different 'a' and 'b':" | |
print *, "a == b:", a == b, "b-a:", b-a | |
print *, "using (es22.15)" | |
print "(es22.15)", a |
On my machine, the timings are:
Fortran:
$ time ./a.out 249999999500000000 real 0m0.510s user 0m0.510s sys 0m0.000s
So this is roughly how I handle CSS these days. As much as I'd like to use CSSModules for everything, I work on a lot of different projects, for a lot of different clients. They can't all be a SPA.
Some of this seems blindingly obvious. But until I stop cleaning up messy, repetitive CSS, I figure it all merits being said.
I use one file to style HTML. This creates a baseline for the body, defines my box model, sets global typography rules, etc. If I need to style an HTML element, I style it globally. Otherwise, I give an element a class, and only style that class.
import contextlib | |
import os.path | |
import socket | |
import ssl | |
import unittest | |
from tornado.iostream import SSLIOStream | |
from tornado import netutil, testing | |
from tornado.testing import AsyncTestCase, bind_unused_port |
#! /usr/bin/env python | |
# -*- coding: utf-8 -*- | |
""" | |
Authentication proxy for Tornado to use Google apps authentication to | |
serve the files in a protected location. Ideal to serve files like | |
sphinx documentation behind a password. | |
:copyright: (c) 2011 by Openlabs Technologies & Consulting (P) Limited | |
:license: BSD, see LICENSE for more details. | |
""" |
license, chosen_word, guesses, scaffold, man, guesses_left = 'https://opensource.org/licenses/MIT', ''.join(filter(str.isalpha, __import__('random').choice(open('/usr/share/dict/words').readlines()).upper())), set(), '|======\n| |\n| {3} {0} {5}\n| {2}{1}{4}\n| {6} {7}\n| {8} {9}\n|', list('OT-\\-//\\||'), 10 | |
while not all(letter in guesses for letter in chosen_word) and guesses_left: _, guesses_left = map(guesses.add, filter(str.isalpha, raw_input('%s(%s guesses left)\n%s\n%s:' % (','.join(sorted(guesses)), guesses_left, scaffold.format(*(man[:10-guesses_left] + [' '] * guesses_left)), ' '.join(letter if letter in guesses else '_' for letter in chosen_word))).upper())), max((10 - len(guesses - set(chosen_word))), 0) | |
print 'You', ['lose!\n' + scaffold.format(*man), 'win!'][bool(guesses_left)], '\nWord was', chosen_word |
var screenshotUrl = 'http://example.com/' | |
var casper = require("casper").create({ | |
viewportSize: { | |
width: 1024, | |
height: 768 | |
} | |
}); | |
if (casper.cli.args.length < 1) { |
<!-- Add the following lines to theme's html code right before </head> --> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js"></script> | |
<script src="http://static.tumblr.com/fpifyru/VCxlv9xwi/writecapture.js"></script> | |
<script src="http://static.tumblr.com/fpifyru/AKFlv9zdu/embedgist.js"></script> | |
<!-- | |
Usage: just add <div class="gist">[gist URL]</div> | |
Example: <div class="gist">https://gist.github.com/1395926</div> | |
--> |
check process rabbitmq-server matching "/usr/lib/erlang/erts-6.2/bin/beam" | |
group rabbitmq | |
start program = "/etc/init.d/rabbitmq-server start" | |
stop program = "/etc/init.d/rabbitmq-server stop" | |
if failed port 5672 type tcp then restart | |
if 3 restarts within 3 cycles then timeout |
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<system.web> | |
<httpRuntime enableVersionHeader="false" /> | |
</system.web> | |
<system.webServer> | |
<rewrite> | |
<rules> | |
<rule name="Rewrite API" stopProcessing="true"> | |
<match url="^api\/(.*)$" /> |