Skip to content

Instantly share code, notes, and snippets.

View dubeyji10's full-sized avatar
💭
Cogito, ergo sum

Abhishek Dubey dubeyji10

💭
Cogito, ergo sum
View GitHub Profile
@dubeyji10
dubeyji10 / index.js
Created July 25, 2022 05:15
Dynamic Loading of owners list
console.log('exported');
const header = document.getElementById('header');
const actualList = document.getElementById('ownersItem');
var mySelections = [];
var emptyDictionary = {};
// const catgories = { response from getUnique()
async function f1(){
@dubeyji10
dubeyji10 / index.css
Created July 22, 2022 08:35
Using jquery plugin to populate tables from a json response
.b1{
background-color: salmon;
}
.wrapper{
padding: 10px 10px 10px 10px;
/* margin: 20px 20px 50px 50px; */
margin-left: 50px;
@dubeyji10
dubeyji10 / app.y
Last active July 25, 2022 07:49
Server side Testing of api requests
from urllib import response
from flask import Flask, request, render_template, session, redirect , Response
import json
from bson import json_util, ObjectId
import pprint
import json
import requests
import time
// MongoDB Playground
// To disable this template go to Settings | MongoDB | Use Default Template For Playground.
// Make sure you are connected to enable completions and to be able to run a playground.
// Use Ctrl+Space inside a snippet or a string literal to trigger completions.
// Select the database to use.
use('landTestV2');
// The drop() command destroys all data from a collection.
// Make sure you run it against the correct database and collection.
@dubeyji10
dubeyji10 / bulkInsert.py
Created July 19, 2022 12:19
Script for bulk insertion of test data
from pprint import pprint
import json
from pymongo import MongoClient
#mongodb://127.0.0.1:27017/
client = MongoClient(host="localhost", port=27017)
fileName = "first100Lands.json"
print("1.connected to mongodb")
db = client.landTest
@dubeyji10
dubeyji10 / insertOneDocument.py
Last active July 20, 2022 08:03
Insertion of one document using python mongo client connection
from pprint import pprint
import json
from pymongo import MongoClient
#mongodb://127.0.0.1:27017/
client = MongoClient(host="localhost", port=27017)
print("1.connected to mongodb")
db = client.landTest
print("2.db : ",db)
# print("")
@dubeyji10
dubeyji10 / localMongoConnection.py
Created July 19, 2022 11:44
Connection to local mongodb instance for test
from pprint import pprint
from pymongo import MongoClient
#mongodb://127.0.0.1:27017/
client = MongoClient(host="localhost", port=27017)
print("1.connected to mongodb")
db = client.landTest
print("2.db : ",db)
# print("")
collection = db.landTest
@dubeyji10
dubeyji10 / views_addition.py
Created July 14, 2022 12:11
additions to existing views
# add to existing views
#urlMeetingAttendee = "https://api.getgo.com/G2M/rest/meetings/{}/attendees"
#
# meetingView6
def meetingView6(request,meeting_id):
print("\n\n view6 : you have request meeting details for path : ",request.path)
mID = int(meeting_id)
with open(dir_path+'/gotomeeting/refresh_tokens.json','r') as f:
myJson = json.load(f)
@dubeyji10
dubeyji10 / meetingList.html
Created July 14, 2022 12:10
modification in meeting list response - a clean json collection instead of raw - custom rendering of response data - an option to explore each meeting separately
# additions to view.py add them after or before the views already in the appfolder/views.py
@dubeyji10
dubeyji10 / MeetingForm.html
Last active July 11, 2022 12:33
modifications in gotomeeting api rendering - a json response is sent
{% extends "main/base_templates/base.html" %}
{% block content %}
{% if result %}
----- call api with -----
{{ message }}
{% else %}
<div> enter your details here </div>