[go-nuts] Go for Data science Blogs
Is there any blog where we can start to learn Data analytics in GO. has anybody started a blog in GO. where we can learn basic data manupulation with go. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] Re: get the data out of slice of structs
> > Thank you very much for the reply but my problem is that there are no > slice of time.Time. This is the main reason I chose to get the data this > way by creating a slice of struct. > Can you tell me what is the best way to get this sort of data in a struct of 2 slices. my code is package main import ( "database/sql" _ "github.com/lib/pq" "log" "fmt" "time" _ "github.com/jmoiron/sqlx" "github.com/jinzhu/gorm" "github.com/jmoiron/sqlx" ) type State struct{ DLastmodified time.Time DState string } func main(){ db, err := sql.Open("postgres", "user=postgres password=Gurgaon@65 dbname=HRMS sslmode=disable") if err!=nil { panic(err) } defer db.Close() rows, err := db.Query("SELECT * FROM dropdown.states") if err!=nil { panic(err) } defer rows.Close() got :=[]State{} for rows.Next() { var r State err = rows.Scan(,) if err!=nil{ log.Fatal(err) } got= append(got,r) } fmt.Println(got[1:3].DState) fmt.Println(got[2:3]) fmt.Println(got[1].DState) fmt.Println(got[3:3]) } > is this how I should query it. Now I believe there is something wrong > with my approach towards this code. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Re: get the data out of slice of structs
I was able to get the Data from SQL into got but when I print fmt.Println(got[1:3]) fmt.Println(got[2:3]) fmt.Println(got[1:3]) fmt.Println(got[3:3]) it produces the following result [{2017-09-07 15:25:45.346887 + + HR} {2017-09-07 15:39:44.24207 + + DL}] [{2017-09-07 15:39:44.24207 + + DL}] [{2017-09-07 15:25:45.346887 + + HR} {2017-09-07 15:39:44.24207 + + DL}] [] When I try fmt.Println(got[1].DState) it tells me that HR Now I want to get a slice of DState like a list and When I try fmt.Println(got[1:3].DState) if tells me got[1:3].DState undefined (type []State has no field or method DState) *How do a get a slice of DState from got this is my question I am sorry for not being so elobrative.* -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] get the data out of slice of structs
I have created a struct type State struct{ DLastmodified time.Time DState string } and created a slice of struct like got :=[]State{} Now I am unable to get the column data out of this slice. please help. If you want to read the full code let me know. I just wanted to know how to get the data out of it. *Please help.* -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Re: Graphing libraries in golang
> > thanks a lot for your reply sebestian. You certainly are a good man and I have high hopes for your library too... But before coming to Mailing list I check almost all of them and I didn't find anyone useful. The https://github.com/aclements/go-gg package is not useful at all. Because there is noone using it and the last commit was 6 months ago. It's more likely that the developer gave up on it. It's a common norm in open source don't use a new package which has a very old commit. I have checked most of them. I came here seeking for a like-minded people who had created any graphs in go for actual projects. I didn't find any. Hope you understand it. Good luck for your package I hope it can be useful in future. Just as a word of advice link it with GOTA. then it can be more intuitive for people from analytical background. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Re: Graphing libraries in golang
Thanks for your reply. Library seems promising. but when I run it , this errors out cannot find package "bitbucket.org/zombiezen/gopdf/pdf" in any of: C:\Go\src\bitbucket.org\zombiezen\gopdf\pdf (from $GOROOT) C:\Projects\Go\src\bitbucket.org\zombiezen\gopdf\pdf (from $GOPATH) when I try go get on these packages they don't work either. C:\Projects\Go\src>go get bitbucket.org/zombiezen/gopdf/pdf go: missing Mercurial command. See https://golang.org/s/gogetcmd package bitbucket.org/zombiezen/gopdf/pdf: exec: "hg": executable file not found in %PATH% > I saw a talk on some youtube regarding go in data science. I learned go 2 > months ago but now I feel like it's an entirely different beast. look I am > just trying to learn GOLANG so that when I need to build something may be > after 5 to 10 months I would be comfirtable working with it. So Right now I > don't have a use case scnario. I am just trying to learn the language. But there are a lot of improvements needed like 1. 49 lines of code just to create a flat basic line chart for random numbers. and that's when I haven't even got my data in from the database or did some background coloring. 2. Loops are not good while creating graphs you know them I don't I can miss one and mess it up entirely. With loops, I would never be sure if I have created the right graph. Loops should just run in the background not for me to see or create. 3. The syntax just doesn't feel intuitive. I feel like nobody would be able to predict the next command in the sequence. You must know now there is a grammar of graphics. it's used in ggplot2, ggvis, vega, vega-lite, and many python packages as well. 4. Analysts don't care about speed (maybe a bit) but data. What they do care about is their data code should be easy else your mind will be occupied by typing and thinking code when it should be thinking about data. today I just feel like golang doesn't have ploting libraries they never thought it was necessary but straight away starting comparing it to python. but can you please tell me how to run those examples. I am not able to run it. what am I doing wrong. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Re: Graphing libraries in golang
> > By graphing I actually meant *data visualization libraries* SVGO would be so hard to pass a data to and design even the basic and simple *BARCHART* other ones don't have enough documentation to understand how it works. and The reason I am trying GO is that R is slow. There is no point in calling R from Go. *So is there any package that is implemented in base GO with the speed of GO and worth learning.* -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Graphing libraries in golang
I come from an R background and I am not able to find one single decent not too fancy but a decent graphing library that's good enough to work. Can you please suggest any library that is good enough for production level plots. Visualisation is the need of today. I don't believe that it doesn't have any but I was not able to search any good one. Please do reply -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] redirecting templates from revel
I am not able to understand how can I redirect on the click of some text or button a user to a different page. I went to entire documentation but I was not able to understand it. Like revel page say. ---put this HTML in index page-- create this HTML as hello.html page {{set . "title" "Home"}} {{template "header.html" .}} Hello {{.myName}} Back to form {{template "footer.html" .}} ---put this in app.go --- func (c App) hello1(myName string) revel.Result { return c.Render(myName) } --- --- I tried to use the same code to send the user to another html page. say abc.html in app folder. How can I do that. Please help me. i don't think it is hard for you but for me it took my entire weekend. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] Re: Choosing a framework
Thanks for the tip! But he is a newcomer and so am I. Tell us can we learn it. Is it documented anywhere. That's exactly what i told him. I would love to try vecty. But right now we can't figure out how to try it. 14-09-2017 9:14 pm को "Jim Ancona" <j...@anconafamily.com> ने लिखा: > On Thu, Sep 14, 2017 at 1:28 AM, Vikram Rawat <vikramrawa...@gmail.com> > wrote: >> >> And there is another project called VECTY. But I mailed them and >> they told me it's not documented yet. and it could have bugs. >> > > Vecty (https://github.com/gopherjs/vecty) uses Gopherjs and runs in the > browser, so it used for different things than the server-side frameworks > like Revel. > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Re: Choosing a framework
> > I am trying to learn golang too. and I have never ever build a website. > All the experience that I have is by building SHINY R dashboards.I tried > almost all the framework. But I liked REVEL. Because speed and concurrency > is not my concern I just want to write simple database web applications. > You should definetly check that out. It's the best I have come across. It creates the entire directory structure for you at one command. All you have to do is change the code peice by piece. And there is another project called VECTY. But I mailed them and they told me it's not documented yet. and it could have bugs. So trust me try revel for a few days after that choose whatever you want to -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Re: how to get the SQL Dataframe into GOTA
Please if anybody knows how to do it. Even by writing a big function I am ready to do it. Can anybody please help me?? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] how to get the SQL Dataframe into GOTA
can anybody help me out with it. I want to get this data into GOTA Dataframe. I just can't figure out how to get the data from SQL into GOTA package main import ( "database/sql" "fmt" _ "github.com/lib/pq" ) const ( host = "localhost" port = 5432 user = "postgres" password = "Gurgaon@65" dbname = "vikram" ) func main() { psqlInfo := fmt.Sprintf("host=%s port=%d user=%s "+ "password=%s dbname=%s sslmode=disable", host, port, user, password, dbname) db, err := sql.Open("postgres", psqlInfo) if err != nil { panic(err) } defer db.Close() err = db.Ping() if err != nil { panic(err) } row,_:=db.Query("SELECT * from salesdata limit 10") println(row) } help me get this data this a dataframe so that I can view it or read it. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] MSSQL DBMS
I have read like every blog about database but I am not able to understand how to connect GOLANG to 1. SQL Server 2. MS Access can anybody please tell me how to query these databases please -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Go For Data analysts
Does anybody actually uses GO for data Analysis... Can it be used for Data analysis -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Re: Help with Dataframes
Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Thank You Very very very MUCH My brain was about to bleed to death... I am not a programmer but somebody suggested me GOLANG and I started it just a MONTH Ago. It's quite different and hard to grasp But if it has an active group like you guys It will surely not die a slow death.. thanks again everybody jesper, sebestian and Ayan thanks again guys... -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Help with Dataframes
Can anybody please tell me how to write GOTA Golang dataframes on a csv... It's been 2 days I am trying to find a way to write dataframes onto a csv. can anybody please help me understand what does this IO.writer means and how to use it... I have given up understanding it... Please any help will be appriciated. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] Problem with HINDI NAMES
Hello Bakul, I am just an R programmer(by which i mean i don't understand programming much). I was looking for an alternative way to python. I really don't understand what you said but i want to let you all know one thing. English hasonly 26 characters but those are not sufficient for languages like hindi, bengali, gurumukhi, malyalam and many other phonetic languages. So we use entire keyboard to type letters. In the above example सोम is a proper word with a meaning we just simply can't ignore ो or letters like that at all. Please tell me what to do. I really want to write program in my language because there arenone written yet. Thanks for any reply you give me Regards from India, Vikram singh Rawat On 26-May-2017 5:44 am, "Bakul Shah" <ba...@bitblocks.com> wrote: In my view, in the "worse is better" unix tradition, you can leave "canonicalization" out. Let the user worry about that (different ways of representing such chars can be checked and warned about by a lint program). Then the compiler only need to allow additional runes that pass unicode.IsMark() for all but the first rune of an identifier. [Would be nice if we didn't have to wait for the mythical 2.0 for this!] As for exporting symbols, prepending _ for making symbols private means most likely more symbols will get accidentally exported. Once leaked they are harder to unleak! The default should be to keep things private. Why not instead allow an explicit "export" section? On May 25, 2017, at 12:37 PM, Rob Pike <r...@golang.org> wrote: This is https://github.com/golang/go/issues/5167. See also https://github.com/golang/go/issues/16033. -rob On Fri, May 26, 2017 at 1:15 AM, Bakul Shah <ba...@bitblocks.com> wrote: > In other words, you should file a bug report (but technically it is a > language change). > > For Go purposes an identifier should start with unicode letter or > underscore as now but for the following Unicode chars the rule should be > extended to include chars matching Unicode categories space combining (Mc) > and nonspacing (Mn) mark. > > On May 25, 2017, at 7:47 AM, Bakul Shah <ba...@bitblocks.com> wrote: > > As per the language ref technically this is not a bug as a vowel sign (U+094B > 'ो') is a not Unicode letter but practically it is since you the majority > of words in Indic languages need them. > > On May 24, 2017, at 11:14 PM, Vikram Rawat <vikramrawa...@gmail.com> > wrote: > > package main > > import (p"fmt" > > ) > func main(){ > सोम(1,1,1,21323,2,2,32,1,) > > > } > > func सोम (num ...int){ > var total int > for _, r:= range num{ > total = total + r > } > p.Println("तुन्हारा जोड़ है ",total) > } > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to golang-nuts+unsubscr...@googlegroups.com. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Problem with HINDI NAMES
package main import (p"fmt" ) func main(){ सोम(1,1,1,21323,2,2,32,1,) } func सोम (num ...int){ var total int for _, r:= range num{ total = total + r } p.Println("तुन्हारा जोड़ है ",total) } DOESN"T WORK But THIS DOES package main import (p"fmt" ) func main(){ सम(1,1,1,21323,2,2,32,1,) } func सम (num ...int){ var total int for _, r:= range num{ total = total + r } p.Println("तुन्हारा जोड़ है ",total) } -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.