This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from bs4 import BeautifulSoup | |
| import requests | |
| from PIL import image | |
| import pytesseract | |
| mysession = requests.Session() | |
| url = 'http://110.249.223.91/hbhb/Default.aspx' | |
| r = mysession.get(url,timeout=60*4) | |
| c = r.content | |
| mysoup = BeautifulSoup(c) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| import sys | |
| reload(sys) | |
| sys.setdefaultencoding('utf-8') | |
| # unsplash 全站下载脚本 | |
| # 请先安装 requests ,BeautifulSoup | |
| # pip install requests beautifulsoup4 | |
| # 运行 python unsplash.py | |
| # 输入最小页数和最大页数 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requesocks as requests | |
| session = requests.session() | |
| session.proxies = {'http': 'socks5://127.0.0.1:7070','https': 'socks5://127.0.0.1:7070'} | |
| s=session.get('https://www.facebook.com') | |
| print s |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class models_a(models.Model): | |
| value_a = models.FloatField(default=0.0) | |
| value_a_1 = models.FloatField(default=0.0) | |
| class models_b(models.Model): | |
| foreign = models.ForeignKey(models_a) | |
| value_b = models.FloatField(default=0.0) | |
| ####进行更新model_b里面的字段value_b,让他的值等于models_a里面的value_a和value_a_1和value_b这三个值之和 | |
| results = models_b.objects.exclude(value_b=0.0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import requests | |
| import datetime | |
| from bs4 import BeautifulSoup | |
| def get_posts_by_day(date_str) | |
| url='http://toutiao.io/prev/%s' % date_str | |
| r=requests.get(url) | |
| c=r.content | |
| soup = BeautifulSoup(c) | |
| posts=soup.find_all('div', 'post') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!-- | |
| English: | |
| This example show how do a simple MVVM code with html+js | |
| You can change the data in design and the object person will be changed, you can too make the change by the console(js) of the property from the object and the visual will be changed. | |
| Portugues: | |
| Esse exemplo mostra como fazer um simples MVVM framework com HTML e JS | |
| Você pode alterar os dados visualmente e o objeto pessoa vai ser alterado e também se você fizer a alteração via console da propriedade o visual será modificado. | |
| --> | |
| <!DOCTYPE html> | |
| <html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.usersapi; | |
| import com.alibaba.fastjson.JSONArray; | |
| import java.io.InputStream; | |
| import java.util.Comparator; | |
| import java.util.Date; | |
| import java.util.List; | |
| import java.util.Objects; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # V 0.0.3 | |
| # 2021-05-05 | |
| # Shell script to create a very simple Django Ninja project. | |
| # This script require Python 3.x and pyenv | |
| # Settings.py is config to Django 3.1.5 and Django Ninja 0.12.1 | |
| # The project contains: | |
| # Settings config | |
| # Admin config |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // ContentView.swift | |
| // Example-iOS | |
| // | |
| // Created by Alex.M on 26.05.2022. | |
| // | |
| import SwiftUI | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // ContentView.swift | |
| // Example-iOS | |
| // | |
| // Created by Alex.M on 26.05.2022. | |
| // | |
| import SwiftUI | |
| class Visible: ObservableObject { |