随笔分类 -  python

上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 25 下一页
python学习
摘要:import cv2 #取得指定图像或视频鼠标位置的颜色特征 from pylab import * from PIL import Image import sys import copy user_input = int(input("如果标视频,请输入1 ;如果标图片,请输入2: ")) if 阅读全文
posted @ 2023-03-23 10:07 myrj 阅读(130) 评论(0) 推荐(0)
摘要:#!/usr/bin/env python # coding: utf-8 # @author: sSWans # @file: main.py # @time: 2018/1/11 15:54 import os import random from _datetime import dateti 阅读全文
posted @ 2023-03-22 13:37 myrj 阅读(72) 评论(0) 推荐(0)
摘要:#!/usr/bin/python3.6 # -*- coding: utf-8 -*- ''' @ Copyright (C) 2019 @ @ env stetup:pip3 install opencv-python @ @ 免费知识星球:[一番码客-积累交流](https://t.zsxq. 阅读全文
posted @ 2023-03-22 12:57 myrj 阅读(173) 评论(0) 推荐(0)
摘要:首先在python里检查,也是大家用的最多的方式,检查GPU是否可用(但实际并不一定真的在用) import torch torch.cuda.is_available() False(显示结果:不可用) True(显示结果:可用) import torch # setting device on 阅读全文
posted @ 2023-03-22 08:19 myrj 阅读(2972) 评论(0) 推荐(0)
摘要:from rembg import remove from PIL import Image input_path="tuurenwu.png" out="mca.png" input=Image.open(input_path) outa=remove(input) outa.save(out) 阅读全文
posted @ 2023-03-21 07:15 myrj 阅读(118) 评论(0) 推荐(0)
摘要:Python 数据库名为 dataset,将关系型数据库包装为 NoSQL 使用方式,非常方便快捷。底层基于 SQLAlchemy,因此支持多种数据库 SQLite、PostgreSQL、MySQL。dataset.readthedocs.io/en/latest/ ​​​ 阅读全文
posted @ 2023-03-20 20:37 myrj 阅读(44) 评论(0) 推荐(0)
摘要:https://modelscope.cn/models/damo/text-to-video-synthesis/summary?continueFlag=316e474d46439886c7d26c850c8c9d37 from modelscope.pipelines import pipel 阅读全文
posted @ 2023-03-20 13:35 myrj 阅读(186) 评论(0) 推荐(0)
摘要:aak="adb -s {0} shell am start --user 0 -n com.kuaishou.nebula/com.yxcorp.gifshow.HomeActivity".format(sjh) aak="adb -s {0} shell am start --user 999 阅读全文
posted @ 2023-03-20 08:23 myrj 阅读(293) 评论(0) 推荐(0)
摘要:>>> jiance(sjh) ACTIVITY MANAGER ACTIVITIES (dumpsys activity activities) Display #0 (activities from top to bottom): Stack #190: type=standard mode=f 阅读全文
posted @ 2023-03-20 07:31 myrj 阅读(76) 评论(0) 推荐(0)
摘要:import pandas as pd from sqlalchemy import create_engine # read in the Statal file df = pd.read_stata('1.dta') # create a connection to the MySQL data 阅读全文
posted @ 2023-03-19 20:56 myrj 阅读(44) 评论(0) 推荐(0)
摘要:下载https://github.com/mli/autocut 解压缩:pip install git+https://github.com/mli/autocut.git D:\c-理论\tool\autocut-main\autocut-main> python setup.py instal 阅读全文
posted @ 2023-03-19 20:26 myrj 阅读(158) 评论(0) 推荐(0)
摘要:import pandas as pd df=pd.read_excel('bb.xlsx') column = list(df.columns) for i in range(0, len(df)): print(df.iloc[i][column[0]],df.iloc[i][column[1] 阅读全文
posted @ 2023-03-19 14:57 myrj 阅读(906) 评论(0) 推荐(0)
摘要:import pandas as pd file=pd.read_excel('bb.xlsx') column = list(file.columns) for i in range(len(file)): x = [file.iloc[i][x] for x in range(len(colum 阅读全文
posted @ 2023-03-19 14:45 myrj 阅读(174) 评论(0) 推荐(0)
摘要:import pdfplumber import pandas as pd from PIL import Image pdf = pdfplumber.open("xue1.pdf") #Load page_0 p0 = pdf.pages[0] table = p0.extract_table( 阅读全文
posted @ 2023-03-19 12:13 myrj 阅读(28) 评论(0) 推荐(0)
摘要:* 加载一个Stata数据集 sysuse auto * 在Stata中执行Python代码 python: import pandas as pd import pymysql import stata_setup stata_setup.config("c:\python37\python.ex 阅读全文
posted @ 2023-03-19 07:27 myrj 阅读(69) 评论(0) 推荐(0)
摘要://stata调用python,引用py文件中的函数 //stata中设置python路径 set python_exec d:\python37\python.exe //stata中调用python python //引入函数 from myfunction1 import add_number 阅读全文
posted @ 2023-03-18 10:35 myrj 阅读(263) 评论(0) 推荐(0)
摘要:MD5是一种不可逆的哈希算法,这意味着您不能直接从MD5哈希值“解密”出原始数据。然而,您可以尝试使用暴力破解或查找表(如彩虹表)来猜测原始数据。 暴力破解是一种尝试所有可能的输入组合,直到找到与给定哈希值匹配的输入的方法。这种方法在密码空间较小的情况下可能有效,但在密码空间较大的情况下可能非常耗时 阅读全文
posted @ 2023-03-17 18:27 myrj 阅读(3240) 评论(0) 推荐(0)
摘要:import hashlib def sha256_encrypt(data): sha256 = hashlib.sha256() sha256.update(data.encode('utf-8')) return sha256.hexdigest() data = "Hello, world! 阅读全文
posted @ 2023-03-16 22:17 myrj 阅读(212) 评论(0) 推荐(0)
摘要:>>> attr={"class":"avdata card","data-hash-id":"data-hash-id"} >>> attr.keys() dict_keys(['class', 'data-hash-id']) >>> list(attr.keys()) ['class', 'd 阅读全文
posted @ 2023-03-09 16:43 myrj 阅读(62) 评论(0) 推荐(0)
摘要:Python 调用 js 文件,报 execjs._exceptions.ProgramError: SyntaxError: 缺少 ';' 错误 原因:execjs 默认使用了windows的JScript 引擎导致的,我们可以在python命令行中查看 import execjs execjs. 阅读全文
posted @ 2023-03-07 09:21 myrj 阅读(7399) 评论(0) 推荐(0)

上一页 1 ··· 6 7 8 9 10 11 12 13 14 ··· 25 下一页