Skip to content

Instantly share code, notes, and snippets.

View pangyuteng's full-sized avatar

pangyuteng

View GitHub Profile
@leandrofilipe
leandrofilipe / Raspberry Pi Headless Setup.md
Last active July 7, 2024 00:42
Raspberry Pi Headless Setup (and other things)
import os
import argparse
import glob
import re
import time
MIN = -1024
MAX = 3072

Ultimate Beginner's Guide to Proxmox GPU Passthrough

mirror of The Ultimate Beginner's Guide to GPU Passthrough (Proxmox, Windows 10) by /u/cjalas

>Welcome all, to the first installment of my Idiot Friendly tutorial series! I'll be guiding you through the process of configuring GPU Passthrough for your Proxmox Virtual Machine Guests. This guide is aimed at beginners to virtualization, particularly for Proxmox users. It is intended as an overall guide for passing through a GPU (or multiple GPUs) to your Virtual Machine(s). It is not intended as an all-exhaustive how-to guide; however, I will do my best to provide you with all the necessary resources and sources for the passthrough process, from start to finish. If something doesn't work properly, please check /r/Proxmox, /r/Homelab, /r/VFIO, or

@cuahutli
cuahutli / rest-api-flask-sample.py
Created February 25, 2019 17:38
Ejemplo de como crear una api con Flask que incluye conexión a Base de Datos
#!/usr/bin/env python
import os
from flask import Flask, abort, request, jsonify, g, url_for
from flask.ext.sqlalchemy import SQLAlchemy
from sqlalchemy.inspection import inspect
from flask.ext.httpauth import HTTPBasicAuth
from passlib.apps import custom_app_context as pwd_context
from itsdangerous import (TimedJSONWebSignatureSerializer
as Serializer, BadSignature, SignatureExpired)
@alexdebrie
alexdebrie / README.md
Created February 1, 2019 01:59
Using boto3 generate_presigned_post()

Using an S3 presigned POST url.

  1. Copy the generate.py script to your machine.

  2. Update the BUCKET_NAME and KEY_NAME values in the script as needed.

  3. Run python generate.py. It will spit some output like the following:

$ python3 generate.py

@lyda
lyda / create.sh
Last active September 30, 2019 14:58
#!/bin/bash
# Documentation that helped with this:
# https://github.com/luebken/serverless-the-manual-way
# Status:
# https://eu-west-1.console.aws.amazon.com/lambda/home?region=eu-west-1
# See: https://developer.twitter.com/en/apps/16043135
TWITTER_CONSUMER_KEY=secret
TWITTER_CONSUMER_SECRET=secret

Preface

This article walks you through an example of deploying a Python 3.6 application that uses Pandas and AWS S3 on AWS Lambda using Boto3 in Python in 2018. No shell, no bash, no web console, everything is automated in Python. The previous article of a Hello World example can be found here.

Again, the reason to use Python Boto3 to interact with AWS is that,

  1. I'm more familiar with Python than Bash, which means a Python script can be more flexible and powerful than Bash for me.
  2. I'm not a fun of the AWS web console. It might be easier to do certain things, but it is definitely not automated.

Introduction

@rsnk96
rsnk96 / RTK_ITK_build_script.sh
Created November 8, 2018 19:05
Script to build RTK and ITK on Ubuntu with Python Wrappers
#!/bin/bash
sudo apt-get install git cmake build-essential bison -y
sudo apt-get install gcc-4.8 g++-4.8 -y # For nvcc
mkdir ITK_RTK
# Install ITK
git clone git://itk.org/ITK.git
cd ITK && git checkout v4.13.0 && cd ../
mkdir -p ITK-bin && cd ITK-bin
@mlabouardy
mlabouardy / deploy.sh
Created July 5, 2018 19:47
Deploy Lambda function with CloudWatch event rule trigger
#!/bin/bash
## Override
JENKINS_HOST=""
JENKINS_USERNAME=""
JENKINS_PASSWORD=""
JENKINS_JOB=""
CRON_EXPRESSION="cron(0 8 * * ? *)"
## Global variables
AWS_REGION="us-east-1"
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.