This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# The following is a snippit from the unit test for adodbapi. | |
# | |
# this code is for Microsoft SQL server -- I tried writing stored procedurs for MySQL and PostgreSQL, but failed. | |
# | |
# Please reply to me by sending me some actually valid stored procedurse for those engines. | |
# | |
# Thanks! | |
# | |
# {Yes, I know bare "assert" statements are old hat. The code has worked like that since 2002. I did not write it. Feel free to edit.} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" Really exercise the Decimal Math processor. | |
Calculates two weird identities of the irrational number Phi using an insane number of digits. | |
Phi**2 + Phi**-2 == 3 | |
8 * Phi**2 - Phi**6 == 3 | |
""" | |
from __future__ import print_function | |
digits = ("1.61803398874989484820458683436563811772030917980576286213544862270526046281890" | |
"244970720720418939113748475408807538689175212663386222353693179318006076672635" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python3 | |
# this migration will call itself as a command-line program. | |
from __future__ import unicode_literals, print_function | |
import datetime, subprocess, psycopg2, sys, time | |
from django.db import migrations | |
from django.conf import settings | |
CHUNK_SIZE = 1000 | |
def call_yourself(apps, schema_editor): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# salt state file for restarting a minion under its own control | |
{% set delay = salt['config.get']('minion_restart_in_seconds', 5) %} | |
restart-the-minion: | |
file.managed: | |
- name: /tmp/run_command_later.py | |
- source: salt://run_command_later.py | |
- mode: 775 |