So far in studying aspects of application development in pygtk, Ubuntu's quickly interface seems to provide fairly quick entry into application development, although it seems perhaps other graphical based aspects of development could improve. Namely, it appears primary 2d graphical rendering interface is cairo, utilising vector based graphics libraries (this is the graphic development used for instance in the popular application Inkscape). One could fairly quickly find Cairo python development tutorials (in the brief) through google if you wanted further information...a link here for example. Interestingly enough vector graphics provides some advantages that typical rendering tools might not provide so readily, for example, re scaling flexibility.
As to things like openGL, the interface appears to be more arduous...namely, going to any number of libraries neither formally it seems installed or provided to say a quickly app development package. You'd probably have better luck, I'd mention :) with webGL application development here for quicker app development entry, so this happens to be me on my wish list the Linux platform. I might suggest the Ogre app, which is actually a game rendering package, but language is in C++ here I believe, and you'd have to create translated bindings between python here to if you were to go to something like this. Supposedly gui tools exist for Ogre which potentially makes for interesting app/game development here, but you'd be getting away formally from gtk/pygtk development generally, and certainly one may be asking with all the hassle of creating bindings between python and c++ why not just formally stay in non python native language?!
So wish lists at the moments for quickly app development on Ubuntu, tutorials inclusion for graphics design outside standard gtk/pygtk framework provided for existing vector graphics in Quickly development starter kit. At present gtk 3+ libraries as mentioned in previous posts will be transitioned for the Quickly app development package, but python based tutorials appear yet to be fully expressed, especially with respect to say Cairo interfacing. I would also add to this wish list openGL library kit interface to existing development packages. At least it seems in terms of graphics development, this could aid both game, graphics, and a whole host of other application development possibilities for Ubuntu if ease in design possibility is made even easier, at present it seems a bit arduous in terms of diving right into.
While potential graphics programs such as blender provide interesting 3d art modelling software, that could be of potential use for application development, it seems more so applications such as this are more useful for both still and animation art purposes, but neither as easily integrated with respect to stand alone application development purposes...for instance, exporting mesh data and material information to some openGL python package would seem to take some assembling groundwork on the part of a Ubuntu developer as far as I could tell, and at least certainly beyond the aspect of easy entry level work. Again, you'd probably have better luck exporting, for example, blender data to a webGL app before you'd get this into a stand alone on Ubuntu?! :)
On the positives, Ubuntu's Quickly app certainly made it so much easier for entry level application development here. Maybe its not where app development trends are concerned, but it seems non browser based stand alone apps could still provide something here that browser based apps don't provide?! If you wanted to design apps commonly found in the format of spreadsheets, and traditional button, entrybox, notepad text boxes, with the advantage of 2D rendering graphic rendering tools interface (Cairo), Ubuntu's Quickly seems to be a good start. Relative to python's tk libraries which are also fairly nice and easy to use, but outside of windows (Vista, 7, and XP) look stylistically crude and out of sync on the Ubuntu platform, leaving open potentially design, for simple 2d games (e.g., Chess, Checkers, Sudoku, Crossword puzzles) likewise while any furthered development beyond this seems neither so readily accessible even with the wealth of development resources provided online.
Friday, March 30, 2012
Thursday, March 29, 2012
New python module search function
New search function on module library...abstracted a bit more here, recommend using with caution with high recursion counts...unfortunately through runtime exception with open recursion (at tree depth) for gi.repository libraries here, so implemented a counter to avoid run time error.
To implement function typically call at terminal you'd want to set modulepkg to instance object of the loaded module...e.g.,
>>a = gi.repository
if the searchword module file is saved as file searchword.py
>>searchword.searchword(a, 'Gtk', 3)
Searches the repository libraries at recursion depth of three levels at each top level directory paths.
def findresult(a, word):
results = []
for item in a:
if word in item:
results.append(item)
return results
def searchword(modulepkg, word, recursioncnt):
resultsa = []
a = dir(modulepkg)
asearch = findresult(a, word)
if recursioncnt > 0:
for item2 in a:
exception1 = False
exception2 = False
try:
modulename = eval('modulepkg.__name__')
#print(modulename)
exec('import ' + modulename)
except:
pass
try:
b = eval(modulename + '.' + item2)
except:
print('execption trying modulepkg.',item2)
exception1 = True
if exception1:
try:
b = eval('modulepkg.'+ item2)
except:
exception2 = True
pass
if not exception2:
results = searchword(b, word, recursioncnt-1)
for item2 in results:
strngpath = item + '.' + item2
asearch.append(strngpath)
return asearch
To implement function typically call at terminal you'd want to set modulepkg to instance object of the loaded module...e.g.,
>>a = gi.repository
if the searchword module file is saved as file searchword.py
>>searchword.searchword(a, 'Gtk', 3)
Searches the repository libraries at recursion depth of three levels at each top level directory paths.
def findresult(a, word):
results = []
for item in a:
if word in item:
results.append(item)
return results
def searchword(modulepkg, word, recursioncnt):
resultsa = []
a = dir(modulepkg)
asearch = findresult(a, word)
if recursioncnt > 0:
for item2 in a:
exception1 = False
exception2 = False
try:
modulename = eval('modulepkg.__name__')
#print(modulename)
exec('import ' + modulename)
except:
pass
try:
b = eval(modulename + '.' + item2)
except:
print('execption trying modulepkg.',item2)
exception1 = True
if exception1:
try:
b = eval('modulepkg.'+ item2)
except:
exception2 = True
pass
if not exception2:
results = searchword(b, word, recursioncnt-1)
for item2 in results:
strngpath = item + '.' + item2
asearch.append(strngpath)
return asearch
Wednesday, March 28, 2012
Trying to find some additional information for pythonic cairo call implementations in Gtk 3+
Okay so I hadn't found through google search for gtk3+ an api for Gdk package gi.repository libraries...
or at least trying to determine pythonic implementation routines of cairo objects in gtk 3+ and am having difficulty finding translated resources from gtk 2+ to 3+, given tutorial at this site. Notwithstanding that written information is in c fine, seems only including code snippets where c translation seems a bit formidable from text in terms of pythonic equivalents. While other non api but tutorial site here does furnish implementation examples, it is strictly devoted to Gtk package objects...very basic stuff here and I hadn't generally found Cairo implement examples.
At this point constructed very basic module directory search of say either gtk or gdk libraries in the gi.repository. At least running in python this can furnish function/object data pythonic calls here.
So firstly I'd mention if you are using Idle, you'd need to load the path to gi.repository...you can do this with the following lines:
import sys
a = sys.path
a.append('/usr/lib/python2.7/dist-packages')
or from your terminal launching python the usual way ($python) normally if you have something like quickly installed, the path above should by default be installed.
Similarly if you need to load the path any module, you can add this using the method above with your path assigned.
from gi.repository import Gtk
from gi.repository import Gdk
def searchword(word):
def findresult(searchlist):
results = []
for item in searchlist:
if word in item:
results.append(item)
return results
resultsa = []
resultsb = []
a = dir(Gtk)
b = dir(Gdk)
asearch = findresult(a)
bsearch = findresult(b)
return asearch, bsearch
So this particular code, allows for a search of the Gtk, and Gdk directories...
this may give some additional python translated calls for utilising these libraries.
or at least trying to determine pythonic implementation routines of cairo objects in gtk 3+ and am having difficulty finding translated resources from gtk 2+ to 3+, given tutorial at this site. Notwithstanding that written information is in c fine, seems only including code snippets where c translation seems a bit formidable from text in terms of pythonic equivalents. While other non api but tutorial site here does furnish implementation examples, it is strictly devoted to Gtk package objects...very basic stuff here and I hadn't generally found Cairo implement examples.
At this point constructed very basic module directory search of say either gtk or gdk libraries in the gi.repository. At least running in python this can furnish function/object data pythonic calls here.
So firstly I'd mention if you are using Idle, you'd need to load the path to gi.repository...you can do this with the following lines:
import sys
a = sys.path
a.append('/usr/lib/python2.7/dist-packages')
or from your terminal launching python the usual way ($python) normally if you have something like quickly installed, the path above should by default be installed.
Similarly if you need to load the path any module, you can add this using the method above with your path assigned.
from gi.repository import Gtk
from gi.repository import Gdk
def searchword(word):
def findresult(searchlist):
results = []
for item in searchlist:
if word in item:
results.append(item)
return results
resultsa = []
resultsb = []
a = dir(Gtk)
b = dir(Gdk)
asearch = findresult(a)
bsearch = findresult(b)
return asearch, bsearch
So this particular code, allows for a search of the Gtk, and Gdk directories...
this may give some additional python translated calls for utilising these libraries.
Sunday, March 25, 2012
Changing background color of an editable gtk widget
Okay it seems to work fine with labels, entry, objects, but gtkTextView objects appear by default to retain default 'white' background. Tried several methods for changing background using event box, but it appears color or pixmap images are rendered occluded (blocked) by gtkTextView objects background...hmm...still looking for solution on this.
Easy method for changing background with pixmap image with pygtk 2+...should work in gtk3+ as well
winstyle = window.get_style().copy()
pixbuf = gtk.gdk.pixbuf_new_from_file(filepath)
pixmap, mask = pixbuf.render_pixmap_and_mask()
winstyle.bg_pixmap[gtk.STATE_NORMAL] = pixmap
window.set_style(winstyle)
If you are working with glade you can find the widow style by referencing your ui top level window...
for example,
a window called mydialog, would have its style referenced as above using
winstyle = self.ui.mydialog.get_style().copy()
just need to substitute 'self.ui.mydialog' for 'window' above
and 'filepath' refers to path to pixmap file (I typically use .png files).
Okay it seems to work fine with labels, entry, objects, but gtkTextView objects appear by default to retain default 'white' background. Tried several methods for changing background using event box, but it appears color or pixmap images are rendered occluded (blocked) by gtkTextView objects background...hmm...still looking for solution on this.
Easy method for changing background with pixmap image with pygtk 2+...should work in gtk3+ as well
winstyle = window.get_style().copy()
pixbuf = gtk.gdk.pixbuf_new_from_file(filepath)
pixmap, mask = pixbuf.render_pixmap_and_mask()
winstyle.bg_pixmap[gtk.STATE_NORMAL] = pixmap
window.set_style(winstyle)
If you are working with glade you can find the widow style by referencing your ui top level window...
for example,
a window called mydialog, would have its style referenced as above using
winstyle = self.ui.mydialog.get_style().copy()
just need to substitute 'self.ui.mydialog' for 'window' above
and 'filepath' refers to path to pixmap file (I typically use .png files).
Friday, March 23, 2012
Will we ever talk to animals
Hmm. Human civilisations are centered about spoken and written languages, but even here physical communication in language is not entirely absent either which probably predominates much so in the animal kingdom. As to the segment of dolphins, it seems that communications arranged on provisional arrangements (i.e., rewarding communication with provision), one I would suspect were more likely to see higher receptivity to communication exchanges arranged in domesticated versus wild animals...wild animals, while not always true, may have less provisional exchange in their communicative relationships (i.e.,neither having the expectation beyond say dependency time frames in others for solving problems or provisional arrangements). Interestingly enough I recall a researcher describing the difference between a wolf and a dog standing in front of a cage with reward inside. The cage were locked, and the differences in behaviour were that the wolf, would persistently engage at disassembling the cage until having retrieved its reward alone, while a dog might whine and patiently sit in front of the cage but neither be so inclined to pick apart the cages assembly to figure out how to obtain such reward. Here it seems the dog's mindset evolved uniquely around relations with other humans, appeared generally more likely to think of human's solving problem's inherent to rewards unless a human clearly provided trained instruction in disassembling the cage, whereas the mindset of the wolf neither appeared as expectantly waiting for human s to train or provide...
While provision based relationships may at times be found in the wild, it seems in theory, if provisional exchange were limited in some capacity, one could imagine, that corresponding interests in exchange and curiosity would also be limited. While human's may once have lived more strongly to rhythmic pull of nature, it seems this had changed over time when more strongly arrhythmic tendency should make possible human survival (best example that I can think of is sexual reproductive cycles). Why would animals have innate curiosity to think about complex abstract thoughts when centers in thinking are predominantly oriented in application to life more strongly with respect to immediate concerns. Of course, this isn't to say that those engaged in cyclic migratory patterns, aren't without the ability to think of future, but it seems more likely to me, this is more instinctual in nature. Likewise for complex patterns of expression, maybe there is much more below the surface of possible verbal exchange? Its seems retentive memory in animals could be quite different from one animal species to the other, and likewise so to psychological emotional factors which help determine thought processes in so far as intelligent communication exchange. Lastly one wonders especially where conditions for survival are more stringent, whether variance in behaviours are neither strongly pronounced say as in comparison to the differences found psychologically speaking from one human to the next?
Getting back to the example of the wolf, while potentially wolves, it seems owing to their potential gravitation towards social arrangements inside packs, might offer something of a communication potential between them and humans, it seems this form of communication would be limited. Here wolves at times coordinating socially, say in hunting groups, would do so, not merely with any other animal or wolf, but within even tighter social strictures defining such pack. Thus one might ask: if more complex communication is likely evolved according to intra species, intra group social arrangement, how limited might curiosity and communication remain outside such social arrangement? It seems if evolution and instinct were factored into this, no wonder that animals at times might have very limited interests in a world quite strange and foreign to their own. If curiosity, observation, and learning are neither necessary and immediate requisites with respect to their functioning in a removed context relative their native habitat, it seems other predominant potentials for thought and communication may take foothold such that intra group social behaviours and communication should weight more strongly at higher potential? A dolphin it seems
Hmm. Human civilisations are centered about spoken and written languages, but even here physical communication in language is not entirely absent either which probably predominates much so in the animal kingdom. As to the segment of dolphins, it seems that communications arranged on provisional arrangements (i.e., rewarding communication with provision), one I would suspect were more likely to see higher receptivity to communication exchanges arranged in domesticated versus wild animals...wild animals, while not always true, may have less provisional exchange in their communicative relationships (i.e.,neither having the expectation beyond say dependency time frames in others for solving problems or provisional arrangements). Interestingly enough I recall a researcher describing the difference between a wolf and a dog standing in front of a cage with reward inside. The cage were locked, and the differences in behaviour were that the wolf, would persistently engage at disassembling the cage until having retrieved its reward alone, while a dog might whine and patiently sit in front of the cage but neither be so inclined to pick apart the cages assembly to figure out how to obtain such reward. Here it seems the dog's mindset evolved uniquely around relations with other humans, appeared generally more likely to think of human's solving problem's inherent to rewards unless a human clearly provided trained instruction in disassembling the cage, whereas the mindset of the wolf neither appeared as expectantly waiting for human s to train or provide...
While provision based relationships may at times be found in the wild, it seems in theory, if provisional exchange were limited in some capacity, one could imagine, that corresponding interests in exchange and curiosity would also be limited. While human's may once have lived more strongly to rhythmic pull of nature, it seems this had changed over time when more strongly arrhythmic tendency should make possible human survival (best example that I can think of is sexual reproductive cycles). Why would animals have innate curiosity to think about complex abstract thoughts when centers in thinking are predominantly oriented in application to life more strongly with respect to immediate concerns. Of course, this isn't to say that those engaged in cyclic migratory patterns, aren't without the ability to think of future, but it seems more likely to me, this is more instinctual in nature. Likewise for complex patterns of expression, maybe there is much more below the surface of possible verbal exchange? Its seems retentive memory in animals could be quite different from one animal species to the other, and likewise so to psychological emotional factors which help determine thought processes in so far as intelligent communication exchange. Lastly one wonders especially where conditions for survival are more stringent, whether variance in behaviours are neither strongly pronounced say as in comparison to the differences found psychologically speaking from one human to the next?
Getting back to the example of the wolf, while potentially wolves, it seems owing to their potential gravitation towards social arrangements inside packs, might offer something of a communication potential between them and humans, it seems this form of communication would be limited. Here wolves at times coordinating socially, say in hunting groups, would do so, not merely with any other animal or wolf, but within even tighter social strictures defining such pack. Thus one might ask: if more complex communication is likely evolved according to intra species, intra group social arrangement, how limited might curiosity and communication remain outside such social arrangement? It seems if evolution and instinct were factored into this, no wonder that animals at times might have very limited interests in a world quite strange and foreign to their own. If curiosity, observation, and learning are neither necessary and immediate requisites with respect to their functioning in a removed context relative their native habitat, it seems other predominant potentials for thought and communication may take foothold such that intra group social behaviours and communication should weight more strongly at higher potential? A dolphin it seems
Ideas concerning innovation
A broad view of technology it seems has on the one hand empowered individuals throughout the world (e.g., communications technology), but on the other hand with respect to the ability of individuals alone in producing basic materials, seems in many cases limited. After all, who could imagine alone having been involved in all aspects of producing say a car, right down to mining for any particular mineral deposits or having drilled for crude oil, so that this could be transformed into the plastics that would used throughout the cars construction, not withstanding its tires. It seems the idea of the individual therein, without some social reliance on the collection of individuals has and may keep for some time something of a social revolution from occurring with respect to high end technological production?! But maybe some day this would change? Some might find it hard to believe, that anything readily found in the environment could be so readily gathered and shaped so as to find constructive purpose in the fabrication of say a motor vehicle, but maybe someday, greater innovation will have occurred, allowing people greater access and ability to construct and make technology of their own without so much reliance on massive industries therein to accomplish these tasks for them?
Wasted talent: Greece's young unemployed majority
followed this in series to other related articles.
The sad reality of economic falter at times is those caught in the wake of such seem to have less self sustaining resources to aid with respect to basic necessities in life: access to shelter, access to food. Particularly disturbed reading of parents potentially giving up their children on the inability to provide basic adequate care here. Where potentially, at least for now, being able to produce abundant grain harvests have generally worldwide led to the significant declines of starvation generally speaking, it seems inequity and the possibility of malnutrition has re emerged somewhat at least if trends are accurate(?), neither by way of insufficient technology or resources to grow food, but merely happen stance to economic conditions which has made in accessible economic sustainability. Its seems the abstract and over abundant complexity of economies illustrate the nature of divorce of practical life to that of modern life in recent times ironically, or at least this seems to be on a trending rise. I've said this before...I could understand malnutrition on the rise because of disease, war, plague, water shortages, and any other natural condition having emerged to create conditions effecting significant agricultural production and/or distribution. I don't understand conditions of famine when the food can be produced and is available.
followed this in series to other related articles.
The sad reality of economic falter at times is those caught in the wake of such seem to have less self sustaining resources to aid with respect to basic necessities in life: access to shelter, access to food. Particularly disturbed reading of parents potentially giving up their children on the inability to provide basic adequate care here. Where potentially, at least for now, being able to produce abundant grain harvests have generally worldwide led to the significant declines of starvation generally speaking, it seems inequity and the possibility of malnutrition has re emerged somewhat at least if trends are accurate(?), neither by way of insufficient technology or resources to grow food, but merely happen stance to economic conditions which has made in accessible economic sustainability. Its seems the abstract and over abundant complexity of economies illustrate the nature of divorce of practical life to that of modern life in recent times ironically, or at least this seems to be on a trending rise. I've said this before...I could understand malnutrition on the rise because of disease, war, plague, water shortages, and any other natural condition having emerged to create conditions effecting significant agricultural production and/or distribution. I don't understand conditions of famine when the food can be produced and is available.
Wednesday, March 21, 2012
The Swiss army knife hydrogen fuel car idea
Fuel Cell
Solar powered renewable electrolysis seems promising...seems like a vehicle could be designed inherently that has conversion and reverse conversion of water and hydrogen/oxygen coupled with with solar arrays mounted on the vehicle (supplying power for electrolysis creation of hydrogen gas, and oxygen), which could then be resupplied into the system to provide in reverse conversion processes electricity at anode/cathodes?! Seems in the theory this should be nearly self contained in terms of power generation. No liquid or gas fuels in theory would need be added. It seems in nature the translation of electrical energy into kinetic energy bleeds energy from the system that would otherwise be used in the reverse electrolysis conversion process. Inherent problems: are sufficiently ensuring enough hydrogen in the system as a fuel source for electrical power generation. This energy would be used solely for translation to kinetic energy (powering the vehicle), while energy added into the system, solar, electrical source are responsible for electrolysis conversion of water into hydrogen, and oxygen. The inherent problem of solar alone is that the rate of power generation for solar powers may neither be in keeping to the electrical/kinetic energy requirements in powering such vehicle. This could be similar to let your car bask in the sun for awhile to refuel its hydrogen gas supply, or merely provide electricity (via outlet connector) to on board storage array, or alternately, make the hydrogen tank open to fresh supply, adding gas into the system, while taking byproduct water produced that such fueling station could use in fuel creation models. Furthermore if hydrogen fuel infrastructure remains a problem, it seems incorporating any number of power generation capabilities into the fold may solve the problem of lacking power or fuel therein. For instance, any incorporated gas powered generator could provide flexibility for using fossil fuel into the vehicle on a temporary basis that would be used for the energy needs of the car. This sort of hydrogen fuel cell hybrid, would be the equivalent of the 'swiss army knife' of the auto mobile...potentially running on both tradtional and alternative fuels, and alternative energies. :)
While potentially including say fuel power generators into the mix potentially makes design that much more complicated, perhaps, inherent added complexities are offset in ways such that the overall functioning of the vehicle is neither hindered say if the fuel power generator need be replaced. Similarly, the same could be true for solar arrays designed for replacement...
Sort of fun thinking about this one.
I don't know if I had the ability to design a car, I'd make it likely neither so fitting to present consumption throw away models that are inherent in our economy.
Finally it would be nice...if combustion engine designs were like my old msr stove...can run on propane, aircraft fuel, diesel, regular, butane, and so forth...why in the world engines need be designed for single fuel types is an interesting question to me...is it really an engineering design problem, or is it just our present fuel economy culture?!
As part of the California Hydrogen Highway initiative California has the most extensive hydrogen refueling infrastructure in the U.S.A. As of June 2011 California had 22 hydrogen refueling stations in operation.[114] Honda announced plans in March 2011 to open the first station that would generate hydrogen through solar-powered renewable electrolysis.[citation needed] South Carolina also has two hydrogen fueling stations, in Aiken and Columbia, SC. According to the South Carolina Hydrogen & Fuel Cell Alliance, the Columbia station has a current capacity of 120 kg a day, with future plans to develop on-site hydrogen production from electrolysis and reformation. The Aiken station has a current capacity of 80 kg. The University of South Carolina, a founding member of the South Carolina Hydrogen & Fuel Cell Alliance, received 12.5 million dollars from the United States Department of Energy for its Future Fuels Program.[116]
Solar powered renewable electrolysis seems promising...seems like a vehicle could be designed inherently that has conversion and reverse conversion of water and hydrogen/oxygen coupled with with solar arrays mounted on the vehicle (supplying power for electrolysis creation of hydrogen gas, and oxygen), which could then be resupplied into the system to provide in reverse conversion processes electricity at anode/cathodes?! Seems in the theory this should be nearly self contained in terms of power generation. No liquid or gas fuels in theory would need be added. It seems in nature the translation of electrical energy into kinetic energy bleeds energy from the system that would otherwise be used in the reverse electrolysis conversion process. Inherent problems: are sufficiently ensuring enough hydrogen in the system as a fuel source for electrical power generation. This energy would be used solely for translation to kinetic energy (powering the vehicle), while energy added into the system, solar, electrical source are responsible for electrolysis conversion of water into hydrogen, and oxygen. The inherent problem of solar alone is that the rate of power generation for solar powers may neither be in keeping to the electrical/kinetic energy requirements in powering such vehicle. This could be similar to let your car bask in the sun for awhile to refuel its hydrogen gas supply, or merely provide electricity (via outlet connector) to on board storage array, or alternately, make the hydrogen tank open to fresh supply, adding gas into the system, while taking byproduct water produced that such fueling station could use in fuel creation models. Furthermore if hydrogen fuel infrastructure remains a problem, it seems incorporating any number of power generation capabilities into the fold may solve the problem of lacking power or fuel therein. For instance, any incorporated gas powered generator could provide flexibility for using fossil fuel into the vehicle on a temporary basis that would be used for the energy needs of the car. This sort of hydrogen fuel cell hybrid, would be the equivalent of the 'swiss army knife' of the auto mobile...potentially running on both tradtional and alternative fuels, and alternative energies. :)
While potentially including say fuel power generators into the mix potentially makes design that much more complicated, perhaps, inherent added complexities are offset in ways such that the overall functioning of the vehicle is neither hindered say if the fuel power generator need be replaced. Similarly, the same could be true for solar arrays designed for replacement...
Sort of fun thinking about this one.
I don't know if I had the ability to design a car, I'd make it likely neither so fitting to present consumption throw away models that are inherent in our economy.
Finally it would be nice...if combustion engine designs were like my old msr stove...can run on propane, aircraft fuel, diesel, regular, butane, and so forth...why in the world engines need be designed for single fuel types is an interesting question to me...is it really an engineering design problem, or is it just our present fuel economy culture?!
Monday, March 19, 2012
http://www.thedailybeast.com/cheats/2012/03/19/assad-wife-i-m-the-real-dictator.html#commentsI am the real dictator
hmm...thinking of Antoinette's guards according to history there, at least in one bloody episode quite gruesome. Illustrating something of the problem of violence in societies and rule when it is no longer peaceful... The logical ends to violence may be that crackdowns serve to put an end to unrest where it has occurred but may also increase the levels of internal hostilities bringing about condemnation by world communities for actions especially when they have been perceived as unusually brutal and hostile, and to this point, making more enemies then friends acting this way is costly (Machiavellian logic I imagine). Hmm, in any even, hope there is peace regardless, and that especially that civilians are getting access to medical and food aid.
hmm...thinking of Antoinette's guards according to history there, at least in one bloody episode quite gruesome. Illustrating something of the problem of violence in societies and rule when it is no longer peaceful... The logical ends to violence may be that crackdowns serve to put an end to unrest where it has occurred but may also increase the levels of internal hostilities bringing about condemnation by world communities for actions especially when they have been perceived as unusually brutal and hostile, and to this point, making more enemies then friends acting this way is costly (Machiavellian logic I imagine). Hmm, in any even, hope there is peace regardless, and that especially that civilians are getting access to medical and food aid.
Diet
Watched Nanook of the North yesterday, now that's a diet up there for the Northerners!
Everything from raw Walrus meat, raw Seal...salmon in the summer time I think if you are lucky (during spawning season), and the kids consider raw cod liver oil (castor oil?!) a real treat.
But actually, probably right, genetic/epigenetic dietary adaptations to this...hmm...
have to admit, having a fondness for salty ridden snacks, and too much sugar, although don't mind eating healthier at times...makes me wonder if this condition were owing to at times to nutritionally poor diets... during Roman times, the lower classes there might have been lucky really to have any meat cutlet in weeks, months, or years in populated centers, ironic because you might think that better trade access would afford better diet to most citizens in populated civilised centres...most likely these classes ate something like a grain mush porridge, with milling stone fragments mixed in?! Hmm...anyways, not sure where cheese ranks in ancient dietary possibilities, outside pastoral communities that might have afforded possibly easier access...yoghurt might have existed, along with kefir, and something else...ah King Midas's last meal consisted of something like barley, honey, and mutton or lamb, read this somewhere supposedly, but the lamb/muttton, but no cheese, or dairy from what could be determined based upon modern day forensic analysis of his stomach. Cheese could have been around as long as pastoralist were taking advantage of raising domesticated livestock, and something like intestinal membranes of animal guts (usually sheep/goat/cow) would naturally have coagulating enzymes that would cause curdling of milk here...alongside any bacterium which could sufficiently produce enough acidification in the milk to likewise aid curdling. The effect of this were also probably naturally giving a longer shelf life to then dairy, since at least potentially a benign bacterial population could by chance squeeze out the chance of other undesirables for a time in such niche. In any event, hard to say, how potentially something like milk allergies or lactose intolerance would fare in so far as those typically raised generation after generation to these products. Really it seems to me consistent access to meat is relatively modern with respect to most diets, excepting perhaps indigenous subsistence based diets, and local diets were meat could be managed to be placed on the dinner table on a more daily basis, but even in the Americas as possibly elsewhere in the world, there seems to have been evidence that bounty weren't always consistently coming. Hence if dietary nutrition mattered in so far as physiological size, people were generally up until this past century, smaller in size overall relative to the size of peoples today, especially in developed first world nations.
In a way I kind of understand his attraction to what could be considered less nutritional here...while refined grains and sugars weren't generally found, on the other hand, nutritionally poorer foods in some locales may been far more commonly consumed throughout the better part of the year?!
As to Nanook, despite the possibility of having access to the nutrient rich aspects of sea life in his part of the world, he succumbed to starvation, apparently attempting to hunt for deer inside the Hudson interior, not sure if this pattern of hunting were so common?! I would offer generally speaking, we likely have some adaptation to not only poor diets, but being able to starve, more commonly though where humans are not as well adapted perhaps is in the context of consistent high caloric access. Supposedly some epigenetic studies have linked diabetes possibly to feast/famine cycles in successive generations, possibly a genetic trigger in early adolescent males may control the likelihood of successive generations being more prone in the aging context to is commonly referred as Adult onset. Read of examples, perhaps anecdotal here, where generally speaking diabetes tended to be more rare, up until a modern context when general improvement in dietary access not increased lifespans, but also seemed to bring about the increased likelihood of adult onset diabetes prone populations. Perhaps controlled fasting may be of some aid, here, but then I wouldn't recommend it absolutely without advice from a doctor on this one.
Watched Nanook of the North yesterday, now that's a diet up there for the Northerners!
Everything from raw Walrus meat, raw Seal...salmon in the summer time I think if you are lucky (during spawning season), and the kids consider raw cod liver oil (castor oil?!) a real treat.
But actually, probably right, genetic/epigenetic dietary adaptations to this...hmm...
have to admit, having a fondness for salty ridden snacks, and too much sugar, although don't mind eating healthier at times...makes me wonder if this condition were owing to at times to nutritionally poor diets... during Roman times, the lower classes there might have been lucky really to have any meat cutlet in weeks, months, or years in populated centers, ironic because you might think that better trade access would afford better diet to most citizens in populated civilised centres...most likely these classes ate something like a grain mush porridge, with milling stone fragments mixed in?! Hmm...anyways, not sure where cheese ranks in ancient dietary possibilities, outside pastoral communities that might have afforded possibly easier access...yoghurt might have existed, along with kefir, and something else...ah King Midas's last meal consisted of something like barley, honey, and mutton or lamb, read this somewhere supposedly, but the lamb/muttton, but no cheese, or dairy from what could be determined based upon modern day forensic analysis of his stomach. Cheese could have been around as long as pastoralist were taking advantage of raising domesticated livestock, and something like intestinal membranes of animal guts (usually sheep/goat/cow) would naturally have coagulating enzymes that would cause curdling of milk here...alongside any bacterium which could sufficiently produce enough acidification in the milk to likewise aid curdling. The effect of this were also probably naturally giving a longer shelf life to then dairy, since at least potentially a benign bacterial population could by chance squeeze out the chance of other undesirables for a time in such niche. In any event, hard to say, how potentially something like milk allergies or lactose intolerance would fare in so far as those typically raised generation after generation to these products. Really it seems to me consistent access to meat is relatively modern with respect to most diets, excepting perhaps indigenous subsistence based diets, and local diets were meat could be managed to be placed on the dinner table on a more daily basis, but even in the Americas as possibly elsewhere in the world, there seems to have been evidence that bounty weren't always consistently coming. Hence if dietary nutrition mattered in so far as physiological size, people were generally up until this past century, smaller in size overall relative to the size of peoples today, especially in developed first world nations.
In a way I kind of understand his attraction to what could be considered less nutritional here...while refined grains and sugars weren't generally found, on the other hand, nutritionally poorer foods in some locales may been far more commonly consumed throughout the better part of the year?!
As to Nanook, despite the possibility of having access to the nutrient rich aspects of sea life in his part of the world, he succumbed to starvation, apparently attempting to hunt for deer inside the Hudson interior, not sure if this pattern of hunting were so common?! I would offer generally speaking, we likely have some adaptation to not only poor diets, but being able to starve, more commonly though where humans are not as well adapted perhaps is in the context of consistent high caloric access. Supposedly some epigenetic studies have linked diabetes possibly to feast/famine cycles in successive generations, possibly a genetic trigger in early adolescent males may control the likelihood of successive generations being more prone in the aging context to is commonly referred as Adult onset. Read of examples, perhaps anecdotal here, where generally speaking diabetes tended to be more rare, up until a modern context when general improvement in dietary access not increased lifespans, but also seemed to bring about the increased likelihood of adult onset diabetes prone populations. Perhaps controlled fasting may be of some aid, here, but then I wouldn't recommend it absolutely without advice from a doctor on this one.
Sunday, March 18, 2012
Spying
Shrug, likely a reality and likely to be an even bigger reality in the future.
As long as one doesn't deal with some pro active morons that try to push reaction probe, denying something like heat or utilities and so forth for any number of bad theories running the gambit.
The only reason why I say this is that...spicing things up with on the in justice side of things runs the logical risk of backfire down the road when support falls out...transient power analysis?!
Anyways, I understand generally...no one likes a report or two on them, in terms of what could be 'benign' intel gathering, but when it comes to just downright bad behaviour, it seems kind of moronic and risky to me...but that's just me...
Shrug, likely a reality and likely to be an even bigger reality in the future.
As long as one doesn't deal with some pro active morons that try to push reaction probe, denying something like heat or utilities and so forth for any number of bad theories running the gambit.
The only reason why I say this is that...spicing things up with on the in justice side of things runs the logical risk of backfire down the road when support falls out...transient power analysis?!
Anyways, I understand generally...no one likes a report or two on them, in terms of what could be 'benign' intel gathering, but when it comes to just downright bad behaviour, it seems kind of moronic and risky to me...but that's just me...
Saturday, March 17, 2012
Filmmaker behind 'Kony 2012' video taken to mental health facility
Sympathise with the guy, been personally hammered in the head a lot of times over the years, whew...although discussions on the topic of human rights abuse could be more well rounded with respect to that part of the globe...while the intent of pointing out issues with a particular individual leader seems noble, it may be missing the larger picture of human rights atrocities throughout the region in the historical and ongoing sense, extending beyond this individual alone?!
Sharing Public Breakdowns: What We Can Learn From Jason Russell
hmm...not to worry there Jason, lots in history have dealt with difficult times. Some think its a point of dismissal, but really in the historical view of things, some having suffered at such times, went on to be remembered not for a temporary psychological or physiological breakdown, but for their contributions given. Charles Darwin was one I could think of hand that suffered later in life, both mentally and physically.
Going against the stream and grain of things can be difficult at times.
Can't confirm..but had the word 'Ergot' flashing in mind the other day...just to let you know...prior to hearing the news report.
Sharing Public Breakdowns: What We Can Learn From Jason Russell
hmm...not to worry there Jason, lots in history have dealt with difficult times. Some think its a point of dismissal, but really in the historical view of things, some having suffered at such times, went on to be remembered not for a temporary psychological or physiological breakdown, but for their contributions given. Charles Darwin was one I could think of hand that suffered later in life, both mentally and physically.
Going against the stream and grain of things can be difficult at times.
Can't confirm..but had the word 'Ergot' flashing in mind the other day...just to let you know...prior to hearing the news report.
Friday, March 16, 2012
sad, but not really meaningless here at least wouldn't seem this way. Hard perspectively to say when where and how, but inevitably threshold gets reached, and apocalypse comes in short order with a fairly swift hand. Building fire in the land, isn't so good when it becomes imbalanced...bad Feng shui... sort of advising in the kind rock, paper, scissors sort of way. Anyways, peace! :)
Sunday, March 11, 2012
Ubuntu 12 + beta install
Appears to work.
Had to reinstall Ubuntu Quickly for upgrade. Removed per error in subprocess.call(..., env) portion 'env'...just remove this 'env' argument where occurring in create.py and run.py files. If you can't get root privileges in gedit (the windows way) to modify the file at this using:
sudo pico /path/to/file/create.py
and so froth
ctrl-x and save as necessary.
Don't forget to examine Porting to gtk3 if you plan on porting any developed/developing code to the newer upcoming OS.
Had to reinstall Ubuntu Quickly for upgrade. Removed per error in subprocess.call(..., env) portion 'env'...just remove this 'env' argument where occurring in create.py and run.py files. If you can't get root privileges in gedit (the windows way) to modify the file at this using:
sudo pico /path/to/file/create.py
and so froth
ctrl-x and save as necessary.
Don't forget to examine Porting to gtk3 if you plan on porting any developed/developing code to the newer upcoming OS.
Saturday, March 10, 2012
The I Dont Blame that Generation for being what it is
The Go Nowhere Generation
Hmm...fitting to the bill here, crashed and burned on a life adventure, burn too much even for some measurable risk, bear conservation kicks in...that simple, don't move unless you need to really...
why make life harder then it need be?!
What pushed people to move and go back then...seems to me, feeling like choices were much limited, and making alternatives a necessity by comparison, if great social movements and wars were a reflection of this.
speculation on why this were so...
As to picking up and going, this is a bit of a psychology and sociology question it seems. Moving away from friends, family, social networks and re inventing a new far away from home, isn't exactly easy for all, even when social technologies have made living abroad or elsewhere in the country easier. Sure if you had means, you might be able to afford child care, or having any other things at once disposal to make due in situations where you might have needed help, but as to Nuclear family alone, it seems a modern industrial invention, people that move in lower socio economic strata face challenges that others in higher brackets don't face, they don't have perhaps as much the resources I might argue, and compensations socially would likely be in order to make amends when setting down roots in a new place.
As to personal example, you move, you figure out the basics like getting a job where you move to, or at least know that not having a company transfer in place and just moving where you like to go rather then choosing on the basis of opportunities provided, means necessarily dealing with something simple like having a local address perhaps for the place that you locally desire working. You might not get hired, for instance, if you made it obvious you were technically homeless, or made it clear you were living out of a motel and so forth, but it really depends I imagine. Sort of personally skirted this by setting up a local P.O. Box. which seemed to work for temporary employment until having had some month to month rental agreement in place...and then transitioned into six month rental agreement terms.
The problems though with living elsewhere when you social network and bailout safety net are limited relatively so...you get by month to month, but even when 30k cuts it for living costs, its not like you are wealthy in a fairly big city, or even modestly saving really well here...I've heard of some living out of cars, just for the purpose of building some sort of savings here as sad as this sounds and this were prior to 2001, imagine its probably the same if not more true today, you might have once been able to swing the mortgage for 100k property purchase, out there, but then you might get locked in, and if you were unlucky at some point to get caught in a housing bubble collapse, you might also be walking away from the property and pretending it never existed with that much water over your head. I was leary buying property back then, and while not building any sort of equity in renting solely, at least provided me some easier emotional let go when the time might have come in leaving as predictably happened to me. It seems, if you got burned on bad financial housing investments, or you were stressing yourself out way too much with water accumulating working any number of part time positions just to keep the water from flooding in on mortgage payments, added to this living hundreds if not thousands of miles away from most family, friends and relatives, social technology only goes so far relative to being in closer physical proximity. I went west, as supposedly I heard others might have for a time, dot com bust caused some fallout in Seattle supposedly, but fortunately I worked in telecommunications which were generally unaffected, but almost took an entry level position with Amazon, and fortunately avoided this...they basically left Seattle within a year or so from the time that I left. Of course, it seems, as I've heard credit markets aren't great, so you move today elsewhere, maybe you are more likely to get scrutinised for credit applications...investing in housing could be as likely less gain in so far as equities acquisitions with a risky move away from old social networks...albeit however rooted in childhood and otherwise unchanged and generally less promising in so far as opportunities provided otherwise, in making new ones. Mostly though the big question when you move elsewhere...umm...this is to say depending on what you do, where you work, you may or may less likely make new social networks...
you work in data entry and generally have little downtime doing it, and generally are expected to do what you do, you might make some acquaintances here and there...and as to the types of positions that are opened up based upon friendships had, well, maybe characteristically and statistically speaking this were lateral in nature in so far as potential for economic mobility. Though depending upon the characteristics of the employer, whether hiring and promoting from within, if you knew something of your employer and they often hired outside for higher level positions, you're chances of vertical mobility internally in the company or corporation you worked for were slim to none... chances are if you were going door to door without a friends referral in this poor economy looking for a better position, and you hadn't known anyone at the referring corporation/company, your chances may diminished for hiring, and the reality of moving to a new location, unless you had some recruitment/internship opportunity line up prior to moving, you may be wasting your time...I decided to move without knowing what I was going to be doing, without having anything lined up, and still fortunately got a job by lucky coincidence, but as to being a long lived opportunity (beyond a few years)...nope.
Read some story awhile back about a man, once chef, turned c.s. major that moved with his family to S.F....of all exorbitantly expensive places to live, puts his wife and kid up in a homeless shelter and ends up sleeping in some bushes around Golden Gate Bridge park...never found out if his plight landed him a job, hope so, but seems remember hearing so much about doctors, engineers making solid middle class wages, holed up an hour or more away from San Francisco and living in a house no bigger then a small car garage....rent may have declined, but even moving to a bigger city where potential opportunities may be greater, doesn't always provide enough relative to living and housing costs.
Of course, knowing people from all around the country might help you if you do decide to move, at least, they might help with a referral, but really, would seem surprising if people were kind enough to extend themselves out more so only knowing you in some digital context, and then not having friends is something of a double edged sword where any number might learn the fine art between wanting and needing friends and so forth...being too needy upsets and bothers people, and not wanting could be estranging and off putting to others. :) Sort of laughable social judgements that exists, if you were typically, resorting to stereo type here, if you were satisfied with life and occupation, all of this might not matter, but whose employment position in today's and age were securely set for life here in America?! Chances are the more people you know might get your foot in the door for some employment opportunity...you'd probably here some career counsellor tell you, lots that get hired, may have had added chance for success simply knowing someone that worked in the company or corporation that such applicant applied for. So as it turns out if you were sitting on your duff, feeling secure at what you were doing for a time, and you didn't bother to socialise much and hard times come your way, someone might help put a word in for you, but it may be tougher if no one really knew you that well...sociological case in point, excursions into new frontiers with mixed population groups the first to go freezing to death: the loners, the last to go...the women in the families. :) Obviously, on aspect of survival in these social settings when times are dire are: well...women have much body fat relative so less likely to freeze to death as quickly literally, but perhaps more telling here (in the pop psych sociology trivia), the women in these setting were more socially resourceful relative to men, and able to manage loss through distributive networks, any stockpiles of food, and likewise, through households had better distributive means of acquiring food...it seems in the modern context, something of lesson could be applied, being the quiet loner doesn't make it easier for you to get by in hard times, or mean that you were merely tougher to survive at that, at least you may be tougher relatively so in some manner, but the odds may be stacked against you...generally if you were bear, you might be better off here, a wolf...probably not much of a go.... And if someone else in the household had some occupation, or you had savings built up for some temporary crisis however such may have taken place, you might be able to swing the downtimes, with a savings cushion. If you were stressed about being on time everyday for work, time obsessed and so forth and you were the sole wage earner in the household, having moved half way across the country and hadn't made much of a social network where you moved to, would all that stress, headache, lost sleep, be worth the move?! Hmm...guess its perspective here...a city seemingly full opportunity socially speaking, may be as lonely as desert island, if you were constantly searching for a place that were paradise fitting to some idea, you might never find it, and perhaps all the ails, stress and worry of finding something that never really existed might have been better extinguished with the decision of giving up on an idea that a better world existed elsewhere relative the world that you came from...
In any event, instead of encouraging movement, what about local sustainability?!
Roadtrips are okay, gas prices permitting.
Hmm...fitting to the bill here, crashed and burned on a life adventure, burn too much even for some measurable risk, bear conservation kicks in...that simple, don't move unless you need to really...
why make life harder then it need be?!
What pushed people to move and go back then...seems to me, feeling like choices were much limited, and making alternatives a necessity by comparison, if great social movements and wars were a reflection of this.
speculation on why this were so...
As to picking up and going, this is a bit of a psychology and sociology question it seems. Moving away from friends, family, social networks and re inventing a new far away from home, isn't exactly easy for all, even when social technologies have made living abroad or elsewhere in the country easier. Sure if you had means, you might be able to afford child care, or having any other things at once disposal to make due in situations where you might have needed help, but as to Nuclear family alone, it seems a modern industrial invention, people that move in lower socio economic strata face challenges that others in higher brackets don't face, they don't have perhaps as much the resources I might argue, and compensations socially would likely be in order to make amends when setting down roots in a new place.
As to personal example, you move, you figure out the basics like getting a job where you move to, or at least know that not having a company transfer in place and just moving where you like to go rather then choosing on the basis of opportunities provided, means necessarily dealing with something simple like having a local address perhaps for the place that you locally desire working. You might not get hired, for instance, if you made it obvious you were technically homeless, or made it clear you were living out of a motel and so forth, but it really depends I imagine. Sort of personally skirted this by setting up a local P.O. Box. which seemed to work for temporary employment until having had some month to month rental agreement in place...and then transitioned into six month rental agreement terms.
The problems though with living elsewhere when you social network and bailout safety net are limited relatively so...you get by month to month, but even when 30k cuts it for living costs, its not like you are wealthy in a fairly big city, or even modestly saving really well here...I've heard of some living out of cars, just for the purpose of building some sort of savings here as sad as this sounds and this were prior to 2001, imagine its probably the same if not more true today, you might have once been able to swing the mortgage for 100k property purchase, out there, but then you might get locked in, and if you were unlucky at some point to get caught in a housing bubble collapse, you might also be walking away from the property and pretending it never existed with that much water over your head. I was leary buying property back then, and while not building any sort of equity in renting solely, at least provided me some easier emotional let go when the time might have come in leaving as predictably happened to me. It seems, if you got burned on bad financial housing investments, or you were stressing yourself out way too much with water accumulating working any number of part time positions just to keep the water from flooding in on mortgage payments, added to this living hundreds if not thousands of miles away from most family, friends and relatives, social technology only goes so far relative to being in closer physical proximity. I went west, as supposedly I heard others might have for a time, dot com bust caused some fallout in Seattle supposedly, but fortunately I worked in telecommunications which were generally unaffected, but almost took an entry level position with Amazon, and fortunately avoided this...they basically left Seattle within a year or so from the time that I left. Of course, it seems, as I've heard credit markets aren't great, so you move today elsewhere, maybe you are more likely to get scrutinised for credit applications...investing in housing could be as likely less gain in so far as equities acquisitions with a risky move away from old social networks...albeit however rooted in childhood and otherwise unchanged and generally less promising in so far as opportunities provided otherwise, in making new ones. Mostly though the big question when you move elsewhere...umm...this is to say depending on what you do, where you work, you may or may less likely make new social networks...
you work in data entry and generally have little downtime doing it, and generally are expected to do what you do, you might make some acquaintances here and there...and as to the types of positions that are opened up based upon friendships had, well, maybe characteristically and statistically speaking this were lateral in nature in so far as potential for economic mobility. Though depending upon the characteristics of the employer, whether hiring and promoting from within, if you knew something of your employer and they often hired outside for higher level positions, you're chances of vertical mobility internally in the company or corporation you worked for were slim to none... chances are if you were going door to door without a friends referral in this poor economy looking for a better position, and you hadn't known anyone at the referring corporation/company, your chances may diminished for hiring, and the reality of moving to a new location, unless you had some recruitment/internship opportunity line up prior to moving, you may be wasting your time...I decided to move without knowing what I was going to be doing, without having anything lined up, and still fortunately got a job by lucky coincidence, but as to being a long lived opportunity (beyond a few years)...nope.
Read some story awhile back about a man, once chef, turned c.s. major that moved with his family to S.F....of all exorbitantly expensive places to live, puts his wife and kid up in a homeless shelter and ends up sleeping in some bushes around Golden Gate Bridge park...never found out if his plight landed him a job, hope so, but seems remember hearing so much about doctors, engineers making solid middle class wages, holed up an hour or more away from San Francisco and living in a house no bigger then a small car garage....rent may have declined, but even moving to a bigger city where potential opportunities may be greater, doesn't always provide enough relative to living and housing costs.
Of course, knowing people from all around the country might help you if you do decide to move, at least, they might help with a referral, but really, would seem surprising if people were kind enough to extend themselves out more so only knowing you in some digital context, and then not having friends is something of a double edged sword where any number might learn the fine art between wanting and needing friends and so forth...being too needy upsets and bothers people, and not wanting could be estranging and off putting to others. :) Sort of laughable social judgements that exists, if you were typically, resorting to stereo type here, if you were satisfied with life and occupation, all of this might not matter, but whose employment position in today's and age were securely set for life here in America?! Chances are the more people you know might get your foot in the door for some employment opportunity...you'd probably here some career counsellor tell you, lots that get hired, may have had added chance for success simply knowing someone that worked in the company or corporation that such applicant applied for. So as it turns out if you were sitting on your duff, feeling secure at what you were doing for a time, and you didn't bother to socialise much and hard times come your way, someone might help put a word in for you, but it may be tougher if no one really knew you that well...sociological case in point, excursions into new frontiers with mixed population groups the first to go freezing to death: the loners, the last to go...the women in the families. :) Obviously, on aspect of survival in these social settings when times are dire are: well...women have much body fat relative so less likely to freeze to death as quickly literally, but perhaps more telling here (in the pop psych sociology trivia), the women in these setting were more socially resourceful relative to men, and able to manage loss through distributive networks, any stockpiles of food, and likewise, through households had better distributive means of acquiring food...it seems in the modern context, something of lesson could be applied, being the quiet loner doesn't make it easier for you to get by in hard times, or mean that you were merely tougher to survive at that, at least you may be tougher relatively so in some manner, but the odds may be stacked against you...generally if you were bear, you might be better off here, a wolf...probably not much of a go.... And if someone else in the household had some occupation, or you had savings built up for some temporary crisis however such may have taken place, you might be able to swing the downtimes, with a savings cushion. If you were stressed about being on time everyday for work, time obsessed and so forth and you were the sole wage earner in the household, having moved half way across the country and hadn't made much of a social network where you moved to, would all that stress, headache, lost sleep, be worth the move?! Hmm...guess its perspective here...a city seemingly full opportunity socially speaking, may be as lonely as desert island, if you were constantly searching for a place that were paradise fitting to some idea, you might never find it, and perhaps all the ails, stress and worry of finding something that never really existed might have been better extinguished with the decision of giving up on an idea that a better world existed elsewhere relative the world that you came from...
In any event, instead of encouraging movement, what about local sustainability?!
Roadtrips are okay, gas prices permitting.
Sunday, March 4, 2012
Example data tree parser (for nested dictionaries) in Python
import datetime class Workdictmanager: def __checkinitworkdict(self, sessiontime): check = False if 'workdict' in sessiontime: check = True self.workdict = sessiontime['workdict'] return check def putWorkdict(self, sessiontime): return self.__checkinitworkdict(sessiontime) ## self.workdict = sessiontime['workdict'] def qwordCheck(self, qword): check = False if qword in self.workdict: check = True return check def addWorkvals(self, qword, valtup): #here valtup is expected in list or tuple form #this is an ordered set, (akey, score, att) if qword in self.workdict: self.qworddir = self.workdict[qword] self.qworddir['score'] += valtup[1] self.qworddir['totalattempts'] += valtup[2] self.workdict[qword] = self.qworddir else: self.qworddir = {} self.qworddir['answer'] = valtup[0] self.qworddir['score'] = valtup[1] self.qworddir['totalattempts'] = valtup[2] self.workdict[qword] = self.qworddir def retrieveDictval(self, qword, dirkey): self.qworddir = self.workdict[qword] return self.qworddir[dirkey] def retrieveWorkdict(self): return self.workdict def __init__(self): self.workdict = {} class Statsmanager: #what is the difference between saveStat and put, puts an already #recorded stat session into the Statmanager class object whereas # saveStat saves an individual stat in the class object def __checkinitstats(self, sessiontime): check = False if 'stats' not in sessiontime: self.save() else: check = True self.stats = sessiontime['stats'] self.totalwords = self.stats['totalwords'] self.totalcorrect = self.stats['totalcorrect'] self.totalincorrect = self.stats['totalincorrect'] return check def save(self): self.stats['totalwords'] = self.totalwords self.stats['totalcorrect'] = self.totalcorrect self.stats['totalincorrect'] = self.totalincorrect def putStats(self, sessiontime): return self.__checkinitstats(sessiontime) ## self.stats = sessiontime['stats'] def addStats(self, valtup): self.stats['totalwords'] += valtup[0] self.stats['totalcorrect'] += valtup[1] self.stats['totalincorrect'] += valtup[2] def saveStat(self, statkey, value): if statkey == 'totalwords': self.totalwords = value self.stats['totalwords'] = self.totalwords #int value elif statkey == 'totalcorrect': self.totalcorrect = value self.stats['totalcorrect'] = self.totalcorrect #int value elif statkey == 'totalincorrect': self.totalincorrect = value self.stats['totalincorrect'] = self.totalincorrect #int value def retrieveStat(self, statkey): stat = 0 if statkey == 'totalwords': stat = self.stats['totalwords'] elif statkey == 'totalcorrect': stat = self.stats['totalcorrect'] elif statkey == 'totalincorrect': stat = self.stats['totalincorrect'] return stat def retrieveStats(self): return self.stats def __init__(self): self.stats = {} self.totalwords = 0 self.totalcorrect = 0 self.totalincorrect = 0 self.stats['totalwords'] = self.totalwords self.stats['totalcorrect'] = self.totalcorrect self.stats['totalincorrect'] = self.totalincorrect class Sessioncachemanager: def addStats(self, statstup): self.statsmngr.addStats(statstup) def retrieveStats(self): return self.statsmngr.retrieveStats() def retrieveWork(self): return self.workdictmngr.retrieveWorkdict() def retrieveSessiontimeelapsed(self): return self.sessiontimeelapse def retrieveSessiontimefromlast(self): return self.sessiontimefromlast def addWorkvals(self, qword, workvalstup): self.workdictmngr.addWorkvals(qword, workvalstup) def __checkSessionTime(self, sessiontimekey): check = False if sessiontimekey in self.session: check = True return check def __recordEndSession(self): self.__sessionrecord(False) def __recordBeginSession(self): self.__sessionrecord(True) def clearSession(self, time): #measure current time then compare timedelta from now #to all session datetime objects, then convert this # to total seconds those exceeding in total seconds #will be keys removed from the session. #The variable 'time' is measured in seconds currenttime = datetime.datetime.now() timestamps = list(self.session.keys()) if type(time) == str: if time == 'All': for timestamp in timestamps: del self.session[timestamp] elif type(time) == int: for timestamp in timestamps: timedelt = currenttime - timestamp timedeltsec = timedelt.total_seconds() if time > timedeltsec: del self.session[timestamp] def newSession(self, userdict): self.session = userdict['session'] self.__recordBeginSession() self.session[self.sessionbegin] = self.sessiontime self.statsmngr = Statsmanager() self.workdictmngr = Workdictmanager() def putSessiontime(self, sessiontimekey, userdict): self.session = userdict['session'] if self.__checkSessionTime(sessiontimekey): self.sessiontime = self.session[sessiontimekey] self.statsmngr.putStats(self.sessiontime) self.workdictmngr.putWorkdict(self.sessiontime) else: print('Session Time value does not exist!') def putSession(self, userdict): self.session = userdict['session'] def retrieveSessiontimekeys(self): return list(self.session.keys()) def saveSession(self): ## self.sessiontime = {} ## self.statsmngr.putStats(self.sessiontime) ## self.workdictmngr.putWorkdict(self.sessiontime) #calls from stats class stats = self.statsmngr.retrieveStats() self.sessiontime['stats'] = stats #call from workdict workdict = self.workdictmngr.retrieveWorkdict() self.sessiontime['workdict'] = workdict self.__recordEndSession() print('session begin ',self.sessionbegin) print('session end ', self.sessionend) self.__sessiontimeelapse() self.__sessiontimeelapsefromlast() self.sessiontime['sessiontime'] = self.sessiontimeelapse self.session[self.sessionbegin] = self.sessiontime sessionuserdict = self.session self.sessionlast = self.__recordTime() return sessionuserdict def retrieveSession(self, userdict): self.session = userdict['session'] def __recordTime(self): return datetime.datetime.now() def __sessiontimeelapse(self): #subtraction of timedate object yields timedelta object self.sessiontimeelapse = self.sessionend - self.sessionbegin def __sessiontimeelapsefromlast(self): self.sessiontimefromlast = self.sessionend - self.sessionlast def __sessionrecord(self, flag): #true flag records begin session while false flag records end stamp if flag: self.sessionbegin = self.__recordTime() self.sessionlast = self.__recordTime() else: self.sessionend = self.__recordTime() def __init__(self): self.session = {} self.sessiontime = {} self.sessiontimeelapse = 0 self.statsmngr = Statsmanager() self.workdictmngr = Workdictmanager() class Overallcachemanager: def __checkinitoverallstats(self, check): if not check: self.overall['stats'] = self.statsmngr.retrieveStats() def __checkinitoverallworkdict(self, check): if not check: self.overall['workdict'] = {} def addStats(self, statstup): self.statsmngr.addStats(statstup) def clearOverall(self, typeflag): if typeflag == 'All': self.statsmngr = Statsmanager() self.workdictmngr = Workdictmanager() elif typeflag == 'Stats': self.statsmngr = Statsmanager() elif typeflag == 'Workdict': self.workdictmngr = Workdictmanager() def retrieveStats(self): return self.statsmngr.retrieveStats() def retrieveWork(self): return self.workdictmngr.retrieveWorkdict() def addWorkvals(self, qword, workvalstup): self.workdictmngr.addWorkvals(qword, workvalstup) def newOverall(self): self.overall = {} self.statsmngr = Statsmanager() self.workdictmngr = Workdictmanager() def save(self): self.overall['stats'] = self.statsmngr.retrieveStats() self.overall['workdict'] = self.workdictmngr.retrieveWorkdict() return self.overall def put(self, userdict): if 'overall' in userdict: print('hitting if overall in userdict') self.overall = userdict['overall'] if 'sessiontime' not in self.overall: self.overall['sessiontime'] = datetime.timedelta() check = self.statsmngr.putStats(self.overall) self.__checkinitoverallstats(check) check = self.workdictmngr.putWorkdict(self.overall) self.__checkinitoverallworkdict(check) else: userdict['overall'] = {} self.overall = {} self.overall['sessiontime'] = datetime.timedelta() self.statsmngr = Statsmanager() self.workdictnmngr = Workdictmanager() def addSessiontime(self, timedelt): self.overall['sessiontime'] += timedelt def retrieveSessiontime(self): return self.overall['sessiontime'] def __init__(self): self.overall = {} self.overall['sessiontime'] = datetime.timedelta() self.statsmngr = Statsmanager() self.workdictmngr = Workdictmanager() class Cachemanager: def addSessionstatdat(self, statdat): self.sessioncache.addStats(statdat) def addSessionworkdat(self, qword, workdat): #workdat self.sessioncache.addWorkvals(qword, workdat) def addOverallstatdat(self, statdat): self.overallcache.addStats(statdat) def addOverallworkdat(self, qword, workdat): self.overallcache.addWorkvals(qword, workdat) def addOverallsessiontime(self, sessiontimeelapsed): self.overallcache.addSessiontime(sessiontimeelapsed) def clearOverall(self, typeflag): #'typeflag' is a variable set to one of the following: #'All', 'Stats', or 'Workdict' self.overallcache.clearOverall(typeflag) def clearSession(self, time): self.sessioncache.clearSession(time) def putSession(self): self.sessioncache.putSession(self.user) def putSessiontime(self, sessiontime, user): #sessiontime is a datetime object self.sessioncache.putSessiontime(sessiontime, user) def retrieveSessiontimekeys(self): return self.sessioncache.retrieveSessiontimekeys() def savereturnSession(self): self.user['session'] = self.sessioncache.saveSession() totalsessiontime = self.sessioncache.retrieveSessiontimefromlast() self.overallcache.addSessiontime(totalsessiontime) def savereturnOverall(self): self.user['overall'] = self.overallcache.save() def retrieveSessionwork(self): return self.sessioncache.retrieveWork() def retrieveSessionstats(self): return self.sessioncache.retrieveStats() def retrieveOverallstats(self): return self.overallcache.retrieveStats() def retrieveOverallwork(self): return self.overallcache.retrieveWork() def newSession(self): self.sessioncache.newSession(self.user) def __checkandinituserdat(self): if 'session' not in self.user: self.user['session'] = {} if 'overall' not in self.user: self.user['overall'] = {} def __init__(self, userdat, newSessionflag): self.user = userdat self.__checkandinituserdat() self.overallcache = Overallcachemanager() self.sessioncache = Sessioncachemanager() self.overallcache.put(self.user) if not newSessionflag: self.sessioncache.putSession(self.user) else: self.sessioncache.newSession(self.user)
Here is my userdata tree parser used in conjuction to the previous shelve object read/write interface class.
Data tree can generally be expressed as follows:
user session data, dictionary keys are 'session'>sessiondatetime
and 'Overall' subkeys of each are:
'workdict' > qword > 'answer' > akey > 'score' > score(int)
> 'totalattempts'> att(int)
'stats' > 'totalwords' > totalwords(int)
> 'totalcorrect' > totalcorrect(int)
> 'totalincorrect' > totalincorrect(int)
'sessiontime' > timespent(int min)
Descending from top to bottom in order in so far as program structure, handlers on data tree starting at leaf node and then descending to parent node of all data trees,
thus the Cachemanager class represents the top of the data tree hierarchy and it is through this class that all subsequent data handling assignments are received and transmitted through the respective chain of class above it. Also it is worth noting excepting the child leaf node classes, namely, workdictmanager and statsmanager classes above, all parent classes initialise and transmit data to a respective data child classmanager for such data level.
The simplest way of thinking about this is comes by the following example:
a = { b: dictionary of b, c: dictionary of c}
dictionary of b = {d: dictionary of d, e: dictionary of e}
dictionary of c = {f: dictionary of f, g: dictionary of g}
Here, the dictionary a would have its data class handler which controls the passing of data to all embedded dictionaries inside a...this means data sent to b, c, d, e, f, and g.
The class handler of dictionary a would decide and appropriately send to data in the tree to:
- b if data needed to be sent/received from child leaf node d or e,
or
-c if data needed to be sent/received from child leaf node f or g.
In turn data sent or received according to design structure above, passes data to the handler of b or c respectively, and the handlers of b or c, in turn pass data to the handlers of d, e, f, or g as required.
Thus each trunk/branch/leaf all have respective class data handlers for their respective positions on the data tree in this database parsing model.
In the case of more complex data trees, class handling models of this type become more complex at the top level hierarchies, in terms of the potential function handling possibilities in so far as data pathing structures here.
In conjunction to the previous posting regarding shelve object storage of both user and user data...I can in one read to permanent storage action, read all the user's given data stored on disk, in one call, and pull up all of the user's relevant history in so far as previous interactions. I minimise the write to calls for the user's present session use, by only writing all relevant data to be added, once the user's session is finalised which occurs either at user account change or at program termination. Thus maintaining higher read/write efficiency in doing so...i.e., avoiding numerous disk reads and writes to get at the same sets of data.
User shelve object database example in Python
import os import shelve class Userdata: def closeUserfile(self): self.userdatafile.close() def saveUser(self, user, userdata): self.user = user self.__checkreadFile() if self.__verifyUser(): self.userdatafile[self.user] = userdata print('User data saved.') self.userdatafile.close() def saveUserdata(self, userdata): self.__checkreadFile() #self.userdatafile[self.user] = userdata if self.__verifyUser(): self.userdatafile[self.user] = userdata print('User data saved.') self.userdatafile.close() def addUser(self, user): self.user = user self.__checkreadFile() usercheck = self.__verifyUser() if not usercheck: self.userdatafile[self.user] = {} print('User added.') else: print('User already exists.') return usercheck self.userdatafile.close() def retrieveUser(self, user): self.user = user self.__checkreadFile() if self.__verifyUser(): self.userdata = self.userdatafile[self.user] self.userdatafile.close() return self.userdata def retrieveUsername(self): return self.user def retrieveUserlist(self): userlist = [] self.__checkreadFile() for user in self.userdatafile: if not user == 'High Score': userlist.append(user) self.userdatafile.close() return userlist def isUserdatempty(self): check = False self.__checkreadFile() if len(self.userdatafile) == 0: check = True self.userdatafile.close() return check def returnFirstuser(self): self.__checkreadFile() userlist = list(self.userdatafile.keys()) firstuserkey = userlist[0] self.userdatafile.close() return [firstuserkey, self.userdatafile[firstuserkey]] def __verifyUser(self): check = False if self.user in self.userdatafile: check = True return check def verifyUser(self, username): check = False self.__checkreadFile() if username in self.userdatafile: check = True self.userdatafile.close() return check def __readFile(self): self.userdatafile = shelve.open(self.pathfile, 'w') def __createFile(self): self.userdatafile = shelve.open(self.pathfile, 'n') def __checkreadFile(self): file = '' if os.name == 'nt': file = '\\yourdatafilenamehere' elif os.name == 'posix': file = '/yourdatafilenamehere' self.pathfile = self.path+ file if os.access(self.pathfile, os.F_OK): if os.access(self.pathfile, os.R_OK): if os.access(self.pathfile, os.W_OK): self.__readFile() else: self.__createFile() else: self.__createFile() else: self.__createFile() ## def checkUser(self): ## ## self.__checkreadFile() ## self.__verifyUser() def __init__(self): self.path = os.getcwd() self.user = '' #self.__checkreadFile()
Something of an alternative shelve object database storage class alternative code offering outside the CouchDB. I'd mention some issues experienced with Python shelve objects:
- Heavy read write loads to shelve objects aren't good at least with respect read write from permanent (disk based) memory storage. Thus I've typically housed much of the data in such a way that reading from disk ensures likely all the information (in terms of transient storage) will be there to minimise read/write callbacks. Thus I actually wrote a database program which parses additionally embedded dictionary trees for reading such data. In effect, you hadn't need develop something like an sql database program to do this, since the pertinent data that you needed for your program may remain exact in so far as object data were concerned. You just need to make sure that you have it structured, in this case, in a way, so that your data reader knows where to find the data in the tree hierarchy in doing so. If you need some alternate method for storing dynamic data to a given database, you might consider using python's sql module interfaces, this fyi provides some basic sql code examples. I'll post my tree structure interface here probably in a day or so, that at least provides how an extensive data tree process handling might look like.
-You may notice above, generally after reading calls to a shelve object file, such shelve object file is closed. This is done per recommends of python, and as I've experienced, if you don't track closing and opening, errors can result when attempting to re open an already open file or reading from a closed file. Thus, wise to make sure that routine orderliness applies here.
In the __checkreadFile() function call above, the program attempts to verify that the datafile exists in the installation directory path...this installation directory path is established by the command os.getcwd() . If the file exists it reads, otherwise, it needs to be created.
Generally idea here is that a user data can be stored or retrieved, and user key information can be searched for, and lists of users can be furnished through this given class .
Ubuntu 11.10 experiences review in brief over past year
When Ubuntu 11.04 were released in previous year, I hadn't taken to the complaints about 11.04 and 11.10 unity interface in terms of conceived stylisation. Here visual interface design conceived in providing more so prominent and understood visual navigation design interfaces relative to previous traditional interface structures. However, minor annoyances still seem present, scroll bars, outside of default design settings found say in Firefox browsers, seem more difficult in managing, while philosophy of visual interface minimalism seems more so, apparently the version of Firefox installed in Ubuntu, felt visually the element of the scroll bar shouldn't be taken away (even if facilitating in a focus/transient based manner), and I believe they are right here. Likewise I had looked forward to as an alternative to windows desktop environment, being rewarded with the opportunity to take advantage of newer operating system releases alongside the advantages that any open source community might offer relatively so, it seems this were true. However, I may suggest, at times, the focus in release cycles concerning progress, in so far as software interoperability and software centre maintenance appear at odds with the adherence to reliability. Several occasions found myself, un installing software that neither seemed to work in the ways that once suggested, and this could be something of a downside to the Ubuntu experience if having expectation that software should work in future release cycles. This being said, this isn't to say that operability owing to significant progress were always true, but it could be something of problem outside operability conservation in applied changes to os design.
Despite this, however, Ubuntu still maintains some appeal for me. I hadn't been exactly the user, ever so dependent upon any specific base source of software, mostly at the moment development oriented, and it seems any software typically in the archives, that I hadn't noticed previously but suddenly noticed not exactly working, weren't exactly loss here, and one could offer, maybe it weren't the job of Ubuntu as a whole to maintain any number of software whose maintainers long since abandoned as a result of any number of reasons. Hard for me to judge the level of open source software development at the moment, however. Core programs that I like continue to generally work, and the operating system has overall been reliable enough, and then mostly in terms of absence of functionality here, has been inspirational to development, one might wonder whether survival shows could be produced here...how to create the program you need in Ubuntu if it doesn't exactly exist...at least if Ubuntu could make their Quickly development series package even more hands on and friendly, it might not matter whether maintainers of old defunct software eventually disappear into the fray, someone might create something just as good if not better in a flash!
Despite this, however, Ubuntu still maintains some appeal for me. I hadn't been exactly the user, ever so dependent upon any specific base source of software, mostly at the moment development oriented, and it seems any software typically in the archives, that I hadn't noticed previously but suddenly noticed not exactly working, weren't exactly loss here, and one could offer, maybe it weren't the job of Ubuntu as a whole to maintain any number of software whose maintainers long since abandoned as a result of any number of reasons. Hard for me to judge the level of open source software development at the moment, however. Core programs that I like continue to generally work, and the operating system has overall been reliable enough, and then mostly in terms of absence of functionality here, has been inspirational to development, one might wonder whether survival shows could be produced here...how to create the program you need in Ubuntu if it doesn't exactly exist...at least if Ubuntu could make their Quickly development series package even more hands on and friendly, it might not matter whether maintainers of old defunct software eventually disappear into the fray, someone might create something just as good if not better in a flash!
Thursday, March 1, 2012
Little bit of a ramble here
Being a reductionist in life isn't always fruitful one might imagine...leads to a bit of arrogance and what not in judgement.
In any event there's always the barrage of tabloid UFO guided by Hitler (or vice versa, who really knows wasn't paying enough attention there) materials on the Green channel, the history channel and the science channel at times for that matter...but recently its morphed into popular titles such as UFO at the bottom of the ocean...hehehe really amusing, and hard really with marketing over saturation as exists at times to solely be perceived as really representing excitement to viewer interests...but more so probably designed to get some sort of reaction. Laughing, hmmm, okay crypto obsession lead to its most rational searching of irrational disorder ends...hmm teasing a bit, you like the movie Pi?
Apparently though as of recent, what seemingly makes the rounds of what is hot on Google+ are any number of crypto spate of messages perhaps if there were an intended embedded message here could seem more transparent relatively so, amusing one's here something to the effect, 'Either you love bacon, or you are wrong.' hmm...hard to see the world driven solely into clearly divided oppositions such as this, at least something ironic seems to come of the manner of speech conveyed about the philosophies and freedoms that apparently should exist in the world and the differences therein in practice to living that seem contrary to this at times.
Watched the cycling tour of Oman on television recently, although hadn't seen 'Burn notice' airing as of recent...
honestly had something of laugh at um, some crypto zoology parody I watched on television sometime ago...can't remember the name of the show, too lazy to look it up right now.
Type casting issue apparent in pygtk programming work
Something interesting when working between widgets in pygtk here, integers may according to widget's referring container may convert these values to floats or some type of numeric cast, thus neither preserving original type assignment. Sort of important since type casting issues, may less commonly be noticed in python owing to the loss of formalities in variable object declarations. One example of this is can be represented in one line where a = 1, and the next line where a = 1.0. The variable a is represented as integer in one line, while in the subsequent line is represented as a float. Further example, assigning integer values into spinboxes leads to the result of a type casting transformation to (double, float type) an associated gtkadjustment container. Upon calling reference back to such widget container without having utilised a type cast transformation back to an originating format type, having stored such value for purposes of memory, could have effects down the road in so far as storage and retrieval later. For example, ran into this problem with regards to initialisation outputs into type cast written strings, however control statement breaking flow of written output to integer types would mean the loss of output data for once integer types now represented as floats, doubles, or other numeric types.
Thus moral in story here, pay attention to type casting when passing data between widget data storage containers in pygtk.
Subscribe to:
Posts (Atom)
Oblivion
Between the fascination of an upcoming pandemic ridden college football season, Taylor Swift, and Kim Kardashian, wildfires, crazier weathe...
-
For starters, as I've seen (pardon my ignorance if I am incorrect), it seems a common way to use path based animated motion for objects...
-
Okay so if you read into python scripting examples of moving vertices around in Blender, it seems whether using a bpy.context or bpy.data c...
-
Mesh face and vertex count much to high for game mesh and texture here (? possibly) but someday in the future may be found in textures and ...