Post Title
This is a sentence. This is a sentence
* Theme settings will be saved for your next visit
I am a licensed Electronics Engineer with a total of 7 years of experience in the Semiconductor and Telecommunication industries
I am a licensed Electronics Engineer with a total of 7 years of experience in the Semiconductor and Telecommunication industries
I am a licensed Electronics Engineer with a total of 7 years of experience in the Semiconductor and Telecommunication industries
FullStack Developer with primary focus on Django and React: Download Resume
This is a sentence. This is a sentence
This is a sentence. This is a sentence
This is a sentence. This is a sentence This is a sentence. This is a sentence


I'm sure you have a lot of junk. Put it in that box.
And that's the way you do it.
1 GB
filesize limit
24 hours
box lifetime
Unlimited
files per box
Open Source
OneTimeBox is an open source project, operating under the MIT license. If you would like to contribute, or want to host your own OneTimeBox service, check out the Github repo for detailed instructions on registering, building, and deploying your own instance for free.


The sequelize instance...
This method attempts to update the lastRunTime of the Job to the current timestamp using the currently known value in the where clause. If no other server running the scheduler has updated the record already, then this update will succeed and the updated Job is returned in the promise. In that case the scheduler will emit an event for the Job. However if the update fails, then no events will be emitted for this job until it is reloaded in the next database load interval.
Loads the jobs from the database that need to be emitted in the given interval.
The number of seconds until the next call to this method.
Generated using TypeDoc
Implements all the functions needed for the scheduler to maintain and persist the job records. SequelizeAdapter is constructed as follows:
const sequelizeAdapter = new SequelizeAdapter(sequelize, options); You'll need to pass in your sequelize instance, and an optional SequelizeAdapterOptions object. It has a single property 'tablename' whene you have override the default name of 'job'.


{% include schedule/intro.html date='October 6th' %}
{% include schedule/header.html tracks='1' %}
{% include schedule/event.html time='08:30 - 09:20' title='Check-in' fill='true' %}
{% include schedule/event.html time='09:20 - 09:30' title='GrUSP presentation' fill='true' %}
{% include schedule/event.html time='09:30 - 09:40' title='FEVR & ReactJS Day presentation' fill='true' %}
{% include schedule/talk.html time='09:40 - 10:25' title='setState demystified' keynote='true' fill='true' %}
{% include schedule/talk.html time='10:25 - 10:55' title='Why you should (not) build a reusable components library for your company' fill='true' %}
{% include schedule/pause.html time='10:55 - 11:15' title='Short break' icon="coffee" fill='true' %}
{% include schedule/talk.html time='11:15 - 11:45' title='Introduction To Elm For React Developers' fill='true' %}
{% include schedule/talk.html time='11:45 - 12:15' title='On the way to making the React components more reusable' fill='true' %}
{% include schedule/talk.html time='12:15 - 12:45' title='If it quacks like React and renders like React, is it React?' fill='true' %}
{% include schedule/pause.html time='12:45 - 14:20' title='Lunch + Lightning talks' icon="food" fill='true' %}
{% include schedule/talk.html time='14:20 - 14:55' title='Introduction to ReactVR - because 2D is not good enough!' fill='true' %}
{% include schedule/talk.html time='14:55 - 15:25' title='The story of storybook' fill='true' %}
{% include schedule/talk.html time='15:25 - 15:55' title='Shared Element Transition with React Native' fill='true' %}
{% include schedule/talk.html time='15:55 - 16:25' title='Build Your React Application with StyledComponents and FlexBox' fill='true' %}
{% include schedule/pause.html time='16:25 - 16:55' title='Coffee break' icon="coffee" fill='true' %}
{% include schedule/talk.html time='16:55 - 17:25' title='React state management in a GraphQL era' fill='true' %}
{% include schedule/talk.html time='17:25 - 17:55' title='Styling Components for React UI Kits' fill='true' %}
{% include schedule/talk.html time='17:55 - 18:25' title='Mutable or Immutable? Why not both!' keynote='true' fill='true' %}
{% include schedule/pause.html time='18:25 - 18:35' title='Bye bye from GrUSP & FEVR' icon="bar" fill='true' %}
{% include schedule/pause.html time='18:40 - 20:00' title='Happy hour!' icon="bar" fill='true' %}
{% include schedule/header.html track='1' %}
{% include schedule/event.html time='08:30 - 09:20' title='Check-in' fill='true' %}
{% include schedule/event.html time='09:20 - 09:30' title='GrUSP presentation' fill='true' %}
{% include schedule/event.html time='09:30 - 09:40' title='FEVR & ReactJS Day presentation' fill='true' %}
{% include schedule/talk.html time='09:40 - 10:25' title='setState demystified' keynote='true' fill='true' %}
{% include schedule/talk.html time='10:25 - 10:55' title='Why you should (not) build a reusable components library for your company' fill='true' %}
{% include schedule/pause.html time='10:55 - 11:15' title='Short break' icon="coffee" fill='true' %}
{% include schedule/talk.html time='11:15 - 11:45' title='Introduction To Elm For React Developers' fill='true' %}
{% include schedule/talk.html time='11:45 - 12:15' title='On the way to making the React components more reusable' fill='true' %}
{% include schedule/talk.html time='12:15 - 12:45' title='If it quacks like React and renders like React, is it React?' fill='true' %}
{% include schedule/pause.html time='12:45 - 14:20' title='Lunch + Lightning talks' icon="food" fill='true' %}
{% include schedule/talk.html time='14:20 - 14:55' title='Introduction to ReactVR - because 2D is not good enough!' fill='true' %}
{% include schedule/talk.html time='14:55 - 15:25' title='The story of storybook' fill='true' %}
{% include schedule/talk.html time='15:25 - 15:55' title='Shared Element Transition with React Native' fill='true' %}
{% include schedule/talk.html time='15:55 - 16:25' title='Build Your React Application with StyledComponents and FlexBox' fill='true' %}
{% include schedule/pause.html time='16:25 - 16:55' title='Coffee break' icon="coffee" fill='true' %}
{% include schedule/talk.html time='16:55 - 17:25' title='React state management in a GraphQL era' fill='true' %}
{% include schedule/talk.html time='17:25 - 17:55' title='Styling Components for React UI Kits' fill='true' %}
{% include schedule/talk.html time='17:55 - 18:25' title='Mutable or Immutable? Why not both!' fill='true' %}
{% include schedule/pause.html time='18:25 - 18:35' title='Bye bye from GrUSP & FEVR' icon="bar" fill='true' %}
{% include schedule/pause.html time='18:40 - 20:00' title='Happy hour!' icon="bar" fill='true' %}
{% include index/newsletter.html %}
{% include index/sponsors.html %}


