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 / view.py
Created July 9, 2022 11:56
api response working
from http.client import HTTPResponse
import json
from django.shortcuts import render
from django.views.generic import ListView
import os
from requests import request
from . import forms
from django.views import View
@dubeyji10
dubeyji10 / meetingForm.html
Last active July 9, 2022 10:54
second method to render api response - browser site resulting in error
{% extends "main/base_templates/base.html" %}
{% block content %}
{% if result %}
----- call api with -----
{{ message }}
{% else %}
<div> enter your details here </div>
@dubeyji10
dubeyji10 / view.py
Created July 9, 2022 09:10
additions to views
def getMeetingData(request):
myTokens = credentials()
print("....sending a", type(myTokens))
return render(request,"getdata/meetingData.html",{'title':'meeting-data',
'message':'create a form to enter data and render data',
'myJsonTokens':myTokens['access_token']})
class getMeetingClassView(ListView):
@dubeyji10
dubeyji10 / 00 - Table of Contents.md
Created July 8, 2022 13:14 — forked from amelieykw/00 - Table of Contents.md
[Django - Forms] #forms #django #GET # POST
  • Working with forms
    • HTML forms
      • GET and POST
    • Django’s role in forms
    • Forms in Django
      • The Django Form class
      • Instantiating, processing, and rendering forms
    • Building a form
      • The work that needs to be done
  • Building a form in Django
@dubeyji10
dubeyji10 / myMeeting.html
Created July 8, 2022 12:20
Method 1 for resquesting and rendering meeting data
{% extends "main/base_templates/base.html" %} {% block content %}
<div class="content-section">
<div class="title">
<div>{{title}}</div>
<div>{{message}}</div>
</div>
{% csrf_token %}
<fieldset class="form-group">
@dubeyji10
dubeyji10 / gotomeeting_OAUTH.md
Created July 8, 2022 06:25
gotomeeting oauth client steps

Generating Access Token and Refresh Token

Step 1 : go to the link below for generating code -> click allow -> copy from the url bar and update the code variable in environment

link : https://authentication.logmeininc.com/oauth/authorize?client_id=&response_type=code&redirect_uri=https://www.codanalytics.net/

Step 2: make post request to {{generate_tokens}} url with following body (payload)

client-code code base64 combination of client ID and client secret

code : from url when first request is made (after step 1)

@dubeyji10
dubeyji10 / regex.py
Created June 22, 2022 06:58 — forked from MishraKhushbu/regex.py
Regular expression
,Regex summary and examples
. - any charcter except newline
\d - Digit(0-9)
\D - Not a digit(0-9)
\w - word charcter(a-z, A-Z,0-9,_)
\W- not a word charcter
\s - whitespace(space , tab, newline)
\S - not a whitespace(space , tab , newline)
@dubeyji10
dubeyji10 / indexData.ipynb
Last active June 22, 2022 06:37
read csv file - conversion of data to correct field types - push to index
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dubeyji10
dubeyji10 / STEPS.md
Last active June 21, 2022 08:13
[documentation] how to setup and and run sycn script

Running syncScript STEPS

step1-1.png

1.1. Choose Self Client

1.2. Enter details

1.2.1. add scope (existing )
"""
ZohoCRM.modules.ALL,ZohoCRM.org.ALL,ZohoCRM.modules.custom.all,ZohoCRM.users.all,ZohoCRM.org.all,ZohoCRM.settings.all
"""
1.2.2. Time Duration 10 minutes
@dubeyji10
dubeyji10 / csvParsing.ipynb
Last active June 20, 2022 13:46
csv datatypes conversion and cleaning - type conversion to correct datatypes ( plus creation of random sample data -- date )
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.