码迷,mamicode.com
首页 >  
搜索关键字:def    ( 28626个结果
leetcode_20.:有效的括号
给定一个只包括 '(',')','{','}','[',']' 的字符串,判断字符串是否有效。 有效字符串需满足: 左括号必须用相同类型的右括号闭合。 左括号必须以正确的顺序闭合。 注意空字符串可被认为是有效字符串。 示例 1: 输入: "()" 输出: true 示例 2: 输入: "()[]{} ...
分类:其他好文   时间:2020-11-24 12:14:38    阅读次数:7
一顿操作猛如虎,一看头发。。。
#include <math.h> #include <stdio.h> int main() { float a, b, c, x1, x2; float delta, real, imag; printf("Enter a, b, c: "); while(scanf("%f%f%f", &a, ...
分类:其他好文   时间:2020-11-24 12:14:01    阅读次数:6
接手项目代码
原项目代码如下 def data_filter(src=r'D:\material\data.json',des=r'D:\material\pro_data.json',db = r'D:\material\tnbs.db'): fw = open(des, 'w', encoding='utf- ...
分类:其他好文   时间:2020-11-23 12:38:04    阅读次数:5
Pytest学习(十) - parametrize、fixture、request的混合使用
一、前言 上篇文章有提及pytest.mark.parametrize的使用,这次在此基础上结合fixture和request再做个延伸。 二、传单个参数 即一个参数一个值,示例代码如下: # 传单个参数 @pytest.fixture() def getuser(request): user = ...
分类:其他好文   时间:2020-11-23 12:20:56    阅读次数:4
NLP自然语言处理
老实来讲这课我一头雾水满脑袋问号 import numpy as np from collections import Counter counttime = 0 #统计训练语料:spam 和 ham 各自评论总数,单词频率 def seperate(filename): hamcnt = Coun ...
分类:编程语言   时间:2020-11-23 12:07:30    阅读次数:7
【Flutter 1-8】Flutter教程Dart语言——控制语句
Dart语言的控制语句跟其他常见语言的控制语句是一样的,基本如下: - **if 和 else** - **for 循环** - **while 和 do-while 循环** - **break 和 continue** - **switch 和 case** - **assert** ...
分类:编程语言   时间:2020-11-23 12:01:42    阅读次数:8
[LeetCode] 17. Letter Combinations of a Phone Number(手机的 T9 输入法)
Difficulty: Medium Related Topics: String, Backtracking Link: https://leetcode.com/problems/letter-combinations-of-a-phone-number/ Description Given a ...
分类:移动开发   时间:2020-11-21 12:45:15    阅读次数:31
Apriori算法 源码
Apriori算法 源码 具体原理先鸽了 下面是代码 view code #coding:utf-8 # generate data def genData(): return [['牛奶','啤酒','尿布'], ['牛奶','面包','黄油'], ['牛奶','尿布','饼干'], ['面包', ...
分类:编程语言   时间:2020-11-21 12:33:25    阅读次数:20
word编辑
fromdocximportDocumentfromdocx.enum.styleimportWD_STYLE_TYPEfromdocx.enum.textimportWD_ALIGN_PARAGRAPHimportosclassWord:definit(self):passself.doc=Document()defwrite_word(self):‘‘‘主函数‘‘‘titles=input(‘
分类:其他好文   时间:2020-11-21 12:00:03    阅读次数:7
后台中src-router-index.js文件详情
后台中src-router-index.js文件详情 import Vue from 'vue' import VueRouter from 'vue-router' // import Login from '../components/Login.vue' const Login = () => ...
分类:Web程序   时间:2020-11-20 11:59:20    阅读次数:15
28626条   上一页 1 ... 81 82 83 84 85 ... 2863 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!