As AI technology continues to rapidly advance, it is crucial that we prioritize its development and use in a way that benefits humanity. The AI Manifesto for Humanity outlines 10 key rules to guide the development and deployment of AI in a way that prioritizes transparency, safety, fairness, privacy, collaboration, human control, ongoing research and development, ethical standards, education and awareness, and
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
# coding=utf-8 | |
import os | |
import sys | |
from unittest import main | |
from _jb_runner_tools import jb_start_tests, jb_doc_args, JB_DISABLE_BUFFERING, PROJECT_DIR | |
from teamcity import unittestpy | |
if __name__ == '__main__': | |
path, targets, additional_args = jb_start_tests() |
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
Celery worker blocks on rate limited task | |
========================================= | |
by github.com/miraculixx | |
Problem: | |
If a worker has a rate_limit active on some task, and that task | |
arrives (is received) more often than the rate limit interval, all | |
worker processes will block on these task instances and stop | |
consuming other tasks as soon as the prefetch count has maxed out |
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
# add pip install/uninstall to requirements.txt automatically | |
pipr() { | |
if [ "$1" == "install" ]; then | |
pip $1 $2 | |
pip freeze | grep -i $2 >> requirements.txt | |
echo ok, added $2 as: | |
tail -n1 requirements.txt | |
fi | |
if [ "$1" == "uninstall" ]; then | |
echo y | pip $1 $2 >> .pipremoved |
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
#!/bin/bash | |
# Collaborator list, add, remove from a repository | |
# (c) 2015 miraculixx | |
# Author: github.com/miraculixx | |
# MIT License, see below | |
function help { | |
echo "Add collaborators to one or more repositories on github" | |
echo "" | |
echo "Syntax: $0 -u user -p password [-l] [-D] -r repo1,repo2 <collaborator id>" |
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
# Python ascii codec can't decode and unicode mess | |
# | |
# check this out https://pythonhosted.org/kitchen/unicode-frustrations.html | |
# and this http://www.joelonsoftware.com/articles/Unicode.html | |
# | |
# The short of it is this | |
# 1. If you can, always set PYTHONIOENCODING=utf8 before you start your python programs. | |
# 2. If you can't or you can't ensure this, always use the following lambda _u to get unicode text | |
# whereever you convert to strings (str.format, str % etc.) | |
# |
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
setup | |
1. Install video 4 linux (v4l) | |
https://github.com/umlaeute/v4l2loopback | |
2. Install ffmpeg | |
https://linuxize.com/post/how-to-install-ffmpeg-on-ubuntu-18-04/ | |
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
version: '3' | |
services: | |
rabbitmq: | |
image: rabbitmq:latest | |
ports: | |
# 5672 amqp | |
# 15672 mgmt ui | |
# 1883 mqtt | |
- "5672:5672" | |
- "15672:15672" |
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
""" omega-ml bulk deployment utility | |
(c) 2020 one2seven GmbH, Switzerland | |
Enables deployment of datasets, models, scripts, jobs as well as cloud | |
resources from a single configuration file. This is currently a separate | |
utility that will be integrated into the omega-ml cli. | |
Installation: | |
$ pip install -U getgist omegaml==0.14.0 | |
$ getgist omegaml omdeploy |
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
function topnfiles { | |
# show top n files by size | |
# Usage: $ topnfiles <dir> <n> | |
# https://www.cyberciti.biz/faq/how-do-i-find-the-largest-filesdirectories-on-a-linuxunixbsd-filesystem/ | |
du -hsx ${1:-.}/* | sort -rh | head -${2:-10} | |
} | |
# show home dir size, available space | |
alias hdf='df -h | grep home' |