Showing posts with label Tech. Show all posts
Showing posts with label Tech. Show all posts

Wednesday, April 22, 2015

The Wheels on the World Go Round

           When I was born the world was spinning, when I was conceived it was spinning. When every human heart, at least as we think of it, has stopped beating the world will just keep on spinning.  While many have pointed out, the planet we exist upon like parasites, and claim as a birthright, which when you think of it is kinda like claiming rights to the flesh of your parent. A bit sick and twisted I know, that is my point.  The degree to which we have become disconnected from nature is staggering.  We have decided we are the pinnacle of evolution, in many ways our maturation as a species, our ability not to subdue, or destroy. Our ability to adapt, to encompass, and allow space for, where we finally get the point, that often doing nothing, and being observant is the answer.  That in allowing the world around you to guide you to the win/win.
         I live in Sedona Arizona, beautiful tourist area, also new age mecca, that is kinda cool, kinda not.  It for sure is a highly charged place, as much to do with the geology, high iron oxide heightening the effect. Another aspect is this area has traditionally been a ceremonial space, people didn't really live here till recently.  For most of my time in the Verde Valley, I stayed to the edges, not in Sedona itself.  For me I happen to agree with the elders, this place is a place of vision questing, and finding connection with self, and spirit.  For the past three or so years I've been living on one of the oldest inhabited spots in West Sedona, the views from this spot are amazing.  The property has original red rock out buildings, and red rock patio, and grill built in.  The plot I'm on has at it's peak a cistern, it's all sealed up now, but I go up there sometimes just to think.  When I was up there, I started looking at the property as whole, In my mind I started to see with the cistern functional, and being allowed to flow water through the property, guided through alcoves, ya know nicely landscape with plenty of places to relax and like.  In among these spots would be bridges, and water wheels. The water wheels would power the system as well as provide extra. combined with some solar, and thermal this place is an energy provider to the local area.  The property behind this one, which is also part of a larger plot, that was sub divided for use, and has had the lease situation just change, was a sand and gravel place. It's been dug up and filled so many times.  I noticed they had brought in a bunch of shipping containers, and poof, bury them as part of the down slope, use them as the frame work for a little underground bread and breakfast type place, as well as housing some of the power generation systems that would be best shielded.  This would make this spot lovely again, it's been allowed to decay.  This was about 5 min drift in my minds eye while I was watching a hawk or falcon circle, it kinda shifted my own minds eye view, to see it almost like a localized topography map in my mind.
    I'm not saying that is The answer for this property, just one that for me strikes that balance, it remains productive, might even be considered more so, as well as gets a face lift in the direction of it's natural state.
If we slow down we might not have so many accidents, besides where do we think we are going?

Jack
aka
PanseyBard    

Friday, February 20, 2015

App: Idea Auto Surround Sound Setup

    Just a quick one today.  A friend started talking about wanting a 3d microphone. Which being a bit high at the time sent my thoughts racing down how a thing like that would work.  Quickly returning the though of triangulation of the sound using the know quantities of the speed of sound, and the distance between the microphones.  Those are all you need to calculate where a sound originates, Once here it was easy to imagine listening to your favorite performance as if you were sitting in the middle of it.  Being able to point to a location in the room and say thats where the guitarist is standing.  Of course the recording is only half the equation, and my natural tendency toward playing devils advocate was only to happy to point out. Without a surround sound system correctly set up the effect would be diluted, or dispelled completely.  Crap this would for sure limit the appeal, I mean getting the settings right is the biggest pain in the butt for surround sound systems. That was when it hit me.  Take that same concept, and reverse it.  Make a smart phone app that has access to the microphone, and the settings and playback on the surround sound system.  The app plays a series of tones through the speakers. So the phone tells the surround sound systems to play tones out of the speakers, knowing an approximate direction to expect it from. The app tracks the time between when it triggered the tone to play, and when the mic heard the tone.  With that information the app can get a location, and adjust the settings for that to be the sweet spot.

As an aside, Many economists despite mainstream reporting of economic recovery, continue to warn of pending bubble collapses.  Now for the most part these types of events have little impact on me directly.  That doesn't change my curiosity involving this pseudo science governing our lives.  The main question asked over and over is when.  Not that I believe you can figure out the exact when, but there is a way to figure out a last possible date.  The math for when the system itself can not function, This would give you a collapse by date.  Of course it would have to be run regularly as the date would shift as policies are enacted to stave off the inevitable.  There are some known qualities, and well understood correlations.  Things such as, there is a cap on the maximum interest rate the federal reserve can set, before the US government can no longer afford to borrow the money to keep running. My understanding is this is currently about 3%.  There is also a predicable point where if the currency velocity drops below the system grinds to a halt.  Even the slow down in currency velocity is predictable, as the wealth is concentrated in fewer hands, the velocity of course slows.  These would give a great start point for the math certain end date, almost like the doomsday clock.  The other side is psychological, as people lose faith, the systems breaks down.   This is going to be tied to large indicators, that may or may not be an accurate reflection of economic health,  This does not make them any less predictable.  Such as, with compounding interest, there will come a point when people are unable to pretend anymore.  A mass holy crap, that can never be repaid, related to the rate of the debt increase, which is speeding up.  You can get the psychological by looking where it has already happened.

