Return to Level1Techs.com

Post your coding projects

programming

#41


(moar bumpage ino...)

just a simple script i made, to open up a tmpfs, create a file with dd, then compres it using 1>16threads sequentially(deleting the compressed file inbetween each time) then clean up the tmpfs and unmount it

was just an idea to look at thread scaling/scheduling at this current state with ryzen with that linux kernel

had first did one with a 1gb file(instead of 4 in this version) but it hit an upperlimit faster where it was wasting much of the time finalizing the file then actually compressing to see the difference between the higher thread counts where this one went pretty good(cept 9/10 thread anomaly but was probably a background thing popped up in that case)

still think would be even better if did an 8 or 16gb version but, only have 16gb of ram to play with currently lol


#42

A bot that collects information from the forum (users, posts, interests, word choice, pictures) and then cross references them with other forums and platforms to generate a psychological profile that can help determine the user's age, region, race, and in many cases an accurate identity profile. I have no idea what I want to do with any of this information, but I figured, "why not?" Oh, and using fake info for things is actually flagged as more suspicious which calls a more aggressive referencing pattern. It makes it easier to narrow down as well.


#43

After the palindrome debate last week I decide to do a 20 minute code challenge to find all the palindromes in Ubunut 14.04's "words" file.

#!/usr/bin/python

import os

filefolder = '/usr/share/dict'
theFile = os.path.join(filefolder, 'words')
f = open(theFile)

for line in f:
    permitWords=["A","a","I"]
    forward = line.strip()
    reverse = forward[::-1]
    if forward in permitWords:
            print forward
    if len( forward ) > 1:
            if forward == reverse:
                    print forward 
f.close()

#44

I made a command line app for viewing excel and csv files.

My use case for this is that I need to keep open requirements specifications while I work on code. This way I can keep the file open right beside my text editor from tmux. I wanted something that doesn't line wrap like some of the other command line csv viewers (such as sc) so I implemented it myself.


#45

dem bumps XD lol

worked a bit more on the weather system for my text game engine thing

below is long thing of bunch of hours worth of the ingame weather stuff, part of which during the really rainy month/'moonsoon season'

but added stuff to smooth out transients as it calculates weather new each day at midnight(for the daily max temp, if it rains or not that day), as there can be a possible 30f+ temperature swing(is +/-15 the months average temp) that if it had gone from -15 to +15 on the first day of a month where the average temp goes up from the previous month) by checking if the change is over 3 degrees to override to 3,

where the normal calculations are that it hits peak temp at 3pm, and at 3am is minimum temp which is temp-(temp/5) and goes up/down gradually over the 12hrs normally only shifting at max of bit under 2f per hour,(being max possible temp is 110 goes up about 1/60th every hour from the min to max temp for the day
so at max usually under 1.8333 degrees with c rounding down but its cumulative, so if 1 one hour the next usually 2 etc)

and over rides the temp to the minimum during the time its raining/storming whatever, which also gets smoothed out by the same 3 degree transient suppression logic. so it doesnt hit the daily max temp if its raining during the hour or the temperature swing is too high, but this isnt a weather simulator so im fine with that :p.

so the purpose for the weather stuff, is for 'realism'/atmosphere i guess. realism in that working on adding health issues and stuff(as you can probably tell by the myriad of things already added) to the effect that.. if you're character is a 325lb 55yr old male with high blood pressure, that has issues with stress all the time, running around with a rock the size of your head trying to smash crabs, while severely dehydrated and, not having eaten in a couple days, at high noon in direct sunlight at 107f, your chance of a heatstroke, a heart attack or something like that probably like.. 85%

that while its hotter and dryer you'll get dehydrated faster, if it rains and you just keep wearing shoes or boots and never take them off you can get foot issues, rain can put out your fire etc

but then the scenario for the first thing being made with it is a survival on a island thing

part1

date = 110, gen = female, age = 58, weight = 223#
bloodsugar = 50%, pee = 41%, poop = 64%, starvation = 22%, dehydration = 14%
stress = 41%, morale = 66%, rain = 50%, rt = 0, avg temp = 80f, dtemp = 86f

hour= 15, ctemp = 86f
hour= 16, ctemp = 83f
hour= 17, ctemp = 81f
hour= 18, ctemp = 79f
hour= 19, ctemp = 78f
hour= 20, ctemp = 77f
hour= 21, ctemp = 76f
hour= 22, ctemp = 76f
hour= 23, ctemp = 74f

date = 111, rain = 50%, rt = 2, average temp = 80f, dtemp = 80f

hour= 0, ctemp = 71f
hour= 1, ctemp = 68f
hour= 2, ctemp = 65f
hour= 3, ctemp = 64f, its overcast
hour= 4, ctemp = 65f, its overcast
hour= 5, ctemp = 64f, its raining
hour= 6, ctemp = 64f, its raining
hour= 7, ctemp = 64f, its raining
hour= 8, ctemp = 64f, its raining
hour= 9, ctemp = 64f, its raining
hour= 10, ctemp = 64f, its raining
hour= 11, ctemp = 64f, its raining
hour= 12, ctemp = 64f, its raining
hour= 13, ctemp = 64f, its raining
hour= 14, ctemp = 64f, its raining
hour= 15, ctemp = 64f, its raining
hour= 16, ctemp = 64f, its raining
hour= 17, ctemp = 67f, its overcast
hour= 18, ctemp = 70f, its overcast
hour= 19, ctemp = 72f, its overcast
hour= 20, ctemp = 72f, its overcast
hour= 21, ctemp = 71f, its overcast
hour= 22, ctemp = 70f, its overcast
hour= 23, ctemp = 69f, its overcast

date = 112, rain = 50%, rt = 4, average temp = 80f, dtemp = 86f

hour= 0, ctemp = 72f, its overcast
hour= 1, ctemp = 69f, its heavily storming
hour= 2, ctemp = 69f, its heavily storming
hour= 3, ctemp = 69f, its heavily storming
hour= 4, ctemp = 69f, its heavily storming
hour= 5, ctemp = 69f, its heavily storming
hour= 6, ctemp = 69f, its heavily storming
hour= 7, ctemp = 69f, its heavily storming
hour= 8, ctemp = 69f, its heavily storming
hour= 9, ctemp = 69f, its heavily storming
hour= 10, ctemp = 69f, its heavily storming
hour= 11, ctemp = 69f, its heavily storming
hour= 12, ctemp = 69f, its heavily storming
hour= 13, ctemp = 69f, its heavily storming
hour= 14, ctemp = 69f, its heavily storming
hour= 15, ctemp = 69f, its heavily storming
hour= 16, ctemp = 69f, its heavily storming
hour= 17, ctemp = 69f, its heavily storming
hour= 18, ctemp = 69f, its heavily storming
hour= 19, ctemp = 72f, its overcast
hour= 20, ctemp = 75f, its overcast
hour= 21, ctemp = 76f, its overcast
hour= 22, ctemp = 76f, its overcast
hour= 23, ctemp = 74f

date = 113, rain = 50%, rt = 3, average temp = 80f, dtemp = 68f

hour= 0, ctemp = 71f
hour= 1, ctemp = 68f
hour= 2, ctemp = 65f
hour= 3, ctemp = 62f, its overcast
hour= 4, ctemp = 59f, its overcast
hour= 5, ctemp = 57f, its overcast
hour= 6, ctemp = 58f, its overcast
hour= 7, ctemp = 59f, its overcast
hour= 8, ctemp = 56f, its lightly storming
hour= 9, ctemp = 55f, its lightly storming
hour= 10, ctemp = 55f, its lightly storming
hour= 11, ctemp = 55f, its lightly storming
hour= 12, ctemp = 55f, its lightly storming
hour= 13, ctemp = 55f, its lightly storming
hour= 14, ctemp = 55f, its lightly storming
hour= 15, ctemp = 55f, its lightly storming
hour= 16, ctemp = 55f, its lightly storming
hour= 17, ctemp = 58f, its overcast
hour= 18, ctemp = 61f, its overcast
hour= 19, ctemp = 62f, its overcast
hour= 20, ctemp = 61f
hour= 21, ctemp = 61f
hour= 22, ctemp = 60f
hour= 23, ctemp = 59f

date = 114, rain = 50%, rt = 2, average temp = 80f, dtemp = 85f

hour= 0, ctemp = 62f, its raining
hour= 1, ctemp = 65f, its raining
hour= 2, ctemp = 68f, its raining
hour= 3, ctemp = 68f, its raining
hour= 4, ctemp = 68f, its raining
hour= 5, ctemp = 68f, its raining
hour= 6, ctemp = 68f, its raining
hour= 7, ctemp = 68f, its raining
hour= 8, ctemp = 68f, its raining
hour= 9, ctemp = 68f, its raining
hour= 10, ctemp = 68f, its raining
hour= 11, ctemp = 68f, its raining
hour= 12, ctemp = 68f, its raining
hour= 13, ctemp = 68f, its raining
hour= 14, ctemp = 68f, its raining
hour= 15, ctemp = 68f, its raining
hour= 16, ctemp = 68f, its raining
hour= 17, ctemp = 68f, its raining
hour= 18, ctemp = 68f, its raining
hour= 19, ctemp = 68f, its raining
hour= 20, ctemp = 68f, its raining
hour= 21, ctemp = 68f, its raining
hour= 22, ctemp = 68f, its raining
hour= 23, ctemp = 71f, its overcast

