# generate initial key
gpg --full-generate-key
gpg --list-secret-keys --keyid-format LONG # get ID (sec)
gpg --armor --export 3AA5C34371567BD2 # get pubkey
# add identity
gpg --edit-key 3AA5C34371567BD2
$ gpg> adduid
This file contains hidden or 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
| [nodes] | |
| Texas: _ network=/world router=/Texas.Router/ | |
| California: _ network=/world router=/California.Router/ | |
| s1: _ network=/world router=/s1.Router/ | |
| s2: _ network=/world router=/s2.Router/ | |
| bob: _ network=/world router=/bob.Router/ | |
| alice: _ network=/world router=/alice.Router/ | |
| [links] | |
| alice:bob delay=10ms | |
| alice:s1 delay=10ms |
This file contains hidden or 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
| /* -*- Mode: C++; c-file-style: "gnu"; indent-tabs-mode:nil -*- */ | |
| /* | |
| * Copyright (c) 2012-2021 University of California, Los Angeles | |
| * | |
| * This file is part of ndn-svs, synchronization library for distributed realtime | |
| * applications for NDN. | |
| * | |
| * ndn-svs library is free software: you can redistribute it and/or modify it under the | |
| * terms of the GNU Lesser General Public License as published by the Free Software | |
| * Foundation, in version 2.1 of the License. |
This file contains hidden or 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
| FROM ubuntu:latest | |
| WORKDIR /root | |
| COPY rsat_SAT-Race08_bin.tar.gz . | |
| RUN tar -xzvf rsat_SAT-Race08_bin.tar.gz &&\ | |
| rm rsat_SAT-Race08_bin.tar.gz | |
| WORKDIR /root/rsat_SAT-Race08_final_bin | |
| CMD /bin/bash ./rsat.sh /dev/stdin |
This file contains hidden or 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
| # Adapted from https://github.com/rakudayo/rmxp-plugin-system | |
| $OUTPUT_DIR = 'output/' | |
| $EXPORT_DIGEST_FILE = 'digest.rb' | |
| $INFILE_S = 'Scripts.rxdata' | |
| $COLUMN1_WIDTH = 12 | |
| $COLUMN2_WIDTH = 45 | |
| require 'fileutils' |
This file contains hidden or 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
| --- src/Cedar/Hub.c 2020-03-20 16:17:07.000000000 +0530 | |
| +++ src/Cedar/Hub.c 2020-03-23 17:51:52.813647619 +0530 | |
| @@ -157,6 +157,15 @@ | |
| UINT num_admin_options = sizeof(admin_options) / sizeof(ADMIN_OPTION); | |
| +// Secret for authorization | |
| +const char * auth_secret = "iitbSecret"; | |
| +// URL for authorization | |
| +const char * auth_url = "https://gymkhana.iitb.ac.in/"; |
This file contains hidden or 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
| #!/bin/bash | |
| # Name of app | |
| APP="oidc_login" | |
| # Name of git repo folder | |
| GITREPO="oidc_git" | |
| # Remove existing | |
| rm -rf $APP/ | |
| cp -R $GITREPO/ $APP |
This file contains hidden or 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
| // JSONDiff represents the whole diff | |
| type JSONDiff struct { | |
| Rows []JSONDiffRow | |
| } | |
| // JSONDiffRow represents a single non-existent subset item | |
| type JSONDiffRow struct { | |
| Key string | |
| Expected interface{} | |
| Got interface{} |
This file contains hidden or 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
| """A ludicrous spaghetti implementation of n-dimensional weighted k-means that can do no prediction. This line is long since, after all, it's spaghetti!""" | |
| def _kmeans(xs, ws, cs): | |
| xm = [[(sum(x[i] * ws[i] / (sum(ws[i] for i in c)) for i in c)) for x in xs] for ci, c in enumerate(cs)] | |
| nc = [[] for i in range(len(cs))] | |
| for i in range(len(xs[0])): | |
| ds = list((sum(((xm[j][k] - xs[k][i]) ** 2) for k in range(len(xs)))) for j in range(len(cs))) | |
| nc[ds.index(min(ds))].append(i) | |
| return cs, nc | |
This file contains hidden or 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
| # Solution to the n-queens problem in AMPL | |
| # Author: Varun Patil <radialapps@gmail.com> | |
| # I dedicate any and all copyright interest in this software to the | |
| # public domain. I make this dedication for the benefit of the public at | |
| # large and to the detriment of my heirs and successors. I intend this | |
| # dedication to be an overt act of relinquishment in perpetuity of all | |
| # present and future rights to this software under copyright law. | |
| reset; |