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
<?php | |
// load the API Client library | |
$authentication_tokens = array('app_key' => 'APPKEY', | |
'user_key' => 'USERKEY'); | |
$eb_client = new Eventbrite( $authentication_tokens ); | |
$events = $eb_client->user_list_events(array('event_statuses'=>'live,started','display'=>'repeat_schedule')); | |
$repeat_events = array(); | |
foreach ($events->events as $event) { | |
if ( 'yes' === $event->event->repeats ) { |
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
<?php | |
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; | |
$args = array( | |
'paged' => $paged, | |
'post_type' => 'review-single', | |
'category_name' => types_render_field("category-slug-to-pull", array()), | |
'posts_per_page' => '10' | |
)); |
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
<?php | |
/* | |
Template Name: Videos | |
*/ | |
get_template_part( 'header' ); ?> | |
<div class="container"> | |
<div class="header"> | |
<a href="<?php bloginfo('url'); ?>"><div class="logo"></div></a> |
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
Output = IDEALv3(MultiEchoImage,TEs,[-220,0.75;-244,0.1;-164,0.08;43,0.06],Mode,InitialGuess); | |
Ray's description/help for IDEALv3 should explain everything, but simply: | |
MultiEchoImage = X,Y,nEchos | |
TEs = array of echo times (in ms) | |
[-220,0.75;-244,0.1;-164,0.08;43,0.06] is the fat profile IDEAL will use | |
Mode is whether you set an initial phase guess to 0 (Mode = 0), provide an initial guess (Mode = 1) but let IDEAL come to potentially another solution, or 'clamp' to the provided 'initial guess' (Mode = 2) | |
Initial guess is, as I provide it, the output (X,Y,nEchos) from MRIBackgroundCorrect_new_auto (data_background_r output), when I call it: | |
[data_corrected_r,data_background_r]=MRIBackgroundCorrect_new_auto(im31/(2*pi*delTE*10^-3),mask,3); |
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
beerfinder = { | |
map: null, | |
markers: [], | |
windows: [], | |
masterBeerList:[], | |
defaults: { | |
lat: 51.045925999999990000, | |
long: -114.057959999999980000, | |
style: |
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
var beer_list = { | |
'beers': [ | |
{ | |
'beer': { | |
'ID': 9, | |
'name': 'Alberta Crude', | |
'icon': '' | |
} | |
}, |
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 joblib import Parallel, delayed | |
import multiprocessing | |
inputs = range(100000) | |
def processInput(i): | |
return i * i | |
num_cores = multiprocessing.cpu_count() | |
print str(num_cores) |
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
Run the following in different tabs in terminal | |
MDP Constant | |
/usr/bin/python blueberry_move_and_emg.py -t 40000 -s 0.02 -p 1000 -a 1 -r MDP -o 49234 -g 0.1 -u 0.05 -mean 0.005 -std 1.0 | |
MDP Relative | |
/usr/bin/python blueberry_move_and_emg.py -t 40000 -s 0.02 -p 1000 -a 1 -r MDP -m relative -o 49234 -g 0.1 -u 0.05 -mean 0.005 -std 1.0 | |
Human | |
/usr/bin/python blueberry_move_and_emg.py -t 40000 -s 0.02 -p 1000 -a 1 -r Human -o 49234 -g 0.1 -u 0.05 -mean 0.005 -std 1.0 |
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
# Basic Random Cart Pole Performance | |
run the basic cart pole code in the tutorial |
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 gym | |
env = gym.make('Reacher-v1') | |
env.reset() | |
env.render() | |
env.monitor.start('/tmp/reacher-1', force=True) | |
for i_episode in xrange(101): | |
observation = env.reset() | |
for t in xrange(100): | |
env.render() |
OlderNewer