Friday, June 29, 2012

Flash to be no longer supported in Android 4.1

Flash to be no longer supported in Android 4.1

Followed a bit of a thread in comments on this topic in Google + sort of laughing.  Someone mentions html5 being 10 years out of date...um...you better check your facts there...

http://en.wikipedia.org/wiki/Flash_player#Criticism

http://en.wikipedia.org/wiki/Comparison_of_HTML5_and_Flash
Some things to consider recent release of Flash, basically up until somewhat recent Flash had adopted the h.264 format which is the highly patent ridden version of a similar container format such as html5, but apparently people still have up until recently complained about flash for things like high computational processing problems (owing to the lack of gpu computational handling).


Really while complaints have gone out about android for lacking adequate coding in computational handling say with dual core, one wonders if generally in the pc computings market this were a drop in the bucket relative to all the problems that Windows and flash and other peripherals have offered at times to the overall consumer market?


Interestingly enough, the html5 format is not so difficult in terms of encoding.  The alternative to Openshot in Ubuntu and I believe Openshot both offer html5 encoding options for video rendering.  The problem with respect to getting a user community to embrace html5 may come by way of  video rendering software packages including this rendering option, and then Youtube servers I could imagine might provide automatic rendering services on their end, regardless of the received container format for the uploaded video?  If this were the case, it seems large scale deployments of html5 through mainstream sites could easily be incorporated into a given deployment infrastructure.  Literally the degree of popularity in a particular container format, need not be contingent on a given user base handling the bulk of the conversion processing here.

With and web browser/applications support,
and server support, html5 should be generally readily accessible to the general population if not already soon in the future.  What browsers may not support this...hmm...not sure if it were true at present since I haven't used the latest version of Internet Explorer for windows XP, but it seems supposedly html5(webm) weren't available for this browser, but owing to the decline in XP usage, not to mention whatever existing user population still using Internet Explorer, the other big mainstream alternatives, Firefox and Chrome generally offer this format, I believe even on Windows XP.  
The other thing to consider here also, is that even Flash isn't the same Flash of several years ago.  h.264 Flash enabled format video can run several megabytes of space relative to older Flash formats running at some 30 to forty megabytes of video (similarly html5/webm offers the same sorts of memory savings here).  This conversion deployment to h.264 was done literally overnight, and browser and server supports were probably given to similar rapid deployments.  The same could be said for html5 if furthered support is provided.  At the moment Youtube I believe is currently test trial offering this format enabled support option http://www.youtube.com/html5.  Been this way I believe for past several months.

Basically popularity of html5/webm in my opinion is probably contingent on major video traffic sites like Youtube and Vimeo offering this format option commonplace alongside other options, this would be irrespective of a given user communities actual handling of video client side (provided options exist here as is already the case in many up to date popular web browser choices).  Hard to know how html5/webm might effect other types of client based web applications here and whether or not this really could be problematic with respect to a given overall user community, but then more commonly I think its a misconception to assume a case of 'either/or' in terms of technologies deployment of this type.  It seems high traffic video hosting servers have more incentive here to keep container formats up to date not just for the sake of their clients but also for the simple fact that memory savings translates into less allocated space needed for server end storage, and fractions less of used space should already be enough incentive with respect to making viable any up to date container format which webm/html5 provides...technically Flash offers this similarly, but the differences considered here, were patents and the proprietary nature of one container format over the other.  In summation really the powerhouse in the revolution to html5/webm may well be initiatives taken by Youtube and Vimeo, and the user community would know very little differences here as a major web application, namely their browsers, would be likely conformed to this container format (deployment of this kind happened months ago with some published fanfare...at least on the Firefox side).

Saturday, June 23, 2012

Criticism of National Geographic Channel Show on Hutterites

Criticism of National Geographic Channel show on Hutterites
Isn't the National Geographic Channel show owned by Murdoch and company?   While I have loved reading the magazine version over the years, even if it were littered with its own bias and propaganda, the channel seems more a freak-show-meets-disaster-meets-neo-con tabloid at times to me then a truly world geographical survey of a respectable social science endeavor.

   Sorry if someone mistook the wrong way, but sadly, I'd suggest comparing and contrasting the magazine publication from its broadcast format.  At least at one time, the two should have seemed distinct enough.  Honestly I haven't read the published format in awhile albeit having a reference at my google + site here.

Fairness to cable...the only thing I care much to watch these days is: How its made...and some other shows.  I haven't watched the Discovery channel in years...cable television positively sucks as far as I can see...but apparently I am part of that: it don't matter demographic..and as to cable news...whew...hmm...best said propaganda...Plane missing a wheel lands at Charlie Brown airport...real sad...really sad...

Friday, June 22, 2012

EVE MS SQL importer and queries program

Eve MS SQL importer and queries program 

 Previous blog link at this site for this information concerning this program

Recommend reading previous blog post for dependencies information on what program's are needed to get this program adequately running.  While I could create a packaging installer for all of this, because links and what not falling out of date, and because its another chore creating an updater for all of these would leave it up to the user to update all of these dependencies (e.g., MS SQL Studio 2012, Eve Fansite kit, and python MS sql driver module).  Dependencies installation are very straightforward generally speaking and easy.  Although I recommend going to my previous blog post linked above for setting up your Eve database.  Someday, I may try to create an automation on the installation here, but for now I'd leave it up to you.  Will update soon with general sql queries window for users wanting to do customized searches.

Also to add profiles tab later, which allows a user to toggle, between custom searches of item groups across region markets.

Please follow instructions also at README explains how to get going with all the dependencies.   Currently looking into creating a stand alone windows executable for my script, but this is yet another task.  My code is written for native python 3.2 tk packages

Update 6/25/12: Added quick profiles selection tool, which basically allows for queries of group items and regional market groups on reprocessing pricing estimated value returns (Pricing button).

Updates 6/25/12: Easy selection for computing average on itemsindex table.  Added a query search window that can be toggled through menu interface.  The simplest query invocation for instance, can be in the form of  'Select * from tablename'  where table name is defined by one of the names
shown in the database explorer.  I've also included column values in the database explorer for refined searches. 

Updates 6/29/12:  Working on batching index data for creating running averages (approximately).  As opposed to date indexing at present in the singular as opposed to varied (multiple) batch dates computed at once.  Also creating matlibplot features, that provide graphical market plot data...except ramping the scale of plots up relative the typical eve market context (in game).  This would furnish say not merely one but many plots that could be viewed at once based upon a users customized choice of market watch items in group.  I wanted to also furnish things like comparison data of reprocessing/manufacturing cost/minerals estimation data relative to average market valuations  say in one statistical plot. Some added things to be considered here:  search indexing to return say a top list of hot purchase items or sell item based upon consideration of any number of factors:  this could be cost of loyalty points relative to average market valuations, or something like relative mineral's estimation return relative to consideration of regional market buy orders on hand...



When my crazy father actually lost his mind

When my crazy father actually lost his mind.

Ny times article.   Sort of disagree in some manner with respect to the purpose of institutionalization here.  If mental health were to cause some severe impairment with respect to the one's functioning, yes maybe it should seem the institution can be there to help treat ideally in the passing sense and hopefully neither be situated for the purpose of semi permanent housing.  A number of reasons that are bothersome with respect to the idea of committing any individual for any semi permanent reasons based upon my perceptions of such:

     Relinquishing legal power over one's self determination is a loss of right in capacity to decision making, and who supposedly better determines better one's health if not mental sanity?   People can have varying levels of paranoia at times in their own lives and still be functioning fine.  For instance, you hadn't need but turn on television (in this past decade) to see evidence of this at times, if playing up to personal insecurities weren't enough of a media cash cow at times.  Then even a great logician/mathematician suffered from extreme bouts of paranoia.  Goedel also had some environmental experience that might have had some associative trigger.  Convinced that people were out to poison him, supposedly he refused to eat all but his wife's cooking.  In the end, he likely died of malnutrition after his wife had passed away, but then he lived a long time anyways, and generally up to this point he were functioning well enough to do great work regardless.  Then if you relate to something of past experience in having fled from Germany, its easy to sympathize with him regarding his mental health condition.  If paranoia shouldn't cause problems with respect to everyday functioning like eating somewhere somehow, or being able to socialize have friends and what not, what sort of problem is that?  There maybe lots that don't trust their governments for any number of reasons however rightly or wrongly, and secondly distrust in governments shouldn't be sacrosanct heresy, unless you live in a place like China right?

    If you lived in China where infrastructure and facilities have been built around mental health professions, complaining about the authority of your government is enough to get you locked up in an institution.  In the past, it seems institutions such as these could be reserved for the slighting offenses such as social disobediences...maybe owing to lack of functioning in the proper sense to a given society.   This might have been biased more so with respect to women relative men.  At least if a man were likely then not to be able to cope and were an excessive drinker, they could have had a support group of enablers surrounding them for their given impairments?

The problem with paranoia may relate to how one functions irrespective of subsequent actions.  As much one could claim that thoughts and actions are separate vehicles in their own right.  Not everyone angry to the extent of wanting to express their anger do so.  Our minds and actions can be independent of one another, and it is why are legal systems differentiate actions versus intent, motives and anything else that attempt to link thoughts, behaviors and actions.

