前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >Java官方笔记13集合

Java官方笔记13集合

作者头像
dongfanger
发布于 2023-07-10 08:38:42
发布于 2023-07-10 08:38:42
20800
代码可运行
举报
文章被收录于专栏:dongfangerdongfanger
运行总次数:0
代码可运行

Storing Data

The Collections Framework is the most widely used API of the JDK.

集合不是数据类型,它是JDK的API,可以用来存储数据等,相当于数据结构

the Collections Framework is a set of interfaces that models different way of storing data in different types of containers. Then the Framework provides at least one implementation for each interface.

There are two main categories of interfaces in the Collections Framework: collections and maps.(所以我猜想Python也是基于这样的考虑,设计了List和Dict,并作为Python基本数据类型,实际编码中要用到的也主要是这两类)

That makes two main categories, Collection and Map, a subcategory, Queue, and a side category, Iterator.

a collection is an object,but an array is not an object in Java.

Collection Hierarchy

The Iterable Interface is the super interface of the Collection interface, and thus of all the interfaces of this hierarchy. An object that implements Iterable is an object that you can iterate over.

the Collection interface also models different ways of accessing its elements:

  • you can iterate over the elements of a collection, through the use of an iterator;
  • you can create a stream on these elements, that can be parallel.

List是有序列表

The difference between a List of elements and a Collection of elements, is that a List remembers in what order its elements have been added. If you iterate over the elements of a list, the first element you will get is the first that has been added.

You do not have this guarantee with a plain Collection nor for a Set.

List跟Collection的区别是,增加了index。

Set跟Collection的区别是,不允许重复。

Set是无序的,SortedSet是排序过的,SortedSet的排序是指从小到大排列,跟List的有序不一样,List有序是指的先添加排前面,不一定是最小的。

Storing Elements

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Collection<String> strings = new ArrayList<>();
strings.add("one");
strings.add("two");
System.out.println("strings = " + strings);
strings.remove("one");
System.out.println("strings = " + strings);

containsAll(): defines the inclusion

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Collection<String> strings = new ArrayList<>();
strings.add("one");
strings.add("two");
strings.add("three");

Collection<String> first = new ArrayList<>();
strings.add("one");
strings.add("two");

Collection<String> second = new ArrayList<>();
strings.add("one");
strings.add("four");

System.out.println("Is first contained in strings? " + strings.containsAll(first));
System.out.println("Is second contained in strings? " + strings.containsAll(second));

addAll(): defines the union 并集

Getting a true value does not mean that all the elements of the other collection have been added; it means that at least one has been added.

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Collection<String> strings = new ArrayList<>();
strings.add("one");
strings.add("two");
strings.add("three");

Collection<String> first = new ArrayList<>();
first.add("one");
first.add("four");

boolean hasChanged = strings.addAll(first);

System.out.println("Has strings changed? " + hasChanged);
System.out.println("strings = " + strings);

removeAll(): defines the complement

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Collection<String> strings = new ArrayList<>();
strings.add("one");
strings.add("two");
strings.add("three");

Collection<String> toBeRemoved = new ArrayList<>();
toBeRemoved.add("one");
toBeRemoved.add("four");

boolean hasChanged = strings.removeAll(toBeRemoved);

System.out.println("Has strings changed? " + hasChanged);
System.out.println("strings = " + strings);

retainAll(): defines the intersection 交集

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Collection<String> strings = new ArrayList<>();
strings.add("one");
strings.add("two");
strings.add("three");

Collection<String> toBeRetained = new ArrayList<>();
toBeRetained.add("one");
toBeRetained.add("four");

boolean hasChanged = strings.retainAll(toBeRetained);

System.out.println("Has strings changed? " + hasChanged);
System.out.println("strings = " + strings);

注意上面的并集和交集,Collection本来就是集合,所以能够求并集和交集是理所当然的。

