// constants won't change. They're used here to set pin numbers:
const int buttonPin = 2; // the number of the pushbutton pin
const int ledPin = 13; // the number of the LED pin
// variables will change:
int buttonState = 0; // variable for reading the pushbutton status
void setup() {
// initialize the LED pin as an output:
/* Proc freq with descending order */ | |
proc freq data=Gov_C_SAS order=freq; | |
tables state; | |
run; |
# Import Pandas | |
import pandas as pd | |
# Import CSV | |
data = pd.read_csv("../input/us-election-2020/governors_county.csv"); | |
# Frequencies in Actual Order | |
datax = data['state'].value_counts().sort_index() | |
# Create a dataframe |
/* Import the CSV */ | |
FILENAME Gov_C "/folders/myfolders/Assignments/governors_county.csv"; | |
PROC IMPORT DATAFILE=Gov_C DBMS=CSV OUT=WORK.Gov_C_SAS; | |
GETNAMES=YES; | |
RUN; | |
/* freq procedure */ | |
proc freq data=Gov_C_SAS; |
O(1)
Constant - no loops
O(log N)
Logarithmic - usually searching algorithms have log n if they are sorted (Binary Search)
O(n)
Linear - for loops, while loops through n items
O(n log(n))
Log Linear - usually sorting operations
O(n^2)
Quadratic - every element in a collection needs to be compared to ever other element. Two nested loops
O(2^n)
Exponential - recursive algorithms that solves a problem of size N
# This basically installs some dependencies, adds two SQL scripts and runs a provided SH script. | |
FROM apache/airflow:2.0.0-python3.7 | |
USER root | |
# INSTALL TOOLS | |
RUN apt-get update \ | |
&& apt-get -y install libaio-dev \ | |
&& apt-get install postgresql-client | |
RUN mkdir extra | |
USER airflow |
Operators in the where clause
- Equal (=)
- Greater Than (>)
- Less Than (<)
- Greater Than or Equal (>=)
- Less Than or Equal (<=)
- Not Equal (<>)
- BETWEEN () : Between a certain range
- LIKE () : Search for a pattern
-
ACCOUNT_TABLE; Data ACCOUNT_TABLE;
infile DATALINES delimiter=','; INPUT FirstName $ LastName $ Age Gender $;
DATALINES; x,y,23,Male z,w,45,Female a,b,64,Male
sudo (SuperUser DO): run programs / commands with administrative privileges
apt-get
sudo apt-get update The first command you need to run in any Linux system after a fresh install. Updates the database and let your system know if there are newer packages available or not.
sudo apt-get upgrade For upgrading all the packages with available updates.