Skip to content

Instantly share code, notes, and snippets.

@omansour
omansour / 0_prompt_TwelveLabs_Pegasus.txt
Last active October 4, 2025 16:58
TwelveLabs Pegasus video analysis
"Analyze this video comprehensively and provide a detailed markdown report with the following sections:
# Quick Summary
Provide a one-line summary of the video content.
# Object Detections
List all objects you can detect with precise timestamps when they appear and disappear. Include logos, text, equipment, and any visual elements. Exclude peoples and animals. Format: Object Name (appears at MM:SS, disappears at MM:SS).
# Scene Detection
Break down the video into distinct scenes with timestamps and descriptions. Format: MM:SS-MM:SS: Scene description.
@omansour
omansour / ask-amazon-bedrock-with-openAIsdk.py
Created August 13, 2025 08:27
calling bedrock with openAI SDK
import os, re
from openai import OpenAI
client = OpenAI(
base_url="https://bedrock-runtime.us-west-2.amazonaws.com/openai/v1",
api_key=os.getenv("AWS_BEARER_TOKEN_BEDROCK")
)
completion = client.chat.completions.create(
model="openai.gpt-oss-20b-1:0",
@omansour
omansour / ask-amazon-bedrock.py
Created April 3, 2025 13:30
python script, raycast ready, to ask question to claude 3.7
#!/Users/omsr/Documents/InternalWorkspace/raycast-ask-bedrock/venv/bin/python
# Required parameters:
# @raycast.schemaVersion 1
# @raycast.title ask claude 3.7
# @raycast.mode fullOutput
# Optional parameters:
# @raycast.icon 🤖
# @raycast.argument1 { "type": "text", "placeholder": "what do you want ?" }
@omansour
omansour / test_strict_json.py
Created March 24, 2024 16:30
categorize user search
# usage echo 'soirée entre copines'| python test_strict_json.py'
# install strictjson
import os, sys
os.environ['OPENAI_API_KEY'] = 'fill'
from strictjson import *
input = sys.stdin.read().strip()
@omansour
omansour / KernelTerminateEvent.php
Last active December 22, 2015 03:48
exemple for collecting specific datas for the StatsdBundle
<?php
namespace M6\Bundle\DistributionBundle\EventDispatcher;
use Symfony\Component\EventDispatcher\Event;
/**
* Evènement surchargeant le kernel.terminate
*/
class KernelTerminateEvent extends Event
{
@omansour
omansour / gist:6306470
Created August 22, 2013 12:20
conf atoum pour le CI
<?php
$projectDir = __DIR__ . '/../..';
$basedir = $projectDir . '/../';
require_once $projectDir . '/vendor/atoum/atoum/classes/autoloader.php';
$projectName = strtoupper(dirname($projectDir));
/*
* CLI report.
*/
@omansour
omansour / git.protips.md
Created March 22, 2013 15:00
Git like a boss m6web

Git like a boss

Quelques commandes git bien pratiques.

Naviguer dans git

Pour revenir à la branche précédente :

git co -
@omansour
omansour / vagrant_cheat_sheet.sh
Last active December 15, 2015 06:58 — forked from nazgob/gist:2367583
vagrant cheat sheet
# setup vagrant
gem install vagrant
vagrant box add lucid32 http://files.vagrantup.com/lucid32.box
mkdir my_vagrant_test
cd my_vagrant_test
vagrant init lucid32
vim Vagrantfile
vagrant up
vagrant ssh
@omansour
omansour / eb_gestionnaire_demande.md
Created November 7, 2012 17:34
EB d'un gestionnaire de demandes

EB gestionnaire de demandes

(mes excuses pour mon orthographe déplorable)

Gestionaire de demandes (anomalie, évolutions fonctionnelles …) sur des projets informatiques.

  • outil en mode web
  • persistence mysql
  • n'importe quel langage (PHP est mieux)
$articles = $objArticle->getArticle($this->getIdWebSite(), 0, $end, $begin, 0, 0, 0, 0, 0, false, 'id DESC', '', 'y', '', false, '', '', '', '', 'article', '', '', '', '', '', '', '', '', '', '', 0, 0, '', '', '', '', '', '', '1', '', '', '', '', '', '', '', '1');
/**
* getArticle
* permet de récupérer les articles
*
* @param int $intIdWebSite id du website