Tag Archives: python

Error: importerror: DLL load failed: the page file is too small to complete the operation.

ImporError: DLL Load Failed: The page file is too small to complete operation.

Cause analysis,

2
2
2
2
2
2
2
2
2> Other programs are running, solution: wait for the other programs to finish running or close the other programs. Turn off all useless programs on your computer. Also, Python.ext should not be used by two programs at the same time. For example, if you are using PyDev + Anaconda, turn one off. *

Tensorflow image random_ There seems to be something wrong with the shift function

Environment: Python 3.6, TensorFlow 1.15
Hope for augmentation, using tf keras. Preprocessing. Image. Random_shift function
Unsupported operand type(s) for *: ‘Dimension’ and ‘float’
Line 446 in tensor_shape.py is return self * other
Return self * other –> return self * other –> return self * int(other)
The random_shift function does not work, and the image does not have any shift effects
As a last resort, change the design function to achieve random_shift function function
According to my requirements, first of all, two random numbers are generated by TF.Random. Uniform, which are used as the translation pixels of the width and height dimensions of the image. Then use tf.roll to translate the image in two dimensions of height and width. The code is as follows:

shift_num = tf.random.uniform(shape=[2], minval=-img_height/2, maxval=img_height/2, dtype=tf.dtype.int32)

img_out = tf.roll(img_in, shift=shift_num, axis=[1,2])

This code does what I need the random_shift function to do, but it’s slow
over

Solutions to the failure of importing Python 3.7 SSL module

There are a lot of articles on the Internet about how to solve the failure of Python3.7 import _SSL module, but most of the actual operation is not successful. The following method can be used in a practical test.
First, install dependencies
OpenSSL or Libressl (either optional) is required to install the SSL module. OpenSSL is installed in version 1.0.1, which does not meet the requirements of Python3.7. The version requirements for the SSL library are as follows:
openssl > = 1.0.2 libressl & gt; = 2.6.4
My working environment:
14.04 Python3.7.3 Ubutun download link: https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz
Download and install Libressl
Website: https://www.libressl.org/, download link: https://ftp.openbsd.org/pub/OpenBSD/LibreSSL/libressl-2.9.1.tar.gz./config – prefix =/usr/local/SSL make sudo make intallmv/usr/bin/openssl/usr/bin/openssl. Bak (if not installed SSL before, /usr/include/openssl.bak /usr/include/openssl.bak This step can be skipped) ln -s/usr/local/SSL/bin/openssl/usr/bin/openssl ln -s/usr/local/SSL/include/openssl/usr/include/openssl in/etc/ld. So. Conf., d directory to create libressl – 2.9.1. Conf file, add/usr/local/SSL/libsudo ldconfig
Install Python3.7
Configure environment variables
Export LDFLAGS = “-l/usr/local/SSL/lib”
export CPPFLAGS = “-i/usr/local/SSL/include”
export PKG_CONFIG_PATH = “/ usr/local/SSL/lib/pkgconfig”
Unzip the Python installation package and execute the configure file:
./configure — enable – Shared
Check that the SSL configuration is working

Verifies that the SSL module was successfully installed in /usr/local/bin/python3.7

3. Other errors
Failed to compile the SSL module

Solutions:
Go to the libressl compilation directory libressl-2.9.1
Sudo cp SSL/libs/libssl. So the 47.0.5 – gnu/Linux/lib/x86_64 –
sudo cp crypto/libs/libcrypto. So the 45.0.4/lib/x86_64 – – the gnu/Linux
Sudo ln-s /lib/x86_64-linux-gnu/libcrypto.so.47.0.5 /lib/x86_64-linux-gnu/libcrypto.so.47
sudo ln-s /lib/x86_64-linux-gnu/libcrypto.so.45.0.4 /lib/x86_64-linux-gnu/libcrypto.so.45
recompile
Failed to compile the _ctypes module

Sudo apt-get install libffi-dev, install libffi-dev, install libffi-dev
 

Python error open SSL.SSL.SysCallError :(-1,‘Unexpected EOF‘)

Ssl. syscallError :(-1,’Unexpected EOF’)
Verify = False: verify = False: verify = False: verify = False

Request, when using a proxy to crawl a web page
Verify = False; verify = False
code

URL = "https://docs.google.com/uc?export=download"

session = requests.Session()

response = session.get(URL, params = { 'id' : id }, stream = True )

Verify = False

URL = "https://docs.google.com/uc?export=download"

session = requests.Session()

