First thing to do:
>>> import numpy
Char array to int array [#]_:
First thing to do:
>>> import numpy
Char array to int array [#]_:
#!/usr/bin/env ruby | |
require 'open-uri' | |
require 'net/http' | |
require 'iconv' | |
require 'optparse' | |
require 'fileutils' | |
require 'cgi' | |
$options = {} |
#!/bin/bash | |
# Might as well ask for password up-front, right? | |
sudo -v | |
# Keep-alive: update existing sudo time stamp if set, otherwise do nothing. | |
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null & | |
# Example: do stuff over the next 30+ mins that requires sudo here or there. | |
function wait() { |
ANSI_X3.4-1968 ANSI_X3.4-1986 ASCII CP367 IBM367 ISO-IR-6 ISO646-US ISO_646.IRV:1991 US US-ASCII CSASCII | |
UTF-8 | |
ISO-10646-UCS-2 UCS-2 CSUNICODE | |
UCS-2BE UNICODE-1-1 UNICODEBIG CSUNICODE11 | |
UCS-2LE UNICODELITTLE | |
ISO-10646-UCS-4 UCS-4 CSUCS4 | |
UCS-4BE | |
UCS-4LE | |
UTF-16 | |
UTF-16BE |
# Short of learning how to actually configure OSX, here's a hacky way to use | |
# GNU manpages for programs that are GNU ones, and fallback to OSX manpages otherwise | |
alias man='_() { echo $1; man -M $(brew --prefix)/opt/coreutils/libexec/gnuman $1 1>/dev/null 2>&1; if [ "$?" -eq 0 ]; then man -M $(brew --prefix)/opt/coreutils/libexec/gnuman $1; else man $1; fi }; _' |
Some things takes much less time and stress once you know the right tool. Below, there is a community edited list of software for scientists.
in General purpose text/code editors. It may be better to have a good editor for everything, than different ones for different languages, scripts, notes.
install: | |
- sudo apt-get install texlive-latex-recommended texlive-latex-extra texlive-fonts-recommended | |
- sudo apt-get install chktex | |
script: | |
- make | |
- chktex -W # Print version information. | |
- chktex -q -n 6 *.tex chapters.*.tex 2>/dev/null | tee lint.out | |
# If lint output is non-empty report an error. | |
- test ! -s lint.out |
#Compilng You need g++ 4.9 to compile this code. Follow these steps to install g++-4.9
After installing run the following command to compile
/usr/bin/g++-4.9 -std=c++11 lambda.cpp
#Running
./a.out
This is a set up for projects which want to check in only their source files, but have their gh-pages branch automatically updated with some compiled output every time they push.
A file below this one contains the steps for doing this with Travis CI. However, these days I recommend GitHub Actions, for the following reasons: