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
# Pseudo code for doing a big zuora export | |
# Pull all_account_ids from a CSV export, or potentially from ActiveZuora::Account. Only issue with the latter | |
# is that it might timeout if you have too many accounts. | |
all_account_ids.each do |account_id| | |
list_of_all_soap_objects.each do |soap_object| | |
# A soap_object would be something like Invoice, Payment, CreditBalanceAdjustment, etc. | |
active_zuora_klass = "ActiveZuora::#{soap_object}".constantize | |
active_zuora_klass.where(account_id: account_id).find_each do |zuora_object| | |
# This is just a placeholder. I'm not sure what database you'd use to actually store things. |
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
# 1 | |
# Method name history was... | |
# nil (did both things in one method) --> generate_csv_for_revenue_lines | |
def generate_csv_for_revenue_lines(revenue_lines) | |
# name history... | |
# res -> pg_result | |
pg_result = execute_sql("SELECT * FROM recognized_revenue WHERE" + | |
+ " revenue_line_id IN (?)", revenue_lines.pluck(:id).join(",") | |
) | |
pg_result.values |
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
class Forest::MembershipPatient | |
include ForestLiana::Collection | |
collection :membership_patients | |
field :name, type: 'String' do |object| | |
::MembershipPatient.unscoped.find(object.id).name | |
end | |
end |
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
/* | |
// Option 1: Procedures with visit_id | |
// Standard CRUD actions to /api/provider/procedures | |
// GET /api/provider/procedures | |
// POST /api/provider/procedures | |
// GET /api/provider/procedures/:id | |
// PATCH /api/provider/procedures/:id | |
// DELETE /api/provider/procedures/:id |
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
/* | |
// Option 2: Visits | |
// Standard CRUD actions to /api/provider/visits | |
// GET /api/provider/visits | |
// POST /api/provider/visits | |
// GET /api/provider/visits/:id | |
// PATCH /api/provider/visits/:id | |
// DELETE /api/provider/visits/:id |
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
FROM quay.io/aptible/java:oracle-java8 | |
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle | |
RUN apt-get update && apt-get -y install libc6-dev unzip curl | |
RUN groupadd looker && useradd -m -g looker -s /bin/bash looker | |
ENV SUPERCRONIC_URL=https://github.com/aptible/supercronic/releases/download/v0.1.5/supercronic-linux-amd64 \ | |
SUPERCRONIC=supercronic-linux-amd64 \ | |
SUPERCRONIC_SHA1SUM=9aeb41e00cc7b71d30d33c57a2333f2c2581a201 |
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 pandas as pd | |
from sklearn.linear_model import LogisticRegression | |
from sklearn.metrics import confusion_matrix | |
from sklearn.model_selection import train_test_split | |
def load_data(path): | |
# Load the data into a Pandas dataframe. | |
raw_data = pd.read_csv(path, header=0) | |
print('Loaded data from', path) | |
return raw_data |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 "./ICreditLineFactory.sol"; | |
contract CreditDesk { | |
address public creditLineFactoryAddress; | |
function createCreditLine(CreditLineParams params) public { | |
require(validParams(params), "invalid params!"); | |
ICreditLineFactory(creditLineFactoryAddress).createCreditLine(params); | |
} |
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 "./ICreditLineFactory.sol"; | |
contract CreditDesk { | |
address public creditLineFactoryAddress; | |
uint256 public maxCreditLineAmount; | |
address public protocolOwner; | |
function createCreditLine(CreditLineParams params) public onlyOwner { | |
require(validParams(params), "invalid params!"); | |
require(params.amount <= maxCreditLineAmount, "Amount is above maximum"); |