How we react to our circumstances could be some indicator with respect to the level of rationality that should be contained, but even then one suspects: is it such that those suffering more clearly from paranoia are impaired in some capacity to rationally question any number of circumstances which provide seeming contradictions with respect to irrational thoughts?   At least if a man could function well and highly enough in world's of logic, it seems neither even the most rational of individuals could be removed solely from paranoid ideation, or if having considered artificial intelligence in fiction, even H.A.L wasn't immune from a inset paranoia based upon programmed instructions received.  It seems at least considering paranoia there are probably two centers which counteract and resist one another in thought: one center as a means of self preservation, while another counters the others pull.  Here, by example, running thoughts could amount to something of a checklist:
'Oh you are being foolish!'  'Has anything happened to you up to now?!'  'What make's you think this way?!'  And so forth.  It seems if something of rationalities dominance is pervasive enough,  the idea of personal safety should seem born of all conditions of one's state prior.  Thus, if one were in a situation where one's life were personally in danger for good reason and measure, it seems paranoia should be a life preserving mechanism, not presenting danger to oneself, but alerting one to the sense of environmental risks and dangers lurking.  On the other hand, thoughts might get tripped up, chronic pain sufferers, for instance, tend to be more paranoid then those who don't suffer.  This isn't without measure.  Sometimes, the tendency of the human mind might be to associate physical pains with circumstances surrounding the individual, or this is to say, maybe its more difficult to avoid more so incidental events without knowing truly the causality in such associations.  Then I think to at times popular urban folklore, entire groups of American's at times have held more common beliefs about their circumstances that should seem highly paranoid, but then given the Tuskegee experiments lingering only a few decades in the past could you blame them?  Lastly if paranoia weren't okay with individual's don't hold your corporations and governments responsible for ever bit acting so cautiously the same with respect to their holdings of power and secrets.  Much of your government runs on much paranoia and compartmentalization that should have its thinker's locked up for similar thinking: were they wrong for being paranoid?




Thursday, June 21, 2012

DYI stuff

How to get over the I suck barrier when learning a new skill

Just to let you know, not a big fan of DYI initiatives, but I do it because relative to the cost for the pro job... :)

Generally speaking most from what I could gather most pros do the jobs that they could do for a living because they don't suck enough to not get hired doing what they do.  Admittedly not a pro here either.

Generally I turtle on DYI stuff, but eventually I try to make sure stuff gets done.

Some important tips that I could tell from a very brief stint in construction:

Make jigs for repeat cuts.  Don't measure the same stuff out with your tape measure.  Learn what a jig is, and know how to use it   If you set a decent one up, you can make repeated cuts of the same length in a fraction of the time spent otherwise measuring.

Make a habit of accomplishing something for the project that you are working on, and set a reasonable time frame in terms of expectations.  If you decommission the only bathroom in the house, and five other family members need to use it, and the project turns out to be a month away from completion, you might be facing relationship change in short order.  To be added to this, if you can stage your project by decommission individual things, for instance, in a bathroom, you're better situated here.  If this means putting in a temporary stop valve where one doesn't exist, to shut the water off in a section where you work without effecting the water being shut off in the entire house, do that instead. 

If you decide to install woodflooring, and keep the house semi functioning in terms of traffic over a given area that you are working in terms of installation...don't do what I did...leave the flooring nearest the sink uncovered so that water/liquids could spill on unfinished wood.  Unfortunately, when the finishing stage comes alone, the higher moisture content in the wood where spills have been left behind may not go away soon enough, and you are left when staining with obvious water marks left on the floor...this probably owing to differences in moisture content in the wood.

