Kivy 从memory 读取image
摘要:借助PIL来处理的图片数据 之后,用kivy.core.image.Image处理数据
阅读全文
matplotlib 坑
摘要:1 archlinux里安装好matplotlib之后一定要安装python-cario pacman -S python-cairo
阅读全文
268. Missing Number
摘要:Given an array containing n distinct numbers taken from 0, 1, 2, ..., n, find the one that is missing from the array. Example 1: Input: [3,0,1] Output
阅读全文
283. Move Zeroes
摘要:Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements. Example: Input:
阅读全文
665. Non-decreasing Array
摘要:Given an array with n integers, your task is to check if it could become non-decreasing by modifying at most 1 element. We define an array is non-decr
阅读全文
119. Pascal's Triangle II
摘要:Given a non-negative index k where k ≤ 33, return the kth index row of the Pascal's triangle. Note that the row index starts from 0. In Pascal's trian
阅读全文
66. Plus One
摘要:Given a non-empty array of digits representing a non-negative integer, plus one to the integer. The digits are stored such that the most significant d
阅读全文
830. Positions of Large Groups
摘要:In a string S of lowercase letters, these letters form consecutive groups of the same character. For example, a string like S = "abbxxxxzyy" has the g
阅读全文
26. Remove Duplicates from Sorted Array
摘要:Given a sorted array nums, remove the duplicates in-place such that each element appear only once and return the new length. Do not allocate extra spa
阅读全文
27. Remove Element
摘要:Given an array nums and a value val, remove all instances of that value in-place and return the new length. Do not allocate extra space for another ar
阅读全文
566. Reshape the Matrix
摘要:In MATLAB, there is a very useful function called 'reshape', which can reshape a matrix into a new one with different size but keep its original data.
阅读全文
189. Rotate Array
摘要:Rotate an array of n elements to the right by k steps. For example, with n = 7 and k = 3, the array [1,2,3,4,5,6,7] is rotated to [5,6,7,1,2,3,4]. Not
阅读全文
35. Search Insert Position
摘要:Given a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if it were inserted in or
阅读全文
581. Shortest Unsorted Continuous Subarray
摘要:Given an integer array, you need to find one continuous subarray that if you only sort this subarray in ascending order, then the whole array will be
阅读全文
414. Third Maximum Number
摘要:Given a non-empty array of integers, return the third maximum number in this array. If it does not exist, return the maximum number. The time complexi
阅读全文
1. Two Sum
摘要:Given an array of integers, return indices of the two numbers such that they add up to a specific target. You may assume that each input would have ex
阅读全文
766. Toeplitz Matrix
摘要:A matrix is Toeplitz if every diagonal from top-left to bottom-right has the same element. Now given an M x N matrix, return True if and only if the m
阅读全文
leetcode 167 two sum II
摘要:167. Two Sum II - Input array is sorted Given an array of integers that is already sorted in ascending order, find two numbers such that they add up t
阅读全文
scrapy 琐碎的东西
摘要:1、深度指定 DEPTH_LIMIT=1 2、常用命令 scrapy startproject name scrapy genspider name name.com scrapy crawl name 3、结构 4、目录 5、多pipeline情况 权重高的必须在process_item()里 r
阅读全文
代理ip收集
摘要:http://www.66ip.cn/ http://www.kuaidaili.com/free/inha/ http://www.xicidaili.com/nn/
阅读全文
python print 美化
摘要:本来是按照百度搜到的教程来为print输出添加颜色 然后bing了下,已经有封装好的包了,就是python-blessings 效果如图 API网址:https://blessings.readthedocs.io/en/latest/
阅读全文
Archlinux 遇到的坑
摘要:1、系统更新之后pip炸了,解决方案是用官方的get-pip安装,同时配置文件,避免使用sudo安装 2、grub不如syslinux配置快捷,入了syslinux的坑 3、平铺式桌面搭配快捷键,High了,窗口虽多,可用快捷键随时全屏、移动、或是选择窗口。
阅读全文