How to set the html class attribute in Django's forms.py
## Thing you want to do I want to specify the ** class attribute ** that is set in the ** html tag ** when I write the form to be displayed in the template with ** forms.py **. #### **`forms.py`**
Impressions from reading Linux comics # 1
## Impressions I've been using Linux the most in practice so far I bought it on Amazon and read it on my Kindle. Since it's a manga, I thought the content wasn't written very concretely, It was a
[Numpy] Probably the shortest way to alternately synthesize two one-dimensional arrays
```python import numpy as np a = [0, 1, 2, 3, 4] #One-dimensional array 1 b = [5, 6, 7, 8, 9] #One-dimensional array 2 c = np.c_[a, b].flat[:] #Synthetic print(c) ``` #### **`out`** ```python [0
From Attention of Zero Tsuku 2 to Transformer
# 1.First of all ** I studied Deep Learning2 Natural Language Processing ** from scratch. There is ** Attention ** in Chapter 8, but only 4 pages were devoted to ** Transformer **, which is the basis
Execution time measurement with Python With
# To be able to You will be able to measure time using with. It can be used when measuring time with Kaggle etc. # reference Used in [Mercari Competition 1st Code](https://www.kaggle.com/lopuhin/m
[Introduction to Data Scientists] Basics of Probability and Statistics ♬ Probability / Random Variables and Probability Distribution
Up to the last time, [[Introduction to Data Scientists] Descriptive Statistics and Simple Regression Analysis](https://qiita.com/MuAuan/items/20cf6b200070e76b9236) has been summarized. This time, we
I have 0 years of programming experience and challenge data processing with python
First, briefly introduce yourself. I started studying data science in May 2020. ・ It is the first time to touch the programming language itself until May 2020 ・ Since Excel is often used for work
Memorandum conda command
# Environment list ```bash $ conda info -e ``` # Create a new environment ```bash $ conda create -n [name] python=3.6 or $ sudo conda create -n [name] python=3.6 ``` # Run the environment ```bash
I tried to generate a random character string
## Introduction We have implemented programs in several languages that generate random strings (6 lowercase letters this time). The skill of the author of the article is almost the same as an amateu
[Python] Convert natural numbers to ordinal numbers
Contents This is a method to convert a natural number of integer type to an ordinal number of string type (0th, 1st, 2nd, 3rd, ..). Here, 0 is also included in the natural number. Each code can be
Things to keep in mind when using Python with AtCoder
In <a href="https://atcoder.jp/contests/dp/tasks/dp_b"> Educational DP Contest B --Frog 2 </a>, there is a case where the following code inevitably becomes TLE, so I submitted it with PyPy. By the wa
[VueSlsApp] Specify PYTHONPATH in Lambda and use the external library simply
Note: This article is a reprint of the note article. If there is an update of the contents, the note will be updated. If the qiita article is out of date, please also check the note. https://note.co
ABC126 A, B, C Explanation (python)
I would like to write a commentary on ABC's A, B, and C problems in Reiwa, hoping that it will be a training to deepen one's understanding and a little help for someone. ## A problem https://atcoder
When you want to plt.save in a for statement
``` for idx, file in enumerate(files): plt.savefig("fig/" + "{}.pdf".format(idx)) ```` --With enumerate, number and save
Manage multiple context managers together with Python contextlib.ExitStack
The [Python standard library contextlib.ExitStack class](https://docs.python.org/ja/3/library/contextlib.html) allows you to manage multiple context managers [^ cm] at once. The advantages of the Exi
Run Yocto on Ubuntu using QEMU.
# ■ What to do Put Yocto's development environment on Ubuntu. I plan to put Yocto in other devices, but I don't know much about Yocto in the first place, so I would like to run a virtual Yocto us
Tensorflow cannot be imported
### Problem: Tensorflow cannot be imported When I installed Tensorflow 2.3.0 (latest version at the time of writing the article) and tried to import it, I got a lot of error messages about the missi
A story about creating a program that will increase the number of Instagram followers from 0 to 700 in a week
# Introduction This is the second in a series that uses Python with impure motives. The previous (first) [article](https://qiita.com/kei_kei_kei/items/730ba09e7830d5c00a1c) also touched on Python,
SSH connection from Windows via SSL VPN
# SSH connection from Windows via SSL VPN I think that the number of people who work remotely due to coronavirus has increased, but I think that there are also people who have a server in the intran
Internal / external judgment with Python: Obtain the city / town / village name from the latitude / longitude information of any point
# Thing you want to do I made a program to get the name of the city, town, and village of this point only from the latitude and longitude information of any point. There are two points: reading the s
How to get a list of files in the same directory with python
The __glob module __ is useful for getting a list of files in the same directory. # Example of using glob module Try running glob in the directory where the following files are saved. data1.txt,
Find the cumulative distribution function by sorting (Python version)
This article is a rewrite of [Calculate Cumulative Distribution Function by Sorting](https://qiita.com/kaityo256/items/690a463b6b865da80de6) written in Ruby in Python. # Introduction When you want
Until the person who touches the terminal for the first time automatically translates the dissertation into English with "Honjac Konjac".
# background "Honjo Konjac" is a translation program for English dissertations created by [cabernet_rock](https://qiita.com/cabernet_rock). If you throw the URL of the paper, it will output a PDF fil
Let's take a look at Python line by line (token acquisition with Python, parameter store registration / update, test failure after deployment to success)
Hello. How are you? When old videos are distributed on the net, You will see it with nostalgia. Nostalgia is just entertainment. [Previously about Serverless Framework, Python, etc. While seei
I tried AutoGluon's Image Classification
# Introduction I tried the image classification of AutoGluon (https://autogluon.mxnet.io/index.html) which is an AutoML library in the environment of Google Colaboratory. Basically, it will be the
Error details and countermeasures that occurred in OpenCv2 when executing the object recognition sample program of "Object Detect on Tools"
Trying to recognize real-time objects using a webcam I will leave the stumbled part as a reminder. If you have a problem similar to yourself, please refer to it. ** ■ Referenced site ** I was w
How to debug a Python program by remotely connecting to a Docker container in WSL2 environment with VS Code
For those using Visual Studio Code on Windows 10 Describes how to debug a Python program by remotely connecting to a Docker container in a WSL2 environment. Please check another site in advance for
PyTorch C ++ (LibTorch) environment construction
** PyTorch, a type of deep learning framework, has a C ++ version as well as a Python version! ** ** This time, I will explain the procedure for building an environment on Ubuntu with "PyTorch C ++
Row profiling with Cython
# Overview How to line profile inside the "` cdef` "function in the Cython code" `* .pyx`" # 1. Library installation ``` pip install line_profiler ``` # 2. Modification of pyx file ## 2.1. Added
I tried to build an environment where work in the Docker container on the remote server can be done directly from the local VS Code with SSH connection
This is Ishikawa from NTT DoCoMo. It is my second year as a member of society. Recently, due to various reasons, the number of companies and schools that recommend working from home or researching