response = session.get(URL, params = { 'id' : id }, stream = True, verify = False )

Problem solving: importerror: libcublas.so .9.0: cannot open shared object file: No such file

ImporError: LibCublas.so.9.0: Cannot open shared object file: No such file: ImporError: LibCublas.so.9.0: Cannot open shared object file: No such file: ImporError: LibCublas.so.
This means the CUDA version is not compatible with TF.
I’m running in a virtual environment created by Conda. Python =3.6. CUDA version = 9.2 in basic environment.
When TensorFlow was configured, it was TF1.8 installed as CUDA 9.2. How could it not be compatible?So I’m n V c minus V.

So I was curious to create a new virtual environment and install TensorFlow =1.8.

conda install tensorflow-gpu==1.8


See the error and think TF1.8 is really not compatible with CUDA10 + lol, I need to confirm the CUDA driver version.

nvidia-smi


The original CUDA driver is 10.1, the CUDA version and the driver version are not consistent, embarrassing. It turned out that the graphics driver on the new computer was too new. Please refer to the corresponding relationship on Nvidia’s website:

The CUDA driver is 430.64, but the CUDA version=9.2 is configured. Well, upgrade the CUDA version and the problem is solved. Of course TF will be upgraded to 2.0+.

The problem of window flash after C + + program is compiled and run

Unicorns are hiring Python engineers in 2019. > >

Problem: When you first learn C++ to write Win32 Console Application using a different compiler, the resulting window may flash and disappear.
Some compilers are very good, and there are similar solutions in the example program. For example, in DevC ++, when creating a new non-empty C++ class, return 0; Before this: system(“PAUSE”); In Visual Studio there is no flash if you follow the steps, but when we press the shortcut key F5, the result will still flash. We can do this in return 0; STD ::cin.ignore(STD ::cin.rdbuf()->; in_avail()+1); That way it will show up, not just go over it. If you just want to see the result, there’s another way, and that’s in return 0; I’m going to say while(1);
Thank you @IM Xinye for reminding me. My posture has risen. When compiling, if you press F5 directly for debugging, there will be a flash of the situation. If Ctrl +F5 is not debugging, then there will be no flash.

Reproduced in: https://my.oschina.net/u/734295/blog/160510

Come and watch! Let’s see how people use Python to visualize the congestion situation of cities

Come and watch! See how the guy visualizes congestion in cities using Python
Preface one, climb congestion index two, data visualization three, build display website to write in the last

preface
Just today, I felt the deep malice from the traffic jam There is nothing wrong! I was stuck in traffic for almost 3 hours today and my best date just went up in smoke.

br bb0

National No.1, what did Python do?

Python is without a doubt one of the hottest programming languages out there right now. The rise of Python has taken programming to a new level. It is no longer just for programmers, and everyone is learning Python, leading to a sudden rise in popularity and popularity. Python is extremely beneficial to the entire industry.
Python is everywhere, as Tiobe officially says, and in fact, since 2018, businesses have been deploying Python.
In education,
1. Since March 2018, the subject of “Python Programming” has been added to the National Computer Rank Examination II;
2. In 2018, Zhejiang Provincial Information Technology Teaching Material announced to abandon VB language and choose Python language which is more easy to understand;
3. The sixth grade information technology textbooks for primary schools in Shandong Province have also added Python content
In technical circles,
1. Python is developing rapidly in data science, machine learning, artificial intelligence, etc.
Python is also suitable for Web development, backend, mobile application development, and even (larger) embedded systems.
Python is becoming more and more popular, and it’s also attracting a lot of learners. Although Python has a reputation for being easy to learn, it can be difficult for people who have never been involved in computer programming to get a good grasp of it. The most important thing for beginners to Python is to choose a direction that works for them.
Learn Python from scratch! Learn Python from scratch! Today you can get all the information for only 0 yuan! And in the process of learning, you can also participate in our live learning!
A basic introduction to Python
Python development environment, function application, file manipulation, object-oriented, exception handling

2, Python advanced knowledge point explanation
Network programming, concurrent programming, database Linux system application Python syntax advanced HTML, CSS
Three, Web development selected good article + project combat
Django framework environment construction and entry case ORM principle and database configuration project practice: CSDN micro-course mall development practice

Three, Python crawlers selected good articles
How to use Scrapy framework, Middleware data persistent storage development method Redis visualization tool use project: Python distributed crawler + data analysis project: 2020 the latest focus of the crawler mechanism and bypass

