Skip to content

Instantly share code, notes, and snippets.

@raarellano
raarellano / doc.md
Last active April 9, 2024 19:44
Python-SPSS Scripting

Python-SPSS Scripting

The following documentation provides samples and instructions on how to get a Python script working with SPSS.

Standalone Scripts

Scripts can be ran outside of the SPSS GUI through the command prompt by using Modeler Batch/Clemb. Standalone scripts can also be ran through the SPSS GUI using standalone script. Tools > Standalone Script

Running a script using Clemb

Modeler Batch or Clemb is included with Modeler Client. It is not a separate install. If you have Modeler client you can use the clemb.exe that is in the bin folder and run against the local server. You can find the executable here: <path to spss program directory>\Modeler\18.0\bin\clemb.exe

@raarellano
raarellano / bash.rc
Last active April 17, 2021 15:50
pg_restore from Heroku
pg_restore --verbose --clean --no-acl --no-owner -U {user} -h {host} -d {database_name} -p {port} {file_name}
@raarellano
raarellano / README.markdown
Last active October 10, 2016 20:58
Setup automated backup scripts

Setup folder structure

$ sudo su postgres

$ cd ~

$ mkdir -p backups/{daily,weekly,monthly,yearly} scripts

Install and Configure AWS

@raarellano
raarellano / bash.rc
Last active March 24, 2016 18:47
Git Useful commands
Delete remote
git push origin --delete <branchName>
Pull from new remote branch
git branch --set-upstream-to=origin/branch_name
Push to new remote branch
git push --set-upstream origin branch_name
@raarellano
raarellano / Gemfile
Created January 16, 2014 15:17
Best in place
gem 'best_in_place'
@raarellano
raarellano / heroku_precompile_issue
Last active December 31, 2015 21:29
If there are problems with Heroku precompiling assets run the following. Only for Rails 4
heroku labs:enable user-env-compile
Or
heroku labs:disable user-env-compile
heroku labs:enable user-env-compile
@raarellano
raarellano / remote_radio.html.haml
Created December 17, 2013 22:16
Submit Radio button with a remote form in a Rails 4 app.
= form_for(@edit_single_response, remote: true, authenticity_token: true, :html => {:class => 'form-horizontal form-for-responses'} ) do |f|
- question.response_options.each do |response_option|
.form-group
%label.radio
= f.radio_button :response_option_number, response_option.id, :onclick => '$(this).trigger("submit.rails")'
%span
=response_option.text
@raarellano
raarellano / .Acts as List for Rails 3 & 4.md
Last active December 30, 2015 08:49
Gives order to lists through a drag and drop functionality.
@raarellano
raarellano / bash.rc
Last active December 3, 2015 20:18
PostgreSQL Backups
#Backup Database
sudo su - postgres
pg_dump postgres > postgres_db.bak
#Backup Remote System
pg_dump -h remote_host -p remote_port name_of_database > name_of_backup_file
#Restore Datadump
psql empty_database < backup_file
@raarellano
raarellano / bash.rc
Created September 18, 2015 20:15
Reprocess images for paperclip
User.find_each { |u| u.avatar.reprocess! }