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 math | |
user1 = [1,1,1,0,0,1,0] | |
user2 = [1,1,0,0,0,0,0] | |
user3 = [0,0,1,1,0,1,0] | |
def calcNdcg(user): | |
idcg = getIdcg(len(user)) | |
dcg = getDcg(user) | |
ndcg = dcg / idcg |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Text.RegularExpressions; | |
namespace WowDownloaderOmegalul | |
{ | |
class Program |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace MazeBois | |
{ | |
class Program | |
{ |
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
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Linq; | |
using System.Text; | |
using System.Text.RegularExpressions; | |
using System.Threading.Tasks; | |
namespace LFLVRenamer | |
{ |
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
using System; | |
using System.IO; | |
using System.Linq; | |
using System.Text.RegularExpressions; | |
namespace DougRenamer | |
{ | |
class Program | |
{ | |
private const string DIRECTORY = @"D:\Deluge\Doug\"; |
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
const stats = {}; | |
stats.likes = []; | |
stats.dislikes = []; | |
stats.likeReasons = {}; | |
stats.dislikeReasons = {}; | |
(() => { | |
let liked = 0; | |
let disliked = 0; | |
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
(() => { | |
let liked = 0; | |
let disliked = 0; | |
const likeNextPersonAfterALike = (likedName, likedAge, iteration) => { | |
const age = parseInt(document.querySelector('.profile-header__age').innerText.substring(2)) | |
const name = document.querySelector('.profile-header__name').innerText; | |
console.log('Just liked', name, age); | |
if (iteration > 10) { | |
console.warn('10th iteration reached. We might be stuck here. Let\'s just continue as usual.'); |
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
<!doctype html> | |
<html> | |
<head> | |
<title>Frugt</title> | |
<meta charset="utf-8"/> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | |
</head> | |
<body> | |
<div class="container"> |
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
const calculateDistance = (p: number[], q: number[]) => { | |
if (p.length != q.length) return -1; | |
const subtracted = q.map((i, n) => i - p[n]); | |
const powered = subtracted.map(e => Math.pow(e, 2)); | |
const sum = powered.reduce((total, current) => total + current, 0) | |
return Math.sqrt(sum); | |
} | |
// Three dimension | |
const p = [2.15, 16.5, 5.6]; |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
namespace ConsoleApp1 | |
{ | |
class Program | |
{ |
NewerOlder