This file contains hidden or 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 loop(this, hObject, statusCallback, exitCallback) | |
% Main loop - acquire samples and call analysis functions | |
% Get handles used below | |
stimControl = StimControl.getInstance(); % Singleton instance to analyis code | |
% This starts data zooming through the buffer. Set an onCleanup handler in case of error | |
% so that data acquisition can be stopped prior to releasing MATLAB memory used by cbmex. | |
this.setupTrialConfigMemory(); |
This file contains hidden or 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
on readFile( unixPath ) | |
return (do shell script "cat '" & unixPath & "'") | |
end | |
on getSess(sessions_, names, name) | |
repeat with i from 1 to count of names | |
repeat with j from 1 to count of (item i of names) | |
if item j of (item i of names) equals name | |
return item j of (item i of sessions_) | |
end if |
This file contains hidden or 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
#include <stdio.h> | |
#define STRINGIFY(X) "" #X | |
#define STRINGIFY2(X) STRINGIFY(X) | |
#define IF_NOT_DISABLED(ID, FN, ...) \ | |
(!strcmp("DISABLE_" #ID, STRINGIFY2(DISABLE_##ID))) ? FN(ID, ##__VA_ARGS__) : 0 | |
enum my_enum { | |
FOO, |
This file contains hidden or 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 .permanent_memoization import memoize_to_file, memoize_to_folder |
This file contains hidden or 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
#!/bin/bash | |
while [[ 1 ]]; do | |
for i in `seq 1 10`; do | |
echo -e '\a\c' | |
sleep .1 | |
done | |
sleep 1; | |
done | |
## Example: |
This file contains hidden or 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 urllib2 | |
from BeautifulSoup import BeautifulSoup | |
import re | |
#specify the url you want to query | |
url = "https://en.wikipedia.org/wiki/List_of_Off_the_Air_episodes" | |
#Query the website and return the html to the variable 'page' | |
page = urllib2.urlopen(url) |
This file contains hidden or 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 itertools | |
import logging | |
import re | |
import random | |
import curses | |
import time | |
import locale | |
import codecs | |
import sys |
This file contains hidden or 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
#include <vector> | |
#include <string> | |
#include <iostream> | |
class BaseCommand { | |
public: | |
virtual void execute() = 0; | |
}; | |
class BaseExecutor { |
This file contains hidden or 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 re | |
import argparse | |
import os | |
import time | |
import subprocess | |
from subprocess import Popen | |
parser = argparse.ArgumentParser(description='get panopto files') | |
parser.add_argument('curl', type=str) | |
parser.add_argument('out', type=str) |
This file contains hidden or 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
int rt_id_routing(struct msu_type *type, struct local_msu *sender, | |
struct msu_msg *msg, struct msu_endpoint *output) { | |
struct routing_table *table = get_type_from_route_set(&sender->routes, type->id); | |
if (table == NULL) { | |
log_error("No routes available from msu %d to type %s (%d)", | |
sender->id, type->name, type->id); | |
return -1; | |
} | |
// Line MAX_ENDPOINTS could be replaced by a call to get_n_endpoints() |
OlderNewer