isEmpty()、clear()

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Collection<String> strings = new ArrayList<>();
strings.add("one");
strings.add("two");
if (!strings.isEmpty()) {
    System.out.println("Indeed strings is not empty!");
}
System.out.println("The number of elements in strings is " + strings.size());
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Collection<String> strings = new ArrayList<>();
strings.add("one");
strings.add("two");
System.out.println("The number of elements in strings is " + strings.size());
strings.clear();
System.out.println("After clearing it, this number is now " + strings.size());

size(),Collection相当于容器,用size。而array和String,相当于序列,用length。

toArray

将Collection转为array:

①无入参:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Collection<String> strings = ...; // suppose you have 15 elements in that collection

String[] tabString1 = strings.toArray(new String[] {}); // you can pass an empty array
String[] tabString2 = strings.toArray(new String[15]);   // or an array of the right size

②传参

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Collection<String> strings = List.of("one", "two");

String[] largerTab = {"three", "three", "three", "I", "was", "there"};
System.out.println("largerTab = " + Arrays.toString(largerTab));

String[] result = strings.toArray(largerTab);
System.out.println("result = " + Arrays.toString(result));

System.out.println("Same arrays? " + (result == largerTab));
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Collection<String> strings = List.of("one", "two");

String[] zeroLengthTab = {};
String[] result = strings.toArray(zeroLengthTab);

System.out.println("zeroLengthTab = " + Arrays.toString(zeroLengthTab));
System.out.println("result = " + Arrays.toString(result));

③简写

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Collection<String> strings = ...;

String[] tabString3 = strings.toArray(String[]::new);

Predicate + removeIf 实现有条件的删除,比如删除null和empty的元素:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Predicate<String> isNull = Objects::isNull;
Predicate<String> isEmpty = String::isEmpty;
Predicate<String> isNullOrEmpty = isNull.or(isEmpty);

Collection<String> strings = new ArrayList<>();
strings.add(null);
strings.add("");
strings.add("one");
strings.add("two");
strings.add("");
strings.add("three");
strings.add(null);

System.out.println("strings = " + strings);
strings.removeIf(isNullOrEmpty);
System.out.println("filtered strings = " + strings);

Iterating

for-each

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Collection<String> strings = List.of("one", "two", "three");

for (String element: strings) {
    System.out.println(string);
}

Iterator

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Collection<String> strings = List.of("one", "two", "three", "four");
for (Iterator<String> iterator = strings.iterator(); iterator.hasNext();) {
    String element = iterator.next();
    if (element.length() == 3) {
        System.out.println(element);
    }
}

List

the List interface has 2: ArrayList and LinkedList. As you may guess, the first one is built on an internal array, and the second on a doubly-linked list.

Iterating over the elements of an ArrayList is much faster that over the elements of a LinkedList. There are still cases where a linked list is faster than an array. A doubly-linked list can access its first and last element faster than an ArrayList can. This is the main use case that makes LinkedList better than ArrayList. So if your application needs a Last In, First Out (LIFO, covered later in this tutorial) stack, or a First In, First Out (FIFO, also covered later) waiting queue, then choosing a linked list is probably your best choice.

注意,链表在插入和删除的速度优势已经不在,因为现代硬件、CPU缓存和指针追踪已经很强大。

index

  • add(index, element): inserts the given object at the index, adjusting the index if there are remaining elements
  • get(index): returns the object at the given index
  • set(index, element): replaces the element at the given index with the new element
  • remove(index): removes the element at the given index, adjusting the index of the remaining elements.

The methods indexOf(element) and lastIndexOf(element) return the index of the given element in the list, or -1 if the element is not found.

subList:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
List<String> strings = new ArrayList<>(List.of("0", "1", "2", "3", "4", "5"));
System.out.println(strings);
strings.subList(2, 5).clear();
System.out.println(strings);

addAll(int index, Collection collection)

ListIterator

