Complete as fast as possible, rest as needed.
- 50 Jumping Jacks
- 25 Wall sit military press
- 40 Crunches
- 20
ECleg crossover (flat on back, then cross over one leg)
| from wms_api_client.client import Client | |
| # could also be set as environment variables | |
| config = dict( | |
| WMS_REST_BASE_URL="https://secure-wms.com", | |
| WMS_REST_CLIENT_ID="<...your client id...>", | |
| WMS_REST_SECRET="<...your secret...>" | |
| ) | |
| client = Client.from_login(user_login="1", tpl="BITeam", config=config) |
| """ An example of appending blocks to a help message. """ | |
| import argparse | |
| import sys | |
| TEXT_TO_APPEND = """ | |
| examples: | |
| This is how you do things |
| @pytest.fixture | |
| def quietcaplog(caplog): | |
| """ Capture logging while suppressing output to stderr and stdout. | |
| quietcaplog IS a caplog fixture (so anything you can do with the caplog | |
| fixture you can do with it). BUT it also removes any StreamHandler | |
| loggers from the root logger before the test and replaces them on the root | |
| logger after the test is over. That means your tests are quiet, but you | |
| can also inspect the log messages being produced if needed. |
| import subprocess | |
| class SaveIndixDataError(Exception): | |
| """ There was some error with saving indix data to the database. """ | |
| pass | |
| class SaveIndixDataMismatchError(SaveIndixDataError): | |
| """ Number of submitted records did not match number processed. """ | |
| pass |
| #!/usr/bin/env ruby | |
| # for working with Doba_Product descriptions | |
| require 'redcarpet' | |
| if ARGV.size == 0 | |
| puts "usage: #{File.basename(__FILE__)} <file>.txt ..." | |
| puts "output: text and html, ready for sql upload" | |
| puts "" | |
| puts "notes:" |
| # Very simple tk application to save progress on Microprose's Risk II game | |
| # (written many years ago) | |
| # | |
| # Create a bat file to run, like this: | |
| # ----save_risk.bat---- | |
| # c:\cygwin\bin\rubyw /home/john/risk2_saver.rb c:/Users/john/Desktop/RISK_SAVES | |
| require 'Win32API' | |
| require 'fileutils' | |
| require 'tk' |
| import scipy.stats as sts | |
| from math import log | |
| def fisher_combine_p_values(pvalues): | |
| degrees_freedom = 2*len(pvalues) | |
| summed = sum(-2*log(pval) for pval in pvalues) | |
| return 1.0 - sts.chi2.cdf(summed, degrees_freedom) | |
| #print(fisher_combine_p_values( [0.05, 0.05] )) |
| # for syslinux, you want something like this: | |
| APPEND root=/dev/sda2 rw vga=current quiet loglevel=0 | |
| # OR | |
| APPEND root=/dev/sda2 rw vga=865 quiet loglevel=0 | |
| # edit the files systemd-fsck-root.service and [email protected] located at /usr/lib/systemd/system/ to configure StandardOutput and StandardError like this: | |
| (...) | |
| [Service] | |
| Type=oneshot |
| import os | |
| _python_source_files = list( | |
| filter( | |
| lambda basename: basename.endswith(".py") and | |
| not basename.startswith('_'), | |
| os.listdir( os.path.dirname(os.path.realpath(__file__)) ) | |
| ) | |
| ) |