Language Selection

English French German Italian Portuguese Spanish

Howtos

Using Menus For Command Line Programs and Scripts

Filed under
Howtos

THE holidays are coming (Christmas approaching), so I've taken advantage of some spare time to menu-ise commands that I use frequently. Those commands aren't the mere opening of an application and they often require dealing with input and output (in the command line). So I've created menu.sh and used dialog to craft the following menu, e.g. for operations associated with Techrights. I invoke this menu with the click of one button (of the mouse).

Rianne has a similar menu for commands she often runs (which are long and would otherwise need pasting or typing in length). Her menu looks something like this:

Rianne's menu

Here's the code (bash file) that renders the menu above (it's really that simple!):


#!/bin/bash

HEIGHT=15
WIDTH=40
CHOICE_HEIGHT=4
BACKTITLE="Aloha, Rianne"
TITLE="Rianne @ Ted"
MENU="Choose one of the following options:"

OPTIONS=(1 "Start VPN"
         2 "REDACTED"
         3 "REDACTED"
	4 "REDACTED"
	5 "REDACTED"
	6 "REDACTED"
	7 "REDACTED"
)

CHOICE=$(dialog --clear \
                --backtitle "$BACKTITLE" \
                --title "$TITLE" \
                --menu "$MENU" \
                $HEIGHT $WIDTH $CHOICE_HEIGHT \
                "${OPTIONS[@]}" \
                2>&1 >/dev/tty)

clear
case $CHOICE in
        1)
            echo "You chose Option 1"
sh ~/vpn.sh ;;

        2)
            echo "You chose Option 2"
REDACTED COMMAND ;;
        3)
            echo "You chose Option 3"
REDACTED COMMAND ;;
        4)
            echo "You chose Option 4"
REDACTED COMMAND ;;
        5)
            echo "You chose Option 5"
REDACTED COMMAND ;;
        6)
            echo "You chose Option 6"
REDACTED COMMAND ;;
        7)
            echo "You chose Option 7"
REDACTED COMMAND ;;

esac

Hopefully this inspires other people out there to do the same. It takes a while to set up, but it's a big time saver over the long run.

The Bash Fingertips: Making Your Own 'Information Centre'

Filed under
Howtos

Information Centre

FORGET bloated Web browsers. Forget so-called 'social' media (I call it social control media). They're not efficient, they eat up a lot of memory and CPU cycles, and the interfaces are not consistent (across sites). They're sufficiently distracting and they have ads. They erode privacy. They don't scale well; neither for an aging system (my laptop turns 10 in a few months) nor for users. GUIs are good in particular scenarios, but when the same things are repeated over and over again one might as well set up scripts, automating things and tailoring one's own interfaces, which is easy to achieve (relatively fast and simple) in the command line. It's also more accessible, e.g. over SSH. The pertinent tools are already out there (available for download/installation from repositories), they just need to be put together and programming skills aren't required, just batching in a bash file.

Some years ago I 'developed' a little script (I've been scripting since I was about 12). I called it getswap-sorted.sh and it just ran another script that helped me see what applications use the swap (and how much of it). For the sake of speed I like to restart applications that heavily use swap (i.e. depend on magnetic disk operations). I don't have much RAM. I never had more than 2 GB. getswap-sorted.sh just called out ./getswap.sh | sort -n -k 5 and getswap.sh comes from Erik Ljungstrom. Here it is:

#!/bin/bash
# Get current swap usage for all running processes
# Erik Ljungstrom 27/05/2011
SUM=0
OVERALL=0
for DIR in `find /proc/ -maxdepth 1 -type d | egrep "^/proc/[0-9]"` ; do
PID=`echo $DIR | cut -d / -f 3`
PROGNAME=`ps -p $PID -o comm --no-headers`
for SWAP in `grep Swap $DIR/smaps 2>/dev/null| awk '{ print $2 }'`
do
let SUM=$SUM+$SWAP
done
echo "PID=$PID - Swap used: $SUM - ($PROGNAME )"
let OVERALL=$OVERALL+$SUM
SUM=0

done

The output of getswap-sorted.sh would be something like this:


PID=1559 - Swap used: 16472 - (x-terminal-emul )
PID=21980 - Swap used: 16648 - (kwalletd5 )
PID=25548 - Swap used: 16704 - (konversation )
PID=631 - Swap used: 19336 - (kded5 )
PID=23817 - Swap used: 50048 - (pidgin )
PID=23923 - Swap used: 180312 - (thunderbird )


This helps me see which application/process number uses swap and to what degree. It's sorted by the amount of swap taken and the PID helps when I just want to kill a process from the command line (some are small and obsolete anyway).

My script, however, grew bigger over time. I added more things to it, eventually binding it to a special (fifth) mouse key, using xbindkeys -- an immensely valuable and powerful program I've used since around 2004. Extra mouse buttons always seemed worthless (anything more than three), but that's just because there was no program I needed to open or action I needed to invoke often enough. Over time I found that keeping a new terminal one click away (fourth button) and another special terminal also a click away improved my workflow/productivity. I just needed to invest some time in tailoring it. I ended up opening, temporarily, a terminal window with important information displayed, such as weather, disk space (I'm always near the limits), swap usage (I have only 2GB of RAM), uptime, real-time football scores etc. Change of wallpapers was lumped in too, for good measure...

For football tables/scores use one of the following 1) livescore-cli 2) soccer-cli and 3) football-cli.