The ListIterator interface extends the regular Iterator that you already know. It adds several methods to it.

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
List<String> numbers = Arrays.asList("one", "two", "three");
for (ListIterator<String> iterator = numbers.listIterator(); iterator.hasNext();) {
    String nextElement = iterator.next();
    if (Objects.equals(nextElement, "two")) {
        iterator.set("2");
    }
}
System.out.println("numbers = " + numbers);

Set

The Set interface does not bring any new method to the Collection interface. The Collections Framework gives you one plain implementation of the Set interface: HashSet. Internally, a HashSet wraps an instance of HashMap.

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
List<String> strings = List.of("one", "two", "three", "four", "five", "six");
Set<String> set = new HashSet<>();
set.addAll(strings);
set.forEach(System.out::println);

The SortedSet interface adds new methods to Set.

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
SortedSet<String> strings = new TreeSet<>(Set.of("a", "b", "c", "d", "e", "f"));
SortedSet<String> subSet = strings.subSet("aa", "d");
System.out.println("sub set = " + subSet);

注意,subSet仅仅相当于视图。No copy is made, meaning that any change you make to these subsets will be reflected in the set, and the other way round.

NavigableSet

Some methods are overloaded by NavigableSet.

  • headSet()headSet(), and headSet() may take a further boolean arguments to specify whether the limits (toElement or fromElement) are to be included in the resulting subset.

Other methods have been added.

  • ceiling(element), and floor(element) return the greatest element lesser or equal than, or the lowest element greater or equal than the provided element. If there is no such element then null is returned
  • floor(element), and higher(element) return the greater element lesser than, or the lowest element greater than the provided element. If there is no such element then null is returned.
  • pollFirst(), and pollLast() return and removes the lowest or the greatest element of the set.

Furthermore, NavigableSet also allows you to iterate over its elements in descending order. There are two ways to do this.

  • You can call descendingIterator(): it gives you a regular Iterator that traverses the set in the descending order.
  • You can also call descendingSet(). What you get in return is another NavigableSet that is a view on this set and that makes you think you have the same set, sorted in the reversed order.
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
NavigableSet<String> sortedStrings = new TreeSet<>(Set.of("a", "b", "c", "d", "e", "f"));
System.out.println("sorted strings = " + sortedStrings);
NavigableSet<String> reversedStrings = sortedStrings.descendingSet();
System.out.println("reversed strings = " + reversedStrings);

Factory Methods

Java SE 9

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
List<String> stringList = List.of("one", "two", "three");
Set<String> stringSet = Set.of("one", "two", "three");

Java SE 10

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Collection<String> strings = Arrays.asList("one", "two", "three");

List<String> list = List.copyOf(strings);
Set<String> set = Set.copyOf(strings);

Arrays

The Collections Framework has a class called Arrays with about 200 methods to handle arrays. Most of them are implementing various algorithms on arrays, like sorting, merging, searching.

Collections

The Collections Framework comes with another factory class: Collections, with a set of method to manipulate collections and their content.

Finding a Sublist in a List

Two methods locate a given sublist in a bigger list:

Changing the Order of the Elements of a List

  • sort() sorts the list in place. This method may take a comparator as an argument. As usual, if no comparator is provided, then the elements of the list must be comparable. If a comparator is provided, then it will be used to compare the elements. Starting with Java SE 8, you should favor the sort() method from the Listinterface.
  • shuffle() randomly shuffles the elements of the provided list. You can provide yout instance of Random if you need a random shuffling that you can repeat.
  • rotate() rotates the elements of the list. After a rotation the element at index 0 will be found at index 1 and so on. The last elements will be moved to the first place of the list. You can combine subList() and rotate() to remove an element at a given index and to insert it in another place in the list.
  • reverse(): reverse the order of the elements of the list.
  • swap(): swaps two elements from the list. This method can take a list as an argument, as well as a plain array.

Stacks and Queues

