The tenth episode of the Aiti Tribe Clinic: How to learn Python? The method is very important

The tenth episode of the Aiti Tribe Clinic: How to learn Python? The method is very important

【51CTO.com original article】 Activity description : Aiti Tribe is a service community that provides core developers with in-depth technical exchanges, solutions to development needs, and resource sharing. Based on this community, we invite industry technology experts to provide one-on-one breakthroughs on development needs and remove stumbling blocks in the development process. We help developers solve development problems with the most professional and efficient answers.

Topic keywords : Python/Hadoop/Web/APP/Server

Tribe lineup : 51CTO community think tank

Object-oriented : Python development engineer, Java development engineer, .NET development engineer, PHP development engineer

How to participate : Join the 51CTO developer QQ exchange group (627843829). If you have any technical questions, ask them in the group or send them to the group owner.

Event Details :


Java-blank-Lanzhou : How to learn Python? Before, I always started from header first.

1>.Net_Xiao Lin_Chengdu : If you have a basic knowledge of programming, you can directly read the documentation.

2> Data-unicorn-Beijing : My personal suggestion is for reference only. If you have no basic knowledge, I suggest you learn Java object-oriented thinking first. Read the first 4 chapters of Zhang Xiaoxiang's Java Employment Tutorial. If you have object-oriented thinking, then learn Python. Python is easy to get started with, but if you don't have programming ideas, it will be difficult to master it later. I recommend this book. Just start learning from python3.6.

3> Operation and Maintenance-xwaqdyw-Beijing : Look at the basic knowledge, find a code, and learn while copying it.


Android-arige-Beijing : Is there anyone who is good at Python? I have two questions:

1. ImportError: numpy.core.multiarray failed to import

I imported an OpenCV library and got this error when I ran it. I can run Python 2.7, but pip says it doesn't have it. I found numpy under OpenCV.

2. I installed it like this, on MAC system, it prompts that the installation is successful, but it still reports an error: RuntimeError: module compiled against API version 0xb but this version of numpy is 0x9
Traceback (most recent call last):
File "/Users/songjunjun/Documents/MyTrainingDemo/renlian/test.py", line 2, in <module>
import cv2
ImportError: numpy.core.multiarray failed to import

C++/Python-taniey-Beijing : The first question is, you don't have the module nompy? Just install pip first, and then install numpy. You can install it directly by pip install numpy, which comes with Python. If you don't have pip, you can also download Numpy online and install it manually.

The second problem is that the numpy used by opencv does not match the numpy version you installed. Otherwise, you can recompile opencv with numpy. The error reported here means that the version of something you are using does not match. Another possibility is that your opencv uses py2, but you use py3 to run it, or vice versa. py2 and py3 are incompatible.


C→Erfon→Guangdong : How to choose between R and Python? For big data?

Big Data - Yida - Guangzhou : For big data, it should be more accurate to say that for the field of data analysis, each has its own advantages. R modeling and Python are both used quite a lot, but Python is relatively more widely used, with countless third-party libraries. In fact, it depends more on what people in the team use. For me, Python is used more because Python also supports almost all AI frameworks.


Network Engineer-sevenot-Chengdu : Is Java used in Hadoop? What Java level do I need to have to meet the requirements of Hadoop? Is basic syntax OK or do I need to be able to write various data structures in Java? I will take a look at Hadoop courses first, then choose a direction according to my own situation, and then learn the language, so that I can be more targeted. Is hive engine a good choice?

Big Data - Yida - Guangzhou : The ecosystem of hadoop system is basically Java. Hadoop must use Java. Hadoop is the foundation of the big data architecture system, and almost most of the frameworks in the ecosystem rely on Hadoop. The two most important things in hadoop are mapreduce and hdfs. Mapreduce must be written in Java. It is definitely not enough to just know a little syntax, not to mention various data structures. It is not practical to know some Java collections. The basics must be mastered. If you write hive, you only need to know hsql, and the hive engine converts SQL into the background mapreduce. Hadoop's stream processing is mainly storm or Flink or spark streaming framework. Hive is a data warehouse that relies entirely on hadoop.

So first of all, you need to identify your job content. One is development, and the other is data analysis (mainly hsql and scripts).


PHP Development - Science - Guangzhou : Does anyone know the difference between APP and Web? How are the Web and app interface calls made?

1> Student-Yu-Yuncheng : Web and app are b/s architecture and c/s architecture respectively.

2>Java-Afei-Nanjing : okhttp,httpclient,Retrofit,socket,webservice.Service call.


Java-Loren-Shanghai : I want to ask a very basic question: How many objects are created when String x = "abc" is in String y = "abc"? Is there any way to verify this? Because I don't see any explanation or code about String Pool in the source code of String.

Java+Li Sai+Zhengzhou : 1. Java runtime maintains a String Pool, which is vaguely translated as "String buffer" in JavaDoc. The String pool is used to store various strings generated during runtime, and the contents of the strings in the pool are not repeated. However, general objects do not have this buffer pool, and the created objects only exist in the stack area of ​​the method. Compare and judge two strings.


Java-Xiaoyuan-Zhuhai : I have a question about the front end. Can I use JS to access the FTP server on the front end? Can JS implement the FTP client protocol?

1> Back-end interface development - Liu Shengjie - Chengdu : No, unless you implement the FTP client protocol yourself, JavaScript should not be able to do so at present, you can take a look at node.js.

