Skip to content

Instantly share code, notes, and snippets.

View yasyf's full-sized avatar

Yasyf Mohamedali yasyf

View GitHub Profile
function
{
functions =
[
function
{
functions = [],
constants = [None],
parameter_count = 1,
local_vars = [],
diff --git a/Assets/Scripts/NetworkController.cs b/Assets/Scripts/NetworkController.cs
index dcc18a4..51b2567 100644
--- a/Assets/Scripts/NetworkController.cs
+++ b/Assets/Scripts/NetworkController.cs
@@ -119,6 +119,7 @@ public class NetworkController : MonoBehaviour
private void applyPatch (string patch)
{
+ Debug.Log ("About to apply: " + patch);
JsonUtility.FromJsonOverwrite (patch, gameState);
p = {x:0; y:0;};
im = fun(x y){
if(x==p.x & y==p.y){
return "x";
}
return " ";
};
i = 0;
while(i < 30){
function mount_858() {
DIR="$HOME/mnt/858/$1"
mkdir -p $DIR
sshfs "858:$1" $DIR -o reconnect,ServerAliveInterval=5,ServerAliveCountMax=2
cd $DIR
}
#!/usr/bin/php-cgi
<?php
session_name("mit_cert_auth");
session_set_cookie_params(0, '/', '.mit.edu');
session_start();
$server = $_SESSION['server'];
if(empty($server)){
die("Invalid Callback");
}
if (@isset($_SERVER['SSL_CLIENT_S_DN_CN'])) {
from cslo.learn.features import parse_sentences
print parse_sentences('Hello, world! My name is Yasyf.')
import collections
def flatten(l):
return sum(map(lambda x: x if isinstance(x, collections.Sequence) else [x], l), [])
@yasyf
yasyf / fcnn.py
Last active November 7, 2016 04:33
Fully-Connected NN with ReLU Hidden Units and Softmax Output
import numpy as np
import functools, warnings
class EpochLog(object):
IMPROVEMENT_WINDOW = 5
def __init__(self, threshold, maxepoch):
self.threshold = threshold
self.maxepoch = maxepoch
@yasyf
yasyf / scrape_piazza.js
Last active October 31, 2016 05:48
Scape All Of Piazza For A Class
// Inject JQuery
(function(){function l(u,i){
var d=document;if(!d.getElementById(i)){var s=d.createElement('script');s.src=u;s.id=i;d.body.appendChild(s);}}l('https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js','jquery')})();
$j = jQuery.noConflict();
// Helpers
function expandChildren(result, level) {
if (!result.children.length) {
return [];
pte_t *
pgdir_walk(pde_t *pgdir, const void *va, int create)
{
pde_t page_dir_entry = pgdir[PDX(va)];
if (!page_dir_entry && create) {
struct PageInfo *page = page_alloc(ALLOC_ZERO);
if (page != NULL) {
page->pp_ref += 1;
page_dir_entry = PTE_ADDR(page2pa(page)) | PTE_SYSCALL;
pgdir[PDX(va)] = page_dir_entry;