part2

date = 116, rain = 50%, rt = 0, average temp = 80f, dtemp = 73f

hour= 0, ctemp = 65f
hour= 1, ctemp = 62f
hour= 2, ctemp = 60f
hour= 3, ctemp = 59f
hour= 4, ctemp = 60f
hour= 5, ctemp = 61f
hour= 6, ctemp = 62f
hour= 7, ctemp = 63f
hour= 8, ctemp = 65f
hour= 9, ctemp = 65f
hour= 10, ctemp = 66f
hour= 11, ctemp = 67f
hour= 12, ctemp = 68f
hour= 13, ctemp = 69f
hour= 14, ctemp = 71f
hour= 15, ctemp = 73f
hour= 16, ctemp = 71f
hour= 17, ctemp = 69f
hour= 18, ctemp = 68f
hour= 19, ctemp = 67f
hour= 20, ctemp = 66f
hour= 21, ctemp = 65f
hour= 22, ctemp = 65f
hour= 23, ctemp = 63f

date = 117, rain = 50%, rt = 0, average temp = 80f, dtemp = 65f

hour= 0, ctemp = 60f
hour= 1, ctemp = 57f
hour= 2, ctemp = 54f
hour= 3, ctemp = 52f
hour= 4, ctemp = 53f
hour= 5, ctemp = 54f
hour= 6, ctemp = 55f
hour= 7, ctemp = 56f
hour= 8, ctemp = 57f
hour= 9, ctemp = 57f
hour= 10, ctemp = 58f
hour= 11, ctemp = 59f
hour= 12, ctemp = 60f
hour= 13, ctemp = 61f
hour= 14, ctemp = 62f
hour= 15, ctemp = 65f
hour= 16, ctemp = 62f
hour= 17, ctemp = 61f
hour= 18, ctemp = 60f
hour= 19, ctemp = 59f
hour= 20, ctemp = 58f
hour= 21, ctemp = 57f
hour= 22, ctemp = 57f
hour= 23, ctemp = 56f

date = 118, rain = 50%, rt = 3, average temp = 80f, dtemp = 72f

hour= 0, ctemp = 59f
hour= 1, ctemp = 60f, its overcast
hour= 2, ctemp = 59f, its overcast
hour= 3, ctemp = 58f, its overcast
hour= 4, ctemp = 59f, its overcast
hour= 5, ctemp = 60f, its overcast
hour= 6, ctemp = 61f, its overcast
hour= 7, ctemp = 62f, its overcast
hour= 8, ctemp = 59f, its lightly storming
hour= 9, ctemp = 58f, its lightly storming
hour= 10, ctemp = 58f, its lightly storming
hour= 11, ctemp = 58f, its lightly storming
hour= 12, ctemp = 58f, its lightly storming
hour= 13, ctemp = 58f, its lightly storming
hour= 14, ctemp = 58f, its lightly storming
hour= 15, ctemp = 58f, its lightly storming
hour= 16, ctemp = 58f, its lightly storming
hour= 17, ctemp = 58f, its lightly storming
hour= 18, ctemp = 58f, its lightly storming
hour= 19, ctemp = 61f, its overcast
hour= 20, ctemp = 64f, its overcast
hour= 21, ctemp = 64f, its overcast
hour= 22, ctemp = 64f, its overcast
hour= 23, ctemp = 62f, its overcast

date = 119, rain = 50%, rt = 3, average temp = 80f, dtemp = 92f

hour= 0, ctemp = 65f, its overcast
hour= 1, ctemp = 68f
hour= 2, ctemp = 71f
hour= 3, ctemp = 74f
hour= 4, ctemp = 75f, its overcast
hour= 5, ctemp = 77f, its overcast
hour= 6, ctemp = 78f, its overcast
hour= 7, ctemp = 80f, its overcast
hour= 8, ctemp = 81f, its overcast
hour= 9, ctemp = 82f, its overcast
hour= 10, ctemp = 83f, its overcast
hour= 11, ctemp = 84f, its overcast
hour= 12, ctemp = 81f, its lightly storming
hour= 13, ctemp = 78f, its lightly storming
hour= 14, ctemp = 75f, its lightly storming
hour= 15, ctemp = 74f, its lightly storming
hour= 16, ctemp = 74f, its lightly storming
hour= 17, ctemp = 74f, its lightly storming
hour= 18, ctemp = 74f, its lightly storming
hour= 19, ctemp = 77f, its overcast
hour= 20, ctemp = 80f, its overcast
hour= 21, ctemp = 82f, its overcast
hour= 22, ctemp = 81f
hour= 23, ctemp = 80f

date = 120, rain = 25%, rt = 3, average temp = 85f, dtemp = 84f

hour= 0, ctemp = 77f, its overcast
hour= 1, ctemp = 74f, its overcast
hour= 2, ctemp = 71f, its overcast
hour= 3, ctemp = 68f, its overcast
hour= 4, ctemp = 69f, its overcast
hour= 5, ctemp = 70f, its overcast
hour= 6, ctemp = 72f, its overcast
hour= 7, ctemp = 73f, its overcast
hour= 8, ctemp = 70f, its lightly storming
hour= 9, ctemp = 68f, its lightly storming
hour= 10, ctemp = 68f, its lightly storming
hour= 11, ctemp = 68f, its lightly storming
hour= 12, ctemp = 68f, its lightly storming
hour= 13, ctemp = 68f, its lightly storming
hour= 14, ctemp = 68f, its lightly storming
hour= 15, ctemp = 68f, its lightly storming
hour= 16, ctemp = 68f, its lightly storming
hour= 17, ctemp = 68f, its lightly storming
hour= 18, ctemp = 68f, its lightly storming
hour= 19, ctemp = 68f, its lightly storming
hour= 20, ctemp = 68f, its lightly storming
hour= 21, ctemp = 68f, its lightly storming
hour= 22, ctemp = 68f, its lightly storming
hour= 23, ctemp = 71f, its overcast

date = 121, rain = 25%, rt = 0, average temp = 85f, dtemp = 75f

hour= 0, ctemp = 68f, its overcast
hour= 1, ctemp = 65f, its overcast
hour= 2, ctemp = 62f, its overcast
hour= 3, ctemp = 60f, its overcast
hour= 4, ctemp = 61f
hour= 5, ctemp = 62f
hour= 6, ctemp = 63f
hour= 7, ctemp = 65f
hour= 8, ctemp = 66f
hour= 9, ctemp = 66f
hour= 10, ctemp = 67f
hour= 11, ctemp = 68f
hour= 12, ctemp = 69f
hour= 13, ctemp = 70f
hour= 14, ctemp = 72f
hour= 15, ctemp = 75f
hour= 16, ctemp = 72f
hour= 17, ctemp = 70f
hour= 18, ctemp = 69f
hour= 19, ctemp = 68f
hour= 20, ctemp = 67f
hour= 21, ctemp = 66f
hour= 22, ctemp = 66f
hour= 23, ctemp = 65f

date = 122, rain = 25%, rt = 0, average temp = 85f, dtemp = 86f

hour= 0, ctemp = 68f
hour= 1, ctemp = 71f
hour= 2, ctemp = 70f
hour= 3, ctemp = 69f
hour= 4, ctemp = 70f
hour= 5, ctemp = 71f
hour= 6, ctemp = 73f
hour= 7, ctemp = 74f
hour= 8, ctemp = 76f
hour= 9, ctemp = 76f
hour= 10, ctemp = 77f
hour= 11, ctemp = 78f
hour= 12, ctemp = 79f
hour= 13, ctemp = 81f
hour= 14, ctemp = 83f
hour= 15, ctemp = 86f
hour= 16, ctemp = 83f
hour= 17, ctemp = 81f
hour= 18, ctemp = 79f
hour= 19, ctemp = 78f
hour= 20, ctemp = 77f
hour= 21, ctemp = 76f
hour= 22, ctemp = 76f
hour= 23, ctemp = 74f

edit: o.o

oh yeah, generates how long its overcast(if it is at all) before/after it rains, how long it rains etc, have it where it can carry over the overcast into the next day not 100% set on what its doing currently with the going to minimum thing.. might set it where if its going higher it just plateaus, but can still go lower or something not decided yet lol. same for if will announce if its cloudy/clear besides rain activity


#46

I'm working on a set of highly optimized statistical and general purpose algorithms for research, and when I can rolling it over into a distributed program.

It's still private, but will be made to radically improve this project: https://github.com/anadon/TF-cluster


#47

I'm working on reworking my game engine again


Codes been updated heeps but I'm moving to gitgud.io

Hopefully after I can keep working on my own game.


