Skip to content

Instantly share code, notes, and snippets.

View Apkawa's full-sized avatar
🌴
On vacation

Apkawa Apkawa

🌴
On vacation
View GitHub Profile
@primus852
primus852 / cuda_11.7_installation_on_Ubuntu_22.04
Last active July 13, 2024 10:25 — forked from Mahedi-61/cuda_11.8_installation_on_Ubuntu_22.04
Instructions for CUDA v11.7 and cuDNN 8.5 installation on Ubuntu 22.04 for PyTorch 1.12.1
#!/bin/bash
### steps ####
# verify the system has a cuda-capable gpu
# download and install the nvidia cuda toolkit and cudnn
# setup environmental variables
# verify the installation
###
### to verify your gpu is cuda enable check
#!/usr/bin/env python
import math
import sys
from moviepy.editor import AudioClip, VideoFileClip, concatenate_videoclips
# Get average RGB of part of a frame. Frame is H * W * 3 (rgb)
# Assumes x1 < x2, y1 < y2
@vivekhaldar
vivekhaldar / cut_silence.py
Last active July 15, 2024 16:45
Python script to cut out silent parts from a video. Uses moviepy.
#!/usr/bin/env python
#
# Based on a script by Donald Feury
# https://gitlab.com/dak425/scripts/-/blob/master/trim_silenceV2
# https://youtu.be/ak52RXKfDw8
import math
import sys
import subprocess
import os
@baryluk
baryluk / mesa-build.py
Last active July 11, 2024 03:03
Build Mesa from git and libdrm git for Debian. amdgpu build 64-bit and 32-bit for Debian stable, testing and unstable, and possibly Ubuntu, Mint, PopOS, etc. No root required. (well sudo to install some build dependencies required tho). Currently a bit borked on Debian stable (requires newer meson).
#!/usr/bin/env python3
# A simple script to build 64-bit and 32-bit Mesa and libdrm on amd64 Debian
# stable, Debian testing, Debian unstable, and possibly some Ubuntu versions
# with some tweaks.
#
# libdrm is build too, because often version right now in Debian sid and experimental
# is too old for current mesa git repo. Also it is nice to build debug
# versions of libdrm when troubleshooting some crashes and bugs.
#
@TatriX
TatriX / README.md
Last active April 3, 2024 21:04
Rust Thread

Rust — невероятно быстрый язык для системного программирования без segfault'ов и с гарантиями потокобезопасности.

ИТТ мы можем объяснить базовые и продвинутые концепции языка, и программирования в целом, поможем вкатывающимся, подскажем что выбрать для веба, игр или, прости Абу, блокчейна.

https://www.rust-lang.org

Новости

Rust новости #3 (ноябрь 2018)

КДПВ про Rust2018

Предлагаю вашему вниманию субъективную подборку ржавых новостей за ноябрь. В этой подборке: Rust 2018, RustRush, видео с конференций, Amazon Lambda и Firecracker, квизы, переход exonum на actix-web, 10 причин использовать Rust.

@danieldietrich
danieldietrich / auto-deploy.md
Created December 13, 2016 12:25 — forked from domenic/0-github-actions.md
Auto-deploying built products to gh-pages with Travis

Auto-deploying built products to gh-pages with Travis

This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.

Create a compile script

You want a script that does a local compile to e.g. an out/ directory. Let's call this compile.sh for our purposes, but for your project it might be npm build or gulp make-docs or anything similar.

The out/ directory should contain everything you want deployed to gh-pages. That almost always includes an index.html.

@mjtamlyn
mjtamlyn / cursor.py
Last active December 2, 2021 08:42
Graphene pagination
import functools
from django.db.models import Prefetch, QuerySet
import attr
import graphene
from cursor_pagination import CursorPaginator
from graphene.utils.str_converters import to_snake_case
from graphql_relay import connection_from_list
@danieleggert
danieleggert / GPG and git on macOS.md
Last active July 21, 2024 18:21
How to set up git to use the GPG Suite

GPG and git on macOS

Setup

No need for homebrew or anything like that. Works with https://www.git-tower.com and the command line.

  1. Install https://gpgtools.org -- I'd suggest to do a customized install and deselect GPGMail.
  2. Create or import a key -- see below for https://keybase.io
  3. Run gpg --list-secret-keys and look for sec, use the key ID for the next step
  4. Configure git to use GPG -- replace the key with the one from gpg --list-secret-keys