Filter:    All Videos Images Text Favs Shares
Try now
You can follow Alex Schliker
alex uses Snipd to save videos, images, and text on the web.
dog
train your dog to stop barking
Train Your Dog to Stop Barking 
First of all, your dog must learn that barking for your attention doesn't work. If he is unhappy outdoors and barking eventually makes you bring him in, he learns that barking gets results. If barking makes you yell at him, well, that's better than nothing. "I'm bored. Maybe I can get them to yell at me again." Although yelling doesn't work, negative reinforcement can still be useful.
Barking while you are away
More often than not, the problem barker has never learned to be alone. He is accustomed to lavish attention without having to earn it. He thinks he is the center of the world and upon finding himself abandoned he is distraught and he barks, what did you expect?
Stop praising and petting your dog for doing nothing.
Practice being out of touch.

Because you aren't petting and stroking and fondling him all the time, your dog should be learning now that it's ok to be "out of touch" for short periods. Get some good chew toys. Nylabones and Kongs are excellent.  Let your dog become distracted with a chew toy, then calmly and quietly leave the room, closing the door behind you. Within a few minutes, preferably before your dog has become distraught about your absence, come back in and resume what you were doing. Move calmly, say nothing.

snipd 1 month ago
8 snippets reply
 
 
Alex: great vid
But you really learn when you’re confronted with failure. And that I think is the primary root of constructive failure and why this Valley is so successful with failures. I think you can learn from those failures. I think, ultimately, the only way to really get your money’s worth out of failure, better be your own, right? And that’s largely because that hollowness in your stomach, the disappointment of 250 people whose lives and families depend on you, the chagrin of your board members, you’ve got to feel it. You got to feel it if you’re going learn it. And I think some people are lucky enough to go through life failing a little, or not at all. I don’t think they’re probably as wise as the guys who have actually failed.
snipd 3 months ago
3 snippets reply
 
sexy - 
snipd 3 months ago
3 snippets reply
 
snipd 4 months ago
1 snippet reply
 
snipd 4 months ago
1 snippet reply
 
snipd 4 months ago
2 snippets 1 reply
 
snipd 4 months ago
2 snippets 1 reply
 
Paddy Doyle, Marie Collins, Cardinal Brady
"It's a struggle but I'm trying to hang on," she said. "I need something more to hang on to. I need a sense of morality."
snipd 4 months ago
3 snippets 1 reply
 
BeautifulSoup 3.0.7a
Beautiful Soup parses arbitrarily invalid SGML and provides a variety of methods and Pythonic idioms for iterating and searching the parse tree.
snipd 4 months ago
3 snippets reply
 

Ingredients

Orange Sauce for Stir Fry

snipd 1 year ago
2 snippets reply
 
Speaker: Michael Granger

Michael’s talk was full of excellend pre-recorded video demos, and thus was difficult to note-take.Instead, here are links to most of the pieces of software he discussed for your perusal:

snipd 1 year ago
4 snippets reply
 
I’m working on a project that aggregates a bunch of community calendars, plus a lot of calendar info that’s just written out free-form. Some examples of the latter, in ascending order of resistance to mechanical parsing:

Tue, 4/1/08

2Apr - Wed 10:00AM-10:45AM

Weekdays 8:30am-4:30pm

Thu, 11/15/07 - Fri, 4/11/08

Every Tuesday of the month from 10:00-11:00 a.m

Sat., Apr. 05, 9:00 AM Registration/Preview, 10:00 AM Live Auction

2nd Saturday of every other month, 10:00 am-12:00 pm

In looking around for a recognizer, I came across the script that Jamie Zawinski uses to manage the calendar for his DNA Lounge . It looks like it can handle many of these formats, but it’s a 6500-line Perl behemoth that does a bunch of different things.
That’s the sort of thing that REXX did really well, as I recall. But’s that going back a ‘fer piece’.

Python parsedatetime does some of what you’re looking for, but not all:

http://code.google.com/p/parsedatetime/

Not sure if it’s what you’re after, but I’ve used a JS library called Date.js (www.datejs.com) which works really well. And they have a cool website to test it out.
John Udell raises the challenge of translating the human formats of a calendar entry into a machine format. Google Calendars quick add feature does make a fair effort and responds as the human intended in most cases.
From the examples given by John
Tue, 4/1/08 ok
2 Apr - Wed 10:00AM-10:45AM Gets date wrong (time of day ok)
Weekdays 8:30am-4:30pm ok
Thu, 11/15/07 - Fri, 4/11/08 ok

Every Tuesday of the month from 10:00-11:00 a.m
ok
Sat., Apr. 05, 9:00 AM Registration/Preview, 10:00 AM Live Auction ok
2nd Saturday of every other month, 10:00 am-12:00 pm ok
The API seems to provide a neat packaging of the requirement as a service which could be used in many ways. Problems that are encountered, like the example above, might eventually be dealt with by the team at Google but seem tractable through pre-processing.

I know you know if you can’t find a library or if customization is needed, a parser-generator such as ANTLR is the way to go. Heck! Write a Popfly component!

You might be interested in the paper “From Dirt to Shovels: Fully Automatic Tool Generation from Ad Hoc Data”:

http://www.cs.princeton.edu/~dpw/papers/padslearning-0707.pdf

“The API seems to provide a neat packaging of the requirement as a service which could be used in many ways.”

Yes, Google Calendar’s recognizer does seem like a promising approach.

