text:
+0

# hi how are u doing? i had a question in my mind could you please solve it what is the answer of this equation 8255^33=? and how to calculate

+3
307
4

I had a question in my mind could you please solve it what is the answer of this equation 8255^33=? and how to calculate it in scientific or simple calculator?

Guest Jul 17, 2014

#3
+91404
+5

This is too large a number for most calcs to handle.

But a good approximation can be found this way.

$$8255^{33}\\\\ =(8255^{11})^3 \\\\ \approx (1.213075562 \times 10^{43})^3\\\\ \approx(1.213075562 \times 10^{43})^3\\\\ \approx(1.213075562^3) \times 10^{43*3}\\\\ \approx 1.785104155\times 10^{129}\\\\$$

Melody  Jul 18, 2014
Sort:

#1
+11757
+3

In the on-site calculator just type 8255^33 and then hit enter which will then give you your answer!

rosala  Jul 17, 2014
#2
+8256
0

Hello. I am doing fine. The answer to your question is 1785104154622072395080289314292999390441357314598603938072512625416792814636614360987726361580965309582470334134995937347412109375.

DragonSlayer554  Jul 17, 2014
#3
+91404
+5

This is too large a number for most calcs to handle.

But a good approximation can be found this way.

$$8255^{33}\\\\ =(8255^{11})^3 \\\\ \approx (1.213075562 \times 10^{43})^3\\\\ \approx(1.213075562 \times 10^{43})^3\\\\ \approx(1.213075562^3) \times 10^{43*3}\\\\ \approx 1.785104155\times 10^{129}\\\\$$

Melody  Jul 18, 2014
#4
+271
0

On a simple calculator, type in 8255. Because 3*11=33, press these keys in the following order:

*==*==========

Pyramid  Oct 2, 2014

### 7 Online Users

We use cookies to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.  See details


text:
# Wipro previous placement questions - 7

1.
1) B is mother of D but D is not daughter of B.
2) A is son of M and brother of G.
3) G is sister of D
Which of the following cannot be referred from the given information ?
(A) B has 3 children
(B) M has two sons
(C) G is younger to B.
(D) A is younger to D
Explanation:
D is the son of B.  Also from the third clue, G and D are siblings. A is the brother of G (from 2nd clue). So A, G, D are siblings. A is the son of M. So M is the father (as B is the mother).
Finally, B and M has 3 children : 2 Sons D & A, and daughter G.
Definitely G is younger to B as she is daughter of G
But it can't be said who is younger among children A,D & G. So option D is not inferred.

2. A contractor undertook to make 15 km of roadway in 40 weeks. In 10 weeks, 3 km was complete by 180 men working 8 hours a day. The men then agreed to work 1 hour a day overtime, And some boys were engaged to assist them, the work was finished in the stipulated time(40 weeks). How many boys were employed, if the work of 3 boys is equal to that of 2 men?
a) 70
b) 50
c) 60
d) 80
Explanation:
Let the capacity of man = 3 units, and boy = 2 units per hour.
Now total work = 3×180×8×7×10 = 3 km. - - - - - - - (1)
Let k boys were recruited. Now total work = (3×180+2×k) ×9×7×30 = 12km. - - - - - - (2)
By dividing 2nd equation by 1st,
⇒ $\dfrac{{(540 + 2k) \times 9 \times 7 \times 30}}{{3 \times 180 \times 8 \times 7 \times 10}} = 4$
⇒ k = 50

3. A can do a piece of work in 10 days, B in 15 days. They work for 5 days. The rest of work finished by C in 2 days.If they get Rs 1500 for the whole work, the daily wages of B and C are?

Explanation:
Let the total work = 30 units.
Then capacity of A = 3 units, B = 2 units. Now they worked for 5 days. So they must have completed 25 units. Rest of the work 5 units done by C in 2 days. So C capacity = 5/2 = 2.5 units.
Given that toatal wages are Rs.1500 for 30 units. So for 1 unit of work they get Rs.50. Now B and C per day work = (2 + 2.5) = 4.5 units. So their daily wages = 4.5 × 50 = Rs.225

4. The average of ten numbers is 7 .If each number is multiplied by 12 , then the average of new set of numbers is :

a) 7
b) 19
c) 82
d) 84
Explanation:
If each number is multiplied by K, then the new average increases by K times.  So new average = 84

5. In an examination, a student scores 4 marks for every correct answer and loses 1 mark for every wrong answer. If he attempts all 75 questions and secures 125 marks, the number of questions he attempts correctly, is :
a) 35
b) 40
c) 42
d) 46
Explanation:
Let the number of correct answers be x.
Then numbers of incorrect answers will be 75 – x
We get 4x – (75 – x)×1= 125
On solving the equation we get x= 40

6. A car moves at the speed of 80 km/hr. what is the speed of the car in metres per second?

A. 8 m/sec
B. 20 × $\dfrac{1}{9}$ m/sec
C. 21 × $\dfrac{2}{9}$ m/sec
D. 22 × $\dfrac{2}{9}$ m/sec
Explanation:Formula
For convert km/hr into m/sec multiply the speed with $\dfrac{5}{18}$
For convert m/sec into km/hr multiply the speed with  $\dfrac{18}{5}$
80 × $\dfrac{5}{18}$  22 ×  $\dfrac{2}{9}$ m.sec.

