Skip to content

merging a couple PRs#34

Closed
c0sc0 wants to merge 35 commits intoSamPom100:masterfrom
c0sc0:pr/1
Closed

merging a couple PRs#34
c0sc0 wants to merge 35 commits intoSamPom100:masterfrom
c0sc0:pr/1

Conversation

@c0sc0
Copy link
Contributor

@c0sc0 c0sc0 commented Aug 1, 2020

merges #32 and #33

  • flask_freezer to generate static page
  • flask_server to run it yourself (dynamic stuff coming later)
  • trying out the 6 month window
  • webpage redesign & sortable/searchable table

NihilistPenguin and others added 28 commits July 31, 2020 01:51
Change time output to minutes instead of seconds
Add ability to print all results together an the end
Output anomalous tickers to a results.txt file
opens anomalous tickers in Robinhood in a new browser window
Creates graphs for all tickers in results.txt 
Allows option for single ticker or tickers of your choice
Example results.txt file
change line numbers for controlling the script
Add/update descriptions grapher.py and openRobinhood.py
Fix formatting error
Provides option to save graphs to the figures directory or to print them to screen
Create figures dir if it doesn't exist
remove previous addition of printing anomalous results together at the end
This removes the unused finding function, and replaces it with the
normal algorithm. Then, all the indexing through the Pandas Dataframes
are refactored in preference for the faster Pandas calls.
Remove additional /r in README
flask_freezer to generate the static page

flask_server to host it yourself (dynamic stuff coming later)

6 month window
@c0sc0 c0sc0 mentioned this pull request Aug 1, 2020
Copy link

@elizabethshirley elizabethshirley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's be mindful to keep the code-base as clean as possible. Most people coming here likely don't know what to do with comments, when a command line argument would suffice.

Also, don't PR *.pyc files
https://coderwall.com/p/wrxwog/why-not-to-commit-pyc-files-into-git-and-how-to-fix-if-you-already-did

@SamPom100
Copy link
Owner

thanks for all of this. I didn't see your PRs until I was done using freezer to make a static web page.

here it is: https://sampom100.github.io/UnusualVolumeDetector/

elizabethshirley and others added 5 commits August 1, 2020 10:52
template.html for generating static page with website_generator

dynamic.html for serving yourself with flask_server

refactored globals to class variables in market_scanner

print all results at end when running market_scanner

line 34 fixes the off-by-1 bug (if it exists, will test it on Monday).
Copy link

@elizabethshirley elizabethshirley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to my other comments, you likely want to add Git LFS for all the graphics files, and move them there. Whenever you slightly tweak a graphic, the entire graphic is stored on Git, which slows down pulling as the project wears on.

###########################

# Change variables to your liking then run the script
MONTH_CUTTOFF = 6

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of running around with Globals, we probably want to have a class called config or something. On startup, it's populated with the default values seen here, unless there are arguments

https://www.tutorialspoint.com/python/python_command_line_arguments.htm

This allows you to have one script running with the defaults and the other running with some other behavior entirely, without needing two copies of the repo.

stocklist.py Outdated
# this is used to get all tickers from the market.


exportList = []

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There was a pull request which put the export list in a class and made it a return of the script. I think that's a very good idea, because like my other comment, allows for greater flexibility.


app = flask.Flask(__name__, static_url_path='')
app.config["DEBUG"] = False
app.config['SECRET_KEY'] = 'deditaded wam'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's got to be some way to not have your secrets in plain text on a public repository

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

haha yeah, I pretty much completely ripped the flask script from another project and noticed this

maybe i should add more deditated wam to the server

try to pull secret key from env var

added default parameters,  now these are set when you instantiate the object

made exportList a class variable
Copy link

@elizabethshirley elizabethshirley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

geil!

@c0sc0
Copy link
Contributor Author

c0sc0 commented Aug 2, 2020

continued in #40

@c0sc0 c0sc0 marked this pull request as draft August 2, 2020 15:30
@c0sc0 c0sc0 closed this Aug 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants