Skip to content

Instantly share code, notes, and snippets.

View donoage's full-sized avatar

Stephen Bae donoage

  • Upstart
  • New York, NY
View GitHub Profile
@donoage
donoage / common.py
Last active May 7, 2021 16:01
common.py
import datetime
import logging
import requests
import tda
import tda.orders.options
import httpx
from dotenv import dotenv_values
import validation as vp
@donoage
donoage / docker-compose.yml
Created March 3, 2020 22:23 — forked from seanhandley/docker-compose.yml
How To Set Up Docker For Mac (Mojave) with Native NFS
version: '2'
services:
api:
volumes:
- "nfsmount:${CONTAINER_DIR}"
volumes:
nfsmount:
driver: local
driver_opts:
$(document).ready(function(){
// Array to store all feed sources
var SOURCES = [
{
displayName: "Reddit",
url: "https://www.reddit.com/r/worldnews/top/.json",
proxyRequired: true,
defaultSource: true, // You can have only one default source
formatResponse: function(response) {
//we create an object called _
var _ = {
//the first property is called map it's a method that takes two arguments
//the first argument is list, the second is a call back function
map: function(list, cbFn) {
//this funciton creates a new array
var newArray = [];
//it uses a forEach loop to go through list returning the element i'm not sure what index is doing?
list.forEach(function(elem, index) {
@donoage
donoage / gist:c59c0e9cd9f1c660fe6526cb2c9f8cf6
Last active April 29, 2017 21:50 — forked from rachel-yankelevitz/gist:c049063f4f8c59fbce5fba099d795e04
Homework 3 underscore map.js description
// This is the creation of a variable called "_" which is a method
// Stephen: Not a method. variable '_' is an object.
var _ = {
// on this line the first key value is function (so a function within the variable method).
// This function will take to params: list and cbFn
// Stephen: this map() function is a property of '_' object that takes an array and a function reference as their params.
map: function(list, cbFn) {
// within the method's function, there is a new local variable, newArray, which is an empty array
// Stephen: We establish 'newArray', which is an empty array to store the result from forEach() below.
var newArray = [];
@donoage
donoage / todo.js
Last active April 24, 2017 00:30 — forked from bmacmill/todo
// curious what this is doing? https://learn.jquery.com/using-jquery-core/document-ready/
//bn notes: kind of a mess, lots of notes by myself you can ignore, couldn't get focus to work??? :/
$(document).ready(function() {
// write your code here
/*You should be working in `app.js` in `homeworks/homework-02/js`. I commented out the
predefined list items in index.html because the todolist is empty when
the page starts. You need to use those list items as a reference for
the html that's to be inserted onto the page.
*/
// Homework 1
// Hint: You may need SOME of these array iterator methods:
// .map(), .filter(), .forEach() , .some(), .every()
// Hint: You may also need SOME of the following methods:
// Number(), .reverse(), typeof(), .join()
// Let's say we have an array of prices named `prices`.
var prices = ['100', '125', '129', '37', '38', '75', '87', '94', '300', '301',
'305', '50', '0.30', '0.01', '0.5', '5', '15', '24', '35', '1041', '1', '17',
/var/www/ubersmith_root/app/www/include/uber_lock/class.uber_lock_mysql.php:59:
object(DB_Error)[42]
public 'error_message_prefix' => string '' (length=0)
public 'mode' => int 1
public 'level' => int 1024
public 'code' => int -1
public 'message' => string 'DB Error: unknown error' (length=23)
public 'userinfo' => string 'SELECT RELEASE_LOCK('ubersmith_session_gsc4m32es6kij0h8q0n21tmsgmbhs3bikrd60lndegiv7h6pqjh1') [nativecode=3057 ** Incorrect user-level lock name 'ubersmith_session_gsc4m32es6kij0h8q0n21tmsgmbhs3bikrd60lndegiv7h6pqjh1'.]' (length=219)
public 'backtrace' =>
array (size=18)
$(document).ready(function() {
//.submit() is only for <form> element.
// use .click() for .navLinks
$(".navLinks").click(function(event) {
event.preventDefault();
});
$(".post").click(function(event) {
event.preventDefault();
});
$(document).ready(function(){
console.log("page loaded");
$("a").click(function(event){
event.preventDefault();
});
$(".readmore").click(function(){
$(".readmore").hide();
$("#show-this-on-click").slideDown("slow");
$(".readless").show();