Stacks are also called LIFO stacks, where LIFO stands for Last In, First Out. Queues are known as FIFO: First In First Out.

These structures are very simple and gives you three main operations.

  • push(element): adds an element to the queue, or the stack
  • pop(): removes an element from the stack, that is, the youngest element added
  • poll(): removes an element from the queue, that is, the oldest element added
  • peek(): allows you to see the element you will get with a pop() or a poll(), but without removing it from the queue of the stack.

Queues and Stacks

  • the Queue interface models a queue;
  • the Deque interface models a double ended queue (thus the name). You can push, pop, poll and peek elements on both the tail and the head of a Deque, making it both a queue and a stack.

Collection没有Stack接口,栈是通过Deque来定义的。

Implementing Queue and Deque

  • ArrayDeque: which implements both. This implementation is backed by an array. The capacity of this class automatically grows as elements are added. So this implementation always accepts new elements.
  • LinkedList: which also implements both. This implementation is backed by a linked list, making the access to its first and last element very efficient. A LinkedList will always accept new elements.
  • PriorityQueue: that only implements Queue. This queue is backed by an array that keeps its elements sorted by their natural order or by an order specified by a Comparator. The head of this queue is always the least element of the queue with respect to the specified ordering. The capacity of this class automatically grows as elements are added.

Maps

implementations:

  • HashMap
  • LinkedHashMap is a HashMap with an internal structure to keep the key-value pairs ordered. Iterating on the keys or the key-value pairs will follow the order in which you have added your key-value pairs. 这里注意,HashMap是无序的,LinkedHashMap是有序的。
  • IdentityHashMap is a specialized Map that you should only be used in very precise cases. This implementation is not meant to be generally used in application. Instead of using equals() and hashCode() to compare the key objects, this implementation only compares the references to these keys, with an equality operator (==). Use it with caution, only if you are sure this is what you need.

Java SE 9

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Map<Integer, String> map = 
    Map.of(
        1, "one", 
        2, "two",
        3, "three"
    );

The Map defines a member interface: Map.Entry to model a key-value pair. This interface defines three methods to access the key and the values:

putIfAbsent(),如果是null,会替换为默认值:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
for (String key : map.keySet()) {
    map.putIfAbsent(key, -1);
}

如果value是null,可能会报错,比如:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Map<String, Integer> map = new HashMap<>();

map.put("one", 1);
map.put("two", null);
map.put("three", 3);
map.put("four", null);
map.put("five", 5);

for (int value : map.values()) {  // 这里是int
    System.out.println("value = " + value);  // Integer拆包为int时会报NPE
}

getOrDefault(),如果没有key,返回默认值:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Map<Integer, String> map = new HashMap<>();

map.put(1, "one");
map.put(2, "two");
map.put(3, "three");

List<String> values = new ArrayList<>();
for (int i = 0; i < 5; i++) {
    values.add(map.getOrDefault(key,"UNDEFINED"));
}

System.out.println("values = " + values);

流式写法:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
List<String> values =
    IntStream.range(0, 5)
        .mapToObj(key -> map.getOrDefault(key, "UNDEFINED"))
        .collect(Collectors.toList());

System.out.println("values = " + values);

remove(key),remove后返回value,可能为null。

remove(key, value),remove时先判断value存在才移除,返回boolean,true if the key/value pair was removed from the map。

containsKey(key) and containsValue(value) Both methods return true if the map contains the given key or value.

putAll(otherMap) If some keys are present in both maps, then the values of otherMap will erase those of this map.(并集)

  • keySet(): returns an instance of Set, containing the keys defined in the map
  • entrySet(): returns an instance of Set<Map.Entry>, containing the key/value pairs contained in the map
  • values(): returns an instance of Collection, containing the values present in the map.

遍历推荐使用以下方式:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
for (Map.Entry<Integer, String> entry : map.entrySet()) {
    System.out.println("entry = " + entry);
}