class: center, middle, inverse, title-slide # File Organization & Data Cleaning in R ### Isabella Richmond ### October 12, 2021 [updated: October 11 2021] --- # What we are learning today & why - Everyone wants to learn about file organization and data cleaning/processing! So here we go!  --- # What we are learning today & why - Everyone wants to learn about file organization and data cleaning/processing! So here we go!  --- # A couple notes - Data archiving in the Ziter lab - We do have a place and and specific formatting requirements for data archiving - we can discuss this more later but this exists (reach out if this is something you want to do in the next couple of weeks)  .footnote[ [1]: [Scientific Computing](https://sciencecomputing.io) ] --- class: important # Part 1: Data & File Organization ## [Tidy Data](https://www.jstatsoft.org/article/view/v059i10) - Tidy data is a framework for how data should be formatted for easy and efficient data cleaning created by [Hadley Wickham](http://hadley.nz/) - These principles are the underpinnings of `tidyverse` packages (e.g. ggplot2) ## Principles 1. Each variable forms a column 2. Each observation forms a row 2. Each type of observational unit forms a table --- class: important # Part 1: Data & File Organization ## Tidy Data - The best way to start data/file organization is to use best practices in data collection/spreadsheet formatting - There are some really [common spreadsheet errors](https://datacarpentry.org/spreadsheet-ecology-lesson/02-common-mistakes/index.html) that ecologists often use when collecting data - We are not going to format a spreadsheet today, but I'd encourage you to take a look at that link and incorporate suggestions next time you're collecting/inputting data --- class: important # Part 1: Data & File Organization Good file structure is important because it: - Ensures the integrity of your data - Makes it easier to share your code with people - Makes it easier to upload your code/data with manuscript submission - Makes it easier to come back after a break Best practices include (but are not limited to): - Use an R Project file so that your project is easily shareable - Always treat raw data as read-only - Store cleaned data in a separate folder (or distinguish clearly) - Treat output as disposable - you should always be able to re-generate with script - Have separate function and figure scripts .footnote[ [1]: [Software Carpentry Project Management](https://swcarpentry.github.io/r-novice-gapminder/02-project-intro/index.html) ] --- class: important # Part 1: Data & File Organization This is how I set up my file structure with my R Projects. If you want more examples, most of my repositories on [GitHub](https://github.com/icrichmond/) are set up in in the same (or very similar manner):  --- class: important # Part 1: Data & File Organization This is how I set up my file structure with my R Projects. If you want more examples, most of my repositories on [GitHub](https://github.com/icrichmond/) are set up in in the same (or very similar manner):  --- class: review # Part 2: File Organization Practice All together now! - We are going to download messy and unstructured GitHub folder from [here](https://github.com/icrichmond/ZULE-data-cleaning-workshop) & unzip - Then we are going to set up an R project & the file structure we just talked about Ok... Moving on to cleaning data in R! --- class: important # Part 3: Cleaning Data in R Some reasons why I clean my data in R (use the tool that works for you) 1. Reproducible 2. Open-source and cross-platform 3. Reliable & clear 4. High-quality graphics 5. Great community & resources 6. Scales with datasets 7. Steep learning curve with a high payoff .footnote[ [1]: [Data Carpentry Data Analysis & Visualiation in R for Ecologists](https://datacarpentry.org/R-ecology-lesson/00-before-we-start.html) ] --- class: important # Part 3: Cleaning Data in R Two big "ecosystems" for data cleaning in R .pull-left[ ## `tidyverse` - makes functions corresponding to the most common operations - "do one thing at a time approach" - chain together multiple things to make a easily understood group of operations - many dependencies ] .pull-right[ ## `data.table` - provides a high performance version of base R - no dependencies - complex syntax (I think) but it is very powerful once understood and can make your code extremely efficient by combining many operations and minimizing copying data, freeing up memory ] .footnote[ [1]: [tidyverse ](https://www.tidyverse.org/) [2]: [data.table ](https://rdatatable.gitlab.io/data.table/) [3]: [Comparison of tidyverse and data.table](https://atrebas.github.io/post/2019-03-03-datatable-dplyr/) ] --- class: review # Part 4: Practice cleaning messy Data in R I have created a spreadsheet that integrates MANY of the common problems in datasets... We are going to go through step by step and clean this dataset so it is ready for analysis. **NOTE:** code is provided using both tidyverse and data.table philosophies in this workshop. Feel free to choose whichever one makes sense to you in the future (or mix & match!). Providing multiple ways to do everything was meant to give you options, not confuse you **NOTE 2:** this code assumes you set up your files in an R project with the datasheet in an `input/` folder --- class: review # Part 4: Practice cleaning messy Data in R ## Problem: Importing Data `tidyverse` ```r # initial import tdf <- read_csv("input/example-data.csv") # read_csv doesn't recognize that the file is delimited using ";" instead of ",". Let's use read_delim to fix that tdf <- read_delim("input/example-data.csv", delim = ";") # we still have the problem that the first 8 lines need to be removed for this to be functional tdf <- read_delim("input/example-data.csv", delim = ";", skip = 8) ``` `data.table` ```r # initial import using data.table dtdf <- fread("input/example-data.csv") # fread doesn't recognize that the file is delimited using ";" instead of ",". Let's add it to the data.table argument dtdf <- fread("input/example-data.csv", sep = ";") # we still have the problem that the first 8 lines in data.table need to be removed for this to be functional dtdf <- fread("input/example-data.csv", sep = ";", skip = 8) ``` --- class: review # Part 4: Practice cleaning messy Data in R ## Problem: Special Characters & UTF-8 Encoding What would life in Québec be without special characters! When we investigate our tidyverse dataframe, we see an issue with "Montréal". This issue often arises with accents and other special characters, when the dataframe is not properly read as UTF-8 `tidyverse` ```r # tidyverse can be re-encoded to UTF-8 after import tdf$City <- enc2utf8(as(tdf$City, "character")) ``` `data.table` ```r # data.table incorporates it into the import line dtdf <- fread("input/example-data.csv", sep = ";", skip = 8, encoding = "UTF-8") ``` --- class: review # Part 4: Practice cleaning messy Data in R ## Problem: NAs & Associated Values There are often NAs in our datasets, which we may or may not want to keep often, there are also other values that count, biologically, as NAs but are not read into R automatically as NAs. For example, blanks, "NA" (instead of a true NA), zeroes (for some variables), etc. `tidyverse` ```r # Strategy A: When importing (for tidyverse only) tdf <- read_delim("input/example-data.csv", delim = ";", skip = 8, na = c(""," ", "NA", 0, "0")) # Strategy B: After importing tdf$DBH <- na_if(tdf$DBH, 0) # Drop the NAs tdf <- drop_na(tdf) ``` `data.table` ```r # Strategy B: After importing dtdf$DBH[dtdf$DBH == 0] <- NA # Drop the NAs dtdf <- na.omit(dtdf) ``` --- class: review # Part 4: Practice cleaning messy Data in R ## Problem: Duplicates Sometimes, there are duplicate observations/rows in datasets. These can really mess up your analysis if you don't catch them. Testing your dataset for duplicates and then removing what you find is an important step in data cleaning! `tidyverse` ```r # investigate which lines are duplicates tdup <- tdf[duplicated(tdf), c("TreeID", "City", "DBH", "Species,")] # remove duplicates tdf <- distinct(tdf) ``` `data.table` ```r # investigate which lines are duplicates dtdup <- dtdf[duplicated(dtdf), c("TreeID", "City", "DBH", "Species,")] # remove duplicates dtdf <- unique(dtdf) ``` --- class: review # Part 4: Practice cleaning messy Data in R ## Problem: Column Names Bad column names can make your life a living hell. Before moving into analysis make sure your column names follow best practices, you'll thank me later! You don't want numbers, special characters, or spaces in your column names. Let's change our really bad column names. `tidyverse` ```r tdf <- rename(tdf, Date = "1st Date Measured", Time = "Time Measured", Species = "Species,") ``` `data.table` ```r dtdf <- setnames(dtdf, c("1st Date Measured", "Time Measured", "Species,"), c("Date", "Time", "Species")) ``` --- class: review # Part 4: Practice cleaning messy Data in R ## Problem: Value Formatting - Spelling Mistakes In our dataset, Toronto is spelled wrong. If you have a huge dataset with many spelling errors, OpenRefine is a great tool to use. For us, our dataset is small and we can visually inspect it for spelling errors so we will replace the error in R. `tidyverse` ```r tdf$City <- recode(tdf$City, Toronno = "Toronto") ``` `data.table` ```r dtdf$City[dtdf$City %in% c("Toronno", "TO", "The birthplace of Drake")] <- "Toronto" ``` --- class: review # Part 4: Practice cleaning messy Data in R ## Problem: Value Formatting - Formatting Column Types City and species are currently formatted as character types, but for our study we want them to act as factors - we need to reclassify them. Its always important to check the classes of your data, R makes assumptions when importing your data and can be wrong! `tidyverse` ```r tdf$City <- as_factor(tdf$City) tdf$Species <- as_factor(tdf$Species) ``` `data.table` ```r factor_cols <- c("City", "Species") dtdf[ ,(factor_cols) := lapply(.SD, as.factor), .SDcols = factor_cols] ``` --- class: review # Part 4: Practice cleaning messy Data in R ## Problem: Value Formatting - Text Parsing We have a comma at the end of our species names, that we don't really want. We can use text parsing to remove those unwanted commas from the Species column. `tidyverse` ```r tdf$Species <- str_remove(tdf$Species, "[,]") # this will remove a comma anywhere in the column ``` `data.table` ```r dtdf$Species <- gsub(",","",dtdf$Species) ``` --- class: review # Part 4: Practice cleaning messy Data in R ## Problem: Date/Time Formatting Date and time formatting in R can be really tricky and frustrating sometimes but is often really necessary for field data (and other data). `anytime` is a cool package that makes the process a little bit easier. First we want a date-time column, not separate entities `tidyverse` ```r tdf <- unite(tdf, "DateTime", Date:Time, sep = " ") ``` `data.table` ```r dtdf[,DateTime:=paste0(Date," ",Time)] dtdf[, c("Date","Time"):=NULL] ``` Now we use anytime to format the columns. NOTE: Be careful of time zones, anytime will automatically set to where you are. If you are using data from other time zones and need to indicate that, use the `parsedate` package. ```r tdf$DateTime <- anytime(tdf$DateTime) dtdf$DateTime <- anytime(dtdf$DateTime) ``` --- class: review # Part 4: Practice cleaning messy Data in R ## Problem: Reshaping Often the way datasets are initially set up are not ideal for things like plotting and modelling (they don't follow tidy data practices). So we need to reshape the dataframe - make it longer or wider - to do what we need to do. `tidyverse` ```r # let's make the dataframe wider - we only want one entry per city tdf_wide <- pivot_wider(tdf, names_from = Species, values_from = DBH) # Hmmmmm that is not the most useful format - let's make it longer again (or melt it) tdf_long <- pivot_longer(tdf_wide, cols = 4:14, names_to = "Species", values_to = "DBH", values_drop_na = T) ``` `data.table` ```r # dcast and melt for data.table dtdf_wide <- dcast(dtdf, formula = City + TreeID + DateTime ~ Species, value.var = "DBH") dtdf_long <- melt(dtdf_wide, id.vars = c("TreeID","City", "DateTime"), variable.name = "Species", value.name = "DBH", na.rm = T) ``` --- class: review # Part 4: Practice cleaning messy Data in R ## Problem: Saving/Exporting Data Don't forget to save your beautiful, cleaned data! Maybe you have a "cleaned" folder in your input directory, save it there. If this is a final product, save it to output. If this is an intermediate item, the best way to save it is as an .rds file If this is a final product or something you will be sharing, save it as a .csv `tidyverse` ```r saveRDS(tdf, "output/TidyData.rds") write_csv(tdf, "output/TidyData.csv") ``` `data.table` ```r saveRDS(dtdf, "output/DataTableData.rds") fwrite(dtdf, "output/DataTableData.csv") ``` --- class: important # Resources - [data.table in R Guide](https://www.machinelearningplus.com/data-manipulation/datatable-in-r-complete-guide/) - [R for Reproducible Scientific Analysis](https://swcarpentry.github.io/r-novice-gapminder/) - [Data Analysis & Visualization in R for Ecologists](https://datacarpentry.org/R-ecology-lesson/index.html) - [Data Organization in Spreadsheets for Ecologists](https://datacarpentry.org/R-ecology-lesson/index.html) - [Tidy Data by Hadley Wickham](https://www.jstatsoft.org/article/view/v059i10) - [Dr. Christie Bahlai's Reproducible Quantitative Methods Course](https://cbahlai.github.io/rqm-template/) - [Wildlife Ecology & Evolution Lab's Guide by Alec Robitaille](https://weel.gitlab.io/guide/) - [data.table Website](https://rdatatable.gitlab.io/data.table/) - [tidyverse Website](https://www.tidyverse.org/) - [xaringan Website: package I used to make these slides](https://slides.yihui.org/xaringan/#1) - [OpenRefine](https://openrefine.org/)


