	¡	¡ 	) %•u�•u�	0	1 &ÿ5 Fÿu•�	8�%5 E u•�ÀÀ ò    r"""
Building the required library in this example requires a source distribution
of NumPy or clone of the NumPy git repository since distributions.c is not
included in binary distributions.

On *nix, execute in numpy/random/src/distributions

export ${PYTHON_VERSION}=3.8 # Python version
export PYTHON_INCLUDE=#path to Python's include folder, usually \
    ${PYTHON_HOME}/include/python${PYTHON_VERSION}m
export NUMPY_INCLUDE=#path to numpy's include folder, usually \
    ${PYTHON_HOME}/lib/python${PYTHON_VERSION}/site-packages/numpy/core/include
gcc -shared -o libdistributions.so -fPIC distributions.c \
    -I${NUMPY_INCLUDE} -I${PYTHON_INCLUDE}
mv libdistributions.so ../../_examples/numba/

On Windows

rem PYTHON_HOME and PYTHON_VERSION are setup dependent, this is an example
set PYTHON_HOME=c:\Anaconda
set PYTHON_VERSION=38
cl.exe /LD .\distributions.c -DDLL_EXPORT \
    -I%PYTHON_HOME%\lib\site-packages\numpy\core\include \
    -I%PYTHON_HOME%\include %PYTHON_HOME%\libs\python%PYTHON_VERSION%.lib
move distributions.dll ../../_examples/numba/
"""
import os

import numba as nb
import numpy as np
from cffi import FFI

from numpy.random import PCG64

ffi = FFI()
if os.path.exists('./distributions.dll'):
    lib = ffi.dlopen('./distributions.dll')
elif os.path.exists('./libdistributions.so'):
    lib = ffi.dlopen('./libdistributions.so')
else:
    raise RuntimeError('Required DLL/so file was not found.')

ffi.cdef("""
double random_standard_normal(void *bitgen_state);
""")
x = PCG64()
xffi = x.cffi
bit_generator = xffi.bit_generator

random_standard_normal = lib.random_standard_normal


def normals(n, bit_generator):
    out = np.empty(n)
    for i in range(n):
        out[i] = random_standard_normal(bit_generator)
    return out


normalsj = nb.jit(normals, nopython=True)

# Numba requires a memory address for void *
# Can also get address from x.ctypes.bit_generator.value
bit_generator_address = int(ffi.cast('uintptr_t', bit_generator))

norm = normalsj(1000, bit_generator_address)
print(norm[:12])
  7   ˆl–Ãa¾”*i?u8 Y¸î41hß�þYl±¬ã€Í:I]d þÅ„/ŸÄÂÁ 5ë    #!/usr/bin/perl -wT

# pg_restorecluster: restore from a pg_backupcluster backup
#
# Copyright (C) 2021 Christoph Berg <myon@debian.org>
#
#  This program is free software; you can redistribute it and/or modify
#  it under the terms of the GNU General Public License as published by
#  the Free Software Foundation; either version 2 of the License, or
#  (at your option) any later version.
#
#  This program is distributed in the hope that it will be useful,
#  but WITHOUT ANY WARRANTY; without even the implied warranty of
#  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#  GNU General Public License for more details.

use strict;
use warnings;
use Cwd 'abs_path';
use Getopt::Long;
use PgCommon;

my ($version, $cluster);

# untaint environment
$ENV{'PATH'} = '/sbin:/bin:/usr/sbin:/usr/bin';
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
umask 022;

sub help () {
    print "Syntax: $0 [options] <version> <cluster> <backup>
Options:
  -d --datadir DIR  Data directory for restored cluster (default per createcluster.conf)
  -p --port PORT    Use port PORT for restored cluster (default is next free port)
  -s --start        Start cluster after restoring (default for restore from dump)
     --archive      Configure recovery from WAL archive
     --pitr TIMEST  Configure point-in-time recovery to TIMESTAMP from WAL archive
     --wal-archive DIR  Read WAL from archive DIR (default <backup>/../wal)
";
}

my $createclusterconf = "$PgCommon::common_confdir/createcluster.conf";
my ($datadir, $port, $start, $recovery_target_time, $archive_recovery, $wal_archive);

exit 1 unless GetOptions (
    'd|datadir=s' => \$datadir,
    'p|port=s' => \$port,
    's|start' => \$start,
    'archive' => \$archive_recovery,
    'pitr=s' => \$recovery_target_time,
    'recovery-target-time=s' => \$recovery_target_time,
    'wal-archive=s' => \$wal_archive,
    'createclusterconf=s' => \