Skip to content

Instantly share code, notes, and snippets.

View sacko87's full-sized avatar

John T. Saxon sacko87

View GitHub Profile
@sacko87
sacko87 / allocate.f95
Last active August 16, 2017 13:45
Consolidating my fortran knowledge into to one easily manageable Gist.
program allocate
implicit none
! an allocatable array of integers
integer, allocatable :: numbers(:)
! some variables
integer :: n, err, i = 0
do
! how many elements?
n = howmany()
package main
import (
"log"
"sync"
)
type Job struct {
source int
}
@sacko87
sacko87 / wrapper.py
Last active February 3, 2019 13:55
A logger that works between multiprocessing Processes.
import logging
import os
import signal
from logging.handlers import QueueHandler, RotatingFileHandler, QueueListener
from multiprocessing import Manager
DEBUG = os.environ.get("DEBUG", False)