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
Number of elements: 10 | |
----------------------- | |
Dict: 360 bytes # 636 bytes | |
Namedtuple: 120 bytes # 396 bytes | |
Class: 48 bytes # 1202 bytes | |
Class Slots: 48 bytes # 556 bytes | |
Dataclass: 48 bytes # 468 bytes |
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
Number of elements: 10 | |
----------------------- | |
Json Size: 0.02715015411376953 MB | |
Json time: 0.006659951999999997 sec | |
UJson time: 0.0030970319999999996 sec | |
Pickle Size Proto 5: 0.02531909942626953 MB | |
Pickle time Proto 5: 0.003745575000000001 sec | |
Pickle Size Proto 4: 0.02531909942626953 MB | |
Pickle time Proto 4: 0.0031195769999999984 sec |
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
class Serializable: | |
def _clean_dict_(self, | |
data = None, | |
clean_or_raw: str = "clean") -> dict: | |
# DICT | |
if type(data) is dict: | |
ret = {} |
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
# Usage example | |
from scapy.all import * | |
from scapy.layers.http import * | |
sport, dport = detect_http_ports(rdpcap(pcap_file)) | |
if sport: | |
scapy.packet.bind_layers(TCP, HTTP, dport=dport) | |
scapy.packet.bind_layers(TCP, HTTP, sport=sport) |
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
class MetaMongo(type): | |
def __call__(cls, *args, **kwargs): | |
if "_id" in kwargs: | |
_id = kwargs.pop("_id") | |
o = super().__call__(*args, **kwargs) | |
return o |
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
""" | |
This file contains code for consuming the OpenAI API without depencies | |
This code is released under MIT License. | |
""" | |
import json | |
from typing import List | |
import urllib.request as rq |
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
name: Create Unstable Release | |
on: | |
push: | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: |
OlderNewer