SteveS

0

votes
0

answer
4

views

R function parameters with specific options?

Given a function foo I want the user to be able to choose one of the predefined options: foo
SteveS
1

votes
1

answer
246

views

How to configure the hive.Connection() to pass Hive the settings I want?

I am running Spyder 3.2.8 on Ubuntu 17.10. I would like to pass Hive that is on remote cluster to give names to column names using the set hive.cli.print.header=true; command. Here is what I have done so far: con = hive.Connection(host='name', port=some port, username='usr', configuration='hive.cl...
steves
1

votes
0

answer
134

views
1

votes
0

answer
190

views

Running Map() in parallel on multiple cores?

Given a dataframe with a 2 columns of JSON lists like this: col1 '[34454,31843,33239,34885,34352,42294,26603,55449,34710,49235,37558,82942,38028,58170,42772,27700,28464,28917,31902,41082,37089,67366,48616,46706,31464,30308,33832,30485,50838,38225,59758,47311,33747,32972,34903,32729,52274,38895,45899...
SteveS
0

votes
0

answer
3

views

What is the best practice to manage EC2 instance up/down/hibernate scheduler?

We have 2 - 3 EC2 c5.9xlarge instances for research. Besides the option to shut them down on a particular hour according to a scheduler please advise what is the best way to keep them up and running when I 'touch' them by connecting/clicking them or any other wake up policy? My goal is to save expen...
SteveS
1

votes
2

answer
260

views

Overriding all JAX-RS responses with a constant response header

I'm writing a fairly generic webapp that I want to be JAX-RS 'pure', though I'm developing using Jetty and CXF. I want to do something extremely simple, I want for ALL HTTP responses a header added (not just for the methods I'm writing code for, even auto-handled 415 responses). Solutions for How d...
SteveS
1

votes
1

answer
3.3k

views

Carry Original File Name to FTP endpoint

Using Mule Studio Version: 3.5.0 Build Id: 201402101410 I have a very simple flow. I need to pick up a file from one ftp server and transfer it to another ftp server. When the file is written to the target, the filename looks like some kind of UUId rather than the original file name. How do I get t...
SteveS
1

votes
1

answer
142

views

How do I include RestEasy Jackson2Provider in jar-with-dependencies?

I have a java rest service client that I am packaging up using the maven-assembly-plugin. I am creating a zip file containing all of the dependencies plus a jar-with-dependencies. So I end up with: my-client-1.2-bin.zip my-client-1.2-jar-with-dependencies.jar I have written a small test java app tha...
SteveS
1

votes
1

answer
79

views

VS2010 failing to auto-download needed file(s)

I've been handed the code for an older VB program built in VS2010Pro to update. I'm not an experienced VB or .NET programmer and haven't worked in any Microsoft development platform since the 90's, so the vagaries of VS .NET builds are a bit of a mystery to me. Trying to build, the code compiles suc...
SteveS
1

votes
1

answer
748

views

How to run randomForest in R on multiple cores in parallel? [duplicate]

This question already has an answer here: parallel execution of random forest in R 5 answers I have a randomForest model that I want to calculate on multiple cores. How can I tell the model to run in parallel? This is not a duplicate of parallel execution of random forest in R as I don't need to ru...
steves
1

votes
1

answer
46

views

Calculate function on a column of nested tibbles?

I have a dataframe with a column of tibbles. Here is a portion of my data: date time uuid data 2018-06-23 18:25:24 0b27ea5fad61c99d 2018-06-23 18:25:38 0b27ea5fad61c99d 2018-06-23 18:26:01 0b27ea5fad61c99d 2018-06-23 18:26:23 0b27e...
SteveS
1

votes
1

answer
65

views

Apply function on a tibble column of type list?

Given a tibble like this: df_nested: dt t uuid data 2018-06-23 18:25:24 0b27ea5fad61c99d 2018-06-23 18:25:38 0b27ea5fad61c99d 2018-06-23 18:26:01 0b27ea5fad61c99d 2018-06-23 18:26:23 0b27ea5fad61c99d I am interested to cal...
SteveS
1

votes
1

answer
66

views

Build a dataframe of nested tibbles in R?

I have a couple of tibbles: 1: structure(list(contacts = c(151, 2243, 4122, 6833, 76, 123)), .Names = 'contacts', row.names = c(NA, -6L), class = c('tbl_df', 'tbl', 'data.frame')) 2: structure(list(image_names = c('/storage/emulated/0/Pictures/1.png', '/storage/emulated/0/Pictures/10.png', '/sto...
SteveS
1

votes
1

answer
0

views

Can I customize autoexp.dat to enable visualization of a QT QDomNode in Visual Studio 2010 Debugger

We are doing QT development in Visual Studio 2010. I would like to be able to see the contents of A QDomNode variable in the Visual Studio Debugger. It is possible to customize the display of variables in the Visual Studio Debugger by customizing the autoexp.dat file. The QT Add in for Visual Stu...
SteveS
1

votes
1

answer
20

views

Text to HTML produces a lot of spaces in email signature?

Here is an HTML of my signature: Name Title Company But when I copy paste it to my Mailspring client I get huge space between lines. How can I reduce it? Please advise
SteveS
0

votes
4

answer
24

views

Convert character vector of height in inches to cm?

I am given a character vector: tibble(H = c('6'2\'', '5'10\'', '5'5\'', '5'1\'', '5'5\'', '5'4\'')) and I want to convert it to be in cm. Please advise how can I do this?
SteveS
1

votes
2

answer
675

views

How to change the text size in a matplotlib Button?

I have a button in matplotlib, i.e. myButton = Button(axpos, 'This is a button') How do I make the text inside the button smaller?
Frick Steves
1

votes
1

answer
78

views

How do you get just one specific line of a webpage's source code from the terminal?

I am trying to get the 400th line of source code from a number of web pages via the terminal. So far, the only way I have been able to do this is by downloading the entire source code from the page (using cURL) and then extracting the line I want, but that takes a long time when iterating over lots...
Frick Steves
1

votes
1

answer
835

views

Increase the space between x axis labels ggplot?

Here is my ggplot and I need to adjust the spacing between x axis labels and make the plot larger. Please advise what is missing here? Trying to play with expand but without any luck: ggplot(device_contacts_jaccard_android_ios, aes(x = factor(uuid_lev), y = j, fill = factor(android))) + geom_boxplot...
SteveS
1

votes
1

answer
207

views

Fit Gamma distribution and plot by factor in R

I have data.frame object with a numeric column amount and categorical column fraud: amount
steves
1

votes
1

answer
23

views

Use R to compute ratio when columns holding JSON lists?

I have a data frame with 2 columns that holds JSON like: I have 2 columns where each row in each column is a JSON. df$col1[1]
steves
1

votes
1

answer
334

views

Add column names to expand.grid

I have 100 variables that I need to examine with all possible combinations. Say root, SSID, kuku, pupu ..... variables
SteveS
1

votes
1

answer
34

views

ggplot plot boxplot by label per column?

I have the following data frame: x1 x2 x3 y1 y2 y3 z1 z2 z3 label 1 54 -9 45 323 1 9 12 -0.1 1 5 21 -33.3 54 0.9 98 12 -87 5 2 12 1.3 0 23 12 65 7 -8 15 1 I want to plot a faceted plot that will compare each column by label. For example x1 values: 2 boxplots o...
SteveS
1

votes
1

answer
316

views

Add level column to a dataframe with factor column

I have the following toy example of my df: structure(list(a = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L), .Label = c('1', '2', '3'), class = 'factor'), b = c('ku', 'pu', 'dd', 'ka', 'la', 'gu', 'kuku', 'pupu', 'd', 'a', 'su', 'mo', 'kui', '...
SteveS
1

votes
1

answer
24

views

Reorder, exclude a column and keep others in R?

Here is my toy dataframe: structure(list(a = c(1, 2), b = c(3, 4), c = c(5, 6), d = c(7, 8)), .Names = c('a', 'b', 'c', 'd'), row.names = c(NA, -2L), class = c('tbl_df', 'tbl', 'data.frame')) Now I want to reorder and exclude one the columns and keep the others: df %>% select(-a, d, everything())...
SteveS
1

votes
1

answer
46

views

Dummify column of lists in R?

Given the following structure: df
SteveS
1

votes
1

answer
36

views

Spread dataframe

I have the following dataframe/tibble sample: structure(list(name = c('Contents.Key', 'Contents.LastModified', 'Contents.ETag', 'Contents.Size', 'Contents.Owner', 'Contents.StorageClass', 'Contents.Bucket', 'Contents.Key', 'Contents.LastModified', 'Contents.ETag' ), value = c('2019/01/01/07/556662...
SteveS
1

votes
3

answer
494

views
1

votes
1

answer
48

views

Use N patterns in str_replace in R?

Given I have N different patterns I want str_replace to check each pattern: pat_list
SteveS
1

votes
2

answer
1.4k

views

How do I stop the Mule SFTP Connector from prompting for Kerberos Username?

I am attempting to upload a file using SFTP. I have an identity file set up and referenced correctly. When my flow gets to the SFTP it pauses execution and prompts for Kerberos username and Kerberos password. I do not need to enter anything for these and just pressing enter will allow execution to c...
SteveS
0

votes
2

answer
61

views

ReactJS: How to deploy on local server

I have a web app developed with a NodeJS + Express + GraphQL + MongoDB back-end and a ReactJS + Apollo front-end. I would like to deploy this application locally. Is that even possible? I have come across dozens of 'how to deploy to Heroku,' 'how to deploy to Digital Ocean', 'how to deploy to Githu...
Bens Steves
4

votes
1

answer
47

views

19 digit number doesn't get parsed as is in R

I have the following number in JSON in a character array: [1544018118438041139,162.0,38.0,0.023529414,1.0,2131230815,1] library(jsonlite) fromJSON( '[1544018118438041139,162.0,38.0,0.023529414,1.0,2131230815,1]' ) returns: [1] 1544018118438041088.000000000000000000000 162.000000000000000000000...
steves
1

votes
3

answer
3.2k

views

“For Each Cell” in a Subset of a Named Range?

I'm guessing this is an easy one. I want to loop through a named range in VBA, but I want to skip the first cell in the range. Can anyone help? (PS. I'm a VBA novice, not a trained developer, and teaching myself. This forum has been very useful. But if you think I haven't tried to find a solution to...
SteveS
17

votes
1

answer
2.2k

views

Can we programmatically compare different images of same resolutions?

Is there a good and reliable way to compare images of same format and same resolution and get difference between them? In the best-case scenario I am looking for some numerical representation of image that can be then compared because I have to compare many images.
SteveS
2

votes
1

answer
47

views

Generate N ggplot plots by passing a wrapper a set of params in R?

I have a function that outputs a dataframe like this: df: # A tibble: 100 x 7 test_idx train_user_id test_user_id train_idx D isSame D_rank 1 5 1 1 2 51.3 TRUE 1 2 1 1 1 4 53.0 TRUE 1 3 5...
steves
2

votes
1

answer
5k

views

Entity Framework 4 - Code First and Stored Procedures

I want to execute stored procedure with one parameter that returns table using EF4 'Code First'. I am ok with some DTO just for this purpose, it doesn't have to return entities. I have tried to: a) create edmx file with function import and add it to my ObjectContext like this: protected override voi...
Steves
1

votes
1

answer
388

views

How to arrange (dplyr) a data frame by “date” field?

I have a dataframe df, with column called 'date'. When I want to arrange by date: df %>% arrange(date) I get the following error: error in arrange_impl(.data, dots) : cannot arrange column of class 'function' at position 1 Apart of changing the column name, what is the way of forcing it to arrange...
steves
1

votes
2

answer
177

views

summarize_at for multiple variables and multiple functions with different arguments in R?

I have 5 variables in my df, I want to summarize_at them using the following pattern for each variable: min, quantile(.25), median, mean, qunatile(.75), max, sd Here is my sample df, please advise how to do this: df % summarize_at(vars(gra_x, gra_y, gra_z, lin_acc_mag, vel_ang_unc_mag), funs(min,...
steves
3

votes
3

answer
65

views
3

votes
2

answer
48

views

Regex to split location in R?

I have the following locations: '0.0000000.000000' '32.09447434.821947' And I want to split to make sense: 0.000000, 0.000000 32.094474, 34.821947 I am using the following regex pattern: '\\d{1,}.\\d{6}' and various split functions, please advise what I am missing, I can't split it to 2 coordinates...
steves

View additional