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
pic = Import["ExampleData/rose.gif"]; | |
Module[{width = 28, layers = 6, offset, highlight, slides, img, | |
data}, | |
offset[x_, slide_] := 15/(1 + Exp[-(x - slide) 3]); | |
highlight[x_, slide_] := | |
0.85 PDF[NormalDistribution[slide, 1], x]/ | |
PDF[NormalDistribution[slide, 1], slide] + 0.15; | |
img = Table[pic, {n, 1, layers}]; | |
Manipulate[Graphics3D[{ | |
Table[{ |
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
------------------------------------------------------------------------ | |
Running job #1 | |
------------------------------------------------------------------------ | |
Running 'Model estimation' | |
SPM8: spm_spm (v4191) 09:58:05 - 03/10/2011 | |
======================================================================== | |
Initialising parameters : ...done | |
Plane 34/34 , block 1/1 : ...done | |
Failed 'Model estimation' |
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
% --- Executes on button press in pushbutton17. | |
function pushbutton17_Callback(hObject, eventdata, handles) | |
% hObject handle to pushbutton17 (see GCBO) | |
% eventdata reserved - to be defined in a future version of MATLAB | |
% handles structure with handles and user data (see GUIDATA) | |
set(handles.edit3,'String','Loading Learning Algorithm From Default Directory'); | |
pause(3); | |
set(handles.edit3,'String','Loading..'); | |
pause(3); | |
set(handles.edit3,'String','Succesfully Loaded Learning Algorithm Library'); |
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
hrf = spm_hrf(1); | |
box = [zeros(1,2) 1.9*ones(1,350), zeros(1,48)]; | |
result = conv(box, hrf); |
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
[["Brewery", "Beer", "Style", "Origin", "Volume", "ABV", "Description"], ["21st Amendment/Ninkasi", "Allies Win the War", "Amber Ale", "California", "8oz", "8.5", "this amber ale from 21st amendment and Ninkasi boasts citrus hops melded with caramel and dark fruit "], ["Ace", "Pear Cider", "Cider", "Sonoma County, CA", "8 oz", "5", "crisp, clean, gluten-free, refreshingly delicious pear cider"], ["Ace", "Pumpkin Cider", "Fruit Beer", "Sonoma County, CA", "8oz", "5", "seasonal flavors of spice and pumpkin; sweet with a tart apple finish "], ["Allagash ", "Curieux ", "Tripel", "Portland, ME", "8 oz", "11", "a Belgian triple aged in Jim Beam barrels, bourbonlicious! "], ["Allagash ", "Hugh Malone", "Belgian-style IPA", "MAine", "8oz", "8.5", "great Belgian style IPA, pine and grapefruit hop character, dry and astringent finish"], ["Avery", "DuganA IPA", "American Double IPA", "Colorado", "16oz", "8.5", "pine and citrus hop bitterness with malty sweetness"], ["Baladin", "Ali-skir", "Belgian Style Light Strong Ale |
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
--- | |
- - Brewery | |
- Beer | |
- Style | |
- Origin | |
- Volume | |
- ABV | |
- Description | |
- - 21st Amendment/Ninkasi | |
- Allies Win the War |
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
require "nokogiri" | |
require "open-uri" | |
require "yaml" | |
# Let's check out The Porter's selection | |
doc = Nokogiri::HTML(open('http://www.theporterbeerbar.com/drink/beer/')) | |
puts "Loaded the website OK" | |
# Make an array to hold all of the data | |
data = Array.new |
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
include Process | |
pid = spawn("rails r my_file_1.rb") | |
waitpid(pid, 0) | |
pid = spawn("rails r my_file_2.rb") | |
waitpid(pid, 0) | |
pid = spawn("rails r my_file_3.rb") | |
waitpid(pid, 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
Dir['*.rb'].each do |file_name| | |
pid = spawn("rails r #{file_name}") | |
waitpid(pid, 0) | |
end |
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
#include <iostream> | |
#include <string> | |
#include <math.h> | |
using namespace std ; | |
bool checkForDouble(string const& s) { | |
istringstream ss(s); | |
double d; | |
return (ss >> d) && (ss >> std::ws).eof(); | |
} |
OlderNewer