# Configuration for akka-persistence-cassandra
akka.persistence.cassandra {
events-by-tag {
bucket-size = "Day"
# for reduced latency
eventual-consistency-delay = 200ms
flush-interval = 50ms
This file contains 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
import openai | |
texts2 = ['What form of destruction was considered too limited by a smaller group of experts?', 'Prior to being a formal legal term, how was the word "genocide" used in an indictment scenario?', 'Who ultimately defined genocide as a series of strategies leading up to the annihilation of an entire group?', "Lemming's concept of genocide triggered legal action in which realm?", 'What was the nationality of anthropologist Peg LeVine?', 'What relative term did LeVine coin to refer to cultural destruction, without the death of its members?', 'What term was coined to describe the destruction of culture?', 'What kind of scientist is Peg LeVine?', 'What elements of group existence, other than people themselves, can be targets of genocide?', 'What has been the primary focus in the study of genocide?', 'In prosecuting genocide, what must the act be formally acknowledged as?', 'In a general aspect, what is genocide viewed as?', 'In trials of genocidal crimes, what responsibly party is difficult to prosec |
This file contains 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
import cudf | |
from cuml.neighbors import NearestNeighbors | |
from cuml.datasets import make_blobs | |
X, _ = make_blobs(n_samples=10, centers=5, | |
n_features=10, random_state=42) | |
# build a cudf Dataframe | |
df_numeric = cudf.DataFrame(X) |
This file contains 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
package main | |
import ( | |
"crypto/tls" | |
"crypto/x509" | |
"encoding/json" | |
"fmt" | |
. "github.com/gocql/gocql" | |
"io/ioutil" | |
"log" |
This file contains 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 | |
PEERING_CONNECTION_ID= | |
REGION= | |
RECEIVER_VPC_ROUTE_TABLE_ID= | |
aws ec2 accept-vpc-peering-connection --vpc-peering-connection-id "$PEERING_CONNECTION_ID" --region "$REGION" | |
DEST_CIDR=$(aws ec2 describe-vpc-peering-connections --vpc-peering-connection-ids "$PEERING_CONNECTION_ID" --region "$REGION" | jq -r ".VpcPeeringConnections[].RequesterVpcInfo.CidrBlock") | |
aws ec2 create-route --route-table-id "$RECEIVER_VPC_ROUTE_TABLE_ID" --destination-cidr-block "$DEST_CIDR" --vpc-peering-connection-id "$PEERING_CONNECTION_ID" --region "$REGION" |
This file contains 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 | |
CLIENT_NAME= | |
CLIENT_SECRET= | |
CLIENT_ID= | |
DB_ID= | |
TOKEN=$(curl --request POST \ | |
--url https://api.astra.datastax.com/v2/authenticateServiceAccount \ | |
--header 'accept: application/json' \ |
This file contains 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 | |
#set -x | |
DATA_DIRECTORY="/var/lib/cassandra/data" | |
CASS_TOOLS_BIN_DIRECTORY="/DSE_DIR_HERE/resources/cassandra/tools/bin/" | |
KEYSPACE_NAME="assethub" | |
TABLE_NAME="clusters" |
This file contains 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 | |
#this gnarly one liner will download dsbulk and download an entire keyspace worth of data into your local machine (assuming it fits!) | |
if [ -z "$CAS_HOST" ]; then | |
echo "Comma separated contact points (or set CAS_HOST environment variable):" | |
read CAS_HOST | |
fi | |
if [ -z "$KEYSPACE" ]; then | |
echo "Keyspace (or set KEYSPACE environment variable):" | |
read KEYSPACE |
This file contains 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
system.graph('geo1').create() | |
:remote config alias g geo1.g | |
:remote config timeout max | |
//create the geo schema elements for this graph | |
graph.schema().propertyKey("point").Point().create(); | |
graph.schema().propertyKey("line").Linestring().create(); | |
graph.schema().propertyKey("polygon").Polygon().create(); | |
graph.tx().commit(); |
Table definition:
CREATE TYPE physician(
physician_first_name text,
physician_last_name text,
physician_license_state_code1 text,
physician_license_state_code2 text,
physician_license_state_code3 text,
physician_license_state_code4 text,
NewerOlder