Skip to content

Instantly share code, notes, and snippets.

@talesa
talesa / adjacency-list-to-adjacency-matrix.py
Last active July 10, 2023 13:11
Transforming Excel adjacency list to a adjacency matrix
# coding: utf-8
# Importing libraries
# In[1]:
import pandas as pd
import numpy as np
@talesa
talesa / profiles.clj
Last active August 14, 2017 12:52
Lein profiles.clj config file
{:user
{:plugins [[lein-exec "0.3.6"]
[lein-gorilla "0.4.0"]]
:dependencies [[proto-repl "0.3.1"]]}}
@talesa
talesa / foppl_temp.clj
Last active August 8, 2017 08:36
Using assoc in foppl example
(let [[G E]
(foppl-query
(defn loopi [i mu] (assoc mu (+ i 1) (sample (normal (get mu i) 1))))
(loop 4 (vector 1 1 1 1 1) loopi))]
(print-graph G)
(:body E))
;;; Vertices V: #{x38089 x38096 x38075 x38082}
;;;
;;; Arcs A: #{}
@talesa
talesa / maze.html
Created July 13, 2017 11:14
Scholastica CS Hero session maze solving workshop
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
background: #000;
}
</style>
<body>
@talesa
talesa / fill_spreadsheet.html
Last active May 3, 2018 09:47
Simple script to fill in the addresses of objects in column A of a Google Sheets spreadsheet
<!DOCTYPE html>
<html>
<head>
<title>Google Sheets API Quickstart</title>
<meta charset='utf-8' />
<!-- <link rel="stylesheet" type="text/css" href="./mystyle.css"> -->
</head>
<body>
<p>Google Sheets API Quickstart</p>