Four, data analysis and data mining tools + actual combat projects
Pandas and Seaborn will be Pandas’ Notebook Data Science module. It will be Pandas’ Notebook Data Science module. It will be Pandas’ Notebook Data Science module

5. Artificial intelligence
Features Engineering Machine Learning Spam Classification Mechanism Principle Classifier Processing Recommendation System Architecture New Algorithm Launch Process and User Satisfaction Collection Strategy RMSE and MAE Evaluation Accurate Practice Project: Movielens Recommendation Data Analysis

 
All technical articles selected documents, video materials, project actual combat video have been sorted to the network disk

Click on the link and leave your contact information, can rapid consulting, get free information: https://t.csdnimg.cn/VtgI

And these [Python project source code] are all sorted out
It is not easy to organize the data, so be patient and learn
 


 

Click on the link and leave your contact information, can rapid consulting, get free information: https://t.csdnimg.cn/VtgI

> > > > > > > > > > The dividing line, underline < < < < < < < < < <
As a programmer technical community, has been adhering to the “achievements of 100 million technical people” mission, in order to help Python small white from 0 system combat each application direction, play a good Python each application post core ability! CSDN launched the Python Full Stack Developer!
What are the features of this course?
1. Constantly iterating content research and development to keep up with the market
CSDN, as the domestic programming technology community and the gathering place of the domestic programmers, has a good understanding of the Python technology requirements of the current enterprises.
This course is designed by the front-line industry lecturers according to the corporate talent portrait and training needs of the enterprise, with comprehensive content and professional learning path for the students, and training the complex and professional Python development talents.
1) The course teaches Python programming grammar + 4 popular applications +10 enterprise-level practical projects from a practical perspective. Connecting all of your Python knowledge through six stages of module design creates your own Python framework. At the same time, the course keeps up with the market demand iteration, and the course content of the upgraded version of the course is free to learn within the learning cycle! 2) Multi-stack technical personnel training, from the basic knowledge to the orientation of various employment, to provide multi-module content learning. 3) Multi-level employment analysis personnel training: Python full-stack development, Python crawler, Python data analysis, Python Web, artificial intelligence and other employment direction.

2. Perfect and sound course learning/supervision system
One to one question-answering by instructors, real project practice, regular testing, head teacher supervision, live question-answering, homework correction, and effective “learning, practice, testing, evaluation, answer integrated teaching mode”, CSDN guarantees your learning effect.
In addition, CSDN will also invite some industry celebrities to hold closed-door sharing meetings for students from time to time. Maybe just a little experience sharing in job hunting and daily work can help you avoid many detours.

3. Build your own personal network
I have to mention CSDN’s in-factory promotion service: excellent students can directly promote their resumes to the desk of the employing department. Meanwhile, they can cooperate with a number of senior tutors to provide one-to-one guidance to improve your employment rate.  
At the same time, CSDN alumni from Baidu, Tencent, Toutiao, Huawei, Meituan, JD.com, Xiaomi, Apple and other well-known first-tier “star” companies exchange circle, promote mutual communication and communication, at any time with excellent people continue to learn and progress. It also provides each student with the opportunity to enter the circle of high-quality network communication.
4. For all your other questions, here are the answers:
Q1: What is the learning style?
A: Online learning: the teaching mode of live broadcasting + recording. Of course, if you can’t catch up with live broadcasting, you can watch high-definition recording and playback at any time.
Q2: Is the after-sale service of the course complete?
A: Private VIP small group services: the speaker, teaching assistant, head teacher and employment teacher provide more than one personal question-answering service to effectively ensure the speed of answering questions and improve learning efficiency.
Q3: What is the schedule of the course?
A: The course adopts the on-demand learning mode. During the learning cycle, the courses are upgraded for free learning.
Recording part: is the dry, weekly recording 4-6 hours [material], probably need 1.5-2.5 times the learning time, this is to see their own appropriate time range, recording is the lecturer in advance in the recording studio alone, after the opening to you, not the playback of the period of live Oh.
live broadcast: weekly live broadcast, 1-2 times a week, two hours a time, combing important and difficult points for expansion, usually 8-10 PM, or in the afternoon of the weekend, miss can watch the playback and review repeatedly.
Q4: Is there any guarantee for registration?
A: In order to protect your learning rights and interests and our confidence in the course, if you are not satisfied within 7 days, you can carry out the refund process with CSDN unconditionally at any time.

Click the link, free to receive hd + learning route course planning: https://t.csdnimg.cn/VtgI