#48

You guys know I would be here


#49

Your website if broken: http://45.55.189.133:3000/


#50

its not broken because its not on a real server yet, that is just code that needs to be deployed soon.

That was just for testing at one point. I wrote that learn some basic web dev and Node.js.


Computer Science Lounge - [Too Many Idea Men Edition]
#51

added resting bloodpressure, and heartrate which gets calculated somewhat psedorandomly also influenced by the weight which had already been generated(when add stuff that you are doing will make them go up but will do that math when i get there :p)

added some stuff for weather.. where it generates cloud activity and displays it with a few different times i guess..

can be sunrise, day, sunset, night,
clear(or if day sunny), partly cloudly, mostly coudy, besides overcast and then the 5 levels of rain which also now say one of the earlier 4 'times'

but its just for a function to update them on the weather, not them checking a sundial or looking at the sun to estimate the time

480hrs worth of crapss

date = 97, gen = female, age = 58, weight = 92#
bloodsugar = 50%, bloodpressure = 62%, heartrate = 70bpm,
pee = 81%, poop = 14%, starvation = 3%, dehydration = 15%, stress = 42%, morale = 71%
rain = 50%, rt = 0, avg temp = 80f, dtemp = 90f

hour= 5, ctemp = 75f, clear night
hour= 6, ctemp = 76f, clear sunrise
hour= 7, ctemp = 78f, clear sunrise
hour= 8, ctemp = 79f, partly cloudy day
hour= 9, ctemp = 80f, partly cloudy day
hour= 10, ctemp = 81f, its sunny
hour= 11, ctemp = 82f, partly cloudy day
hour= 12, ctemp = 83f, partly cloudy day
hour= 13, ctemp = 84f, partly cloudy day
hour= 14, ctemp = 87f, its sunny
hour= 15, ctemp = 90f, its sunny
hour= 16, ctemp = 87f, partly cloudy day
hour= 17, ctemp = 84f, partly cloudy day
hour= 18, ctemp = 83f, clear sunset
hour= 19, ctemp = 82f, clear sunset
hour= 20, ctemp = 81f, clear night
hour= 21, ctemp = 80f, clear night
hour= 22, ctemp = 79f, clear night
hour= 23, ctemp = 78f, clear night

date = 98, rain = 50%, rt = 0, average temp = 80f, dtemp = 75f

hour= 0, ctemp = 75f, partly cloudy night
hour= 1, ctemp = 72f, partly cloudy night
hour= 2, ctemp = 69f, clear night
hour= 3, ctemp = 66f, clear night
hour= 4, ctemp = 63f, partly cloudy night
hour= 5, ctemp = 62f, clear night
hour= 6, ctemp = 63f, clear sunrise
hour= 7, ctemp = 65f, partly cloudy sunrise
hour= 8, ctemp = 66f, its sunny
hour= 9, ctemp = 66f, its sunny
hour= 10, ctemp = 67f, its sunny
hour= 11, ctemp = 68f, its sunny
hour= 12, ctemp = 69f, partly cloudy day
hour= 13, ctemp = 70f, mostly cloudy day
hour= 14, ctemp = 72f, mostly cloudy day
hour= 15, ctemp = 75f, partly cloudy day
hour= 16, ctemp = 72f, mostly cloudy day
hour= 17, ctemp = 70f, partly cloudy day
hour= 18, ctemp = 69f, clear sunset
hour= 19, ctemp = 68f, clear sunset
hour= 20, ctemp = 67f, clear night
hour= 21, ctemp = 66f, clear night
hour= 22, ctemp = 66f, clear night
hour= 23, ctemp = 65f, partly cloudy night

date = 99, rain = 50%, rt = 0, average temp = 80f, dtemp = 80f

hour= 0, ctemp = 68f, mostly cloudy night
hour= 1, ctemp = 66f, partly cloudy night
hour= 2, ctemp = 65f, partly cloudy night
hour= 3, ctemp = 64f, clear night
hour= 4, ctemp = 65f, partly cloudy night
hour= 5, ctemp = 66f, mostly cloudy night
hour= 6, ctemp = 68f, partly cloudy sunrise
hour= 7, ctemp = 69f, clear sunrise
hour= 8, ctemp = 70f, its sunny
hour= 9, ctemp = 71f, partly cloudy day
hour= 10, ctemp = 72f, partly cloudy day
hour= 11, ctemp = 72f, its sunny
hour= 12, ctemp = 74f, partly cloudy day
hour= 13, ctemp = 75f, its sunny
hour= 14, ctemp = 77f, partly cloudy day
hour= 15, ctemp = 80f, its sunny
hour= 16, ctemp = 77f, partly cloudy day
hour= 17, ctemp = 75f, its sunny
hour= 18, ctemp = 74f, clear sunset
hour= 19, ctemp = 72f, partly cloudy sunset
hour= 20, ctemp = 72f, mostly cloudy night
hour= 21, ctemp = 71f, mostly cloudy night
hour= 22, ctemp = 70f, partly cloudy night
hour= 23, ctemp = 69f, clear night

date = 100, rain = 50%, rt = 0, average temp = 80f, dtemp = 93f

hour= 0, ctemp = 72f, partly cloudy night
hour= 1, ctemp = 75f, partly cloudy night
hour= 2, ctemp = 76f, mostly cloudy night
hour= 3, ctemp = 75f, partly cloudy night
hour= 4, ctemp = 76f, partly cloudy night
hour= 5, ctemp = 78f, clear night
hour= 6, ctemp = 79f, partly cloudy sunrise
hour= 7, ctemp = 81f, clear sunrise
hour= 8, ctemp = 82f, its sunny
hour= 9, ctemp = 83f, its sunny
hour= 10, ctemp = 84f, partly cloudy day
hour= 11, ctemp = 85f, its sunny
hour= 12, ctemp = 86f, partly cloudy day
hour= 13, ctemp = 88f, partly cloudy day
hour= 14, ctemp = 90f, its sunny
hour= 15, ctemp = 93f, partly cloudy day
hour= 16, ctemp = 90f, its sunny
hour= 17, ctemp = 88f, its sunny
hour= 18, ctemp = 86f, clear sunset
hour= 19, ctemp = 85f, clear sunset
hour= 20, ctemp = 84f, partly cloudy night
hour= 21, ctemp = 83f, clear night
hour= 22, ctemp = 82f, clear night
hour= 23, ctemp = 81f, clear night

date = 101, rain = 50%, rt = 0, average temp = 80f, dtemp = 87f

hour= 0, ctemp = 78f, clear night
hour= 1, ctemp = 75f, clear night
hour= 2, ctemp = 72f, clear night
hour= 3, ctemp = 70f, partly cloudy night
hour= 4, ctemp = 71f, clear night
hour= 5, ctemp = 72f, clear night
hour= 6, ctemp = 74f, partly cloudy sunrise
hour= 7, ctemp = 75f, partly cloudy sunrise
hour= 8, ctemp = 77f, mostly cloudy day
hour= 9, ctemp = 77f, partly cloudy day
hour= 10, ctemp = 78f, mostly cloudy day
hour= 11, ctemp = 79f, partly cloudy day
hour= 12, ctemp = 80f, partly cloudy day
hour= 13, ctemp = 82f, its sunny
hour= 14, ctemp = 84f, partly cloudy day
hour= 15, ctemp = 87f, partly cloudy day
hour= 16, ctemp = 84f, partly cloudy day
hour= 17, ctemp = 82f, its sunny
hour= 18, ctemp = 80f, clear sunset
hour= 19, ctemp = 79f, clear sunset
hour= 20, ctemp = 78f, partly cloudy night
hour= 21, ctemp = 77f, partly cloudy night
hour= 22, ctemp = 77f, clear night
hour= 23, ctemp = 75f, partly cloudy night

date = 102, rain = 50%, rt = 1, average temp = 80f, dtemp = 81f

hour= 0, ctemp = 72f, sprinkling night
hour= 1, ctemp = 69f, sprinkling night
hour= 2, ctemp = 66f, sprinkling night
hour= 3, ctemp = 65f, sprinkling night
hour= 4, ctemp = 65f, sprinkling night
hour= 5, ctemp = 65f, sprinkling night
hour= 6, ctemp = 65f, sprinkling sunrise
hour= 7, ctemp = 65f, sprinkling sunrise
hour= 8, ctemp = 65f, sprinkling day
hour= 9, ctemp = 65f, sprinkling day
hour= 10, ctemp = 65f, sprinkling day
hour= 11, ctemp = 65f, sprinkling day
hour= 12, ctemp = 65f, sprinkling day
hour= 13, ctemp = 65f, sprinkling day
hour= 14, ctemp = 65f, sprinkling day
hour= 15, ctemp = 65f, sprinkling day
hour= 16, ctemp = 68f, overcast day
hour= 17, ctemp = 71f, overcast day
hour= 18, ctemp = 74f, overcast sunset
hour= 19, ctemp = 74f, overcast sunset
hour= 20, ctemp = 73f, clear night
hour= 21, ctemp = 72f, clear night
hour= 22, ctemp = 71f, clear night
hour= 23, ctemp = 70f, clear night