Takes time to do what you don't know how to do properly.  Learn the processes and methods needed to accomplish your task, and do it as efficiently as you can.  I'd say make a trial run, working with sample materials before you invest heavily into working larger scale.  This way you don't blast through much material producing much waste and cost, trying to figure out something that should be fairly easy.  If you are spending too much time and money doing something.  See if you can find answer's online, or through reference or resource materials pertaining to the work that you are trying to accomplish.  To give you an idea of top notched contracting: prefabricated well measured, well surveyed, pre cut material houses (German one's here) can be constructed in a day or two at best.  While generally less well site surveyed construction projects can translate into months of construction time spent for building a house.    If you can prefabricate your work as much as possible before installation, it may save you significant time and work.  For instance, in plumbing, instead of measure soldering, measuring soldering, measuring soldering.  Measure, measure, measure, cut, cut, cut, solder, solder, and solder.  Task switching sometimes can be more costly in terms of time spent.  If you have a template, use this before trying to construct one through your own measuring.  At least if you know the template is good, it may save you time measuring.  Know how to cut flush on your marks.  If you can cut flush, your cuts will be accurate, and you shouldn't need to re measure.  This means lining up properly on your compound miter saws, and so forth.  Basic math and trig might help, especially for angle cuts.  T square bevel and protractor for reading angles.  Should at least understand right triangle relationships for translation to 47 degree max miter adjustments.  Then sometimes, especially if you are a noob like me, you might need to measure on an as needed basis.  For instances, laying wood floors, could present enough irregularities in terms of the wood and the flooring itself (especially with aged houses) such that it could be enormously difficult laying out everything completely before nailing.  The more lengthy and the more parts required in a the process of building and designing prefabricated structures for installation means also greater possibility that an error in measure could cost other parts in design especially when incorporated into existing structures.  Unless you were well surveyed on your design here, I wouldn't bank so well on pre cutting everything at once for say a thousand separate pieces relative to something simpler to a pre fabricated design that were ten cuts ahead.  .

Anything else...not really sure here... not really a pro, probably not so great, and be reasonable about your expectations with DYI, some maybe great at doing what they do, but a lot may learn the harder way through some trial and error.  When it comes to finishing in the aesthetic sense, there can be much technique that is learned in the way of producing excellent visual results.  As stated before, if its something like a finishing technique for painting, woodworking and what not.  Practice and have your method down so that you can apply this in the larger scale sense.  Otherwise, if you are guessing every step of the way, chances are you are going to have inconsistencies appearing in your finishing work.

If its structural, its important to be level and plumb.  If its finishing, the visual lines are more important from what I gather.

The other thing here that I've found:

It sucks when you get best accomplished nearest the end of a particular project and the skills learned are no longer needed.  The differences between pros and DYIs, pros do the same sets of things in terms of skill use for labor from site to site, while its more or less probably going to be a one shot deal for maybe a decade or more depending on how frequent you change scenery and have money to spend.  I've made my mistakes.  I've probably cost some money in the process.  People can spend years in professions building up their trades to a particular level of mastery, and then techniques learned can also be coveted.  If you stink, you are probably in good company.  Some people are gifted at what they do and learn fast, while others can take time to acquire the skill, knowledge and practice doing what they do.  Likely, you probably aren't going to be a master at the DYI project you are working...get over it.  All relative in any event. 

Review of the article above: Hmm, years ago tried to do hand sawed dovetails, figured out the basic ratio formulation for a given edge length here.  The problem were that my noob hand and eyesight weren't so great at cutting machine like cuts.  There are some great woodworking videos of some real woodworking master's that can cut extremely precise by eyesight relative to drawn measurements which made me appreciate skill here on what should seem apparently so easy at first glance but is probably more deceptively hard then one could imagine.  If you could learn proper strokes with the golf club, on violin, and what not, the skill is appreciably the same.  I found that I could make some decent and nice looking cuts with my band saw up to a point, but as close as I could get to better precision.  Second in terms of design there are considerations to scaling in design it should seem.  I've heard things like golden ratios (means), but really it seems if one weren't working with a template this is another matter altogether.  Mockups, or if you spent the same amount of money on junk/scrap wood and built a to scale model, this would save you the money on the fancier wood.  I've seen some articles mentioning circular saws with fairly well designed jigs for doing table saw like work.  In any event, it seems the equipment in many cases may not be cheap.  Having access to a good workshop alongside people with knowledge and experience can help I'd imagine.  While hadn't been to this particular shop in town, that rents equipment and space in a while.  It at least then offered, access to the sorts of precision equipment, that I could probably little afford on my own in terms of building things like furniture.  If you are lucky enough to have a woodworker's shop such as these in your town, I'd probably recommend utilizing these spaces instead.  Chances are I couldn't imagine, that you'd want to invest a huge sum for table saws, band saws, routers, and nice workbench for any glue ups and what not, just for one small table project.   
 





Wednesday, June 13, 2012

Thoughts on article They do not compute

They do not compute

Interesting article.  Luddite culture is still commonplace I'd would offer.  At least you could probably go to some local grocers that have yet to install automated checkout computing systems (at least I have yet to recall seeing any, for instance, in any local Hyvee chain, or some other grocers).  In fairness, the reasoning for this could be cost of installation of these types of checkout systems relative to the potential payout for the grocer, and then it seems even those having such, there are none locally that I have seen out right removed the human cashier as an option from the checkout equation.  The reality, however, with automated checkouts are such that, it may be hard at best to know how new technology may actually displace one's position, if only any number of already open function vacancies had existed firstly that hadn't entailed exactly some distinct that were needed in terms of employment from the human resources perspective.  At least one could recall at times floating between any number of activities in a more modern context where having in the multi tasked sense, handling any number of functions for a given time allotment. It seems the idea, for instance, that someone were uniquely custodian, for instance, could be antiquated in some context.

What should technology provide?    

I've heard in recent years people having talked about the antiquated activities of creating and preparing something like spreadsheets and what not.  Prior to this, and still you could probably walk into any number of private physician's office, and see a wall of hand written files stacked organized and separated in some manner that were probably the same methods used for well over century if not greater.  It seems one could...and at least I've offered some basic code here that allows for one to construct a database without some much cost (other then time spent in learning) here that could provide referencing for medical records.  It seems you could also with a little knowledge construct field query systems rather easily on this point that could provide any number of aid with respect to accessing things like patient records and any manner of data needed.  In this way maybe a little extra time were spared in terms of filing, organizing and sorting.  This may not have addressed the feeling that some might have concerning securities vulnerabilities regarding things like patient records, especially if concerned about being responsible as a knowledgeable maintainer for system's securities, but at least even if you had hired so many people to do the work that they did, maybe they'd have more free time to do other things, and then you hadn't need necessarily resort to letting people go just because you could justify it?

My personal habits have changed inevitably as a result to technologies use in this past decade.  Maybe I were more likely to change regardless, and in some ways maybe my actions could have been different.  If I only spent more time gardening or being outdoors...as to outdoors, I'd qualify this in some way regardless, but it seems I couldn't holistically say that it were all bad.  Sure I've gone through gaming stints for a time, but then I've managed to find balances for a time between any number of activities:   programming past time projects of one sort or another, time spent writing and self publishing,  DYI stuff, self study and reading.  I'd offer in terms of data resources, I can already find answer's to questions online that could be difficult without them.  For instance, if you wanted to change the oil on a Mercedes (which happens to a bit goofier process relative to the simple screw the can filter onto your car type processes). I've seen some using a tablet for decently produced visual layout instructions on doing exactly this, you hadn't, for instance, need necessarily take your vehicle to a specialist to do these sorts of things, and as long as your resource information were trusted, you might spare yourself some time having an internet connection finding the data you need to help get your job accomplished, and then my other favorite past time, is trying to furnish data where I have seen some incompleteness in search engine results for the practical stuff that I do that I hadn't had answer's to...here the internet rules, publisher's can't exactly control this data, and you could potential make it available for free!  This isn't to say I am against pay for a given publication.  I still  like to own things like resource manuals, guide books, books well laid out and highly useful that could practically spare more time owing to the at times incompleteness relative any exhaustive search done over the internet having rendered much incompleteness regarding a particular subject matter when diving below at times the more glossary approach to information acquisition.  Considering the way that time could spent in the past, however, when I were younger, I would have more likely found my self vacillating between  passive entertainment (television, and maybe more rarely reading) and other less passive forms.  Today it seems at least I don't watch nearly the amount of television that I used to, and if seeking even online entertainment, it seems music videos could be the one thing more interesting here.  At least I suspect outside of some educational science type programming, I grew out of other television and really got bored being a 24/7 news channel junkie.   Nowadays, I find myself more entertained programming a project of one sort or another.  Maybe I do both at the same time, but generally speaking annoying news chattering tends to irritate me enough so as to disrupt my mind track so I tend to stay away from these obnoxious sources personally.  And then I am also not a big social networking junkie either, or at least if having excepted the blog.  Given the diversity of culture that could be expressed relatively so, the internet seems a much nicer alternative to the culture found  elsewhere.  Sometime if you found a source of information regarding an activity, thoughts, information and what not that you hadn't been previously exposed, how much can you learn in the sense of locality?

The internet related to time use...

Objectively, maybe its hard for me to say.  Surely I don't spend time socializing, but there is no love loss there.  Constructively  on the other hand,  I've found things to do in absence of previous cultured activities, again no love loss for the change in things that I do today.  I have to say in many ways, I love life more then I ever did in the past.  Part of this probably relates to the differences between embracing the value of learned experience and wisdom, as opposed to in other cases, being locked in something of a perpetuated culture that one's defined existence were drawn much about the social existence of others.  Like any other social form, maybe one could easily feel as alienated in the internet relative to other places, but then likely if going to certain channels and places, one could feel as likely at home, or if having something of a self definition of import of one sort or another, one hadn't in the wisdom and maturity neither so much over reliance there likewise.  I'd mention only a certain distaste for my local library on another point, but it were all a personal matter, and generally I've found so much better alternative outside of the local library system.  Maybe I'd go back if e-readers could better take advantage of the lending system here. Then your local lending systems, maybe as good as what the community is willing to stock and place on its shelves.  Then as to social networking, online chatting provides yet another informal process of communication at level that hadn't the requirements of verbal and visual communications.  Its been round a long enough time: sometimes people like to write to one another as opposed to having to get dressed up, or verbally present themselves in more structured formal ways.  Written composition gives people more time to think.   Maybe it is that people feel in some ways feel perfectly fine with all that could be had in terms of entertainment and social communication in their given environment that should leave absent the internet for purpose, but maybe if you were wanting to give your kid violin instructions and you lived in a rural area, your community might have less people and resource to support adequately someone of knowledge, skill, resource and training to provide educational services.  The internet it seems (via Skype and soon if not already now, one may already find so many other alternative sources) provides opportunities of expanding the world of any given community beyond what it once may have been constrained in the geographic sense.  I could recall one woman in an article years past, having said in effect:  I wouldn't have moved to a given remote location in Alaska, if I hadn't the internet as social communications tool available, and arguably she's probably right in saying this.  We are social people, and if we feel displaced in terms of the options provided in our culture for doing or having access to things that were once accustomed to, it could be hard transitioning to different lifestyle.  Amazingly enough for her, access to another world, that might not have been chosen any time previous had been opened up.  Urban culture need not necessarily exist in the metropolis's solely.  Pointedly it seems this indicates the disparity between cultures of a civilization where one could find so much more time in doing any number of alternative activities, hadn't meant necessarily that one would be driven to explore these alternatives that a given environment would provide.  This means that if the local cafe were the social meeting place as an alternative, maybe someone in such given community hadn't necessarily agreed or related well enough or felt stimulated enough by such the given extent of such social contact found in limitation to any of these traditional sources.  Certainly if a diverse wealth of any number of voices and opinions could be found elsewhere, also having been more selective weren't necessarily a bad thing either?   Honestly I hadn't related to or used any number of personal or business applications especially for so much the smartphone culture, especially designed for enhancing one's lifestyle in producing even so much outside of work environments a seem less lifestyles increased productivity approach.  I don't use calories counters, application constructed physical workout regimens, or consult for restaurant data, and then as to things like going out to the movies...this seems so last decade, do people still go to movie theater's anymore?  I don't play simple puzzle games, but I do like Google language immersion application, which translates parcels chunks of smaller website text for aiding one in language learning.  Then I've also heard of some cool astronomy apps that allow you to point your cell phone to a particular region of the sky to find out constellation, galaxy, star, or planetary data, and then I would probably find use with some GPS tracking stuff maybe, but I don't really go out enough to even justify this much...maybe if I worked out of my car or as a truck driver, I'd find better use here  American culture and maybe its especially Midwestern that something new in culture (relating to technology) isn't readily embraced for its own purpose and sake alone.  This is to say purpose are probably born of some desire.  Relative to other generations, having not been so accustomed to higher visual and auditory stimulus environments, our generation I think must have changed relative so.  While I am not sure what demographic data of those consistently unplugged is expressed in so far as age groups as a whole, I would confess that my suspicions were that this tended to an older generation?  If having grown up all along, and generally using a phone to communicate on occasion, more so, it seems a simple rule of locality applies so often with respect to social communication in older worlds especially limited by way of mobilities.  Namely:  out of sight, out of mind.  If our living environment should seems rewarding enough without, what incentive is there to use a given technology?    As to the offline society and world what should seem apparent of such culture as a minority.  I would suspect, if it weren't composed of any number already having some deliberative mindset in avoidance to technology that any number could have something of a formed social philosophy surrounding technology and its use.  One would guess maybe six to seven percent of the overall offline culture.  Then I think of my grandmother whom were an absolute technophobe, one because she had a hard time understanding in some way how to use a given device, as I had once thought as a kid, which could characterize some in this segment.  I'd mention while high profile senator's such a s John McCain I believe admitted to having some difficulty to using much of technology if not at one time also having difficulty with something email, former president George W. Bush (the younger Bush) supposedly hadn't even carried a personal wallet on his person.  Likely the characteristics might be attributed to social cultures in these circles, when you have so many advisers and anyone aiding in so far as tasks, you'd likely be left doing the things that you were elected in theory to do, which is make decisions and provide leadership roles, as opposed to managing things with opposable thumbs, or typing on keyboards.  Others I could imagine were a bit more technologically up to date, but it really depends.  Maybe the technophobe or less learned population segments ranks at something like another six to seven percent, leaving a smaller margin of those that aren't necessarily intimidated, and had some previous exposure and know how with respect to internet but for varying reasons choose not to use.  Probably of the some twenty odd percent of offlined American's, I would suspect they rank smallest in so far as reasons why not using the internet.  I fell in the category for several years awhile back, basically having disconnected and stayed offline for an extended duration.  I hadn't thought personally to do this for the reason that I were opposed to technology clearly, but I just hadn't found any reason:  no one to chat with long distance, wasn't programming, or do anything that really needed things like cloud storage, or anything that I couldn't do without the internet.  I weren't a big social communicator, and I could write then with pencil/pen and paper on hand just as well.  I got bored honestly after awhile though.

Sunday, June 10, 2012

Python Hashing encryption, decryption example

import hashlib
import random
alphanumer = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
              'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x',
              'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
              'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
              'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8',
              '9', '0', ' ', '.', '!', ',', '@', '#', '$', '%', '^', '&',
              '*', '(', ')', '-', '_', '+', '=', '[', ']', '{', '}', ':',
              ';', "'", '"', '?', '/', '>', '<']

