Skip to content

Instantly share code, notes, and snippets.

View vincentchu's full-sized avatar

Vincent Chu vincentchu

View GitHub Profile
def set_facebook_session
returning session_set = session_already_secured? || secure_with_facebook_params! || secure_with_cookies! || secure_with_token! do
if session_set
begin
post('facebook.users.getLoggedInUser', :session_key => facebook_session.session_key)
capture_facebook_friends_if_available!
Session.current = facebook_session
rescue
clear_facebook_session_information
<% @fb_user.user.find_my_subscriptions(16).each do |sub| %>
<% if !sub.is_private %>
<% site_owner = sub.users[0] %>
<% if (site_owner) %>
<a href="<%=url_for_site(sub)%>">
<img style="border:1px solid #CCCCCC" src="<%=site_owner.user_profile.profile_image_35%>" width='35' height='35' alt='<%=site_owner.nickname%>' />
</a>
FB.XFBML.Host.autoParseDomTree = false;
var all_spans = document.getElementsByTagName("span");
var i = 0;
var longstring = "ids: ";
for (i=0; i<all_spans.length; i++) {
if ( /xfbml_nae_.*/.test(all_spans[i].id) ) {
longstring += (all_spans[i].id + " -- ");
function writePDB(pdbFile, coords, origin, delta);
n = size(coords, 1);
inds = [1:n]';
coords = coords .* repmat(delta, n, 1) + repmat(origin, n, 1);
foo = [inds coords];
fid = fopen(pdbFile, 'w');
#!/bin/bash
export CC='icc'
export CXX='icc'
export F77='ifort'
export CFLAGS='-O3'
export FFLAGS='-O3'
export CXXFLAGS=${CFLAGS}
\begin{figure}[hp!]
\begin{center}
\makebox[0cm]{\includegraphics[width=6in]{./figures_paper/paperFig-specificity-composite.pdf}}
\end{center}
\caption{Simulated salt-induced folding progress curves, in terms of fraction folded ($P_F$), for HJH motifs with three tertiary contact locations ($\blacklozenge$, $\bullet$, $\blacktriangle$) and sPEG (A) and dPEG (D) junctions. Corresponding values for $\DD{G}$ are plotted in B and E. Values for $\DD{U}$ (- -) and $T\DD{S}$ (---) are plotted in C and F. $\DD{U}$ includes a constant contribution from the tertiary contact ($-13.5\,\kt$ and $-14.5\,\kt$ respectively for sPEG and dPEG junctions). The horizontal black dotted lines in C and F denote the average value of $\DD{S}$ over the range of salt conditions.}
\label{folding}
\end{figure}
% loop over every row in exclusion array
for i=1:size(exclusionarray, 1)
curr_row = exclusionarray(i, :);
% find the rows in test where the condition is satisfied, using the first
% two columns of excl. array as the criterion
% replace the third column of the right row in test with the third col of
% the current row in excl. array
for j=1:size(test, 1)
class LiveServices
# MSFT Live Services Application Information
LIVE_APP_ID = {'development' => 'XXX', 'staging' => 'XXX', 'production' => 'XXX'}
LIVE_SECRET = {'development' => 'SHH', 'staging' => 'SHH', 'production' => 'SHH'}
PRIVACY_URL = {'development' => 'http://privacy.com',
'staging' => 'http://privacy.com',
'production' => 'http://privacy.com'}
DELEGATE_PATH = "https://consent.live.com/Delegation.aspx"
#!/usr/bin/perl
$cookie="cookies.txt";
$rackNum = 16;
$docID = 84699;
$pgStart = 262;
$pgEnd = 291;
$header = "maggiore-qft-new-";
$sleepTime = 300;
www.myilibrary.com TRUE / FALSE 1218315550 lastpage 291
www.myilibrary.com TRUE / FALSE 1218315550 abcebklocn 23
www.myilibrary.com TRUE / FALSE 1218315550 ASPSESSIONIDAABDBQAT FNMJDJDCOIMKLAEEDIJFKKLL
www.myilibrary.com TRUE / FALSE 1218315550 webauth_at SJx22PGTgrr6sRGW+ktjh1JgB1g+ASZPlrYEWUaBsFlYjIjVKB+bPdY1qiturr2/9mZRlDvZ3+o7E9PBAiXsTf0yruvRzmK5jNwGvg68XFysy204