Flashield's Blog

Just For My Daily Diary

Flashield's Blog

Just For My Daily Diary

Author : ZhuangBin

04.course-lists【列表】

Lists Lists in Python represent ordered sequences of values. Here is an example of how to create them: 列表 Python 中的列表表示有序的值序列。 以下是如何创建它们的示例: primes = [2, 3, 5, 7] We can put other types of things in lists: 我们可以将其他类型的事物放入列表中: planets = ['Mercury', 'Venus', 'Earth', 'Mars', 'Jupiter', 'Saturn', 'Uranus', 'Neptune'] We can even make a list of […]

exercise-booleans-and-conditionals【练习:布尔值及条件语句】

This notebook is an exercise in the Python course. You can reference the tutorial at this link. Try It Yourself Think you are ready to use Booleans and Conditionals? Try it yourself and find out. To get started, run the setup code below before writing your own code (and if you leave this notebook and […]

booleans-and-conditionals【布尔值及条件语句】

Booleans Python has a type of variable called bool. It has two possible values: True and False. 布尔值 Python 有一种称为bool的变量类型。 它有两个可能的值:True和False。 x = True print(x) print(type(x)) True Rather than putting True or False directly in our code, we usually get boolean values from boolean operators. These are operators that answer yes/no questions. We’ll go through […]

exercise-functions-and-getting-help【练习:函数】

This notebook is an exercise in the Python course. You can reference the tutorial at this link. Try It Yourself Functions are powerful. Try writing some yourself. As before, don’t forget to run the setup code below before jumping into question 1. 自己尝试一下 函数功能强大。 尝试自己写一些。 和以前一样,在进入问题 1 之前,不要忘记运行下面的设置代码。 # SETUP. You don't need to worry […]

functions-and-getting-help【函数和获取帮助】

You’ve already seen and used functions such as print and abs. But Python has many more functions, and defining your own functions is a big part of python programming. In this lesson, you will learn more about using and defining functions. 您已经看到并使用了诸如print和abs之类的函数。但是Python具有更多功能,定义自己的函数是Python编程的重要组成部分。 在本课程中,您将了解有关使用和定义函数的更多信息。 Getting Help You saw the abs function in the previous tutorial, but […]

Exercise: Syntax, Variables, and Numbers【练习语法变量和数字】

Exercises Welcome to your first set of Python coding problems! If this is your first time using Kaggle Notebooks, welcome! Notebooks are composed of blocks (called "cells") of text and code. Each of these is editable, though you’ll mainly be editing the code cells to answer some questions. To get started, try running the code […]

hello-python

This course covers the key Python skills you’ll need so you can start using Python for data science. The course is ideal for someone with some previous coding experience who wants to add Python to their repertoire. (If you’re a first-time coder, you are encouraged to check out our Intro to Programming course, which is […]

2023年05月08日

2023/05/08 17:09 昨天又看了下之前爬漫画的程序,程序太久不用,已经失效了。主要是两个方面,一个是数据库,原来的数据库居然是放在了原有的云平台上,现在已经下线了,也不打算再做迁移了。后期更改数据库类型试一下,使用mongodb来做数据的承载。 另一个就是那个网站居然上了Cloudflare用来反扒,这个就有点恶心了,参考了两个用来绕过的方案,软件直接绕cf-ray有点难度,要么就是要花钱。通过另外一种方案试了下,找到原站的源IP地址。测试了一下,应该有戏。 查找隐藏记录的网站:https://search.censys.io/,还挺好使的。 参考文档: https://scrapeops.io/web-scraping-playbook/how-to-bypass-cloudflare/ https://www.zenrows.com/blog/bypass-cloudflare-python –这篇用处不大 主站可以绕,但是cdn的文件位置绕不过去……还需要进一步测试。还好这个站不是很复杂,是相同的主机地址,可以比较方便的绕过。

2023年04月28日

2023/04/28 13:47 昨天把PaaS平台上的Rocket.Chat给重新处理了一下,更换了最新的6.x的版本,主要是原来的发布版本找不到了,原来的文件不知道怎么回事,启动的时候又报错了。更新了版本之后,通过更新node版本,结合昨天对mongodb的处理,把有ReplicaSet控制的mongodb给启动起来了。 然后昨晚的时候,又想着通过snap把原有的Server给升级上去,但是升级失败了。主要的问题有两个,一个是snap中自带caddy没有办法自行签署证书,然后就启动失败了。把caddy的服务给停掉了,之后应用就正常了。 另外还有一个就是升级到6.x的版本时,应用启动出现了错误,说是无法新建索引,因为原来的索引存在了。然后,通过mongosh学会了查找索引,然后删除某一个索引,然后删除表上的所有索引。接着应用也就正常了。 最终的使用环境内,只是把caddy给停用了,毕竟现在有nginx,而且申请证书之类的一切都正常的,暂时没有时间再去研究caddy了,虽说可能用起来可能比nginx更好一些。 具体的处理步骤以及脚本记录如下:Rocket.Chat 关于这个应用的基本维护工作也就到这步了,通过这个学了点nodejs、snap以及mongodb的基本操作处理。 后面继续把重心转去量化计算。 同时,发现自己更适合坐硬板凳,换了一个硬靠背的凳子之后,主要有个手托,然后比之前更舒服一些,天气也开始热起来了。

2023年04月27日

2023/04/27 08:42 今天把之前的欠账清一清,宽带那里的月度绩效调整、mongodb的研究学习并投入使用。 mongodb使用起来感觉还是很方便的,特别是pymongo的方法。如果不是用来做复杂的分析的话,不需要写SQL语句,适合用来做编程。就是自己改的那个chatgpt_telegram_bot的项目不知道是放在哪里了……

Scroll to top