https://github.com/asukaminato0721/project_euler
Solutions for Project_Euler
https://github.com/asukaminato0721/project_euler
project-euler python
Last synced: 2 months ago
JSON representation
Solutions for Project_Euler
- Host: GitHub
- URL: https://github.com/asukaminato0721/project_euler
- Owner: asukaminato0721
- Created: 2020-09-10T17:37:32.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-03-29T06:41:07.000Z (about 4 years ago)
- Last Synced: 2025-04-02T12:53:30.913Z (2 months ago)
- Topics: project-euler, python
- Language: Python
- Homepage:
- Size: 213 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Project_Euler


## TODO
- [x] Change all `sympy` to `diofant`
cffi is better than ctypes.
### cffi
```py
from cffi import FFIffi = FFI()
ffi.cdef("double key(int n);")
lib = ffi.dlopen("./69.dll")
```### ctypes
```py
from ctypes import CDLL, CFUNCTYPE, c_double, c_intkey = CDLL("./69.dll").key
key = CFUNCTYPE(c_double, c_int)(key)
```---
## Some other information
This is very useful [pytcc](https://github.com/thgcode/pytcc)
Thanks to [CodeHz](https://github.com/codehz/) for advice.
```txt
CodeHz 📡, [22.02.21 20:03]
tcc 不需要生成 dll 啊CodeHz 📡, [22.02.21 20:03]
可以直接 relocateCodeHz 📡, [22.02.21 20:03]
速度更快CodeHz 📡, [22.02.21 20:12]
看头文件CodeHz 📡, [22.02.21 20:12]
tcc_relocateCodeHz 📡, [22.02.21 20:12]
还有 tcc_get_symbolCodeHz 📡, [22.02.21 20:12]
重定位后直接拿符号CodeHz 📡, [22.02.21 20:12]
很香CodeHz 📡, [22.02.21 20:13]
可以拿来做 naive jit
```