Skip to content

Instantly share code, notes, and snippets.

@pradeepbishnoi
pradeepbishnoi / xtdb.workshop.txt
Last active December 1, 2022 00:01
XTDB Workshop quick reference links
$ java -version
openjdk version "11.0.15" 2022-04-19
OpenJDK Runtime Environment Temurin-11.0.15+10 (build 11.0.15+10)
OpenJDK 64-Bit Server VM Temurin-11.0.15+10 (build 11.0.15+10, mixed mode)
https://github.com/juxt/site
https://github.com/xtdb/core2-playground/tree/main/clojure
Soft Deletion probably isn't worth
@pradeepbishnoi
pradeepbishnoi / advent_2021_2.clj
Created December 2, 2021 13:03
Advent Of Code 2021 - Problem 2 sovled in Clojure
;; Advent Of Code 2021
;; Author : Pradeep Bishnoi
;; Solution for Problem 2a and 2b
;; Done via REPL, it can be perfected further.
(def input-data '("forward 5" "down 5" "forward 8" "up 3" "down 8" "forward 2"))
(def input-list
(clojure.string/split-lines (slurp "/tmp/advent/2a.txt")))
@pradeepbishnoi
pradeepbishnoi / advent_2021_1.clj
Last active December 2, 2021 16:20
Advent Of Code 2021 - Clojure Solutions
;; Advent Of Code 2021
;; Author : Pradeep Bishnoi
;; Solution for Problem 1a and 1b
;; Done via REPL, will polish them sooner.
(def depth '(199 200 208 210 200 207 240 269 260 263))
(def depth-file
(clojure.string/split-lines (slurp "/tmp/advent/1a.txt")))
(ns bonds
(:require [clojure.string :as str]
[clojure.data.json :as json]))
(defn string-keys-to-symbols [map]
(reduce #(assoc %1 (-> (key %2) keyword) (val %2)) {} map))
(def djs (string-keys-to-symbols (json/read-str (slurp "/opt/bond_rate/tmp.txt") :key-fn keyword)))
(filter #(> (:coupon %) 13) (get-in djs [:data :bonds]))
@pradeepbishnoi
pradeepbishnoi / bimape.js
Created November 2, 2020 05:44
BimaPe - master data of BimaPe website which is render for each CreditCard combination
const banks = [{
id: 1,
name: 'IndusInd Bank',
}, {
id: 2,
name: 'State Bank of India',
}, {
id: 3,
name: 'ICICI Bank',
}, {

Keybase proof

I hereby claim:

  • I am pradeepbishnoi on github.
  • I am pradeepbishnoi (https://keybase.io/pradeepbishnoi) on keybase.
  • I have a public key whose fingerprint is 897C 359B 2578 CFDA 51F6 A34E AAF3 F782 6B5D 6EFD

To claim this, I am signing this object:

@pradeepbishnoi
pradeepbishnoi / tip.groovy
Created August 3, 2017 06:53
Using a Keyname as Variable in Groovy
columnNumber = '18'
tmpVar.add(it."$columnNumber".value);
@pradeepbishnoi
pradeepbishnoi / clean_up_folder.bash
Created August 3, 2017 06:32
Clean up the folder which are older than X days from today date.
#!/bin/bash
# Clean up the folder which are older than X days from today date.
# Number value which specify how many days old
NUM_OF_DAYS=3
# Depth which the folder should be iterated
MAX_DEPTH=2
cleanup_folder() {
# Pass the folder name as argument
//code to write to xls
import jxl.*
import jxl.write.*
import jxl.format.Colour;
WritableWorkbook workbook = Workbook.createWorkbook(new File(“C:/Users/rajbir_kaur/Desktop/EM2.xls”)) //replace the file location & file name
WritableSheet sheet = workbook.createSheet(“Actual”, 0)//replace the name of sheet with desired name
//Setting Background colour for Cells
Colour bckcolor = Colour.DARK_GREEN;