Posts

Showing posts from January, 2019

machine learning Experiment Psuedocode only

This is all psuedocode Disclaimer: None of the code has been run, tested or even typed into a code editor.  This post is to hold the experiment idea, for future use. Machine Learning Experiment (1-27-19) The idea is to try this out, so I can see how machine learning works more. I understand there is a lot of data reconciliation and probability involved. The libraries currently used in python are advanced and extremely well built I am sure, but I need to see the interaction, see what's happening and how. This may be completely wrong, but once again.... Why not? After completing the initial post, I have the suspicion that I am in way over my head. It's way past my bedtime, I gotta sleep.  So not just a grain of salt with this one, bring a whole bucket. 1:  SQLite does not support holding a list      solution, either use an INTEGER and increment                ...

local vs global python

I revisited this concept after reading through some forum posts. I wanted to add something to it, but decided to write up some code for visual people like me.  It's so much easier to see it in action, then have someone explain it to me. So here is some code, try it out, see how the local and global stuff reacts. Hope to have some more bigger projects soon! ####### local_global.py   ########## a_list = [] b = [] adictionary = {} astring = "hello world" an_integer = 8 a_boolean = True def print_globals():     global astring     global an_integer     global a_boolean     print("=" * 10)     print('b = ', b)     print('a_list =', a_list)     print('adictionary = ', adictionary)     print('astring = ', astring)     print('an_integer = ', an_integer)     print('a_boolean = ', a_boolean)     print("=" * 10...

Django, {{ }}, interpolation bindings, double curly brackets, session, dynamic changes

Image
Disclaimer, I am really new at this still, so if I have somehow blasphemed the use of Django sessions, I am sorry.  Feel free to leave a comment!  I'd love it honestly.  Django's page on sessions: https://docs.djangoproject.com/en/2.1/topics/http/sessions/ *If you just want the links to the full code that accomplishes this. *  scroll to bottom *Honest if you just want the code, it's cool. Originally I wanted this to work with JavaScript: <!-- <script> function remove_bg(){    document.getElementById("wiwa_bg").style.backgroundImage = "none";    document.getElementById("wiwa_bg").style.backgroundColor = "white"; }; function add_bg(){    document.getElementById("wiwa_bg").style.backgroundImage = "url('/static/images/unicorn4_12-22-18.png')"; } document.getElementById("rm_button").addEventListener("click", remove_bg); document.getElementById("add_image_button")...