Skip to content

Instantly share code, notes, and snippets.

@Munksgaard
Munksgaard / skift-password.side
Created December 17, 2020 09:39
Selenium IDE script til at skifte password på KU "nok" gange til at man kan genbruge sit ønskede password.
{
"id": "7d1d2484-7d78-44f2-8727-f53b1abd21a7",
"version": "2.0",
"name": "password skift",
"url": "https://id.ku.dk",
"tests": [{
"id": "20076e95-0834-44c4-b99d-0a9caa35e30f",
"name": "ChangePassword1",
"commands": [{
"id": "4e9c8a00-e0eb-4e13-bb23-1682c4652512",
-- mat_13766 : [m_13764][m_13765]f32@@mat_mem_19100->{base: [m_13764, m_13765]; contiguous: True; LMADs: [{offset: 0i32; strides: [m_13765, 1i32]; rotates: [0i32, 0i32]; shape: [m_13764, m_13765]; permutation: [0, 1]; monotonicity: [Inc, Inc]}]}
entry {[?0][?1]f32@?2->{base: [?0, ?1]; contiguous: True; LMADs: [{offset: 0i32;
strides: [?1, 1i32];
rotates: [0i32, 0i32];
shape: [?0, ?1];
permutation: [0, 1];
monotonicity: [Inc, Inc]}]}}
main (mem mat_mem_19100, i32 m_13764, i32 m_13765,
let {bool intra_suff_and_fits_17137} =
logand(fits_14842, suff_intra_par_17136)
-- res_17138 : [j_m_i_13929][j_m_i_13929][16i32][16i32]f32@@res_mem_19455->{base: [j_m_i_13929, j_m_i_13929, 16i32, 16i32]; contiguous: True; LMADs: [{offset: 0i32; strides: [mul32 (256i32) (j_m_i_13929), 256i32, 16i32, 1i32]; rotates: [0i32, 0i32, 0i32,
0i32]; shape: [j_m_i_13929, j_m_i_13929, 16i32, 16i32]; permutation: [0, 1, 2, 3]; monotonicity: [Inc, Inc, Inc, Inc]}]}
let {mem res_mem_19455;
[j_m_i_13929][j_m_i_13929][16i32][16i32]f32 res_17138} =
-- Branch returns: {[j_m_i_13929][j_m_i_13929][16i32][16i32]f32@?0->{base: [j_m_i_13929,
-- j_m_i_13929,
--
-- A simple test for index-function generalization across a for loop
-- ==
-- input { [0, 1000, 42, 1001, 50000] }
-- output { 52043i32 }
-- structure gpu { Copy 0 }
let main [n] (a: [n]i32): i32 =
let b = loop xs = a[1:] for i < n / 2 - 2 do
xs[i:] -- This will result in a copy, but it needn't
in reduce (+) 0 b
f :: [a] -> [a]
f (x:x':xs) = x':x:xs
f xs = xs
import Data.List
import Text.Printf
type Point = (Int, Int)
ccw :: Point -> Point -> Point -> Int
ccw p1 p2 p3 = (fst p2 - fst p1) * (snd p3 - snd p1)
- (snd p2 - snd p1) * (fst p3 - fst p1)
#![feature(no_std)]
#![no_std]
#[prelude_import]
use std::prelude::v1::*;
#[macro_use]
extern crate "std" as std;
fn main() {
let v =
<[_] as
::std::slice::SliceExt>::into_vec(::std::boxed::Box::new([1, 2]));
#!/bin/env python2
import urllib2
def main():
f = open('fil', 'r')
out = open('out', 'w')
for line in f:
h = urllib2.urlopen(line)
out.write(h.read())
### Keybase proof
I hereby claim:
* I am Munksgaard on github.
* I am munksgaard (https://keybase.io/munksgaard) on keybase.
* I have a public key whose fingerprint is A8DB 29FF 0D46 722B EC5F 536A 9F88 3D7F D6D9 3E64
To claim this, I am signing this object:
@Munksgaard
Munksgaard / wakeup
Created January 4, 2015 21:16
A script to wake you up by playing some music.
#!/bin/bash
#
# Wakeup
# Author: Philip Munksgaard
# Description: Suspends the computer and wakes up at a specified
# time and starts playing a song.
# Note: does not ensure that sound is on and high enough!
wakeuptime=$1
shift