As always make up your damn mind

Jack
aka
PanseyBard 

Thursday, February 19, 2015

Python, Tweepy, and Twitter.....Oh My!!!!

      If you landed here from twitter chances are you clicked a link provided by a bot.  This is not uncommon, everyday the access to easy to use development tools becomes more widespread.  Having not written a line of code since the late 80's imagine my surprise at how quickly a site like  codecademy walk me through entry level python.  Six days after the whim to check out python found me looking for a entry level project to solidify my newly acquired knowledge, and expose how sorely it was lacking.  So why a twitter bot?  I do not take things overly seriously.  That being said, I respect that other people do.  In twitter there is from my perspective a unique venue of real world interaction on a scale normally reserved for a few, along with low impact.  Meaning I am unlikely to cause anyone harm while messing around and learning, So while this is not intended in anyway to be a tutorial. After 6 days of an online course, and 3 days of playing, I hardly qualify.  The bot code currently looks like this:

#imports modulesimport tweepy, time, sys, random

#assigns text file arguments to variablesargfile = str(sys.argv[1])

#enter the corresponding information from your Twitter application:
CONSUMER_KEY = '123456'#keep the quotes, replace this with your consumer keyCONSUMER_SECRET = '123456'#keep the quotes, replace this with your consumer secret keyACCESS_KEY = '123456'#keep the quotes, replace this with your access tokenACCESS_SECRET = '123456'#keep the quotes, replace this with your access token secretauth = tweepy.OAuthHandler(CONSUMER_KEY, CONSUMER_SECRET)
auth.set_access_token(ACCESS_KEY, ACCESS_SECRET)

#sets up tweepy apiapi = tweepy.API(auth)


def hourlytweet():
    filename=open(argfile,'r')
    f=filename.readlines()
    filename.close()
    api.update_status(status=f)
    print("hourly tweet posted")


def follow_unfollow():
    followers = api.followers_ids()
    friends = api.friends_ids()

    for z in followers:
        if z not in friends:
            api.create_friendship(z)

    for z in friends:
        if z not in followers:
            api.destroy_friendship(z)
    print("follow, unfollow done")

def search_retweet():
        search_terms= ['python','technology','raspberry pi','anonymous','twitter bots']
        g = random.choice(search_terms)
        results = api.search(q=g, count=1)
        for u in results:
            api.retweet(u.id)
            print("retweeted top result for", g)



x=1y=2
while x<y:
    localtime = time.asctime(time.localtime(time.time()))
    hour = int(localtime[11] + localtime[12])
    print('current hour is:',hour)
    if hour>5 and hour<24:
        hourlytweet()
        time.sleep(1700+random.randint(200,400))
        search_retweet()
    elif hour == 24:
        follow_unfollow()
    time.sleep(1700+random.randint(200,400))


It currently has the basic functions, between 6am, and midnight local time, it will tweet from a textfile, than wait roughly 30 min. Perform a search on a term selected randomly from a list, and retweet the top result. wait roughly 30min and start over. At midnight, it will check for new followers and follow them, then check for unfollowers, and unfollow them.  Next I'll be looking at adding some more functionality, perhaps checking for mentions, and favorites.  Maybe adding in an exit condition, other than a crash or keyboard break.

Thanks for reading
and always make up your own damn mind

Jack
aka
PanseyBard

Saturday, January 3, 2015

Adventures in Raspberry Pi, First Impressions

                                          My Piary

           Having had a week or so to play with the Raspberry Pi b+.  The possibilities of this device are amazing.  It brings visions of cartridge systems, only your swapping out complete Os's.  So far I've had a chance to play with 3 of the more widely used, RaspbianRetropie, and Kodi, more commonly known as Xbmc. Right off the bat a major difference is felt, yes this is a hobbyist flavor of Pc experience.  Having oft bemoaned not being in full control of "my" devices this was a welcome change, even if it meant some setup required.  For the techie types it's a blast, the versatile nature of the platform allow for usage from, basic computer to robots, or home automation.  For non techies while you may not want to be involved in the setup, you might be surprised by just what this little board could be setup to do for you.  