2> Network-Kevin-Hebei : What is the need and purpose of implementing JS access to FTP on the front end? You don't have to worry about JS.

3>PHP-Little Star-Guangzhou : If time is limited, it is recommended to use JS to asynchronously request the server-side script (accessed by the server). If you access it locally on your PC, you can simulate the SSH environment and use FTP instructions to access it (that is, the program executes system instructions). At the company level, it is necessary to set up a cluster of several machines or load balancing. The same is true for mobile APP access, implement the FTP protocol, or asynchronously submit requests to the server to process FTP operations.


Network Engineer-sevenot-Chengdu : Will data analysis and development be completely separate? The main reason is that I have no Java foundation and I really don’t want to participate in development, but I also want to understand big data. Is there any way to save it?

1> Big Data - Zhang Ce - Hong Kong : Then use hive, which is SQL statement.

2> Big Data - Yida - Guangzhou : It depends on the needs. Generally speaking, Java is definitely necessary for big data. It is mainly for development. As for analysis, hive and hsql are indeed used more.


PHP-Shi Xiaojun-Beijing : I would like to ask how can I check on the server whether the message sent by the client is successful, swoole extension.

How can I check here? I have already started the server port, and I want to test the instant messaging client to see if the server is connected successfully after sending and receiving messages.

1>Operation-Linzi-Beijing : Isn't this a peer check? Try throwing it in the program.

1: After sending the message, whether the server is connected successfully or not, your connection statement should be hard-coded. You can throw the connected socket after connecting.
2: Receiving information should be tested in two steps: one is sending and the other is receiving. You can test that sending can be done without testing receiving. You can consider adding a printf or something after sending information.

2> Big Data - Yida - Guangzhou : This is very simple. Just use TCP to capture packets. You can just make an access log. Write all the accesses and sent messages into the log and you can see it.


Department Administrator-Mingliang-Guangzhou : Our IP has been blacklisted by multiple anti-spam organizations, and many outgoing emails cannot be sent.

If the mail system does not do reverse resolution, will it be blacklisted by the anti-spam organization? QQ does not do one-way resolution, and the ptr record cannot be found.

1>xwaqdyw-Operation and Maintenance-Tianjin : If it is an IP problem, you can choose to use a proxy to send emails! ! !

2>Backend - Liu Shengjie - Chengdu : It should be possible, otherwise your email will be regarded as spam and others probably won’t receive it.

Judging from this command, no. This generally depends to a large extent on the mail server. For example, if you send a large amount of spam to Tencent Mailbox, then Tencent Mailbox will definitely regard it as spam.


Cloud Computing - Cainiao - Suzhou : I don't know how to distinguish between physical network cards, wireless network cards and virtual network cards. When I set up the network of a virtual machine, I need to choose which network card to forward the data packets from. The one with wifi is the wireless network card, the one with PCI is the wired network card, and the others are virtual network cards. Can I divide them this way? Is it bridge mode? Can the virtual machine access the physical machine by sharing it?

Backend interface development - Liu Shengjie - Chengdu : Wireless network cards and physical cards are real. What this means is that one is directly connected to the external network. Both NAT and bridge are OK. The key is whether your virtual machine needs to access your computer. In fact, these can be solved, such as sharing, FTP, etc., which is not a big problem. This can be modified every time it is started. Try it and you will understand it in depth.


IT-Jingjing-Beijing : I would like to ask if the computer's D drive can simulate space for the C drive?

.net-Xiao Lin-Chongqing : Install a virtual machine.


Java-小元素-Yunnan : Does anyone have the download resources for MindManager?

Network-Kevin-Hebei : Is this it? You can download it from the official website.


Do you still have questions about these solutions? Welcome to join the 51CTO developer QQ exchange group 627843829 for discussion.

Next event notice: November 17

Keywords: Android development, Java, Python, servers

Activity Review:

The fifth episode of the Aite tribe clinic: data collection and front-end application

The sixth episode of Aiti Tribe Clinic: How does machine learning judge emergencies?

The seventh episode of the Aite Tribe Clinic: What function was used to write the King of Pesticide Welfare Bureau?

The eighth episode of the Aiti Tribe Clinic: Eliminate these common Android development problems

The ninth episode of the Aiti Tribe Clinic: Java, Python, PHP, they all say they are simple

[51CTO original article, please indicate the original author and source as 51CTO.com when reprinting on partner sites]

  1. The fifth session of the Aiti Tribe Technical Clinic
  2. The sixth session of the Aiti Tribe Technical Clinic
  3. The seventh session of the Aiti Tribe Technical Clinic
  4. The 8th Aiti Tribe Technical Clinic
  5. The 9th Aiti Tribe Technical Clinic

<<:  iOS Native and JavaScript Interaction

>>:  iOS 11 reveals another security bug, Apple users should be careful with private photos

Recommend

How to make users addicted to your product?

Why do users keep using some products (including ...

What efforts has mankind made to control the growth of plants?

In prehistoric times, humans began to recognize a...

A look at the tech products and services that disappeared in 2015

[[161053]] 1. Amazon Fire Phone Amazon's Fire...

How to reasonably measure the natural growth of users?

Although according to my personality, I like to n...

How long will it take for your job to be replaced by a machine?

Many people believe that the world is about to us...

WebViewJavascriptBridge-Bridge between Obj-C and JavaScript

[[138163]] WebViewJavascriptBridge is an iOS/OSX ...