<commit_before>#!/usr/bin/env python
# -*- coding: utf-8 -*-

__author__ = '<NAME>'
__email__ = '<EMAIL>'
__version__ = '0.1.2'

#
# flypwd -- gestione sicura delle password utente
#

"""Library for flypwd password management"""

import getpass
from Crypto.PublicKey import RSA
from Crypto.Cipher import PKCS1_v1_5
import os.path
import os
from subprocess import PIPE, Popen
import sys

# The following 'pam' package can be found here:
# http://atlee.ca/software/pam/index.html
#
# DON'T please DON'T "pip install pam", because
# you'll find yourself struggling with PAM (installed by the mentioned
# "pip" invocation  which is totally different from the one at the URL
# http://atlee.ca/software/pam/index.html
#
# My best wishes to who has created this mess.
try:
    from pam import authenticate as pamauthenticate
except:
    def pamauthenticate(user, pwd):
        return False

import errno
from argparse import ArgumentParser

import logging
logging.basicConfig()
log = logging.getLogger(__name__)
log.setLevel(logging.INFO)

def mkdir_p(path):
    """Helper function mimic the mkdir -p option"""
    try:
        os.makedirs(path)
    except OSError as exc: # Python >2.5
        if exc.errno == errno.EEXIST and os.path.isdir(path):
            pass
        else: raise

__PROG_DIR__ = ".ssh"
HOME = os.path.expanduser("~")
WDIR = os.path.join(HOME, __PROG_DIR__)
_DEFAULT_SERVICE_ = 'pwd'
# Assert you have the working dir ;)
mkdir_p(WDIR)

# Constants, constants everywhere...
KEY_SIZE = 2048

__all__ = ['flypwd', 'Flypwd', 'main']

class AuthenticationException(Exception):
    """ notifies the error upon authentication """
    pass


def flypwd(service=_DEFAULT_SERVICE_, user=getpass.getuser()):
    """ Main entry point """<commit_msg>Allineo le configurazioni di vari ambienti distinti<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-

__author__ = '<NAME>'
__email__ = '<EMAIL>'
__version__ = '0.1.2'

#
# flypwd -- gestione sicura delle password utente
#

"""Library for flypwd password management"""

import getpass
from Crypto.PublicKey import RSA
from Crypto.Cipher import PKCS1_v1_5
import os.path
import os
from subprocess import PIPE, Popen
import sys

# The following 'pam' package can be found here:
# http://atlee.ca/software/pam/index.html
#
# DON'T please DON'T "pip install pam", because
# you'll find yourself struggling with PAM (installed by the mentioned
# "pip" invocation  which is totally different from the one at the URL
# http://atlee.ca/software/pam/index.html
#
# My best wishes to who has created this mess.
try:
    from pam import authenticate as pamauthenticate
except:
    def pamauthenticate(user, pwd):
        return False

import errno
from argparse import ArgumentParser

import logging
logging.basicConfig()
log = logging.getLogger(__name__)
log.setLevel(logging.INFO)

def mkdir_p(path):
    """Helper function mimic the mkdir -p option"""
    try:
        os.makedirs(path)
    except OSError as exc: # Python >2.5
        if exc.errno == errno.EEXIST and os.path.isdir(path):
            pass
        else: raise

__PROG_DIR__ = ".flypwd"
HOME = os.path.expanduser("~")
WDIR = os.path.join(HOME, __PROG_DIR__)
_DEFAULT_SERVICE_ = 'default'
# Assert you have the working dir ;)
mkdir_p(WDIR)

# Constants, constants everywhere...
KEY_SIZE = 2048

__all__ = ['flypwd', 'Flypwd', 'main']

class AuthenticationException(Exception):
    """ notifies the error upon authentication """
    pass


def flypwd(service=_DEFAULT_SERVICE_, user=getpass.getuser()):
    """ Main entry point """
{'fraction_non_alphanumeric': 0.11101718794026487, 'fraction_numerical': 0.007326007326007326, 'mean_word_length': 3.965034965034965, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '66648', 'n_tokens_mistral': 1189, 'n_tokens_neox': 1142, 'n_words': 364}