I hereby claim:
- I am JCGrant on github.
- I am jcgrant (https://keybase.io/jcgrant) on keybase.
- I have a public key whose fingerprint is B919 ED51 D5B6 464F DE65 8485 1EBB D452 BD82 D307
To claim this, I am signing this object:
| isSquare :: Integer -> Bool | |
| isSquare x | |
| = root ^ 2 == x | |
| where | |
| root = floor $ sqrt $ fromIntegral x | |
| isTruncatedSquare :: Integer -> Bool | |
| isTruncatedSquare x | |
| | x < 10 = False | |
| | otherwise = isSquare $ x `div` 10 |
| import Data.Maybe | |
| isSquare :: Integer -> Bool | |
| isSquare x | |
| = root ^ 2 == x | |
| where | |
| root = floor $ sqrt $ fromIntegral x | |
| append :: [Integer] -> Integer -> [Integer] | |
| append ys x |
I hereby claim:
To claim this, I am signing this object:
| // ==UserScript== | |
| // @name Shush.se - Extra Features | |
| // @namespace https://gist.github.com/JCGrant/45fdb9a8a14d7c05dc6ac70123f2d7cb | |
| // @version 0.5 | |
| // @description Adds various features to Shush.se | |
| // @author JCGrant | |
| // @match http://www.shush.se/index.php* | |
| // @grant none | |
| // @updateURL https://gist.github.com/JCGrant/45fdb9a8a14d7c05dc6ac70123f2d7cb/raw/shush.se-x.user.js | |
| // ==/UserScript== |
| /* | |
| * Copy and paste the following code after clicking | |
| * NEW GAME at http://guessthecorrelation.com. | |
| * Tested and works in Chrome. Not sure about other | |
| * browsers due to usage of ES6 features. | |
| */ | |
| const parseTransformStringIntoPoint = (transformString) => { | |
| let splitString = transformString.split(','); | |
| let xString = splitString[0].substring(10, splitString[0].length); |
| // ==UserScript== | |
| // @name Hide Youtube Comments | |
| // @namespace https://gist.github.com/JCGrant/8b7c64c4ae38c28b26c01f55dea39468 | |
| // @version 0.1 | |
| // @description Hide Youtube Comments | |
| // @author JCGrant | |
| // @match https://www.youtube.com/watch* | |
| // @grant none | |
| // ==/UserScript== |
| const available = (tr) => { | |
| let tds = tr.getElementsByTagName('td'); | |
| let title_td = tds[2]; | |
| let title_text = title_td.textContent; | |
| let num_allocated_str = title_text[title_text.length - 2]; | |
| let num_allocated = parseInt(num_allocated_str); | |
| let num_places_available_td = tds[5]; | |
| let num_places_available_str = num_places_available_td.textContent; | |
| let num_places_available = parseInt(num_places_available_str); |
| This Gist contains the sample code for improving the sample Halite random bot in Python 3. |
| using System; | |
| using System.IO; | |
| using System.Collections.Generic; | |
| namespace SemanticEvolution { | |
| public class Program { | |
| private static List<double> GetValuesFromCsv(string filePath, char delimiter=',') { | |
| List<double> values = new List<double>(); |
| color petalColor = #FFC608; | |
| color seedsColor = #2A1B12; | |
| color stemColor = #6C7D36; | |
| color backgroundColor = #89B4EA; | |
| void setup() { | |
| size(1920, 1080); | |
| frameRate(5); | |
| background(backgroundColor); | |
| } |