GeoIP in Matomo, previous Piwik map Tokyo wards - geoip

According to https://dev.maxmind.com/geoip/legacy/release-notes/
Effective July 24th, we will be mapping more IP addresses to special
wards of Tokyo instead of Tokyo itself.
Matomo that I use has enabled GeoIP2 plugin and I have downloaded the free database https://dev.maxmind.com/geoip/geoip2/geolite2/ into misc folder.
As the Geolocation setting now allow to enable this:
Which seems auto-detecting the GeoLite2 binary files under misc folder.
I have written some PHP code to test the GeoLite2 binary file and it seems being able to detect Tokyo ward. For example, I can detect IP address 113.35.99.200
[city] => Array
(
[geoname_id] => 1852140
[names] => Array
(
[en] => Shinagawa
[ja] => 品川区
)
)
So the ward seems detected fine.
But from the dashboard where the map is displaying, the visits are still Tokyo. There is all 'undefined' regions in Japan. Switching to Cities, there is only one city "Tokyo".
What happens to other cities or other wards? How can I see them in visitor map?

What is most likely the issue, is that Matomo has upgraded to GeoIP2 and ISO regions in one of the last releases but the map hasn't yet and still uses the old FIPS codes that differ in some regions, which breaks the map in these cases.
You can find out more about this issue here:
https://forum.matomo.org/t/showing-map-of-visits-by-region-doesnt-work/31061
https://github.com/matomo-org/matomo/issues/13691
There is ongoing work to completely replace the map with a modern component which would fix this issue, but this will take some time:
https://github.com/matomo-org/matomo/issues/11929

Related

WMI filter to exclude/include a specific version of an application

I am trying to write a WQL query to filter computers on a version of a specific software : Firefox.
I want to use this WMI filter on GPO to check if the version is earlier or equal or upper a specific version : 60.8.0.0 esr.
The goal is to separate computers and users which have old versions and computers with the new one.
Hundreds of computers are being reinstalled in few days with a last version 68.0 esr. Using SCCM, it is easy to perform a clean install of a specific product like Firefox with the latest version 68esr in our case and block upgrade for the other one.
The computers which have an earlier version are in version 60.7.0.2 for the most up to date. Other older versions are also present.
Actually some parameters and homemade scripts are used to configure the browser (computers and users scope) through group policies and some parameters doesn't seem to works. I have to choose a version to apply the official ADMX from Mozilla. Since the last version, firefox.exe is able to directly read registry policies edited in a GPO and stored in HKLM/SOFTWARE/Policies/Firefox.
In my case I have to deal with 2 kind of Firefox:
New computers with a simple new GPO (computers scope)
Old computers with a GPO (users and computers scope) which copy some files with home made scripts.
Unfortunately, it is not possible to separate computers or users in different Organization Unit.
One the one hand, WMI filter seems to be the best way to do it for the new computers.
On the second hand, it will be easy to the computers which update Firefox via SCCM to be included with the new parameters without having to do it manually.
I tried this kind of WQL request:
SELECT * FROM Win32Reg_AddRemovePrograms
WHERE (DisplayName LIKE '%Firefox%') AND (Version LIKE '60.8.0%')
I am not able to do it unless by listing each version to exclude/include them because Version seems to be a string value and I do not know how to convert it in integer or to split with the character ".".
I've can define multiple queries on a single WMI filter and keeping in mind that querying the same WMI class multiple times can decrease performance.
It seems to work as a AND relationship as describe here.
Unfortunately it doesn't solve my problem.
So i start to use WMI LIKE operators and different range of character.
In my case :
New computers with a newer version of Firefox ESR (older than 68.0)
SELECT DisplayName, Version
FROM Win32Reg_AddRemovePrograms
WHERE (DisplayName LIKE '%Firefox%')
AND ((NOT Version LIKE '[0-5][0-9].[0-9]%')
AND (NOT Version LIKE '6[0-7].[0-9]%'))
Old computers with a newer version of Firefox ESR (greater than 68.0)
SELECT DisplayName, Version
FROM Win32Reg_AddRemovePrograms
WHERE (DisplayName LIKE '%Firefox%')
AND ((Version LIKE '[0-5][0-9].[0-9]%') OR (Version LIKE '6[0-7].[0-9]%'))

Downloading data from imagenet