Sadly, the above CLI football scores' tools got 'stolen' by Microsoft and need to isolate themselves GitHub, in due cource/time. I use the first of the three as it suits my needs best and does not require an API key.

The output looks like this:

 ... Fetching information from www.livescore.com ... 
Displaying Table for Barclay's Premier League
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
                                Barclay's Premier League TABLE
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 LP     Team Name               GP      W       D       L       GF      GA      GD      Pts
--------------------------------------------------------------------------------------------------
 1      Liverpool               24      19      4       1       55      14      41      61
 2      Tottenham Hotspur       25      19      0       6       51      24      27      57
 3      Manchester City         24      18      2       4       63      19      44      56
 4      Chelsea                 25      15      5       5       45      23      22      50
 5      Arsenal                 24      14      5       5       50      33      17      47
 6      Manchester United       24      13      6       5       48      35      13      45
 7      Wolverhampton Wanderers 25      11      5       9       33      32      1       38
 8      Watford                 25      9       7       9       33      34      -1      34
 9      Everton                 25      9       6       10      36      36      0       33
 10     AFC Bournemouth         25      10      3       12      37      44      -7      33
 11     Leicester City          24      9       5       10      30      30      0       32
 12     West Ham United         24      9       4       11      30      37      -7      31
 13     Brighton & Hove Albion  25      7       6       12      27      36      -9      27
 14     Crystal Palace          25      7       5       13      26      33      -7      26
 15     Newcastle United        25      6       6       13      21      33      -12     24
 16     Southampton             25      5       9       11      27      42      -15     24
 17     Burnley                 25      6       6       13      26      46      -20     24
 18     Cardiff City            25      6       4       15      22      46      -24     22
 19     Fulham                  25      4       5       16      25      55      -30     17
 20     Huddersfield Town       25      2       5       18      13      46      -33     11
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 LP = League Position   GP = Games Played       W = Wins        D = Draws       L = Lose 
 GF = Goals For         GA = Goal Against       GD = Goal Differences
--------------------------------------------------------------------------------------------------
 Champions League       Champions League qualification  Europa League
 Europa League qualification    Relegation
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Real-time scores (when matches are on):

 ... Fetching information from www.livescore.com ... 
Displaying Scores for Barclay's Premier League
----------------------------------------------------------------------------
                 Barclay's Premier League SCORES 
