]> pere.pagekite.me Git - homepage.git/blobdiff - blog/index.html
Generated.
[homepage.git] / blog / index.html
index 12377cc9b7a549eb56eb5da78d0239b2804a5cc4..1576fbb7fd505bdf74ef4e3cfb830e52cf9e6b6a 100644 (file)
 
 
     
+    <div class="entry">
+      <div class="title"><a href="http://people.skolelinux.org/pere/blog/Non_blocking_bittorrent_plugin_for_vlc.html">Non-blocking bittorrent plugin for vlc</a></div>
+      <div class="date">12th December 2018</div>
+      <div class="body"><p>A few hours ago, a new and improved version (2.4) of
+<a href="https://tracker.debian.org/pkg/vlc-plugin-bittorrent">the VLC
+bittorrent plugin</a> was uploaded to Debian.  This new version
+include a complete rewrite of the bittorrent related code, which seem
+to make the plugin non-blocking.  This mean you can actually exit VLC
+even when the plugin seem to be unable to get the bittorrent streaming
+started.  The new version also include support for filtering playlist
+by file extension using command line options, if you want to avoid
+processing audio, video or images.  The package is currently in Debian
+unstable, but should be available in Debian testing in two days.  To
+test it, simply install it like this:</p>
+
+<p><pre>
+apt install vlc-plugin-bittorrent
+</pre></p>
+
+<p>After it is installed, you can try to use it to play a file
+downloaded live via bittorrent like this:
+
+<p><pre>
+vlc https://archive.org/download/Glass_201703/Glass_201703_archive.torrent
+</pre></p>
+
+<p>As usual, if you use Bitcoin and want to show your support of my
+activities, please send Bitcoin donations to my address
+<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
+</div>
+      <div class="tags">
+        
+        
+        Tags: <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/verkidetfri">verkidetfri</a>, <a href="http://people.skolelinux.org/pere/blog/tags/video">video</a>. 
+        
+        
+      </div>
+    </div>
+    <div class="padding"></div>
+    
     <div class="entry">
       <div class="title"><a href="http://people.skolelinux.org/pere/blog/Retten_til_kontant_betaling_er_en_rettighet_som_m__brukes_for___beholdes.html">Retten til kontant betaling er en rettighet som må brukes for å beholdes</a></div>
       <div class="date">11th December 2018</div>
@@ -41,7 +81,7 @@ seg myndighetene eller private organisasjoner, så kan en ikke lenger
 bevege seg fritt.  Dette gjør at det er en forutsetning for å ha glede
 av retten til å bevege seg fritt i landet at en motstår fristelsen til
 å legge igjen digitale spor når en betaler for seg.  Rettigheter som
