Skip to content

Instantly share code, notes, and snippets.

import mailbox
from email.parser import BytesHeaderParser
parser = BytesHeaderParser()
box = mailbox.mbox('mailbox.mbox')
for message in box:
headers = parser.parsebytes(message.as_bytes())
if 'List-Unsubscribe' in headers.keys():
print(f"{headers['From']},{headers['List-Unsubscribe']}")
const amqp = require('amqplib');
const eventMappings = {
NODE_ADDED: (content, ack) => {
console.log(content);
ack();
},
NODE_AVAILABLE: (content, ack) => {
console.log(content);
ack();

Keybase proof

I hereby claim:

  • I am hugoatease on github.
  • I am hugocaille (https://keybase.io/hugocaille) on keybase.
  • I have a public key ASDuQ4xR1qQu4iOgn2vqmakAvnY-IEK8Oegoa7g8whwJOgo

To claim this, I am signing this object:

<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with
this work for additional information regarding copyright ownership.
The ASF licenses this file to You under the Apache License, Version 2.0
(the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0

Survey model reference

A survey has common properties and can contain an arbitrary number of answer fields.

This document aims to define a JSON format for storage of survey definitions, which will be returned by the survey API and stored in a MongoDB database.

Survey fields

Fields that are common to every survey and providing basic information.

Survey model reference

A survey has common properties and can contain an arbitrary number of answer fields.

This document aims to define a JSON format for storage of survey definitions, which will be returned by the survey API and stored in a MongoDB database.

Survey fields

Fields that are common to every survey and providing basic information.

Survey model reference

A survey has common properties and can contain an arbitrary number of answer fields.

This document aims to define a JSON format for storage of survey definitions, which will be returned by the survey API and stored in a MongoDB database.

Survey fields

Fields that are common to every survey and providing basic information.

package com.github.movixdev.movix;
import com.github.movixdev.movix.models.Movie;
import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;
#include <unistd.h>
#include <stdio.h>
#include <sys/wait.h>
int main() {
pid_t childpid = fork();
if (childpid != 0) {
int status;
while(1) {
waitpid(childpid, &status, WUNTRACED | WCONTINUED);
# encoding: utf8
from ftputil import FTPHost
import argparse
import os
from os import path
from os.path import join
import logging
logger = logging.getLogger(__name__)
formatter = logging.Formatter("%(asctime)s - %(levelname)s - %(message)s")