Displaying 20 results from an estimated 1274 matches for "acc".
Did you mean:
ac
2018 Feb 27
2
Parallel assignments and goto
...elow. But, surely, both must at some point insert values in a given environment ? either the local one, for <-, or an enclosing one, for <<- ? so I guess I am asking if there is a more low-level assignment operation I can get my hands on without diving into C?
factorial <- function(n, acc = 1) {
? ? if (n == 1) acc
? ? else factorial(n - 1, n * acc)
}
factorial_tr_manual <- function (n, acc = 1)
{
? ? repeat {
? ? ? ? if (n <= 1)
? ? ? ? ? ? return(acc)
? ? ? ? else {
? ? ? ? ? ? .tailr_n <- n - 1
? ? ? ? ? ? .tailr_acc <- acc * n
? ? ? ? ? ? n <- .tailr_n
? ? ? ? ?...
2018 Feb 27
0
Parallel assignments and goto
...at some point insert values in
> a given environment ? either the local one, for <-, or an enclosing one,
> for <<- ? so I guess I am asking if there is a more low-level assignment
> operation I can get my hands on without diving into C?
>
>
> factorial <- function(n, acc = 1) {
> if (n == 1) acc
> else factorial(n - 1, n * acc)
> }
>
> factorial_tr_manual <- function (n, acc = 1)
> {
> repeat {
> if (n <= 1)
> return(acc)
> else {
> .tailr_n <- n - 1
> .tail...
2018 Feb 11
4
Parallel assignments and goto
Hi guys,
I am working on some code for automatically translating recursive functions into looping functions to implemented tail-recursion optimisations. See https://github.com/mailund/tailr
As a toy-example, consider the factorial function
factorial <- function(n, acc = 1) {
if (n <= 1) acc
else factorial(n - 1, acc * n)
}
I can automatically translate this into the loop-version
factorial_tr_1 <- function (n, acc = 1)
{
repeat {
if (n <= 1)
return(acc)
else {
.tailr_n <- n - 1
.tailr...
2018 Feb 26
0
Parallel assignments and goto
...oing with that solution. However, I have now run into another problem involving those local variables ? and assigning to local variables in general.
Consider again the factorial function and three different ways of implementing it using the tail recursion optimisation:
factorial <- function(n, acc = 1) {
? ? if (n == 1) acc
? ? else factorial(n - 1, n * acc)
}
factorial_tr_manual <- function (n, acc = 1)
{
? ? repeat {
? ? ? ? if (n <= 1)
? ? ? ? ? ? return(acc)
? ? ? ? else {
? ? ? ? ? ? .tailr_n <- n - 1
? ? ? ? ? ? .tailr_acc <- acc * n
? ? ? ? ? ? n <- .tailr_n
? ? ? ? ?...
2004 Nov 09
1
redoing error causes backup file failure on target
...words, when you see redoing in your debug
expect the backup not to have worked correctly. I didn't see this problem
btwn naxpap01 and rwxp25l1 just btwn rwxp25l1 and naxp18l1. I'm pulling
the code from source to target.
In this example, 4,10,11 were all marked as redoing this created a AccChkpt.gz.r_bck the same as source and target. In other
words, we lost our n-1 backed up file AccChkpt.gz for acc.4,10, and 11.
Here is my syntax: b for backup and .r_bck for the backup suffix to append
rsync -vvabc -e ssh --suffix=.r_bck --exclude '*.r_bck' \
--delete --delete-after...
2014 Apr 08
2
host command output showing wrong domain (Samba4)
Hi
I never seen this before, and dont understand where too look for
Please share some light on this.
the host output is adding a extra domain.
example bellow, its showing right IPs followed by NXDOMAIN !!!
[root at 171-SYSLOG ~]# host 171-dc-a.xxxx.acc
171-dc-a.test.acc has address 10.254.228.226
171-dc-a.test.acc has address 10.254.225.45
Host 171-dc-a.test.acc not found: 3(NXDOMAIN)
Host 171-dc-a.test.acc not found: 3(NXDOMAIN)
now if i do host -v , look how its works
[root at 171-SYSLOG ~]# host -v 171-dc-a.test.acc
Trying "171-dc-a....
2008 Jan 17
2
[LLVMdev] specifying accumulator based load/stores
I have load / store instructions that require accumulator.
So a store looks like..
mov 3, acc
st acc, addr
I have specified "acc" as a separate register class containing only one
register which is the "acc".
The instr patterns are then splitted into:
set imm:$src, ACCClass:$dst (generating the "mov" above...
2007 Oct 31
1
Simple Umacs example help..
....775,1.474,3.679,3.889)
fn = function(x,a=0,b=1){
a+b*x
}
sample.ab <-function(x,y,a,b,s,da,db){
bstar = runif(1,b-db,b+db)
astar = runif(1,a-da,a+da)
logalpha = sum(dcauchy(y,location=fn(x,astar,bstar),scale=s,log=T) -
dcauchy(y,location=fn(x,a,b),scale=s,log=T))
logu = log(runif(1,0,1))
acc = (logu < logalpha)
b = acc*bstar + (1-acc)*b
a = acc*astar + (1-acc)*a
list(b=b,a=a,acc=acc)
}
samples = function(x,y,a,b,s,ds){
sstar = runif(1,s-ds,s+ds)
while(sstar <= 0){
sstar = runif(1,s-ds,s+ds)
}
logalpha = sum( dcauchy(y,location=fn(x,a,b),scale=sstar,log=T) -
dcauchy(y,l...
2018 Feb 11
0
Parallel assignments and goto
...i guys,
>
> I am working on some code for automatically translating recursive functions into looping functions to implemented tail-recursion optimisations. See https://github.com/mailund/tailr
>
> As a toy-example, consider the factorial function
>
> factorial <- function(n, acc = 1) {
> if (n <= 1) acc
> else factorial(n - 1, acc * n)
> }
>
> I can automatically translate this into the loop-version
>
> factorial_tr_1 <- function (n, acc = 1)
> {
> repeat {
> if (n <= 1)
> return(acc)
> else...
2007 Apr 25
2
assigning two conditions to grep()
Hi,
i have a problem in assigning 2 conditions to grep() ,
my data look like this:
DA 24 N7 Rad= 3.4 20 Sac= 0.93 Acc= 4.76
DA 24 N7 Rad= 3.4 14 Sac= 0.65 Acc= 3.33
DA 24 N7 Rad= 3.4 3 Sac= 0.14 Acc= 0.71
DA 24 N7 Rad= 3.4 11 Sac= 0.51 Acc= 2.62
DG 23 N7 Rad= 3.4 8 Sac= 0.37 Acc= 1.91
DG 23 N7 Rad= 3.4 5 Sac= 0.23 Acc= 1.19
DG 23 N7 Rad= 3.4 0 Sac= 0.00 Acc= 0.00
DG 23 N7 Rad= 3.4 3 Sac= 0.14 Acc= 0.71
DG 23...
2008 Jan 17
0
[LLVMdev] specifying accumulator based load/stores
On Jan 17, 2008, at 4:12 AM, Sanjiv Gupta wrote:
> I have load / store instructions that require accumulator.
> So a store looks like..
>
> mov 3, acc
> st acc, addr
>
> I have specified "acc" as a separate register class containing only
> one register which is the "acc".
> The instr patterns are then splitted into:
>
> set imm:$src, ACC...
2018 Feb 14
0
Parallel assignments and goto
.... I wouldn't be surprised if someone can come up with a faster implementation, but I suspect that the overhead of function calls will be hard to overcome. BTW, a version of my passign() that uses mapply() in place of a for loop (not shown) is even slower.
> factorial_tr_3 <- function (n, acc = 1) {
+ repeat {
+ if (n <= 1)
+ return(acc)
+ else {
+ passign(n = n - 1, acc = acc * n)
+ next
+ }
+ }
+ }
> microbenchmark::microbenchmark(factorial(100),
+ factorial_tr_1(100),
+ factorial_tr_2(100),
+ factorial_tr_3(1...
2013 Sep 12
2
Where's Dovecot's ports?
Dear all,
I installed "dovecot dovecoot-mysql postfix and postfix-mysql" from
debian repository 7.
I start them with "/etc/init.d/postfix start" and "/etc/init.d/dovecot
start"
but When i use nmap localhost I see the following output:
root at sito:/etc/dovecot# nmap localhost
Starting Nmap 6.00 ( http://nmap.org ) at 2013-09-12 07:35 IRDT
Nmap scan report for
2009 Mar 27
1
ROCR package finding maximum accuracy and optimal cutoff point
If we use the ROCR package to find the accuracy of a classifier
pred <- prediction(svm.pred, testset[,2])
perf.acc <- performance(pred,"acc")
Do we?find the maximum accuracy?as follows?(is there a simplier way?):
> max(perf.acc at x.values[[1]])
Then to find the cutoff point that maximizes the accuracy?do we do the
foll...
2009 May 15
3
Using sample to create Training and Test sets
Forgive the newbie question, I want to select random rows from my
data.frame to create a test set (which I can do) but then I want to
create a training set using whats left over.
Example code:
acc <- read.table("accOUT.txt", header=T, sep = ",", row.names=1)
#select 400 random rows in data
training <- acc[sample(1:nrow(acc), 400, replace=TRUE),]
#try to get whats left of acc not in training
testset <- acc[-training, ]
Fails with the following error....
Error: in...
2010 Nov 07
2
remove data frame from list of data frames
I have a list of data frames like this:
a<- data.frame(x=runif(10), y = runif(10), Acc = 1)
b<- data.frame(x=runif(10), y = runif(10), Acc = 0)
ls<- list(a,b)
and I want to remove the data frames from ls that have Acc values other than 1.
How do I do that?
Thanks for any help!
Matthew
2012 Jul 28
3
Appending the Column names
Hi Freinds,
I have two data frames X,Y. I want to append both the data frames into one,
along with the columns names from both the data frames (it should look like
Z).
X:
Summary G Y R
Acc 12 12 13
Bcc 11 14 15
Ccc 13 15 16
Y:
Summary G Y R
Acc 10 11 12
Bcc 13 12 11
Ccc 11 16 20
Result
----------
Z:
Summary G...
2016 Aug 22
1
CentOS 7, memory hungry (2.5GB) without user and heavy services running
...f (0.00/0/0)
udp6 0 0 ::1:323
:::* off (0.00/0/0)
raw6 0 0 :::58 :::*
7 off (0.00/0/0)
Active UNIX domain sockets (servers and established)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 9979
/run/lvm/lvmpolld.socket
unix 2 [ ACC ] STREAM LISTENING 9988
/run/lvm/lvmetad.socket
unix 2 [ ] DGRAM 6664
/run/systemd/notify
unix 2 [ ACC ] STREAM LISTENING 17787 private/tlsmgr
unix 2...
2016 Feb 13
4
Register spilling fix for experimental 6502 backend
So I've been designing an experimental 6502 backend for LLVM. Link:
<https://github.com/beholdnec/llvm-m6502>
The 6502 only has a few registers, one accumulator and two indexes, none of
which are large enough to hold an absolute pointer. Because of this, the
backend really tests the power of LLVM's register allocator (RA).
I've made a change to the RA that might be of interest to devs of other
backends, read on.
Other devs suggested reser...
2006 Feb 09
1
Error Messages in /var/log/messages
Here's the output:
Feb 9 15:51:26 SSI001 kernel: SFW2-INext-ACC-TCP IN=eth0 OUT=
MAC=00:0f:ea:73:88:12:00:40:2b:67:5b:a7:08:00 SRC=192.168.1.54
DST=192.168.1.2 LEN=48 TOS=0x00 PREC=0x00 TTL=128 ID=51248 DF PROTO=TCP
SPT=1964 DPT=139 WINDOW=65535 RES=0x00 SYN URGP=0 OPT (020405B401010402)
Feb 9 15:51:28 SSI001 kernel: SFW2-INext-ACC-TCP IN=eth0 OUT=
MAC=00:0f:...