- 博客(9)
- 资源 (2)
- 问答 (4)
- 收藏
- 关注
原创 postgreSQL 修改某一字段的值
update info161 set student_name='罗鹏青' where info161.student_name=' 罗鹏青';update 你的表名 set 字段名=你想要设为的值 where 表名.字段='原先那个值'
2018-12-27 16:24:03 16671 3
原创 python 链接 postgreSQL 用psycopy2
就是比较简单,主要记住是cursor执行,cursor取数据就可以了。要记得connect的commitimport psycopg2 as dbcon=db.connect(database='postgres',user='postgres',password='',host='127.0.0.1',port='5432')cur=con.cursor()#use cu...
2018-12-26 14:35:24 459
转载 Excel文件导入到postgre
转载的,她说的挺好的。主要就是把Excel文件转换成csv文件,注意字段要对应就是了。这位兄弟的博客非常感谢。
2018-12-25 18:02:19 605
原创 python xlrd xlwt小实践
我有很多xls文件,前面很多个都是xls文件,后面我放了我的py文件和一个汇总文件。我想把py文件之前的xls的数据汇总到汇总文件里面去。(py文件之前的都是有相同格式的文件,毕竟这样才能批量化。)那些文件的某一行就是我想要的信息。目录看起来是这样的。想起python有xlwt和xlrd,就练习了一下,同时用到的还有osimport xlrdimport xlwt...
2018-12-25 16:29:12 270
原创 关于python使用xlwt报错:PermissionError: [Errno 13] Permission denied: 'Excel_Workbook.xls'
……其实没什么复杂的。是因为你正在打开这个xls文件,然后你又在程序中打开了这个文件,然后系统给你permission denied太对了。对到爆炸…………………………(我真是个弱智……)...
2018-12-24 17:51:41 6372 5
原创 flask 上传文件demo(未考虑安全因素)
为了方便,就把上传的文件放在项目的static文件里面。文件目录flaskr static templates hello.html flaskr.py hello.html<html> <head> <title>Please upload a file</title> </head>...
2018-12-17 11:24:13 408
原创 leetcode 680(Python 3)
题目是,给定一个字符,两种情况返回true1.本身就是回文串(palindrome)2.删除任意一个字符后,这个串成为回文串。 1.朴素方法:轮着删字符,time limit exceededclass Solution: def validPalindrome(self, s): """ :type s: str ...
2018-12-10 13:52:50 409
原创 BFS poj 3948 简单bfs,注意打印路径的方法
#include <bits/stdc++.h>using namespace std;const int maxn=10;const int dir[4] [2]={1,0,0,1,-1,0,0,-1};struct p{ int a,b; p(int A,int B):a(A),b(B){} p(){}};int maze[maxn][maxn];que...
2018-12-08 14:32:35 308
原创 排序算法集合
就按照《算法导论》里面的顺序写吧 。原理都不讲了,只是贴一下代码,给参考。其实书上也写得很清楚,我只是用C++实现出来而已。1.归并排序(merge sort)#include <iostream>#include <ctime>#include <cstdlib>#include <cstring>#include &l...
2018-12-03 23:55:08 176
hive中能set变量保存select出来的一个值吗
2021-09-26
vscode远程,tensorboard在vscode中无法显示,如何debug?
2021-07-02
torch多gpu使用分配问题,有无一套cpu gpu都通用的代码?
2021-05-22
请假下各位老铁 tkinter怎么用for循环显示图片?
2020-04-15
TA创建的收藏夹 TA关注的收藏夹
TA关注的人