while using we might want to pick up specific packages from global site-packages folder of python
for which you can use
pip install -I or pip install --ignore-installed which will Install from collected packages but if you always want to install a new in your virtualenv you can use the -U flag instead of -I which will first download the latest one and the install it.
I don't know how and why I started to learn kivy , maybe I have been wanting to write some apps for mobile, but got fancyfied for the second time in life(first time was when I jumped in to learning VFX) Why I have this feeling is when I can solely do using python and use PySide /QML which I partly know already !!!
Anyway kivy is a framework for NUI development for mobile platform, I don't know how good it is or how much it is in demand but as practice whenever I have time will dig in something out...
I have this kivy latest docs lying on my desktop so I opened it and along with some videos from youtube.
Here is the first cake that shows how we can write simple code in py module and read it from kivy's kv file.
in above case I saved both the files at the same location but you can import kivy.lang.Builder and then use Builder.load_file('my/own/path/fike.kv')
Thanks for bearing with me :p
Story: How it all began.
I am a python programmer, and for a very long time I was getting segmentation fault error on my macbook running mavericks, every time I tried importing any module in shell, so which mean I can code and run the program but if I launch python shell and try to import something may it be sys or os package python will crash with a segmentation fault error.
So recently I decided to do a new clean install of python by completely removing the old python2.7 installation. Then following instruction from this page But I didn't had Xcode installed and not even command line tools for OSx mavericks. So I installed command line tools then installed python followed by virtualenv. This did fixed the segmentation fault error but thats where things got f**ked up !!! while I was removing python from my system I forgot that I am also learning in kivy and removed kivy too while removing python. And now after so many days I thought to some coding in kivy realised I don't have it. All this time I had installed fish shell when I first got the error I had first doubt on fish shell but that wasn't it, So now when I tried installing kivy using pip or easy_install i kept on getting error: clang: error: unknown argument: '-mno-fused-madd'
After lots of research on web and googling, I found many people had faced this issue after updating the Xcode to 5.1 or above mine is 6.1 You can find your Xcode version using pkgutil --pkg-info=com.apple.pkg.CLTools_Executables
groups: com.apple.FindSystemFiles.pkg-group com.apple.DevToolsBoth.pkg-group com.apple.DevToolsNonRelocatableShared.pkg-group
$ gcc --version
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.56) (based on LLVM 3.5svn)
Thread model: posix
To fix the error I added the line
in my ~/.bashrc file and restarted the shell, went to location where I had cloned the kivy from github and ran python setup.py install and now the above error appeared as warning and installation worked. So far so good everything is working now. I now have segregated every project using virtualenv as well as also took away doubt from fish shell :-)
Starting to use vi for coding, tiny shell based ansi powerful text editor, this post is more of a bookmark of what I learn about using it.
Few of tips for beginners like me:
To start coding in vim
press <i> key and you are in insert mode to start writing
To exit text insert mode press Esc key and press colon key for :
to enable line number
if line number don't show up for already open text or any file. type
you will enter ex mode then type
you will return in visual mode and you will see line number of previously typed set number command, to hide line number type
to be able to have python syntax highlighting you must have the following content in your ~/.vimrc file.
filetype plugin indent on
Paste below text in nuke DAG.
Using this expression added in NoOp node we can sample the pixel under pointer with x & y coordinates.
Monkeypatching can be done without any library, but it has a number of repetitive (and kind of ugly) things it needs to do, so if you start to implement it yourself, you end up creating helpers to help with this. And naturally there a couple ready-to-use libraries to do it for you.
One way of monkeypatch is using Set class defined in stubout module of pymox package.
monkeyPatch(module, 'myFunc', lambda n: someObject)
monkeypatch is only recommendable while unit testing the code if no other approach works to avoid it.
using monkeypatch in runtime to change the behaviour of class without affecting the class defination can be hazardous.
On the other hand mox.StubOutWithMock gives the ability to audit the behaviour of system under test making use of actual library returning the result by mocking whatever piece of code doesn't need to be used when under certain known condition return value of collaborative function is known.
I thought to put it up on my blog that why I choose to become a vegetarian or why I think I made the right choice. Some people just find it funny and laugh a giggle when I explain why being vegetarian is good. I know many of my fellow friends and office colleagues are non-vegetarian.
For everyone else who I have already explained and for those reading for first time, I put this in simple words. Specially for all those who think they are better as a human being by being a non-vegetarian
I just cannot cut, kill or let anyone kill it for the satisfaction of my taste. All animals too feel pain just like we humans do. Pain is a part of life, but giving some one pain is inhuman and insensible act.
So I choose to be a vegetarian. And I made the right choice.
Although, I started as a vegetarian coming from religious radha soami family, but as I grew up I wanted to try everything in excitement to try different flavour. So that lead me to try meat of chicken, pork, turkey, fish, prawn, shrimp, beef and what not.
However, when my consciousness woke up, I realised that animals do feel pain too. Just like we humans have headache or fever we suffer from pain. We can take medicine, go to a doctor and cure ourself but look out who is going to give medicine to animals for the pain they suffer. A very few of humans have pet at home and we take the pet to animals . Animals life span is even shorter than humans and non-vegetarian even cut that by killing them just for the taste.
If I/we can get all the same energy from eating fruits and vegetable then why kill animals. Killing a living being just for the sake of taste, would be very immoral and inhuman. Now I don't say my friends who are non-vegetarian are inhuman or immoral people, I'd rather say they are naive, not sure what they are doing. All it takes is to control what we desire for...
It is pitiful that Humans don't care about the feelings of their own kind, then how does one can expect telling someone not to be carnivore or animal sacrifice is causing pain would it be understandable to them..
this come straight from my heart, not that i always think from heart, just being alone at home this weekend, I couldn't resist writing about how it was in the old time back when I was young.
I really miss those old times when everything was simple enough and their were no bad news on TV like it is today.. Now roads are full of vehicles, people everywhere.
noise of vehicles honking makes things even crazy, and living in Bangalore its almost feels like living in mad-town.
back in the school days, I used to come home and if I turned on TV their were only few tv channels, and very few tv commercials, and now when I get back home from office, I turn on the TV, there is a commercial after every 5-10 minutes of news or some TV program, that is not all there is a commercial running at the bottom of the screen all the time. Now there are tv channels just for selling products like they are justasking Oh did I just forgot to mention , there are big billboards on the roads side too.
and what to say about these news there is always a murder , news of killing, war over religion or piece of land.
Go for shopping and you will notice corrupt people trying to rob you by being sweet.
DAMN it this is not healthy living at all. It is so much polluted here in Bangalore that chances to fall sick is very much likely. One has to take too many precaution and eat very carefully...
all this in confronted in combination takes a barbaric and very traumatising when all you wanted is to live a little life with easy and hassle free.
In the middle of this I do find it relaxing going to park near to my house and get a fresh air to breathe, I prefer going by foot but the roads I have to cross while reaching park are full of garbage, no sanity .
Too many people on roads instead there should be too many of them in the park and more parks to build a sustainable city for a healthy living.
For a while I have been thinking to write on this topic, because a lot of bullshit I have observed people doing comes from crowd that chooses to join the subject matter without knowing the real reason behind a movement, without investing time to know that requires effort or great deal of effort, without investigating whether what we/me/you are after is justifiable, or is it the reason we should really invest/ pledge/ pray or fight for. In this topic I will choose the word 'we' instead of 'I', as I an going to try to right for people of all societies, communities no matter where they come from.
I am an inexperienced writer/ blogger, so before you go on critique I would appreciate to put your comment section below where I need to fix or make change.
Before I go over writing about what anything in excess quantity can lead to, lets look at some excess quantities most of you have actually heard about it and caution but it is this same excessiveness everywhere that participate in becoming the problem.
Now these were just the problems related to health. now lets look at something different that goes unnoticed or/ and often ignored.
6. Hyper - liberal-ism: By definition liberal means willing to respect or accept behaviour or opinions different from one's own or being open to new ideas.
This means letting/ accepting someone else belief by respect thats just fine their is nothing wrong with it, but when while trusting or believing in someone idea without knowing the fact can lead the liberal to wrong judgements.
I can give you example out of my personal experience here: When I was in Vancouver, I noticed most places you see Chinese people. Very few people from local origin, intact I got to hear from someone who was Canadian saying that "he is a minority in his own country" that just sounded a bit sad to me. By letting someone in and believing in others ideas or tradition or culture and lead the native people to be forced to live it. Nothing wrong but what sounded from that person of Canadian origin sounded something not fair or right. Maybe something wrong with him, maybe he has a personality disorder or maybe he is sick and need help. But I too noticed there were many asian people in Vancouver or neighbouring towns/cities.
But something like this is weak government policy maybe for the greed or maybe due to the inability to acknowledge the fact the local citizens are not happy with the too many of non - residents walking in. The problem is compounded when one asks whether this is all that government can or should do on behalf of individual freedom.
Money Laundering, Pesticide spray, Pollution caused by fireworks, Noise caused by traffic, religious places prayers or from fireworks the list can go beyond.
But whats in common all above I mentioned is that they hold things that if/when goes in excess, it could lead to un easiness, un healthy state or can even lead to chaos and destruction. Riots can spree over religion which is happening right now around the world, Sometimes its jews who are paying, sometimes its muslims or sometimes its christians, if i didn't mentioned any religion doesn't mean they are not affected.
What I feel their is a need to have and build communities to live under set of rules and laws that are capped that one doesn't reaches excess. However this type of thinking can / and has its own problem. If the one who is imposing the limits to any act or practice belongs to the community that waiting for the opportunity to suppress.
So a thoughtful law and order needs to be setup in which everyone gets benefitted equally. Equal share by living within the boundaries.
Here is an image of four hands holding the wrist of other person. The holding together reflects unity, mutual dependence and assurance but holding the wrist also limits the movement which means you are not allowed to hurt anyone, so if one tries to harm someone the hand will tend to
refrain and stop it. This type of model in my belief is what the societies should be based on. And such society will undoubtedly form better communities.
But on the contrary what is happening now a days in the world we live in is exactly the opposite, no doubt we have boundaries but for personal interest we are prone to risk.
Sam Harris in his article "Sleepwalking towards Armageddon" mentions the "uncomfortable truths about the failures of multiculturalism, the inherent vulnerability of open societies, and the terrifying power of bad ideas."
Yes I totally agree with him, ISIS is one of the outcome as such. The policies government had for their own interest were somewhat weak and not fully investigated the fact, which now has lead the lives of many innocent to dangers. Already so many deaths of innocents have occurred.
Other Blogs & Pages
Animation & VFX SitesA MUST READ for Ani/VFX Artists
Get Mass Effect
awakened by thoughts,