Skip to content

Instantly share code, notes, and snippets.

View andrewda's full-sized avatar
🛩️

Andrew Dassonville andrewda

🛩️
View GitHub Profile
import cv2
img = cv2.imread("image.png")
crop_img = img[200:400, 100:300] # img[y:(y + h), x:(x + w)]
cv2.imshow("cropped", crop_img)
cv2.waitKey(0)

Keybase proof

I hereby claim:

  • I am andrewda on github.
  • I am andrewda (https://keybase.io/andrewda) on keybase.
  • I have a public key whose fingerprint is 94C3 E287 4360 5527 569E 04E8 4583 FF9F 7B89 334B

To claim this, I am signing this object:

#!/bin/sh
# Create a temporary install directory
mkdir ~/install_opencv && cd ~/install_opencv
# Get OpenCV v2.4.13
wget https://github.com/opencv/opencv/archive/2.4.13.tar.gz
tar -xzvf 2.4.13.tar.gz
cd opencv-2.4.13
#!/bin/sh
# Get the setup file for v4.x (LTS build)
curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
# Install Node.js
sudo apt-get install -y nodejs
@andrewda
andrewda / README.md
Last active July 22, 2016 23:38 — forked from alex7kom/README.md
Steam Donation Bot

Steam Donation Bot

A Steam bot that accepts item donations.

Basically, it accepts any offer that doesn't ask for any items from its inventory.

Feel free to use if you want to accept item donations for your project, or modify it as you see fit.

This bot does not support mobile auth as of yet.

!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var f;"undefined"!=typeof window?f=window:"undefined"!=typeof global?f=global:"undefined"!=typeof self&&(f=self),f.io=e()}}(function(){var define,module,exports;return (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(_dereq_,module,exports){
module.exports = _dereq_('./lib/');
},{"./lib/":2}],2:[function(_dereq_,module,exports){
/**
* Module dependencies.
*/
<!DOCTYPE html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]> <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]> <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Loader</title>
@andrewda
andrewda / generate-auth-code.js
Last active December 8, 2015 06:02
Generate Mobile Auth Code for Steam
var readline = require('readline');
var fs = require('fs');
var SteamTotp = require('steam-totp');
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
rl.question('Username: ', function(username) {

Step 1: Completely remove Steam Guard mobile if it's currently enabled

This can be disabled by visiting https://store.steampowered.com/twofactor/manage while logged into your bot's account.

Step 2: Add phone number to bot's account if it's not already added

This can be done by going to https://store.steampowered.com/phone/add while logged into the bot's account. Add a valid phone number to the bot's account and confirm it with the SMS that is sent to your phone. You will be asked to confirm it again in a later step.

Step 3: Install the dependencies