Showing posts with label Dollar. Show all posts
Showing posts with label Dollar. Show all posts

Monday, April 6, 2015

Python Twitter Bot with Tweepy

In an earlier post I laid out a bit how I was working on a twitter bot to automate the promotion of this blog.  I'm a slacker, that has a bad rap for many folks, for me it's the highest calling I can aspire. Get the most accomplished, with the least effort, and disturbance. In the words of Bruce Lee, "Be Like Water, My Friend".  In the dao of piglet, and the te of poo, it's the mystery of being the uncarved block. In the teachings of the Kabbalah or Quabbalah, which was made into such nice easy pictograms in traditional tarot, it's learning to be representative of any, while maintaining your own sense of self.  I have one Boss, and I'm really hoping that Boss never shows up, but I always am sure to recognize There is always a bigger fish. When I crashed the party of social media a few years back, it was never intended to a social outlet. I had already experienced that in years of mmorpg's, irc, bbs, going back to wargames dialers, and phone phreaking. What I was always best at was social hacking, a rather disturbing art when taken to the level of social engineering, or mass media marketing.  After all the drugs, meditation, and study I did over the course of  a lifetime, I finally started to see a pattern, it's not even an unknown pattern, matter of fact it's all over the place, or at least portions of it are.  When I finally awoke to what I had been attempting to understand, about people, and their place in creation, I found that I had missed the relative short window of opportunity to be counted among those who's say carried any weight. In social media I saw an opportunity to leverage the flood of information as a means to get ideas running through my mind. into the hands of those who could make use of them.  I accidently crashed the party of the twitter follow gangs, that handle the bulk of the twitter advertising. It's a fairly ingenious method of leveraging the split platforms of twitter, and sms, in concert to trade influence in the twitter verse. I just saw it as an expedient means of sharing ideas to everyone as quickly as possible, regardless of how they were accepted. I even refused ever offer of easy income, not out a disdain for the finer things the world has to offer, but from an understanding of the myth of an infinite growth paradigm in a zero sum game. I'm speaking of the effects of compounding interest on privatized currency creation. The same effect is seen again and again in almost every market. It's the money itself I have issue with, not currency as an idea. The accounting for who has what, and why, is important. In our current system so many are being left behind, not out of ability, but just by becoming a party to the madness which has a seeming strangle hold on our global civilization. The worship of money, and idol, a representation of something only in potential.  As I said I'm an old school hacker, I once streamlined a system for reporting the percentage of the utilities used in manufacturing in New York state were taxable.  Was a great job while it lasted, at 18 having a work from home job for 10 or 12 an hour is amazing. Taking the time each reports takes to generate from 6 hours to 2 hours, and being told your services are no longer required, not so amazing. Being allowed to help a crop of Police Officers pass a class they had no reason taking, Amazing!. Having your professor tell you there is no place in the world for programming games, again not so amazing. I stopped using computers, and started playing games with them, and then started fixing them.  In the course of my several years of tech service for a local community, what I found was they didn't actually want for me to really solve the issues, they wanted me to manage the problems that cropped up with using outdated, or mixed era systems. Sometimes they almost wanted me to take over the day to day operations of their endeavors. All well and good if it is a mentor situation, when it's a lack of desire to stay current enough to manage your own affairs, well if your not the adult, there aren't many roles left.  After exhausting some of the more entertainment oriented uses for the raspberry pi b+ I turned to what else could this little marvel do. I started seeing vpn's, and pirate drop boxes, wifi extenders to create public clouds all over. All cool concepts, but not much use to me personally, given my current circumstance. Realizing I needed to have a bit of programing brush up, I think the last time I wrote code before this was 88 or so. I hit up code academy, and picked python as it is a seemingly popular high lvl language with many popular api's. I also did some html work, I get it, and it's powerful, it's just puts me to sleep doing it. Even in python as entertaining as it was to create the bot as far as I've taken it, and I am well aware how limited it is in it's current state.  It's basic, but it will tweet for you, pick from search terms to promo others, so your account generates more attention from the community, and will auto follow new folks, and unfollow those that are just attempting to boost numbers. Once I got there essentially I had a automatic twitter promotional bot. Did you know people get paid for doing promotional work on twitter? Even though it makes sense from the marketing game standpoint, that is a slippery area, we are talking about folks that have no moral issue with using psych jobs on children to profit.
So today I'm going post the code for my bot friend. working title was twitternanny, but for easy of use I have taken to naming them after the account they manage. I currently have 2 instances running on my raspberry pi. They may come down at the end of the month, as I have already given notice, my leap of faith I guess, with no place on horizon as of yet. I guess I could always battery power it, and stick in an open wifi cloud in a tree or something, but what would be the point. I ended up using twitter as an object lesson of the insanity of exclusivity.
Enough of my ramble, I get sick of myself sometimes.
here is the code, use it abuse it.



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', 'ingress', 'news', 'breaking']
        g = random.choice(search_terms)
        g = '#' + g
        results = api.search(q=g, count=1)
        for u in results:
            if u not in alreadytweeted:
                api.retweet(u.id)
                print("retweeted top result for", g)
                alreadytweeted.append(u)



