Skip to content

Instantly share code, notes, and snippets.

@heartofrevel
heartofrevel / Code.java
Last active September 27, 2023 15:05
DES Algorithm
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Collections;
public class Main {
public final static int[] pc1Table = new int[]{ 57, 49, 41, 33, 25, 17, 9,
1, 58, 50, 42, 34, 26, 18,
10, 2, 59, 51, 43, 35, 27,
19, 11, 3, 60, 52, 44, 36,
63, 55, 47, 39, 31, 23, 15,
cqlsh:demo> TRUNCATE upsert_test ;
cqlsh:demo> SELECT * from upsert_test ;
name | title
------+-------
(0 rows)
cqlsh:demo> INSERT INTO upsert_test (name, title) VALUES ('Anshul', 'TL');
cqlsh:demo> SELECT * FROM upsert_test ;
cqlsh:demo> DESC upsert_test ;
CREATE TABLE demo.upsert_test (
name text PRIMARY KEY,
title text
) WITH bloom_filter_fp_chance = 0.01
AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'}
AND comment = ''
AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'}
AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'}
{
"openapi": "3.0.0",
"info": {
"title": "CipherPy",
"description": "APIs written in Python to encrypt and decrypt in various ciphers.",
"version": "1.0.0"
},
"servers": [
{
"url": "https://apps.heartofrevel.com/cipherpy"
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.
Collecting textract
Requirement already satisfied: beautifulsoup4==4.5.3 in /home/ml-app/DATA_DESIGN/pyenv/lib/python2.7/dist-packages (from textract) (4.5.3)
Requirement already satisfied: docx2txt==0.6 in /home/ml-app/DATA_DESIGN/pyenv/lib/python2.7/dist-packages (from textract) (0.6)
Requirement already satisfied: EbookLib==0.15 in /home/ml-app/DATA_DESIGN/pyenv/lib/python2.7/dist-packages (from textract) (0.15)
Requirement already satisfied: SpeechRecognition==3.6.3 in /home/ml-app/DATA_DESIGN/pyenv/lib/python2.7/dist-packages (from textract) (3.6.3)
Collecting pocketsphinx==0.1.3 (from textract)
Using cached https://files.pythonhosted.org/packages/93/5f/a968e5d53d25e32deb78c3e169fd8612ecf53cc76e32cb40e19be35696af/pocketsphinx-0.1.3.tar.bz2
Collecting xlrd==1.0.0 (from textract)
Collecting char
server {
listen 80;
#server_name <Domain Name>;
root /var/www;
index index.html index.php index.htm;
error_page 403 = @denied;
#Below enter IP address or block to allow, eg LAN and/or VPN blocks
allow 10.0.0.0/8;
# This is the rtorrent configuration file installed by rtinst script - https://github.com/arakasi72/rtinst
# This file is installed to ~/.rtorrent.rc
# Enable/modify the options as needed, uncomment the options you wish to enable.
# This configuration will work with most systems, but optimal settings are dependant on specific server setup
### Set Directories
method.insert = cfg.basedir, private|const|string, (cat,"/home/osmc/rtorrent/")
method.insert = cfg.watch, private|const|string, (cat,(cfg.basedir),"watch/")
#method.insert = cfg.logs, private|const|string, (cat,(cfg.basedir),"log/")
/* jshint node: true */
module.exports = function(environment) {
var ENV = {
modulePrefix: 'open-ethereum-pool',
environment: environment,
rootURL: '/',
locationType: 'hash',
EmberENV: {
FEATURES: {
@heartofrevel
heartofrevel / Magic Trick Inputs
Created November 4, 2014 22:39
Magic Trick Inputs
100
1
12 10 11 3
4 2 16 8
1 14 9 6
5 13 15 7
1
10 11 12 3
7 5 8 15
13 2 9 16
JsonObjectRequest req = new JsonObjectRequest(Request.Method.DELETE, url, null, new Response.Listener<JSONObject>() {
@Override
public void onResponse(JSONObject arg0) {
// TODO Auto-generated method stub
Toast.makeText(mContext, "Support Removed", Toast.LENGTH_SHORT).show();
tvLike.setVisibility(View.INVISIBLE);
tvDislike.setVisibility(View.INVISIBLE);
layoutUserDetails.setVisibility(View.INVISIBLE);
tvLike.setText(String.valueOf(Integer