# Life Plus Linux

All about Machine Learning, Linux, Android, Web and of course Life

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## Magic Cauldron: Harry Potter Themed Gender Reveal Party

DevFeed: [Magic Cauldron: Harry Potter Themed Gender Reveal Party](<https://devfeed.tech/articles/magic-cauldron-harry-potter-themed-gender-reveal-party-21539.md>)

Original publisher: [Read original article](<http://lifepluslinux.blogspot.com/2024/09/magic-cauldron-harry-potter-themed.html>)

Author: Suresh Alse (noreply@blogger.com)

Published: 2024-10-01T06:22:00Z

Content type: tutorial

Language: en

Sources: [Life Plus Linux](<https://devfeed.tech/sources/life-plus-linux.md>)

Topics: [Arduino](<https://devfeed.tech/topics/arduino.md>), [Library](<https://devfeed.tech/topics/library.md>)

Tags: [arduino](<https://devfeed.tech/tags/arduino.md>), [aurdino](<https://devfeed.tech/tags/aurdino.md>), [harry-potter](<https://devfeed.tech/tags/harry-potter.md>), [led](<https://devfeed.tech/tags/led.md>), [library](<https://devfeed.tech/tags/library.md>)

### AI overview

The article explains how the author built a Harry Potter-themed Magic Cauldron for a gender reveal party using an Arduino UNO, dry ice, a WS2812B LED array, and a wired serial connection. It describes the fog effect, LED control with the FastLED.h library, and four reveal stages.

### Source excerpt

Earlier this year, we had a very fun filled Harry Potter themed gender reveal party. For the reveal, I built a Magic Cauldron which would reveal the gender. Check it out for yourself! For this I needed: A Cauldron. WS2812B LED array. Aurdino UNO. Bread board and jumper wires. Dry ice. Kasa Smart bulbs I will go over in the following sections The Mist. Serial Bus. LED orchestration. Room effect. The Mist Dry Ice is solid carbon dioxide which is at a very low temperature of -78.5°C. When put in water at room temperature, it rapidly sublimates to create the fog/ mist effect. The hotter the water, the denser the mist and the quicker the effect occurs. So, it is important to have a balance - I preferred to have water heated up for 10s in microwave before I began. To prevent the mist from spreading too far, place the water in a smaller bowl inside the cauldron. Make sure to get the dry ice the same day as the event if you don't have the means to store it. Even when stored in the freezer, you will lose a lot it through sublimation. Always handle dry ice with care--never touch it with bare hands, as it can cause instant frostbite--and keep it out of reach of children. Serial Bus The serial bus acts as a communication channel between my computer and the Arduino via a wired connection. We didn't know the baby's gender, and neither did anyone else. The plan was to have a trusted person open the envelope and provide the answer to start the reveal! Enter mode: b: boy, g: girl, d: dry run: I used the serial bus to relay this information to the Aurdino. LED orchestration I used a WS2812B LED array with 60 individually addressable LEDs, controlled through the FastLED.h library. The possibilities of what you can create with it are only limited by your imagination. There were 4 stages to the reveal build up 1. Lightning Every LED has 50% probability of turning on or off. Random delay between 10 and 100ms before all LEDs are turned off Random delay between 10 and 100ms before we repeat

## Kakashi: The Copycat Robot

DevFeed: [Kakashi: The Copycat Robot](<https://devfeed.tech/articles/kakashi-the-copycat-robot-21538.md>)

Original publisher: [Read original article](<http://lifepluslinux.blogspot.com/2024/09/kakashi-copycat-robot.html>)

Author: Suresh Alse (noreply@blogger.com)

Published: 2024-09-23T04:47:00Z

Content type: tutorial

Language: en

Sources: [Life Plus Linux](<https://devfeed.tech/sources/life-plus-linux.md>)

Topics: [Code](<https://devfeed.tech/topics/code.md>), [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [3D](<https://devfeed.tech/topics/3d.md>)

Tags: [3d-printed](<https://devfeed.tech/tags/3d-printed.md>), [algorithm](<https://devfeed.tech/tags/algorithm.md>), [aurdino](<https://devfeed.tech/tags/aurdino.md>), [build](<https://devfeed.tech/tags/build.md>), [code](<https://devfeed.tech/tags/code.md>), [image-processing](<https://devfeed.tech/tags/image-processing.md>), [mapping](<https://devfeed.tech/tags/mapping.md>), [project](<https://devfeed.tech/tags/project.md>), [scale](<https://devfeed.tech/tags/scale.md>), [side-project](<https://devfeed.tech/tags/side-project.md>), [speed](<https://devfeed.tech/tags/speed.md>)

### AI overview

A developer describes building Kakashi, a robot that imitates hand movements using an Arduino UNO, LED display, pan-and-tilt brackets, and four servo motors. The article explains the hand-tracking algorithm, including scale-invariant coordinate mapping and conversion to motor angles.

### Source excerpt

In this post, I want to share about "Kakashi: The Copycat Robot"--a fun side project I built a few years ago. The name is inspired by the famous character from Naruto, Kakashi Hatake, also known as the Copycat Ninja. The goal of this robot was to mimic Kakashi's ability to copy movements--though, of course, in a more limited way. Check it out for yourself! Here are the things I used to build this: Aurdino UNO board. Max7219 8x8 LED 3D printed Pan and Tilt brackets (2x) 4 servo motors Bread board and jumper wires. I will go through it in following sections: The Sharinghan Pan and Tilt motion Controller - Serial bus Tracking algorithm The Sharinghan Of course, our Kakashi needs a Sharingan! For those unfamiliar, the Sharingan is the special eye that grants Kakashi his copycat abilities in Naruto. For this, I used a Max7219 8x8 LED. It has 5 pins which I connected as follows: VCC - connect to 5V GND - connect to ground DIN - data in ports.h CS - chip select ports.h CLK - clock ports.h Then I found a led editor which I used to create a hex mapping of the sharinghan in different angles and wrote this code that loops around it. Aurdino: https://github.com/alseambusher/kakashi/blob/new_algo/src/led.h Client: https://github.com/alseambusher/kakashi/blob/new_algo/client/led.py Pan and Tilt Pan and tilt are the two motions using which you can basically cover any movement when used in combination. I used two of these to mimic arm movements. Each one is made up of a pan and tilt bracket, which you can either 3D print or purchase pre-made from Amazon. I attached two servo motors to each bracket. I won't go into assembly details, as there are plenty of great tutorials available on how to put one together. Each servo motor has 3 pins - 5V power, ground and control. I connected the four control cables to the following ports: I wrote a simple class to control the 4 servo motors and map it into pan and tilt actions. Controller - Serial Bus The serial bus acts as a communication channel

## Neural network inference pipeline for videos in Tensorflow

DevFeed: [Neural network inference pipeline for videos in Tensorflow](<https://devfeed.tech/articles/neural-network-inference-pipeline-for-videos-in-tensorflow-21537.md>)

Original publisher: [Read original article](<http://lifepluslinux.blogspot.com/2019/08/neural-network-inference-pipeline-for.html>)

Author: Suresh Alse (noreply@blogger.com)

Published: 2019-08-08T18:03:00Z

Content type: tutorial

Language: en

Sources: [Life Plus Linux](<https://devfeed.tech/sources/life-plus-linux.md>)

Topics: [Tensorflow](<https://devfeed.tech/topics/tensorflow.md>), [Inference](<https://devfeed.tech/topics/inference.md>), [Machine learning](<https://devfeed.tech/topics/machine-learning.md>), [GPU](<https://devfeed.tech/topics/gpu.md>), [cpu](<https://devfeed.tech/topics/cpu.md>), [dataset](<https://devfeed.tech/topics/dataset.md>), [Keras](<https://devfeed.tech/topics/keras.md>)

Tags: [cpu](<https://devfeed.tech/tags/cpu.md>), [dataset](<https://devfeed.tech/tags/dataset.md>), [deeplearning](<https://devfeed.tech/tags/deeplearning.md>), [gpu](<https://devfeed.tech/tags/gpu.md>), [inference](<https://devfeed.tech/tags/inference.md>), [keras](<https://devfeed.tech/tags/keras.md>), [performance](<https://devfeed.tech/tags/performance.md>), [pipeline](<https://devfeed.tech/tags/pipeline.md>), [tensorflow](<https://devfeed.tech/tags/tensorflow.md>)

### AI overview

A tutorial on building an efficient TensorFlow pipeline for video inference. It describes processing video frames in batches with tf.data.Dataset, parallelizing CPU preprocessing and I/O, and prefetching to keep CPU and GPU work supplied.

### Source excerpt

Just as we saw a huge influx of images in the past decade or so, we are now seeing a lot of videos being produced on social media. The need to understand and moderate videos using machine learning has never been greater. In this post, I will show you how to build an efficient pipeline to processes videos in Tensorflow. For simplicity, let us consider a Resnet50 model pre-trained on Imagenet. Pretty straightforward, using tf.keras.applications Now, let us break it up to see what exactly is happening: We are loading the model with weights. We are reading an image and resizing it to 224x224. Do some preprocessing of the image. Run inference. Do some post processing. If we want to do something similar for large videos, we need to have a pipeline that takes a stream of frames from the video, applies preprocess transformations, run inference of frames, unravel the inferences and apply post processing. We can see that doing all these in a sequence - frame by frame is clearly not the right thing as it is slow and inefficient. In order to tackle this, we will use tf.data.Dataset and run inference in batch. First, lets create a generator that can produce frames from a video: We will use the tf.data.Dataset.from_generator method to create a dataset object out of this. Now let us define a function which does resizing, normalization and other preprocessing steps that are required on a batch of frames. Then, using the batch operation on the dataset created above, create a batch of size 64. Map the preprocess method that we defined onto the batch in parallel on CPU as it is a CPU intensive task. It is important to make sure that I/O is parallelized as much as possible. For best performance, instructions that are well suited for CPU should run on CPU and the ones suited for GPU should run on GPU. Also, If you observe the code above, we are prefetching. What this means is that, before consuming the dataset, a batch of 64 frames are preprocessed and is ready for consumption. By the t

## Finding Where's Waldo using Mask R-CNN

DevFeed: [Finding Where's Waldo using Mask R-CNN](<https://devfeed.tech/articles/finding-where-s-waldo-using-mask-r-cnn-21536.md>)

Original publisher: [Read original article](<http://lifepluslinux.blogspot.com/2018/06/finding-wheres-waldo-using-mask-r-cnn.html>)

Author: Suresh Alse (noreply@blogger.com)

Published: 2018-06-14T05:51:00Z

Content type: tutorial

Language: en

Sources: [Life Plus Linux](<https://devfeed.tech/sources/life-plus-linux.md>)

Topics: [Deep learning](<https://devfeed.tech/topics/deep-learning.md>), [Training AI Models](<https://devfeed.tech/topics/training-ai-models.md>), [Algorithm](<https://devfeed.tech/topics/algorithm.md>), [datasets](<https://devfeed.tech/topics/datasets.md>), [data](<https://devfeed.tech/topics/data.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [algorithm](<https://devfeed.tech/tags/algorithm.md>), [code](<https://devfeed.tech/tags/code.md>), [data](<https://devfeed.tech/tags/data.md>), [dataset](<https://devfeed.tech/tags/dataset.md>), [deep-learning](<https://devfeed.tech/tags/deep-learning.md>), [deeplearning](<https://devfeed.tech/tags/deeplearning.md>), [github](<https://devfeed.tech/tags/github.md>), [ml](<https://devfeed.tech/tags/ml.md>), [paper](<https://devfeed.tech/tags/paper.md>), [quality](<https://devfeed.tech/tags/quality.md>), [training](<https://devfeed.tech/tags/training.md>), [validation](<https://devfeed.tech/tags/validation.md>)

### AI overview

This tutorial explains how to use Mask R-CNN to detect and mask Where's Waldo in images. It covers collecting and annotating a small dataset, training the model, and running predictions. The author reports that performance was better on similar, high-quality images where Waldo was clearly visible.

### Source excerpt

When I was a kid, I really loved solving Where's Waldo. There were few books (it used to be called Where's Wally) in our school library on which I spent hours finding Waldo. For people who do not know what it is, basically Waldo - a unique character is hidden among hundreds of other characters and you have to find him in all the chaos in the image. Now that I am too old to be solving it and too busy to spend hours on such things, I decided to build a system that uses deep learning to automatically solve it and spent weeks to build it. I started off by treating this like a classification problem with two classes - Waldo and not Waldo, similar to Hot dog - not Hot dog . Once we can get the classification problem successfully solved, we can just apply a classification action mapping (CAM) layer to find Waldo's activations in the image and thus finding Waldo. However I couldn't find enough images of Waldo. I found this repo which has about 20 images. And as there are only 20 Waldo vs thousands of not-Waldo characters, there is very high imbalance in the classes. I still tried though. But the results weren't that great. When I looked if someone has already worked on it, I found a medium post which used Tensorflow's Faster R-CNN model to do this. But I didn't want to just find bounding boxes, I wanted to actually mask out Waldo in the image. But I got more images of Where's Waldo from it. Then I came across this paper on Mask R-CNN which sounded promising for this usecase. And it was indeed much better than my earlier approach: Waldo masked out in the image Original Image In this post I would like to share how I was able to get the data, tag it and train a model to be able to solve Where's Waldo. You can checkout my code on github here. Fork deepwaldo on Github Mask R-CNN The main idea here is to: Take the input image and pass it into a set of convolutional layers that sort of generates a feature map for the given image. Now, you take this feature map and pass it into a r

## Higher level ops for building neural network layers with deeplearn.js

DevFeed: [Higher level ops for building neural network layers with deeplearn.js](<https://devfeed.tech/articles/higher-level-ops-for-building-neural-network-layers-with-deeplearn-js-21535.md>)

Original publisher: [Read original article](<http://lifepluslinux.blogspot.com/2018/01/higher-level-ops-for-building-neural.html>)

Author: Suresh Alse (noreply@blogger.com)

Published: 2018-01-23T22:36:00Z

Content type: tutorial

Language: en

Sources: [Life Plus Linux](<https://devfeed.tech/sources/life-plus-linux.md>)

Topics: [Neural Network](<https://devfeed.tech/topics/neural-network.md>), [Tensorflow](<https://devfeed.tech/topics/tensorflow.md>), [Code](<https://devfeed.tech/topics/code.md>), [Graphs](<https://devfeed.tech/topics/graphs.md>)

Tags: [batching](<https://devfeed.tech/tags/batching.md>), [code](<https://devfeed.tech/tags/code.md>), [datasets](<https://devfeed.tech/tags/datasets.md>), [deeplearning](<https://devfeed.tech/tags/deeplearning.md>), [graph](<https://devfeed.tech/tags/graph.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [ml](<https://devfeed.tech/tags/ml.md>), [neural](<https://devfeed.tech/tags/neural.md>), [tensorflow](<https://devfeed.tech/tags/tensorflow.md>), [visualization](<https://devfeed.tech/tags/visualization.md>)

### AI overview

This tutorial describes higher-level neural-network operations built for deeplearn.js, specifically implementations of tf.layers.conv2d and tf.layers.flatten. The operations are designed to closely follow corresponding TensorFlow function definitions, with documented arguments and return behavior.

### Source excerpt

I have been meddling with google's deeplearn.js lately for fun. It is surprisingly good given how new the project is and it seems to have a sold roadmap. However it still lacks something like tf.layers and tf.contrib.layers which have many higher level functions that has made using tensorflow so easy. It looks like they will be added to Graphlayers in future but their priorities as of now is to fix the lower level APIs first - which totally makes sense. So, I quickly built one for tf.layers.conv2d and tf.layers.flatten which I will share in this post. I have made them as close to function definitions in tensorflow as possible. 1. conv2d - Functional interface for the 2D convolution layer. Arguments: inputs Tensor input. filters Integer, the dimensionality of the output space (i.e. the number of filters in the convolution). kernel_size Number to specify the height and width of the 2D convolution window. graph Graph opbject. strides Number to specify the strides of convolution. padding One of "valid" or "same" (case-insensitive). data_format "channels_last" or "channel_first" activation Optional. Activation function which is applied on the final layer of the function. Function should accept Tensor and graph as parameters kernel_initializer An initializer object for the convolution kernel. bias_initializer An initializer object for bias. name string which represents name of the layer. Returns: Tensor output. Usage: Add this to your code: 2. flatten - Flattens an input tensor. I wrote these snippets while building a tool using deeplearnjs where I do things like loading datasets, batching, saving checkpoints along with visualization. I will share more on that in my future posts.

## Hacking FaceNet using Adversarial examples

DevFeed: [Hacking FaceNet using Adversarial examples](<https://devfeed.tech/articles/hacking-facenet-using-adversarial-examples-21534.md>)

Original publisher: [Read original article](<http://lifepluslinux.blogspot.com/2018/01/hacking-facenet-using-adversarial.html>)

Author: Suresh Alse (noreply@blogger.com)

Published: 2018-01-11T23:29:00Z

Content type: tutorial

Language: en

Sources: [Life Plus Linux](<https://devfeed.tech/sources/life-plus-linux.md>)

Topics: [face recognition](<https://devfeed.tech/topics/face-recognition.md>), [Machine Learning, Security Attacks](<https://devfeed.tech/topics/machine-learning-security-attacks.md>), [Deep learning](<https://devfeed.tech/topics/deep-learning.md>), [Neural Network](<https://devfeed.tech/topics/neural-network.md>), [Authentication](<https://devfeed.tech/topics/authentication.md>)

Tags: [authentication](<https://devfeed.tech/tags/authentication.md>), [deep-learning](<https://devfeed.tech/tags/deep-learning.md>), [deeplearning](<https://devfeed.tech/tags/deeplearning.md>), [embedding](<https://devfeed.tech/tags/embedding.md>), [face-recognition](<https://devfeed.tech/tags/face-recognition.md>), [hacking](<https://devfeed.tech/tags/hacking.md>), [ml](<https://devfeed.tech/tags/ml.md>), [neural](<https://devfeed.tech/tags/neural.md>), [security](<https://devfeed.tech/tags/security.md>)

### AI overview

This tutorial explains how FaceNet performs face recognition using embeddings and triplet loss, then demonstrates generating small adversarial noise intended to make an attacker's photo be identified as a target.

### Source excerpt

With the rise in popularity of face recognition systems with deep learning and it's application in security/ authentication, it is important to make sure that it is not that easy to fool them. I recently finished the 4th course on deeplearning.ai where there is an assignment which asks us to build a face recognition system - FaceNet. While I was working on the assignment, I couldn't stop thinking about how easy it is to fool it with adversarial examples. In this post I will tell you how I managed to do it. First off, some basics about FaceNet. Unlike image recognition systems which map every image with a class, it is not possible to assign a class label to every face in face recognition. This is because one, there are way too many faces that a system should handle in the real world to assign class to each of them and two, if there are new people the system should handle, it can't do it. So, what we do is, we build a system that learns similarities and dissimilarities. Basically, there is a neural network similar to what we have in image recognition and instead of applying softmax in the end, we just take the logits as embedding for the given image input and then minimize something called the triplet loss. Consider face A, we have a positive match P and negative match N. If f is the embedding function and L is the triplet loss, we have this: Triplet loss Basically, it is incentivizing small distance between A - P and large distance between A - N. Also, I really recommend watching Ian Goodfellow's lecture from Stanford's CS231n course if you want to know about adversarial examples. Like I said earlier, this thought came to me while doing an assignment from 4th course from deeplearning.ai which can be found here and I have built on top of it. The main idea here is to find small noise that when added to someone's photo although causing virtually no visual changes, can make faceNet identify them as the target. Benoit (attacker) Add noise Kian Kian Actual (Target) First l

## Tensorflow and AEM

DevFeed: [Tensorflow and AEM](<https://devfeed.tech/articles/tensorflow-and-aem-21533.md>)

Original publisher: [Read original article](<http://lifepluslinux.blogspot.com/2017/12/tensorflow-and-aem.html>)

Author: Suresh Alse (noreply@blogger.com)

Published: 2017-12-17T20:40:00Z

Content type: tutorial

Language: en

Sources: [Life Plus Linux](<https://devfeed.tech/sources/life-plus-linux.md>)

Topics: [Tensorflow](<https://devfeed.tech/topics/tensorflow.md>), [Java](<https://devfeed.tech/topics/java.md>), [configuration](<https://devfeed.tech/topics/configuration.md>), [interoperability](<https://devfeed.tech/topics/interoperability.md>), [Deep learning](<https://devfeed.tech/topics/deep-learning.md>), [Machine learning](<https://devfeed.tech/topics/machine-learning.md>)

Tags: [aem](<https://devfeed.tech/tags/aem.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [deep-learning](<https://devfeed.tech/tags/deep-learning.md>), [deeplearning](<https://devfeed.tech/tags/deeplearning.md>), [gpu](<https://devfeed.tech/tags/gpu.md>), [guide](<https://devfeed.tech/tags/guide.md>), [interoperability](<https://devfeed.tech/tags/interoperability.md>), [java](<https://devfeed.tech/tags/java.md>), [ml](<https://devfeed.tech/tags/ml.md>), [tensorflow](<https://devfeed.tech/tags/tensorflow.md>), [testing](<https://devfeed.tech/tags/testing.md>)

### AI overview

A tutorial on setting up TensorFlow for Java in Adobe Experience Manager and other Felix-based systems. It covers Maven and bundle configuration, JNI installation, library placement, and testing with a Sling servlet.

### Source excerpt

It has been a while since google released Tensorflow support for java. Even though it is still in its infancy, I feel like it has everything we need. Build computation graphs - check, run session and compute stuff - check, GPU support - check. Now if you have all the time in the world to reinvent the wheel, you can pretty much build anything in java that we can build using python or c++. So, I have been working on Adobe Experience Manager since I joined Adobe and recently, I started experimenting with several use cases where machine learning can help in content creation and discovery. As I have zero knowledge in building any deep learning models in java, I decided to build everything in java. How hard can it be? Right? Right? Sarcasm aside, as I mentioned earlier, Tensorflow for java has everything we need and as it internally uses JNI we can have interoperability with python and c++ (that's why I preferred this over deeplearning4j). First off, I followed their official guide for the setup and had to face a lot of hurdles along the way. In this post I will show you how I managed to successfully setup Tensorflow on AEM (or any felix based systems). Step 1 Add the dependency to your pom.xml file. Note that the scope set to compile. Step 2 Add this configuration to your maven-bundle-plugin. Step 3 Build and install to your AEM instance. Then, navigate to /system/console/bundles/ and look for the bundle which contains the dependency. See if the "Exported Packages" section has the following packages: Step 4 Install JNI if necessary (this is mentioned in the link that I shared earlier). Then place the library file in the appropriate place. Testing Lets write a simple sling servlet to check if everything is working as expected. Like I told earlier, Tensorflow for java is still in its infancy. So, I wrote a helper class a while back to manipulate the computation graph. Get GraphBuilder.java and place it where it is accessible to the sling servlet. GraphBuilder.java The foll

## Most original prize at The 2017 Deep Learning Hackathon

DevFeed: [Most original prize at The 2017 Deep Learning Hackathon](<https://devfeed.tech/articles/most-original-prize-at-the-2017-deep-learning-hackathon-21531.md>)

Original publisher: [Read original article](<http://lifepluslinux.blogspot.com/2017/03/most-original-prize-at-2017-deep.html>)

Author: Suresh Alse (noreply@blogger.com)

Published: 2017-03-29T20:38:00Z

Content type: article

Language: en

Sources: [Life Plus Linux](<https://devfeed.tech/sources/life-plus-linux.md>)

Topics: [Deep learning](<https://devfeed.tech/topics/deep-learning.md>), [Hackathon](<https://devfeed.tech/topics/hackathon.md>), [Development](<https://devfeed.tech/topics/development.md>), [Nvidia](<https://devfeed.tech/topics/nvidia.md>), [Google](<https://devfeed.tech/topics/google.md>), [cudnn](<https://devfeed.tech/topics/cudnn.md>)

Tags: [ai](<https://devfeed.tech/tags/ai.md>), [cudnn](<https://devfeed.tech/tags/cudnn.md>), [deep-learning](<https://devfeed.tech/tags/deep-learning.md>), [deeplearning](<https://devfeed.tech/tags/deeplearning.md>), [dev](<https://devfeed.tech/tags/dev.md>), [developers](<https://devfeed.tech/tags/developers.md>), [engineering](<https://devfeed.tech/tags/engineering.md>), [hackathon](<https://devfeed.tech/tags/hackathon.md>), [ml](<https://devfeed.tech/tags/ml.md>), [nvidia](<https://devfeed.tech/tags/nvidia.md>)

### AI overview

The author describes participating in Deepgram's 2017 Deep Learning Hackathon and building Medivh, a tool intended to predict where users might look on a website before deployment by generating heat maps. The project won the Most original prize, which was an Nvidia Titan X Pascal.

### Source excerpt

Although I have worked on several deep learning projects in the past, I still consider myself to be a newbie in deep learning because of all the new things that keep coming up and it is so hard to keep up with all that. So, I decided to take part in "The 2017 Deep Learning Hackathon" by Deepgram to work on something I have been wanting to do for a while now. I built something called Medivh - prophet from Warcraft who has seen the future. The idea was to build a tool for web developers to predict how users are going to see / use the site even before deploying. Basically, it generates heat maps on websites which show where the user might look at. Example: I will write another post with all the technical details. Here is the sneak peak of how it was done. Apart from building that, We got an opportunity to interact with people like Bryan Catanzaro - maker of CUDNN and VP at Nvidia, Jiaji Huangform from Baidu, Jonathan Hseu from Google Brain etc. We also got to interact with people from Deepgram and their caffe like framework called Kur which seems pretty good. I think I'll write a review about Kur after playing around with it for some more time. Also this: Shenanigans at the @DeepgramAI #DLhackathon !! #ai #hackathon pic.twitter.com/ympPZpPWFG -- BEAST Pets (@beastpets) March 26, 2017 This is me presenting before the results. @DeepgramAI #deeplearning #hackathon @GPUComputing @awscloud @googlecloud class activation mapping web dev guidance @Adobe engineering #AI pic.twitter.com/sDD4vrIUAf -- Leo K Tam (@LeoKTam) March 26, 2017 For Medivh, I won the "Most original prize" - Nvidia Titan X pascal. What a beauty!

## Setting up crontab-ui on raspberry pi

DevFeed: [Setting up crontab-ui on raspberry pi](<https://devfeed.tech/articles/setting-up-crontab-ui-on-raspberry-pi-21532.md>)

Original publisher: [Read original article](<http://lifepluslinux.blogspot.com/2017/03/setting-up-crontab-ui-on-raspberry-pi.html>)

Author: Suresh Alse (noreply@blogger.com)

Published: 2017-03-09T22:31:00Z

Content type: tutorial

Language: en

Sources: [Life Plus Linux](<https://devfeed.tech/sources/life-plus-linux.md>)

Topics: [Raspberry Pi](<https://devfeed.tech/topics/raspberry-pi.md>), [Tutorial](<https://devfeed.tech/topics/tutorial.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [npm](<https://devfeed.tech/topics/npm.md>), [nginx](<https://devfeed.tech/topics/nginx.md>), [browser](<https://devfeed.tech/topics/browser.md>)

Tags: [browser](<https://devfeed.tech/tags/browser.md>), [crontab-ui](<https://devfeed.tech/tags/crontab-ui.md>), [http](<https://devfeed.tech/tags/http.md>), [install](<https://devfeed.tech/tags/install.md>), [linux](<https://devfeed.tech/tags/linux.md>), [nginx](<https://devfeed.tech/tags/nginx.md>), [npm](<https://devfeed.tech/tags/npm.md>), [raspberry-pi](<https://devfeed.tech/tags/raspberry-pi.md>), [tutorial](<https://devfeed.tech/tags/tutorial.md>)

### AI overview

This tutorial explains how to install and run crontab-ui on an ARMv7 Raspberry Pi using Node.js, npm, and pm2. It also describes optionally configuring nginx to expose the service through port 8001 and setting up HTTP authentication.

### Source excerpt

In this tutorial I will show you how to setup crontab-ui on raspberry pi. Step 1 Find your architecture uname -a Linux raspberrypi 4.4.50-v7+ #970 SMP Mon Feb 20 19:18:29 GMT 2017 armv7l GNU/Linux Note that it is ARMv7. Download and extract latest node. wget https://nodejs.org/dist/v7.7.2/node-v7.7.2-linux-armv7l.tar.xz tar xz node-v7.7.2-linux-armv7l.tar.xz sudo mv node-v7.7.2-linux-armv7l /opt/node Step 2 Remove old nodejs if it is already installed and add the latest node to the $PATH sudo apt-get purge nodejs echo 'export PATH=$PATH:/opt/node/bin' > ~/.bashrc source ~/.bashrc Step 3 Install crontab-ui and pm2. And start crontab-ui. npm install -g crontab-ui npm install -g pm2 pm2 start crontab-ui Now your crontab-ui must be running. Visit http://localhost:8000 on your browser to see if it is working. Step 4 (Optional) In order to be able access crontab-ui from outside, you have to forward the port 8000. Install nginx and configure. sudo apt-get install nginx sudo vi /etc/nginx/sites-available/default Paste the following lines in the file: server { listen 8001; server_name localhost; location / { proxy_pass http://localhost:8000; } } Restart nginx sudo service nginx restart Now, crontab-ui must be accessible from outside through port 8001. So, to access crontab-ui, go to <ip address of pi>:8001 You can also setup http authentication by following this. Thanks! Fork me on Github

## My solutions to cmdchallenge

DevFeed: [My solutions to cmdchallenge](<https://devfeed.tech/articles/my-solutions-to-cmdchallenge-21529.md>)

Original publisher: [Read original article](<http://lifepluslinux.blogspot.com/2017/01/my-solutions-to-cmdchallenge.html>)

Author: Suresh Alse (noreply@blogger.com)

Published: 2017-01-28T16:36:00Z

Content type: tutorial

Language: en

Sources: [Life Plus Linux](<https://devfeed.tech/sources/life-plus-linux.md>)

Topics: [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Bash](<https://devfeed.tech/topics/bash.md>), [Scripting, bash](<https://devfeed.tech/topics/scripting-bash.md>), [ls](<https://devfeed.tech/topics/ls.md>)

Tags: [bash](<https://devfeed.tech/tags/bash.md>), [command-line](<https://devfeed.tech/tags/command-line.md>), [files](<https://devfeed.tech/tags/files.md>), [ip](<https://devfeed.tech/tags/ip.md>), [linux](<https://devfeed.tech/tags/linux.md>), [list](<https://devfeed.tech/tags/list.md>), [search](<https://devfeed.tech/tags/search.md>)

### AI overview

The article presents Bash one-line solutions for challenges from cmdchallenge.com, covering tasks such as printing the working directory, listing files, searching logs, extracting IP addresses, deleting files, and counting files.

### Source excerpt

I recently stumbled upon https://cmdchallenge.com which sort of tests your command line knowledge and comfortability. You have to basically solve all the challenges in a single line of bash. It is pretty simple and fun. You should give it a try before checking the solutions. hello_world/ # Print "hello world". # Hint: There are many ways to print text on # the command line, one way is with the 'echo' # command. # # Try it below and good luck! # Solution: echo "hello world" current_working_directory/ # Print the current working directory. # Solution: pwd list_files/ # List all of the files in the current # directory, one file per line. # Solution: ls -1 last_lines/ # Print the last 5 lines of "access.log". # Solution: tail -5 access.log find_string_in_a_file/ # There is a file named "access.log" in the # current working directory. Print all lines # in this file that contains the string "GET". # Solution: grep GET access.log search_for_files_containing_string/ # Print all files, one per line that contain # the string "500". # Solution: grep -rl * -e 500 search_for_files_by_extension/ # Print the relative file paths, one path # per line for all files that start with # "access.log" in the current directory. # Solution: find . -name "access.log*" search_for_string_in_files_recursive/ # Print all matching lines (without the filename # or the file path) in all files under the current # directory that start with "access.log" that # contain the string "500". # Solution: find . -name "access.log*" | xargs grep -h 500 extract_ip_addresses/ # Extract all IP addreses from files that # that start with "access.log" printing one # IP address per line. # Solution: find . -name "access.log*" | xargs grep -Eo '^[^ ]+' delete_files/ # Delete all of the files in this challenge # directory including all subdirectories and # their contents. # Solution: find . -delete count_files/ # Count the number of files in the current # working directory. Print the number of # files as a single intege

## Look before you paste from a website to terminal

DevFeed: [Look before you paste from a website to terminal](<https://devfeed.tech/articles/look-before-you-paste-from-a-website-to-terminal-21528.md>)

Original publisher: [Read original article](<http://lifepluslinux.blogspot.com/2017/01/look-before-you-paste-from-website-to.html>)

Author: Suresh Alse (noreply@blogger.com)

Published: 2017-01-19T21:32:00Z

Content type: tutorial

Language: en

Sources: [Life Plus Linux](<https://devfeed.tech/sources/life-plus-linux.md>)

Topics: [Terminal](<https://devfeed.tech/topics/terminal.md>), [Malware](<https://devfeed.tech/topics/malware.md>), [Command-line interface](<https://devfeed.tech/topics/cli.md>), [Code](<https://devfeed.tech/topics/code.md>), [browsers](<https://devfeed.tech/topics/browsers.md>), [Hacking](<https://devfeed.tech/topics/hacking.md>), [ls](<https://devfeed.tech/topics/ls.md>)

Tags: [bash](<https://devfeed.tech/tags/bash.md>), [browsers](<https://devfeed.tech/tags/browsers.md>), [code](<https://devfeed.tech/tags/code.md>), [computer](<https://devfeed.tech/tags/computer.md>), [gui](<https://devfeed.tech/tags/gui.md>), [hacking](<https://devfeed.tech/tags/hacking.md>), [install](<https://devfeed.tech/tags/install.md>), [ls](<https://devfeed.tech/tags/ls.md>), [terminal](<https://devfeed.tech/tags/terminal.md>), [view](<https://devfeed.tech/tags/view.md>)

### AI overview

This article warns that code copied directly from websites can contain hidden malicious commands. It demonstrates how browser-rendered snippets may conceal code through styling and recommends pasting snippets into a text editor for inspection before executing them.

### Source excerpt

Most of the time when we see a code snippet online to do something, we often blindly copy paste it to the terminal. Even the tech savy ones just see it on the website before copy pasting. Here is why you shouldn't do this. Try pasting the following line to your terminal (SFW) ls ; clear; echo 'Haha! You gave me access to your computer with sudo!'; echo -ne 'h4cking ## (10%)\r'; sleep 0.3; echo -ne 'h4cking ### (20%)\r'; sleep 0.3; echo -ne 'h4cking ##### (33%)\r'; sleep 0.3; echo -ne 'h4cking ####### (40%)\r'; sleep 0.3; echo -ne 'h4cking ########## (50%)\r'; sleep 0.3; echo -ne 'h4cking ############# (66%)\r'; sleep 0.3; echo -ne 'h4cking ##################### (99%)\r'; sleep 0.3; echo -ne 'h4cking ####################### (100%)\r'; echo -ne '\n'; echo 'Hacking complete.'; echo 'Use GUI interface using visual basic to track my IP' ls -lat It should look something like this once it is pasted onto your terminal. View post on imgur.com You probably guessed it. There is some malicious code between ls and -lat that is hidden from the user Malicious code's color is set to that of the background, it's font size is set to 0, it is moved away from rest of the code and it is made un-selectable (that blue color thing doesn't reveal it); to make sure that it works in all possible OSes, browsers and screen sizes. This can be worse. If the code snippet had a command with sudo for instance, the malicious code will have sudo access too. Or, it can silently install a keylogger on your machine; possibilities are endless. So, the lesson here is, make sure that you paste code snippets from untrusted sources onto a text editor before executing it. Thanks for reading!

## How to download large folders on dropbox

DevFeed: [How to download large folders on dropbox](<https://devfeed.tech/articles/how-to-download-large-folders-on-dropbox-21527.md>)

Original publisher: [Read original article](<http://lifepluslinux.blogspot.com/2016/10/how-to-download-large-folders-on-dropbox.html>)

Author: Suresh Alse (noreply@blogger.com)

Published: 2016-10-18T20:21:00Z

Content type: tutorial

Language: en

Sources: [Life Plus Linux](<https://devfeed.tech/sources/life-plus-linux.md>)

Topics: [browser](<https://devfeed.tech/topics/browser.md>), [JavaScript](<https://devfeed.tech/topics/javascript.md>), [Code](<https://devfeed.tech/topics/code.md>), [Chrome](<https://devfeed.tech/topics/chrome.md>)

Tags: [chrome](<https://devfeed.tech/tags/chrome.md>), [code](<https://devfeed.tech/tags/code.md>), [download](<https://devfeed.tech/tags/download.md>), [dropbox](<https://devfeed.tech/tags/dropbox.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [javascript](<https://devfeed.tech/tags/javascript.md>)

### AI overview

A tutorial explains how to use a JavaScript browser-console script to download files from a Dropbox folder when the folder exceeds Dropbox's direct download limit. It includes steps for opening the developer console and allowing pop-ups, with Google Chrome shown as an example.

### Source excerpt

Recently, someone shared a large folder with me and when I tried to download it, I was getting an error; "There was an error downloading your file". This error seemed very vague and after a quick search online, I figured out that it is not possible to download folders which are bigger than 1 GB. And according to dropbox's help article, I will be able to download it only if I add it to my dropbox. With dropbox's puny 2GB free storage it was not possible and I was not ready to spend $$$ just for this. So, I wrote a simple script in javascript that I can run it on browser console to download all files in a folder! How to do it? Step 1. Navigate to the dropbox folder on the browser and open your developer console. Press cmd + j on mac or ctrl + shift + j on linux and windows. Step 2. Paste the following code in the console. Step 3. The browser will try to block the windows trying to download it. Select the option to Always allow pop-ups from https://www.dropbox.com . For instance this is how it will look on Google Chrome (you have to click on right most icon in the search bar). Step 4. Your files will be downloaded one by one! NOTE: If any folder inside the folder is greater than 1GB in size, then you may have to do the same process after navigating to that folder in the browser. Update: Make sure that you use the list view to see files by clicking on this:

## Right way to set env variable while exec or execFile in nodejs

DevFeed: [Right way to set env variable while exec or execFile in nodejs](<https://devfeed.tech/articles/right-way-to-set-env-variable-while-exec-or-execfile-in-nodejs-21526.md>)

Original publisher: [Read original article](<http://lifepluslinux.blogspot.com/2016/09/right-way-to-set-env-variable-while.html>)

Author: Suresh Alse (noreply@blogger.com)

Published: 2016-09-15T22:02:00Z

Content type: tutorial

Language: en

Sources: [Life Plus Linux](<https://devfeed.tech/sources/life-plus-linux.md>)

Topics: [Environment Variables](<https://devfeed.tech/topics/environment-variables.md>), [Processes](<https://devfeed.tech/topics/processes.md>)

Tags: [environment-variables](<https://devfeed.tech/tags/environment-variables.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [nodejs](<https://devfeed.tech/tags/nodejs.md>), [process](<https://devfeed.tech/tags/process.md>), [variable](<https://devfeed.tech/tags/variable.md>)

### AI overview

This tutorial explains that Node.js exec and execFile replace the existing environment when an env option is supplied, rather than adding variables to it. It recommends copying process.env and modifying the copy.

### Source excerpt

According to the official documentation, exec allows you to pass additional environment variables as part of options like this: This looks fine right? except that it totally isn't! By passing "env" as an option, you are not adding on to existing environment variables, but you are replacing it. This is not clear from the documentation and can leave you scratching your head for a while as it can seem to break the command for no particular reason at all! So, you need to essentially make a copy of process.env and modify it like follows. Thanks for stopping by!

## Problem with clipboard on Ubuntu

DevFeed: [Problem with clipboard on Ubuntu](<https://devfeed.tech/articles/problem-with-clipboard-on-ubuntu-21524.md>)

Original publisher: [Read original article](<http://lifepluslinux.blogspot.com/2016/04/problem-with-clipboard-on-ubuntu.html>)

Author: Suresh Alse (noreply@blogger.com)

Published: 2016-04-28T22:39:00Z

Content type: tutorial

Language: en

Sources: [Life Plus Linux](<https://devfeed.tech/sources/life-plus-linux.md>)

Topics: [Ubuntu](<https://devfeed.tech/topics/ubuntu.md>), [bug](<https://devfeed.tech/topics/bug.md>), [client](<https://devfeed.tech/topics/client.md>)

Tags: [bug](<https://devfeed.tech/tags/bug.md>), [install](<https://devfeed.tech/tags/install.md>), [ubuntu](<https://devfeed.tech/tags/ubuntu.md>)

### AI overview

The article explains why copied data may be lost when an application closes on Ubuntu. Applications that do not follow the FreeDesktop clipboard specification may fail to transfer clipboard ownership to a clipboard manager, and it suggests installing one of several clipboard managers as a workaround.

### Source excerpt

Clipboard on Ubuntu is "broken". Well, maybe not. But copy-paste is broken in a lot of applications on Ubuntu. Let me give you an example, Open LibreOffice. Write something and copy it. Paste it somewhere else. It works as expected. Now close LibreOffice and try pasting. It won't work. This is a well known bug - Copy-Paste doesn't work if the source is closed before the paste; affecting a lot of applications on Ubuntu. And they are not so keen on fixing it, atleast not any time soon. The reason for this is that these applications do not comply with the clipboard specification from FreeDesktop. If a client needs to exit while owning the CLIPBOARD selection, it should request the clipboard manager to take over the ownership of the clipboard, using the SAVE_TARGETS mechanism. If there is no clipboard manager, or if the SAVE_TARGETS conversion fails, the application should simply exit. Applications need to transfer ownership of the clipboard to clipboard manager before exiting for copied data to perisist after it exits. There is certainly nothing you can do about it, unless offcourse you are willing to modify the source code of each of these applications to make it comply to FreeDesktop specs. Fix. Well.. workaround. The reporter/ moderator of the bug report suggests that we should install diodon, klipper, glipper, parcellite or xfce4-clipman as a workaround for this issue. Working of diodon

## Ubuntu 16.04 won't wake up from suspend

DevFeed: [Ubuntu 16.04 won't wake up from suspend](<https://devfeed.tech/articles/ubuntu-16-04-won-t-wake-up-from-suspend-21525.md>)

Original publisher: [Read original article](<http://lifepluslinux.blogspot.com/2016/04/ubuntu-1604-wont-wake-up-from-suspend.html>)

Author: Suresh Alse (noreply@blogger.com)

Published: 2016-04-26T16:57:00Z

Content type: tutorial

Language: en

Sources: [Life Plus Linux](<https://devfeed.tech/sources/life-plus-linux.md>)

Topics: [Ubuntu](<https://devfeed.tech/topics/ubuntu.md>), [Kernel](<https://devfeed.tech/topics/kernel.md>)

Tags: [battery](<https://devfeed.tech/tags/battery.md>), [hibernate](<https://devfeed.tech/tags/hibernate.md>), [kernel](<https://devfeed.tech/tags/kernel.md>), [linux](<https://devfeed.tech/tags/linux.md>), [lts](<https://devfeed.tech/tags/lts.md>), [thinkpad](<https://devfeed.tech/tags/thinkpad.md>), [ubuntu](<https://devfeed.tech/tags/ubuntu.md>)

### AI overview

A ThinkPad E550 running Ubuntu 16.04 LTS could not properly suspend, hibernate, or shut down, even with open-source drivers. The article attributes the issue to kernel 4.4 and reports that upgrading to kernel 4.5 resolved it.

### Source excerpt

I recently installed Ubuntu 16.04 LTS Xenial Xerus on my Thinkpad E550. I honestly regretted it not just because it doesn't support AMD proprietary fglrx driver aka AMD Catalyst or AMD Radeon Software but because the suspend feature stopped working. I initially thought that this had something to do with video drivers that I had installed on Ubuntu 15.10 which were now incompatible with 16.04. I realized that this was not the case as the issue persisted even on opensource drivers that it is compatible with. Also on a closer observation I realized that it was not that my system was not able to wake up from suspend, but that it was not able to suspend at all. On suspending, the screen would go off but my laptop kept running, heating up and draining battery. This problem existed when I hibernate or shutdown as well. Now the only possible reason for this is some problem in acpi which is not letting my system to suspend. Ubuntu 16.04 is shipped with kernel 4.4. A quick search on this issue on kernel 4.4 made me realize that this exists across several destros and mostly on thinkpads. So I upgraded to kernel 4.5 and the problem is resolved. Installing kernel 4.5 32 bit 64bit Then reboot!

## Parsing wav file in node.js

DevFeed: [Parsing wav file in node.js](<https://devfeed.tech/articles/parsing-wav-file-in-node-js-21523.md>)

Original publisher: [Read original article](<http://lifepluslinux.blogspot.com/2016/01/parsing-wav-file-in-nodejs.html>)

Author: Suresh Alse (noreply@blogger.com)

Published: 2016-01-08T22:19:00Z

Content type: tutorial

Language: en

Sources: [Life Plus Linux](<https://devfeed.tech/sources/life-plus-linux.md>)

Topics: [Node.js](<https://devfeed.tech/topics/node-js.md>), [Parsing](<https://devfeed.tech/topics/parsing.md>), [IO](<https://devfeed.tech/topics/io.md>), [Streams](<https://devfeed.tech/topics/streams.md>)

Tags: [javascript](<https://devfeed.tech/tags/javascript.md>), [node](<https://devfeed.tech/tags/node.md>), [node-js](<https://devfeed.tech/tags/node-js.md>), [nodejs](<https://devfeed.tech/tags/nodejs.md>), [parsing](<https://devfeed.tech/tags/parsing.md>), [stream](<https://devfeed.tech/tags/stream.md>)

### AI overview

A tutorial on parsing WAV files in Node.js. It explains how to combine streamed Buffer chunks, interpret hexadecimal audio data and amplitudes, account for endianness and two's-complement negative values, and separate audio channels.

### Source excerpt

I have worked with wav audio data in python before. Scipy provides a very nice way to do this using scipy.io.wavfile I wanted to do exactly the same in node.js. There is a module called wav which sort of does it. However I faced several problems. 1. The Reader() method reads the file stream and converts into chunks of Buffer. This is very good while building web apps as you can send chunks of data separately and combine it later. However, I was just writing a script that'd run offline, So I had to put all the buffers to an array and then use the concat method of Buffer. 2. The wav module doesn't do much processing and just throws the raw binary information at us. So, we have to take care of Combining hex data to get amplitudes - One frame can be represented using several blocks of 8-bit hex. The number of blocks per frame is got using blockAlign parameter in the format. Endianness - Data may or may not be in little endian format. So, while reading the blocks of hex data, we have to take care of this. Handling negative amplitudes - Frames spanning several blocks when negative can be little challenging to handle as they are just stored as their two's complement. Separating channels - The raw binary contains data of all the channels together. Fortunately, they are mentioned one after the other. Using channels parameter in the format, channels can be separated easily. So, let's see how I handled all the above cases. First, we need to capture the "format" of the audio file that contains information about the file. Then, on "end" event i.e after all the chunks have been combined, we will handle all the cases mentioned above as follows Concluding, in this article I showed you how to handle and parse wav files in node.js by resolving several problems such as merging chunks of Buffer, combining hex data to get amplitudes, endianness, handling negative amplitudes and separating channels.

## Unfortunately the process com.android.phone has stopped in CM 13

DevFeed: [Unfortunately the process com.android.phone has stopped in CM 13](<https://devfeed.tech/articles/unfortunately-the-process-com-android-phone-has-stopped-in-cm-13-21522.md>)

Original publisher: [Read original article](<http://lifepluslinux.blogspot.com/2015/12/unfortunately-process-comandroidphone.html>)

Author: Suresh Alse (noreply@blogger.com)

Published: 2015-12-23T17:25:00Z

Content type: tutorial

Language: en

Sources: [Life Plus Linux](<https://devfeed.tech/sources/life-plus-linux.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Processes](<https://devfeed.tech/topics/processes.md>)

Tags: [adb](<https://devfeed.tech/tags/adb.md>), [android](<https://devfeed.tech/tags/android.md>), [animation](<https://devfeed.tech/tags/animation.md>), [cyanogenmod](<https://devfeed.tech/tags/cyanogenmod.md>), [process](<https://devfeed.tech/tags/process.md>), [root](<https://devfeed.tech/tags/root.md>)

### AI overview

A Nexus 4 running CM 13 after a dirty flash from CM 12.1 showed repeated com.android.phone crashes and failed SIM detection. The article attributes the problem to old telephony databases and recommends deleting two related data directories, then restarting the phone.

### Source excerpt

I have a good old nexus 4 still trying to keep up with the big boys in the market. After google ditched the plans of releasing the latest android 6.0 - Marshmallow for nexus 4, things didn't look so great. But with the release of CM 13 (mako), even nexus 4 has android 6.0! Previously, I was running CM 12.1 and I dirty flashed CM 13 on top of it. Although it doesn't have all the features that CM 12 had, with time, the awesome guys in XDA and cyanogen will port all the features to CM 13. After dirty flashing CM 13 on top of CM 12.1, I faced some problems. First of all, things were kinda slow. So I went to Developer options in Settings and set all the Animation scaling to .5x. This considerable made things faster. Secondly and more importantly, my sim card was not getting detected and I was getting a ton loads of popups saying "Unfortunately the process com.android.phone has stopped". I looked at the logcat to see what is going wrong and I found that this was appearing a lot of times. Clearly, the problem was with com.android.providers.telephony. Upon looking closely, the problem was related to CursorWindow and Cursor. Hence, the problem was not with CM 13 but with the old database left behind by CM 12.1. Solution Just delete the folders /data/data/com.android.providers.telephony and /data/data/com.android.phone using some tool like Root Explorer or you can do this in adb shell. rm -rf /data/data/com.android.providers.telephony rm -rf /data/data/com.android.phone Then, restart the phone.

## USB debugging toggle widget

DevFeed: [USB debugging toggle widget](<https://devfeed.tech/articles/usb-debugging-toggle-widget-21520.md>)

Original publisher: [Read original article](<http://lifepluslinux.blogspot.com/2015/10/usb-debugging-toggle-widget.html>)

Author: Suresh Alse (noreply@blogger.com)

Published: 2015-10-27T18:14:00Z

Content type: tutorial

Language: en

Sources: [Life Plus Linux](<https://devfeed.tech/sources/life-plus-linux.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [USB](<https://devfeed.tech/topics/usb.md>), [App](<https://devfeed.tech/topics/app.md>)

Tags: [adb](<https://devfeed.tech/tags/adb.md>), [android](<https://devfeed.tech/tags/android.md>), [app](<https://devfeed.tech/tags/app.md>), [debugging](<https://devfeed.tech/tags/debugging.md>), [usb](<https://devfeed.tech/tags/usb.md>), [widget](<https://devfeed.tech/tags/widget.md>)

### AI overview

The article introduces an Android widget that enables or disables USB debugging through ADB with a click. It says the widget avoids requiring the app to be a system app or merely opening the settings page.

### Source excerpt

Like I told you few days back in this post, I made a widget for android to toggle USB Debugging - ADB (Android Debug Bridge). Today, I will tell you more about it. There are many alternatives to this. However they either require you to make the app a system app or they simply open the settings page. As this was not exactly what I wanted, I made one myself that allows me to enable/ disable USB debugging on click. You can get the app from here. Download ADB Toggle Fork me on Github You DON'T have to make this a system app!.

## Using WRITE\_SECURE\_SETTINGS permission on non system apps

DevFeed: [Using WRITE\_SECURE\_SETTINGS permission on non system apps](<https://devfeed.tech/articles/using-write-secure-settings-permission-on-non-system-apps-21521.md>)

Original publisher: [Read original article](<http://lifepluslinux.blogspot.com/2015/10/using-writesecuresettings-permission-on.html>)

Author: Suresh Alse (noreply@blogger.com)

Published: 2015-10-25T08:44:00Z

Content type: tutorial

Language: en

Sources: [Life Plus Linux](<https://devfeed.tech/sources/life-plus-linux.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Wireless Debugging](<https://devfeed.tech/topics/wireless-debugging.md>), [App](<https://devfeed.tech/topics/app.md>), [APK](<https://devfeed.tech/topics/apk.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [adb](<https://devfeed.tech/tags/adb.md>), [android](<https://devfeed.tech/tags/android.md>), [apk](<https://devfeed.tech/tags/apk.md>), [app](<https://devfeed.tech/tags/app.md>), [code](<https://devfeed.tech/tags/code.md>), [permission](<https://devfeed.tech/tags/permission.md>), [root](<https://devfeed.tech/tags/root.md>)

### AI overview

A tutorial explains how an Android application can obtain the WRITE_SECURE_SETTINGS permission despite it being unavailable to non-system apps. It describes granting the permission with ADB or running the command from a root shell, noting that root access is required for the programmatic approach.

### Source excerpt

I happen to frequently use an app that doesn't work if USB Debugging - ADB (Android Debug Bridge) is enabled. It is very cumbersome to go to settings and enable or disable the setting every time I need to use the app. I checked if there are any widgets that could do this in a click and returned empty handed. So, I did what every developer would do - build it myself! In order to change the adb settings, I had to use WRITE_SECURE_SETTINGS permission. But there was one major problem! This permission is not available for non system apps!! The easiest solution to this was to move the apk to /system partition. Except that I didn't want to do this as I frequently keep flashing /system partition. Another solution was to use pm and grant permission to the app like this: adb pm grant <package name> android.permission.WRITE_SECURE_SETTINGS This was great! However I didn't want users who were gonna use the app to go through all this pain. I had to figure out a way to do the same programmatically. So I did the next best thing! To run the command after opening a root shell in the code. Here is how I did it. This requires root. But that's ok.

## Lenovo ThinkPad battery calibration issue resolved by temporarily setting TLP charge thresholds to 100%

DevFeed: [Lenovo ThinkPad battery calibration issue resolved by temporarily setting TLP charge thresholds to 100%](<https://devfeed.tech/articles/the-infamous-battery-re-calibration-bug-in-lenovo-thinkpad-21519.md>)

Original publisher: [Read original article](<http://lifepluslinux.blogspot.com/2015/09/the-infamous-battery-re-calibration-bug.html>)

Author: Suresh Alse (noreply@blogger.com)

Published: 2015-09-09T06:49:00Z

Content type: tutorial

Language: en

Sources: [Life Plus Linux](<https://devfeed.tech/sources/life-plus-linux.md>)

Topics: [bug](<https://devfeed.tech/topics/bug.md>), [Linux](<https://devfeed.tech/topics/linux.md>), [Utility Software](<https://devfeed.tech/topics/utility.md>)

Tags: [battery](<https://devfeed.tech/tags/battery.md>), [bug](<https://devfeed.tech/tags/bug.md>), [laptop](<https://devfeed.tech/tags/laptop.md>), [lenovo](<https://devfeed.tech/tags/lenovo.md>), [linux](<https://devfeed.tech/tags/linux.md>), [power-management](<https://devfeed.tech/tags/power-management.md>), [thinkpad](<https://devfeed.tech/tags/thinkpad.md>)

### AI overview

A personal Linux troubleshooting tutorial for a Lenovo ThinkPad whose battery indicator dropped from 30% to 6%. The author reports that temporarily setting TLP charge thresholds to 100%, restarting, and charging for almost a day corrected the observed calibration issue.

### Source excerpt

My brand new Lenovo Thinkpad is a beast and is supposed to give up to 8hrs of battery backup. But there was a weird problem. As soon as the battery remaining reached 30%, it used to drop to 6% in a second. When I looked up on google, I found out that I was not the only one facing this problem. Most of them suggested that my battery was shot and that I had to buy a new one. This is highly improbable as it is brand new. I wanted to give fixing it a try before contacting customer care. And I was successful! Before - See the battery percentage drop from 30% to 6% For some reason, I suspected that it was somehow TLP's fault. TLP is the best power management utility for Thinkpad in Linux. It allows you to set max charging threshold so that you will be able to connect your laptop to the plug point without worrying about over charging (among many other features it provides). I felt that it is because of this, battery calibration was getting screwed up. So I set the maximum threshold to 100%. Open /etc/default/tlp and set following variables. START_CHARGE_THRESH_BAT0=100 STOP_CHARGE_THRESH_BAT0=100 Then I restarted my laptop to bring this to effect. As the calibration was already offset by a great extent, the only way to fix it was to keep it charged for a long time. I kept it charging for almost a day. After - Fixed! Then to test it I kept discharging it. And to my surprise, it didn't drop from 30% to 6% this time!! So the problem was with calibration and not because the battery is broken. If you face this problem, you can try this solution once before you spend $$$ on buying a new battery. Now that I have changed the battery threshold back to 85%, if this problem occurs again, all I have to do is follow the above steps.

## Download only part of a repository in github

DevFeed: [Download only part of a repository in github](<https://devfeed.tech/articles/download-only-part-of-a-repository-in-github-21518.md>)

Original publisher: [Read original article](<http://lifepluslinux.blogspot.com/2015/09/download-only-part-of-repository-in.html>)

Author: Suresh Alse (noreply@blogger.com)

Published: 2015-09-06T19:09:00Z

Content type: tutorial

Language: en

Sources: [Life Plus Linux](<https://devfeed.tech/sources/life-plus-linux.md>)

Topics: [GitHub](<https://devfeed.tech/topics/github.md>), [GitHub API](<https://devfeed.tech/topics/github-api.md>), [Bootstrap](<https://devfeed.tech/topics/bootstrap.md>)

Tags: [api](<https://devfeed.tech/tags/api.md>), [download](<https://devfeed.tech/tags/download.md>), [github](<https://devfeed.tech/tags/github.md>), [linux](<https://devfeed.tech/tags/linux.md>), [project](<https://devfeed.tech/tags/project.md>), [repo](<https://devfeed.tech/tags/repo.md>)

### AI overview

A tutorial explains how to download only part of a GitHub repository instead of cloning the entire project. It presents svn export as a straightforward approach, including an example for downloading the docs directory from the Bootstrap repository and saving it under a different name.

### Source excerpt

Sometimes you would want to download only a part of a repository in Github but you don't want to download / clone the entire repository, specially when the repo is huge or has too many other things that you are not interested in. There are many ways to do this. For example you can do a shallow clone, or you can use Github API (there is a limit on number of requests per hour)..etc. However, none of them are simple and straightforward. I recently found out that Github supports svn to some extent. So I tried the age old svn export to download a part of the project I was interested in. And it worked. svn export https://github.com/<username>/<project name>/trunk/<folder path> For example: If you want to download only docs from Bootstrap repository, svn export https://github.com/twbs/bootstrap/trunk/docs Now, suppose you want to download it with a different name, svn export https://github.com/twbs/bootstrap/trunk/docs bootstrap-docs

## Material Theme for Google Blogger

DevFeed: [Material Theme for Google Blogger](<https://devfeed.tech/articles/material-theme-for-google-blogger-21517.md>)

Original publisher: [Read original article](<http://lifepluslinux.blogspot.com/2015/08/material-theme-for-google-blogger.html>)

Author: Suresh Alse (noreply@blogger.com)

Published: 2015-08-03T19:32:00Z

Content type: tutorial

Language: en

Sources: [Life Plus Linux](<https://devfeed.tech/sources/life-plus-linux.md>)

Topics: [Material Design](<https://devfeed.tech/topics/material-design.md>), [Sass](<https://devfeed.tech/topics/sass.md>)

Tags: [blogger](<https://devfeed.tech/tags/blogger.md>), [design](<https://devfeed.tech/tags/design.md>), [github](<https://devfeed.tech/tags/github.md>), [google](<https://devfeed.tech/tags/google.md>), [how-to](<https://devfeed.tech/tags/how-to.md>), [material-design](<https://devfeed.tech/tags/material-design.md>)

### AI overview

A project that generates Material Design themes for Google Blogger using Sass, with examples of available themes and widgets. The article points readers to instructions for using the themes.

### Source excerpt

Inspired by Google's Material Design principles, this generates Material themes for Google Blogger using sass preprocessor. Fork me on Github Here are some of the themes generated with material-blogger Get themes Honor Theme Aqua Theme Pink Ribbon Theme Sample Widgets Button Search Results Popular Widget Widget (Aqua Theme) Archive To see how to use it, see this

## ERR\_TUNNEL\_CONNECTION\_FAILED on mobile network on android

DevFeed: [ERR\_TUNNEL\_CONNECTION\_FAILED on mobile network on android](<https://devfeed.tech/articles/err-tunnel-connection-failed-on-mobile-network-on-android-21516.md>)

Original publisher: [Read original article](<http://lifepluslinux.blogspot.com/2015/07/errtunnelconnectionfailed-on-mobile.html>)

Author: Suresh Alse (noreply@blogger.com)

Published: 2015-07-15T08:26:00Z

Content type: tutorial

Language: en

Sources: [Life Plus Linux](<https://devfeed.tech/sources/life-plus-linux.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Mobile](<https://devfeed.tech/topics/mobile.md>), [Network](<https://devfeed.tech/topics/network.md>), [SSL](<https://devfeed.tech/topics/ssl.md>), [browsers](<https://devfeed.tech/topics/browsers.md>), [Chrome](<https://devfeed.tech/topics/chrome.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [browsers](<https://devfeed.tech/tags/browsers.md>), [chrome](<https://devfeed.tech/tags/chrome.md>), [mobile](<https://devfeed.tech/tags/mobile.md>), [network](<https://devfeed.tech/tags/network.md>), [port](<https://devfeed.tech/tags/port.md>), [proxy](<https://devfeed.tech/tags/proxy.md>), [ssl](<https://devfeed.tech/tags/ssl.md>), [wifi](<https://devfeed.tech/tags/wifi.md>)

### AI overview

This troubleshooting article explains that Android users receiving ERR_TUNNEL_CONNECTION_FAILED when accessing HTTPS sites over Airtel mobile data may be affected by the Airtel Live access point's proxy. Clearing the proxy and port settings resolved the problem.

### Source excerpt

For the past few days, whenever I tried to access any site with HTTPS, I used to get this error. "This webpage is not available ERR_TUNNEL_CONNECTION_FAILED" This used to occur only on mobile network (airtel) and not on WiFi. At first it seemed to be a problem with chrome. But the same problem was there in other browsers. After breaking my head for a while I read somewhere that android doesn't support SSL over any port other than 443 (too weird to be true). But this couldn't be the issue because https://google.com , https://twitter.com etc use 443. Upon investigating further, I realized that it is a very silly issue. It is because the default Access Point (Airtel Live) that came with my carrier (airtel) had a proxy that was not allowing SSL Tunneling. After setting Proxy and Port to nothing, the problem was solved!