| 日時: | 2021-01-29 |
|---|---|
| 作: | @voluntas |
| バージョン: | 2021.2 |
| url: | https://voluntas.github.io/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env python3 | |
| from __future__ import print_function | |
| from tempfile import TemporaryFile | |
| from binascii import hexlify | |
| from ctypes import * | |
| class StructHelper(object): | |
| def __get_value_str(self, name, fmt='{}'): | |
| val = getattr(self, name) |
| 日時: | 2023-01-15 |
|---|---|
| 作: | @voluntas |
| バージョン: | 2023.1 |
| url: | https://voluntas.github.io/ |
この資料は以下の製品の宣伝を含みます。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from ctypes import * | |
| def convert_bytes_to_structure(st, byte): | |
| # sizoef(st) == sizeof(byte) | |
| memmove(addressof(st), byte, sizeof(st)) | |
| def convert_struct_to_bytes(st): | |
| buffer = create_string_buffer(sizeof(st)) | |
| memmove(buffer, addressof(st), sizeof(st)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| MIT License | |
| Copyright (c) 2018 Oleg Yamnikov | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |
| 日時: | 2016-01-23 |
|---|---|
| 作: | @voluntas |
| バージョン: | 0.1.2 |
| url: | https://voluntas.github.io/ |
| 日時: | 2023-12-03 |
|---|---|
| 作: | voluntas |
| バージョン: | 2023.1 |
| url: | https://voluntas.github.io |
この記事が良いと思ったらこの記事に Star をお願いします
| 更新: | 2024-05-20 |
|---|---|
| 作者: | @voluntas |
| バージョン: | 2024.1 |
| URL: | https://voluntas.github.io/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Only dependency needed | |
| import threading | |
| # Dependency for the task | |
| import datetime | |
| import time | |
| # Function wrapper | |
| def periodic_task(interval, times = -1): | |
| def outer_wrap(function): |
NewerOlder