Few days back I was reading about cardinal numbers and while I was reading about cardinal number, I recall I had a discussion about infinities with a friend last year. The point was some infinities are bigger than other infinities. And how come?
If viewed from mathematical perspective we have a logical explanation . But before I go talking about which infinity is greater lets find out what is cardinality. The term cardinality refers to numbers in a set. Cardinality can be finite or infinite. However the cardinality of the set of real numbers is greater than the cardinality of the set of integers, even though both the sets are infinite.
And based on the Cantor Triangle, which demonstrates that the cardinality of the rational numbers was the same as that of the integers. Both have a cardinality of the aleph-null, the smallest infinity. Real numbers have cardinality of aleph-one.
I hope I make sense and do not hurt your heads.
0 Comments
I bought this particle photon in India last year, but couldn't make good use of it, and it was lying unused so I brought it with me to China thinking I will fiddle with it and do some project . It is after around 11 month of living in Beijing I managed some spare time (when my 16 month son was taking a nap) to setup Particle Photon hooked to DHT22 placed outside my home to monitor outdoor weather.
Having an experience using DHT22 with other Arduino boards I hooked it up quite easily and I made use of thingspeak.io to upload data.
You can have a look at the code I wrote for particle photon to read sensor data. Nothing new just used Adafruit_DHT.h and Thingspeak.h library
I used my javascript skills to write a plugin on thingspeak.io to display temperature in google chart API Gauge . And I opened the google gauge on an old tab and placed it on cupboard, and I am getting live stream of outdoor temperature all the time.
In many companies you may not be allowed to connect to docker hub registry on internet. That is most likely part of security rules. Like this is how in the company ( Base-fx) I am currently working at. To set up a proper docker registry would mean the developers who uses images do not pull themselves from docker. Instead they request a departnment to pull the base docker image from docker hub on internet. Lets assume the systems department pulls base docker images do host docker01. This means docker01 machine has access to internet but software developers who need to use docker images can pull from docker01 on there workstations running docker or a dedicated host running docker and acting as private docker registry. In my case i am going to use docker02 host machine to host private docker registry.
Now the above steps maybe required by the devops/ system engineer who had access to host running docker that has access to internet to pull base images from docker hub. So docker push hello-world pushes to docker . If you want to push to a local registry you need to explicitly tag it with the registry address. If your local registry is secured, you need to run docker login docker02:5000 but that does not change the default registry. If you push or pull images without registry address in the tag , docker will always use the hub. Now a developer can pull images as shown below. root@docker02: docker pull docker01:5000/myworld
Download and create the devpi container
To download the image run the following command:docker pull scrapinghub/devpi This may take a while if you haven't downloaded the ubuntu image before. After that is done you can create the container with autorestart enabled (needs at least docker 1.2):docker run -d --restart=always --name devpi -p 3141:3141 scrapinghub/devpi
Or without autorestart if you do not have a recent docker version or just don't want it to autostart all the time:
docker run -d --name devpi -p 3141:3141 scrapinghub/devpi
This also starts the container and it should be listening on localhost:3141. You can verify this by running docker ps to list your running containers.
Configure pip
Now tell pip to use the devpi server by creating the file ~/.pip/pip.conf and putting this inside:
[global] index-url = http://localhost:3141/root/pypi/+simple/
or set the environment variable PIP_INDEX_URL either manually or via your bashrc/zshrc/...rc:
export PIP_INDEX_URL=http://127.0.0.1:3141/root/pypi/+simple/ install devpi-client on virtualenv$ virtualenv minimalbase $ (minimalbase) pip install devpi-client
then point devpi client to your locally installed devpi server like this
devpi use http://127.0.0.1:3141/
and you will see this message
Warning: insecure http host, trusted-host will be set for pip using server: http://127.0.0.1:3141/ (not logged in) no current index: type 'devpi use -l' to discover indices venv for install/set commands: /Users/sanjeev/Development/pyenvs/minimalbase only setting venv pip cfg, no global configuration changed /Users/sanjeev/Development/pyenvs/minimalbase/pip.conf: no config file exists always-set-cfg: no
So now if you run the command devpi user you will see only one user:
root root is the default user that has /root/pypi is a read-only proxy link to the PyPI repo at https://pypi.org. Its purpose is to install packages when they are not available on your local devpi instance.To upload packages to the local instance, you need to create a non-root user and an index first. $ devpi login root # by default, only root can create new users $ devpi user -c san password=test # create new user
now if you type devpi user you will see two user:
root san
$ devpi login san --password test # relogin as the new user
and you will see :
logged in 'san', credentials valid for 10.00 hours then run the below command to create a new index for the new use
$ devpi index -c packages bases=root/pypi # create new index
which will result in below URL:
navigate to http://127.0.0.1:3141/san/packages in browser and you will see a json result
well, just decided to post this out and share it with everyone, quite useful if you want stick with terminal, I tend to use ffmpeg to convert media quite often. I do not know why my TV stopped supporting MKV format, I remember when I bout it it used to play mkv format just fine, but converting to mp4 without losing the quality was was quite convenient.
to convert mkv format to mp4 without losing quality: ffmpeg -i input.mkv -codec copy output.mp4
This doesn't convert the format it will just convert the container without re-enconding content.
Another interesting image conversion command lien tool is sips (for mac users).
sips -Z 1080 /Volumes/remotePC/Desktop/100CANON/*.JPG --out /Users/my_mac/Desktop/10CANON/ recently I used sips to convert and copy to my local computer 10 MB to 12MB JPG to few kb(size depends) on the batch. here is bit of more information if you have never tried sips before and you are mac user. SIPS must be one of the simplest and most underrated ways to process images on the mac. I mean, that’s what it’s there for, but it’s like no one thinks about it. I was trying to resize about 500 jpegs today with automator and then I remembered it. SIPS is simpler and faster FTW! SIPS doesn’t do EVERYTHING, but it does some common functions quickly and nicely and it’s accessible from the command line right in the terminal. Here are some things SIPS can do: #Resize a batch of images to 250px (largest side) sips -Z 250 * #Resize only .jpg files in a folder to 500px x 500px - ignores aspect sips -z 500 500 *.jpg #Rotate a batch of images 90 degrees clock-wise sips -r 90 * #Resize down to fit 250 pixels and pad with white to make them square, add finder icon sips -Z 250 -p 250 250 --padColor FFFFFF -i *There are more things you can do with SIPS – be careful, don’t hurt yourself – SIPS modifies your files without apology. Experiment on copies or live a life of regret. You can see the man page for more info. Of course, you could mogrify with ImageMagick, and that is truly wonderful, but not everyone needs or has IM and SIPS works out-of-the-box on any OSX Mac. BTW, SIPS stands for Scriptable Image Processing System, in case you were wondering. |
Custom Search
Other Blogs & PagesGit Commands Animation & VFX SitesA MUST READ for Ani/VFX Artistsawakened by thoughts,
|