Lambda Expressions

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Map<Integer, String> map = new HashMap<>();
map.put(1, "one");
map.put(2, "two");
map.put(3, "three");

map.forEach((key, value) -> System.out.println(key + " :: " + value));
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
Map<Integer, String> map = new HashMap<>();

map.put(1, "one");
map.put(2, "two");
map.put(3, "three");

map.replaceAll((key, value) -> value.toUpperCase());
map.forEach((key, value) -> System.out.println(key + " :: " + value));

compute

The put() methods return the previous value, whereas the compute() methods return the new value.

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
List<String> strings = List.of("one", "two", "three", "four", "five", "six", "seven");
Map<Integer, List<String>> map = new HashMap<>();
for (String word: strings) {
    int length = word.length();
    if (!map.containsKey(length)) {
        map.put(length, new ArrayList<>());
    }
    map.get(length).add(word);
}

map.forEach((key, value) -> System.out.println(key + " :: " + value));

使用putIfAbsent优化:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
for (String word: strings) {
    int length = word.length();
    map.putIfAbsent(length, new ArrayList<>());
    map.get(length).add(word);
}

使用computeIfAbsent优化:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
for (String word: strings) {
    int length = word.length();
    map.computeIfAbsent(length, key -> new ArrayList<>())
       .add(word);
}

merge

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
List<String> strings = List.of("one", "two", "three", "four", "five", "six", "seven");
Map<Integer, String> map = new HashMap<>();
for (String word: strings) {
    int length = word.length();
    map.merge(length, word, 
              (existingValue, newWord) -> existingValue + ", " + newWord);
}

map.forEach((key, value) -> System.out.println(key + " :: " + value));

SortedMap and NavigableMap

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
SortedMap<Integer, String> map = new TreeMap<>();
map.put(1, "one");
map.put(2, "two");
map.put(3, "three");
map.put(5, "five");
map.put(6, "six");

SortedMap<Integer, String> headMap = map.headMap(3);
headMap.put(0, "zero"); // this line is ok
headMap.put(4, "four"); // this line throws an IllegalArgumentException

Here is the code of the add(element) of the HashSet class:

代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
private transient HashMap<E,Object> map;
private static final Object PRESENT = new Object();

public boolean add(E e) {
    return map.put(e, PRESENT)==null;
}

What you can see is that in fact, a hashset stores your object in a hashmap (the transient keyword is not relevant). Your objects are the keys of this hashmap, and the value is just a placeholder, an object with no significance.

hashset 是用hashmap来存的,所以最好不要更新hashset的值(也就是hashmap的key),否则会有意想不到的Bug。

参考资料: The Collections Framework https://dev.java/learn/api/collections-framework/