-ikke blir brukt, blit fjernet.  Den eneste måten i dag å unngå å legge
+ikke blir brukt, blir fjernet.  Den eneste måten i dag å unngå å legge
 igjen digitale spor når en betaler for seg, er å betale med kontanter,
 samt takke nei til å legge igjen navn og adresse (slik f.eks. Elkjøp
 ber om &mdash; jeg sier de kan legge inn «anonym anonym» når
@@ -621,168 +661,6 @@ activities, please send Bitcoin donations to my address
     </div>
     <div class="padding"></div>
     
-    <div class="entry">
-      <div class="title"><a href="http://people.skolelinux.org/pere/blog/Valutakrambod___A_python_and_bitcoin_love_story.html">Valutakrambod - A python and bitcoin love story</a></div>
-      <div class="date">29th September 2018</div>
-      <div class="body"><p>It would come as no surprise to anyone that I am interested in
-bitcoins and virtual currencies.  I've been keeping an eye on virtual
-currencies for many years, and it is part of the reason a few months
-ago, I started writing a python library for collecting currency
-exchange rates and trade on virtual currency exchanges.  I decided to
-name the end result valutakrambod, which perhaps can be translated to
-small currency shop.</p>
-
-<p>The library uses the tornado python library to handle HTTP and
-websocket connections, and provide a asynchronous system for
-connecting to and tracking several services.  The code is available
-from
-<a href="http://github.com/petterreinholdtsen/valutakrambod">github</a>.</p>
-
-</p>There are two example clients of the library.  One is very simple and
-list every updated buy/sell price received from the various services.
-This code is started by running bin/btc-rates and call the client code
-in valutakrambod/client.py.  The simple client look like this:</p>
-
-<p><blockquote><pre>
-import functools
-import tornado.ioloop
-import valutakrambod
-class SimpleClient(object):
-    def __init__(self):
-        self.services = []
-        self.streams = []
-        pass
-    def newdata(self, service, pair, changed):
-        print("%-15s %s-%s: %8.3f %8.3f" % (
-            service.servicename(),
-            pair[0],
-            pair[1],
-            service.rates[pair]['ask'],
-            service.rates[pair]['bid'])
-        )
-    async def refresh(self, service):
-        await service.fetchRates(service.wantedpairs)
-    def run(self):
-        self.ioloop = tornado.ioloop.IOLoop.current()
-        self.services = valutakrambod.service.knownServices()
-        for e in self.services:
-            service = e()
-            service.subscribe(self.newdata)
-            stream = service.websocket()
-            if stream:
-                self.streams.append(stream)
-            else:
-                # Fetch information from non-streaming services immediately
-                self.ioloop.call_later(len(self.services),
-                                       functools.partial(self.refresh, service))
-                # as well as regularly
-                service.periodicUpdate(60)
-        for stream in self.streams:
-            stream.connect()
-        try:
-            self.ioloop.start()
-        except KeyboardInterrupt:
-            print("Interrupted by keyboard, closing all connections.")
-            pass
-        for stream in self.streams:
-            stream.close()
-</pre></blockquote></p>
-
-<p>The library client loops over all known "public" services,
-initialises it, subscribes to any updates from the service, checks and
-activates websocket streaming if the service provide it, and if no
-streaming is supported, fetches information from the service and sets
-up a periodic update every 60 seconds.  The output from this client
-can look like this:</p>
-
-<p><blockquote><pre>
-Bl3p            BTC-EUR: 5687.110 5653.690
-Bl3p            BTC-EUR: 5687.110 5653.690
-Bl3p            BTC-EUR: 5687.110 5653.690
-Hitbtc          BTC-USD: 6594.560 6593.690
-Hitbtc          BTC-USD: 6594.560 6593.690
-Bl3p            BTC-EUR: 5687.110 5653.690
-Hitbtc          BTC-USD: 6594.570 6593.690
-Bitstamp        EUR-USD:    1.159    1.154
-Hitbtc          BTC-USD: 6594.570 6593.690
-Hitbtc          BTC-USD: 6594.580 6593.690
-Hitbtc          BTC-USD: 6594.580 6593.690
-Hitbtc          BTC-USD: 6594.580 6593.690
-Bl3p            BTC-EUR: 5687.110 5653.690
-Paymium         BTC-EUR: 5680.000 5620.240
-</pre></blockquote></p>
-
-<p>The exchange order book is tracked in addition to the best buy/sell
-price, for those that need to know the details.</p>
-
-<p>The other example client is focusing on providing a curses view
-with updated buy/sell prices as soon as they are received from the
-services.  This code is located in bin/btc-rates-curses and activated
-by using the '-c' argument.  Without the argument the "curses" output
-is printed without using curses, which is useful for debugging.  The
-curses view look like this:</p>
-
-<p><blockquote><pre>
-           Name Pair   Bid         Ask         Spr    Ftcd    Age
- BitcoinsNorway BTCEUR   5591.8400   5711.0800   2.1%   16    nan     60
-       Bitfinex BTCEUR   5671.0000   5671.2000   0.0%   16     22     59
-        Bitmynt BTCEUR   5580.8000   5807.5200   3.9%   16     41     60
-         Bitpay BTCEUR   5663.2700         nan   nan%   15    nan     60
-       Bitstamp BTCEUR   5664.8400   5676.5300   0.2%    0      1      1
-           Bl3p BTCEUR   5653.6900   5684.9400   0.5%    0    nan     19
-       Coinbase BTCEUR   5600.8200   5714.9000   2.0%   15    nan    nan
-         Kraken BTCEUR   5670.1000   5670.2000   0.0%   14     17     60
-        Paymium BTCEUR   5620.0600   5680.0000   1.1%    1   7515    nan
- BitcoinsNorway BTCNOK  52898.9700  54034.6100   2.1%   16    nan     60
-        Bitmynt BTCNOK  52960.3200  54031.1900   2.0%   16     41     60
-         Bitpay BTCNOK  53477.7833         nan   nan%   16    nan     60
-       Coinbase BTCNOK  52990.3500  54063.0600   2.0%   15    nan    nan
-        MiraiEx BTCNOK  52856.5300  54100.6000   2.3%   16    nan    nan
- BitcoinsNorway BTCUSD   6495.5300   6631.5400   2.1%   16    nan     60
-       Bitfinex BTCUSD   6590.6000   6590.7000   0.0%   16     23     57
-         Bitpay BTCUSD   6564.1300         nan   nan%   15    nan     60
-       Bitstamp BTCUSD   6561.1400   6565.6200   0.1%    0      2      1
-       Coinbase BTCUSD   6504.0600   6635.9700   2.0%   14    nan    117
-         Gemini BTCUSD   6567.1300   6573.0700   0.1%   16     89    nan
-         Hitbtc+BTCUSD   6592.6200   6594.2100   0.0%    0      0      0
-         Kraken BTCUSD   6565.2000   6570.9000   0.1%   15     17     58
-  Exchangerates EURNOK      9.4665      9.4665   0.0%   16 107789    nan
-     Norgesbank EURNOK      9.4665      9.4665   0.0%   16 107789    nan
-       Bitstamp EURUSD      1.1537      1.1593   0.5%    4      5      1
-  Exchangerates EURUSD      1.1576      1.1576   0.0%   16 107789    nan
- BitcoinsNorway LTCEUR      1.0000     49.0000  98.0%   16    nan    nan
- BitcoinsNorway LTCNOK    492.4800    503.7500   2.2%   16    nan     60
- BitcoinsNorway LTCUSD      1.0221     49.0000  97.9%   15    nan    nan
-     Norgesbank USDNOK      8.1777      8.1777   0.0%   16 107789    nan
-</pre></blockquote></p>
-
-<p>The code for this client is too complex for a simple blog post, so
-you will have to check out the git repository to figure out how it
-work.  What I can tell is how the three last numbers on each line
-should be interpreted.  The first is how many seconds ago information
-was received from the service.  The second is how long ago, according
-to the service, the provided information was updated.  The last is an
-estimate on how often the buy/sell values change.</p>
-
-<p>If you find this library useful, or would like to improve it, I
-would love to hear from you.  Note that for some of the services I've
-implemented a trading API.  It might be the topic of a future blog
-post.</p>
-
-<p>As usual, if you use Bitcoin and want to show your support of my
-activities, please send Bitcoin donations to my address
-<b><a href="bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b</a></b>.</p>
-</div>
-      <div class="tags">
-        
-        
-        Tags: <a href="http://people.skolelinux.org/pere/blog/tags/bitcoin">bitcoin</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english">english</a>. 
-        
-        
-      </div>
-    </div>
-    <div class="padding"></div>
-    
     <p style="text-align: right;"><a href="index.rss"><img src="http://people.skolelinux.org/pere/blog/xml.gif" alt="RSS feed" width="36" height="14" /></a></p>
     <div id="sidebar">
       
@@ -814,7 +692,7 @@ activities, please send Bitcoin donations to my address
 
 <li><a href="http://people.skolelinux.org/pere/blog/archive/2018/11/">November (2)</a></li>
 
-<li><a href="http://people.skolelinux.org/pere/blog/archive/2018/12/">December (2)</a></li>
+<li><a href="http://people.skolelinux.org/pere/blog/archive/2018/12/">December (3)</a></li>
 
 </ul></li>
 
@@ -1123,7 +1001,7 @@ activities, please send Bitcoin donations to my address
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/drivstoffpriser">drivstoffpriser (4)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (393)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/english">english (394)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami (23)</a></li>
 
@@ -1209,9 +1087,9 @@ activities, please send Bitcoin donations to my address
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/valg">valg (9)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/verkidetfri">verkidetfri (13)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/verkidetfri">verkidetfri (14)</a></li>
 
- <li><a href="http://people.skolelinux.org/pere/blog/tags/video">video (70)</a></li>
+ <li><a href="http://people.skolelinux.org/pere/blog/tags/video">video (71)</a></li>
 
  <li><a href="http://people.skolelinux.org/pere/blog/tags/vitenskap">vitenskap (4)</a></li>