date = 103, rain = 50%, rt = 0, average temp = 80f, dtemp = 86f

hour= 0, ctemp = 73f, partly cloudy night
hour= 1, ctemp = 71f, partly cloudy night
hour= 2, ctemp = 70f, partly cloudy night
hour= 3, ctemp = 69f, clear night
hour= 4, ctemp = 70f, clear night
hour= 5, ctemp = 71f, clear night
hour= 6, ctemp = 73f, clear sunrise
hour= 7, ctemp = 74f, clear sunrise
hour= 8, ctemp = 76f, partly cloudy day
hour= 9, ctemp = 76f, its sunny
hour= 10, ctemp = 77f, partly cloudy day
hour= 11, ctemp = 78f, its sunny
hour= 12, ctemp = 79f, partly cloudy day
hour= 13, ctemp = 81f, mostly cloudy day
hour= 14, ctemp = 83f, partly cloudy day
hour= 15, ctemp = 86f, mostly cloudy day
hour= 16, ctemp = 83f, partly cloudy day
hour= 17, ctemp = 81f, its sunny
hour= 18, ctemp = 79f, clear sunset
hour= 19, ctemp = 78f, clear sunset
hour= 20, ctemp = 77f, clear night
hour= 21, ctemp = 76f, clear night
hour= 22, ctemp = 76f, partly cloudy night
hour= 23, ctemp = 74f, clear night

date = 104, rain = 50%, rt = 0, average temp = 80f, dtemp = 90f

hour= 0, ctemp = 76f, partly cloudy night
hour= 1, ctemp = 75f, clear night
hour= 2, ctemp = 73f, partly cloudy night
hour= 3, ctemp = 72f, partly cloudy night
hour= 4, ctemp = 73f, mostly cloudy night
hour= 5, ctemp = 75f, partly cloudy night
hour= 6, ctemp = 76f, partly cloudy sunrise
hour= 7, ctemp = 78f, clear sunrise
hour= 8, ctemp = 79f, its sunny
hour= 9, ctemp = 80f, partly cloudy day
hour= 10, ctemp = 81f, its sunny
hour= 11, ctemp = 82f, partly cloudy day
hour= 12, ctemp = 83f, mostly cloudy day
hour= 13, ctemp = 84f, partly cloudy day
hour= 14, ctemp = 87f, mostly cloudy day
hour= 15, ctemp = 90f, mostly cloudy day
hour= 16, ctemp = 87f, partly cloudy day
hour= 17, ctemp = 84f, partly cloudy day
hour= 18, ctemp = 83f, clear sunset
hour= 19, ctemp = 82f, partly cloudy sunset
hour= 20, ctemp = 81f, clear night
hour= 21, ctemp = 80f, clear night
hour= 22, ctemp = 79f, partly cloudy night
hour= 23, ctemp = 78f, partly cloudy night

date = 105, rain = 50%, rt = 0, average temp = 80f, dtemp = 93f

hour= 0, ctemp = 79f, clear night
hour= 1, ctemp = 78f, clear night
hour= 2, ctemp = 76f, clear night
hour= 3, ctemp = 75f, partly cloudy night
hour= 4, ctemp = 76f, clear night
hour= 5, ctemp = 78f, clear night
hour= 6, ctemp = 79f, partly cloudy sunrise
hour= 7, ctemp = 81f, partly cloudy sunrise
hour= 8, ctemp = 82f, partly cloudy day
hour= 9, ctemp = 83f, its sunny
hour= 10, ctemp = 84f, its sunny
hour= 11, ctemp = 85f, its sunny
hour= 12, ctemp = 86f, partly cloudy day
hour= 13, ctemp = 88f, its sunny
hour= 14, ctemp = 90f, partly cloudy day
hour= 15, ctemp = 93f, partly cloudy day
hour= 16, ctemp = 90f, its sunny
hour= 17, ctemp = 88f, its sunny
hour= 18, ctemp = 86f, partly cloudy sunset
hour= 19, ctemp = 85f, clear sunset
hour= 20, ctemp = 84f, clear night
hour= 21, ctemp = 83f, clear night
hour= 22, ctemp = 82f, partly cloudy night
hour= 23, ctemp = 81f, clear night

date = 106, rain = 50%, rt = 0, average temp = 80f, dtemp = 77f

hour= 0, ctemp = 78f, clear night
hour= 1, ctemp = 75f, partly cloudy night
hour= 2, ctemp = 72f, clear night
hour= 3, ctemp = 69f, clear night
hour= 4, ctemp = 66f, clear night
hour= 5, ctemp = 64f, clear night
hour= 6, ctemp = 65f, partly cloudy sunrise
hour= 7, ctemp = 67f, mostly cloudy sunrise
hour= 8, ctemp = 68f, partly cloudy day
hour= 9, ctemp = 69f, its sunny
hour= 10, ctemp = 69f, its sunny
hour= 11, ctemp = 70f, its sunny
hour= 12, ctemp = 71f, its sunny
hour= 13, ctemp = 73f, partly cloudy day
hour= 14, ctemp = 74f, its sunny
hour= 15, ctemp = 77f, its sunny
hour= 16, ctemp = 74f, its sunny
hour= 17, ctemp = 73f, its sunny
hour= 18, ctemp = 71f, partly cloudy sunset
hour= 19, ctemp = 70f, clear sunset
hour= 20, ctemp = 69f, partly cloudy night
hour= 21, ctemp = 69f, mostly cloudy night
hour= 22, ctemp = 68f, partly cloudy night
hour= 23, ctemp = 67f, mostly cloudy night

date = 107, rain = 50%, rt = 0, average temp = 80f, dtemp = 65f

hour= 0, ctemp = 64f, mostly cloudy night
hour= 1, ctemp = 61f, partly cloudy night
hour= 2, ctemp = 58f, partly cloudy night
hour= 3, ctemp = 55f, clear night
hour= 4, ctemp = 53f, partly cloudy night
hour= 5, ctemp = 54f, clear night
hour= 6, ctemp = 55f, partly cloudy sunrise
hour= 7, ctemp = 56f, partly cloudy sunrise
hour= 8, ctemp = 57f, partly cloudy day
hour= 9, ctemp = 57f, its sunny
hour= 10, ctemp = 58f, its sunny
hour= 11, ctemp = 59f, its sunny
hour= 12, ctemp = 60f, its sunny
hour= 13, ctemp = 61f, its sunny
hour= 14, ctemp = 62f, its sunny
hour= 15, ctemp = 65f, its sunny
hour= 16, ctemp = 62f, partly cloudy day
hour= 17, ctemp = 61f, its sunny
hour= 18, ctemp = 60f, partly cloudy sunset
hour= 19, ctemp = 59f, partly cloudy sunset
hour= 20, ctemp = 58f, clear night
hour= 21, ctemp = 57f, clear night
hour= 22, ctemp = 57f, clear night
hour= 23, ctemp = 56f, clear night

date = 108, rain = 50%, rt = 1, average temp = 80f, dtemp = 89f

hour= 0, ctemp = 59f, clear night
hour= 1, ctemp = 62f, clear night
hour= 2, ctemp = 65f, clear night
hour= 3, ctemp = 68f, clear night
hour= 4, ctemp = 71f, clear night
hour= 5, ctemp = 74f, clear night
hour= 6, ctemp = 76f, clear sunrise
hour= 7, ctemp = 77f, clear sunrise
hour= 8, ctemp = 79f, its sunny
hour= 9, ctemp = 80f, its sunny
hour= 10, ctemp = 80f, its sunny
hour= 11, ctemp = 81f, its sunny
hour= 12, ctemp = 83f, overcast day
hour= 13, ctemp = 84f, overcast day
hour= 14, ctemp = 86f, overcast day
hour= 15, ctemp = 89f, overcast day
hour= 16, ctemp = 86f, overcast day
hour= 17, ctemp = 84f, overcast day
hour= 18, ctemp = 83f, overcast sunset
hour= 19, ctemp = 80f, sprinkling sunset
hour= 20, ctemp = 77f, sprinkling night
hour= 21, ctemp = 74f, sprinkling night
hour= 22, ctemp = 77f, overcast night
hour= 23, ctemp = 77f, overcast night

date = 109, rain = 50%, rt = 0, average temp = 80f, dtemp = 76f