I am told that the following list of "puppy" image URL's are from imagenet.
https://github.com/asharov/cute-animal-detector/blob/master/data/puppy-urls.txt
How do I download another category for e.g. "cats"?
Where can I get the entire list of imagenet categories along with their explanation in csv?
Unfortunately, ImageNet is no longer as easily accessible as it previously was. You now have to create a free account, and then request access to the database using an email address that demonstrates your status as a non-commercial researcher. Following is an excerpt of the announcement posted on March 11, 2021 (does not specifically address the requirements to obtain an account and request access permission but explains some of their reasons for changing the website generally).
We are proud to see ImageNet's wide adoption going beyond what was originally envisioned. However, the decade-old website was burdened by growing download requests. To serve the community better, we have redesigned the website and upgraded its hardware. The new website is simpler; we removed tangential or outdated functions to focus on the core use case—enabling users to download the data, including the full ImageNet dataset and the ImageNet Large Scale Visual Recognition Challenge (ILSVRC).
ORIGINAL ANSWER (LINKS NO LONGER VALID):
You can interactively explore available synsets (categories) at http://www.image-net.org/explore, each synset page has a "Downloads" tab where you can download category image URLs.
Alternatively, you can use the ImageNet API. You can download image URLs for a particular synset using the synset id or wnid. The image URL download link below uses the wnid n02121808 for domestic cat, house cat, Felis domesticus, Felis catus.
http://www.image-net.org/api/text/imagenet.synset.geturls?wnid=n02121808
You can find the wnid for a particular synset using the explore link above (the id for a selected synset will be displayed in the browser address bar).
You can retrieve a list of all available synsets (by id) from:
http://www.image-net.org/api/text/imagenet.synset.obtain_synset_list.
You can retrieve the words associated with any synset id as follows (another cat example).
http://www.image-net.org/api/text/wordnet.synset.getwords?wnid=n02121808
or you can download smaller size of imagenet, mini-imagenet:
https://github.com/yaoyao-liu/mini-imagenet-tools
2-1. https://github.com/dragen1860/LearningToCompare-Pytorch/issues/4
2-2. https://github.com/twitter/meta-learning-lstm/tree/master/data/miniImagenet
You can easily use the python package MLclf to download and transform the mini-imagenet data for the traditional image classification task or the meta-learning task. just use:
pip install MLclf
You can also see for more details:
https://pypi.org/project/MLclf/

Integrate Blockchain Payment Gateway

I am working with blockchain apis with Exodus, and blockchain is providing feature to generate new wallet address (for e.g. -BTC) which is useful to hide original BTC address from users and it has limit of 20 unused addresses. If 20 generated address are not used by users then after 20 it won't allow to create new address. [This means at a same time only 20 users can work and generate address] to overcome this issue , https://www.blockchain.com/api/api_receive mentioned that ". If you encounter this error, you will either need to switch to a new xPub (within the same wallet is fine), or receive a payment to one of the previous 20 created addresses"
My questions are:
1) For e.g. BTC exodus original address is XXX
Is there any way/algorithm to "generate random" address [for e.g. XX1,XX2] by using XPUB key of exodus wallet and if I pay to XX1 or XX2 amount will basically go to "XXX" ? like blockchain.com is doing ?
2) Any way to overcome issue/limitation of 20 unused address of blockchain.com ?
for example create our own node and generating address ?, if Yes then if you have any solution API which work with PHP, nodejs? Please provide URL for same.
Thank you in advance
Let me know if you have any queries/questions regarding same.
Regards,
Brijal
You can generate as many addresses as you like with the blockchain.com API, by increasing the gap_limit parameter.
You can set it to 500 if you like.
However, you will need a way to scan and retrieve funds that are sent to those addresses. Exodus is not a good solution for this, since it only scans past 5 unused addresses.
It's not practical or useful to keep generating and scanning addresses forever. In normal circumstances, Exodus only generates new addresses once existing ones are used, so there is no downside to stopping after 5 empty addresses.
Using a more technical wallet would work better for generating and managing XPubs and addresses.
http://docs.electrum.org/en/latest/merchant.html
However, you would still need to more or less build a crypto payment solution from scratch.
There must be ready-made libraries for this, though be careful to pick one that is trusted.

same coordinates yield different results in Nominatim and MapQuest

According to Nominatim and MapQuest, the following end-points should provide the same data:
Nominatim: http://nominatim.openstreetmap.org/reverse
MapQuest: http://open.mapquestapi.com/nominatim/v1/reverse
In fact
The Nominatim Search Service is similar to our MapQuest Search Service with its simple interface and powerful capabilities, but instead relies solely on data contributed to OpenStreetMap.
Therefore I would expect the two services to provide the same data, nevertheless the following query for the same coordinates (41.904163, 12.485597) yields different results:
Nominatim: http://nominatim.openstreetmap.org/reverse?lat=41.904163&lon=12.485597&addressdetails=1&format=xml&zoom=18
MapQuest: http://open.mapquestapi.com/nominatim/v1/reverse.php?lat=41.904163&lon=12.485597&addressdetails=1&format=xml&zoom=18
Results:
Nominatim: Via Francesco Crispi
MapQuest: Via Gregoriana
Why?
NOTE: as of 12.44 PM UTC (July 1st, 2013) OSM is returning the same results as MapQuest. There are a couple of related discussions on GitHub:
Issue 66
Issue 67
This is a bug in Nominatim, which is going to be fixed:
Nominatim was no longer searching for objects below street level (house numbers, POIs, etc.) due to this commit. It only concerned the instance on osm.org.
See issue #66 on GitHub: https://github.com/twain47/Nominatim/issues/66

How to manage AWS cloud search version ID?

I'm writing a library in order to help everyone using Amazon cloud search.
With cloud search when you update a document you need to specify the id of the document (of course) and the version of the document you want to upgrade to.
If the specify version number is smaller than the current version the update don't append.
So how to make sure I update my record every time I do an update?
The Ruby project aws_cloud_search is using a timestamp in order to keep the version number always higher but:
As the maximum version number is 4294967295 for AWS cloud search. So
it will not work any more after the 07 Feb 2106
If you run two updates within the same second then the last update
(the more important one) will be ignore
Aside from the timestamp approach, which appears to be the standard answer from everybody, including the docs, the only approach that I've found that works is to keep track of the version number elsewhere, and increment it as changes happen.
Of course, this approach only works if the object that you're trying to represent in the cloud search document can be accessed from somewhere else where presumably you have some sort of atomicity.