Cats seek out the person of highest importance and sit on their keyboard. If the CEO can't check his email as a result, this has a deleterious effect on company revenue.
Concept - Kevin Design - Kevin Development - Kevin Quality Assurance - Kevin Documentation - Kevin Branding - Kevin Public Relations - Kevin Help Desk - Kevin Catering - Kevin Technical advisors and emotional support - the fine members of SOPython
> Wray Nerely (Alan Tudyk-Me!) was a co-star on Spectrum, a sci-fi series which was canceled -Too Soon- yet became a cult classic. Wray’s good friend, Jack Moore (Nathan Fillion) starred in the series and has gone on to become a major movie star. While Jack enjoys the life of an A-lister, Wray tours the sci-fi circuit as a guest of conventions, comic book stores, and lots of pop culture events.
Really dont know what causes the issue. Installed Mint 17 on VM, and it seems to work too but I would like to solve this out anyway, here at Mint 13. — mazix1 min ago
so, the prob is mainly because of the os he installed..
@corvid No, you can't. Votes on comments are basically a way of saying "I agree with this comment", so it's essentially a mechanism to prevent a stream of duplicate comments. If you disagree strongly with a comment, write a countering comment. But if it's an obnoxious comment, flag it.
Yeah the essential point is: downvotes are stupid without a reason, so you might as well not have them and just let people comment if they don't like something
Unless you have a comment associated with a downvote of a previous comment, and the more upvotes that downvote comment gets the more the original is downvoted... dreams
Also, votes on an answer affect the answer's position on the page, but comments are ordered chronologically, and it wouldn't make sense to move them based on votes.
@Kevin <s>who cares</s> From en.wikipedia.org/wiki/File_shortcut#Microsoft_Windows "Microsoft Windows .lnk files operate as Windows Explorer extensions, rather than file system extensions. As a shell extension, .lnk files cannot be used in place of the file except in Windows Explorer,"
Also, "File system links can also be created on Windows systems (Vista and up). They serve a similar function, although they are a feature of the file system. Windows shortcuts are files and work independently of the file system, through Explorer."
I was able to find Reading the target of a .lnk file in Python? but I don't understand the answer well enough to build on top of it. And frankly I don't know if the OP would know how to make use of it.
@Kevin That looks pretty comprehensive; this may also be helpful: forensicswiki.org/wiki/LNK . But I don't know a lot about Windows... and prefer to keep it that way. :)
If I create a dummy package -- here's /tmp/example_package/setup.py (note the requirements):
from distutils.core import setup
setup(name='my_project',
description="Just a test project",
version="1.0",
py_modules=['sample'],
install_requires=['requests > 0.12'])
Here's ...
Well, that's not quite true. Someone did tell me that that's how the sopython site worked, but that was while I was trying to push django to heroku, and was highly committed to requirements.txt :)
Okay, cool. I'll ignore it for now and look in wonder when it happens
you know, flask is "a microframework" whereas the pyramid guys want to write a framework that is good for writing an application server (but still easy)
had a friend in my lab (in Ottawa) try to print that splint for me, but the thing is so large, that one side cools while the other is being printed. So it warps and the print fails
As a 3d printing layman, I wonder if it's possible to print temporary struts that connect distant portions of the splint, reducing the likelihood of warping? Then you could snip them off with scissors after everything cools.
@poke: if I had an mp3 of a book being read out by a human (assume no audio noise), and I had the full text of that book (say in .txt format), then how would I accomplish this: I want to read the file, word by word, while simultaneously reading the mp3. Thus, whenever the next word is spoken, I would like to highlight that word in the display (while displaying the entire sentence/paragraph from the txt file)
@RobertGrant That seems accurate. Though, I doubt struts are the right way to go. We might need to print it off in two parts and superglue them together
@Kevin the design makes it look like a honeycomb
Basically, it's already holey ("holey 3d printed splint, Batman!")
@inspectorG4dget quick and dirty way would be to get the number of words, divide the audio length by that number and move the word highlight on after that amount of time :)
I've the following folder structure.
application/app/folder/file.py
and I want to import some functions from file.py in another Python file which resides in
application/app2/some_folder/some_file.py
I've tried
from application.app.folder.file import func_name
and some other various attempts...
@RobertGrant Won't work. The book is read "naturally" by a human. Average word length timing won't work. Average syllable length timing might - but then, how do we cut the audio by syllable?
Anecdote: KevinScript uses the sys.path.append trick to import lib/parser.
Not necessarily because it's a good idea. My primary motivation was "get this working now", which excluded the possibility of learning about packages or virtual envs or whatever.
It kinda bothers me that the "mess with sys.path" advice is so prevalent, since there is a correct way to do it, and messing with the path leads to even more misunderstandings down the line.
"So why not change KS to use a package system, now that you're no longer in a hurry?" I still don't know how packaging works, but I assume that it incurs a slight cost on the end user. Like, they have to pip install an egg file or something. This is considerably more difficult than "download source, works out of the box"
I'm hoping one of you will now say "don't be a dummy, Kevin. 'Download source and instantly run with no intermediary steps' behavior is still possible using packaging, and here's how..." but I'm not holding my breath
@RobertGrant I'm actually not opposed to putting a dependency scan inside the main executable script ks.py. If I can get things automatically working by subsequently doing os.system("pip install parser"), I wouldn't mind terribly. (Unless executing pip install on the user's behalf is bad practice. Again, I have no knowledge of this field)
Maybe I'll take a whack at relative importing once more... Could be that cousin imports work with the right placement of __init__.py that I just didn't try yet
@Kevin I would say do what Java does, except either derive the package from the file structure and don't have a package declaration, or derive it solely from the package declaration and ignore the file structure
Then you just scan everything and don't need to kill yourself deploying to Heroku and suddenly it all doesn't work
Aaargh. Forgot I should be adding a new method to Base.isless instead of isless.. vaguely like rebinding an instance specialmethod, which won't work. #nonPythonmoments
On behalf of all members of the Unseen University, I declare we shall release a flag of mourning to fly from the Tower of Art. I believe I have that authority.
Solves the X problem of "how can I execute this code?" but not the Y problem of "how do I OCR this code so I can execute it?"
Reminds me of a problem I had the other day. I was playing terrible idle game Tangerine Farmer and I wanted to write an OCR application so I could automate the stock market game. Buy when stocks are low, sell when stocks are high. Simple enough, if I could just read the numbers.
I downloaded tesseract and ran it on an image of the stock listing column... No output.
Quite disappointing. I thought that the picture would easily be recognized, since it had 0 noise. It was a direct screenshot after all.
Even tightly cropping the image so only a single line of digits appeared, with nothing else but a solid background, didn't help. Nor did converting to grayscale or any other contrast increasing trick I could think of.
I guess I could have had better luck if I explicitly trained the engine to recognize that particular font, but that's way more effort than I was willing to put in. So I just gave up :-(
When someone is saved from certain death by a strange concatenation of circumstances, they say that's a miracle. But of course if someone is killed by a freak chain of events : the oil just spilled there, the safety fence just broke there : that must also be a miracle. Just because its not nice doesnt mean its not miraculous.
meh ... I guess i just use the normal python ... it has windows installer ... but then you need to make your path right and install setuptools and a bunch of dependencies ... anaconda just bundles alot of that stuff in
JavaScript implements inheritance by allowing you to associate a prototypical object with any constructor function.
So, you can create exactly the Employee — Manager example, but you use slightly different terminology. First you define the Employee constructor function, specifying the name and dept properties. Next, you define the Manager constructor function, calling the Employee constructor and specifying the reports property.
Finally, you assign a new object derived from Employee.prototype as the prototype for the Manager constructor function. Then, when you create a new Manager, it inherits the name and dept properties from the Employee object.
TBH I didn't understand what JS was doing until I started playing with CoffeeScript, and realized how much I should have been writing in order to get JS to do what I thought it was doing.
@Fizzy: that was me yesterday. Accomplished nothing all day.
maybe someone who isnt really an it person tried to throw a switch .... and didnt know what they were doing ... im guesing it is supposed to be a memorial of somesort
Basically, I want to create a different user profiles with different data, and join it on a user at a specific event. Eg, a profile would not be a user until invited. I just have no idea how to go about doing that :|
@Ffisegydd I'll give it a browse. My current JKevinScript dev plan is "try to port KevinScript line-by line as literally as possible", which shouldn't be too hard, since I was careful to not use any Python-specific features that are impossible to replicate.
The main objection to self-answering a post seems to be "isn't the OP trying to game the system this way?" but users gaining points for writing excellent posts is exactly what SO wants.
How bout I send you one of each, just in case? You can pick which one you like and give the other to a friend. Or use it as a pillowcase, or a cat bed. The choice is yours!
I'm not sure that I do. You youngsters with your drive-throughs and your crazy music and your UnaryOpExpressions. Impossible to figure out what you're saying half the time.
I could configure the lexer to allow exactly one operator only at the beginning of integer literals, but then it would be difficult for it to figure out whether 2+2 means "literal operator literal" or just "literal literal"
Today I learned that Python has dedicated dunder methods for unary minus/plus. I figured -x was just syntactic sugar for x * -1 and unary plus was a no-op.