Skip to content

Instantly share code, notes, and snippets.

View johndpope's full-sized avatar

John D. Pope johndpope

View GitHub Profile
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/home/oem/miniconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
eval "$__conda_setup"
else
if [ -f "/home/oem/miniconda3/etc/profile.d/conda.sh" ]; then
. "/home/oem/miniconda3/etc/profile.d/conda.sh"
else
export PATH="/home/oem/miniconda3/bin:$PATH"
onverting the provided Ruby on Rails code to PostgreSQL stored procedure is not a straightforward process, and it will require a significant amount of effort to re-implement the same functionality in PostgreSQL.
Here are the general steps you can follow:
Identify the data models and relationships: You need to identify the data models and relationships used in the Rails code and translate them into PostgreSQL data structures, including tables, columns, indexes, and constraints.
Define the stored procedure parameters: You need to define the stored procedure parameters based on the input parameters used in the Rails code.
Implement the main logic: You need to implement the main logic of the Rails code in the stored procedure. This will include querying the relevant tables, filtering the data based on the input parameters, and returning the result.
@johndpope
johndpope / JPMixer.swift
Last active September 14, 2022 16:21
SongProcessor AudioKit - hack to play multiple files at once
//
// Mixer.swift
// SongProcessor
//
// Created by Pope, John on 8/10/17.
// Copyright © 2017 AudioKit. All rights reserved.
//
import Foundation
import AudioKit
@johndpope
johndpope / supabase_api_auth.sql
Created August 18, 2022 00:28 — forked from FelixZY/supabase_api_auth.sql
How to configure Supabase (https://supabase.com/) to generate and accept API tokens.
-- Token Based API Access for Supabase
--
-- How to configure Supabase (https://supabase.com/) to generate and accept API tokens.
--
-- (c) 2022 Felix Zedén Yverås
-- Provided under the MIT license (https://spdx.org/licenses/MIT.html)
--
-- Disclaimer: This file is formatted using pg_format. I'm not happy with the result but
-- prefer to follow a tool over going by personal taste.
--
@johndpope
johndpope / AWSS3RequestSigner
Created July 2, 2019 07:09 — forked from elmyn/AWSS3RequestSigner
Signing AWS GET S3 requests with signature version 4 in Swift 4, Xcode 10
// This is free and unencumbered software released into the public domain.
// Anyone is free to copy, modify, publish, use, compile, sell, or
// distribute this software, either in source code form or as a compiled
// binary, for any purpose, commercial or non-commercial, and by any
// means.
// For more information, please refer to <https://unlicense.org>
//
// AWSS3RequestSigner.swift
// SampleRESTApi
//
@johndpope
johndpope / APDynamicHeaderTableViewController.swift
Last active June 17, 2022 12:55
UICollectionView + Snapkit + APDynamicHeaderTableViewController mash up // no autolayout constraint code.
import Foundation
import UIKit
import Dotzu
import SnapKit
class APDynamicHeaderTableViewController : UIViewController {
var largeWideSize = CGSize(width: UIScreen.main.bounds.width , height: 285 )
let headerView = APDynamicHeaderView ()
@johndpope
johndpope / GeoHashExampleViewController.m
Last active March 18, 2022 19:07
objc-geohash - list of geohashes by area - https://github.com/lyokato/objc-geohash
//
// GeoHashExampleViewController.m
// GeoHashExample
//
// Created by KATO Lyo on 11/12/28.
// Copyright 2011 KATO Lyo. All rights reserved.
//
#import "GeoHashExampleViewController.h"
#import "GeoHash.h"
@johndpope
johndpope / Dockerfile
Last active March 4, 2022 20:45
magenta - updated dockerfile
# https://github.com/tensorflow/magenta/blob/master/magenta/tools/docker/Dockerfile
FROM tensorflow/tensorflow
WORKDIR /
RUN apt-get update && apt-get install -y \
build-essential \
curl \
git \
libfreetype6-dev \
libpng12-dev \
@johndpope
johndpope / Dockerfile
Created September 28, 2017 15:27 — forked from ultimateprogramer/Dockerfile
Dockerfile to install supervisor over Ubuntu Image
FROM ubuntu:latest
MAINTAINER Ahmed Maawy
# Run updates
RUN apt-get update --fix-missing && apt-get install -y
# Install Curl
RUN apt-get install curl -y
# Install supervisor
@johndpope
johndpope / zooming-vqgan-clip-z-quantize-method-with-additions.ipynb
Created July 31, 2021 04:09 — forked from chigozienri/notebook.ipynb
Zooming VQGAN+CLIP (z+quantize method with additions).ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.