futursolo's repos on GitHub
Rust · 383 watchers
stylist-rs
A CSS-in-Rust styling solution for WebAssembly Applications
JavaScript · 36 watchers
furtherland
A Light-weight Blog Platform, running on Futures Field.
Rust · 23 watchers
stellation
A framework experience for Yew.
Rust · 8 watchers
bounce
The uncomplicated Yew State management library
Python · 7 watchers
sketchbook
A template engine built for asyncio with async/await syntax support.
Rust · 5 watchers
furtherland-www
My personal blog.
5 watchers
prokio
An asynchronous runtime compatible with WebAssembly and non-WebAssembly targets.
Rust · 5 watchers
yew-side-effect
Reconcile Side Effects in Yew Applications
Python · 4 watchers
botodesu
An automatically expanding Telegram bot API that supports the latest Telegram features.
Python · 4 watchers
futurefinity
FutureFinity is an asynchronous Python web framework.
Rust · 4 watchers
pinned
Synchronisation Primitives for !Send tasks
Python · 2 watchers
magichttp
Asynchronous http, made easy.
Dockerfile · 2 watchers
pai
Collection of AI Containers - Prebuilt and Ready-to-Use
Rust · 2 watchers
stellation-templates
Python · 2 watchers
teleme
An async, simple Telegram Bot framework
MDX · 2 watchers
yew
Rust / Wasm framework for building client web apps
Python · 1 watchers
destination
A Regex Based Path Routing Library.
Rust · 1 watchers
fl-www-examples
Example Code of articles on my blog.
Rust · 1 watchers
gloo
A modular toolkit for building fast, reliable Web applications and libraries with Rust and WASM
Python · 1 watchers
hiyori
Hiyori is an http client for asyncio.
Rust · 0 watchers
bounce-website
The website of bounce-rs.org.
TypeScript · 0 watchers
concurrent-demos
0 watchers
dejavu
A Replicable Development Environment
0 watchers
futursolo
Python · 0 watchers
github-stats
Python · 0 watchers
hakoniwa
Hakoniwa is a simple web framework for asyncio.
0 watchers
implicit-clone
Immutable types and ImplicitClone trait similar to Copy
Rust · 0 watchers
local-enter-guard-test
Rust · 0 watchers
local-set-test
Python · 0 watchers
magicdict
An ordered, one-to-many mapping.
0 watchers
ramalama
RamaLama is an open-source developer tool that simplifies the local serving of AI models from any source and facilitates their use for inference in production, all through the familiar language of containers.
Rust · 0 watchers
reality-rs
Subject your application to brutal reality
0 watchers
reqwest
An easy and powerful Rust HTTP Client
Rust · 0 watchers
rust
Empowering everyone to build reliable and efficient software.
0 watchers
sccache-action
A GitHub Action that speeds up Rust compilation with sccache.
Rust · 0 watchers
tokio
A runtime for writing reliable asynchronous applications with Rust. Provides I/O, networking, scheduling, timers, ...
Rust · 0 watchers
tokio-task-spawn-test
Rust · 0 watchers
trunk
Build, bundle & ship your Rust WASM application to the web.
Vim script · 0 watchers
vim-rust-yew
Rust Syntax with extension to support Yew macros.
Vim script · 0 watchers
visually-improved-rich-content
My Vim Configuration
0 watchers
warp
A super-easy, composable, web server framework for warp speeds.
Rust · 0 watchers
yew-feather
Yew components for Feather icons
Rust · 0 watchers
yew-hooks
Hooks for Yew, inspired by streamich/react-use and alibaba/hooks.
Rust · 0 watchers
yew-pr-2705-regression
futursolo

futursolo

富貴不能淫,貧賤不能移,威武不能屈,此之謂愛多路。
🏢  未來領域 / Master of The Futures' Territory
V2EX member #85033, joined on 2014-12-03 18:29:47 +08:00
5 G 61 S 90 B
Per futursolo's settings, the topics list is hidden
Deals info, including closed deals, is not hidden
futursolo's recent replies
Apr 20, 2015
Replied to a topic by Cee iDev Objective-C Prefixes: A Thing of the Past?
写Objective-C的菊苣

(~ ̄▽ ̄)ノ

Python小白看着你...
Tornado(知乎就是基于这个Web Framework的)的主动式文件缓存和异步操作起到了很大的作用。
知乎应该是缓存静态文件的,但是动态页面并不缓存。
你打开Chrome的开发者工具之后再刷新知乎的页面,可以看到静态内容几乎全都是304。
Node.js: Promise
Python(Tornado based Application): Future(Use with yield)
Go: goroutine
Apr 18, 2015
Replied to a topic by lixia625 Python 求问, jinjia2 逆向的遍历
如果你指的是字典(Dict),那么应该没有顺序(顺序是随机的,正反向都无所谓).
如果你指的是列表,可以这样操作:
for item in (list[::-1])

如果你指的是有序字典,那么这样操作:
for item in (list(dict.keys())[::-1])
Apr 18, 2015
Replied to a topic by napretep Python 如何用 python 计算十亿内的素数总和?
使用生成器可以避免上面所说的内存不够用的情况。

这里给一个例子:(V2EX会把代码中的空格自动删掉,请自己补全)

import math
import time


def is_prime(number):
if number > 1:
if number == 2:
return True
if number % 2 == 0:
return False
for current in range(3, int(math.sqrt(number) + 1), 2):
if number % current == 0:
return False
return True
return False


def get_primes(number):
while True:
if is_prime(number):
yield number
number += 1

start = time.time()

prime = get_primes(1)
prime_sum = 0
while True:
this_prime = next(prime)
if this_prime <= 1000000:#改一下这里的数字
prime_sum += this_prime
else:
break
print("Result:" + str(prime_sum))
print ("Finished! Time Used: " + str(time.time() - start) + "s.")

至于楼上所说的筛法算素数的问题,可能也需要比较大的内存
(你还是要把已经算出来的素数保存起来,在这里暂时不用了)

这个是Python3的代码,Python2请自己改一下。

要想算的快一点,可以使用PyPy3。
Tornado 的话应该使用异步驱动程序Motor,而不是同步驱动程序PyMongo。

https://motor.readthedocs.org/en/stable/

使用Tornado的话,请牢记异步优先的准则。
@clino
真的是...
没想到GitHub也会用Flash...
GitHub怎么可以直接复制内容到剪切板的?(页面右侧的项目git clone 地址)
Apr 17, 2015
Replied to a topic by ivanchou 问与答 现在主流是用 c++ 还是 c# 开发客户端啊
@bestsanmao ShadowSocks for Windows
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1031 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 15ms · UTC 18:37 · PVG 02:37 · LAX 11:37 · JFK 14:37
♥ Do have faith in what you're doing.