class encryption:
    def generate_moduluslenkeyset(self, epart):
        epartlen = len(epart)
        setrange = range(0, 7)
        rmodlenkeyset = []
        for i in setrange:
            if epartlen > 12:
                ml = random.randint(6,12)
            else:
                ml = random.randint(6, epartlen)
            rmodlenkeyset.append(ml)
        return rmodlenkeyset
        
    
    def generate_moduluskeyset(self, epart, rmodlenkey, moduluskeyset):
        #where epart is the encrypted partition
        epartlen = len(epart)
        mk = random.randint(0,len(epart)-rmodlenkey)
        moduluskeyset +=  str(mk) + ' ' 
        return moduluskeyset

    def generate_modulushashset(self):
        setrange = range(0,7)
        mhshset = []
        mhshstring = ''
        for i in setrange:
            ri = random.randint(1, 50)
            mhshset.append(ri)
            mhshstring += str(ri) + ' '
        return mhshstring, mhshset

    def hshrtn(self, privatekey, string, itern):
        #recursive hashing function called upon itself
        #itern times
        preencryptpart = privatekey + string 
        pencryptutf16 = bytes(preencryptpart, 'utf-16')
        hshlb = hashlib.sha1()
        hshlb.update(pencryptutf16)
        hsh = hshlb.hexdigest()
        itern -= 1
        if itern > 0:
            hsh = self.hshrtn(privatekey, hsh, itern)
        return hsh

    def generatemsetlen(self, epart):
        #7 set length, although you could extend this if you wanted
        #to.
        setrange = range(0, 7)
        moduluskeyset = ''
        rmodlenkeyset = self.generate_moduluslenkeyset(epart)
        index = 0
        for i in setrange:
            rmodlenkey = rmodlenkeyset[i]
            moduluskeyset = self.generate_moduluskeyset(epart, rmodlenkey,
                                                        moduluskeyset)
            index += 1

        mset = moduluskeyset.split(' ')

        for rmodlenkey in rmodlenkeyset:
            moduluskeyset += str(rmodlenkey) + ' '
            
        return moduluskeyset, mset, rmodlenkeyset 
        
    def generate_privatekey(self):
        
        randomkey = str(random.random()) + '$' + str(random.random())
        randomkeyutf16 = bytes(randomkey, 'utf-16')
        #store this salt, alongside your raw_password
        salt = hashlib.sha1()    
        salt.update(randomkeyutf16)
        saltkey = salt.hexdigest()
        return saltkey

        
    def encrypt_message(self, raw_message):

        
        privatekey = self.generate_privatekey()
        hshkeylist = self.generate_modulushashset()
        encryptmessage = ''
        capture = False
        lindex = 0
        mhshstring, mhshset = self.generate_modulushashset()
        for letter in raw_message:
##            preencryptpart = privatekey + letter
##            pencryptutf16 = bytes(preencryptpart, 'utf-16')
##            hshlb = hashlib.sha1()
##            hshlb.update(pencryptutf16)
##            hsh = hshlb.hexdigest()
            itern = mhshset[lindex % len(mhshset)]
            
            hsh = self.hshrtn(privatekey, letter, itern)
            if not capture:
                moduluskeyset, mset, rmodlenkeyset = self.generatemsetlen(hsh)
                mset = mset[0:len(mset)-1]
##                print('e mset: ', mset)
                capture = True
                modk = len(mset)
                modl = len(rmodlenkeyset)
            mpos = lindex % modk
            mlpos = lindex % modl
##            print('mset ', mset[mpos])
##            print('mlset', rmodlenkeyset[mlpos])
            mstart = int(mset[mpos])
            mend = int(mset[mpos]) + rmodlenkeyset[mlpos]
            encryptmessage += hsh[mstart:mend]
            lindex += 1
        privatekey += ' ' + moduluskeyset + mhshstring
        print('mset ', mset)
        print('mlset ',rmodlenkeyset)
        print('mhshset ', mhshset)
        
        return encryptmessage, privatekey

    def gen_decrypttables(self, privatekeyg, encryptmessage):
        #this works in a limited context for western latin based scripts
        #you'd have to make sure to import the correct character set for
        #alternate languages.  I'd recommend encrypting into the private
        #key a language code to reduce computation times on character sets.
        keytables = privatekeyg.split(' ')
        privatekey = keytables[0]
##        print('private key: ', privatekey)
        msetmlset = keytables[1:len(keytables)-1]

        setrange = range(0, 7)
        mset = []
        mlset = []
        mhshset = []
        for i in setrange:
            mset.append(msetmlset[i])
            mlset.append(msetmlset[i + 7])
            mhshset.append(msetmlset[i + 14])
        print('mset: ', mset)
        print('mlset: ',mlset)
        print('mhshset: ', mhshset)
        
        modk = len(mset)
        modl = len(mlset)
        modh = len(mhshset)
        decryptiondict = {}
        rangec = range(1, 51)
        print(rangec)
        tabledict = {}
        for i in rangec:
            tabledict = {}
            decryptiondict[i] = tabledict
        print('computing decryption tables')    
        for letter in alphanumer:
            hsh = letter
            for i in rangec:
                tabledict = decryptiondict[i] 
##                keystring = privatekey + letter
##                bkeystring = bytes(keystring, 'utf-16')
##                hshlb = hashlib.sha1()
##                hshlb.update(bkeystring)
##                hsh = hshlb.hexdigest()
                hsh = self.hshrtn(privatekey, hsh, 1)
                tabledict[hsh] = letter
                decryptiondict[i] = tabledict
                
        
        print('finished computing decryption tables')
##        print(decryptiondict[2])
        decryptmessage = ''
        count = 0
        
        while len(encryptmessage) > 0:
##            print(decryptmessage)
            mpos = count % modk
            mlpos = count % modl
            mhpos = count % modh
            mstart = int(mset[mpos])
            mend = int(mset[mpos]) + int(mlset[mlpos])
            for hsh in decryptiondict[int(mhshset[mhpos])]:
                hshtrunc = hsh[mstart: mend]
               
                if encryptmessage.find(hshtrunc) == 0:
##                    print('found')
                    decryptmessage += decryptiondict[int(mhshset[mhpos])][hsh]
                    hshlen = len(hshtrunc)
                    encryptmessage = encryptmessage[hshlen:
                                                    len(encryptmessage)]
                    break
            count += 1
            if count > 9999999999999:
                break
            
        return decryptmessage
        
    def set_password(self, raw_password, saltkey = None):
        
        randomkey = str(random.random()) + '$' + str(random.random())
        randomkeyutf16 = bytes(randomkey, 'utf-16')
        #store this salt, alongside your raw_password
        if saltkey == None:
            salt = hashlib.sha1()    
            salt.update(randomkeyutf16)
            saltkey = salt.hexdigest()[:5]
        preencryptpass = saltkey + '$' + raw_password
        pencryptutf16 = bytes(preencryptpass, 'utf-16')
        hshlb = hashlib.sha1()
        hshlb.update(pencryptutf16)
        hsh = hshlb.hexdigest()
        self.password = '%s$%s' % (saltkey, hsh)

    def check_password(self, raw_password):
        """
        Returns a boolean of whether the raw_password was correct. Handles
        encryption formats behind the scenes.
        """
        
        saltkey, hsh = self.password.split('$')
        preencryptpass = saltkey + '$' + raw_password
        pencryptutf16 = bytes(preencryptpass, 'utf-16')
        hshlb = hashlib.sha1()
        hshlb.update(pencryptutf16)
        hsh2 = hshlb.hexdigest()
        return hsh == hsh2

    def __init__(self, rawpassword):
        self.set_password(rawpassword)
        
rawpass = 'abcdeabcde'
a = encryption(rawpass)
print(a.password)
b = a.check_password('abcdeabcde')
encryptmessage, privatekey = a.encrypt_message('The cat walked home.  The eagle has landed.  The eagle has landed.')
print('encryptmessage: ', encryptmessage)
print('privatekey: ', privatekey)
decryptmessage = a.gen_decrypttables(privatekey, encryptmessage)
print (decryptmessage)

Last generation modulates a randomly indexed re iterated hashing an original privatekey and letter (up to a 50th successive cycle), there are seven random hashing key values provided here
for this modulation cycle.
Because a privatekey is restacked onto a successively hashed encryption letter, at least in theory without having the privatekey, no successive hash generation can be reproduced here. This means effectively one shouldn't be able to discern ancestral to child relation patterns (via rehashing) without access to the private key. This should further limit pattern matching to isolated repeated segments of the same encryption blocks on a given ith hash iterated character privatekey generation. Thus in all modulating the index, length, and nth successive hash generation of a given character private key. While in theory computations should increase with added generations of rehashing of the same character privatekey encryption over successive generations up to 50 here. I've spared redundancy in processing by pre generating computed tables prior to main iteration loop decryption processing. Thus making computation virtually the same in so far as the main iteration process were concerned.
Code also provided at this link

   Hashing encryption decryption python example

Have another variant of this example, which instead varies successive encryption stacking from
letter position to letter position, only repeating the ith stacking process by global NCAP positions.
Presently possible repetitions allow for at best a possible 1/10000 chance for repeating a encryption letter splice fragment with NCAP set to 10000, where pre computed tables appear to be the lengthier point in processing.  Cache or storage of pre computed tables for a given private key  would solve this problem.

 2nd example hashing encryption decryption script python

Okay so future generation ideas here.  I wanted to create an encryption so that:
private keys remain fixed, while varying relative to history the slice of a given encrypted letter private key combination.  Hmm, a second public key could be furnished alongside the encrypted message. Here, the public key translates to a time stamp signature which uniquely signatures the encryption process of privatekey and letter to a given time frame.  In this way historical analysis can't be made with respect to present encryption structures.  The downside's to this method is greater vulnerabilities to tampering with the decryption process of the message itself, but the upside is that decryption through pattern analysis only that much harder.  Certainly the advantage to keying here, is that a message encrypted by way of private and public keys is that message authentication, provided excellent software and hardware security likely means that even if an decryption authenticator like a public key or the encrypted message itself or tampered renders a message that is indecipherable.  Meaning at least a tampered message in theory shouldn't be intruded upon in terms of content revelations.

3rd example hashing encryption decryption with private and public keys script python