x=1
y=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:
        try:
            hourlytweet()
            time.sleep(1700+random.randint(200,400))
        except:
            print("could not post hourly tweet")
            time.sleep(1700+random.randint(200,400))
        try:
            search_retweet()
            follow_unfollow()
        except:
            print("could not post retweet")
    elif hour == 24 or hour < 6:
        try:
            search_retweet()
            follow_unfollow()
        except:
            pass
    time.sleep(1700+random.randint(200,400))

some of the basic framework came form http://www.dototot.com/how-to-write-a-twitter-bot-with-python-and-tweepy/
So big ups and respect, thanks for the head start, and to those I didn't mention, sorry I use many reference sources when I start a little project.

Thanks
Jack
aka
PanseyBard Digital PiedPiper

Saturday, March 7, 2015

Beware the Bail In

                 Back to the Spawning Grounds

Going to attempt to keep this brief, much of this I have covered before, though not from this particular angle.  Quickly to give a basic overview of why bail in's are certain to lie ahead, and will be coming to a bank near you.  Our monetary, or currency system can be likened to a pyramid structure.  Though an easier representation is monopoly, unrestrained capitalism is like a monopoly game.  Someone eventually wins, they take control, and ownership of so much, that the game freezes, no money is able to move around.  As anyone who has played monopoly knows, when this happens the game is over, someone won, and everyone else lost.  The pieces go back in the box, and everyone including the winner has to find something else to do.  In america this was well known, and up till recent time regulations were in place to make sure no one could win the game.  You could get ahead of the other players, but a cap was put on how far ahead an individual or group was allowed to get. This was not done to punish the rich, it's to ensure the system continues to function as a whole.  It ensured that if a person reached the top they either stop playing, and just maintain, or fall back into the herd, or they work to close the gap between the bottom and the top. Even if it is purely selfish motivation of coveting personal wealth.


                       The Injection Deception

Make no mistake, taxes are wealth redistribution.  Yes we pay taxes ostensibly to pay for public services, and public works projects.  You've likely heard the phrase "time is money", if we use that as a lens to understand taxes, why the highest tax brackets were hit with the highest percentage of tax burden for so long.   Most people have a job, they trade time directly for money, this is the idea of wages.  When you are in a job earning wages, the taxes you pay, can be seen as giving a portion of your time to the state every year.  So in simple terms if you pay 10% of your wages for a year, you spent 10% of your time laboring for government.  Almost like the idea of 36 days, and work for the government for nothing.  So far so good, we all like having nice public services. Like good schools, parks, water, roads, all the obvious things we all use and share.  The issues with this begin to show when a person stops trading time for money, and instead trades someone elses time for money.  This is the idea of income,  it does not have to be exploitive, though when the difference is between wages, and income are forgotten it certainly will be. When you pay rent, or a mortgage any kind of loan, and you are paying it with wages, you can consider the time spent to earn that money as spent working for that person.  As is more then likely apparent to most, you can not physically be in more than one place at the same time, your limited to working one job at a time.  This is not the case for income, in income you can be working all over, all the time, no matter what you are physically doing.
       What does this have to do with you, bail in's, and how close they might be?
Stay with me just a bit longer and it will be clear. If capitalism is like a giant monopoly game, and all monopoly games end the same way, than the governments job in managing a capitalist economy is to make sure no one actually wins.  That is the only way the economy can keep going, if to much money is allowed to be owned by any one player the economy stops.  That is where the taxes come into play, before the reforms in the 80's there was a 75% tax bracket.  This meant that if someone started making so much money that it would hurt the economy, the government would step in and take most of it, and redistribute it  back in the game.  This type of taxation, where the highest earners pay the highest %, is part of the balance to keep the game from ending.  In this set up, the government uses the taxes to provide basic services for everyone, and when it is needed. The government stimulates the economy, by taking money from the rich, and giving it to the poor.  Not in handouts, and welfare, but in public works projects.  It puts them to work, with the rich peoples money, to make new things for everyone to use.  Once the % of earnings paid in taxes inverted with the top earners paying a smaller % than the middle, and low earners. You start cutting off the flow of money to the poorest, and most vulnerable first, though all are eventually affected.  The government ends up taking from the bottom, and middle, and directly handing it to the top.  We saw this in the 2008 event, what followed is exactly what honest economic models predict.  The interest rates, and what normally thought of as safe haven or hedge assets are kept artificially low.  Money printing starts, and stays going non stop, money pours into speculative markets, instead of working it's way through the economy.  This is what measured in currency velocity, it measures how fast money moves through the economy. Along with this comes the high numbers of unemployed, or underemployed.  Though this has been hidden in changing how unemployment is calculated, all you need to do is watch labor participation rates, as more and more are forced out of the system entirely.  As this continues, those that understand how the system works begin to see they are going to lose everything when the system crashes.  They can pull out, or give away most of their money, or lose all of it.  Many of the top earners are doing just that, pulling out, or suggesting the billionaires give away half their money.  George Soros are among the pull out crowd, with Buffet, and Gates in the give away camp.  Both of these are selfishly motivated, do not kid yourself into thinking a multi billionaire giving away large sums of money is kindness.  When Buffet says it's a problem he pays a lower tax % than his secretary it's because he is being altruistic. He understands that if that continues eventually he won't have a secretary at all.  These are the QE money injections, they only kick the can down the road a little bit, till you create so much debt that everyone starts to panic, before that is allowed to happen, they will take currency out of the system.  This is the bail in, it's purpose is to keep a lid on the panic of hyper inflation, I can't say when, only that it will happen, the law to allow it was in the last budget.