Skip to content

Instantly share code, notes, and snippets.

View ogrergo's full-sized avatar
🚀

Louis van Beurden ogrergo

🚀
View GitHub Profile
import boto
import boto.s3
import sys
from boto.s3.key import Key
# usage python3 upload_s3.py source_file dest_name AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY
AWS_ACCESS_KEY_ID = sys.argv[3]
AWS_SECRET_ACCESS_KEY = sys.argv[4]
import os
import traceback
from multiprocessing import Queue, Process
import sys
from queue import Empty
def runnable(f):
def wrapper(i, queue):
while True:
ABAISSEMENT#I.1:
AntiMagn: [faible, léger]
Func0: [┏avoir lieu┓, se produire]
Magn: [marqué, important, sensible]
Oper1: ['enregistrer [ART ~]', 'subir [ART ~]']
QAnti: [augmentation, hausse]
QSyn: [baisse, diminution]
V0: [baisser-intrans]
ABAISSEMENT#I.2:
Oper1: ['effectuer [ART ~]', '┏mettre en œuvre┓ [ART ~]', 'opérer [ART ~]', 'procéder
START_TOKEN = 'START_TOKEN'
END_TOKEN = 'END_TOKEN'
from lucene import initVM
from java.nio.file import Paths
from org.apache.lucene.analysis.miscellaneous import LimitTokenCountAnalyzer
from org.apache.lucene.document import Document, Field, FieldType
from org.apache.lucene.index import IndexWriter, IndexWriterConfig, IndexOptions
import nltk
from collections import defaultdict
from mongoengine import *
import utils
connect('meteo')
class Sentence(EmbeddedDocument):
@ogrergo
ogrergo / database.ts
Last active May 13, 2020 17:42
IndexedDB typescript example
import * as m from 'mithril'
import { Usl, api } from ".";
import { mTag } from "./search";
import * as Repository from "./repository";
import Stream = require('mithril/stream');
import * as Layout from './layout';
// each time database_version is changed, the database is dump and recreated on every clients
// do that to update schema
const DATABASE_VERSION = 8
@alias 0 "E:.b.-" . # verb
@alias 1 "E:.n.-" . # subject
@alias 2 "E:.d.-" . # object
@alias 3 "E:.l.-" # location
@alias city "t.i.-l.i.-'" . # https://dev.intlekt.io/usl/t.i.-l.i.-'
@alias country "k.a.-k.a.-'" . # https://dev.intlekt.io/usl/k.a.-k.a.-'
@alias government "k.o.-s.o.-'" . # https://dev.intlekt.io/usl/k.o.-s.o.-'
@alias exercice_of_power "x.e.-" . # https://dev.intlekt.io/usl/x.e.-
@ogrergo
ogrergo / gist:86c210adab586a2bd0646d7b6fd193fd
Last active March 8, 2025 21:28
Example usage pyieml parser
import pyieml
import os
def list_files_utf8_recursive_mixed_order(folder, ext):
names, contents = [], []
def process_item(item_path, root):
if os.path.isfile(item_path) and item_path.lower().endswith(ext.lower()):
with open(item_path, "r", encoding="utf-8") as f: