Popular recipes tagged "meta:loc=293"http://code.activestate.com/recipes/tags/meta:loc=293/2017-04-01T19:27:59-07:00ActiveState Code RecipesTkinter Desktop Notifications or Popups (Python) 2017-04-01T19:27:59-07:00Miguel Martínez Lópezhttp://code.activestate.com/recipes/users/4189907/http://code.activestate.com/recipes/580769-tkinter-desktop-notifications-or-popups/ <p style="color: grey"> Python recipe 580769 by <a href="/recipes/users/4189907/">Miguel Martínez López</a> (<a href="/recipes/tags/alert/">alert</a>, <a href="/recipes/tags/easing/">easing</a>, <a href="/recipes/tags/notification/">notification</a>, <a href="/recipes/tags/popup/">popup</a>, <a href="/recipes/tags/tkinter/">tkinter</a>). Revision 2. </p> <p>This trick requires <em>pytweening</em>:</p> <p><a href="https://pypi.python.org/pypi/PyTweening" rel="nofollow">https://pypi.python.org/pypi/PyTweening</a></p> <p>Install writing:</p> <pre class="prettyprint"><code> pip install pytweening </code></pre> <p>It shows a notification on one corner of the screen,and gradually the notification disappears using an easing function. By default, it uses a linear easing function.</p> <p>The class <em>Notification_Manager</em> has the method <em>create_notification</em>, but it also has some convenient methods to create easily some kind of notifications: success, alert, info, warning.</p> An interval mapping data structure (Python) 2010-12-23T12:51:27-08:00Matteo Dell'Amicohttp://code.activestate.com/recipes/users/2433284/http://code.activestate.com/recipes/577515-an-interval-mapping-data-structure/ <p style="color: grey"> Python recipe 577515 by <a href="/recipes/users/2433284/">Matteo Dell'Amico</a> (<a href="/recipes/tags/algorithms/">algorithms</a>, <a href="/recipes/tags/interval/">interval</a>, <a href="/recipes/tags/mapping/">mapping</a>). </p> <p>This structure is a kind of dictionary which allows you to map data intervals to values. You can then query the structure for a given point, and it returns the value associated to the interval which contains the point. Boundary values don't need to be an integer.</p> <p>In this version, the excellent <a href="http://pypi.python.org/pypi/blist/">blist</a> library by Daniel Stutzbach is used for efficiency. By using the collections.MutableMapping abstract base class, the whole signature of mappings is supported.</p> Implementation of a single linked list in PHP (PHP) 2008-09-11T12:44:41-07:00sameer boratehttp://code.activestate.com/recipes/users/4167072/http://code.activestate.com/recipes/576498-implementation-of-a-single-linked-list-in-php/ <p style="color: grey"> PHP recipe 576498 by <a href="/recipes/users/4167072/">sameer borate</a> (<a href="/recipes/tags/linked_list/">linked_list</a>, <a href="/recipes/tags/php/">php</a>). </p> <p>Implementation of a single linked list in PHP with Unit Test</p>