Skip to content

Instantly share code, notes, and snippets.

View Rutulpatel7077's full-sized avatar
:octocat:
Never Give up 💪

Rutul Patel Rutulpatel7077

:octocat:
Never Give up 💪
View GitHub Profile
/*
A classic stock trading pattern happens when a 9-Day Moving Average (9-DMA) crosses the 50-Day Moving Average (50-DMA).
This can be indicative of a bullish or a bearish setup, depending on the direction. When the 9-DMA crosses below the 50-DMA
from above, it is Bearish. When the 9-DMA cross above the 50-DMA from below, it is Bullish.
Write a program that reads in a series of dates and prices, calculates the 9-DMA and 50-DMA,
then returns the dates of any bullish signals that occurred.
NOTE: The Moving Average cannot be calculated for a given day if there is not enough historical data to cover
the period in question. For example, a series of prices that begin on January 1 cannot have a 9-DMA calculated
before January 9 since 9 days of historical prices do not exist until January 9. Input: A series of Date|Price
pairs in non-localized format. Dates will follow ISO 8601 format YYYY-MM-DD. Prices will be a two-decimal value
@Rutulpatel7077
Rutulpatel7077 / MacOS_Install_OpenCV.py
Created February 9, 2018 21:00 — forked from vishwanath79/MacOS_Install_OpenCV.py
Install OpenCV on Mac OS Sierra on Python 3.5
# 1. Download and install the latest Anaconda distribution from https://www.continuum.io/downloads#macos
# 2. Create a new Python environment. Make sure you choose python 3.5 as your python version for the virtual environment:
conda create -n myenv python=3.5
# 3. Activate the new environment using:
source activate myenv
@ryansimms
ryansimms / circleci-2.0-eb-deployment.md
Last active February 22, 2024 04:55
Deploying to Elastic Beanstalk via CircleCi 2.0

Deploying to Elastic Beanstalk via CircleCi 2.0

I got to here after spending hours trying to deploy to an Elastic Beanstalk instance via CircleCi 2.0 so I thought I'd write up what worked for me to hopefully help others. Shout out to RobertoSchneiders who's steps for getting it to work with CircleCi 1.0 were my starting point.

For the record, I'm not the most server-savvy of developers so there may be a better way of doing this.

Setup a user on AWS IAM to use for deployments

@dKvale
dKvale / EC2_web_server.md
Last active February 22, 2024 08:01
Quick setup for hosting a static website on Amazon EC2 server.

Github pages -> Amazon EC2 server

0) Login to the EC2 Amazon Console

https://console.aws.amazon.com/console/home

1) In the EC2's Security group section add an inbound rule to open ports 80 and 443

Type: HTTP, Protocol: TCP, Port: 80, Source: 0.0.0.0/0
Type: HTTPS, Protocol: TCP, Port: 443, Source: 0.0.0.0/0

2) Copy the Public DNS for your EC2 instance

FWIW: I (@rondy) am not the creator of the content shared here, which is an excerpt from Edmond Lau's book. I simply copied and pasted it from another location and saved it as a personal note, before it gained popularity on news.ycombinator.com. Unfortunately, I cannot recall the exact origin of the original source, nor was I able to find the author's name, so I am can't provide the appropriate credits.


Effective Engineer - Notes

What's an Effective Engineer?

@deenar
deenar / README.md
Last active February 22, 2018 19:47 — forked from mbostock/.block
Circle Packing

Enclosure diagrams use containment to represent the hierarchy. Although circle packing is not as space-efficient as a treemap, it better reveals the hierarchy. Implementation based on work by Jeff Heer. Data shows the Flare class hierarchy, also courtesy Jeff Heer.

See also this zoomable version.

@glombard
glombard / combine.py
Created November 24, 2014 00:22
Merging 4 images into one with Python and PIL/Pillow
# Combine multiple images into one.
#
# To install the Pillow module on Mac OS X:
#
# $ xcode-select --install
# $ brew install libtiff libjpeg webp little-cms2
# $ pip install Pillow
#
from __future__ import print_function
var mediaJSON = { "categories" : [ { "name" : "Movies",
"videos" : [
{ "description" : "Big Buck Bunny tells the story of a giant rabbit with a heart bigger than himself. When one sunny day three rodents rudely harass him, something snaps... and the rabbit ain't no bunny anymore! In the typical cartoon tradition he prepares the nasty rodents a comical revenge.\n\nLicensed under the Creative Commons Attribution license\nhttp://www.bigbuckbunny.org",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4" ],
"subtitle" : "By Blender Foundation",
"thumb" : "images/BigBuckBunny.jpg",
"title" : "Big Buck Bunny"
},
{ "description" : "The first Blender Open Movie from 2006",
"sources" : [ "http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/ElephantsDream.mp4" ],
@hofmannsven
hofmannsven / README.md
Last active May 3, 2024 15:30
Git CLI Cheatsheet