----------------------------------------------------------------------------
 January 29  FT     Arsenal                  2 - 1  Cardiff City           
 January 29  FT     Fulham                   4 - 2  Brighton & Hove Albion 
 January 29  FT     Huddersfield Town        0 - 1  Everton                
 January 29  FT     Wolverhampton Wanderers  3 - 0  West Ham United        
 January 29  FT     Manchester United        2 - 2  Burnley                
 January 29  FT     Newcastle United         2 - 1  Manchester City        
 January 30  FT     AFC Bournemouth          4 - 0  Chelsea                
 January 30  FT     Southampton              1 - 1  Crystal Palace         
 January 30  FT     Liverpool                1 - 1  Leicester City         
 January 30  FT     Tottenham Hotspur        2 - 1  Watford                
 February 2  FT     Tottenham Hotspur        1 - 0  Newcastle United       
 February 2  FT     Brighton & Hove Albion   0 - 0  Watford                
 February 2  FT     Burnley                  1 - 1  Southampton            
 February 2  FT     Chelsea                  5 - 0  Huddersfield Town      
 February 2  FT     Crystal Palace           2 - 0  Fulham                 
 February 2  FT     Everton                  1 - 3  Wolverhampton Wanderers
 February 2  FT     Cardiff City             2 - 0  AFC Bournemouth        
 February 3  15:05  Leicester City           ? - ?  Manchester United      
 February 3  17:30  Manchester City          ? - ?  Arsenal                
 February 4  21:00  West Ham United          ? - ?  Liverpool              
----------------------------------------------------------------------------
---------------------------------------

Now putting it all together:


