Skip to content

Instantly share code, notes, and snippets.

View rich-hart's full-sized avatar

Rich Hart rich-hart

View GitHub Profile
@rich-hart
rich-hart / THE_CORONAVIRUS_PROJECT.md
Last active May 7, 2020 18:23
Join Capco (TEAM #265058) in contributing to Folding@home Research Project: The CORONAVIRUS PROJECT

Folding@home Research Project: The CORONAVIRUS PROJECT

These projects are part of Folding@home’s efforts to assist researchers around the world taking up the global fight against COVID-19.

These projects are CPU projects to simulate COVID-19 proteins to learn about their dynamics and function. Learn more at https://foldingathome.org/

To participate. You need to install the Folding@home program on your PERSONAL computer. Then in your webbrowser, go to the link https://client.foldingathome.org/ . Before you begin, you will have to choose between three options. The first is your controbution preference. If you would like to contibute to the COVID-19 project, find the setting I support research fighting... and select COVID-19 (UPDATE: Due to the current emergency in 04/20, selecting Any disease will prioritize COVID-19 research by default). The second setting is Power and controls the average wattage the Folding@home program will draw from your co

@rich-hart
rich-hart / test
Created April 26, 2020 07:46
test
test
from networkx.algorithms.components import connected_components
import networkx as nx
import random
from fuzzywuzzy import fuzz
import numpy as np
import csv
RANDOMIZE = False
#import ipdb; ipdb.set_trace()
with open('responces.csv', newline='\n') as csvfile:
import cv2
import numpy as np
cap = cv2.VideoCapture(0)
while(1):
# Take each frame
_, frame = cap.read()
@rich-hart
rich-hart / bluescreen_remove.py
Created February 22, 2019 16:27
code sample for removing a bluescreen.
import cv2
image = cv2.imread('Tribble.JPG')
hsv_image = cv2.cvtColor(image, cv2.COLOR_RGB2HSV)
BLUE_RANGE_MIN_HSV = (100, 80, 70)
BLUE_RANGE_MAX_HSV = (185, 255, 255)
mask = cv2.inRange(hsv_image, BLUE_RANGE_MIN_HSV, BLUE_RANGE_MAX_HSV)
result = cv2.bitwise_and(image, image, mask=mask)
import os
from os.path import dirname, realpath, join
import unittest
import argparse
import json
import numpy
import cv2
import cv
B_MEAN = 218
B_STDEV = 10.0
/users/:userId/recommendations/:model/:id
/resources/canonical/:url/blacklist
/popular/update
/users
/resources/count
/addontrain/signup/:configId.js
/users/:userId/recent
/url
/url/lookup/:url
/popular
@rich-hart
rich-hart / unused_routes.js
Last active May 10, 2022 01:18
"API-Resource Routes that I am confident are no longer in use. I could be wrong, but these are the ones I'm _pretty_ sure about:" - Anonymous
app.post('/login', users.authenticate)
app.get('/apps', apps.read)
app.get('/apps/:appId', apps.readOne)
app.put('/apps/:appId', apps.update)
app.get('/dynimg/:appId/bsin/:userId/:model/:recNum/:notificationId.:ext', dynimg)
app.get('/dynimg/:appId/email/:userId/:model/:recNum/:notificationId.:ext', dynimg)
app.get('/dynimg/:appId/user_id/:userId/:model/:recNum/:notificationId.:ext', dynimg)
// dynlink and dynsubject can use :idType since there is no conflict in path arity
app.get('/dynlink/:appId/:idType/:userId/:model/:recNum/:notificationId', dynlink)
@rich-hart
rich-hart / first_try.py
Last active December 3, 2016 00:25
AH-HA!
import unittest
def find_slope(x1,y1,x2,y2):
slope = (y2 - y1) / (x2 - x1)
return slope
def find_intercept(x,y,slope):
intercept = y - slope * x
return intercept
@rich-hart
rich-hart / problem.py
Created December 2, 2016 20:12
One more update
import unittest
def find_slope(x1,y1,x2,y2):
slope = (y2 - y1) / (x2 - x1)
return slope
def find_intercept(x,y,slope):
intercept = y - slope * x
return intercept