No successive generation of message with the same private key produces the same result relative the other so long as public keys vary which this script provides.  Two users must have a private key (shared with no one else) but can share a public key that is transmitted with an associated message (in less secure conditions).  The public key is associated to the message that it were used in the encryption process and no other.  Changing NCAP is contingent on the character position count of your content.  One could in theory change this to any number desired at present, albeit computation times significantly increase at say 100,000 for decryption table generation.  The highest level of security in terms of pattern matching I would imagine are such that NCAP is close to matching the character position count of your message.

Saturday, June 9, 2012

Golden Age of Books

Golden Age of Books (Atlantic article)

Interesting, the same could be said for music composition up to a certain point in history.  Prior to the 20th century, mass market music entertainment more likely were in the form of folk music arts, if you were lucky to find a fiddle player, pianist (if something like the piano even existed and someone in the village could even afford this instrument), or anyone else, and orchestras, ensembles, and chambers were more so for wealthy clientele.  As to mechanical devices, maybe the music box, or some other music contraption having existed if you could afford might play some medley of one sort or another.

Industrialization no doubt would have an impact in terms of publication, but who could imagine that writings could be more prolific then what should be found today?  Maybe one has it in mind that publishing circles were more selective then today, relative to automated posting where information from such could be expected more likely filtered and screened, neither in the sense of human comprehension or worthiness for markets in terms of selling points, but amongst search relevance.   If you were looking outside of formal marketplace publication sites for data, your search engine were probably the best library indexing catalog search that should exist.  I would offer here, generally in recent years I have had more successes finding what I were looking for as opposed to not finding in terms of publication.  As to marketplace publication, its not that anytime past wouldn't presented the same opportunities in terms of qualities of writing, if people were given the same opportunities as found today.  Selectively speaking, there might be a handful of  'arena' style rock authors attracting so attention and popularity out of a given higher populace pool of writers, and then part of this could be in relation to the target audience.  I've found myself having just opened Umberto Eco's Foucault's Pendulum recently which contains a densely packed narrative infused with so much history.  Here it is interesting at least if you know something about the author himself having as much higher educational training, and alongside this having the interest in history at that which should lend itself so well in writing.  Good writings are not easy to come by always.  Some could be simple in terms of stylistic presentation, while others are much more densely elaborate.  Even the more common mass market author's may have researcher(s) having provided aid material to supplement the structure of fictional narratives, and what this means relative to the typical online posting such as mine or anyone else relying more so on the resource of self knowledge is that gaps between information, knowledge, and expectations at times could be self evident.  If you happen to be a professor having so much the wisdom of previous experience in life regarding your knowledge base, may certainly have positive effect with respect to the establishment of a base to artistically work from, but then exceptionally sometimes I have found excellent voices that were simpler in terms of narrative style that I have liked just as well...like Saramago as one example.  Maybe we are inclined to say books have declined given so much publication to all else in the marketplace that should trivial in mind and neither possessing the attributes of timeless qualities which should lend to translation throughout the ages, but really in the future, its not hard to imagine, works appearing with some level of importance, relevance and context to any future generation that were uniquely conceived relative to any time past.  In any event, I imagine finding such works not being so much difficult either, given so much technology to aid in the process of civilizations selecting such work.  We just have a perception given of decline, given so much at the buffet.
 

Friday, June 8, 2012

Increasing site traffic

     Hmm, mine tends to a lot flatter at the moment, but I were generating something like several hundred hits a day at some point previously in the past and probably close to the one thousand hits per day threshold, before I did a bit of self sabotage to my site, and caused traffic fallout removing a lot of previous posts.  At presents I am slowly increasing trending at the site as posts are actively increasing. 

The things that I could tell increasing site traffic:

1.  While generic things can sell in terms of hits.  If you are competing with the opinions of others and aren't so distinct in your messaging, you'd probably need some compensating hooks, like an existing social network built to aid in traffic generation.

2.   Whether people truly like the opinions at your site or not...granted you'd see at my site absolutely no followers, but you still may generate traffic, even if people aren't so interested in commenting.  Commenting in any event, I would think outside of certain social networks may be far and few between.  Case in point:  certain Youtube videos could have 30,000 + hits easily in a few months or years, and maybe just a handful of comments posted based upon the level of moderation provided.

3.  Finding something original to post can be a matter of reaching an audience where there are gaps in data and information on a particular 'search engine' query.  If you happen to see few decent comments or relevant posts on a topic that you feel you might have some expertise in sharing information regarding, you may be more likely to get higher ranks if  your data and information has strong relevance alongside being useful in the context of a given search query.  There's nothing crazy or 'wacko' about this logic, correct?

4.  While it may help already having social networks established in getting a new site up and running in terms of promotion.  It may not be everything.  I generate site traffic worldwide.  Albeit predominantly from the North America, followed by Russia, followed by India, followed by countries in Europe, followed by South American countries.  I don't formally have direct links or established communications with any that read my posts, and generally I'd rather keep, instead of soliciting obviously (albeit except with respect to mentions in this post) those interested in information, site traffic usage private generally speaking.

5.  I have found more strongly outside of social media postings which are generally ranked poorer in my opinion in so far as expressing anything of resource use, that my data/resource related posts tend to rank the highest in site hits.  While occasionally some odd comment about movies, books, and what not generated some interesting site traffic hits, the highest ranking hits are those topically related to: programming information, especially where again gaps of information exist in so far relevant data furnished through search engine queries, but there could be differences in the type of resource information provided and where traffic tends to go with respect to the type of information being sought.  It may be harder for me to talk, for instance, at my blog site about specifics of a biological organism where others might be generally attracted to destination sites like Wikipedia, but in terms of example data/resource information that goes beyond the scope of what Wikipedia might host in so far as relevant data and information, blog sites could fill some destination gap continuities?

  Its hard to gauge site traffic relative to content at sites that are more casual in terms of webmaster tools.  This would include google+, and facebook from what I could tell.  Albeit, supposedly friends network lists should be an implicit indicator, this isn't always true in so far as generating site interests.  While promotional links maybe of aid through social network sites, not sure how well this ranks in generating new traffic relative to existing traffic channels.  This would all depend I imagine on the relation of relevance to social networking site search queries.  Otherwise, unless you've made a big list of friends through a given social network site you might have stagnant site traffic growth for added traffic on redirects?

 In terms of fluidity and dynamics of site structures.  Artists might like the blog for any number of reasons, for example, site customization, and I've seen occasionally links to MySpace (despite the general negativity surrounding this once Facebook like site) especially where artists might like some form of content and presentation controls that hadn't existed at other social networking sites, but some are will perhaps to settle with the idea that as long as the 'site' hadn't provided too much visual obstruction to the presentation of any particular media, its also no surprise seeing any number of artists that do use social networking sites.   This is to say its not hard to imagine that people go where trending and opportunity are furnished, and many social networking (despite its own sense and structure of representation) tend to have their own unique style and presentations with respect to media content.  One of the more visually interesting sites again were So.cl if you were sharing with others a set of personal interests, especially easy with respect to posting in some visual sense any number of diverse sets of media in collage, granted these are of fixed form type from what I could say based upon presented format through the So.cl site. So.cl is convenient for providing a unique style here relative to other sites, but it seems outside of personal queries and posts, its yet another more refined controlled media form relative to the blog.

And then if you were wanting more literary, word intense presentations, alongside greater custom graphical media presentations outside social networking sites, the blog is probably a better choice.  Most other social networking sites tend to be less word rich, and much simpler in terms of personal expressions.

Personally I've made use of my blog in conjunction to personal interests, activities, thinking, and writing in the extended sense going beyond the other social media sites.  While I have posted sometimes at length at these other sites.  Unfortunately one may run (aside from the same being said at blog sites) saying too much may not necessarily generate new interests, unless you have already established interests that like your voice.  If you can create hooks in your writings, outside of being strictly utilitarian, in your site use, you might be more successful then others.

Worst posting here in site:  Layman's glance at gravitation.  A very small population of hits here.
 I suspect poor ranking probably in competition to similarity of topic in discussion or relevant information.  Layman talk and popularizing more complex science subject matter may not provide you an audience unless you have an established name.  If you are saying the same things that a Carl Sagan or any other popular scientist is saying, chances are you'd be lost in relevant discussion unless topically you were discussing topics that weren't as common relative to the other crowd that would be competing in so far as queried search results.  Generalities in discussion for already popular subject matter make for stiffer competition in terms of successful ranking, I'd guess.

You may not need be a destination site for readers to generate traffic, or at least you could be somewhat ala carte oriented in presentation where reader's generally find something useful or interesting to search by when crossing paths with your site.  The disadvantage to ala carte presentation is that your interests and thinking, especially outside of general interests of topics, may not always attract enough the attention of a reader.  Thus if you were by example discussing Quantum mechanics which one reader had thorough knowledge of, and then in the next post managed to be discussing in depth, beyond lay terms, an engineering related topic you might not generally hold destination traffic other then occasional sense.  Either way you might see traffic but mostly these could be on the basis of queried searches that were specifically topical to a particular post.

My blogs tend to be a think pad for me, and added public storage...alongside cloud stuff here, so personally I am not necessarily concerned with attracting readership necessarily nor depend upon it in terms of monetization.  Thus if need to answer some questions related to general interests that I might already have which Google hadn't readily solved for me so conveniently, I could at least scan my own personal database of storage for answers to these questions.