… is the web-based analysis and visualization platform created at Sandia National Laboratories.
Copyright 2013, Sandia Corporation. Under the terms of Contract DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains certain rights in this software.
Sandia National Laboratories is a multimission laboratory managed and operated by National Technology and Engineering Solutions of Sandia, LLC., a wholly owned subsidiary of Honeywell International, Inc., for the U.S. Department of Energy’s National Nuclear Security Administration under contract DE-NA-0003525.


| Book of Mormon |
Annotations |
|
Chapter 16
|
|
|
1 And now it came to pass that after I, Nephi, had made an
end of speaking to my brethren, behold they said unto me: Thou hast declared
unto us hard things, more than we are able to bear.
|
|
|
2 And it came to pass that I said unto them that I knew
that I had spoken hard things against the wicked, according to the truth; and
the righteous have I justified, and testified that they should be lifted up
at the last day; wherefore, the guilty taketh the truth to be hard, for it
cutteth them to the very center.
|
|
|
3 And now my brethren, if ye were righteous and were
willing to hearken to the truth, and give heed unto it, that ye might walk
uprightly before God, then ye would not murmur because of the truth, and say:
Thou speakest hard things against us.
|
|
|
4 And it came to pass that I, Nephi, did exhort my
brethren, with all diligence, to keep the commandments of the Lord.
|
|
|
5 And it came to pass that they did humble themselves
before the Lord; insomuch that I had joy and great hopes of them, that they
would walk in the paths of righteousness.
|
|
|
6 Now, all these things were said and done as my father
dwelt in a tent in the valley which he called Lemuel.
|
|
|
7 And it came to pass that I, Nephi, took one of the
daughters of Ishmael to wife; and also, my brethren took of the daughters of
Ishmael to wife; and also Zoram took the eldest daughter of Ishmael to wife.
|
|
|
8 And thus my father had fulfilled all the commandments of
the Lord which had been given unto him. And also, I, Nephi, had been blessed
of the Lord exceedingly.
|
|
|
9 And it came to pass that the voice of the Lord spake
unto my father by night, and commanded him that on the morrow he should take
his journey into the wilderness.
|
|
|
10 And it came to pass that as my father arose in the
morning, and went forth to the tent door, to his great astonishment he beheld
upon the ground a round ball of curious workmanship; and it was
of fine brass. And within the ball were two spindles; and the
one pointed the way whither we should go into the wilderness.
|
This isn’t conclusively copied from The Late War
Between the United States and Great Britain published in 1816, but the
similarities are interesting.
Describing torpedoes, it says,
“Now these wonderful torpedoes were made partly of
brass and partly of iron, and were cunningly contrived with curious
works, like unto a clock; and as it were a large ball”
(The Late War, 50:24, A Comparison of The Book of Mormon and The Late War).
|
|
11 And it came to pass that we did gather together
whatsoever things we should carry into the wilderness, and all the remainder
of our provisions which the Lord had given unto us; and we did take seed of
every kind that we might carry into the wilderness.
|
|
|
12 And it came to pass that we did take our tents and depart
into the wilderness, across the river Laman.
|
|
|
13 And it came to pass that we traveled for the space of
four days, nearly a south-southeast direction, and we did pitch our tents
again; and we did call the name of the place Shazer.
|
|
|
14 And it came to pass that we did take our bows and our
arrows, and go forth into the wilderness to slay food for our families; and
after we had slain food for our families we did return again to our families
in the wilderness, to the place of Shazer. And we did go forth again in the
wilderness, following the same direction, keeping in the most fertile parts
of the wilderness, which were in the borders near the Red Sea.
|
|
|
15 And it came to pass that we did travel for the space of
many days, slaying food by the way, with our bows and our arrows and our
stones and our slings.
|
|
|
16 And we did follow the directions of the ball, which led
us in the more fertile parts of the wilderness.
|
|
|
17 And after we had traveled for the space of many days,
we did pitch our tents for the space of a time, that we might again rest
ourselves and obtain food for our families.
|
|
|
18 And it came to pass that as I, Nephi, went forth to
slay food, behold, I did break my bow, which was made of fine steel; and
after I did break my bow, behold, my brethren were angry with me because of
the loss of my bow, for we did obtain no food.
|
|
|
19 And it came to pass that we did return without food to
our families, and being much fatigued, because of their journeying, they did
suffer much for the want of food.
|
|
|
20 And it came to pass that Laman and Lemuel and the sons
of Ishmael did begin to murmur exceedingly, because of their sufferings and
afflictions in the wilderness; and also my father began to murmur against the
Lord his God; yea, and they were all exceedingly sorrowful, even that they
did murmur against the Lord.
|
|
|
21 Now it came to pass that I, Nephi, having been
afflicted with my brethren because of the loss of my bow, and their bows
having lost their springs, it began to be exceedingly difficult, yea, insomuch
that we could obtain no food.
|
|
|
22 And it came to pass that I, Nephi, did speak much unto
my brethren, because they had hardened their hearts again, even unto
complaining against the Lord their God.
|
|
|
23 And it came to pass that I, Nephi, did make out of wood
a bow, and out of a straight stick, an arrow; wherefore, I did arm myself
with a bow and an arrow, with a sling and with stones. And I said unto my
father: Whither shall I go to obtain food?
|
|
|
24 And it came to pass that he did inquire of the Lord,
for they had humbled themselves because of my words; for I did say many
things unto them in the energy of my soul.
|
|
|
25 And it came to pass that the voice of the Lord came
unto my father; and he was truly chastened because of his murmuring against
the Lord, insomuch that he was brought down into the depths of sorrow.
|
|
|
26 And it came to pass that the voice of the Lord said
unto him: Look upon the ball, and behold the things which are written.
|
|
|
27 And it came to pass that when my father beheld the
things which were written upon the ball, he did fear and tremble exceedingly,
and also my brethren and the sons of Ishmael and our wives.
|
|
|
28 And it came to pass that I, Nephi, beheld the pointers
which were in the ball, that they did work according to the faith and
diligence and heed which we did give unto them.
|
|
|
29 And there was also written upon them a new writing,
which was plain to be read, which did give us understanding concerning the
ways of the Lord; and it was written and changed from time to time, according
to the faith and diligence which we gave unto it. And thus we see that by
small means the Lord can bring about great things.
|
|
|
30 And it came to pass that I, Nephi, did go forth up into
the top of the mountain, according to the directions which were given upon
the ball.
|
|
|
31 And it came to pass that I did slay wild beasts,
insomuch that I did obtain food for our families.
|
|
|
32 And it came to pass that I did return to our tents,
bearing the beasts which I had slain; and now when they beheld that I had
obtained food, how great was their joy! And it came to pass that they did
humble themselves before the Lord, and did give thanks unto him.
|
|
|
33 And it came to pass that we did again take our journey,
traveling nearly the same course as in the beginning; and after we had
traveled for the space of many days we did pitch our tents again, that we
might tarry for the space of a time.
|
|
|
34 And it came to pass that Ishmael died, and was buried
in the place which was called Nahom.
|
“A group of Latter-day Saint researchers . . . located a
stone altar that professional archaeologists dated to at least 700 B.C. This
altar contains an inscription confirming ‘Nahom’ as an actual place that
existed in the peninsula before the time of Lehi” (News of the Church: LDS Scene).
The Church and its apologists claim this is evidence supporting the veracity
of the Book of Mormon.
Let’s consider the facts.
- The inscription is merely three consonants “NHM,” vowels being omitted from the written form.
- So, it could be NiHM, NeHeM, NaHaM etc.
- It is believed to be a tribal name, not a place name.
- Many other names in the Book of Mormon are also in the Bible or similar to biblical names. 1 Chronicles 4:19 mentions a person named Naham in the KJV and Nahom in some other versions. There’s even an Old Testament book called Nahum.
|
|
35 And it came to pass that the daughters of Ishmael did mourn
exceedingly, because of the loss of their father, and because of their
afflictions in the wilderness; and they did murmur against my father, because
he had brought them out of the land of Jerusalem, saying: Our father is dead;
yea, and we have wandered much in the wilderness, and we have suffered much
affliction, hunger, thirst, and fatigue; and after all these sufferings we
must perish in the wilderness with hunger.
|
|
|
36 And thus they did murmur against my father, and also
against me; and they were desirous to return again to Jerusalem.
|
|
|
37 And Laman said unto Lemuel and also unto the sons of
Ishmael: Behold, let us slay our father, and also our brother Nephi, who has
taken it upon him to be our ruler and our teacher, who are his elder
brethren.
|
|
|
38 Now, he says that the Lord has talked with him, and
also that angels have ministered unto him. But behold, we know that he lies
unto us; and he tells us these things, and he worketh many things by his
cunning arts, that he may deceive our eyes, thinking, perhaps, that he may
lead us away into some strange wilderness; and after he has led us away, he
has thought to make himself a king and a ruler over us, that he may do with
us according to his will and pleasure. And after this manner did my brother
Laman stir up their hearts to anger.
|
|
|
39 And it came to pass that the Lord was with us, yea,
even the voice of the Lord came and did speak many words unto them, and did
chasten them exceedingly; and after they were chastened by the voice of the
Lord they did turn away their anger, and did repent of their sins, insomuch
that the Lord did bless us again with food, that we did not perish.
|
In the verses prior to this, Laman stirs others up to
anger against Lehi and Nephi saying “hey, let’s kill them.” In spite of their
lack of faith and anger, the voice of the Lord comes and brings them to
repentance. The Miracle precedes the faith in this case. Doesn’t this
contradict Ether 12:6, “dispute not because ye see not, for ye receive no
witness until after the trial of your faith”?
|


