Publications by tomaztsql
Retrieving user access list to all reports in your PowerBI tenant using Powershell
From previous blogpost(s): Deleting Power BI datasets using Powershell Longterm-storage of Power BI activity logs and statistics using Powershell Retrieving list of users for all workspaces in your PowerBI tenant using Powershell Ever wanted to get the list of all users and their access to reports? The snippet below will return you just that. ...
1353 sym R (1852 sym/1 pcs)
Little useless-useful R functions – Reverse integer
Reverse integer is another interview question, that allegedly could be asked by the interviewer. Original question or problem is posted at the Leetcode. The problem is described as: Given a signed 32-bit integer x, return x with its digits reversed. If reversing x causes the value to go outside the signed 32-bit integer range [-2^31, 2^31 – 1...
1539 sym R (970 sym/4 pcs)
Little useless-useful R functions – R Solution with O(n) Time and O(n) Space complexity for CanSum() problem
CanSum problem is a problem where a given array of integers (nums) and a target integer (target), return boolean (TRUE \ FALSE) indicating, that the target integer can be calculated using two or more numbers in array nums. You may assume that each integer from the array can be used multiple times. You can also assume, that any integer (in nums ...
2659 sym R (1203 sym/5 pcs) 4 img
Little useless-useful R functions – Greedy Salesman
Travelling Salesman Problem is an NP-complete problem and an old mathematical problem. For this useless function, we will look for the nearest city from the previous city (or starting point) and repeat until we visit all cities. The greedy solution is fairly simplified but one disadvantage; it might not give you the best path (optimal solution) a...
1465 sym R (1934 sym/3 pcs) 6 img
Little useless-useful R functions – Drawing randomly generated @Github contribution graph
Github is collecting various images on their Instagram and Twitter that looks like a contribution graph. Well, why not create one in R with randomly generated data and the use of the ggplot library. Run the function by yourself: library(ggplot2) # introduce Github colours colours <- c("#ebedf0", "#9be9a8", "#40c463","#309b4c","#216e39") # colour...
936 sym R (1592 sym/2 pcs) 6 img
Retrieving list of users for all workspaces in your PowerBI tenant using Powershell
From previous blogpost(s): Deleting Power BI datasets using Powershell Longterm-storage of Power BI activity logs and statistics using Powershell Determining and checking who has access to a particular workspace in your organisation can be time consuming task. You can always retrieve the list of workspaces and access the list of all users with...
1508 sym R (1625 sym/3 pcs) 4 img
Python and R have matrix and simple loops. What can you use in T-SQL?
Many of you have already used any programming or scripting language. And you can tell that, there are some functionalities that are intuitive (for loops, enumerations, collections, …), data types and also short-hands. One of these data types is a matrix. Commonly used in a programming language, yet fairly unknown in T-SQL. You can say, that ma...
3682 sym Python (1750 sym/8 pcs) 10 img
Simple R merge method and how to compare it with T-SQL
Merge statement in R language is a powerful, simple, straightforward method for joining data frames. Nevertheless, it also serves with some neat features that give R users fast data wrangling. I will be comparing this feature with T-SQL language, to show the simplicity of the merge method. Creating data.frames and tables We will create two tables...
3955 sym R (2798 sym/15 pcs) 14 img
Little useless-useful R functions – Animating datasets
I firmly believe that animation and transition between different data states can give end-users much better insights and understanding of the data, than a single table with data points or correlation metrics. With help of ggplot, gganimate, you can quickly create an animation based on your needs. This is a simple IRIS dataset example. Animation ...
1003 sym R (388 sym/1 pcs) 2 img
Little useless-useful R functions – Finding total sum of all sub-arrays and sum of maximums
When it comes to O(N log(N)) time complexity functions, this is the right section. Given an array of natural numbers (later, you will see, it can be real, or any other less complex system (rational, irrational)) and you create a tree of all permutations preserving conjugation order. array = c(1,2,3,4) #sub-array with sum in [] brackets 1. c(1) [...
1002 sym R (1163 sym/3 pcs) 2 img