7. 3 men can complete a piece of work in 6 days. Two days after they started the work, 3 more men joined them. How many days will they take to complete the remaining work?
Explanation:
3 man 1 day work = $\displaystyle\frac{1}{6}$
3 man 2 days work =  $\displaystyle\frac{2}{6}$
Remaining work =  (1 – $\displaystyle\frac{2}{6}$ ) = 2/3 parts.
6 man together perform the work in 1 day is = $\displaystyle\frac{1}{6}$ + $\dfrac{1}{6}$  = $\dfrac{2}{6}$ parts
$\displaystyle\frac{2}{6}$ parts completed in 1 day
$\displaystyle\frac{2}{3}$ parts will b completed in  2 days

8. A single discount % equal to three successive discounts of 30%, 20% and 10%.
A. 49.6%
B. 50.4%
C. 40%
D. 60%
E. None of these
Explanation:
Let the initial price be 100.
30% discount on 100 is 30
(100 – 30) = 70
20% discount on the 70 is 14
(70 – 14)  = 56
10%discount on the 56 is 5.6
So the answer is 30 + 14 + 5.6 = 49.6

9. If "PROMPT" is coded as QSPLOS ,then "PLAYER" should be

(a) QMBZFS
(b) QMBZDW
(c) QUREXM
(d) QMBXDQ
Explanation:
1st 3 letters are denoted by its next alphabet and the next 3 letters are denoted by its previous alphabets.

10.Which of the following are phases of 2-phase locking protocol?

1) Intent to request locks
2) Release the present locks and never asking for transmission
3) Both (1) and (2)
4) None of these

11.When an array of pointers is passed through a function, what actually is passed?

1) address of the starting element
2) last element
3) first element
4) number of elements
Explanation:
When any array is passed through a function,always the address of starting element is passed

12. If the operation,^ is defined by the equation x ^ y = 2x + y, what is the value of a
in 2 ^ a = a ^ 3
A)-2
B)-1
C)0
D)1
Explanation:
2^a = 2 × 2 + a - - -  (i)
a^3 = 2 × a + 3 - - - (ii)
4 + a = 2a + 3
a = 1

13. In a certain school, 20% of the students are below 8 yrs of age. The number of students above 8 yrs of age is (2/3) of the number of students of 8 years age which is 96. What is the total number of students in the school?

Explanation:
Let total students be x.
⇒ 0.2x + $\dfrac{2}{3}$ × 96 + 96 = x
⇒ x = 200

14. If there are 5,000 voters out of which 20% are not eligible to vote and there are two candidates contesting. The winning candidate won by 15% of votes. What is the total number of votes he got ?
Explanation:
Number of voters eligible for voting = 5000 × 0.8 = 4000
Number of votes extra got by the winning candidate =  4000 × 0.15 = 600
Let the number of votes won by winning candidate =  x.
⇒ x – (4000 – x) = 600
⇒ x = 2300

15. Find the set of all points (x, y) such that the area of the triangle with vertices (0, 0), (6, 4) and (x, y) is 4.
A).(x, y) lies on the circle (y – 6)2 + (x – 4)2 = 16
B).(x, y) satisfies 6y – 4x = 8 or 6y – 4x = –8
C).(x, y) satisfies 6y – 4x = 4 or 6y – 4x = –4
D).(x, y) satisfies 6y – 4x = 8
Explanation:
Area of a triangle if one of the point is (0, 0) = $\dfrac{1}{2}\left| {({x_1}{y_2} - {x_2}{y_1})} \right|$
⇒ $\dfrac{1}{2}\left| {(6 \times y - 4 \times x)} \right|$ = 4
⇒ 6y  4x = 8

16. When not moving on the sidewalk, Maya can walk the length of the sidewalk in 7 minutes. If she stands on the sidewalk as it moves, she can travel the length in 4 minutes. If Maya walks on the sidewalk as it moves, how many minutes will it take her to travel the same distance? Assume she always walks at the same speed, and express your answer as a decimal to the nearest tenth.
(a) 3.6
(b) 2.5
(c) 3.8
(d) 2.8
Explanation:
Assume distance of sidewalk "x"
Speed 1 (moving on sidewalk)
Speed 2 (moving off sidewalk)
Since both the movements are in same direction, we can do speed 1 + speed 2
Speed 1 = $\dfrac{x}{4}$
Speed 2 = $\dfrac{x}{7}$
Speed 1 + speed 2 = $\dfrac{{11x}}{{28}}$ =  = 0.39286x
Now new time while moving on sidewalk =  $\dfrac{x}{{0.39286x}}$ = 2.54544

17. The ages of Old and Young total 48.  Old is twice as old as Young was when Old was half as old as Young will be when Young is three times as Old was when Old was three times as old as Young. How old is Old?
(a) Old-42, Young-26
(b) Old-38, Young-22
(c) Old-30, Young-18
(d) Old-28, Young-14
Explanation:
From the options itself,we can see that option c
old = 30
young = 18
30 + 18 = 48
By reducing this years only by one
Before 6years
old = 24 (half of young)
young = 12 (twice of old)

