This file contains 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
import os.path | |
import aiohttp.web | |
async def get_tar(request): | |
''' | |
AIOHTTP server handler for GET request that wants to download files from a `directory` using TAR. | |
''' | |
directory = <specify the directory> | |
response = aiohttp.web.StreamResponse( |
This file contains 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
import os | |
from slack_sdk import WebClient | |
from slack_sdk.errors import SlackApiError | |
# Initialize a Web API client with your bot token | |
slack_bot_token = 'xoxb-your-bot-token' | |
client = WebClient(token=slack_bot_token) | |
# Define the message text | |
message_text = 'Hello, this is a message with a PDF attachment' |
This file contains 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
import asyncio | |
async def run(): | |
proc = await asyncio.create_subprocess_exec( | |
'/bin/ls', '/etc', '/not-exists', | |
stdout=asyncio.subprocess.PIPE, | |
stderr=asyncio.subprocess.PIPE | |
) | |
# Prepare set of asynchronous readline() tasks for `stdout` and `stderr` streams |
This file contains 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
import sys | |
from llvmlite import ir | |
import llvmlite.binding as llvm | |
import ctypes | |
# All these initializations are required for code generation! | |
llvm.initialize() | |
llvm.initialize_native_target() | |
llvm.initialize_native_asmprinter() # yes, even this one |
This file contains 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
import bspump.trigger | |
import bspump.random | |
import bspump.common | |
import bspump.analyzer | |
import time | |
import random | |
class MyApplication(bspump.BSPumpApplication): | |
def __init__(self): |
This file contains 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 bspump import BSPumpApplication, Pipeline | |
import bspump.trigger | |
import bspump.random | |
import bspump.common | |
import bspump.analyzer | |
import time | |
import numpy as np | |
import random | |
import logging |
This file contains 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
import unittest | |
import bspump | |
import bspump.common | |
import bspump.trigger | |
### | |
class MyProcessor(bspump.Processor): |
This file contains 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
import binascii | |
import cryptography.hazmat.backends | |
import cryptography.hazmat.primitives.asymmetric.ec | |
import cryptography.hazmat.primitives.hashes | |
import cryptography.hazmat.primitives.kdf.x963kdf | |
import cryptography.hazmat.primitives.ciphers.aead | |
import cryptography.hazmat.primitives.serialization | |
# Alice (with iOS) is sending encrypted message to Bob (Python) |
This file contains 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
// | |
// mini_asn1_der.swift | |
// miniasn1 | |
// | |
// Created by Ales Teska on 18.2.19. | |
// Copyright © 2019 TeskaLabs. All rights reserved. | |
// | |
import Foundation |
This file contains 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
// | |
// mini_asn1_der.swift | |
// miniasn1 | |
// | |
// Created by Ales Teska on 18.2.19. | |
// Copyright © 2019 TeskaLabs. All rights reserved. | |
// | |
import Foundation |
NewerOlder