Finally as to the other crowd half that were at times fairly juvenile in any number of responses, like not really having too much to say other then something that should seem somewhat clever but not really, or persistently responding without so much opinion otherwise other then to be clearly personally insulting and having used any sort of personal language at that, mostly those sites I'd imagine are a: why bother?  Usually sites like this that are well established like this sure enough may have their venues and enough social interchange keeping them afloat for any length of time but I'd laugh if originality were suggested.  Sure trivial destinations could seem okay for awhile, but really its not my cup of tea.  I'd suggest anyways that blog and market sites are probably over saturated with any number of sites or personal forum poster's that litter any number of posts that would generally be quite boring if it weren't something of the language, however obnoxious that were supposedly to illicit a response.  I read an editorial that best described this:  If you are writing about your bodies physiological responses and making this availed in the public sense, its not really original, everyone defecates, everyone gets sick from time to time, everyone gets sad or angry, and what not.  Its another matter if you explain yourself and you differentiate yourself relative to others as to motivations here, and not merely for the sake of attracting reaction.  This is to say, while there are some sites that are generally successfully popular selling the trivial and superficial interests, most probably fall outside the successful category.  If it weren't for some other hook points that would keep an audience interested in a particular site.  Trying to sell the same stuff that others are selling in competition isn't great in my opinion, especially when there isn't much to be added in terms of diversity of opinion that were interesting.  I know you probably see people over at Ms complaining that whatever site interests generated here were inordinately unfair as to search engine biases (where maybe some of this at times were the relation between intellectual property rights and open source industries), and 'fallout boy' isn't selling as well as they used to...granted there's Rhianna...

   Laughing, yeah, taking interest in technology means you need to be tech's demographic?

Yeah apparently at other social networking site's there seems to be so much advice coming with respect to the idea of one's motivation.  Fairly amusing for that side of culture that reads so much more in glossary ways.

Over the years I've tired of serving the blog in the same ways which means taking up some other constructive efforts here.  Generally I avoid so much political comment here while you might on occasion see a flippant comment here or two.  Unless you have something worthwhile to say that weren't in league to any number of the same tit for tat lame insults that have been used so tirelessly in the past, political blogs generally are lame.  Again as in above the same rule as always applies, maybe some ex cia agent runs a site that happens to have any number of his own sets of opinions, but at least you hope the site is informative as opposed to just another cheerleader saying the same things.  I've seen decent local political blogs that neither attempt so much taking up any niche of blog posts that cover topically things like National politics that so much of media attention seems governed at with respect to politics in general, and if you are decent and have the no how, more power to you, you may have a good starting point for a local niche and possibly attracting some readership outside your local area of coverage.  As to national blogs a personal endeavor with lackluster social connections is probably not great.   Writing at length about the opinions and reporting of others all the time, if you don't have original source material to present on your own, is just added time in someone's reading schedule.  I'd make a prediction that there have been for sometime plenty of editorials predominating likely at times over the readership of regular news and this could be trending at some point in the future downward.  It used to be that late night comedians got in on the act (Comedy central) of taking up this lampoon of a media market niche...which ended up in one funny comment from popular comedian commentator: you know its sad when a regular media outlet, constantly talks about you talking about them, and then we are talking about a site generally attracting more traffic then myself, and having really at least in so far as the selection of materials  little to say at times on politics otherwise.  In other words, while being selective and maybe self absorbed in your writings is okay, if you aren't original, its probably going to be sad news for your blog site if you don't have lots of money to back up your social media outlet, and in this given age of much being availed in so far as information online, while it seems neat re posting stuff and having little to say...I know I've been guilty as charged....chances are everyone probably has something neat to post.  Preach to choir, political funnies...hmm, sort of lame really in my opinion, especially being spoon fed this through out the day and given little else in reading.

Then there's the crafts/pop art crowd, its okay stuff out there, not a place that I would find myself dwelling for any length of time, no offense.  Blogs of these sort need not be popular and generally I couldn't criticize for being any better with respect to artistic abilities.  Generally speaking some post rather lamely something to the effect: you have no business posting on line, get lost and what not, and don't accept mediocrity.  Only more self evident here that Snooki has a role to play in society's culture.  Sure one can rail counter culturally against so much of this society, but really just one voice amongst many.  I'd have to compliment craft sites which seem ever bit as self absorbed in their scrap booking work whose relevance were probably extended more likely to close family members and friends more likely.  If you are perfectly happy and content with your blog site, there's probably no need to read further into this post about generating site traffic.  You could probably laugh at those running a post on mediocrity and art, accept no substitutes, and buy ever bit into their market form and culture likewise.  If its interior design and Electrolux, its not worth the thousand dollars spent for the shoddy engineering of a glossy looking machine that were probably for such households that spend little time actually using such machine.  If you think of higher dollar popular arts, or things which seem so much less mediocre in mind: isn't this so much perception?  Aren't we sold on a bill of goods at times?  Does paying for me mean that something is really better in the aesthetic and utilitarian sense?  And then often times, one wonders whether there isn't something of lobby that exists at these sites reflecting inherent self promoting culture.


There's the family blog which is outside of close friends and family members will probably be limited for most.  I've visited some with personal biographies, interests, and happenings.  Honestly though, if family appears like my own in many respect, I'd relate but generally most sites that I have run across are more limited with respect to their activity.  I read excellent publication surrounding personal circumstances having happened and the subsequent aftermath of events therein.  Seemed that the blog ended well, sparing the reader of any number of trivial events that should merely serving in other circumstances as writing for its own sake.  Maybe it is that we are so conditioned by way of fiction to the notion that the interesting biographies have some story to tell, something of parable, or anything regarding a dynamic exchange between one's environment and personal circumstances.  Some are simply informative with respect to the generalities of a given family.  Having mentioned in context any number of personal happenings and events but not necessarily designed or oriented in the sense of facilitating a story.  These need not always be the case, but the audiences reading may in some cases be limited.  Graduations, marriages, and births that say little more will probably limit the scope of any number of reader's attention.  Lots of family's have births, marriages, and graduations.  Having any number of personal experiences that express some diversity relative to these more common experiences may likely attract greater readership attention.  At least I personally know that I find myself more likely to read writings relating to personal biographies which provide the reader a sense of the character that is being written about.  One need not provide too much information, or you could try your hand at fiction...however poor or not so poor you were.  You might be successful and maybe not, but then maybe its an excellent side project to try writing some personal biography, or fiction otherwise.  I've recently tried short story fiction because it seems a lot easier, and even if I am not so good, it provides opportunity to change prospectively writing styles.  Anyways, even if you aren't so good, who cares the days right?  Its not like you have to be an expert, or good to take a creative writing class or attempt writing and the more attempts could mean better success, or it could mean something like my past attempts at the viola, sort of off key and really not so good, but does it matter?  Probably not.


As to site traffic after a day.  Any number of hits drawn the first day, tend to be common like other posts, indicating something of a destination audience with traffic tapering off in time.  There have been exceptions to this rule with some of my posts which have generated over longer spans of time site traffic...usually again I would suspect because of existing in a niche amongst other much poorer ranked relevantly furnished data.  Microsoft can complain all they want, but if they think that for instance site traffic weren't generated because of correlative relevance here, they'd be sadly mistaken.

Chances are you may not likely have a rock star oriented site.  If you looking for millions of hits a day, likely it helps being established.  There may be an appreciable site audience common entertainment: humor, popular music, and then movie media.  One could offer aside from much formulation and structure provided, that unless your site weren't entertainment oriented, resources sites unless rich in diversity are probably going to be more selective in terms of appreciable audiences.  I've sort of made my site into a sort of personal hobbies and interests sort of place.  This isn't to say that there isn't an audience that connects out there with some of my interests, but as individual alone I may be limited in terms of those connecting with the things that I am doing, and if this is what you are aiming for, so much the better success to you.  At least you hadn't generally need to cater so much in the subtractive sense to personal interests for the sake of general entertainment, or  in other words just because your site isn't arena rock, doesn't mean that its not worthy.  Maybe you like being eccentric, obscure, arcane, less commonly thought of...or could care less one way or the other, and then some potential audience may find you in time...at least for some artist this weren't found in their own lifetimes.  Thus far I've generated over thirty thousand hits, if it gives an idea between the relation of subject matter and site traffic.  There are people that may find the things you say relevant and interesting.  The world is a diverse place.  The simplest rule that I have found.  If you can't find an answer to a question with your search engine, and you know the answer, post something about it.  You may find yourself getting ranked better then you might suspect, and you've not only helped yourself but others in posting.

Thursday, June 7, 2012

Hash libraries and encryption

      Albeit not a subject matter that I have significant expertise, and generally while I would think that hashing simple password were still not a great idea.  I'd demonstrate briefly why:

Okay so if you have python installed, you'd probably have access to some basic encryption stuff here. 

You could do some basic password encryption as follows:

import hashlib
m = hashlib.sha1()
m.update(b"abcde")
print(m.hexdigest())

you'd get some output like

>>>
03de6c570bfe24bfc328ccd7ca46b76eadaf4334

which is pretty large looking bit of string that could take awhile to cipher.

The problem is that if I using a set of common password strings, hashed the same string 'abcde'

I'd get the same hash ed return value, and I'd have solved the cipher ed code quickly, but the good news is that there are a number of hashing routines (different encryption methods) other then .sha1() for instance,  and a hack would have to have any number of common passwords translated by way of any number of hash methods , so you might more safe when it comes to the gamble of hashing a very easy password, and given likely inter web securities, hacks might have so many chances before being locked out potentially of password attempts, but it still might be wise to pick a more difficult password that included mixed case alpha numerics that were greater then several character/digits in length.  Now if you had some custom hashing encryption method that were decent enough, I'd imagine you might be safer with even a easier password, but at the moment.  If you are using more common encryption software that hadn't generated unique keys for the hashing method that only you had access to...the above method, for instance, wouldn't be so great for simple passwords in my opinion.