hour= 0, ctemp = 74f, overcast night
hour= 1, ctemp = 71f, overcast night
hour= 2, ctemp = 68f, overcast night
hour= 3, ctemp = 65f, clear night
hour= 4, ctemp = 62f, clear night
hour= 5, ctemp = 63f, partly cloudy night
hour= 6, ctemp = 64f, mostly cloudy sunrise
hour= 7, ctemp = 66f, partly cloudy sunrise
hour= 8, ctemp = 67f, its sunny
hour= 9, ctemp = 67f, partly cloudy day
hour= 10, ctemp = 68f, partly cloudy day
hour= 11, ctemp = 69f, mostly cloudy day
hour= 12, ctemp = 70f, partly cloudy day
hour= 13, ctemp = 71f, its sunny
hour= 14, ctemp = 73f, its sunny
hour= 15, ctemp = 76f, partly cloudy day
hour= 16, ctemp = 73f, mostly cloudy day
hour= 17, ctemp = 71f, partly cloudy day
hour= 18, ctemp = 70f, mostly cloudy sunset
hour= 19, ctemp = 69f, partly cloudy sunset
hour= 20, ctemp = 68f, partly cloudy night
hour= 21, ctemp = 67f, clear night
hour= 22, ctemp = 67f, partly cloudy night
hour= 23, ctemp = 66f, clear night

date = 110, rain = 50%, rt = 0, average temp = 80f, dtemp = 85f

hour= 0, ctemp = 69f, clear night
hour= 1, ctemp = 70f, partly cloudy night
hour= 2, ctemp = 69f, clear night
hour= 3, ctemp = 68f, partly cloudy night
hour= 4, ctemp = 69f, clear night
hour= 5, ctemp = 70f, partly cloudy night
hour= 6, ctemp = 72f, clear sunrise
hour= 7, ctemp = 73f, clear sunrise
hour= 8, ctemp = 75f, partly cloudy day
hour= 9, ctemp = 75f, partly cloudy day
hour= 10, ctemp = 76f, its sunny
hour= 11, ctemp = 77f, its sunny
hour= 12, ctemp = 78f, its sunny
hour= 13, ctemp = 80f, partly cloudy day
hour= 14, ctemp = 82f, its sunny
hour= 15, ctemp = 85f, partly cloudy day
hour= 16, ctemp = 82f, its sunny
hour= 17, ctemp = 80f, partly cloudy day
hour= 18, ctemp = 78f, partly cloudy sunset
hour= 19, ctemp = 77f, mostly cloudy sunset
hour= 20, ctemp = 76f, partly cloudy night
hour= 21, ctemp = 75f, clear night
hour= 22, ctemp = 75f, clear night
hour= 23, ctemp = 73f, clear night

date = 111, rain = 50%, rt = 3, average temp = 80f, dtemp = 71f

hour= 0, ctemp = 70f, overcast night
hour= 1, ctemp = 67f, overcast night
hour= 2, ctemp = 64f, lightly storming night
hour= 3, ctemp = 61f, lightly storming night
hour= 4, ctemp = 58f, lightly storming night
hour= 5, ctemp = 57f, lightly storming night
hour= 6, ctemp = 57f, lightly storming sunrise
hour= 7, ctemp = 57f, lightly storming sunrise
hour= 8, ctemp = 57f, lightly storming day
hour= 9, ctemp = 57f, lightly storming day
hour= 10, ctemp = 57f, lightly storming day
hour= 11, ctemp = 57f, lightly storming day
hour= 12, ctemp = 57f, lightly storming day
hour= 13, ctemp = 57f, lightly storming day
hour= 14, ctemp = 57f, lightly storming day
hour= 15, ctemp = 57f, lightly storming day
hour= 16, ctemp = 57f, lightly storming day
hour= 17, ctemp = 57f, lightly storming day
hour= 18, ctemp = 60f, overcast sunset
hour= 19, ctemp = 63f, overcast sunset
hour= 20, ctemp = 64f, partly cloudy night
hour= 21, ctemp = 63f, mostly cloudy night
hour= 22, ctemp = 62f, partly cloudy night
hour= 23, ctemp = 61f, partly cloudy night

date = 112, rain = 50%, rt = 1, average temp = 80f, dtemp = 79f

hour= 0, ctemp = 64f, overcast night
hour= 1, ctemp = 66f, overcast night
hour= 2, ctemp = 65f, overcast night
hour= 3, ctemp = 64f, sprinkling night
hour= 4, ctemp = 64f, sprinkling night
hour= 5, ctemp = 64f, sprinkling night
hour= 6, ctemp = 64f, sprinkling sunrise
hour= 7, ctemp = 64f, sprinkling sunrise
hour= 8, ctemp = 67f, overcast day
hour= 9, ctemp = 70f, overcast day
hour= 10, ctemp = 71f, overcast day
hour= 11, ctemp = 72f, partly cloudy day
hour= 12, ctemp = 73f, partly cloudy day
hour= 13, ctemp = 75f, partly cloudy day
hour= 14, ctemp = 77f, its sunny
hour= 15, ctemp = 79f, partly cloudy day
hour= 16, ctemp = 77f, mostly cloudy day
hour= 17, ctemp = 75f, partly cloudy day
hour= 18, ctemp = 73f, clear sunset
hour= 19, ctemp = 72f, clear sunset
hour= 20, ctemp = 71f, clear night
hour= 21, ctemp = 71f, clear night
hour= 22, ctemp = 70f, clear night
hour= 23, ctemp = 69f, clear night

date = 113, rain = 50%, rt = 1, average temp = 80f, dtemp = 74f

hour= 0, ctemp = 66f, overcast night
hour= 1, ctemp = 63f, sprinkling night
hour= 2, ctemp = 60f, sprinkling night
hour= 3, ctemp = 60f, sprinkling night
hour= 4, ctemp = 60f, sprinkling night
hour= 5, ctemp = 60f, sprinkling night
hour= 6, ctemp = 60f, sprinkling sunrise
hour= 7, ctemp = 60f, sprinkling sunrise
hour= 8, ctemp = 60f, sprinkling day
hour= 9, ctemp = 60f, sprinkling day
hour= 10, ctemp = 60f, sprinkling day
hour= 11, ctemp = 60f, sprinkling day
hour= 12, ctemp = 60f, sprinkling day
hour= 13, ctemp = 60f, sprinkling day
hour= 14, ctemp = 60f, sprinkling day
hour= 15, ctemp = 60f, sprinkling day
hour= 16, ctemp = 60f, sprinkling day
hour= 17, ctemp = 60f, sprinkling day
hour= 18, ctemp = 60f, sprinkling sunset
hour= 19, ctemp = 60f, sprinkling sunset
hour= 20, ctemp = 60f, sprinkling night
hour= 21, ctemp = 60f, sprinkling night
hour= 22, ctemp = 60f, sprinkling night
hour= 23, ctemp = 63f, overcast night

date = 114, rain = 50%, rt = 3, average temp = 80f, dtemp = 88f

hour= 0, ctemp = 66f, overcast night
hour= 1, ctemp = 69f, overcast night
hour= 2, ctemp = 71f, lightly storming night
hour= 3, ctemp = 71f, lightly storming night
hour= 4, ctemp = 71f, lightly storming night
hour= 5, ctemp = 71f, lightly storming night
hour= 6, ctemp = 71f, lightly storming sunrise
hour= 7, ctemp = 71f, lightly storming sunrise
hour= 8, ctemp = 71f, lightly storming day
hour= 9, ctemp = 71f, lightly storming day
hour= 10, ctemp = 71f, lightly storming day
hour= 11, ctemp = 71f, lightly storming day
hour= 12, ctemp = 71f, lightly storming day
hour= 13, ctemp = 74f, overcast day
hour= 14, ctemp = 77f, overcast day
hour= 15, ctemp = 80f, overcast day
hour= 16, ctemp = 83f, overcast day
hour= 17, ctemp = 83f, overcast day
hour= 18, ctemp = 82f, overcast sunset
hour= 19, ctemp = 80f, overcast sunset
hour= 20, ctemp = 79f, overcast night
hour= 21, ctemp = 79f, overcast night
hour= 22, ctemp = 78f, overcast night
hour= 23, ctemp = 76f, partly cloudy night

date = 115, rain = 50%, rt = 0, average temp = 80f, dtemp = 79f

hour= 0, ctemp = 73f, mostly cloudy night
hour= 1, ctemp = 70f, partly cloudy night
hour= 2, ctemp = 67f, partly cloudy night
hour= 3, ctemp = 64f, clear night
hour= 4, ctemp = 65f, clear night
hour= 5, ctemp = 66f, partly cloudy night
hour= 6, ctemp = 67f, mostly cloudy sunrise
hour= 7, ctemp = 69f, partly cloudy sunrise
hour= 8, ctemp = 70f, its sunny
hour= 9, ctemp = 71f, its sunny
hour= 10, ctemp = 71f, its sunny
hour= 11, ctemp = 72f, its sunny
hour= 12, ctemp = 73f, its sunny
hour= 13, ctemp = 75f, its sunny
hour= 14, ctemp = 77f, its sunny
hour= 15, ctemp = 79f, partly cloudy day
hour= 16, ctemp = 77f, partly cloudy day
hour= 17, ctemp = 75f, its sunny
hour= 18, ctemp = 73f, clear sunset
hour= 19, ctemp = 72f, partly cloudy sunset
hour= 20, ctemp = 71f, clear night
hour= 21, ctemp = 71f, clear night
hour= 22, ctemp = 70f, clear night
hour= 23, ctemp = 69f, partly cloudy night

