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
var vectorBytes = new byte[item.Features.Length * sizeof(float)]; | |
Buffer.BlockCopy(item.Features, 0, vectorBytes, 0, vectorBytes.Length); | |
db.HashSet($"Order:{item.OrderNumber}", new [] | |
{ | |
new HashEntry("order_number", item.OrderNumber), | |
new HashEntry("quote", item.Quote), | |
new HashEntry("vectorized_order", vectorBytes) | |
}); |
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
// Make sure that the version of the RedisJson module that you're | |
// using is equal to or greater than version 20007. I'm using the | |
// following: redis/redis-stack-server:latest | |
using System.Text.Json; | |
using NReJSON; | |
using StackExchange.Redis; | |
// Let's define an example model instance to persist to Redis... | |
var example = new TestModel |
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
using System; | |
using System.Text.Json; | |
using System.Threading.Tasks; | |
using NReJSON; | |
using StackExchange.Redis; | |
namespace RedisJsonTest | |
{ | |
class Program | |
{ |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <assert.h> | |
#include <iostream> | |
#include "include/libplatform/libplatform.h" | |
#include "include/v8.h" | |
#include "v8eval.h" |
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
# File generated at : 14:25:02, Fri 22 Nov | |
# Converted Project : V8.Net-Proxy-x64.vcxproj | |
cmake_minimum_required(VERSION 3.0.0 FATAL_ERROR) | |
add_definitions(-D_MSC_PLATFORM_TOOLSET=200) | |
# TODO: Make a variable for holding the path to the V8 source. | |
# installed clang and set it as the default compiler | |
# installed sudo apt-get install libc++-dev |
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
using System; | |
using System.Buffers; | |
using System.Collections; | |
using System.Collections.Generic; | |
using System.IO.Pipelines; | |
using System.Linq; | |
using System.Text; | |
namespace HtmlRemover | |
{ |
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
using System; | |
using System.Text; | |
using System.Net; | |
using System.Net.Sockets; | |
using System.Collections.ObjectModel; | |
using System.Threading; | |
namespace Prototype | |
{ | |
public static class Program |
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
# Redis configuration file example. | |
# | |
# Note that in order to read the configuration file, Redis must be | |
# started with the file path as first argument: | |
# | |
# ./redis-server /path/to/redis.conf | |
# Note on units: when memory size is needed, it is possible to specify | |
# it in the usual form of 1k 5GB 4M and so forth: | |
# |
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
docker run -p 6379:6379 -v /Users/tombatron/docker/redis:/data -v /Users/tombatron/docker/redis/redis.conf:/usr/local/etc/redis/redis.conf --name redis redislabs/redismod /usr/local/etc/redis/redis.conf --dir /data | |
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
public class GroupedDictionary<TKey, TValue> : Dictionary<TKey, ICollection<TValue>> | |
{ | |
private readonly Func<TValue, TKey> _groupingKeyExtractor; | |
public GroupedDictionary(IEnumerable<TValue> values, Expression<Func<TValue, TKey>> groupingKey) | |
{ | |
_groupingKeyExtractor = groupingKey.Compile(); | |
PopulateDictionary(values); | |
} |
NewerOlder