Features
|
|
Aspect
: aspect
| Values: | imperfective | perfect | realis |
In Naija, aspect is a lexical feature of auxiliaries that specifies the duration and completion of processes in time.
Imp
: imperfect
The imperfect aspect is used to indicate ongoing processes.
Example
- you get blow out tire for road as you dey travel “you get a blown out tire on the road as you are travelling”
Perf
: perfect
The perfect aspect is used to indicate that a process occurred and was completed before the time under consideration. The focus may therefore be on the resulting state rather than on the event itself.
Example
- im don happen “it has happened”
- we neva eat “we haven’t eaten”
Real
: realis
Example
- tire go come burst “the tire would explode”
Case
: case
| Values: | Nom | Acc |
In Naija, Case
is an inflectional feature of pronouns.
Case helps specify the role of the noun phrase in the sentence.
Nom
: nominative
Typically used when a personal pronoun is used as the subject of a clause.
Examples
- a “I”
- you “you”
- im
- e “it”
- we “we”
- una “you guys”
- dem “them”
- de “they”
Acc
: accusative
Typically used when a personal pronoun is used as a complement for a predicate.
Examples
- me “me”
- you “you”
- am “him”
- us “us”
- una “you guys”
- dem “them”
Definite
: definiteness or state
| Values: | Spec | Def |
In Naija, articles carry a Definite
feature.
Spec
: specific indefinite
Example
- im get one latest phone like dat “he got one of those latest phones”
Def
: definite
Example
- you dey do two tins at di same time “you are doing two things at the same time”
Degree
: degree of comparison
| Values: | Cmp | Sup |
In Naija, Degree
is a feature of adjectives and adverbs.
Note: The 1st degree marked in English morphology Pos
is left without feature in our dictionary.
Cmp
: comparative
An object is compared to another on the basis of an attribute.
Example
- bigger
Sup
: superlative
An object is compared to as a set of other objects on the basis of an attribute.
Example
- biggest
Note : most adjectives and adverbs in Naija do not have a Degree
feature because comparatives and superlatives are based on serial verb constructions, e.g. fine pass, fine pass all.
Gender
: gender
This document is a placeholder for the language-specific documentation
for Gender
.
Mood
: mood
| Values: | Ind | Imp | Jus |
In Naija the Mood
feature which expresses modality is a feature of auxiliaries and verbs.
The Ind
and Imp
values are only carried by instances of verbs following the English morphology, e.g teaches, teaching, taught…
Ind
: indicative
Example
- you say grandma need push “You said grandma needs to be pushed”
- dat means you be student “That means you are a student”
Imp
: imperative
Example
- you want test me ? give me sample “You want to test me ? Give me a sample”
Jus
: jussive
The jussive aspect is used to exhort someone to do something. It is carried by the auxiliary make.
Example
- make you dey tink of oda people “you should think of other people”
NumType
: numeral type
| Values: | Card | Ord |
Card
: cardinal number
This value is used for cardinal numbers, i.e tokens which are used to count.
Example
- you go bring five hundred naira “you will bring five hundred naira”
Ord
: ordinal number
This value is used for ordinal numbers, i.e tokens indicating a position or rank such as second, fourth…
Example
- dis plan work well well wen e first begin “this plan worked very well when it first began”
Number
: number
| Values: | Sing | Plur |
This feature typically applies to nouns and other parts of speech that mark agreement with nouns, i.e pronouns and determiners.
Sing
: singular
The singular is used when refering to one person, animal or thing.
Examples
- dis ting na lie “this thing is a lie”
- I happy sey una give me dis opportunity to talk “I am happy that you all have given me this opportunity to talk.”
Plur
: plural
The plural is used when refering to several person, animals or things.
Examples
- I happy sey una give me dis opportunity to talk “I am happy that you all have given me this opportunity to talk.”
- I no dey interested in all dose wahala wey you dey talk “ I am not interested in all those problems that you have been talking about.”
Note : the particle dem also has a plural value.
PartType
: type of particle
| Values: | Cop | Disc |
We use the PartType
feature to distinguish the different roles performed by the particles of Naija.
Cop
: copular
The particle is considered copulative when it is used to link a subject with its nonverbal predicate. In Naija, the subject may be omitted.
Example
- na big lie “it’s a big lie”
Note : na is a copulative particle frequently used for focalization, such as in clefts
Disc
: discourse
The PartType feature takes this value for discourse particles elements such as sha or o.
Example
- Adam, ehen where your babe o “Adam, ehen where is your babe ?”
Person
: person
| Values: | 1 | 2 | 3 |
In Naija, Person is typically a feature of personal, possessive and reciprocal pronouns.
1
: first person
In singular, the first person refers just to the speaker. In plural, it must include the speaker and one or more additional persons. There is no distinction between inclusive and exclusive 1st person plural pronouns.
Examples
- I don hear you “I heard you”
2
: second person
In singular, the second person refers to the addressee of the utterance. In plural, it may mean several addressees and optionally some third persons too.
Examples
- you go enter Lagos Ibadan expressway “you would enter Lagos Ibadan expressway”
- some of una no know “some of you don’t know”
3
: third person
The third person refers to one or more persons that are neither speakers nor addressees.
Examples
- one man im dey drive “one man, he was driving”
Polarity
: polarity
| Value : | Neg | Pos |
Neg
: negative
In Naija, function words which are used to negate are marked with the Polarity
feature. This typically applies to some particles and auxiliaries.
Example
- na ma papa no get money “It is my father who does not have money”
- de not rush you “They don’t rush you”
- we neva send our pikin go school “we haven’t sent our child to school”
Pos
: positive
Positive polarity (affirmativeness) is rarely, encoded using overt morphology. Naija uses it to distinguish response interjections yes and no.
- dem want come every day ? yes “Do they want to come every day ? Yes”
Poss
: possessive
| Values: | Yes |
Boolean feature of personal and adverbial pronouns. It indicates whether the word is possessive.
Yes
: it is possessive
Note that there is no No
value. If the word is not possessive, the
Poss
feature will just not be mentioned in the FEAT
column.
Examples
- I don tire ma sister “my sister, I am tired”
- dem roof e just dey dere “their roofs, they are just there”
PronType
: pronominal type
| Values: | Art | Dem | Emp | Int | Prs | Rcp |
This feature typically applies to pronouns and determiners
Art
: article
Article is a special case of determiner that bears the feature of definiteness.
Examples
- I go see one pastor “I went to see a pastor”
- nobody know wetin to call di ting.  There are similarities with reflexive and demonstrative pronouns / determiners.
Example
- dat oder person sef im leave pikin for house “that other person too left their child at home”
Int
: interrogative pronoun, determiner or adverb
Adverbial pronouns such as wetin, what, which, who, whoever whose have this value unless they mark the beginning of a relative clause or a cleft .
Example
- who know wetin make di trailer driver lose control of im steer “who knows what made the driver of the trailer lose control of the steer ?”
Prs
: personal pronouns
See also the Poss feature that distinguishes normal personal
pronouns from possessives. Note that Prs
also includes reflexive
personal/possessive pronouns.
The personal pronouns of Naija include me, I/a, ma, you, your, him, im, e, am, we us, our, una, de
Example
- dem go carry dis one “they will carry this one”
- forget im “forget him”
Rcp
: reciprocal pronoun
- we we
- una una
- dem dem
Tense
: tense
| Values: | Past | Pres | Prosp |
In Naija, Tense
is a feature of auxiliaries and verbs which specifies the time when the action took / takes / will take place, in relation to another process or the utterance itself.
There are three values for this feature :
- Past : past
- Pres : present
- Prosp : prospective
Past
: past
The past tense is ued to indicate that the process is situated in the past in relation to another process or the utterance itself.
Example
- I bin go school “I went to school”
Pres
: present
The present tense is used to situate the process in present time.
Example
- dat means you be student “That means you are a student”
Prosp
: prospective
The prospective tense is used to indicate that the process has not yet taken place. It is situated in the future in relation to another process or the utterance itself.
Example
- hope still dey sey dem go born anoda pikin “there is hope that they would have givern birth to another child”
VerbForm
: form of verb or deverbative
| Values: | finite | gerund |
VerbForm
is typically a feature of verbs.
Fin
: finite
Example
- some Hausa people dey get am dere “some Hausa people get it there”
Ger
: gerund
Gerund is a non-finite verb form that shares properties of verbs and nouns.
Example
- how many minute wey dem do overhauling ? “For how many minutes are they overhauling ?”
VerbType
: type of verb
| Value: | serial |
Ser
: serial
Modifying verbs appearing in serial verb constructions are marked with the lexical feature VerbType=Ser
Examples
- because God no go give us temptation wey go pass our power “because God will not give us temptation that is above our ability”
- im go fall throway “It would fall off”
- di guy fine reach me “Is the guy as handsome as I am ?”


