This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function | |
{ | |
functions = | |
[ | |
function | |
{ | |
functions = [], | |
constants = [None], | |
parameter_count = 1, | |
local_vars = [], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p = {x:0; y:0;}; | |
im = fun(x y){ | |
if(x==p.x & y==p.y){ | |
return "x"; | |
} | |
return " "; | |
}; | |
i = 0; | |
while(i < 30){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function mount_858() { | |
DIR="$HOME/mnt/858/$1" | |
mkdir -p $DIR | |
sshfs "858:$1" $DIR -o reconnect,ServerAliveInterval=5,ServerAliveCountMax=2 | |
cd $DIR | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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'])) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from cslo.learn.features import parse_sentences | |
print parse_sentences('Hello, world! My name is Yasyf.') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import collections | |
def flatten(l): | |
return sum(map(lambda x: x if isinstance(x, collections.Sequence) else [x], l), []) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import functools, warnings | |
class EpochLog(object): | |
IMPROVEMENT_WINDOW = 5 | |
def __init__(self, threshold, maxepoch): | |
self.threshold = threshold | |
self.maxepoch = maxepoch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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 []; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; |