#python#mootdx#pytdx#tdx#tdxpy
mootdx is a free, open-source Python tool that helps you easily read and use stock market data from Tongdaxin on Windows, MacOS, and Linux. It supports Python 3.8+ and can read offline daily, minute, and timeline stock data, as well as online real-time market quotes and financial files. You can install it simply with pip and use it to get detailed stock info for analysis or trading. This saves you time and effort by providing a ready-made, flexible way to access and work with Chinese stock market data in Python. It’s great for learning, research, and personal projects but not for commercial use[1][4].
https://github.com/mootdx/mootdx
🚀 Вышел стабильный JavaScript движок от Google для Android
Новая стабильная библиотека Jetpack JavaScript Engine позволит разработчикам выполнять JS код в изолированной и ограниченной среде.
class MainActivity : ComponentActivity() {
// Теперь nullable, без lateinit
private var jsSandbox: JavaScriptSandbox? = null
private var jsIsolate: JavaScriptIsolate? = null
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
if (!JavaScriptSandbox.isSupported()) {
Log.e("JS", "JavaScriptSandbox не поддерживается")
return
}
lifecycleScope.launch {
// Создаём и сохраняем в nullable-поле
jsSandbox = JavaScriptSandbox
.createConnectedInstanceAsync(applicationContext)
.await()
jsIsolate = jsSandbox?.createIsolate()
// При выполнении гарантируем, что jsIsolate != null
val result: String = jsIsolate
?.evaluateJavaScriptAsync(JS_SCRIPT_SCRING)
?.await()
?: "Ошибка: isolate не инициализирован"
Log.d("JS", "Результат выполнения: $result")
}
}
override fun onDestroy() {
super.onDestroy()
// Закрываем только если не null
jsIsolate?.close()
jsSandbox?.close()
}
}
#jetpack#js