Docker CS

Frequently used Build: docker build -t tag-name # from dir that contains Dockerfile Login docker login # default registry is docker hub docker login registry-1.docker.io Push i. create a repository on docker hub and copy the command, “docker push jaaved9/assessment:tagname” docker push jaaved9/assessment:latest ii. To push to private or non docker hub repo docker push localhost.localdomain:5000/ubuntu # give full URL

1 min · Jaaved Khan

DigitalOcean

Registry Logging in with docker login registry.digitalocean.com # then enter the token as both username and pasword # then docker tag heartexlabs/label-studio:latest registry.digitalocean.com/jak/label-studio # and then docker push registry.digitalocean.com/jak/label-studio doctl doctl is the official DigitalOcean command-line client. It uses the DigitalOcean API to provide access to most account and Droplet features. Install sudo snap install doctl To run doctl snap run doctl create an alias ~/.bash_aliases alias doctl="snap run doctl" Token Token can be created from the url, personal token generated from here is used to with “auth init” command....

3 min · Jaaved Khan

Display Manager Vs Display Server Vs Desktop Environment vs Window Manager in Linux

Summary position ease box interval due front 2.5 0 0 2021-11-06T20:39:jkj05Z ref Desktop Environment A desktop environment (DE) usually provides a window manager but a bunch of other stuff too: panels, start button, applets for volume, network etc. They provide an environment in which everything looks similar and easily recognisable, and provide GUI tools that allow you to do many admin tasks without having to type in a terminal....

2 min · Jaaved Khan

Docker and Kubernetes The complete guide

Multi-container applications with position ease box interval due front 2.5 0 0 2021-08-08T17:45:33Z is like an adverstiment and is actually what is available. When default storage is not availalbe or ready, specify the storage class in the claim - make sure that the storage class exists....

1 min · Jaaved Khan

Difference between Open(), StringIO and BytesIO?

Summary ref: link and stackoverflow StringIO and BytesIO are methods(objects) that manipulate string and bytes data in memory(RAM). StringIO is used for string data and BytesIO is used for binary data. This classes create file like object() that operate on string data. The StringIO and BytesIO classes are most useful in scenarios where you need to mimic a normal file. Example import io s = io.StringIO() print(s.write("Hello World/n")) # ------->Output: 13 # adding to the memory buffer using print statement print("adding using the print",file = s) # get all of the data written in the file print(s....

2 min · Jaaved Khan

Difference between messages and methods

Summary position ease box interval due front 2.50 0 0.00 2021-08-31T07:55:02Z A method is tied to a particular object. You find this in languages like Java and C++ where the method is bound early to the object at compile time. A message is an abstraction whereby the actual method that’s being called depends on runtime conditions. The object’s method is late-bound, thereby offering greater flexibility to the executing program....

1 min · Jaaved Khan

Django Templates

Summary

1 min · Jaaved Khan

Django Template Tags

0 min · Jaaved Khan

Django CMS

Summary

1 min · Jaaved Khan

Difference between File and Stream?

Summary Stream is a representation of flow of data from one side to another e.g. from disk to memory and from memory to diskBuffer is used to hold stream data temporarily. File is a representation to store data on disk file. File uses streams to store and load data. Nice tutorial about the Python file: https://www.knowledgehut.com/tutorials/python-tutorial/python-file-io Related

1 min · Jaaved Khan