К основному контенту

Сообщения

Local notifications in Android with Xamarin

I've been developing an Android mobile app for my pet project. I chose Xamarin framework as a tool just because I'm familiar with C# (even probably writing a native app is much better idea). Since I'm not a mobile developer I've been facing issues from time to time. In particular I realized that enabling local notifications (e.g. reminders) is not that much clear as I would love to. So, this post will go through few steps showing how to set a local notification (or reminder). The info is up-to-date in September, 2020. NB: the post is relevant for Android 8.0 (Oreo) and higher since a feature of notification channels was introduced for those versions (see details here ). The code was tested on a phone with Android 9.0 Pie. Let's start. To demonstrate the process I built a simple app with just two buttons. See code in my Github repository . One button is to set a notification at a selected day and time. Another button will cancel the already set notif

Telegram bot with Google Apps Script

I decided to clone one of my previous post in Russian. I noticed that people from different countries visit that post from Github repository with the code. So, I guess some of them were dissapointed by that fact they were not able to read the details. Here I'll just translate the post in English. No any new details. In this post I'll provide some useful details of how to host  your Telegram bot with help of Google Apps Script. There are tons of similar posts (good and bad) in Internet. That's why I'm not going to describe every step. Then someone may raise a question: "Why then write a post?" So, the answer is even you find the best article and copy code from there likely it will not work :) Only many of good articles plus Telegram API documentation plus (obviously) StackOverflow will ensure the results. I'll try to summarize some pitfalls here. Hope it will save your time. NB! developers always change the API, so have in mind that this post wa

Utility to parse COM port messages

COM port parser.  Those who deal with hardware often need to read messages from devices connected to your PC over COM ports. This Windows desktop utility helps to read, log and visualize messages from a COM port. Here below I'll provide the details of how to use the utility. COM port settings This part of UI allows to choose the appropriate settings. First of all select from the list the corresponding COM port your hardware device connected to. Then select appropriate baudrate, number of bits, options for parity and stop bits. Once ready click  Open . The default settings are 9600,8,N,1. Data log settings Once the port is correctly opened the utility can log arriving messages to a .txt file. The default name for the log file is generated automatically as  hhmmss_ddmmyyyy_comport_log.txt . You may change the name and directory. Click  Start  to start writing the messages and  Stop  to finish it. You may also add a timestamp to every ariving message by checkin

R and Python. Biased opinion

Recently I’ve published a post on Medium. That was a post about how friendly an implementation of Read-Evaluate-Print-Loop (REPL) mode in different IDEs for data science. Even I like R I tried to be as much unbiased as possible while writing the post (I even must admit I was really surprised how friendly for statistical analysis a new Spyder 4.0 is).    In my Medium post I mentioned there are tons of articles about the R vs. Python fight. Some of them are really comprehensive and useful. But it’s not common to consider REPL. Of course, IDE is important for efficient working process. But the features of a language as itself are crucial as well. Today I’m going to touch few other things that are typically not covered in R vs. Python comparisons. It might happen today my post is subjected and not that much unbiased. Let’s see 😊 First of all it’s widely spread that R has “weird” syntax. And in contrast, it’s claimed that Python syntax is so clear and obvious which helps a lot t

Немного графиков про covid-19

Единственное, о чем можно написать пост в апреле 2020 - это, естественно, эпидемия. Ну и, конечно, самоизоляция добавляет возможности посидеть дома, рисуя всякие графики в R. Посмотрим сегодня на то, как выглядят данные по заболеванию в разных странах. Cвоя рубаха ближе к телу\моя хата с краю или что-там ещё, поэтому интересно будет взглянуть похожа ли ситуация в России на другие страны. Для построения всех графиков использовались данные отсюда , которые в свою очередь взяты из отчетов европейского центра по предотвращению и контролю заболеваний (ECDPC) и из отчетов ВОЗ. Данные о количестве проведенных тестов взяты с официальных сайтов национальных медицинских организаций. Данные были актуальны на 7 апреля 2020! Важное замечание по данным о количестве проведенных тестов. В официальных источника почти нигде не указывается идет ли речь о количестве тестов  или о количестве протестированных людей. Из-за этого многие сравнения могут оказаться некорректными. Еще одно важное заме

Indoor air quality and IoT

This post is just an introduction to a series of publications about a custom indoor air quality device connected to IoT back-end.  (I hope, I'll be able to manage my laziness  and procrastination) The publications will describe a whole ecosystem which includes a sensing device, IoT cloud service, back-end and Telegram bot to get aware about your indoor air quality. Also maybe I'll ad something about the analysis of data.  Look at the picture below, this is a better explanation of the ecosystem than description by words. In the next posts I'll explain how to build your own sensing device to measure the quality of indoor air, what are the most relevant air quality parameters compared to well-known outdoor air quality, which sensors available on mass market are most suitable to measure those parameters. There are many tricky questions here. How the optical particulate sensors measure the weight of particles? Why it seems to make not that much sense to measure nit

Выступление на St.Petersburg R Users meetup

Запись моего выступления на митапе R Users. Рассказываю про задачу детектирования события во временных рядах. Один из подходов к решению задачи - детектирование паттерна в форме сигнала.