Python
文章平均质量分 68
lkangkang
这个作者很懒,什么都没留下…
展开
-
CodeWars: [5 kyu] Perimeter of squares in a rectangle
The drawing shows 6 squares the sides of which have a length of 1, 1, 2, 3, 5, 8. It's easy to see that the sum of the perimeters of these squares is : 4 * (1 + 1 + 2 + 3 + 5 + 8) = 4 * 20 = 80//给出了...原创 2018-09-16 11:34:39 · 756 阅读 · 0 评论 -
CodeWars:[5 kyu] The Hashtag Generator
The marketing team is spending way too much time typing in hashtags.Let's help them with out own Hashtag Generator!Here's the deal: //将字符串去掉空格,以‘#’打头,并且大写每个单词的首字母。 It must start with a hashta...原创 2018-09-17 22:00:20 · 382 阅读 · 0 评论 -
CodeWars:Double Cola
Sheldon, Leonard, Penny, Rajesh and Howard are in the queue for a "Double Cola" drink vending machine; there are no other people in the queue. The first one in the queue (Sheldon) buys a can, drinks i...原创 2018-09-13 14:33:01 · 431 阅读 · 0 评论 -
CodeWars:Decode the Morse code
Part of Series 1/3This kata is part of a series on the Morse code. After you solve this kata, you may move to the next one.In this kata you have to write a simple Morse code decoder. While the Mo...原创 2018-09-14 10:14:53 · 1119 阅读 · 1 评论 -
CodeWars:What's a Perfect Power anyway?
A perfect power is a classification of positive integers:In mathematics, a perfect power is a positive integer that can be expressed as an integer power of another positive integer. More formally, ...原创 2018-09-15 11:53:39 · 828 阅读 · 0 评论 -
Tensorflow1.8用keras实现MNIST数据集手写字体识别例程
import tensorflow as tftf.enable_eager_execution()eager是新版本加入的动态图,可以直接计算出结果而不用使用Session。同时也支持微分操作。class DataLoader(): def __init__(self): mnist = tf.contrib.learn.datasets.load_data...原创 2018-10-01 11:22:34 · 1467 阅读 · 1 评论 -
pytorch中RNN,LSTM,GRU使用详解
RNNCellnn.RNNCell(input_size, hidden_size, bias=True, nonlinearity=‘tanh’)h′=tanh(Wihx+bih+Whhh+bhh)h^{\prime}=\tanh \left(W_{i h} x+b_{i h}+W_{h h} h+b_{h h}\right)h′=tanh(Wihx+bih+Whhh+bhh)...原创 2019-05-04 16:16:53 · 27867 阅读 · 7 评论 -
VScode远程调试remote development
VScode insider版本的remote development原创 2019-05-06 22:57:53 · 14044 阅读 · 0 评论