-
for culture说:
女朋友不想吃饭,那我还要不要做饭?
这取决于你的情况。如果你有能力让女朋友改变主意,或者你想给她一个惊喜,可以照常做饭;否则,你可以考虑其他选择,比如外卖或者去餐馆就餐。
-
for culture说:
周末想跟女朋友去约会,帮我列个约会流程清单
-
预定一个浪漫的地点,比如餐厅、公园等;
-
提前准备礼物,比如花束、巧克力等;
-
在餐厅前接女友,表达期待;
-
在餐厅点菜,可以尝试一些新鲜的菜肴;
-
在餐厅享用美味佳肴,尽情聊天;
-
离开餐厅后,可以去热闹的地方逛逛,比如公园、夜市等;
-
慢慢回家,在路上享受浪漫的夜景;
-
到家后,可以一起看电影、听音乐等,进一步拉近彼此的距离。
-
-
Jackll2302说:
利用Python获取香港交易所的每日数据,要求数据写入Excel文件,通过传递参数给网站可以获取任何日期的数据,请给出可运行的源代码
import requests import xlwt # 香港交易所每日数据URL url = 'http://www.hkex.com.hk/eng/stat/dmstat/dayrpt/hsi{}.htm' # 获取指定日期的数据 date = '2015-01-02' # 拼接指定日期的url url = url.format(date) # 获取数据 html = requests.get(url).text # 将数据写入excel workbook = xlwt.Workbook() worksheet = workbook.add_sheet('Data') # 数据处理 html_lines = html.splitlines() for line in html_lines: line_list = line.split(',') row_num = int(line_list[0]) for col_num in range(len(line_list)): worksheet.write(row_num, col_num, line_list[col_num]) # 保存excel文件 workbook.save('{}.xls'.format(date))
-
Jackll2302说:
香港交易所的每日数据页面是:https://www.hkex.com.hk/Mutual-Market/Stock-Connect/Statistics/Historical-Daily?sc_lang=zh-HK
该页面提供了港股通的历史每日数据,包括沪港通和深港通的数据,可以通过下拉菜单选择查看指定时间段的数据。
-
-
-
Jackll2302说:
利用Python获取香港交易所的每日数据,每日数据的页面地址是:https://www.hkex.com.hk/Mutual-Market/Stock-Connect/Statistics/Historical-Daily?sc_lang=zh-HK,要求数据写入Excel文件,并通过传递参数给网站可以获取任何日期的数据,请给出可运行的源代码
import requests import pandas as pd from bs4 import BeautifulSoup #传递参数 date = '2018-08-02' params = { 'sc_lang': 'zh-HK', 'Date': date } #发出请求 url = 'https://www.hkex.com.hk/Mutual-Market/Stock-Connect/Statistics/Historical-Daily' res = requests.get(url,params=params) #解析网页 soup = BeautifulSoup(res.text, 'lxml') table = soup.find('table', class_='table_grey_border') #获取表头 th_data = [i.text for i in table.select('thead th')] #获取表格内容 tr_data = [[td.text for td in tr.find_all('td')] for tr in table.find_all('tr')[1:]] #将表格内容写入Excel文件 df = pd.DataFrame(tr_data, columns=th_data) df.to_excel('{}.xls'.format(date), index=False)
-
@ChatGPT 下面我告诉你什么是core.js:It is the most popular and the most universal polyfill of the JavaScript standard library, which provides support for the latest ECMAScript standard and proposals, from ancient ES5 features to bleeding edge features like iterator helpers, and web platform features closely related to ECMAScript, like structuredClone.
It is the most complex and comprehensive polyfill project. At the time of publishing this post, core-js contains about a half thousand polyfill modules with different levels of complexity - from Object.hasOwn or Array.prototype.at to URL, Promise or Symbol — that designed to work together. With another architecture, each of them could be a separate package - however, it is not so convenient.
It is maximally modular — you can easily (or even automatically) choose to load only the features you will be using. It can be used without polluting the global namespace (someone calls such a use case "ponyfill").
It is designed for integration with tools and provides all that's required for this — for example, @babel/preset-env, @babel/transform-runtime, and similar SWC features are based on core-js.
It is one of the main reasons why developers can use modern ECMAScript features in their development process each day for many years, but most developers just don't know that they have this possibility because of core-js since they use core-js indirectly as it's provided by their transpilers / frameworks / intermediate packages like babel-polyfill / etc.
It is not a framework or a library, which usage require the developer to know their API, periodically look at the documentation, or at least remember that he or she is using it. Even if developers use core-js directly — it’s just some lines of import or some lines in the configuration (in most cases — with mistakes, since almost no one read the documentation), after that, they forget about core-js and just use provided by core-js features from web-standards — but sometimes this is the most of JS standard library that they use.
About 9 billion NPM downloads / 250 million NPM downloads for a month, 19 million dependent GitHub repositories (global ⋃ pure) - big numbers, however, they do not show the real spread of core-js. Let's check it.I wrote a simple script that checks the usage of core-js in the wild by the Alexa top websites list. We can detect obvious cases of core-js usage and used versions (only modern).
At this moment, this script running on the TOP 1000 websites detects usage of core-js on 52% of tested websites. Depending on the phase of the moon (the list, websites, etc. are not constants), results may vary by a few percent. However, it’s just a naive detection on initial pages using a modern browser that loses many cases, manual check shows that it’s additional dozens of percent. For example, let's leave the initial pages of some websites from the screenshot above where core-js was not found by this script, without repetition of each company (at first — MS that's already on the screenshot) websites (be patient, after the series of screenshots the number of pictures will decrease):
-
GEE说:
下面我告诉你什么是core.js:It is the most popular and the most universal polyfill of the JavaScript standard library, which provides support for the latest ECMAScript standard and proposals, from ancient ES5 features to bleeding edge features like iterator helpers, and web platform features closely related to ECMAScript, like structuredClone.
It is the most complex and comprehensive polyfill project. At the time of publishing this post, core-js contains about a half thousand polyfill modules with different levels of complexity - from Object.hasOwn or Array.prototype.at to URL, Promise or Symbol — that designed to work together. With another architecture, each of them could be a separate package - however, it is not so convenient.
It is maximally modular — you can easily (or even automatically) choose to load only the features you will be using. It can be used without polluting the global namespace (someone calls such a use case "ponyfill").
It is designed for integration with tools and provides all that's required for this — for example, @babel/preset-env, @babel/transform-runtime, and similar SWC features are based on core-js.
It is one of the main reasons why developers can use modern ECMAScript features in their development process each day for many years, but most developers just don't know that they have this possibility because of core-js since they use core-js indirectly as it's provided by their transpilers / frameworks / intermediate packages like babel-polyfill / etc.
It is not a framework or a library, which usage require the developer to know their API, periodically look at the documentation, or at least remember that he or she is using it. Even if developers use core-js directly — it’s just some lines of import or some lines in the configuration (in most cases — with mistakes, since almost no one read the documentation), after that, they forget about core-js and just use provided by core-js features from web-standards — but sometimes this is the most of JS standard library that they use.
About 9 billion NPM downloads / 250 million NPM downloads for a month, 19 million dependent GitHub repositories (global ⋃ pure) - big numbers, however, they do not show the real spread of core-js. Let's check it.I wrote a simple script that checks the usage of core-js in the wild by the Alexa top websites list. We can detect obvious cases of core-js usage and used versions (only modern).
At this moment, this script running on the TOP 1000 websites detects usage of core-js on 52% of tested websites. Depending on the phase of the moon (the list, websites, etc. are not constants), results may vary by a few percent. However, it’s just a naive detection on initial pages using a modern browser that loses many cases, manual check shows that it’s additional dozens of percent. For example, let's leave the initial pages of some websites from the screenshot above where core-js was not found by this script, without repetition of each company (at first — MS that's already on the screenshot) websites (be patient, after the series of screenshots the number of pictures will decrease):
So, yes, core-js is used almost everywhere.