Instantly share code, notes, and snippets.

InstanceLabs instance01

Last active December 6, 2017 21:14 — forked from cmbaughman/TextBookSearch.md
Searching for Text Books

Note: I found this on the /r/Piracy subreddit (https://www.reddit.com/r/Piracy/comments/3i9y7n/guide_for_finding_textbooks/?sort=confidence) however I am including a copy here just in case.

So you have a list of books you need to buy for college. There are some really great resources for finding them online, but I'm going to run through the easiest methods for searching all of them here.

First, let's start off by using the method that will allow you to find the vast majority of books. Google. It tends to be easier if you can search multiple sites at once, and this is the easiest way to do it.

There was a search engine that /u/ratokursi made 3 years ago, but by now most of the sites are either dead or have changed the url. I decided to make a new one, this time after reviewing 100+ sites and adding to working ones to the custom search engine.

Created July 18, 2020 11:30
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
 import numpy as np def calc_cohens_kappa(matrix): p0 = (matrix[0][0] + matrix[1][1]) / matrix.sum() pyes = (matrix[0].sum() / matrix.sum()) * ((matrix[0][0] + matrix[1][0]) / matrix.sum()) pno = (matrix[1].sum() / matrix.sum()) * ((matrix[0][1] + matrix[1][1]) / matrix.sum()) pe = pyes + pno k = (p0 - pe) / (1 - pe) print(k)
Created July 19, 2020 08:21
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
 # Calculate uniform time warping (UTW) of two small time series. # The arguably better alternative is dynamic time warping (DTW). import numpy as np X = np.array([3, 5, 9, 2, 3, 6, 3]) Y = np.array([3, 4, 6, 10, 1, 3, 2, 7, 4]) X_len = X.shape[0] Y_len = Y.shape[0] X = np.repeat(X, Y_len)
Last active July 19, 2020 18:29
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
 # More information: "A Framework for Clustering Evolving Data Streams", Aggarwal, 2003 # This does not deal with redundancy (which apparently is rampant). import math alpha = 2 beta = 2 levels = []
Last active February 6, 2021 06:19
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
 import qiskit as qk simulator = qk.BasicAer.get_backend('statevector_simulator') q = qk.QuantumRegister(3) c = qk.ClassicalRegister(3) total_sum = None
Last active May 22, 2022 08:43 — forked from markmarkoh/gist:2969317
World Map Geo JSON data