This file contains hidden or 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
| let map = {} | |
| for (let i = 1; i < 1000; i++) { | |
| for (let j = 0; j < i; j++) { | |
| let k = i**3 - j**3 | |
| if (k < 728) { | |
| console.log(i, j, k) | |
| if (map[k]) { | |
| map[k].push([i, j, k]) | |
| } else { | |
| map[k] = [[i,j,k]] |
This file contains hidden or 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
| let k = 1 | |
| let map = {}, mod = [] | |
| while (!map[k]) { | |
| map[k] = true | |
| mod.push(k) | |
| k = (2021 * k) % 10000 | |
| } | |
| let power = 2021 | |
| for (let i = 0; i < 2021; i++) { |
This file contains hidden or 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
| const fetch = require('node-fetch'); | |
| const numbers = [ | |
| { | |
| label: 'e', | |
| url: 'https://www.math.utah.edu/~pa/math/e.html', | |
| parse: (data) => data.split('/EM> = ')[1].split('...')[0] | |
| }, | |
| { | |
| label: 'pi', |
This file contains hidden or 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
| # Corona Trend @rmadhuram | |
| # Data from https://gisanddata.maps.arcgis.com/apps/opsdashboard/index.html#/bda7594740fd40299423467b48e9ecf6 | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| from scipy.optimize import curve_fit | |
| def func(x, a, b, c): | |
| #print(x, a,b,c) | |
| return a * np.exp(b * x) + c |
This file contains hidden or 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
| package com.test; | |
| import java.io.BufferedReader; | |
| import java.io.InputStreamReader; | |
| import java.util.ArrayList; | |
| import java.util.List; | |
| import java.util.StringTokenizer; | |
| import javax.script.ScriptEngine; | |
| import javax.script.ScriptEngineManager; |
This file contains hidden or 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
| { | |
| "nodes": [ | |
| { | |
| "id": "DUQSNE", | |
| "group": 1 | |
| }, | |
| { | |
| "id": "UMASS", | |
| "group": 2 | |
| }, |
This file contains hidden or 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
| colorize = (key, base) => { | |
| // generate hash: https://gist.github.com/iperelivskiy/4110988 | |
| for(var i=0, h=1; i<key.length; i++) | |
| h=Math.imul(h+key.charCodeAt(i)|0, 2654435761); | |
| var hash = (h^h>>>17)>>>0; | |
| genComp = (prime) => { | |
| var c = ((hash % prime) % (256 - base) + base).toString(16) | |
| return (c.length == 1) ? '0' + c : c |
This file contains hidden or 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
| <html> | |
| <head> | |
| <script> | |
| window.requestAnimFrame = (function(callback){ | |
| return window.requestAnimationFrame || | |
| window.webkitRequestAnimationFrame || | |
| window.mozRequestAnimationFrame || | |
| window.oRequestAnimationFrame || |
This file contains hidden or 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
| var sieve = [], | |
| max = 100000, | |
| p = 2; | |
| for (var i=2; i<max; i++) { | |
| sieve[i] = true; | |
| } | |
| while (true) { | |
| for (var j=p*p; j<max; j += p) { |
This file contains hidden or 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
| var CONSTANTS = require('../constants.json'); | |
| var utils = require('../utils.js'); | |
| var bidfactory = require('../bidfactory.js'); | |
| var bidmanager = require('../bidmanager.js'); | |
| var adloader = require('../adloader'); | |
| /** | |
| * Adapter for requesting bids from C1X header tag server. | |
| * | |
| * @param {Object} options - Configuration options for C1X |
NewerOlder