Skip to content

Instantly share code, notes, and snippets.

View autocircled's full-sized avatar

Moktadir Rahman autocircled

  • TIC Limited
  • Rajshahi, bangladesh
  • 23:27 (UTC +06:00)
View GitHub Profile
@autocircled
autocircled / GoogleIndexing.py
Created January 21, 2022 13:30 — forked from alucard001/GoogleIndexing.py
Google Indexing API V3 Working example with Python 3
from oauth2client.service_account import ServiceAccountCredentials
import httplib2
import json
import pandas as pd
# https://developers.google.com/search/apis/indexing-api/v3/prereqs#header_2
JSON_KEY_FILE = "json_key_file_downloaded_after_creating_your_google_service_account_see_above_details_on_how_to_do.json"
SCOPES = ["https://www.googleapis.com/auth/indexing"]
@autocircled
autocircled / gist:e2271aa3da7b7dd7a2be4b55d38e3f0b
Created October 15, 2021 14:57 — forked from 345161974/gist:63573abdf1dc9c303d6740fb29496657
Python Code for adding posts to WordPress remotely
import urllib
from wordpress_xmlrpc import Client, WordPressPost
from wordpress_xmlrpc.methods import posts
import xmlrpclib
from wordpress_xmlrpc.compat import xmlrpc_client
from wordpress_xmlrpc.methods import media, posts
import os
########################### Read Me First ###############################
'''
------------------------------------------In DETAIL--------------------------------
if( !function_exists( 'load_terms_by_ajax' ) ) {
function load_terms_by_ajax(){
$ky = isset( $_GET['q'] ) && !empty( $_GET['q'] ) ? $_GET['q'] : '';
$term_name = isset( $_GET['key'] ) && !empty( $_GET['key'] ) ? $_GET['key'] : '';
$taxonomy_sarch_args = array('hide_empty' => true,'orderby' => 'name','order' => 'ASC', 'name__like' => $ky, );
$tax_obj = get_terms( $term_name, $taxonomy_sarch_args );
$arr['results'] = array();
if( count( $tax_obj ) > 0 ){
foreach( $tax_obj as $item ){