date = 116, rain = 50%, rt = 1, average temp = 80f, dtemp = 85f

hour= 0, ctemp = 72f, clear night
hour= 1, ctemp = 70f, clear night
hour= 2, ctemp = 69f, overcast night
hour= 3, ctemp = 68f, overcast night
hour= 4, ctemp = 69f, overcast night
hour= 5, ctemp = 68f, sprinkling night
hour= 6, ctemp = 68f, sprinkling sunrise
hour= 7, ctemp = 71f, clear sunrise
hour= 8, ctemp = 74f, its sunny
hour= 9, ctemp = 75f, its sunny
hour= 10, ctemp = 76f, its sunny
hour= 11, ctemp = 77f, its sunny
hour= 12, ctemp = 78f, partly cloudy day
hour= 13, ctemp = 80f, its sunny
hour= 14, ctemp = 82f, its sunny
hour= 15, ctemp = 85f, its sunny
hour= 16, ctemp = 82f, its sunny
hour= 17, ctemp = 80f, its sunny
hour= 18, ctemp = 78f, clear sunset
hour= 19, ctemp = 77f, clear sunset
hour= 20, ctemp = 76f, clear night
hour= 21, ctemp = 75f, clear night
hour= 22, ctemp = 75f, clear night
hour= 23, ctemp = 73f, clear night

date = 117, rain = 50%, rt = 0, average temp = 80f, dtemp = 80f

hour= 0, ctemp = 70f, clear night
hour= 1, ctemp = 67f, clear night
hour= 2, ctemp = 65f, partly cloudy night
hour= 3, ctemp = 64f, mostly cloudy night


#52

not much progress(still just working on it few minutes once a week or something when i get bored lol..)

new stuff, test file/output

date = 70, gen = male, age = 40, weight = 141#
bloodsugar = 50%, bloodpressure = 55%, heartrate = 77bpm,
pee = 27%, poop = 88%, starvation = 3%, dehydration = 3%, stress = 17%, morale = 90%
rain = 40%, rt = 0, avg temp = 75f, dtemp = 88f

dehydration = 5%, starvation = 4%, weight = 141
hour= 18, ctemp = 82f, partly cloudy sunset
dehydration = 7%, starvation = 5%, weight = 141
hour= 19, ctemp = 80f, clear sunset
dehydration = 9%, starvation = 6%, weight = 141
hour= 20, ctemp = 79f, clear night
dehydration = 11%, starvation = 7%, weight = 141
hour= 21, ctemp = 79f, partly cloudy night
dehydration = 13%, starvation = 8%, weight = 141
hour= 22, ctemp = 78f, clear night
dehydration = 15%, starvation = 9%, weight = 141
hour= 23, ctemp = 76f, partly cloudy night
dehydration = 17%, starvation = 10%, weight = 141

date = 71, rain = 40%, rt = 2, average temp = 75f, dtemp = 77f

hour= 0, ctemp = 73f, overcast night
dehydration = 19%, starvation = 11%, weight = 138
hour= 1, ctemp = 70f, overcast night
dehydration = 21%, starvation = 12%, weight = 138
hour= 2, ctemp = 67f, overcast night
dehydration = 23%, starvation = 13%, weight = 138
hour= 3, ctemp = 64f, overcast night
dehydration = 25%, starvation = 14%, weight = 138
hour= 4, ctemp = 62f, raining night
dehydration = 27%, starvation = 15%, weight = 138
hour= 5, ctemp = 62f, raining night
dehydration = 29%, starvation = 16%, weight = 138
hour= 6, ctemp = 62f, raining sunrise
dehydration = 31%, starvation = 17%, weight = 138
hour= 7, ctemp = 62f, raining sunrise
dehydration = 33%, starvation = 18%, weight = 138
hour= 8, ctemp = 62f, raining day
dehydration = 35%, starvation = 19%, weight = 138
hour= 9, ctemp = 62f, raining day
dehydration = 37%, starvation = 20%, weight = 138
hour= 10, ctemp = 62f, raining day
dehydration = 39%, starvation = 21%, weight = 138
hour= 11, ctemp = 62f, raining day
dehydration = 41%, starvation = 22%, weight = 138
hour= 12, ctemp = 62f, raining day
dehydration = 43%, starvation = 23%, weight = 138
hour= 13, ctemp = 62f, raining day
dehydration = 45%, starvation = 24%, weight = 138
hour= 14, ctemp = 62f, raining day
dehydration = 47%, starvation = 25%, weight = 138
hour= 15, ctemp = 62f, raining day
dehydration = 49%, starvation = 26%, weight = 138
hour= 16, ctemp = 62f, raining day
dehydration = 51%, starvation = 27%, weight = 138
hour= 17, ctemp = 65f, overcast day
dehydration = 53%, starvation = 28%, weight = 138
hour= 18, ctemp = 68f, overcast sunset
dehydration = 55%, starvation = 29%, weight = 138
hour= 19, ctemp = 70f, overcast sunset
dehydration = 57%, starvation = 30%, weight = 138
hour= 20, ctemp = 69f, overcast night
dehydration = 59%, starvation = 31%, weight = 138
hour= 21, ctemp = 69f, overcast night
dehydration = 61%, starvation = 32%, weight = 138
hour= 22, ctemp = 68f, overcast night
dehydration = 63%, starvation = 33%, weight = 138
hour= 23, ctemp = 67f, overcast night
dehydration = 65%, starvation = 34%, weight = 138

date = 72, rain = 40%, rt = 0, average temp = 75f, dtemp = 68f

hour= 0, ctemp = 64f, partly cloudy night
dehydration = 67%, starvation = 35%, weight = 135
hour= 1, ctemp = 61f, clear night
dehydration = 69%, starvation = 36%, weight = 135
hour= 2, ctemp = 58f, clear night
dehydration = 71%, starvation = 37%, weight = 135
hour= 3, ctemp = 55f, clear night
dehydration = 73%, starvation = 38%, weight = 135
hour= 4, ctemp = 56f, clear night
dehydration = 75%, starvation = 39%, weight = 135
hour= 5, ctemp = 57f, partly cloudy night
dehydration = 77%, starvation = 40%, weight = 135
hour= 6, ctemp = 58f, partly cloudy sunrise
dehydration = 79%, starvation = 41%, weight = 135
hour= 7, ctemp = 59f, mostly cloudy sunrise
dehydration = 81%, starvation = 42%, weight = 135
hour= 8, ctemp = 60f, partly cloudy day
dehydration = 83%, starvation = 43%, weight = 135
hour= 9, ctemp = 61f, mostly cloudy day
dehydration = 85%, starvation = 44%, weight = 135
hour= 10, ctemp = 61f, partly cloudy day
dehydration = 87%, starvation = 45%, weight = 135
hour= 11, ctemp = 62f, its sunny
dehydration = 89%, starvation = 46%, weight = 135
hour= 12, ctemp = 63f, its sunny
dehydration = 91%, starvation = 47%, weight = 135
hour= 13, ctemp = 64f, its sunny
dehydration = 93%, starvation = 48%, weight = 135
hour= 14, ctemp = 66f, its sunny
dehydration = 95%, starvation = 49%, weight = 135
hour= 15, ctemp = 68f, its sunny
dehydration = 97%, starvation = 50%, weight = 135
hour= 16, ctemp = 66f, its sunny
dehydration = 99%, starvation = 51%, weight = 135
hour= 17, ctemp = 64f, partly cloudy day
dehydration = 101%, starvation = 52%, weight = 135
hour= 18, ctemp = 63f, clear sunset
dehydration = 103%, starvation = 53%, weight = 135
hour= 19, ctemp = 62f, clear sunset
dehydration = 105%, starvation = 54%, weight = 135
hour= 20, ctemp = 61f, clear night
dehydration = 107%, starvation = 55%, weight = 135
hour= 21, ctemp = 61f, clear night
dehydration = 109%, starvation = 56%, weight = 135
hour= 22, ctemp = 60f, clear night
dehydration = 111%, starvation = 57%, weight = 135
hour= 23, ctemp = 59f, partly cloudy night
dehydration = 113%, starvation = 58%, weight = 135

date = 73, rain = 40%, rt = 0, average temp = 75f, dtemp = 65f

