Skip to content

Instantly share code, notes, and snippets.

View cvic's full-sized avatar
🤖
(def Y (fn [f] ((fn [x] (x x)) (fn [x] (f (fn [y] ((x x) y)))))))

Vic cvic

🤖
(def Y (fn [f] ((fn [x] (x x)) (fn [x] (f (fn [y] ((x x) y)))))))
View GitHub Profile
package com.example.encryption;
import org.bouncycastle.bcpg.ArmoredInputStream;
import org.bouncycastle.openpgp.*;
import org.bouncycastle.openpgp.operator.PBESecretKeyDecryptor;
import org.bouncycastle.openpgp.operator.jcajce.JcaPGPObjectFactory;
import org.bouncycastle.openpgp.operator.jcajce.JcePBESecretKeyDecryptorBuilder;
import org.bouncycastle.openpgp.operator.jcajce.JcePublicKeyDataDecryptorFactoryBuilder;
import org.bouncycastle.openpgp.operator.jcajce.JcePublicKeyKeyEncryptionMethodGenerator;
import org.bouncycastle.openpgp.operator.jcajce.JcePublicKeyRingCollection;
#!/bin/bash
# Check if gpg is installed
if ! command -v gpg &> /dev/null
then
echo "gpg could not be found. Please install it to proceed."
exit 1
fi
# Loop through all .gz.pgp files in the current directory
@cvic
cvic / stuff
Last active June 19, 2019 14:54
#data
!about | data show | unwords
# memez
!meme jocko: demo gods won't smile / good
!meme rich hickey: Person is 'String x String x int x String x String x float x float' product type. A complete callous disregard for people, names, human thinking. It's crazy.
#JVM version
!eval (System/getProperty "java.vendor")
!eval (System/getProperty "java.runtime.version")
In: [0] val: clj-tuple/conj-tuple fails spec: :clojure.core.specs.alpha/defn-args at: [:args :name] predicate: simple-symbol?
#:clojure.spec.alpha{:problems [{:path [:args :name], :pred clojure.core/simple-symbol?, :val clj-tuple/conj-tuple, :via [:clojure.core.specs.alpha/defn-args :clojure.core.specs.alpha/defn-args], :in [0]}], :spec #object[clojure.spec.alpha$regex_spec_impl$reify__2436 0x69356aca "clojure.spec.alpha$regex_spec_impl$reify__2436@69356aca"], :value (clj-tuple/conj-tuple [t__7100__unified__ x__7101__unified__] (clojure.core/let [t__7100__unified__ t__7100__unified__] (clojure.core/case (.count t__7100__unified__) 0 (new Tuple1 x__7101__unified__ (clojure.core/meta t__7100__unified__)) 1 (new Tuple2 (. t__7100__unified__ e0) x__7101__unified__ (clojure.core/meta t__7100__unified__)) 2 (new Tuple3 (. t__7100__unified__ e0) (. t__7100__unified__ e1) x__7101__unified__ (clojure.core/meta t__7100__unified__)) 3 (new Tuple4 (. t__7100__unified__ e0) (. t__7100__unified__ e1) (. t__7100__unified__
@cvic
cvic / progres.py
Created December 6, 2017 19:24
text-progress-bar-in-the-console
#https://github.com/mozilla/DeepSpeech/blob/master/util/progress.py
# -*- coding: utf-8 -*-
from __future__ import print_function
import sys
# from https://stackoverflow.com/questions/3173320/text-progress-bar-in-the-console
def print_progress(iteration, total, prefix = 'Progress', suffix = 'completed', decimals = 1, length = 100, fill = '#'):
"""
Call in a loop to create terminal progress bar
@params:
@cvic
cvic / Arimaa stuff
Created September 9, 2013 14:23
Found on the Web.
(*
Arimaa is a strategy game that is easy to learn but blah blah depth.
Arimaa was designed to be difficult for computers. The inventor, blah, has offered a prize of $20,000 to anyone who can write a program capable of beating a top Arimaa player. Despite many attempts this prize remains unclaimed.
For more information, go to *arimaa site*
*)
(*
Server just receives moves and sends game history. For sync play clients also talk direct to each other...