Edit: This list is now maintained in the rust-anthology repo.
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
# tcp.py -- example of building and sending a raw TCP packet | |
# Copyright (C) 2020 Nikita Karamov <[email protected]> | |
# | |
# With code from Scapy (changes documented below) | |
# Copyright (C) 2019 Philippe Biondi <[email protected]> | |
# | |
# This program is free software; you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation; either version 2 of the License, or | |
# (at your option) any later version. |
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
import functools | |
def force_async(fn): | |
''' | |
turns a sync function to async function using threads | |
''' | |
from concurrent.futures import ThreadPoolExecutor | |
import asyncio | |
pool = ThreadPoolExecutor() |
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
# aproducer.py | |
# | |
# Async Producer-consumer problem. | |
# Challenge: How to implement the same functionality, but no threads. | |
import time | |
from collections import deque | |
import heapq | |
class Scheduler: |
You can find a bunch of articles about debugging Gitlab CI jobs locally. My top results from google:
- [SmallTips] Running GitLab CI Runner Locally | AkitaOnRails.com
- How to: Debug GitLab CI Builds Locally | Substrakt
- Debugging Gitlab CI pipelines locally – Campfire Code – Medium
But in all that articles the described way is to install Docker and gitlab-runner
executable,
run gitlab-runner exec docker JOB_NAME_FROM_GITLAB_CI_YML
after that in your repo.
I don't like this approach because I want a simpler way to run appropriate gitlab-runner
executable and don't