<commit_before>from urllib.parse import urlencode
#import urllib.request, urllib.error

from . import shared as G


def create_room(room_name):
    url = 'https://%s/api/room/' % G.DEFAULT_HOST
    # TODO: let user specify permissions
    post_data = {
        'username': G.USERNAME,
        'secret': G.SECRET,
        'name': room_name
    }
    #urllib.request.urlopen(url, data=urlencode(post_data), timeout=5)<commit_msg>urllib works in the st3 nightlies<commit_after>from urllib.parse import urlencode
import urllib.request, urllib.error

from . import shared as G


def create_room(room_name):
    url = 'https://%s/api/room/' % G.DEFAULT_HOST
    # TODO: let user specify permissions
    post_data = {
        'username': G.USERNAME,
        'secret': G.SECRET,
        'name': room_name
    }
    urllib.request.urlopen(url, data=urlencode(post_data), timeout=5)
{'fraction_non_alphanumeric': 0.11926605504587157, 'fraction_numerical': 0.0034403669724770644, 'mean_word_length': 3.2794117647058822, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '1241433', 'n_tokens_mistral': 301, 'n_tokens_neox': 298, 'n_words': 68}