feh --bg-fill --randomize /media/roy/c3fd5b6e-794f-4f24-b3e7-b4ead3722f11/home/roy/Main/Graphics/Wallpapers/Single\ Head/natgeo/* &

livescore -t bpl 

./getswap.sh | sort -n -k 5
 curl -4 http://wttr.in/Manchester
 swapon --summary | grep sda2
 df | grep sda1
uptime

sleep 10

livescore -s bpl 

sleep 40

The first line is feh choosing a wallpaper at random from a collection of award-winning National Geographic photographs. The options and the underlying parameters are self-explanatory.

The football league's table is then shown.

Next, after about 10 seconds of processing, a list of processes will show up based on swap usage (as described above)

The weather at home (Manchester) will then be shown, with colour. Right now I get:

Weather report: Manchester

     \   /     Sunny
      .-.      -5--2 °C       
   ― (   ) ―   ↑ 9 km/h       
      `-’      10 km          
     /   \     0.0 mm         
                                                       ┌─────────────┐                                                       
┌──────────────────────────────┬───────────────────────┤  Sun 03 Feb ├───────────────────────┬──────────────────────────────┐
│            Morning           │             Noon      └──────┬──────┘     Evening           │             Night            │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│    \  /       Partly cloudy  │      .-.      Light drizzle  │  _`/"".-.     Light rain sho…│               Mist           │
│  _ /"".-.     -4-0 °C        │     (   ).    -2-3 °C        │   ,\_(   ).   1-3 °C         │  _ - _ - _ -  0-3 °C         │
│    \_(   ).   ↑ 12-20 km/h   │    (___(__)   ↑ 17-26 km/h   │    /(___(__)  ↗ 7-14 km/h    │   _ - _ - _   ↑ 9-17 km/h    │
│    /(___(__)  20 km          │     ‘ ‘ ‘ ‘   20 km          │      ‘ ‘ ‘ ‘  16 km          │  _ - _ - _ -  13 km          │
│               0.0 mm | 0%    │    ‘ ‘ ‘ ‘    0.4 mm | 83%   │     ‘ ‘ ‘ ‘   0.4 mm | 65%   │               0.0 mm | 0%    │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘
                                                       ┌─────────────┐                                                       
┌──────────────────────────────┬───────────────────────┤  Mon 04 Feb ├───────────────────────┬──────────────────────────────┐
│            Morning           │             Noon      └──────┬──────┘     Evening           │             Night            │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│      .-.      Light drizzle  │  _`/"".-.     Patchy rain po…│               Cloudy         │               Cloudy         │
│     (   ).    2-6 °C         │   ,\_(   ).   3-7 °C         │      .--.     1-4 °C         │      .--.     -2 °C          │
│    (___(__)   → 16-26 km/h   │    /(___(__)  → 20-27 km/h   │   .-(    ).   → 13-23 km/h   │   .-(    ).   ↗ 9-16 km/h    │
│     ‘ ‘ ‘ ‘   14 km          │      ‘ ‘ ‘ ‘  18 km          │  (___.__)__)  20 km          │  (___.__)__)  20 km          │
│    ‘ ‘ ‘ ‘    0.3 mm | 88%   │     ‘ ‘ ‘ ‘   0.3 mm | 88%   │               0.0 mm | 0%    │               0.0 mm | 0%    │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘
                                                       ┌─────────────┐                                                       
┌──────────────────────────────┬───────────────────────┤  Tue 05 Feb ├───────────────────────┬──────────────────────────────┐
│            Morning           │             Noon      └──────┬──────┘     Evening           │             Night            │
├──────────────────────────────┼──────────────────────────────┼──────────────────────────────┼──────────────────────────────┤
│    \  /       Partly cloudy  │               Overcast       │               Overcast       │      .-.      Light drizzle  │
│  _ /"".-.     -1-3 °C        │      .--.     2-6 °C         │      .--.     6 °C           │     (   ).    1 °C           │
│    \_(   ).   ↖ 19-31 km/h   │   .-(    ).   ↑ 23-33 km/h   │   .-(    ).   ↑ 24-40 km/h   │    (___(__)   ↑ 24-40 km/h   │
│    /(___(__)  20 km          │  (___.__)__)  19 km          │  (___.__)__)  8 km           │     ‘ ‘ ‘ ‘   9 km           │
│               0.0 mm | 0%    │               0.0 mm | 0%    │               0.0 mm | 0%    │    ‘ ‘ ‘ ‘    0.3 mm | 0%    │
└──────────────────────────────┴──────────────────────────────┴──────────────────────────────┴──────────────────────────────┘


After this I am shown general memory usage and disk usage (for a particular partition) along with uptime thusly:

/dev/sda2                               partition       2097148 381128  -1
/dev/sda1        84035088   77299588   2443660  97% /
 08:03:28 up 116 days, 12:36,  7 users,  load average: 1.70, 1.40, 1.26

It will close on its own after I see what needs seeing, owing to the sleep command. It saves me the clicking (required to then close the window); it just fades away or 'expires', so to speak (until the next time the mouse button gets pressed).

How to rename files in bulk

Filed under
Howtos

Consider this common scenario. A directory contains multiple files that are named using a common convention: for example, image-001.png, image-002.png, image-003.png, etc. You want to rename the files to, say, upload-001.png, upload-002.png, upload-003.png, etc.

The coders among us can write a bash script to automate the process. For expedience, this post shows how to use the built-in rename command to achieve the same goal.

Fixing OpenSuse’s Dog Awful default fonts…

Filed under
Howtos

Lets not beat around the bush here, the default font rendering in OpenSuse and the default font do not an OS fit for reading make.. this can be fixed however..

Love or hate Ubuntu, out of the box it has one of the best font rendering setups of any distro and considering how much time we spend on our PC’s setting your fonts up correctly is one less headach, literally.

I’m not sure how much of these instructions I got right, however after a reboot the screen text does at least look better..

Read More

Stopping Screen Flickering on Ivy Bridge Laptops using Linux

Filed under
Howtos

This is a solution to a problem which has been dogging me on every version of Linux I install on the Acer Aspire S3. I'm hoping it will help someone.

Read my solution

Forgot your Ubuntu Password? All is not lost.

Filed under
Howtos

It’s always a pain when you forget your password, and i’ve often done it on an Ubuntu install. All however is not lost as a stock Ubuntu install its quite easy to reset your password

Read More

Creating an AD Server for Free using Ubuntu and Samba

Filed under
Howtos

While being a huge fan of the GNU/Linux OS I do also live in the real world which means using Active Directory Domain Controllers and Windows networks. this week however I’ve had to build for a project a stand alone AD network. This got me thinking to a project I built for a school 6 uears ago which I did the same thing with Samba on Fedora.

Remote Application launching using X11 and SSH.. Oldie but a goodie..

Filed under
Howtos

Using WordPress as my central blog platform I’m very happy with it, not much to complain about, some good features, it’s very social and some nice themes. However it’s got me thinking not so much my content i’m now having a “problem” to manage it’s dealing with the replies

Read More

Using the right tools to get your media..

Filed under
Howtos

When it comes to getting what you want off the interent, its pretty fair to say, that there is an application and a set of instructions to do this. In this day and age its fair to say that getting media off the web should be the way that media companies distribute. Instead of trying to reinvent the wheel. Unfortunately they don't they bog you down with Websites, DRM, Magma and lots more.. Well This is how to get your media another way..

Standard Disclaimer: Your use of this software and configuration is at your own risk. Check the legality of downloading TV shows in your area. This post is purely for the sake of information.

.

Read more...

Big Bear's Helpful Hints-Google Docs Spreadsheets

Filed under
Howtos

I like to jot down things that I learn how to do on the spur of the moment so that I can find it later.

I admit, in the 80's there was quite of bit of "herbal remedy" usage and my short term memory isn't what it could be. That's my story and I'm sticking to it.

I've decided that I might as well potentially help some other folks who might want to know about some of the things I discover, so I thought why not here?

For my very first post, I wanted to figure out how to sum cells across multiple pages in Google Docs spreadsheets.

Syndicate content

More in Tux Machines

KDE Frameworks 5.73 Released with Many Changes to Breeze Icons, Kirigami and KNewStuff

KDE Frameworks 5.73 is a monthly update to the open-source software suite, but it packs a lot of interesting changes. For example, the Kirigami UI builder received a new FlexColumn component and now supports action visibility in the GlobalDrawer, along with optimizations to the mobile layout and to the accessibility of the Kirigami input fields. The Breeze icon theme saw a lot of changes too during the development cycle of KDE Frameworks 5.73, and it now comes with a bunch of new icons for Kontrast, kirigami-gallery, snap-angle, document-replace, SMART status, task-recurring, appointment-recurring, Overwrite action/button, and applications/pkcs12 mime type. Read more

Redo Rescue Backup and Recovery Live System Gets NFS Share Support, SSH Server

For those not in the know, Redo Rescue is a great, free and easy to use live Linux system based on Debian GNU/Linux that can help you whenever your computer is broken by letting you backup and restore an entire system in just a few minutes. For example, if your computer no longer boots after installing the recent BootHole patches for the GRUB2 bootloader, you can use Redo Rescue to repair the boot. Of course, there are a few other tools that can do the same, but Redo Rescue can also do bare metal restores by replacing the MBR and partition table, re-map original data to a different target partition and even verify the integrity of an existing backup image. Read more

Pocket P.C. design files released as open source (handheld Linux computer)

The Popcorn Computers Pocket P.C. is designed to be a handheld Linux computer with a 4.95 inch full HD display, a built-in keyboard, and a ARM Cortex-A53 quad-core processor. First unveiled in November 2019, the Pocket P.C. hasn’t shipped yet. It’s still up for pre-order for $199 and up. But the developers have already open sourced the hardware by releasing the latest design files. You can find the at the project’s GitHub page. Read more

today's leftovers

  • Linux Plumbers Conference: Toolchain Microconference Accepted into 2020 Linux Plumbers Conference

    We are pleased to announce that the Toolchain Microconference has been accepted into the 2020 Linux Plumbers Conference! The GNU toolchain has direct impact on the development of the Linux kernel and it is imperative that the developers of both ecosystems have an understanding of each other’s needs. Linux Plumbers is the perfect venue for the two communities to interact, and the GNU Toolchain microconference’s purpose is to facilitate that happening. Last year’s meetup at Linux Plumbers proved that it is critical that the two communities communicate with each other. As a result of last year’s microconference, the GNU toolchain has completed adding support for BPF, in a more flexible and usable way and system call wrappers in glibc were improved. There have been security features derived from the discussions, such as zeroing of registers when entering a function and implicit initialization of atomics.

  • Noodlings | Hardware is for the Terminal

    18 is such an adult number. Perhaps I am truly becoming a grown up podcast here. [...] This is another gift to future me from present me. I made the mistake of not properly writing this down before so I had to search for the answer. The problem is, sometimes, it seems as though Plasma is not shutting off my external screens consistently. I can’t say why but I have a suspicion that it is due to a specific communication application as I can almost guarantee that it is preventing my screens from turning off. I don’t have definitive proof of this so I am not going to put it in writing.

  • IWB (the man who brought GNU/Linux to IBM): Are We Becoming a Decadent, Stagnating Society?

    Earlier this year I read a very interesting essay, “The Age of Decadence”, by NY Times columnist Ross Douthat. The essay is adapted from his recently published book The Decadent Society - How We Became the Victims of Our Own Success. This long essay covers a lot of ground, from technology and innovation to politics and religion. The essay was published in early February, before Covid-19 spread across the US. I’ll discuss the original essay, but I do wonder how it would have been modified to reflect the impact of the pandemic. “The real story of the West in the 21st century is one of stalemate and stagnation,” wrote Douthat. “Everyone knows that we live in a time of constant acceleration, of vertiginous change, of transformation or looming disaster everywhere you look. Partisans are girding for civil war, robots are coming for our jobs, and the news feels like a multicar pileup every time you fire up Twitter. Our pessimists see crises everywhere; our optimists insist that we’re just anxious because the world is changing faster than our primitive ape-brains can process.” “But what if the feeling of acceleration is an illusion, conjured by our expectations of perpetual progress and exaggerated by the distorting filter of the internet?,” he asked. What if we really inhabit an era in which repetition is more the norm than invention; in which new developments in science and technology consistently undercover; in which we’re comfortably aging, “no longer optimistic about the future… [while] growing old unhappily together.” What if “Our civilization has entered into decadence.”

  • Matrix encrypted chat rolls out across Germany, Project ACRN's new IoT release, and more open source news

    In this week’s edition of our open source news roundup, an open source microfluidics pump, Germany rolls out an encrypted messaging platform based on Matrix, and more open source news.

  • Fedora program update: 2020-32

    Here’s your report of what has happened in Fedora this week. Nest With Fedora is happening now! Fedora 33 branch day is Tuesday.

  • Thorsten Alteholz: My Debian Activities in July 2020

    This month I accepted 434 packages and rejected 54. The overall number of packages that got accepted was 475.

  • Improvements to Merge Proposals by the Janitor

    The Debian Janitor is an automated system that commits fixes for (minor) issues in Debian packages that can be fixed by software. It gradually started proposing merges in early December. The first set of changes sent out ran lintian-brush on sid packages maintained in Git. This post is part of a series about the progress of the Janitor. Since the original post, merge proposals created by the janitor now include the debdiff between a build with and without the changes (showing the impact to the binary packages), in addition to the merge proposal diff (which shows the impact to the source package).

  • 10 Best Free Neovim GUIs

    Vim is a highly configurable, powerful, console-based, open source text editor. It’s efficient, letting users edit files with a minimum of keystrokes. Vim offers word completion, undo, shortcuts, abbreviations, keyboard customization, macros, and scripts. You can turn this into your editor for your environment. [...] To use Neovim, you can use the program in a terminal emulator. Alternatively, there’s the option of using a third party GUI designed for Neovim. Neither Vim nor Neovim were built for beauty. However, many users prefer a graphical interface combined with the power of Neo(vim). One interesting aspect of Neovim’s RPC support is that developers can create new front-ends for Neovim that are outside of the terminal. This article seems to highlight the best free and open source front-ends for Neovim. Here’s our recommendations. The vast majority of the software featured in this article is cross-platform.

  • Dirk Eddelbuettel: RVowpalWabbit 0.0.15: Some More CRAN Build Issues

    Another maintenance RVowpalWabbit package update brought us to version 0.0.15 earlier today. We attempted to fix one compilation error on Solaris, and addressed a few SAN/UBSAN issues with the gcc build. As noted before, there is a newer package rvw based on the excellent GSoC 2018 and beyond work by Ivan Pavlov (mentored by James and myself) so if you are into Vowpal Wabbit from R go check it out.

  • GSoC'20 progress : Phase II

    And just like that, the second phase of my project for Google Summer of Code is done. The evaluation results have arrived and I have passed successfully. I am thankful to my mentors for providing help and guidance throughout this project.

  • [LibreOffice] Week 9 Report

    The last week was the 9th week of coding weeks in GSoC program. I almost finished my final exams period I will start to work again with the regular rate.

  • Simulating a Turing Machine with Python and executing programs on it

    In this article, we shall implement a basic version of a Turing Machine in python and write a few simple programs to execute them on the Turing machine. This article is inspired by the edX / MITx course Paradox and Infinity and few of the programs to be executed on the (simulated) Turing machine are taken from the course. Also, some programs are from this Cambridge tutorial.

  • Congress To Consider National Right To Repair Law For First Time

    About five years ago, frustration at John Deere's draconian tractor DRM culminated in a grassroots "right to repair" movement. The company's crackdown on "unauthorized repairs" turned countless ordinary citizens into technology policy activists, after DRM and the company's EULA prohibited the lion's share of repair or modification of tractors customers thought they owned. These restrictions only worked to drive up costs for owners, who faced either paying significantly more money for "authorized" repair, or toying around with pirated firmware just to ensure the products they owned actually worked.

  • Victory! EFF Defends Public’s Right to Access Court Records About Patent Ownership

    The public’s right of access to court proceedings is well-established as a legal principle, but it needs constant defending. In part, that’s because private parties keep asking publicly-funded courts to resolve their disputes in secret. As we and others have written before, this problem is especially great in patent cases, where parties on opposite sides of a case often agree with each other to keep as much of the litigation as possible hidden from view. That deprives the public of material it has every right to see that could affect its rights to engage, like documents establishing (or undermining) a patent owner’s right to bring suit on the basis of a patent which they claim to own.

    Although this problem is pervasive, when we looked at a lawsuit filed by Uniloc—one of the most litigious patent trolls in the world—the amount of secrecy the parties agreed to was shocking. In Uniloc v. Apple, important, dispositive motion papers were filed with entire pages of text redacted, including information that could not possibly qualify as confidential, like case law citations. And what were those papers about? Whether Uniloc had the right to sue anyone, including Apple, for infringing the patents in the case. Because Uniloc is a prolific patent litigant—filing more than 170 patent infringement lawsuits in 2018 alone—questions about its right to sue have powerful ramifications on the public, including makers and users of a wide array of technology products.

  • The US declared war on TikTok because it can’t handle the truth

    TikTok does gather a lot of personal data, but it’s no more than what Facebook and other social networks also gather. The difference between TikTok and Facebook is that we have a great deal of transparency into the process by which Facebook gives your information to various governments. And specifically, Facebook does not release data to the Chinese government.

  • Trump’s WeChat ban could touch everything from Spotify to League of Legends

    Tencent is one of the largest tech companies in the world, and it’s spent the last few years buying stakes in video game studios, music companies, and social media apps. It’s bigger than ByteDance, and with significant ownership stakes in Snap, Blizzard, Spotify, and others, it’s far more embedded in the global tech industry. Yesterday’s order made those connections much more dangerous, even if they fall outside the narrow legal consequences of the order. As Tencent responds and its business partners are forced to choose sides, the consequences could be far broader than the White House realizes — and far more damaging to the average consumer.

  • Trump ban of Tencent Holdings could affect Fortnite, League of Legends and other games

    The crux of both orders lies within Section 1 (a), whose language differs only in the named company. “The following actions shall be prohibited beginning 45 days after the date of this order, to the extent permitted under applicable law: any transaction that is related to WeChat by any person, or with respect to any property, subject to the jurisdiction of the United States, with Tencent Holdings Ltd. (a.k.a. Téngxùn Kònggǔ Yǒuxiàn Gōngsī), Shenzhen, China, or any subsidiary of that entity, as identified by the Secretary of Commerce (Secretary) under section 1(c) of this order.”

    In the case of Tencent, that would mean customers in the United States would be banned from engaging with Tencent-owned games or subsidiaries. What's not clear is whether those users would also be prohibited from engaging with companies in which Tencent has an interest.

  • TikTok and WeChat: Chinese apps dogged by security fears

    Tencent surpassed Facebook's net worth after it became the first Asian firm to be valued at more than $500 billion in 2017.

    The Hong Kong-listed company now has a market capitalisation of HK$5.32 trillion ($686 billion), compared with Facebook's $756 billion.

  • Have I Been Pwned Set to Go Open-Source

    “I need to choose the right parts of the project to open up in the right way at the right time,” he said. “The transition from completely closed to completely open will happen incrementally, bit-by-bit and in a fashion that’s both manageable and responsible.”

    He added, “I want to get to a point where everything possible is open. I want the infrastructure configuration to be open too and I want the whole thing to be self-sustaining by the community.”