This file contains 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 networkx as nx | |
from pyparsing import * | |
import matplotlib.pyplot as plt | |
from pathlib import Path | |
from pprint import pprint | |
import sys | |
import re | |
if len(sys.argv) != 2: |
This file contains 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
uuid = SecureRandom.uuid | |
newline = "\r\n" | |
boundary = "----------#{Time.now.nsec}" | |
folder_id = 654664 | |
file_path = Rails.root.join("sample.pdf") | |
file = File.read(file_path) | |
uri_str = "https://www4.idealsvdr.com/v3/api/File/UploadFile?contentLength=#{file.size}&fileName=#{file_path.basename.to_s}&folderId=#{folder_id}&resumeSize=0&uid=#{uuid}" | |
uri = URI.parse(uri_str) |
This file contains 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 BaseModels < ActiveRecord::Migration[5.1] | |
def change | |
create_table :districts, id: :uuid do |t| | |
t.string :name | |
t.timestamps | |
end | |
create_table :schools, id: :uuid do |t| | |
t.references :district, foreign_key: true, type: :uuid | |
t.string :name |
This file contains 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
require "rails_helper" | |
feature "user registration", js: true do | |
let(:registration_page) { Pages::User::RegistrationPage.new } | |
scenario "customer signs in with email and password" do | |
sign_up_with "aponcz@example.com", | |
"password", | |
"password" |
This file contains 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
module API | |
module V1 | |
class InvalidRequestError < StandardError; end | |
class UnprocessableEntityError < StandardError; end | |
class Unauthorized < StandardError; end | |
class APIController < ApplicationController | |
respond_to :json | |
rescue_from StandardError, with: :render_server_error unless Rails.env.development? or Rails.env.test? |
This file contains 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
create_table :policy_owners do |t| | |
t.integer :user_id | |
t.integer :policy_id | |
t.timestamps | |
end | |
create_table :policies do |t| | |
t.integer :policy_owner_id | |
t.string :number | |
t.integer :policy_type_id |
This file contains 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
multipleContactsAvailable: (-> | |
@get('content.project.client.contacts.length') > 1 | |
).property('content.project.client.contacts') | |
contacts: (-> | |
@get('content.project.client.contacts') | |
).property('content.project.client.contacts') | |
content is a budget and this code never returns the contacts. Thoughts? |
This file contains 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
module API | |
module V1 | |
class InvalidRequestError < StandardError; end | |
class UnprocessableEntityError < StandardError; end | |
class Unauthorized < StandardError; end | |
class APIController < ApplicationController | |
respond_to :json | |
rescue_from StandardError, with: :render_server_error unless Rails.env.development? or Rails.env.test? |