<commit_before>
def connect_to_remote(caller_data):
    pass<commit_msg>UV4L/Janus launch module (untested)<commit_after>def connect_local():
  os.system('svc -u /etc/service/janus')
  os.system('svc -u /etc/service/uv4l')

  time.sleep(1)
  _launch_uv4l('localhost:1337')

def connect_remote(remote_address):
  # Start UV4L
  # Instruct UV4L to connect to remote host

def disconnect(caller_data):
  os.system('svc -d /etc/service/janus')
  os.system('svc -d /etc/service/uv4l')


import requests

def _launch_uv4l(url):
  args - {
    'action' : 'Start',
    'gateway_url' : url,
    'gateway_root' : '/janus',
    'room' : '1234',
    'room_pin' : 'adminpwd',
    
    'publish' : '1',
    'subscribe' : '1',
    'reconnect' : '1'
    
    'vformat' : '60',
    'hw_vcodec' : '0', #TODO: Try it with 1
    
#    'username' : 'bar',
#    'token' : '',
  }
  response = requests.get('http://%s/janus'.format(url), args)
  
  if 'Error' in response.text:
    raise Exception('Unexcepted UV4L Error')

{'fraction_non_alphanumeric': 0.17, 'fraction_numerical': 0.024, 'mean_word_length': 3.296137339055794, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '1644771', 'n_tokens_mistral': 410, 'n_tokens_neox': 395, 'n_words': 79}