Giter Club home page Giter Club logo

cern_gem_daq's Introduction

Hi, there 👋

I am Avijit Chakraborty, a CS graduate with keen interest in learning how things work. When I am free, you can find Me watching old cricket match highlights or going out to explore the City of Joy !

  • 🔭 I’m currently working on Relational Databases & SAP.

  • 🌱 I’m currently learning SAP & Machine Learning.

  • 👯 I’m looking to collaborate on problem statements that solve Real-world problems.

  • 😄 Pronouns: He / Him

  • ⚡ Fun fact: Can watch a Test match in Australian time without feeling sleepy or getting bored.


  • 📫 How to reach me:
    • To start a conversation, reach Me out @avi_my_name on Twitter & Instagram.
    • To know what I am currently doing. Check Me out on LinkedIn.
    • Occasionally, I try to write as @avijit.chakraborty on Medium.

cern_gem_daq's People

Contributors

sreebhattacharyya avatar travelleroncode avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

cern_gem_daq's Issues

How to generate a valid JSON?

I generated a JSON as follows:

  • Modify the source:
diff --git a/Test_PostgreSQL/code/generate_json_sample.cpp b/Test_PostgreSQL/code/generate_json_sample.cpp
index 2d8cbbf..e54f29c 100644
--- a/Test_PostgreSQL/code/generate_json_sample.cpp
+++ b/Test_PostgreSQL/code/generate_json_sample.cpp
@@ -55,7 +55,7 @@ int main()
        cout<<final_fields.size()<<endl;
        fstream sample_file("Sample_JSON.json", ios::app);
 
-       //sample_file<<"{"<<endl;
+       sample_file<<"{"<<endl;
        //needed only for the first batch of data generation
 
        string inv_comma = "\"";
@@ -63,7 +63,7 @@ int main()
 
        srand(time(0));
 
-       for(int i = 20000; i<=20000; i++)
+       for(int i = 0; i<20000; i++)
        {
                cout<<"Data record no. "<<i<<" being generated"<<endl;
  • Compile and run:
louis@xxx ~/Work/GEM/CERN_GEM_DAQ/Test_PostgreSQL/code $ g++ generate_json_sample.cpp
louis@xxx ~/Work/GEM/CERN_GEM_DAQ/Test_PostgreSQL/code $ ./a.out 
Fields have been obtained correctly!
Generating configurations into a JSON file
49
Data record no. 0 being generated
Data record no. 1 being generated
Data record no. 2 being generated
Data record no. 3 being generated
Data record no. 4 being generated
Data record no. 5 being generated
...
Data record no. 19997 being generated
Data record no. 19998 being generated
Data record no. 19999 being generated

The output file isn't valid JSON, it's missing commas betweend VFATs:

louis@xxx ~/Work/GEM/CERN_GEM_DAQ/Test_PostgreSQL/code $ json_verify <Sample_JSON.json 
parse error: after key and value, inside map, I expect ',' or '}'
                                        { "v0":{ "CFG_IREF":2764, "CFG
                     (right here) ------^
JSON is invalid

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.