hour= 0, ctemp = 56f, clear night
dehydration = 115%, starvation = 59%, weight = 132
hour= 1, ctemp = 54f, partly cloudy night
dehydration = 117%, starvation = 60%, weight = 132
hour= 2, ctemp = 53f, clear night
dehydration = 119%, starvation = 61%, weight = 132
hour= 3, ctemp = 52f, clear night
dehydration = 121%, starvation = 62%, weight = 132
hour= 4, ctemp = 53f, partly cloudy night
dehydration = 123%, starvation = 63%, weight = 132
hour= 5, ctemp = 54f, clear night
dehydration = 125%, starvation = 64%, weight = 132
hour= 6, ctemp = 55f, clear sunrise
dehydration = 127%, starvation = 65%, weight = 132
hour= 7, ctemp = 56f, clear sunrise
dehydration = 129%, starvation = 66%, weight = 132
hour= 8, ctemp = 57f, partly cloudy day
dehydration = 131%, starvation = 67%, weight = 132
hour= 9, ctemp = 57f, partly cloudy day
dehydration = 133%, starvation = 68%, weight = 132
hour= 10, ctemp = 58f, its sunny
dehydration = 135%, starvation = 69%, weight = 132
hour= 11, ctemp = 59f, its sunny
dehydration = 137%, starvation = 70%, weight = 132
hour= 12, ctemp = 60f, partly cloudy day
dehydration = 139%, starvation = 71%, weight = 132
hour= 13, ctemp = 61f, mostly cloudy day
dehydration = 141%, starvation = 72%, weight = 132
hour= 14, ctemp = 62f, partly cloudy day
dehydration = 143%, starvation = 73%, weight = 132
hour= 15, ctemp = 65f, its sunny
dehydration = 145%, starvation = 74%, weight = 132
hour= 16, ctemp = 62f, its sunny
dehydration = 147%, starvation = 75%, weight = 132
hour= 17, ctemp = 61f, its sunny
dehydration = 149%, starvation = 76%, weight = 132
hour= 18, ctemp = 60f, clear sunset
dehydration = 151%, starvation = 77%, weight = 132
hour= 19, ctemp = 59f, clear sunset
dehydration = 153%, starvation = 78%, weight = 132
hour= 20, ctemp = 58f, clear night
dehydration = 155%, starvation = 79%, weight = 132
hour= 21, ctemp = 57f, partly cloudy night
dehydration = 157%, starvation = 80%, weight = 132
hour= 22, ctemp = 57f, clear night
dehydration = 159%, starvation = 81%, weight = 132
hour= 23, ctemp = 56f, clear night
dehydration = 161%, starvation = 82%, weight = 132

date = 74, rain = 40%, rt = 0, average temp = 75f, dtemp = 69f

hour= 0, ctemp = 59f, partly cloudy night
dehydration = 163%, starvation = 83%, weight = 129
hour= 1, ctemp = 58f, partly cloudy night
dehydration = 165%, starvation = 84%, weight = 129
hour= 2, ctemp = 57f, clear night
dehydration = 167%, starvation = 85%, weight = 129
hour= 3, ctemp = 56f, clear night
dehydration = 169%, starvation = 86%, weight = 129
hour= 4, ctemp = 57f, clear night
dehydration = 171%, starvation = 87%, weight = 129
hour= 5, ctemp = 58f, clear night
dehydration = 173%, starvation = 88%, weight = 129
hour= 6, ctemp = 59f, partly cloudy sunrise
dehydration = 175%, starvation = 89%, weight = 129
hour= 7, ctemp = 60f, clear sunrise
dehydration = 177%, starvation = 90%, weight = 129
hour= 8, ctemp = 61f, partly cloudy day
dehydration = 179%, starvation = 91%, weight = 129
hour= 9, ctemp = 62f, its sunny
dehydration = 181%, starvation = 92%, weight = 129
hour= 10, ctemp = 62f, partly cloudy day
dehydration = 183%, starvation = 93%, weight = 129
hour= 11, ctemp = 63f, partly cloudy day
dehydration = 185%, starvation = 94%, weight = 129
hour= 12, ctemp = 64f, its sunny
dehydration = 187%, starvation = 95%, weight = 129
hour= 13, ctemp = 65f, partly cloudy day
dehydration = 189%, starvation = 96%, weight = 129
hour= 14, ctemp = 67f, its sunny
dehydration = 191%, starvation = 97%, weight = 129
hour= 15, ctemp = 69f, partly cloudy day
dehydration = 193%, starvation = 98%, weight = 129
hour= 16, ctemp = 67f, partly cloudy day
dehydration = 195%, starvation = 99%, weight = 129
hour= 17, ctemp = 65f, partly cloudy day
dehydration = 197%, starvation = 100%, weight = 129
hour= 18, ctemp = 64f, clear sunset
dehydration = 199%, starvation = 101%, weight = 129
hour= 19, ctemp = 63f, clear sunset
dehydration = 201%, starvation = 102%, weight = 129
you died of dehydration!