You might get some higher level ideas from talking to the folks at ReQall and Tripit who are doing nice parsing of information including ‘human friendly’ dates and times
Stephen Says:

GATE will do that
http://gate.ac.uk/

There’s a module in CPAN called Date::Manip that does this.It has a method called ParseDate() that does its best to figure out what a given input means.Then, once parsed, the rest of the module lets you work with dates in more computer-friendly ways.

Looks like Parand above has already mentioned my library: parsedatetime for Python.

I would be extremely interested in any feedback for items it cannot handle.

One item it already handles is adjusting to different Locale’s day/month/year order.

snipd 1 year ago
15 snippets reply
 
SHOULD I USE DATE::MANIP ^

If you look in CPAN, you'll find that there are a number of Date and Time packages. Is Date::Manip the one you should be using? In my opinion, the answer is no most of the time. This sounds odd coming from the author of the software, but read on.

Date::Manip is written entirely in Perl. It's the most powerful of the date modules. It's also the biggest and slowest.

Since Date::Manip is written entirely in Perl, and depends on no other module not in a standard Perl distribution, Date::Manip has no dependencies to meet. Other modules have dependencies on a C compiler or other Perl modules. Since it is fairly easy to satisfy these dependencies for anyone who is reasonably familiar with Perl modules, this is not a huge advantage that Date::Manip has.

On the other hand, simpler Perl modules tend to be faster than Date::Manip, and modules written in C are significantly faster than their Perl counterparts (at least if they're done right). The TimeDate and Time-modules modules are written in Perl, but are much simpler (and hence, faster) than Date::Manip. The Date::Calc module is written in C and is a good module for doing many date calculations much faster than Date::Manip. Between these three, most of your common date operations can be done.

It should be noted that using the Memoize module in conjunction with Date::Manip can have a huge impact on its performance, depending on the types of operations you do. Your mileage may vary though.

Date::Manip is certainly the most powerful of the Date modules. To the best of my knowledge, it will do everything that any other date module will do (not just the ones I listed above), and there are a number of features that Date::Manip has that none of the other modules have. Date::Manip is the "Swiss Army Knife" of Date modules. I'm trying to build a library which can do _EVERY_ conceivable date/time manipulation that you'll run into in everyday life.

Although I am working on making Date::Manip faster, it will never be as fast as other modules. And before anyone asks, Date::Manip will never be translated to C (at least by me). I write C because I have to. I write Perl because I like to. Date::Manip is something I do because it interests me, not something I'm paid for.

Date::Manip is also big. The last time I looked, it's one of the largest CPAN modules there is. If you ignore modules like Tk, LWP, etc. which are actually packages of modules, it may be the largest. It's true that Date::Manip will do almost every date operation you could imagine... but you rarely need all that power. I'm working on reducing the footprint of Date::Manip, but even at its slimmest, it'll outweigh the other modules by a good bit.

If you are going to be using the module in cases where performance is an important factor (started up in a CGI program being run by your web server 5,000 times a second), you should check out one of the other Date or Time modules in CPAN. If you're only doing fairly simple date operations (parsing common date formats, finding the difference between two dates, etc.), the other modules will almost certainly suffice. If you're doing one operation very repetitively (parsing 10,000 dates from a database), you are probably better off writing your own functions (perhaps bypassing all date modules entirely) designed specifically for your needs.

On the other hand, if you want one solution for all your date needs, don't need peak speed, or are trying to do more exotic date operations, Date::Manip is for you. Operations on things like business dates, foreign language dates, holidays and other recurring events, etc. are available more-or-less exclusively in Date::Manip.

The above routines all check to make sure that Date_Init is called. If it hasn't been, they will call it automatically. As a result, there is usually no need to call Date_Init explicitly unless you want to change some of the config variables (described below). They also do error checking on the input.

The routines listed below are intended primarily for internal use by other Date::Manip routines. They do little or no error checking, and do not explicitly call Date_Init. Those functions are all done in the main Date::Manip routines above.

Because they are significantly faster than the full Date::Manip routines, they are available for use with a few caveats. Since little or no error checking is done, it is the responsibility of the programmer to ensure that valid data (AND valid dates) are passed to them. Passing invalid data (such as a non-numeric month) or invalid dates (Feb 31) will fail in unpredictable ways (possibly returning erroneous results). Also, since Date_Init is not called by these, it must be called explicitly by the programmer before using these routines.

In the following routines, $y may be entered as either a 2 or 4 digit year (it will be converted to a 4 digit year based on the variable YYtoYYYY described below). Month and day should be numeric in all cases. Most (if not all) of the information below can be gotten from UnixDate which is really the way I intended it to be gotten, but there are reasons to use these (these are significantly faster).

This is a set of routines designed to make any common date/time manipulation easy to do. Operations such as comparing two times, calculating a time a given amount of time from another, or parsing international times are all easily done. From the very beginning, the main focus of Date::Manip has been to be able to do ANY desired date/time operation easily, not necessarily quickly. Also, it is definitely oriented towards the type of operations we (as people) tend to think of rather than those operations used routinely by computers. There are other modules that can do a subset of the operations available in Date::Manip much quicker than those presented here, so be sure to read the section SHOULD I USE DATE::MANIP below before deciding which of the Date and Time modules from CPAN is for you.
snipd 1 year ago
3 snippets reply
 
Close
What do you think? How do you feel?
Feedback can mold Snipd. Make Snipd your baby!