In the past it has sometimes been said that Javascript was a clumsy language associated with the more annoying aspects of the user experience on the internet, such as popups. However this has now changes quite dramatically. Javascript has witnessed a resurgence and is very popular for web developers. But why is this? There are many reasons one could regurgitate, however what follows is the few that I believe are quite important. First of all, javascript is relatively easy to learn. The nature of the language is flexible and standardized across multiple browser platforms. Javascript is also easy to edit for web developers. Using javascript, the code you write doesn't need to compiled and so using a compiler or other potentially expensive software is not necessary. There are also a lot of available tools that web developers can use when it comes to javascript, thus giving the ability to users to look behind a website's veil and analyse the javascript that is running behind the website. These tools also make it expceptionally easy for javascript to be debugged if you run into errors. While javascript may be easy to learn, it can be made to carry out extremely complex tasks behind the scenes, and as such it can potentially require a lot of code and time to develop. In order to make this process more amicable, developers have written libraries to support the language, perhaps the most noteworth of these being jQuery.


--- layout: archive title: Zulip Chat Archive permalink: /stream/113489-new-members/topic/.60apply'.60timeout.html ---
Sometimes apply'
can't stop when it should fail. Is this the expected behavior of apply'
@Simon Hudon ?
import analysis.complex.exponential import tactic.apply namespace real lemma continuous_sin_sin : continuous (λx, sin (sin x)) := begin apply' continuous_sin, -- should fail, but timeout instead end end real
basically this is unfolding continuous
and sin
all the way down in case it turns out that continuous (λx, sin (sin x))
and continuous sin
are the same thing
Maybe sin
or at least exp
ought to be irreducible?
I tried to add attribute [irreducible] continuous sin
to the front, but it is of no use.
(deleted)
That's curious. By defaut, whnf
uses semireducible
as a setting. I would think that would do it
I think the problem is with exact e
on the fourth line of retry_apply_aux
private meta def retry_apply_aux : Π (e : expr) (cfg : apply_cfg), list (bool × name × expr) → tactic (list (name × expr)) | e cfg gs := focus1 (do { exact e, gs' ← get_goals, let r := reorder_goals gs cfg.new_goals, set_goals (gs' ++ r.map prod.snd), return r }) <|> do (expr.pi n bi d b) ← infer_type e >>= whnf | apply_core e cfg, v ← mk_meta_var d, let b := b.has_var, e ← head_beta $ e v, retry_apply_aux e cfg ((b, n, v) :: gs)
It never stops.
Here is an example of exact
not stopping
import analysis.complex.exponential import tactic.apply open tactic namespace tactic.interactive open interactive interactive.types expr meta def exact' (q : parse texpr) : tactic unit := do tgt : expr ← target, i_to_expr_for_apply q >>= tactic.exact -- i_to_expr_strict ``(%%q : %%tgt) >>= tactic.exact end tactic.interactive namespace real lemma continuous_sin_sin : continuous (λx, sin (sin x)) := begin exact' continuous_sin, end end real
if you uncomment the line with ``(%%q : %%tgt)
does that make a difference?
Yes, that would work.
That's curious. What about
meta def exact' (q : parse texpr) : tactic unit := do tgt : expr ← target, e <- i_to_expr_for_apply q, t <- infer_type e, unify t tgt, exact e
unify tactic failed, failed to unify continuous sin : Prop and continuous (λ (x : ℝ), sin (sin x)) : Prop
that's the desired behavior, right?
Yes, should fail
geez, it's not good when even exact
isn't reliable
So we should prefix that exact
with a unify
. @Mario Carneiro, what does exact
do if it's not unify
?
I would have guessed it did exactly that
actually, I think exact
will try quite a bit harder than unify
to make things match
unify
has a reducibility setting (default semireducible) whereas exact
is implicitly reducibility all
meta constant exact (e : expr) (md := semireducible) : tactic unit
I stand corrected
(deleted)
It's surprising because the C++ code for exact uses the same machinery as unify
@Joe Do you mind adding this unify
line to your PR?
Sure, I’ll PR it.
Thanks!
Since you're doing a PR on apply'
, could you also change the code of transitivity'
to:
meta def transitivity' (q : parse texpr?) : tactic unit := tactic.transitivity' >> match q with | none := skip | some q := do (r, lhs, rhs) ← target_lhs_rhs, t ← infer_type lhs, i_to_expr ``(%%q : %%t) >>= unify rhs end
No problem.
{% endraw %}Last updated: Apr 24 2020 at 19:02 UTC