http://www.canakit.com/raspberry-pi-starter-ultimate-kit.html

        The basics

         Keep in mind the Pi, out of the box is a small main board, so it's all about what you add to it. The peripherals, and software make or break the experience here.  With that in mind, have a case, or some way to mount the board, it would be a shame to short something out before even getting started.  While buying a pre installed/configured  sd card does allow for plug and play type setup. Having a linux or windows based pc is a must if you intend to be more creative on build side.  While there are 4 full sized usb ports on the board, devices like external hd's will need external power source, so a powered usb hub can be almost a mandatory add on.  Have your input devices picked out in advance, if you plan on using your pi for retro gaming, or for streaming video, be sure the devices are supported, and you know where/how to install the drivers.  Command line is your friend.  We are all pretty spoiled by our intuitive gui's, and improvements in voice control.  Getting the most out of the Pi is likely to lead to spending some time in a text only environment. Get a class 10 sd card.  Having used 3 different cards thus far, a google search will yield some good information. A general rule of thumb go for the higher speed.  A wifi usb dongle, with wireless connectivity built into to almost everything these days, this might see obvious.  A really good source for information, ideas, and products is Adafruit Industries.  

        Raspbian

        The linux distro made for the Pi.  These boards we created with education in mind, so packaged in are all sorts of learning tools.  This was my first stop, and is the suggested OS to get a feel for what the Pi is about.  That being said, of the three, this is the one I have spent the least time in.  Going
forward that is sure to change, as it is likely to be the foundation for my next 3 pi projects. Those familiar with linux will be right at home, apple, and windows users will experience a bit of a learning curve.  While apple, and microsoft have been moving toward the OS taking charge of much of the day to day maintenance, linux only does what it's told.  With so many built in, and available development tools. This is a solid foundation to build on. For the application specific diy folks, the OS is built on a core, known to be solid, and designed to run with little to no supervision once set up.
Linux servers have been known to run for years without a reboot.  Certainly will have more to cover on this one in the coming weeks, as it will be the likely OS of my next few projects.


       Retropie

        Ever wanted your own arcade machine, or just hanker for some nostalgic video gaming fun.
 Retropie just might be the answer for you.  From ti99 through to mame, and up till n64 and ps1.  This is an emulation package OS using emulation station.  Configuration can be a bit tricky, and some of the emulators need a bit of tweaking.  When combined with the Pi i/o pinout you can fairly easily create professional level arcade style machines in your home.  For my purpose nothing so elaborate is needed, though I have to admit to a wish to make a dedicated arcade cabinet. Complete with arcade style controls.  Access to literally thousands of games, with the flick of a gamepad almost crosses into choice paralysis.  Setting this one up can be a bit tricky, like so much open source it's not a finished product, but forever a work in progress.  A few of the emulators will take some more time on my part to work out the settings needed.  Some are simple, and worked almost like plug and play. Making your own portable device is a realistic project, or perhaps it's a diy for the car dvd player. Of the three, this one held the most initial excitement for me.  Gaming being near, and dear.  There are just some games that never get remade, or get so changed in the updating, playing them old school is the only solution.  Of the emulators I tried, neogeo, and n64 were not plug and play style ready, and I have yet to spend any time in getting them functional.  N64 locked up the system each time I tried to load a rom, and neogeo didn't seem to function at all. A quick google search leads me to feel these can be fixed for the most part through some configuration.  Once those are functional, and some testing of the ps1 emulator, could see it replace the android mini pc as my goto for retro gaming.


       Kodi

         Kodi, or as formerly known Xbmc is an OS for a media center.  This one was of the three the one that attracted me the least originally.  Having for the last couple of years been using an android mini-pc for almost all my media needs.  I even installed an earlier version of Xbmc on my mini pc at one point.  It did not functional very well, more from the model of mini pc I have than anything else. This less than stellar earlier experience meant I had not really low expectations, just they were virtually non-existent.  Installing it started out just to see what it could do, just how many tricks could this pony learn kind of idea.  To say I have been blown away, is not praise enough, to admit that
losing the use of the Pi has stalled other exploration would be more accurate.   This is an OS designed to be controlled through a remote. Once setup is complete it can often be run right off your existing tv remote, through the hdmi cable.  Many of us are used to having apps on our TV's, netflix, and the like are common fodder for almost ever smart tv around.  Some will probably have like myself been using android mini pc's.  Kodi is like smart tv on steroids, with the ability to integrate your tv service, with data, and streaming services of the web, be prepared to get lost for a few days just playing with all the features.  This can be as custom or generic an experience as desired.  Want to set up a complete home theater experience with one click controls to home automation scripts? You can do that.  How about a central media server with plenty of storage for all your movies, pictures, and music, and access from screen in the house? You can do that!  Being an open source project, find something Kodi doesn't do, and you can learn, and code it, Or at least suggest it to one of the folks in the active community of developers.  When combined with the low power consumption, 24/7 run design of the Pi, Kodi is without a doubt a blast to design your media experience the way you want it.  Forget the ilife, Kodi allows you to really make it your own,


Next will be a vpn pi, just as soon as I can make myself go without kodi for a few days.

Jack
aka
PanseyBard