本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2023-07-01,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
暂无评论
推荐阅读
使用 Python 分析数据得先熟悉编程概念?这个观念要改改了​
AI 开发者按:大多数有抱负的数据科学家是通过学习为开发人员开设的编程课程开始认识 python 的,他们也开始解决类似 leetcode 网站上的 python 编程难题。他们认为在开始使用 python 分析数据之前,必须熟悉编程概念。
AI研习社
2019/07/30
6820
使用 Python 分析数据得先熟悉编程概念?这个观念要改改了​
Python & 机器学习项目集锦 | GitHub Top 45
图片来源:edureka.co 翻译 | 林椿眄 编辑 | Donna [导读]热门资源博客 Mybridge AI 比较了18000个关于Python的项目,并从中精选出45个最具竞争力的项目。我们进行了翻译,在此一并送上。 这份清单中包括了各不相同的20个主题,以及一些资深程序员分享使用Python的经验,值得收藏。Mybridge AI 的排名结合了内部机器评估的内容质量和各种人为因素,包括阅读次数和阅读时长等。 对于Python的初学者,我们推荐以下这些课程: REST API:使用 Python,
用户1737318
2018/06/05
1.8K0
Python Weekly 420
Python 数据科学教程:分析 Stack Overflow 2019 年 开发者调查表 https://www.youtube.com/watch?v=_P7X8tMplsw 在此 Python
爱写bug
2019/10/30
3.3K0
ApacheCN Python 译文集 20211108 更新
Think Python 中文第二版 第一章 编程之路 第二章 变量,表达式,语句 第三章 函数 第四章 案例学习:交互设计 第五章 条件循环 第六章 有返回值的函数 第七章 迭代 第八章 字符串 第九章 案例学习:单词游戏 第十章 列表 第十一章 字典 第十二章 元组 第十三章 案例学习:数据结构的选择 第十四章 文件 第十五章 类和对象 第十六章 类和函数 第十七章 类和方法 第十八章 继承 第十九章 更多功能 笨办法学 Python · 续 中文版 引言 第一部分:预备知识 练习 0:起步 练习
ApacheCN_飞龙
2022/05/07
19.2K0
收藏 | 49个Python学习资源
How to Run Your Python Scripts – Real Python
Python数据科学
2019/07/04
6380
收藏 | 49个Python学习资源
深度学习动手实践:用 TensorFlow 打造“会看”的机器人
(文/Lukas Biewald)物体识别是当前机器学习最热门的方向。计算机早已能够识别如人脸、猫之类的物体,但识别更大范围里的任意物体对人工智能来说仍是难题。也许真正让人惊奇的是人脑在识别物体上表现得如此之好。我们能够毫不费力地将反射频率只有细微不同的光子转换为有关周围世界的十分丰富的信息。机器学习仍在与这些对人类来说十分简单的任务作着苦斗,但在过去几年里已经有了很大进步。 深度学习以及大型公共训练数据集 ImageNet 让物体识别有了令人瞩目的进步。TensorFlow是一个著名的深度学习系统,它能非
新智元
2018/03/23
1.2K0
深度学习动手实践:用 TensorFlow 打造“会看”的机器人
原创 | 整理了32个Python图形化界面库
今天给大家分享了一个我觉得很有趣的东西:图形用户界面(Graphical User Interface,简称 GUI)。
程序员晚枫
2022/05/14
7.6K0
原创 | 整理了32个Python图形化界面库
年前干货 | 数据工程师必备的学习资源(附链接)
导读:本文首先详细介绍了数据工程的职责、与数据科学家之间的差别以及其不同的工作角色,然后重点列出了很多与核心技能相关的的优秀学习资源,最后介绍行业内认可度较高的3种数据工程认证。
Python数据科学
2019/07/19
1.1K0
使用Python究竟可以做什么?下面是Python的3个主要应用
https://medium.com/free-code-camp/what-can-you-do-with-python-the-3-main-applications-518db9a68a78
HuangWeiAI
2019/10/31
9820
别瞎搞!对自己定位不准,看再多机器学习资料也是白搭(附资源)
找资料也是门学问,别抓着机器学习就一拥而上。 作者 | Jason Brownlee 编译 | AI100(ID:rgznai100) 来看个小故事:机器学习火了。 做开发的工程师小张,和做对冲基金的经理老王,都希望在自己的领域加入机器学习。 工程师小张,希望能在自己的软件项目中加入机器学习。而经理老王,则希望在量化交易中,更多借助机器学习的强大,来处理交易,从而占据市场先机。 老王有着多年的编程经验,小张则是多年的开发经验。两人分别让周围的朋友推荐一些书籍,买来自学。 不过,这两人很快就读不下去了,连
AI科技大本营
2018/04/26
8980
别瞎搞!对自己定位不准,看再多机器学习资料也是白搭(附资源)
史上最全,0基础快速入门Python
首先,在学习之前一定会考虑一个问题——Python版本选择 对于编程零基础的人来说,选择Python3。 1、学习基础知识 首先,Python 是一个有条理的、强大的面向对象的程序设计语言。建议从下面
BestSDK
2018/03/01
1.9K0
史上最全,0基础快速入门Python
用 Python 挪车、管理农场,这届 PyCon 有点香
内容提要:一年一度的 PyCon 如期而至,虽然今年的 PyCon US 2020 转战线上,但内容并不逊于往年,依然干货满满。超神经第一时间将内容整理供大家观看,快学起来吧!
HyperAI超神经
2020/04/27
5840
【干货】不容错过的 30 个机器学习视频、教程&课程
导读:下面是 Analytics Vidhya 网站发表的文章,汇集了 2016 年机器学习经典视频、教材和课程,分类整理,初学者、进阶级还是资深研究员,都可以从中发现适合的材料。视频只做了展示截图,观看的话请复制文中的链接哦。 目录 第一部分:机器学习入门 怎样在 6 个月内成为数据科学家 CMU统计机器学习课程 滑铁卢大学机器学习课程 Python 应用机器学习课程 导论:Python 数据科学 SciPy 机器学习导论课 Python Pandas 数据分析 CS50 机器学习课程 Pandas 初
钱塘数据
2018/03/02
2.5K0
【干货】不容错过的 30 个机器学习视频、教程&课程
开发者 AI 转型指南
人工智能…好吧,目前看来,这项尖端技术现在是最流行的,同时也是一项会对人类产生决定性影响的技术。我们对人工智能的力量和它们在几乎任何行业中的有效使用方式感到惊讶。现在的机器人就像 100 年前的飞机。那么接下来会是什么?这个问题引发了许多情绪,从极大的兴趣、鼓励、成为这一过程的组成部分的渴望,到最后的恐惧、困惑和无知。是什么阻止了你参与人工智能的发展,成为了一个被动的旁观者?
AI研习社
2019/08/20
4760
开发者 AI 转型指南
如何高效率系统地学习机器人操作系统ROS1.0和ROS2.0(2018年10月更新)
如何高效率系统地学习机器人操作系统ROS1.0和ROS2.0,博文都是具有时效性的,这主要面向2018年想要学习机器人操作系统的初学者。现在有关机器人操作系统ROS的学习与教程分享,越来越多,有时让人无所适从。
zhangrelay
2019/01/23
1.5K0
转行IT为什么必须学Python?Python的职业发展是什么?
Python这个词估计听烂了..那么为什么那么多小伙伴都在学Python呢?Python到底有啥魔力?学了Python都能干啥?
诸葛青云
2019/04/26
6550
转行IT为什么必须学Python?Python的职业发展是什么?
我们整理了20个Python项目,送给正在求职的你
职场中一贯有“金三银四”、“金九银十”的说法。如果你是一名正在求职或准备跳槽的程序员,不妨趁着这两个月时间好好准备一下。
用户7886150
2021/01/17
2.7K0
使用ChatGPT和GoogleColab学习Python
Google Colab是一个免费的基于Jupyter Notebook的云端环境,可以让您轻松编写、运行和共享Python代码,无需任何设置或安装。
yeedomliu
2023/09/03
4270
使用ChatGPT和GoogleColab学习Python
Python资料推荐 + IDE推荐+经典练手项目(开源免费)
今天给大家带来一批宝贝,大家可以在深夜里独自把玩,也可以在广场上一边遛狗一边和盆友们品鉴。 学习资料 1、入门阶段 The Python Tutorial(https://docs.python.or
用户1332428
2018/03/09
2.5K0
Python资料推荐 + IDE推荐+经典练手项目(开源免费)
学Python 都能用来做什么?
python 是一种通用的编程语言,因为动态类型、解释型、易于阅读和出色的设计原理而闻名。
程序员鑫港
2021/12/20
1.2K0
推荐阅读
相关推荐
使用 Python 分析数据得先熟悉编程概念?这个观念要改改了​
更多 >
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档