Skip to content

Instantly share code, notes, and snippets.

@behrica
behrica / pull-all-repos-for-project.sh
Created June 7, 2023 13:04 — forked from petarvucetin/pull-all-repos-for-project.sh
Get all repositories from Azure DevOps bash
#!/bin/bash
rolesrepo="https://dev.azure.com/[org]/[project]/_apis/git/repositories?api-version=5.0"
personal_access_token="Username:zzzzzzzzz" #create PAT from secruity menu of your user profile.
user=""
base64AuthInfo="$(echo $personal_access_token | base64))"
#printf "The string\n[$personal_access_token]\nencodes into base64 as:\n[$base64AuthInfo]\n"
#curl $rolesrepo -H "Authorization=Basic $base64AuthInfo"
curl --request GET \
(defun clerk-open-tap-inspector ()
(interactive)
(cider-nrepl-sync-request:eval
(concat "(require '[nextjournal.clerk :as clerk])"
"(clerk/serve! {:browse true})"
"(Thread/sleep 1000)"
"(nextjournal.clerk/show! 'nextjournal.clerk.tap)")
))
@behrica
behrica / bb.edn
Last active January 15, 2023 21:07
run gist from babashka
{:deps {medley/medley {:mvn/version "1.3.0"}}}
@behrica
behrica / clerk.el
Last active December 4, 2022 15:06
(setq clerk-viewer-list '("default"
":html"
":latex"
"nextjournal.clerk.viewer/html-viewer"
"nextjournal.clerk.viewer/vl-viewer"
"nextjournal.clerk.viewer/map-viewer"
"nextjournal.clerk.viewer/markdown-viewer"
"nextjournal.clerk.viewer/katex-viewer"
"nextjournal.clerk.viewer/fallback-viewer"
"nextjournal.clerk.viewer/string-viewer"))
"{:path [], :nextjournal/value [{:path [0], :nextjournal/value [{:path [0 0], :nextjournal/value :Documents, :nextjournal/viewer {:render-fn #viewer-fn (fn [x] (v/html [:span.cmt-atom.inspected-value (str x)]))}} {:path [0 1], :nextjournal/value [{:path [0 1 0], :nextjournal/value 1.0, :nextjournal/viewer {:render-fn #viewer-fn (fn [x] (v/html [:span.cmt-number.inspected-value (if (js/Number.isNaN x) \"NaN\" (str x))]))}} {:path [0 1 1], :nextjournal/value 1.0, :nextjournal/viewer {:render-fn #viewer-fn (fn [x] (v/html [:span.cmt-number.inspected-value (if (js/Number.isNaN x) \"NaN\" (str x))]))}} {:path [0 1 2], :nextjournal/value 1.0, :nextjournal/viewer {:render-fn #viewer-fn (fn [x] (v/html [:span.cmt-number.inspected-value (if (js/Number.isNaN x) \"NaN\" (str x))]))}} {:path [0 1 3], :nextjournal/value 1.0, :nextjournal/viewer {:render-fn #viewer-fn (fn [x] (v/html [:span.cmt-number.inspected-value (if (js/Number.isNaN x) \"NaN\" (str x))]))}} {:path [0 1 4], :nextjournal/value 1.0, :nextjournal/viewer {
\"#000\" opacity=\"1\">20</text><text text-anchor=\"end\" transform=\"translate(-7,123)\" font-family=\"sans-serif\" font-size=\"10px\" fill=\"#000\" opacity=\"1\">40</text><text text-anchor=\"end\" transform=\"translate(-7,83)\" font-family=\"sans-serif\" font-size=\"10px\" fill=\"#000\" opacity=\"1\">60</text><text text-anchor=\"end\" transform=\"translate(-7,42.99999999999999)\" font-family=\"sans-serif\" font-size=\"10px\" fill=\"#000\" opacity=\"1\">80</text><text text-anchor=\"end\" transform=\"translate(-7,3)\" font-family=\"sans-serif\" font-size=\"10px\" fill=\"#000\" opacity=\"1\">100</text></g><g class=\"mark-rule role-axis-domain\" pointer-events=\"none\"><line transform=\"translate(0,200)\" x2=\"0\" y2=\"-200\" stroke=\"#888\" stroke-width=\"1\" opacity=\"1\"/></g><g class=\"mark-text role-axis-title\" pointer-events=\"none\"><text text-anchor=\"middle\" transform=\"translate(-30.0869140625,100) rotate(-90) translate(0,-2)\" font-family=\"sans-serif\" font-size=\"11px\" font-weight=\"bold\" fill=
We can't make this file beautiful and searchable because it's too large.
Month,DayofMonth,DayOfWeek,DepTime,UniqueCarrier,Origin,Dest,Distance,dep_delayed_15min
c-8,c-21,c-7,1934,AA,ATL,DFW,732,N
c-4,c-20,c-3,1548,US,PIT,MCO,834,N
c-9,c-2,c-5,1422,XE,RDU,CLE,416,N
c-11,c-25,c-6,1015,OO,DEN,MEM,872,N
c-10,c-7,c-6,1828,WN,MDW,OMA,423,Y
c-8,c-3,c-4,1918,NW,MEM,MCO,683,N
c-1,c-27,c-4,754,DL,PBI,LGA,1035,N
c-4,c-29,c-6,635,OH,MSP,CVG,596,N
c-7,c-28,c-5,735,AA,ONT,DFW,1189,N
from nltk.probability import FreqDist
import math
import pickle
from top2vec import Top2Vec
import numpy as np
from gensim.utils import simple_preprocess
from gensim.parsing.preprocessing import strip_tags
from tqdm import tqdm
({:dan-sleep 4.0, :dan-grump 90.20926835578194}
{:dan-sleep 4.1, :dan-grump 89.31559277383866}
{:dan-sleep 4.2, :dan-grump 88.42191719189539}
{:dan-sleep 4.3, :dan-grump 87.52824160995212}
{:dan-sleep 4.4, :dan-grump 86.63456602800885}
{:dan-sleep 4.5, :dan-grump 85.74089044606558}
{:dan-sleep 4.6, :dan-grump 84.84721486412231}
{:dan-sleep 4.7, :dan-grump 83.95353928217904}
{:dan-sleep 4.8, :dan-grump 83.05986370023575}
{:dan-sleep 4.9, :dan-grump 82.1661881182925}
{:fit-ctx {:metamorph/mode :fit, :metamorph/data Group: 3 [120 5]:
| :sepal_length | :sepal_width | :petal_length | :petal_width | :species |
|--------------:|-------------:|--------------:|-------------:|---------:|
| 4.5 | 2.3 | 1.3 | 0.3 | 1.0 |
| 5.8 | 2.7 | 3.9 | 1.2 | 0.0 |
| 6.3 | 2.7 | 4.9 | 1.8 | 2.0 |
| 7.1 | 3.0 | 5.9 | 2.1 | 2.0 |
| 6.3 | 3.4 | 5.6 | 2.4 | 2.0 |
| 6.4 | 3.2 | 4.5 | 1.5 | 0.0 |