The following is a variation from a method that I posted online.  While this creates a random sequence added to the 5 places of the encrypted password, it customizes and mixes the hashing process for password generation.  Here you presumably need to hold onto the saltkey data key.  You'd need to likely store this somewhere on your personal computer or write it down.  Its only 5 places/digits in length here, and then make sure it is recalled back in the class function either from memory or adding to a global variable in your python file...real world implementation would be slightly different also having disabled the set_password function in the encryption class upon instantiation.  Generally speaking I would tend to think using the method, your very simple password saved alongside your personal saltkey would be a much harder encryption to break.

import hashlib
alphanumer = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
              'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x',
              'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
              'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
              'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8',
              '9', '0', ' ', '.', '!', ',', '@', '#', '$', '%', '^', '&',
              '*', '(', ')', '-', '_', '+', '=', '[', ']', '{', '}', ':',
              ';', "'", '"', '?', '/', '>', '<']
class encryption:
    def generate_privatekey(self):
        import random
        
        randomkey = str(random.random()) + '$' + str(random.random())
        randomkeyutf16 = bytes(randomkey, 'utf-16')
        #store this salt, alongside your raw_password
        salt = hashlib.sha1()    
        salt.update(randomkeyutf16)
        saltkey = salt.hexdigest()[:7]
        return saltkey
        
    def encrypt_message(self, raw_message):

        
        privatekey = self.generate_privatekey()
        encryptmessage = ''
        for letter in raw_message:
            preencryptpart = privatekey + letter
            pencryptutf16 = bytes(preencryptpart, 'utf-16')
            hshlb = hashlib.sha1()
            hshlb.update(pencryptutf16)
            hsh = hshlb.hexdigest()
            encryptmessage += hsh
        return encryptmessage, privatekey

    def gen_decrypttables(self, privatekey, encryptmessage):
        #this works in a limited context for western latin based scripts
        #you'd have to make sure to import the correct character set for
        #alternate languages.  I'd recommend encrypting into the private
        #key a language code to reduce computation times on character sets.
        decryptiondict = {}
        for letter in alphanumer:
            keystring = privatekey + letter
            bkeystring = bytes(keystring, 'utf-16')
            hshlb = hashlib.sha1()
            hshlb.update(bkeystring)
            hsh = hshlb.hexdigest()
            decryptiondict[hsh] = letter
        decryptmessage = ''
        count = 0
        while len(encryptmessage) > 0:
##            print(decryptmessage)
            for hsh in decryptiondict:
                if encryptmessage.find(hsh) == 0:
                    decryptmessage += decryptiondict[hsh]
                    hshlen = len(hsh)
                    encryptmessage = encryptmessage[hshlen:
                                                    len(encryptmessage)]
                    break
            count += 1
            if count > 9999999999999:
                break
            
        return decryptmessage
        
    def set_password(self, raw_password, saltkey = None):
        import random
        randomkey = str(random.random()) + '$' + str(random.random())
        randomkeyutf16 = bytes(randomkey, 'utf-16')
        #store this salt, alongside your raw_password
        if saltkey == None:
            salt = hashlib.sha1()    
            salt.update(randomkeyutf16)
            saltkey = salt.hexdigest()[:5]
        preencryptpass = saltkey + '$' + raw_password
        pencryptutf16 = bytes(preencryptpass, 'utf-16')
        hshlb = hashlib.sha1()
        hshlb.update(pencryptutf16)
        hsh = hshlb.hexdigest()
        self.password = '%s$%s' % (saltkey, hsh)

    def check_password(self, raw_password):
        """
        Returns a boolean of whether the raw_password was correct. Handles
        encryption formats behind the scenes.
        """
        
        saltkey, hsh = self.password.split('$')
        preencryptpass = saltkey + '$' + raw_password
        pencryptutf16 = bytes(preencryptpass, 'utf-16')
        hshlb = hashlib.sha1()
        hshlb.update(pencryptutf16)
        hsh2 = hshlb.hexdigest()
        return hsh == hsh2

    def __init__(self, rawpassword):
        self.set_password(rawpassword)
        
rawpass = 'abcdeabcde'
a = encryption(rawpass)
print(a.password)
b = a.check_password('abcdeabcde')
encryptmessage, privatekey = a.encrypt_message('The cat walked home.  The eagle has landed.  The eagle has landed.')
print('encryptmessage: ', encryptmessage)
print('privatekey: ', privatekey)
decryptmessage = a.gen_decrypttables(privatekey, encryptmessage)
print (decryptmessage)
Basically a bit untested but example of thought code using an encryption method, couldn't speak as to its relative strengths or weakness here, but at least it provides a working encryption example here. Variations that I could think on the method above: extend the private key (creating more higher permutation sets on the encrypted message, and then create a modulus set that refer to the select truncation of the encrypted script object in an ordered way. For the later example, consider this you could instead choose a fragment of the original encrypted message, and then construct yet another set of random keys to be added to the present private key which instructs the user by way of ordering to search the overall hash object say with a 4 position truncation of the original message say starting at index position 3 of the original message. Thus a modulus set added to private key could look like: 02345. Which is  electing index 0 for the emessage fragment, index position 2 for the second,..., index 5 for fifth position. Then repeating this cycle of indexing on the whole of the message for letter encryption. Generally speaking the method above with a 7 position length private key, assuming a hack knew exactly the size of the private key to be generated, via brute force method could take 91^7 = 51,676,101,935,731 computations which is already up there in so far as code cracking algorithms. Adding larger private key sets extends this so that traditional brute force methods I would imagine are wholly impractical, and adding the modulus key for fragmenting parts of the original encryption method, reduces the size of the message more practically to that of the original.
Thus a stronger encryption version could look like this:
import hashlib
import random
alphanumer = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
              'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x',
              'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
              'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
              'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8',
              '9', '0', ' ', '.', '!', ',', '@', '#', '$', '%', '^', '&',
              '*', '(', ')', '-', '_', '+', '=', '[', ']', '{', '}', ':',
              ';', "'", '"', '?', '/', '>', '<']

class encryption:
    def generate_moduluskeyset(self, epart, moduluskeyset):
        #where epart is the encrypted partition
        epartlen = len(epart)
        mk = random.randint(0,len(epart)-6)
        moduluskeyset +=  str(mk) + ' ' 
        return moduluskeyset

    def generatemsetlen(self, epart):
        #7 set length, although you could extend this if you wanted
        #to.
        setrange = range(0, 7)
        moduluskeyset = ''
        for i in setrange:
            moduluskeyset = self.generate_moduluskeyset(epart,
                                                        moduluskeyset)
        return moduluskeyset, moduluskeyset.split(' ')
        
    def generate_privatekey(self):
        
        randomkey = str(random.random()) + '$' + str(random.random())
        randomkeyutf16 = bytes(randomkey, 'utf-16')
        #store this salt, alongside your raw_password
        salt = hashlib.sha1()    
        salt.update(randomkeyutf16)
        saltkey = salt.hexdigest()
        return saltkey

        
    def encrypt_message(self, raw_message):

        
        privatekey = self.generate_privatekey()
        encryptmessage = ''
        capture = False
        lindex = 0
        for letter in raw_message:
            preencryptpart = privatekey + letter
            pencryptutf16 = bytes(preencryptpart, 'utf-16')
            hshlb = hashlib.sha1()
            hshlb.update(pencryptutf16)
            hsh = hshlb.hexdigest()
            if not capture:
                moduluskeyset, mset = self.generatemsetlen(hsh)
                mset = mset[0:len(mset)-1]
##                print('e mset: ', mset)
                capture = True
                modk = len(mset)
            mpos = lindex % modk
##            print('mset ', mset[mpos])
            mstart = int(mset[mpos])
            mend = int(mset[mpos]) + 6
            encryptmessage += hsh[mstart:mend]
            lindex += 1
        privatekey += ' ' + moduluskeyset
        return encryptmessage, privatekey

    def gen_decrypttables(self, privatekeyg, encryptmessage):
        #this works in a limited context for western latin based scripts
        #you'd have to make sure to import the correct character set for
        #alternate languages.  I'd recommend encrypting into the private
        #key a language code to reduce computation times on character sets.
        keytables = privatekeyg.split(' ')
        privatekey = keytables[0]
##        print('private key: ', privatekey)
        mset = keytables[1:len(keytables)-1]
##        print(mset)
        modk = len(mset)
        decryptiondict = {}
        for letter in alphanumer:
            keystring = privatekey + letter
            bkeystring = bytes(keystring, 'utf-16')
            hshlb = hashlib.sha1()
            hshlb.update(bkeystring)
            hsh = hshlb.hexdigest()
            decryptiondict[hsh] = letter
        decryptmessage = ''
        count = 0
        
        while len(encryptmessage) > 0:
##            print(decryptmessage)
            mpos = count % modk
            mstart = int(mset[mpos])
            mend = int(mset[mpos]) + 6
            for hsh in decryptiondict:
                hshtrunc = hsh[mstart: mend]
                if encryptmessage.find(hshtrunc) == 0:
                    decryptmessage += decryptiondict[hsh]
                    hshlen = len(hshtrunc)
                    encryptmessage = encryptmessage[hshlen:
                                                    len(encryptmessage)]
                    break
            count += 1
            if count > 9999999999999:
                break
            
        return decryptmessage
        
    def set_password(self, raw_password, saltkey = None):
        
        randomkey = str(random.random()) + '$' + str(random.random())
        randomkeyutf16 = bytes(randomkey, 'utf-16')
        #store this salt, alongside your raw_password
        if saltkey == None:
            salt = hashlib.sha1()    
            salt.update(randomkeyutf16)
            saltkey = salt.hexdigest()[:5]
        preencryptpass = saltkey + '$' + raw_password
        pencryptutf16 = bytes(preencryptpass, 'utf-16')
        hshlb = hashlib.sha1()
        hshlb.update(pencryptutf16)
        hsh = hshlb.hexdigest()
        self.password = '%s$%s' % (saltkey, hsh)

    def check_password(self, raw_password):
        """
        Returns a boolean of whether the raw_password was correct. Handles
        encryption formats behind the scenes.
        """
        
        saltkey, hsh = self.password.split('$')
        preencryptpass = saltkey + '$' + raw_password
        pencryptutf16 = bytes(preencryptpass, 'utf-16')
        hshlb = hashlib.sha1()
        hshlb.update(pencryptutf16)
        hsh2 = hshlb.hexdigest()
        return hsh == hsh2

    def __init__(self, rawpassword):
        self.set_password(rawpassword)
        
rawpass = 'abcdeabcde'
a = encryption(rawpass)
print(a.password)
b = a.check_password('abcdeabcde')
encryptmessage, privatekey = a.encrypt_message('The cat walked home.  The eagle has landed.  The eagle has landed.')
print('encryptmessage: ', encryptmessage)
print('privatekey: ', privatekey)
decryptmessage = a.gen_decrypttables(privatekey, encryptmessage)
print (decryptmessage)
Here pattern predictions in theory or more likely broken up with respect to partitions of the original encrypted letter and privatekey. In theory repetitions of the encrypted letter alongside private key, are less likely repeated in the process of constructing the encrypted message. Thus making for it harder say for pattern recognition on the subset string blocks.

One could further increase the difficulty in patterning of encrypted partition segments on the overall message, by creating another modulus code set that relates to the lengths of the actual partition segments.  Thus instead of having say always 6 unit length segments, one could vary this pattern over the set of the entire message.  Thus a  space ' ' could represent in one instance 'a7'  and in another instance '7ahme'  in another instance, so that frequency distributions and expectations of patterns are further scrambled.  One should be careful in limiting partition lengths of the original encrypted message as nearly single place or two place representations can possibly lead to equivalences with hashed character sets.  Thus the finally I have:


import hashlib
import random
alphanumer = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
              'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x',
              'y', 'z', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
              'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
              'W', 'X', 'Y', 'Z', '1', '2', '3', '4', '5', '6', '7', '8',
              '9', '0', ' ', '.', '!', ',', '@', '#', '$', '%', '^', '&',
              '*', '(', ')', '-', '_', '+', '=', '[', ']', '{', '}', ':',
              ';', "'", '"', '?', '/', '>', '<']

class encryption:
    def generate_moduluslenkeyset(self, epart):
        epartlen = len(epart)
        setrange = range(0, 7)
        rmodlenkeyset = []
        for i in setrange:
            if epartlen > 12:
                ml = random.randint(6,12)
            else:
                ml = random.randint(6, epartlen)
            rmodlenkeyset.append(ml)
        return rmodlenkeyset
        
    
    def generate_moduluskeyset(self, epart, rmodlenkey, moduluskeyset):
        #where epart is the encrypted partition
        epartlen = len(epart)
        mk = random.randint(0,len(epart)-rmodlenkey)
        moduluskeyset +=  str(mk) + ' ' 
        return moduluskeyset

    def generatemsetlen(self, epart):
        #7 set length, although you could extend this if you wanted
        #to.
        setrange = range(0, 7)
        moduluskeyset = ''
        rmodlenkeyset = self.generate_moduluslenkeyset(epart)
        index = 0
        for i in setrange:
            rmodlenkey = rmodlenkeyset[i]
            moduluskeyset = self.generate_moduluskeyset(epart, rmodlenkey,
                                                        moduluskeyset)
            index += 1

        mset = moduluskeyset.split(' ')

        for rmodlenkey in rmodlenkeyset:
            moduluskeyset += str(rmodlenkey) + ' '
            
        return moduluskeyset, mset, rmodlenkeyset 
        
    def generate_privatekey(self):
        
        randomkey = str(random.random()) + '$' + str(random.random())
        randomkeyutf16 = bytes(randomkey, 'utf-16')
        #store this salt, alongside your raw_password
        salt = hashlib.sha1()    
        salt.update(randomkeyutf16)
        saltkey = salt.hexdigest()
        return saltkey

        
    def encrypt_message(self, raw_message):

        
        privatekey = self.generate_privatekey()
        encryptmessage = ''
        capture = False
        lindex = 0
        for letter in raw_message:
            preencryptpart = privatekey + letter
            pencryptutf16 = bytes(preencryptpart, 'utf-16')
            hshlb = hashlib.sha1()
            hshlb.update(pencryptutf16)
            hsh = hshlb.hexdigest()
            if not capture:
                moduluskeyset, mset, rmodlenkeyset = self.generatemsetlen(hsh)
                mset = mset[0:len(mset)-1]
##                print('e mset: ', mset)
                capture = True
                modk = len(mset)
                modl = len(rmodlenkeyset)
            mpos = lindex % modk
            mlpos = lindex % modl
##            print('mset ', mset[mpos])
##            print('mlset', rmodlenkeyset[mlpos])
            mstart = int(mset[mpos])
            mend = int(mset[mpos]) + rmodlenkeyset[mlpos]
            encryptmessage += hsh[mstart:mend]
            lindex += 1
        privatekey += ' ' + moduluskeyset
        print('mset ', mset)
        print('mlset ',rmodlenkeyset)
        
        return encryptmessage, privatekey

    def gen_decrypttables(self, privatekeyg, encryptmessage):
        #this works in a limited context for western latin based scripts
        #you'd have to make sure to import the correct character set for
        #alternate languages.  I'd recommend encrypting into the private
        #key a language code to reduce computation times on character sets.
        keytables = privatekeyg.split(' ')
        privatekey = keytables[0]
##        print('private key: ', privatekey)
        msetmlset = keytables[1:len(keytables)-1]

        setrange = range(0, 7)
        mset = []
        mlset = []
        for i in setrange:
            mset.append(msetmlset[i])
            mlset.append(msetmlset[i + 7])
        print('mset: ', mset)
        print('mlset: ',mlset)
        
        modk = len(mset)
        modl = len(mlset)
        decryptiondict = {}
        for letter in alphanumer:
            keystring = privatekey + letter
            bkeystring = bytes(keystring, 'utf-16')
            hshlb = hashlib.sha1()
            hshlb.update(bkeystring)
            hsh = hshlb.hexdigest()
            decryptiondict[hsh] = letter
        decryptmessage = ''
        count = 0
        
        while len(encryptmessage) > 0:
##            print(decryptmessage)
            mpos = count % modk
            mlpos = count % modl
            mstart = int(mset[mpos])
            mend = int(mset[mpos]) + int(mlset[mlpos])
            for hsh in decryptiondict:
                hshtrunc = hsh[mstart: mend]
                if encryptmessage.find(hshtrunc) == 0:
                    decryptmessage += decryptiondict[hsh]
                    hshlen = len(hshtrunc)
                    encryptmessage = encryptmessage[hshlen:
                                                    len(encryptmessage)]
                    break
            count += 1
            if count > 9999999999999:
                break
            
        return decryptmessage
        
    def set_password(self, raw_password, saltkey = None):
        
        randomkey = str(random.random()) + '$' + str(random.random())
        randomkeyutf16 = bytes(randomkey, 'utf-16')
        #store this salt, alongside your raw_password
        if saltkey == None:
            salt = hashlib.sha1()    
            salt.update(randomkeyutf16)
            saltkey = salt.hexdigest()[:5]
        preencryptpass = saltkey + '$' + raw_password
        pencryptutf16 = bytes(preencryptpass, 'utf-16')
        hshlb = hashlib.sha1()
        hshlb.update(pencryptutf16)
        hsh = hshlb.hexdigest()
        self.password = '%s$%s' % (saltkey, hsh)

    def check_password(self, raw_password):
        """
        Returns a boolean of whether the raw_password was correct. Handles
        encryption formats behind the scenes.
        """
        
        saltkey, hsh = self.password.split('$')
        preencryptpass = saltkey + '$' + raw_password
        pencryptutf16 = bytes(preencryptpass, 'utf-16')
        hshlb = hashlib.sha1()
        hshlb.update(pencryptutf16)
        hsh2 = hshlb.hexdigest()
        return hsh == hsh2

    def __init__(self, rawpassword):
        self.set_password(rawpassword)
        
rawpass = 'abcdeabcde'
a = encryption(rawpass)
print(a.password)
b = a.check_password('abcdeabcde')
encryptmessage, privatekey = a.encrypt_message('The cat walked home.  The eagle has landed.  The eagle has landed.')
print('encryptmessage: ', encryptmessage)
print('privatekey: ', privatekey)
decryptmessage = a.gen_decrypttables(privatekey, encryptmessage)
print (decryptmessage)

This last generation of encryption leads to variable character set partition for character encryption representations.  This further compounds to difficulty in detecting not only frequency of character distributions by way of pattern matching, but also increases difficulty in detecting total character lengths of an inset message.  One could suspect really long messages and files that are encrypted still could have some relative frequency of string encryption occurring with higher proximity.  It seems that even further methods could be devised in randomizing encrypted character partition string distributions, however, or if really interested I am sure you could find advanced research in the area of this topic elsewhere on the internet.

encryptionscript in python

This works off python's native modules so you hadn't need download or install any other modules to operate.

Oblivion

 Between the fascination of an upcoming pandemic ridden college football season, Taylor Swift, and Kim Kardashian, wildfires, crazier weathe...