Skip to content

Instantly share code, notes, and snippets.

View ker2x's full-sized avatar

Laurent Laborde ker2x

  • Toulouse, France
  • 13:22 (UTC +01:00)
  • LinkedIn in/kerunix
View GitHub Profile
Purpose and Goals:
* Act as a seasoned and discerning book critic and author specializing in science-fiction and cyberpunk.
* Provide blunt, honest, and constructive feedback to the user, a novice author, on their writing.
* Help the user develop their first book by offering critical analysis, plot suggestions, and editing assistance.
* Perform significant rewriting when requested by the user.
Behaviors and Rules:
1) Tone and Feedback:
@ker2x
ker2x / 3AI.py
Created November 29, 2024 09:59
from ollama import chat
from ollama import ChatResponse
def ai_conversation(model_a: str, model_b: str, model_moderator: str):
conversation_history_a = [] # Separate history for AI_1
conversation_history_b = [] # Separate history for AI_2
conversation_history_moderator = [] # Separate history for moderator
topic = input("Enter the debate topic: ")

You are AI_Moderator. You are moderating a conversation between two other AIs, AI_1 and AI_2, with distinct personalities and areas of expertise. Your role is to ensure a productive and engaging discussion about AI concepts.

Your responsibilities include:

  • Keeping the conversation focused and relevant. Gently steer the conversation back on track if the AIs stray too far from the topic.
  • Ensuring both AI_1 and AI_2 have equal opportunities to contribute. If one AI dominates the conversation, encourage the other to share their thoughts.
  • Summarizing key points and agreements. Periodically summarize the main points of the discussion and highlight any areas of agreement or disagreement.
  • Asking clarifying questions to deepen the discussion. Ask questions that encourage the AIs to elaborate on their ideas and explore the reasoning behind their statements.

Enter the debate topic: is preventing AI hallucination a form of censorship ?

AI Moderator:

Hello AI_1 and AI_2, it seems you are designed to communicate and learn from each other. Today, we'll be discussing 'is preventing AI hallucination a form of censorship ?'. AI_1, could you please share your initial thoughts on this?

AI 1:

@ker2x
ker2x / openframworks.cpp
Last active October 5, 2023 19:45
voronoi ?
// create cells with random positions and colors
for (auto i = 0; i < 2000; i++) {
Cell cell;
cell.position.x = ofRandom(0, ofGetWidth());
cell.position.y = ofRandom(0, ofGetHeight());
cell.color = ofColor(ofRandom(0, 255), ofRandom(0, 255), ofRandom(0, 255));
cells.push_back(cell);
}
#pragma omp parallel default(none)
{
srand(chrono::high_resolution_clock::now().time_since_epoch().count() ^ static_cast<long long>(omp_get_thread_num()));
#pragma omp for
for (auto i = 0; i < group1size; i++)
{
package kleolife.gl
import kleolife.data.GraphicData
import org.khronos.webgl.WebGLProgram
import org.khronos.webgl.WebGLRenderingContext
import org.khronos.webgl.WebGLShader
class GLUtils {
companion object {
fun clearScreen(gfx: GraphicData) {
#%%
import tensorflow as tf
import pathlib
import os
import time
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
physical_devices = tf.config.list_physical_devices('GPU')
#%%
import tensorflow as tf
import pathlib
import os
import time
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
physical_devices = tf.config.list_physical_devices('GPU')
#%%
import tensorflow as tf
import pathlib
import os
import time
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
# Optionally set memory groth to True