<commit_before>#!/usr/bin/env python

## @auth <NAME>, <NAME>
## @date Oct 2015
## @github https://github.com/jhallard/praxyk
## @license MIT

#import praxyk_results
#import praxyk_transaction
#import praxyk_user
import requests
import sys, os
import argparse
import json

PRAXYK_WEBSITE = 'http://api.praxyk.com'

class PraxykException(Exception):
	def __init__(self, message='', praxyk_instance=None, errors=None):
		super(Exception, self).__init__()
		self.errors = errors


class Praxyk:
	def __init__(self, username=None, password=<PASSWORD>, authok=None):
		if username and password:
			self.username = username
			self.password = password
			#attempt login, if it fails auth, raise an exception
			response = requests.get('%s/users/' % PRAXYK_WEBSITE, auth=(username, password))
			print 'response ', response
			raise PraxykException(message='Could not confirm user authorization with given username/password combo or authorization token', praxyk_instance=self)
		elif authtok:
			self.authtok = authtok
			# attempt login
			# if not authorized:
			raise PraxykException(message='Could not confirm user authorization with given username and password or authorization token', praxyk_instance=self)
		else:
			raise PraxykException(message='No username and password or authorization token present.\nIf you do not have a valid username and password or authorization token, refer to: %s\n' % PRAXYK_WEBSITE, praxyk_instance=self)
	#def login():
<commit_msg>An initial commit so we can start merging and I can do more work<commit_after>#!/usr/bin/env python

## @auth <NAME>, <NAME>
## @date Oct 2015
## @github https://github.com/jhallard/praxyk
## @license MIT

#import praxyk_results
#import praxyk_transaction
#import praxyk_user
import requests
import sys, os
import argparse
import json

PRAXYK_WEBSITE = 'http://api.praxyk.com'

class PraxykException(Exception):
	def __init__(self, message='', praxyk_instance=None, errors=None):
		super(Exception, self).__init__()
		self.errors = errors


def login(username=None, password=None):
	if username and password:
		try:
			return requests.get('%s/users/' % PRAXYK_WEBSITE, auth=(username, password))
		except Exception as e:
			print 'Error verifying login credentials'
			return
	else:
		print 'Username or password missing, only one supplied'


class Praxyk:
	class PraxykUser:
		def __init__(self, username=None, password=<PASSWORD>, authok=None):
			if username and password:
				self.username = username
				self.password = password
				#attempt login, if it fails auth, raise an exception
				print 'response ', response
				raise PraxykException(message='Could not confirm user authorization with given username/password combo or authorization token', praxyk_instance=self)
			elif authtok:
				self.authtok = authtok
				# attempt login
				# if not authorized:
				raise PraxykException(message='Could not confirm user authorization with given username and password or authorization token', praxyk_instance=self)
			else:
				raise PraxykException(message='No username and password or authorization token present.\nIf you do not have a valid username and password or authorization token, refer to: %s\n' % PRAXYK_WEBSITE, praxyk_instance=self)
		def get():

		def update()
	def __init__():


{'fraction_non_alphanumeric': 0.09361571516267649, 'fraction_numerical': 0.0024554941682013503, 'mean_word_length': 5.001841620626151, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '626264', 'n_tokens_mistral': 1078, 'n_tokens_neox': 967, 'n_words': 324}