<commit_before><!DOCTYPE html>
<html>
<head>
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<title></title>
</head>

<body>

<div class="container">
	<h4>GitHub Profile Retrieve</h4>
	<label for="username">Username:</label>
	<input type="text" id="username">
	<button id="addCard">Add Card</button>
</div>

<div id="output" style="margin-top: 10px;"></div>

<script TYPE="text/javascript">

$(document).ready(init);

function init() {
	$("#addCard").click(addCardHandler);
}

function addCardHandler() {

	var $usernameInput = $("#username");
	var username = $usernameInput.val();

	$.get("http://api.github.com/users/" + username)

	.done(function(data, status) {
		console.log("data", data);
		console.log("status", status);
		var $card = makeCard(data);
		$("#output").append($card);
	})
	.fail(function(data, status) {
		console.log("data", data);
		console.log("status", status);
	})
}


function makeCard(data) {

	var $card = $('<div>').addClass('card');
	var $avatar = $('<img>').attr('src', data.avatar_url);
	var $name = $('<div>').text(data.name);
	$card.append($avatar).append($name);
	return $card;
}

</script>
</body>
</html><commit_msg>Ajax httpbin Call<commit_after><!DOCTYPE html>
<html>
<head>
	<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
<title></title>
</head>

<body>

<div class="container">
	<h4>Ajax Learning</h4>
	<button id="divCall">Call</button>
</div>

<script TYPE="text/javascript">

$(document).ready(init);

function init() {
	$("#divCall").click(addCallHandler);
}

function addCallHandler() {
	$.ajax("http://httpbin.org/post", {
		type: "POST",
		data: { Coding: 'House'}
	})
	.done(function(data, status) {
			console.log("data", data);
			console.log("status", status);
		})
		.fail(function(data, status) {
			console.log("data", data);
			console.log("status", status);
		})
}
</script>
</body>
</html>
{'fraction_non_alphanumeric': 0.23614707405489382, 'fraction_numerical': 0.006214396685655101, 'mean_word_length': 5.113924050632911, 'pattern_counts': {'":': 0, '<': 49, '<?xml version=': 0, '>': 49, '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': '3580560', 'n_tokens_mistral': 745, 'n_tokens_neox': 711, 'n_words': 123}