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
;; Disable big fringe mode when more than one window open | |
;; http://bzg.fr/emacs-strip-tease.html | |
(add-hook 'window-configuration-change-hook | |
(lambda () | |
(if (> (count-windows) 1) | |
(bzg-big-fringe-mode 0) | |
(bzg-big-fringe-mode 1)))) |
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
;; Project Euler | |
;; | |
;; Problem 466 | |
;; https://projecteuler.net/problem=466 | |
;; Find P(64,10e16) | |
(defn distinct-mult [a b] | |
(loop [sol #{} | |
n 0 | |
x (range 1 (inc b)) |
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> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" type="text/css" href="https://storage.googleapis.com/app.klipse.tech/css/codemirror.css"> | |
<script> | |
window.klipse_settings = { | |
selector: '.language-klipse' | |
}; | |
</script> |
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> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" type="text/css" href="https://storage.googleapis.com/app.klipse.tech/css/codemirror.css"> | |
<script> | |
window.klipse_settings = { | |
selector: '.language-klipse' | |
}; | |
</script> |
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 dask_cudf | |
import cudf | |
from dask_cuda import LocalCUDACluster | |
from dask.distributed import Client | |
import xgboost | |
import sklearn.datasets | |
cluster = LocalCUDACluster() | |
client = Client(cluster) |
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
#!/usr/bin/env python3 | |
# | |
# Copyright (c) 2022, NVIDIA CORPORATION. | |
# | |
# Licensed under the Apache License, Version 2.0 (the "License"); | |
# you may not use this file except in compliance with the License. | |
# You may obtain a copy of the License at | |
# | |
# http://www.apache.org/licenses/LICENSE-2.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
import numpy as np | |
import tensorflow as tf | |
def test_random_embeddings(): | |
query_embeddings = tf.random.uniform((16, 48)).numpy() | |
item_embeddings = tf.random.uniform((100, 48)).numpy() | |
with tf.device("/gpu:0"): | |
preds_gpu = tf.matmul(tf.constant(query_embeddings), tf.transpose(tf.constant(item_embeddings))) |
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 cudf | |
def merge(): | |
left = cudf.DataFrame( | |
{ | |
"string_id": [ | |
3, | |
3, | |
6, |