This file contains hidden or 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
| # %% [markdown] | |
| # Drone Ops raw data from PostgreSQL to watsonx.data | |
| # | |
| # Uses Databand. Code uses Databand Python SDK to decorate with Databand tracking. | |
| # | |
| # See https://www.ibm.com/docs/en/dobd?topic=python-tracking-functions. | |
| # | |
| # See also Databand docs https://www.ibm.com/docs/en/dobd?topic=integrations-code-based-workflows. | |
| # %% |
This file contains hidden or 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
| import os, time, threading, random, sys | |
| from datetime import datetime | |
| from astrapy import DataAPIClient | |
| TOKEN = os.getenv("ASTRA_TOKEN") | |
| ENDPOINT = os.getenv("ASTRA_API_ENDPOINT") # e.g. https://<id>-<region>.apps.astra.datastax.com | |
| KEYSPACE = os.getenv("ASTRA_KEYSPACE", "default_keyspace") | |
| COLL_NAME = os.getenv("ASTRA_COLLECTION", "test_messages") | |
| MPS = int(os.getenv("MESSAGES_PER_SECOND", "1")) |
This file contains hidden or 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
| import sys | |
| def generate_username(formatStr,capitalize=True): | |
| """Generate random user name. formatStr is like CVC-CVC which generates username with consonant-vowel-consonant-consonant-vowel-consonant.abs | |
| C=consonant | |
| V=vowel | |
| N=number | |
| +=space | |
| """ |
This file contains hidden or 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/env bash | |
| #uses clpargs | |
| #https://github.com/samisalkosuo/clpargs | |
| source $GITDIR/clpargs/clpargs.bash | |
| clpargs_program_description "Create iOS app icons from original 1024x1024 icon." | |
| #iOS icon sizes | |
| #https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html |
This file contains hidden or 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/env bash | |
| if [[ "$1" != "" ]] ; then | |
| cd $1 | |
| fi | |
| ls -1 | sed "s;^;$(pwd)/;" |
This file contains hidden or 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/env python | |
| #Some mazes classes translated from Ruby | |
| #from book "Mazes for Programmers" by Jamis Buck. | |
| #https://pragprog.com/book/jbmaze/mazes-for-programmers | |
| # | |
| #Includes modifications. | |
| # | |
| #Execute this and you see mazes. |
This file contains hidden or 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
| echo Deploying i2 IAP 3.0.11 example deployment | |
| function changeString { | |
| if [[ $# -ne 3 ]]; then | |
| echo "$FUNCNAME ERROR: Wrong number of arguments. Requires FILE FROMSTRING TOSTRING." | |
| return 1 | |
| fi | |
| SED_FILE=$1 | |
| FROMSTRING=$2 |
This file contains hidden or 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/python | |
| #retrieve random Astronomy Picture of the Day | |
| #from http://apod.nasa.gov/ | |
| import sys | |
| import datetime | |
| import urllib | |
| import urllib2 | |
| import random |
This file contains hidden or 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
| #!/bin/sh | |
| bc << EOF | |
| scale=4 | |
| $@ | |
| quit | |
| EOF |
This file contains hidden or 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
| #!/bin/sh | |
| echo "Retrieving all 49 issues of PragPub as epub..." | |
| echo "Downloading files to $DIR..." | |
| DIR=pragpub | |
| mkdir $DIR | |
| function getPragPub { |
NewerOlder