- $ (e.g., $4) represents columns, @ (e.g., @2) represents rows.
- $> means the last column.
Last row sum of all above:
import numpy as np | |
import pandas as pd | |
def cal_d(partial_panel, nvid_jt, movchr, r_all): | |
for r, row in enumerate(partial_panel.itertuples()): | |
showdate = pd.Timestamp(str(row.showdate)) | |
nvid = row.nvid | |
reldate = movchr.at[nvid, 'reldate'] |
Last row sum of all above:
Qualtrics.SurveyEngine.addOnload(function() | |
{ | |
/*Place your JavaScript here to run when the page loads*/ | |
var currentTime = new Date(); | |
var hours = currentTime.getHours(); | |
var minutes = currentTime.getMinutes(); | |
var current_time_in_minutes = hours * 60 + minutes |
/* | |
- 2021-09-24 Received this from He | |
*/ | |
with elasticity_xp as | |
(select | |
msg.load_uuid | |
, max_by(msg.elasticity_experiment.pre_xp_price, ts) as pre_xp_price | |
, max_by(msg.elasticity_experiment.post_xp_price, ts) as post_xp_price | |
, max_by(msg.elasticity_experiment.perturbation_factor, ts) as perturbation_factor |
# test partial | |
from functools import partial | |
def frozen_func(): | |
return 2 | |
def target_func(x, frozen_func): |
numpy.seterr(all='raise') |
# 2021-06-09 This is older way | |
import matplotlib.pyplot as plt | |
def plot_bar_chart_interaction( | |
means_var1_low, | |
means_var1_high, | |
var1_name="", | |
var2_name="", | |
title="", |
from IPython.display import display |
import datetime | |
# get UTC timestamp in seconds | |
datetime_utc_origin = datetime.datetime(1970, 1, 1) | |
# now | |
utc_timestamp_now = (datetime.datetime.utcnow() - datetime_utc_origin).total_seconds() |
import math | |
n = 33 # number of questions | |
r = 6 # number of correct answers | |
probs = [] | |
for r in range(n): |