added some calculations for dehydration, and starvation which is also based on weight(currently is you die if starvation goes over 250+weight, and goes up 1 starvation per hour and updates weight once per day(so i dont have to use floating point math, in which you lose weight*.02 per day(works fine in c without floating point it just rounds down always)

atleast until i add the stuff where you can eat if you catch a fish or something like that in which case depending on the weight of the person they may not lose weight, or may lose less etc so the 2% per day is max weight loss.

dehydration is just goes up 2 per hour and you die if goes over 200


#53

Just did this one.


#54

had a class where we had to go through 140 entries of data values 4 times and categorize them.

I realized that I could just save the 141 values into an array and have a for loop check each value in the array to see if it fits the defined categories

It took about 4 hours, about an hour to write the algorithm and 3 hours for refining the code and test it.

What probably took the longest was to convert all the values from the excel spreed sheet into one line with lots of commas. I did a quick search and found out that open office had a transpose function which converted the data into an array. Using the transpose function, I copied the array and pasted into the input section.

After I figured out how to convert the values to an array, I spent the rest of the time making separate classes for each category. I figured if I was to spend time to code it, I might as well make it look pretty.


#55

I'm making an attempt to write an application which determines with 70% accuracy what position a baseball player plays given a set of data. I've started writing it in ruby, and is still very infantile.


#56

decided to try the 8gb one anyways, and was right, was just some filesystem/overhead upperlimit type issues making the last few threads look to not get any faster


#57

no screenie this time cause forgot XD.

but added an option to the media server thing where can do..

mcli -sp listname segment#
mcli -sp listname segment# -ro

to play the specified segment, of the specified list and then return to doing whatever it was before(or restart the segment if you did -ro, as if you interrupted something that was already playing but still wanted to finish that file instead of moving onto the next)

more specifics

but without updating the position file for the list you specified, as opposed to the -n option which would interrupt the normal operation as would -sp, but to play the otherlist the given number of segments entered, and then resume previous instruction, or if you used one of the -setpos functions to set the position file to play a given segment

but not too big off an addition as already had most of the functionality done but.. felt it was enough of an improvement in ease of use to include


#58

Discovers duplicate files on a file system based on md5sum. Checks each directory recursively from the location it was called from and reports duplicates.


#59

This is a script I made to automate the sorting of downloaded torrents, I'm always adding bits to it so it's a little messy, but eventually I hope to have it so that the whole process is completely automated. Right now it will perform a recheck to check the integrity of the torrent, then run a virus scan before handing it over to sorttv to do the actual sorting (unless it's on an ignore list for stuff I want to manually sort) after that it does some checks to see if everything sorted correctly then it sends an e-mail either saying everything is good or I need to look at it. If it was sorted correctly it deletes the torrent and left over files.

Ultimately I'd like to have it sort stuff that is on the ignore list depending on what it is, and also be able to deal with sorting problems automatically.

#!/bin/bash
exec &>> /mnt/downloads/scan.log

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

#Build array from file
getIgnoreList() {
	ignore=() #Create array
	while IFS= read -r line #Read a line
	do
		ignore+=("$line") #Append line to the array
	done < "$1"
}

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

#Variables
EMAIL="[email protected]"         	#E-mail address that notifications will be sent to
DOWNLOAD_PATH="/mnt/downloads"          	#Path to download directory
SCAN_PATH="/mnt/downloads/scanning"     	#Path to temporary scanning dirrectory. File will be moved back whem completes, this allows for deleting data from within torrent clinet while also allowing user to see that a file is currently being scanned.
INFECTED_PATH="/mnt/downloads/infected" 	#Path to move infected files
OUTPUT_PATH="/tmp"                      	#Temporary storage of output       
IGNORE_LIST="/mnt/downloads/ignore.list" 	#Location of ignore list

#Internal variables
ID="$1"						#Hash of torrent
FILE=""$2""                                    	#Name of torrent files passed from torrent client
TORRENT_PATH="$3"				#Torrent path (from deluge)
OUTPUT="$OUTPUT_PATH""/clamscan.""$FILE"".out" 	#File which output text will be storred in
SORT_OUTPUT="$OUTPUT_PATH""/""$FILE"".sort"
UNSORT_OUTPUT="$OUTPUT_PATH""/""$FILE"".unsort"
MAIL_OUTPUT="$OUTPUT_PATH""/""$FILE"".mail"
DEFAULT_MAIL_SUBJECT="$FILE"" complete"
SORT_DIRECTORY='"'/mnt/Downloads/Downloads/sorting/"$FILE"'"'
DELUGE_CONSOLE="/usr/bin/deluge-console -c /var/lib/deluge/.config/deluge"
SCAN_RUNNING=$( < /tmp/scan_running )	#Loads value of scan_running file, if 1 then scan already running, if 0 no other scan is running
IGNORE="NO"

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

#Check if another scan job is running and wait until it's finished before starting
while [ $SCAN_RUNNING -eq 1 ]
do
	DELAY=$(( ( RANDOM % 30 ) + 10 ))
	sleep $DELAY
	SCAN_RUNNING=$( < /tmp/scan_running )
done

#echo 1 to scan_running file to prevent another scan job from starting
echo 1 > /tmp/scan_running

#Stop the torrent so it can be moved
echo "Stopping torrent"
$DELUGE_CONSOLE pause $ID
sleep 10

#Perform a recheck
echo "Checking torrent"
$DELUGE_CONSOLE recheck $ID
recheck=1
while [ $recheck -eq 1 ]
do
	recheck=$( $DELUGE_CONSOLE info $ID | grep -ic Checking )
	sleep 10
done

#Restart if downloading incomplete
progress=$( $DELUGE_CONSOLE info $ID | grep -ic Progress )
if [ $progress -ne 0 ]
then
	echo "Resume torrent download"
	$DELUGE_CONSOLE resume $ID
	wait

	echo "Removing temporary files"
	rm "$OUTPUT"
	rm "$SORT_OUTPUT"
	echo 0 > /tmp/scan_running
	exit
fi

echo "Torrent integrity verified"
echo "$FILE integrity check passed" > $UNSORT_OUTPUT

#Don't sort files in ignore.list
getIgnoreList $IGNORE_LIST
for ((i = 0; i < ${#ignore[@]}; i++))
do
    if [[ $FILE =~ "${ignore[$i]}" ]]
        then
        IGNORE="YES"
    fi
done

echo "--------------------------------------"
echo "Scanning $FILE on `date`"

#Move completed torrent download to scanning directory
mv $DOWNLOAD_PATH/"$FILE" $SCAN_PATH

#Scan files with clamav
clamscan -ir $SCAN_PATH/"$FILE" >> "$OUTPUT"
wait

#Check output and store number of infected files in $INFECTED"
INFECTED=$(cat "$OUTPUT" | sed -n -e 's/^Infected files: //p')
echo "Scan complete, $INFECTED infected files found"

#Check whether there are infected files, if so move and notify. If not move back to download directory.
if (($INFECTED > 0))
then
    echo "Moving infected files"
    mv $SCAN_PATH/"$FILE" $INFECTED_PATH/
    
    echo "Sending E-mail to $EMAIL"
    mail -r "[email protected]" -s "Virus detected in torrent file" "$EMAIL" < "$OUTPUT"
    
    echo "Copying E-Mail to infected directory"
    cp "$OUTPUT" $INFECTED_PATH/
    
elif [[ $IGNORE =~ "YES" ]]
then
    echo "$FILE matches ignore list, manual sorting required"
    echo "$FILE virus scan passed" >> $UNSORT_OUTPUT
    echo "$FILE requires manual sorting" >> $UNSORT_OUTPUT
    mv "$SCAN_PATH/$FILE" "$DOWNLOAD_PATH/"
    mail -r "[email protected]" -s "$DEFAULT_MAIL_SUBJECT" "$EMAIL" < "$UNSORT_OUTPUT"

    echo "Removing temporary files"
    rm "$OUTPUT"
    rm "$SORT_OUTPUT"
    rm "$UNSORT_OUTPUT"
    echo 0 > /tmp/scan_running
    exit

else
    echo "Moving file to sorting directory"
    mkdir $DOWNLOAD_PATH/sorting/"$FILE"
    mv $SCAN_PATH/"$FILE" "$DOWNLOAD_PATH/sorting/$FILE"/

    #get count of sortable files
    PRE_COUNT=$( find "$DOWNLOAD_PATH/sorting/$FILE" -type f \( -iname \*.mkv -o -iname \*.avi -o -iname \*.mp4 -o -iname \*.m4v \) | wc -l )
    SORT_IGNORE=("RARBG.mp4")
    for ((i = 0; i < ${#SORT_IGNORE[@]}; i++))
    do
        PRE_COUNT=`expr $PRE_COUNT - $(find "$DOWNLOAD_PATH/sorting/$FILE" -type f -iname ${SORT_IGNORE[$i]} | wc -l)`
    done    

    echo "Sorting file"
    ssh -i /var/lib/deluge/.config/deluge/.ssh/id_rsa [email protected] "sudo -u kane sorttv/sorttv.pl --directory-to-sort=""$SORT_DIRECTORY" >> "$SORT_OUTPUT"
    wait

    echo "Checking that sort was successful"
    SORT_COUNT=$( grep -E 'mkv|avi|mp4|m4v' "$SORT_OUTPUT" | grep -- '--to-->' | wc -l )
    POST_COUNT=$( find "$DOWNLOAD_PATH/sorting/$FILE" -type f \( -iname \*.mkv -o -iname \*.avi -o -iname \*.mp4 -o -iname \*.m4v \) | wc -l )
    for ((i = 0; i < ${#SORT_IGNORE[@]}; i++))
        do
            POST_COUNT=`expr $POST_COUNT - $(find "$DOWNLOAD_PATH/sorting/$FILE" -type f -iname ${SORT_IGNORE[$i]} | wc -l)`
        done    
    if [[ ($PRE_COUNT == $SORT_COUNT) && ($POST_COUNT -eq 0) ]]
    then
        SORT_MAIL_SUBJECT="[SORTED] $DEFAULT_MAIL_SUBJECT"
	echo "$FILE sorted successfuly" > "$MAIL_OUTPUT"
	echo "Torrent will be removed from deluge and leftover files deleted" >> "$MAIL_OUTPUT"
	echo >> "$MAIL_OUTPUT"
	echo "--------------------------------------------------" >> "$MAIL_OUTPUT"
	echo "			sorttv output" >> "$MAIL_OUTPUT"
	echo "--------------------------------------------------" >> "$MAIL_OUTPUT"
	echo >> "$MAIL_OUTPUT"
	cat "$SORT_OUTPUT" >> "$MAIL_OUTPUT"
    else
        SORT_MAIL_SUBJECT="[ATTENTION REQUIRED] $DEFAULT_MAIL_SUBJECT"
	echo "$FILE downloaded successfully however some sorting errors were detected" > "$MAIL_OUTPUT"
	echo >> $MAIL_OUTPUT
	echo "Media files downloaded: $PRE_COUNT" >> "$MAIL_OUTPUT"
	echo "Media files sorted:     $SORT_COUNT" >> "$MAIL_OUTPUT"
        echo "Media files remaining:  $POST_COUNT" >> "$MAIL_OUTPUT"
        echo >> $MAIL_OUTPUT
        echo "--------------------------------------------------" >> "$MAIL_OUTPUT"
	echo "                 sorttv output" >> "$MAIL_OUTPUT"
	echo "--------------------------------------------------" >> "$MAIL_OUTPUT"
	echo >> $MAIL_OUTPUT
	cat "$SORT_OUTPUT" >> "$MAIL_OUTPUT"
    fi

    echo "Updating Kodi library"
    curl --connect-timeout 10 --data-binary '{ "jsonrpc": "2.0", "method": "VideoLibrary.Scan", "id": "mybash"}' -H 'content-type: application/json;' http://genesis:8278/jsonrpc

    echo "Sending sort e-mail"
    mail -r "[email protected]" -s "$SORT_MAIL_SUBJECT" "$EMAIL" < "$MAIL_OUTPUT"
fi

#Cleanup
echo "Returning leftovers to Download directory"
mv "$DOWNLOAD_PATH/sorting/$FILE/$FILE" $DOWNLOAD_PATH/
rm -r "$DOWNLOAD_PATH/sorting/$FILE"
if [[ ($PRE_COUNT == $SORT_COUNT) && ($POST_COUNT -eq 0) ]]
then
    echo "Removing torrent and data"
    $DELUGE_CONSOLE rm $ID --remove_data
fi

echo "Removing temporary files"
rm "$OUTPUT"
rm "$SORT_OUTPUT"
rm "$UNSORT_OUTPUT"
rm "$MAIL_OUTPUT"

echo 0 > /tmp/scan_running

echo "--------------------------------------"

#60

did little bit of rework on the new sp function

it only added 2 if/else statements to the main server program, and added couple extra conditions to some already existing ones

but got it where not only does it not update the position file if you use the -sp, it also doesnt scan it but thats not really that big of a savings, since most of the files wont be super long and even if they are, id be a loop that reads each character then do the termination for the end of the character string on the array

but either way is looking okay.

besides added exemption for .srt for the mkli.

and double checked the thing where i fixed it giving the warning message, (it already checked for the condition but the fix involved checking at earlier spot which already checked conditions to even enter that part of the code, so i was able to remove the later check, so was able to remove 1 if statement from each of the setpos functions)

tldr mostly just pruning the new changes, to remove some redundancies, i.e. if just going to override the number for the position anyways, then theres no point even scanning it, or checking at a laterpoint something we already have established right before that.

but still ideally would like to reaudit basically the whole thing(just the 3 c files or whatever)
to check for other possible optimizations/redundant error checks etc