One day I was assigned to create a
Mad Lib
.
At first I was
bored
In the end I was
joyful
Change Creation
Change your Feeling
Change Adjecive


Deliver 5,000 killing blows with a sword.
A classic weapon that grows more effective in your hand.
Explore Rebel's Seclusion.
It isn't grave robbing if they fight back, right?


PATANJALI'S YOGA APHORISMS
CHAPTER III
We have now come to the chapter in which the Yoga powers are described.
देशबन्धश्चित्तस्य धारणा ॥१॥
1. Dhâranâ is holding the mind on to some particular object.
Dharana (concentration) is when the mind holds on to some object, either in the body, or outside the body, and keeps itself in that state.
तत्र प्रत्ययैकतानता ध्यानम् ॥२॥
2. An unbroken flow of knowledge in that object is Dhyâna.
The mind tries to think of one object, to hold itself to one particular spot, as the top of the head, the heart, etc., and if the mind succeeds in receiving the sensations only through that part of the body, and through no other part, that would be Dharana, and when the mind succeeds in keeping itself in that state for some time, it is called Dhyana (mediation).
तदेवार्थमात्रनिर्भासं स्वरूपशून्यमिव समाधिः ॥३॥
3. When that, giving up all forms, reflects only the meaning, it is Samâdhi.
That comes when in meditation the form or the external part is given up. Suppose I were meditating on a book, and that I have gradually succeeded in concentrating the mind on it, and perceiving only the internal sensations, the meaning, unexpressed in any form — that state of Dhyana is called Samadhi.
त्रयमेकत्र संयमः ॥४॥
4. (These) three (when practiced) in regard to one object is Samyama.
When a man can direct his mind to any particular object and fix it there, and then keep it there for a long time, separating the object from the internal part, this is Samyama; or Dharana, Dhyana, and Samadhi, one following the other, and making one. The form of the thing has vanished, and only its meaning remains in the mind.
तज्जयात् प्रज्ञाऽऽलोकः ॥५॥
5. By the conquest of that comes light of knowledge.
When one has succeeded in making this Samyama, all powers come under his control. This is the great instrument of the Yogi. The objects of knowledge are infinite, and they are divided into the gross, grosser, grossest and the fine, finer, finest and so on. This Samyama should be first applied to gross things, and when you begin to get knowledge of this gross, slowly, by stages, it should be brought to finer things.
तस्य भूमिषु विनियोगः ॥६॥
6. That should be employed in stages.
This is a note of warning not to attempt to go too fast.
त्रयमन्तरङ्गं पूर्वेभ्यः ॥७॥
7. These three are more internal than those that precede.
Before these we had the Pratyâhâra, the Prânâyâma, the Âsana, the Yama and Niyama; they are external parts of the three — Dharana, Dhyana and Samadhi. When a man has attained to them, he may attain to omniscience and omnipotence, but that would not be salvation. These three would; not make the mind Nirvikalpa, changeless, but would leave the seeds for getting bodies again. Only when the seeds are, as the Yogi says, "fried", do they lose the possibility of producing further plants. These powers cannot fry the seed.
तदपि बहिरङ्गं निर्बीजस्य ॥८॥
8. But even they are external to the seedless (Samadhi).
Compared with that seedless Samadhi, therefore, even these are external. We have not yet reached the real Samadhi, the highest, but a lower stage, in which this universe still exists as we see it, and in which are all these powers.
व्युत्थान-निरोधसंस्कारयोरभिभव-प्रादुर्भावौ निरोधक्षणचित्तान्वयो निरोध-परिणामः ॥९॥
9. By the suppression of the disturbed impressions of the mind, and by the rise of impressions of control, the mind, which persists in that moment of control, is said to attain the controlling modifications.
That is to say, in this first state of Samadhi the modifications of the mind have been controlled, but not perfectly, because if they were, there would be no modifications. If there is a modification which impels the mind to rush out through the senses, and the Yogi tries to control it, that very control itself will be a modification. One wave will be checked by another wave, so it will not be real Samadhi in which all the waves subside, as control itself will be a wave. Yet this lower Samadhi is very much nearer to the higher Samadhi than when the mind comes bubbling out.
तस्य प्रशान्तवाहिता संस्कारात् ॥१०॥
10. Its flow becomes steady by habit.
The flow of this continuous control of the mind becomes steady when practiced day after day, and the mind obtains the faculty of constant concentration.
सर्वार्थतैकाग्रतयोः क्षयोदयौ चित्तस्य समाधि-परिणामः ॥११॥
11. Taking in all sorts of objects, and concentrating upon one object, these two powers being destroyed and manifested respectively, the Chitta gets the modification called Samadhi.
The mind takes up various objects, runs into all sorts of things. That is the lower state. There is a higher state of the mind, when it takes up one object and excludes all others, of which Samadhi is the result.
शान्तोदितौ तुल्यप्रत्ययौ चित्तस्यैकाग्रता-परिणामः ॥१२॥
12. The one-pointedness of the Chitta is when the impression that is past and that which is present are similar.
How are we to know that the mind has become concentrated? Because the idea of time will vanish. The more time passes unnoticed the more concentrated we are. In common life we see that when we are interested in a book we do not note the time at all, and when we leave the book, we are often surprised to find how many hours have passed. All time will have the tendency to come and stand in the one present. So the definition is given: When the past and present come and stand in one, the mind is said to be concentrated.1
एतेन भूतेन्द्रियेषु धर्मलक्षणावस्थापरिणामा व्याख्याताः ॥१३॥
13. By this is explained the threefold transformation of form, time and state, in fine or gross matter and in the organs.
By the threefold changes in the mind-stuff as to form, time and state are explained the corresponding changes in gross and subtle matter and in the organs. Suppose there is a lump of gold. It is transformed into a bracelet and again into an ear-ring. These are changes as to form. The same phenomena looked at from the standpoint of time give us change as to time. Again, the bracelet or the ear-ring may be bright or dull, thick or thin, and so on. This is change as to state. Now referring to the aphorisms 9, l1 and 12, the mind-stuff is changing into Vrittis — this is change as to form. That it passes through past, present and future moments of time is change as to time. That the impressions vary as to intensity within one particular period, say, present, is change as to state. The concentrations taught in the preceding aphorisms were to give the Yogi a voluntary control over the transformations of his mind-stuff, which alone will enable him to make the Samyama named in III. 4.
शान्तोदिताव्यपदेश्यधर्मानुपातो धर्मी ॥१४॥
14. That which is acted upon by transformations, either past, present, or yet to be manifested is the qualified.
That is to say, the qualified is the substance which is being acted upon by time and by the Samskâras, and getting changed and being manifested always.
क्रमान्यत्वं परिणामान्यत्वे हेतुः ॥१५॥
15. The succession of changes is the cause of manifold evolution.
परिणामत्रयसंयमादतीतानागतज्ञानम् ॥१६॥
16. By making Samyama on the three sorts of changes comes the knowledge of past and future.
We must not lose sight of the first definition of Samyama. When the mind has attained to that state when it identifies itself with the internal impression of the object, leaving the external, and when, by long practice, that is retained by the mind and the mind can get into that state in a moment, that is Samyama. If a man in that state wants to know the past and future, he has to make a Samyama on the changes in the Samskaras (III. 13). Some are working now at present, some have worked out, and some are waiting to work. So by making a Samyama on these he knows the past and future.
शब्दार्थप्रत्ययानामितरेतराध्यासात्सङ्करस्तत्प्रविभागसंयमात् सर्वभूतरुतज्ञानम् ॥१७॥
l7. By making Samyama on word, meaning and knowledge, which are ordinarily confused, comes the knowledge of all animal sounds.
The word represents the external cause, the meaning represents the internal vibration that travels to the brain through the channels of the Indriyas, conveying the external impression to the mind, and knowledge represents the reaction of the mind, with which comes perception. These three, confused, make our sense-objects. Suppose I hear a word; there is first the external vibration, next the internal sensation carried to the mind by the organ of hearing, then the mind reacts, and I know the word. The word I know is a mixture of the three — vibration, sensation, and reaction. Ordinarily these three are inseparable; but by practice the Yogi can separate them. When a man has attained to this, if he makes a Samyama on any sound, he understands the meaning which that sound was intended to express, whether it was made by man or be any other animal.
संस्कारसाक्षात्करणात् पूर्वजातिज्ञानम् ॥१८॥
18. By perceiving the impressions, (comes) the knowledge of past life.
Each experience that we have, comes in the form of a wave in the Chitta, and this subsides and becomes finer and finer, but is never lost. It remains there in minute form, and if we can bring this wave up again, it becomes memory. So, if the Yogi can make a Samyama on these past impressions in the mind, he will begin to remember all his past lives.
प्रत्ययस्य परचित्तज्ञानम् ॥१९॥
19. By making Samyama on the signs in another's body, knowledge of his mind comes.
Each man has particular signs on his body, which differentiate him from others; when the Yogi makes a Samyama on these signs he knows the nature of the mind of that person.
न च तत् सालम्बनं तस्याविषयीभूतत्वात् ॥२०॥
20. But not its contents, that not being the object of the Samyama.
He would not know the contents of the mind by making a Samyama on the body. There would be required a twofold Samyama, first on the signs in the body, and then on the mind itself. The Yogi would then know everything that is in that mind.
कायरूपसंयमात्तद्ग्राह्यशक्ति-स्तम्भे चक्षुःप्रकाशासंप्रयोगेऽन्तर्धानम् ॥२१॥
21. By making Samyama on the form of the body, the perceptibility of the form being obstructed and the power of manifestation in the eye being separated, the Yogi's body becomes unseen.
A Yogi standing in the midst of this room can apparently vanish. He does not really vanish, but he will not be seen by anyone. The form and the body are, as it were, separated. You must remember that this can only be done when the Yogi has attained to that power of concentration when form and the thing formed have been separated. Then he makes a Samyama on that, and the power to perceive forms is obstructed, because the power of perceiving forms comes from the junction of form and the thing formed.
एतेन शब्दाद्यन्तर्धानमुक्तम् ॥२२॥
22. By this the disappearance or concealment of words which are being spoken and such other things are also explained.
सोपक्रमं निरुपक्रमं च कर्म तत्संयमादपरान्तज्ञानमरिष्टेभ्यो वा ॥२३ ॥
23. Karma is of two kinds — soon to be fructified and late to be fructified. By making Samyana on these, or by the signs called Arishta, portents, the Yogis know the exact time of separation from their bodies.
When a Yogi makes a Samyama on his own Karma, upon those impressions in his mind which are now working, and those which are just waiting to work, he knows exactly by those that are waiting when his body will fall. He knows when he will die, at what hour, even at what minute. The Hindus think very much of that knowledge or consciousness of the nearness of death, because it is taught in the Gita that the thoughts at the moment of departure are great powers in determining the next life.
मैत्र्यादिषु बलानि ॥२४
24. By making Samyama on friendship, mercy, etc. (I. 33 ), the Yogi excels in the respective qualities.
बलेषु हस्तिबलादीनि ॥२५॥
25. By making Samyama on the strength of the elephant and others, their respective strength comes to the Yogi.
When a Yogi has attained to this Samyama and wants strength, he makes a Samyama on the strength of the elephant and gets it. Infinite energy is at the disposal of everyone if he only knows how to get it. The Yogi has discovered the science of getting it.
प्रवृत्त्यालोकन्यासात् सूक्ष्म-व्यवहित-विप्रकृष्टज्ञानम् ॥२६॥
26. By making Samyama on the Effulgent Light (I. 36 ), comes the knowledge of the fine, the obstructed, and the remote.
When the Yogi makes Samyama on that Effulgent Light in the heart, he sees things which are very remote, things, for instance, that are happening in a distant place, and which are obstructed by mountain barriers, and also things which are very fine.
भुवनज्ञानं सूर्ये संयमात् ॥२७॥
27. By making Samyama on the sun, (comes) the knowledge of the world.
चन्द्रे ताराव्यूहज्ञानम् ॥२८॥
28. On the moon, (comes) the knowledge of the cluster of stars.
ध्रुवे तद्गतिज्ञानम् ॥२९॥
29. On the pole-star, (comes) the knowledge of the motions of the stars.
नाभिचक्रे कायव्यूहज्ञानम् ॥३०॥
30. On the navel circle, (comes) the knowledge of the constitution of the body.
कण्ठकूपे क्षुत्पिपासानिवृत्तिः ॥३१॥
31. On the hollow of the throat, (comes) cessation of hunger.
When a man is very hungry, if he can make Samyama on the hollow of the throat, hunger ceases.
कूर्मनाड्यां स्थैर्यम् ॥३२॥
32. On the nerve called Kurma, (comes) fixity of the body.
When he is practising, the body is not disturbed.
मूर्धज्योतिषि सिद्धदर्शनम् ॥३३॥
33. On the light emanating from the top of the head, sight of the Siddhas.
The Siddhas are beings who are a little above ghosts. When the Yogi concentrates his mind on the top of his head, he will see these Siddhas. The word Siddha does not refer to those men who have become free — a sense in which it is often used.
प्रातिभाद्वा सर्वम् ॥३४॥
34. Or by the power of Prâtibha, all knowledge.
All these can come without any Samyama to the man who has the power of Pratibha (spontaneous enlightenment from purity). When a man has risen to a high state of Pratibha, he has that great light. All things are apparent to him. Everything comes to him naturally without making Samyama.
ह्रदये चित्त-संवित् ॥३५॥
35. In the heart, knowledge of minds.
सत्त्वपुरुषयोरत्यन्तासंकीर्णयोः प्रत्ययाविशेषाद् भोगः परार्थत्वात् स्वार्थसंयमात् पुरुषज्ञानम् ॥३६॥
36. Enjoyment comes from the non-discrimination of the soul and Sattva which are totally different because the latter's actions are for another. Samyama on the self-centred one gives knowledge of the Purusha.
All action of Sattva, a modification of Prakriti characterised by light and happiness, is for the soul. When Sattva is free from egoism and illuminated with the pure intelligence of Purusha, it is called the self-centred one, because in that state it becomes independent of all relations.
ततः प्रातिभश्रावणवेदनादर्शास्वादवार्ता जायन्ते ॥३७॥
37. From that arises the knowledge belonging to Pratibha and (supernatural) hearing, touching, seeing, tasting and smelling.
ते समाधावुपसर्गा व्युत्थाने सिद्धयः ॥३८॥
38. These are obstacles to Samadhi; but they are powers in the worldly state.
To the Yogi knowledge of the enjoyments of the world comes by the junction of the Purusha and the mind. If he wants to make Samyama on the knowledge that they are two different things, nature and soul, he gets knowledge of the Purusha. From that arises discrimination. When he has got that discrimination, he gets the Pratibha, the light of supreme genius. These powers, however, are obstructions to the attainment of the highest goal, the knowledge of the pure Self, and freedom. These are, as it were, to be met in the way; and if the Yogi rejects them, he attains the highest. If he is tempted to acquire these, his further progress is barred.
बन्धकारणशैथिल्यात् प्रचारसंवेदनाच्च चित्तस्य परशरीरावेशः ॥३९ ॥
39. When the cause of bondage of the Chitta has become loosened, the Yogi, by his knowledge of its channels of activity (the nerves), enters another's body.
The Yogi can enter a dead body and make it get up and move, even while he himself is working in another body. Or he can enter a living body and hold that man's mind and organs in check, and for the time being act through the body of that man. That is done by the Yogi coming to this discrimination of Purusha and nature. If he wants to enter another's body, he makes a Samyama on that body and enters it, because, not only is his soul omnipresent, but his mind also, as the Yogi teaches. It is one bit of the universal mind. Now, however, it can only work; through the nerve currents in this body, but when the Yogi has loosened himself from these nerve currents, he can work through other things.
उदानजयाज्जलपङ्ककण्टकादिष्वसङ्ग उत्क्रान्तिश्च ॥४०॥
40. By conquering the current called Udâna the Yogi does not sink in water or in swamps, he can walk on thorns etc., and can, die at will.
Udana is the name of the nerve current that governs the lungs and all the upper parts of the body, and when he is master of it, he becomes light in weight. He does not sink in water; he can walk on thorns and sword blades, and stand in fire, and can depart this life whenever he likes.
समानजयात् प्रज्वलनम् ॥४१॥
41. By the conquest of the current Samâna he is surrounded by a blaze of light.
Whenever he likes, light flashes from his body.
श्रोत्राकाशयोः सम्बन्धसंयमाद्दिव्यं श्रोत्रम् ॥४२॥
42. By making Samyama on the relation between the ear and the Akâsha comes divine hearing.
There is the Akasha, the ether, and the instrument, the ear. By making Samyama on them the Yogi gets supernormal hearing; he hears everything. Anything spoken or sounded miles away he can hear.
कायाकाशयोः सम्बन्धसंयमाल्लघुतूलसमापत्तेश्चाकाशगमनम् ॥४३॥
43. By making Samyama on the relation between the Akasha and the body and becoming light as cotton-wool etc., through meditation on them, the yogi goes through the skies.
This Akasha is the material of this body; it is only Akasha in a certain form that has become the body. If the Yogi makes a Sanyama on this Akasha material of his body, it acquires the lightness of Akasha, and he can go anywhere through the air. So in the other case also.
बहिरकल्पिता वृत्तिर्महाविदेहा ततः प्रकाशावरणक्षयः ॥४४॥
44. By making Samyama on the "real modifications" of the mind, outside of the body, called great disembodiedness, comes disappearance of the covering to light.
The mind in its foolishness thinks that it is working in this body. Why should I be bound by one system of nerves, and put the Ego only in one body, if the mind is omnipresent? There is no reason why I should. The Yogi wants to feel the Ego wherever he likes. The mental waves which arise in the absence of egoism in the body are called "real modifications" or "great disembodiedness". When he has succeeded in making Samyama on these modifications, all covering to light goes away, and all darkness and ignorance vanish. Everything appears to him to be full of knowledge.
स्थूल-स्वरूप-सूक्ष्मान्वयार्थवत्त्वसंयमाद्भूतजयः ॥४५॥
45. By making Samyama on the gross and fine forms of the elements, their essential traits, the inherence of the Gunas in them and on their contributing to the experience of the soul, comes mastery of the elements.
The Yogi makes Samyama on the elements, first on the gross, and then on the finer states. This Samyama is taken up more by a sect of the Buddhists. They take a lump of clay and make Samyama on that, and gradually they begin to see the fine materials of which it is composed, and when they have known all the fine materials in it, they get power over that element. So with all the elements. The Yogi can conquer them all.
ततोऽणिमादिप्रादुर्भावः कायसम्पत्तद्धर्मानभिघातश्च ॥४६॥
46. From that comes minuteness and the rest of the powers, "glorification of the body," and indestructibleness of the bodily qualities.
This means that the Yogi has attained the eight powers. He can make himself as minute as a particle, or as huge as a mountain, as heavy as the earth, or as light as the air; he can reach anything he likes, he can rule everything he wants, he can conquer everything he wants, and so on. A lion will sit at his feet like a lamb, and all his desires will be fulfilled at will.
रूप-लावण्य-बल-वज्रसंहननत्वानि कायसम्पत् ॥४७॥
47. The "glorification of the body" is beauty, complexion, strength, adamantine hardness.
The body becomes indestructible. Nothing can injure it. Nothing can destroy it until the Yogi wishes. "Breaking the rod of time he lives in this universe with his body." In the Vedas it is written that for that man there is no more disease, death or pain.
ग्रहण-स्वरूपास्मितान्वयार्थवत्त्वसंयमादिन्द्रियजयः ॥४८॥
48. By making Samyama on the objectivity and power of illumination of the organs, on egoism, the inherence of the Gunas in them and on their contributing to the experience of the soul, comes the conquest of the organs.
In the perception of external objects the organs leave their place in the mind and go towards the object; this is followed by knowledge. Egoism also is present in the act. When the Yogi makes Samyama on these and the other two by gradation, he conquers the organs. Take up anything that you see or feel, a book for instance; first concentrate the mind on it, then on the knowledge that is in the form of a book, and then on the Ego that sees the book, and so on. By that practice all the organs will be conquered.
ततो मनोजवित्वं विकरणभावः प्रधानजयश्च ॥४९॥
49. From that comes to the body the power of rapid movement like the mind, power of the organs independently of the body, and conquest of nature.
Just as by the conquest of the elements comes glorified body, so from the conquest of the organs will come the above-mentioned powers.
सत्त्वपुरुषान्यताख्यातिमात्रस्य सर्वभावाधिष्ठातृत्वं सर्वज्ञातृत्वञ्च ॥५०॥
50. By making Samyama on the discrimination between the Sattva and the Purusha come omnipotence and omniscience.
When nature has been conquered, and the difference between the Purusha and nature realised — that the Purusha is indestructible, pure and perfect — then come omnipotence and omniscience.
तद्वैराग्यादपि दोषबीजक्षये कैवल्यम् ॥५१॥
51. By giving up even these powers comes the destruction of the very seed of evil, which leads to Kaivalya.
He attains aloneness, independence, and becomes free. When one gives up even the ideas of omnipotence and omniscience, there comes entire rejection of enjoyment, of the temptations from celestial beings. When the Yogi has seen all these wonderful powers, and rejected them, he reaches the goal. What are all these powers? Simply manifestations. They are no better than dreams. Even omnipotence is a dream. It depends on the mind. So long as there is a mind it can be understood, but the goal is beyond even the mind.
स्थान्युपनिमन्त्रणे सङ्गस्मयाकरणं पुनरनिष्टप्रसङ्गात् ॥५२॥
52. The Yogi should not feel allured or flattered by the overtures of celestial beings for fear of evil again.
There are other dangers too; gods and other beings come to tempt the Yogi. They do not want anyone to be perfectly free. They are jealous, just as we are, and worse than us sometimes. They are very much afraid of losing their places. Those Yogis who do not reach perfection die and become gods; leaving the direct road they go into one of the side streets, and get these powers. Then, again, they have to be born.
क्षण-तत्क्रमयोः संयमाद्विवेकजं ज्ञानम् ॥५३॥
53. By making Samyama on a particle of time and its precession and succession comes discrimination.
How are we to avoid all these things, these Devas, and heavens, and powers? By discrimination, by knowing good from evil. Therefore a Samyama is given by which the power of discrimination can be strengthened. This by making a Samyama on a particle of time, and the time preceding and following it.
जाति-लक्षण-देशैरन्यताऽनवच्छेदात्तुल्ययोस्ततः प्रतिपत्तिः ॥५४॥
54. Those things which cannot be differentiated by species, sign, and place, even they will be discriminated by the above Samyama.
The misery that we suffer comes from ignorance, from non-discrimination between the real and the unreal. We all take the bad for the good, the dream for the reality. Soul is the only reality, and we have forgotten it. Body is an unreal dream, and we think we are all bodies. This non-discrimination is the cause of misery. It is caused by ignorance. When discrimination comes, it brings strength, and then alone can we avoid all these various ideas of body, heavens, and gods. This ignorance arises through differentiating by species, sign, and place. For instance, take a cow. The cow is differentiated from the dog by species. Even with the cows alone how do we make the distinction between one cow and another? By signs. If two objects are exactly similar, they can be distinguished if they are in different places. When objects are so mixed up that even these differential will not help us, the power of discrimination acquired by the above-mentioned practice will give us the ability to distinguish them. The highest philosophy of the Yogi is based upon this fact, that the Purusha is pure and perfect, and is the only "simple" that exists in this universe. The body and mind are compounds, and yet we are ever identifying ourselves with them This is the great mistake that the distinction has been lost. When this power of discrimination has been attained, man sees that everything in this world, mental and physical, is a compound, and, as such, cannot be the Purusha.
तारकं सर्वविषयं सर्वथाविषयमक्रमञ्चेति विवेकजं ज्ञानम् ॥५५॥
55. The saving knowledge is that knowledge of discrimination which simultaneously covers all objects, in all their variations.
Saving, because the knowledge takes the Yogi across the ocean of birth and death. The whole of Prakriti in all its states, subtle and gross, is within the grasp of this knowledge. There is no succession in perception by this knowledge; it takes in all things simultaneously, at a glance.
सत्त्वपुरुषयोः शुद्धिसाम्ये कैवल्यमिति ॥५६॥
56. By the similarity of purity between the Sattva and the Purusha comes Kaivalya.
When the soul realises that it depends on nothing in the universe, from gods to the lowest atom, that is called Kaivalya (isolation) and perfection. It is attained when this mixture of purity and impurity called Sattva (intellect) has been made as pure as the Purusha itself; then the Sattva reflects only the unqualified essence of purity, which is the Purusha.