What you can do with programming skills

When I thought about what to do with the technology, I couldn't see it through code exercises alone.

At this point, I have two things to understand.

  1. Manage information using dictionary type data.
  2. json is used to get data from a web application.
  3. Import json with Python and manage employee information. Example) id, name, etc.
import json
j = {
    "employee":
        [
            {"id": 111,"name": "John"},
            {"id": 222,"name": "Elle"}
        ]
}

print(j)
a = json.dumps(j)
print(json.dumps(a))
with open('test.json','w') as f:
    json.dump(j,f)

with open('test.json','r') as f:
    print(json.load(f)) #Read and write the output file in the file.

Getting page elements using Ajax.

Applicable source code

 $.ajax({
    url: "./information.json",
    dataType: "json"
  })
  .done(function(json){

    var idx = 0; 
    var $info = $(".info__list .item");
    $info.find("time").text(json[idx].date);
    $info.find("p").text(json[idx].value);

    setInterval(function(){
      if(idx === json.length -1){
        idx = 0;
      } else {
        idx = idx + 1;
      }
      $info.css("opacity",0);

      setTimeout(function(){
        $info.find("time").text(json[idx].date);
        $info.find("p").text(json[idx].value);
        $info.css("opacity",1);
      },500);

    },5000)

  });

Finally about data acquisition

It seems that you can get the information of the web page by a third party called requests. Let's also check the code for acquiring JavaScript information.

Recommended Posts

What you can do with programming skills
Python | What you can do with Python
What you can do with API vol.1
What you can and cannot do with Tensorflow 2.x
What you can do with the Python standard library statistics
Consider what you can do with Python from the Qiita article
Links to do what you want with Sublime Text
Is Parallel Programming Hard, And, If So, What Can You Do About It?
What you can't do with hstack or vstack with dstack
Until you can do simple image recognition with Jupyter
[AWS] What to do when you want to pip with Lambda
What to do if you can't sort files with subscripts
[Python] What do you do with visualization of 4 or more variables?
What to do with PYTHON release?
What to do if you can't install pyaudio with pip #Python
What to do if you can't build your project with Maven
What do you roughly say "sudo su"?
Data analysis, what do you do after all?
Do embedded programming with test-driven development with googletest
Until you can use opencv with python
Let's summarize what you want to do.
What skills do I need to program with the FBX SDK Python?
What to do if you can't find well with grep's -f option
What to do if you couldn't send an email to Yahoo with Python.
What to do if you get lost in file reference with FileNotFoundError
What to do if you get a TypeError with numpy min, max
What to do if you can't install with pip in babun environment
You can do it with Python! Structural analysis of two-dimensional colloidal crystals
What to do if you get Could not fetch URL 443 with pip
Until you CI what you made with Django with Jenkins
What to do if you get angry with swapon failed: Operation not permitted
Do embedded programming with test-driven development with googletest Chapter 8
What to do if you can't pipenv shell
Can you challenge Kaggle with just your iPad?
You can manage overlapping characters with multiple plt.text.
You can easily create a GUI with Python
[Recruitment] Would you like to exchange programming skills?
What are you comparing with Python is and ==?
What to do if you get an error when installing python with pyenv
What should I do with DICOM in MPEG2?
You can now display slides with nbviewer! [Jupyter]
What are you using when testing with Python?
[Beginner / Saved version] What you can do by programming language (12 selections such as Ruby / Python / Java / Swift / PHP / Go)
Consideration when you can do a good job in 10 years with Python3 and Scala3.
What to do if you get an OpenSSL error when installing Python 2 with pyenv
What to do if you run python in IntelliJ and end with an error
No module named What to do if you get'libs.resources'
ModuleNotFoundError: No module What to do if you get'tensorflow.contrib'
You can read the analog meter with the example MNIST.
Tips you should know when programming competitive programming with Python2
You can read the analog meter with the example MNIST.
What is pip and how do you use it?
Things to do when you start developing with Django
Summary of sites where you can learn programming online
What to do when you can't bind CaboCha to Python
Let's recommend Malbolge to those who say "If you do one programming language, you can do it"
3. 3. AI programming with Python
Make a note of what you want to do in the future with Raspberry Pi
Python programming with Atom
Competitive programming with python
Shader programming with pyOpenGL