format: plain


text:
## Tuesday, October 20, 2009

### A simple lexical analyzer demo in Haskell

Do get some better Haskell practice, I developed a small lexical analyzer in Haskell. This uses basic Haskell functionality and doesn't use sophisticated libraries like Parsec.

Here is the output of this effort:

{-This script implements a simple lexical analysis programbased on the example in Modern Compiler Design Book Section 2.1Tokens--------The lexical analyzer supports following tokens.Operators: +, -, * and /Separators: ; , {} ( and )Integers (a string of digits)Identifiers: first character must be a letter             other characters can be letter or digit or underscore             two underscores consecutively are not allowed             last character cannot be an underscoreEOF token : represents end of fileAlso supported are:Comments: They start with # and end with #Layout characters: all characters less than equal to ' ' are    considered as layout charactersLimitations----------------Some specific limitations of this implemenation are:- Its a limited form of recursive descent parser. Based on  the first character in the token, we assume the token type  and continue to read the rest of token.- It doesn't track the source code position. This would actually  require some form of monad since the source code position tracking  is a sort of side effect to the lexical analysis.- The lexical analyzer doesn't support too many debugging facilities.- Lack of unit tests at this point of time.-}{- following data type defines the tokens supported by this lexer   the C version in the MCD book uses #defines for different token   classes. Haskell version is much more cleaner with proper data   constructors attached to each token class and automatically   generated show and eq functions.-}import System.IO-- a token can bedata Token = EOF | -- end of file             Identifier String | -- an identifier string             IntegerToken Integer | -- an integer             Operator Char | -- an operator             Separator Char | -- a separator             Error String -- or some erroneous token             deriving (Show, Eq)-- lexer reads a string and returns a list of tokenslexer :: String->[Token]{- we need to remove comments and other layout characters   before reading a token. This is an example of conducting   some preprocessing before doing an actual operation.   Such a situation should be implemented using two sister   functions (here lexer and lexer').   lexer does the job of removing layout and comments   lexer' does the job of reading a token   lexer calls lexer' (for remaining data)   lexer' calls back lexer (for remaining data)   This kind of strucutre eliminates complicated if-then-else logic.-}lexer xs =  let s =  skipLayoutAndComment xs            in lexer' s-- for an empty string, lex returns an empty listlexer' [] = [EOF]-- for a non-empty string we read the first token-- then we let lexer tokenize the rest of stringlexer' xs = let (t, rest)= nextToken xs            in (t:lexer rest)-- next token reads the input string and returns the next token and-- rest of stringnextToken:: String->(Token, String)nextToken [] = (EOF, []){- The implementation is a five way branch based on the first character.   If the first character is a letter, we read an identifier.   If the first character is a digit, we read a number.   If the first character is an operator, we simply read an operator token.   If the first character is a separator, we simply read a separator token.   Otherwise, we consider this as an erroneous character and generate   an error token for this character.   The lexical analyzer shouldn't stop analyzing the file at any point   of time. If it doesn't recognize any character or a string of characters   in the file, then it should simply generate an Error token at that point   of time and proceed further with reading next tokens.   It should be the job of parser to identify real syntax errors in the   code and report the user accordingly.-}nextToken l@(x:xs) | isLetter x =  let (first, rest) = readIdentfier l                                      in (Identifier first, rest)                  | isNumDigit x = let (first, rest) = readInteger l                                       in (IntegerToken first, rest)                  | isOperator x = (Operator x, xs)                  | isSeparator x = (Separator x, xs)                  | otherwise = (Error [x], xs)-- reads an integer and returns the token plus rest of stringreadInteger xs = let (first, rest)  = span isNumDigit xs in                     (read first :: Integer, rest){-An identifier consists of firstCharacter and restCharacter*firstCharacter can be a letterrestCharacter can be letter or digit or underscoremore than one underscores consecutively are not allowedthis should be called only if first character of the inputlist is a letter.Here we assume that the first character is a letter. Thisis actually ensured by the nextToken function defined above.We thus focus on reading rest of identfier.-}readIdentfier [] = ([], [])readIdentfier l@(x:xs) = let (first, rest) = readLettersOrDigits xs                             (first', rest') = underscoreTails rest                             identifier = (x:first) ++ first'                             in (identifier, rest')readLettersOrDigits :: String->(String, String){-Reads an input string and splits it in two parts. Thefirst part (possibly empty) consists of a sequence of letteror digit characters.The 2nd part contains the rest of input string.-}readLettersOrDigits xs = span isLetterOrDigit xsunderscoreTail :: String->(String, String){-Reads an undscore tail part of an identifierFollowing rules must be observed:- the tail starts with an underscore- the underscore must be followed by a letter or a digit- following this, there may be 0 or more letters or digits-}-- empty list would result in empty underscore tailunderscoreTail [] = ([], [])-- at least two characters are required in undescore tailunderscoreTail [x] = ([], [x])-- the first character must be an underscore-- 2nd character must be a letter or digit-- following characters (if any) must be letter or digitunderscoreTail l@(x:y:xs) = if isUnderScore x && isLetterOrDigit y                               -- lets read the rest of letters/digits of this                               -- tail                               then let (first,rest) = readLettersOrDigits xs                                    in (x:y:first, rest)                               -- there is no underscoreTail here                               else ("", l)underscoreTails :: String->(String, String)-- reads 0 or more occurances of underscoreTailunderscoreTails xs = let -- lets try to read the first underscoreTail                         (first, rest) = underscoreTail xs in                         if null first                            -- if first tail is absent, then we just return                            then (first, rest)                            -- otherwise we read rest of the tail recursively                            else let (first', rest') = underscoreTails rest                                 -- we join the first tail and rest of the tail                                 -- we return this along with unread string                                 in (first ++ first' , rest')-- skip layout and commentskipLayoutAndComment = skipLayout . skipComment-- skips layoutskipLayout [] = []skipLayout l@(x:xs) = case isLayout x of                                True -> skipLayout xs                                False -> lskipComment :: String->String{- skips commentThe first character must be #.Following this, we need to keep skipping till we findanother #.-}skipComment [] = []skipComment l@(x:xs) = case isCommentStart x of                                True -> -- we need to find the end of comment                                    skipTillCommentEnd xs                                False -> l-- skips till the end of comment character is found-- this should be called from skip comment function-- this routine is perfect for recursive tail optimizationskipTillCommentEnd [] = []skipTillCommentEnd l@(x:xs) = case isCommentEnd x of                                True-> xs                                False-> skipTillCommentEnd xs-- character level tests-- a layout characterisLayout ch = ch <= ' '-- comment start characterisCommentStart ch = ch == '#'-- comment end characterisCommentEnd ch = ch == '#'-- upper case letterisUpperCase ch = 'A' <= ch && ch <= 'Z'-- lower case letterisLowerCase ch = 'a' <= ch && ch <= 'z'-- a letterisLetter ch = isLowerCase ch || isUpperCase ch-- a digitisNumDigit ch = '0' <= ch && ch <= '9'-- a letter or a digitisLetterOrDigit ch = isLetter ch || isNumDigit ch-- an underscoreisUnderScore ch = ch == '_'-- an operatorisOperator ch = ch elem "+-*/"-- a separatorisSeparator ch = ch elem ";,(){}"main :: IO ()main = do    putStrLn "Simple Lexical Analyzer v0.1"    mainloopmainloop :: IO ()mainloop = do    putStr ">>> "    hFlush stdout    inputStr <- getLine    case inputStr of      "q" -> return ()      otherwise ->        do          let tokens = lexer inputStr          putStrLn \$ show tokens          mainloop

A typical session for this program looks like follows:

runghc MCDLex.hsSimple Lexical Analyzer v0.1>>> abc[Identifier "abc",EOF]>>> 2344[IntegerToken 2344,EOF]>>> +[Operator '+',EOF]>>> +-/*[Operator '+',Operator '-',Operator '/',Operator '*',EOF]>>> (){},;[Separator '(',Separator ')',Separator '{',Separator '}',Separator ',',Separator ';',EOF]>>> #thiscommentwillbeignored"  todo_list[EOF]>>> #thiscommentwillbeignored#  todo_list[Identifier "todo_list",EOF]>>> (3+4)[Separator '(',IntegerToken 3,Operator '+',IntegerToken 4,Separator ')',EOF]>>> errors__[Identifier "errors",Error "_",Error "_",EOF]>>> 23___45[IntegerToken 23,Error "_",Error "_",Error "_",IntegerToken 45,EOF]>>>

Note: I tried to use the "prettyprint" javascript support to beutify this code. But it seems like the pretty printer is not able to parse haskell properly. Hence I am removing it and showing the code in plain pre tag.

#### 1 comment:

Perifort said...

so good an example!thx~


text:
# Organizing code with namespace in JavaScript

## A. Preface:

Sometime, we want to use functions or properties globally. But when there are too much global variables, they may be bring a lot of trouble - naming collisions. We can use namespace to minimize number of variables. There are many solution to implement namespace, we’ll cover some simple approaches which are easy to use and understand :D

## B. Namespace:

### B.1. Use an object as a namespace:

// Create global namespace MYAPP
var MYAPP = MYAPP || {};

// Put function into namespace
MYAPP.sayHello = function () {
}

#### Why var MYAPP = MYAPP || {} ?

Let take a look at line 2 : why we use var MYAPP = MYAPP || {} instead of var MYAPP = {} ?

We may write many javascript files, and then combine them or not. There is a good chance that a namespace is defined in many files. So we must ensure that the namespace object in the other javascript files is not damaged.

Example:

In english.js:

// Create global namespace MYAPP
var MYAPP = {};

// Put function into namespace
MYAPP.english = {};
MYAPP.english.sayHello = function () {
}

In vietnamese.js:

// Create global namespace MYAPP
var MYAPP = {};

// Put function into namespace
MYAPP.vietnamese = {};
MYAPP.vietnamese.sayHello = function () {
}

And then combine them in NameSpaceExample.html

<html xmlns="http://www.w3.org/1999/xhtml">
<title>Namespace Example</title>
<script src="english.js" type="text/javascript"></script>
<script src="vietnamese.js" type="text/javascript"></script>
<script>
MYAPP.english.sayHello();
MYAPP.vietnamese.sayHello();
</script>
<body>
</body>
</html>

We’ll get error at line 7 MYAPP.english.sayHello(); Now we just need to change small code

var MYAPP = {}; >>> var MYAPP = MYAPP || {};
MYAPP.english = {}; >>> MYAPP.english = MYAPP.english || {};
MYAPP.vietnamese = {}; >>> MYAPP.vietnamese = MYAPP.vietnamese || {};

### B.2. Private/ Public method property and self-executing method

In C#, Java,… we alway have property modifier such as: public, private, protected. Now let’s implement it in javascript.

var MYAPP = MYAPP || {}

MYAPP.publicMethodExample = function () {

//private property

//private method
function toUpperName() {
};

//public method
return { sayHello: function () {
}
}
} (); // insert () to make self-executing function

MYAPP.publicMethodExample.sayHello();

The properties, methods in return will be public variable. One important thing to remember is putting () right after we define a function. It’ll make our function become a self-executing function (function execute immediately).

#### How our code works?

var MYAPP = function(){...} ();

First, the function is executed and return sayHello. Then sayHello will be assigned to MYAPP.


text:
# I need to use a symbol like this |---| with a continuous line between the two vertical ones

I need a symbol to refer in my text a connection used in some figures. I need something like it could be expected from a \vdashv.

## 2 Answers

You can join \vdash and \dashv:

\documentclass{article}

\newcommand{\vdashv}{\vdash\joinrel\dashv}

\begin{document}

$A \vdashv B$

\end{document}

If you need a shorter symbol,

\documentclass{article}

\newcommand{\vdashv}{%
\vdash\mathrel{\mkern-9mu}\dashv
}

\begin{document}

$A \vdashv B$

\end{document}

This is the maximum amount of backing up. With \joinrel it is -3mu.

A different realization with shorter vertical bars:

\documentclass{article}
\usepackage{stmaryrd}

\newcommand{\connection}{\mapstochar\relbar\mapsfromchar}

\begin{document}

$A \connection B$

\end{document}

• Well...this is the better answer :) – Dr. Manuel Kuehner Apr 5 '17 at 15:11
• Really nice answer. just in case. It is a clever way to shorter the vertical lines? – heracho Apr 5 '17 at 15:44
• @herito Added a version with shorter bars. – egreg Apr 5 '17 at 15:52
• Great. I found that \leftfootline with your previous strategy could also do the trick – heracho Apr 5 '17 at 16:09
• @herito Be careful, though: \usepackage{MnSymbol} changes all math symbols in a way that is usually incompatible with the text font. – egreg Apr 5 '17 at 16:12

I am not totally serious...

\documentclass{standalone}

\usepackage{rotating}

\begin{document}

\rotatebox[origin=c]{180}{$\dashv$}$\!\dashv$

\end{document}

Not so good as an image export

Better in Adobe Reader

No luck in Detexify

## Update

\reflectbox (mirroring a symbol) from the graphicx package does a better job.

\documentclass{standalone}

% \rotatebox
\usepackage{rotating}

% \reflectbox
\usepackage{graphicx}

\begin{document}

\texttt{\textbackslash rotatebox} \rotatebox[origin=c]{180}{$\dashv$}$\!\dashv$
\texttt{\textbackslash reflectbox} \reflectbox{$\dashv$}$\!\dashv$

\end{document}


text:
# Annotation with Prokka¶

Prokka is a tool that facilitates the fast annotation of prokaryotic genomes.

The goals of this tutorial are to:

• Install Prokka
• Use Prokka to annotate our genomes

## Installing Prokka¶

cd ~/
git clone https://github.com/tseemann/prokka.git

We also will need some dependencies such as bioperl:

sudo apt-get -y install bioperl libdatetime-perl libxml-simple-perl libdigest-md5-perl

This may take a little while.

and we need an XML package from perl

sudo bash
export PERL_MM_USE_DEFAULT=1
export PERL_EXTUTILS_AUTOINSTALL="--defaultdeps"
perl -MCPAN -e 'install "XML::Simple"'
exit

Now, you should be able to add Prokka to your $PATH and set up the index for the sequence database: export PATH=$PATH:$HOME/prokka/bin prokka --setupdb  To make sure the database loaded directly: prokka --listdb  You should see something like: tx160085@js-157-212:~$ prokka --listdb
[17:04:15] Looking for databases in: /home/tx160085/prokka/bin/../db
[17:04:15] * Kingdoms: Archaea Bacteria Mitochondria Viruses
[17:04:15] * Genera: Enterococcus Escherichia Staphylococcus
[17:04:15] * HMMs: HAMAP
[17:04:15] * CMs: Bacteria Viruses

Prokka uses a core set of the Uniprot-DB Kingdom sets against which it blasts your samples. It is possible to search in a more specific dataset, e.g. the genus Enterococcus, by adding a few flags to the command.

–usegenus –genus Enterococcus

Question: What do you think you would do for adding to the default databases?

Prokka should be good to go now– you can check to make sure that all is well by typing prokka. This should print the help screen with all available options. You can find out more about Prokka databases here.

## Running Prokka¶

Make a new directory for the annotation:

cd ~/
mkdir annotation
cd annotation

Link the metagenome assembly file into this directory:

ln -fs ~/mapping/subset_assembly.fa .

Now it is time to run Prokka! There are tons of different ways to specialize the running of Prokka. We are going to keep it simple for now, though. It will take a little bit to run.

prokka subset_assembly.fa --outdir prokka_annotation --prefix metagG --metagenome --kingdom Bacteria

Question: Look at the results of the prokka analysis as it prepares your output file. What types of categories are you seeing flash by on the screen?

Don’t worry, the program tends to pause here:

Running: cat prokka_annotation\/sprot\.faa | parallel --gnu --plain -j 6 --block 242000
--recstart '>' --pipe blastp -query --db /home/tx160085/prokka/bin/../db/kingdom/Bacteria/sprot
-evalue 1e-06 -num_threads 1 -num_descriptions 1 -num_alignments 1 -seg no > prokka_annotation\/sprot\.blast 2> /dev/null

This will generate a new folder called prokka_annotation in which will be a series of files, which are detailed here.

In particular, we will be using the *.ffn file to assess the relative read coverage within our metagenomes across the predicted genomic regions.

Question: Take a moment and look inside the output files.:

cd ~/annotation/prokka_annotation
less -S *.fsa

less reminders:

*Press space_bar to page down *Press q to exit the less commands

## Questions?¶

• What can I annotate with prokka?
• Alternatives?
• How do I submit my annotated files to Genbank? ENA??
• Why is it called Prokka?

LICENSE: This documentation and all textual/graphic site content is released under Creative Commons - 0 (CC0) -- fork @ github.


text:
# Local And Metro Newspapers With Paywalls

Newspaper

Location

Circulation

Date paywall was instituted

Price of monthly online-only subscription

Online-only subscribers

Long Island, New York

357,000

2009

$20 35 * Little Rock, Arkansas 183,000 2002$5.95

3,500

Albuquerque, New Mexico

102,000

2001

$12.95 1,500 – 2,000 Stockton, California 60,000 2010$9.16

N/A

44,000

2009

$11.80 1,000 Manchester, Connecticut 34,000 2009$3.90

N/A

New Bedford, Mass.

34,000

2010

$13.48 N/A Bend, Oregon 33,000 2005$8

1,200

Lima, Ohio

29,000

2009

$4.95 540 Santa Barbara, California 28,000 N/A$6

N/A

Bloomington, Indiana

28,000

2003

$5.95 N/A Idaho Falls, Idaho 26,000 N/A$6

N/A

Kankakee, Illinois

26,000

2009

$14.70 100 Lewiston, Idaho 25,000 1999$8

450

Laredo, Texas

25,000

N/A

$4 N/A Owensboro, Kentucky 24,000 2006$6.95

800

Nampa, Idaho

20,000

N/A

$5.50 200 Northampton, Mass. 16,000 2004$8

580

Mount Washington Valley, New Hampshire

16,000

N/A

$2.42 N/A Brunswick, Georgia 15,000 N/A$7

N/A

Keene, New Hampshire

14.000

2005

$9 200 Martha’s Vineyard, Mass. 13,000 N/A$2.50

N/A

Newport, Rhode Island

12,000

2009

$35 N/A Manhattan, Kansas 10,000 2009$12.89

150

Key West, Florida

8,000

N/A

$12 N/A Ellensburg, Washignton 6,000 N/A$5

N/A

This list was derived from our own web research and conversations with publishers, as well as a recent survey by the American Press Institute. Some details: The number of online subscribers is the most recent data we could find; it is not, however, necessarily up to date, although none of these statistics are more than seven months old. *The Newsday number, for instance, dates from late January. Circulation numbers, when available, are rounded to the nearest thousand. And when monthly subscription rates were not available, we either took the price of a weekly subscription and multiplied that by four or divided the price of a yearly subscription by 12.

Reported by Joseph Tartakoff
Published: April 9, 2010 (updated: April 11, 12, 15)


text:
# Revision history [back]

There are several ways you can use plot or similar functions.

• use plot with the circle as the graphics object you already discovered:

sage: plot(circle((0, 0), 2))

• express y as a function of x for two half-circles (this will miss part of the circle):

sage: p = plot(sqrt(4 - x^2), (-3, 3))
sage: q = plot(-sqrt(4 - x^2), (-3, 3))
sage: (p + q).show(aspect_ratio=1)

• use an implicit plot starting from an equation for the circle:

sage: x, y = SR.var("x y")
sage: implicit_plot(x^2 + y^2 - 4, (x, -3, 3), (y, -3, 3))

• use a parametric plot for the circle; here is one (there are many others):

sage: t = var('t')
sage: parametric_plot((2*cos(t), 2*sin(t)), (t, 0, 2*pi))

In this case I would recommend the parametric plot rather than the functions or the implicit plot.


text:
A personal website using: R, hugodown, Academic Theme, GitHub, and Netlify

# Why Hugodown

I switched my website from blogdown + github pages to hugodown + netlify because hugodown more cleanly separates what R is doing and what Hugo is doing. Like blogdown, I still write posts in Rmarkdown - but then the post is knit to a markdown file designed to work with Hugo. The transformation takes place one post at a time instead of doing the whole site. It’s still pretty early in using this, but so far I’ve found that cleanly separating those things out makes everything a bit easier for me to follow. I don’t know how well hugodown works with themes other than Academic, but the Academic theme is quite flexible and makes sense for most people looking to share data science content.

## Background knowledge

I’m assuming knowledge R as well as of git and Github (or Gitlab, etc.). I highly recommend Happy Git with R if you want to improve your version control skills.

# Getting Started

I started at the hugodown site and installed hugodown

devtools::install_github("r-lib/hugodown")

After install, I ran into two errors trying to create the site template.

1. I had not yet installed hugo. Thankfully, there was a really helpful error message that told me to install hugo, including the function from hugodown that would do it for me.
2. I needed to update usethis as I got Error: 'ui_silence' is not an exported object from 'namespace:usethis' the next time I tried to create the site. I installed the latest version of usethis from CRAN and it fixed the problem. You may want to also update knitr since I found I needed to do that when I first tried to knit a post.

Once usethis and knitr are up to date you’re ready to create and preview a site with the academic theme:

# Install Hugo
hugodown::hugo_install('0.66.0') #I used this version because the error message suggested it

# Preview site
hugodown::hugo_start()

# Making a new post

There’s a lot of possible next steps from here to start customizing, but the first thing I wanted to do was make sure I could add new posts to the site. The hugodown::use_post() function generates a new folder and a .Rmd template for posting. The only slight confusion I ran into here was figuring out where to start my paths from.

#This errors with the directory not found
hugodown::use_post("content/post/using_hugodown")

#This works
hugodown::use_post("post/using_hugodown")

The folder will be called using_hugodown or whatever the name of your post is, while the .Rmd file will always be index.Rmd. The top of the file sets options for the post and is easy to fill out. The author field might be a bit confusing as the setup here allows multiple authors (which is great!) but the default author is admin. You can change this if you want when we get into how the academic theme is structured.

There’s also the very nice ability to set the post as a draft by marking draft: true. This allows you to save works in progress in the same file structure, which is really convenient. I also used this to get the sample posts to stop showing up while still having them saved in the same place for me to reference later.

## Kniting a post

I’m not completely sure how up to date knitr needs to be, but I installed the latest version knitr from CRAN after I had an error of Unknown extension: task_lists. I also had to install the latest version of pandoc, (I used the installer on the pandoc website) before I was able to knit without errors.

Once able to knit it creates an index.md file that Hugo uses to create the site. If you open it and take a look you’ll see some of the same configuration info at the top of the post as well as a bit of .html formatting inside the markdown.

## Images

It took me a while to figure out how to include images in my post. Here again this is about figuring out the folder structure and also the just how important the initial / is in the file paths. There are two ways to deal with images.

First, you can put the image in the same folder as the post. For example, the above screenshot of the top of a hugodown post was generated with this code. The top_of_hugodown.png file is in the same folder as the index.Rmd file. It will not work unless you have a ./ in front of it.

![Top matter for a hugodown post](./top_of_hugodown.png)

The second way to do this is to set up an images folder. My top level folder (the git repo and R project) is called personal_site, so the file path for this set up is personal_site/static/img/top_of_hugodown.png. I’ll say more about the static folder when I get to customizing the Academic theme. But the way to include an image in this set up is to start the file path is if you’re already in the static folder.

![Top matter for a hugodown post](/img/top_of_hugodown.png)

Images that are generated by R code (e.g. ggplot graphs) are taken care of by hugodown which uses the first set up, although it creates a figs folder to hold the images inside the folder for the post. Not all htmlwidgets work with hugodown right now, so while there are no problems with ggplot images it’s not currently possible to use plotly graphics. There may be some possible workarounds, but just be aware that anything in a post that creates an interactive graphic and uses javascript may run into conflicts with Hugo.

The Academic theme is so highly customizable that it starts out with a bewildering number of folders, files, and options. For the most part I was able to figure things out just by opening up files and reading the comments. There is also documentation online.

## content/home

The first thing I did was work with the content/home folder and turn off some of the extra features. The folder looks like this:

If you open content/home/hero you’ll be see this markdown at the top. I set active to false to get rid of the banner in the example site.

I then went through and set almost everything to active = false except for about.md, index.md, posts.md, and skills.md. I’ll come back later to start activating the sections I want to use as I have time to update, but for now I want to start with a more minimal site and then expand.

Finally, just because these widgets are no longer active and on the home screen doesn’t mean they don’t show up in the menu across the top. That menu is controlled by config/_default/menus.toml, and you can comment out the sections you don’t want

I also edited the skills.md file. I changed the weight to 100 to move it to the bottom of the page below the posts and then I had fun with icons and skill levels. I still don’t completely understand how to tell which icon-pack a given icon from font awesome is in. I searched font awesome for the icons I wanted to use and then just checked both fab and fas, although everything except the icons for R and Python were in icon-pack = "fas".

## content/authors

In order to update from being Nelson Bighetti you need to look in content/authors/admin. By default the admin folder is linked, although if you add additional authors there is an option in content/home/about.md to change which author is displayed.

I didn’t change much of the structure here, so it was just a matter of overwritting the descriptions and the links in the _index.md folder. I also overwrote the avatar.jpg file with a picture of me.

I uncommented the section for a CV and added my cv to static/files/cv.pdf. The static folder is used for files that aren’t touched by Hugo in making the website, they’re just hosted by the server and available as links for the rest of the site. This is what makes static a good place for .pdf files or for images if you choose that set up. (I suspect a possible workaround for interactive graphics is to place just the graphic in the static folder and then link to it from the post, although I haven’t tried this yet).

## config.toml

There is a config.toml file in the main folder and here I added my site title, the web address, and a copyright notice. I also tried setting enableGitInfo = true, which allows the posts to automatically show when they were last updated on Github. The problem with this is that I copied over some posts from my old blog and it was then showing all of those as being written in a single day, so I disabled it. However, it would be a useful feature if you’re only writing new posts.

In config/_default/params.toml there is a section for comments which allows you to set up either Disqus or Commento. The more difficult part here is setting up one of those services. Once set up all I had to do was enter my Disqus shortname and specify the engine option as 1 for Disqus.

Similarly with Google Analytics once you get the tracking Id from Google Analytics it’s painless to add it to the site. The same params.toml file has a marketing section at the very bottom with a google_analytics = " " field where you can enter your tracking ID.

# Deploying

I found the deploy instructions provided with the hugodown package worked seemlessly, so no need to add to them here.

The site checks from Github are set up automatically which is extremely nice, as is the ability to preview the site before merging in a pull request.

While it took some time to figure out where things are in the Hugo Academic template overall it seems like a good set up that will be easy both to maintain and to add to over time.

##### Nate Kratzer
###### Senior Data Scientist

My research interests include poverty, inequality, and data science.


text:
# Recitation 8

Example 1: Estimate $\int_0^1 \cos(x^2)dx$ using (a) the Trapezoidal Rule and
(b) the Midpoint Rule, each with $n = 4$. From a graph of the integrand, decide whether your answers are underestimates or overestimates. What can you conclude about the true value of the integral?

Solution 1: (a) $T_4 = \frac{1}{4\times 2}[f(0)+2f(1/4)+2f(2/4)+2f(3/4)+f(1)]\approx 0.895759$. (b) $M_4=\frac{1}{4}[f(1/8)+f(3/8)+f(5/8)+f(7/8)]\approx 0.908907$. Because $f$ is concave down on $[0,1]$, $T_4$ is an underestimate and $M_4$ is an overestimate. We can conclude that $0.895759 < \int_0^1 \cos(x^2)dx< 0.908907$.

Example 2: (a) Find the approximations $T_8$ and $M_8$ for the integral $\int_0^1 \cos(x^2)dx$. (b) Estimate the errors in the approximations of part (a). (c) How large do we have to choose $n$ so that the approximations $T_n$ and $M_n$ to the integral in part (a) are accurate to within 0.0001?

Solution 2: Part (a) is similar to (a) in the previous example. (b) $f(x)=\cos(x^2)$, $f'(x)=-2x\sin(x^2)$, $f''(x)=-2\sin(x^2)-4x^2\cos(x^2)$. For $0\leq x\leq 1$, $x^2\leq 1$ implies that $|f''(x)| \leq 2 |\sin(x^2)|+4|\cos(x^2)| \leq 6$. So far $n=8$, we take $K=6, a=0, b=1$ to get $|E_T| \leq 6\times 1^3 / (12 \times 8^2) = 0.0078125$ and $|E_M| \leq 1^3 / (24 \times 8^2) = 0.00390625$. (c) In order to have $|E_T|\leq 0.0001$, we need $6\times 1^3/(12\times n^2) \leq 10^{-4}$, which means $n^2\geq 5000$. Therefore $n=71$ works for $T_n$. For $T_M$, we need $n^2 \geq 2500$. Take $n=50$ would work.


text:
•
•

#### Keywords

Linear preservers, Semipositive matrix, Minimally semipositive matrix, Monomial matrix

#### Abstract

Semipositive matrices (matrices that map at least one nonnegative vector to a positive vector) and minimally semipositive matrices (semipositive matrices whose no column-deleted submatrix is semipositive) are well studied in matrix theory. In this short note, the structure of linear maps which preserve the set of all semipositive/minimally semipositive matrices is studied. An open problem is solved, and some ambiguities in the article [J. Dorsey, T. Gannon, N. Jacobson, C.R. Johnson and M. Turnansky. Linear preservers of semi-positive matrices. {\em Linear and Multilinear Algebra}, 64:1853--1862, 2016.] are clarified.

abs_vol34_pp687-694.pdf (101 kB)
Abstract

COinS