Skip to content

Instantly share code, notes, and snippets.

😃
Enjoying work at Moneybloom & in home. Programming is there as my best friend.

Rishikesh Agrawani hygull

😃
Enjoying work at Moneybloom & in home. Programming is there as my best friend.
Block or report user

Report or block hygull

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Cabs-Doc.md

Sure Cabs

Objective

  • To book vehicle to visit places near by Bangalore.

    • People can book vehicles without any registration by using their mobile numbers.

    • In first page, they can enter place details as follows:

View Getting-text-using-requests.md
>>> import requests
>>> 
>>> res = requests.get("https://www.amazon.in/b/ref=s9_acsd_hfnv_hd_bw_b3iMERj_ct_x_ct00_w?_encoding=UTF8&node=10485223031&pf_rd_m=A1VBAL9TL5WCBF&pf_rd_s=merchandised-search-3&pf_rd_r=59M3EPGWMDMASM4XWYPJ&pf_rd_r=59M3EPGWMDMASM4XWYPJ&pf_rd_t=101&pf_rd_p=e2e13b35-daa5-587b-aab3-6e9e9135fd3c&pf_rd_p=e2e13b35-daa5-587b-aab3-6e9e9135fd3c&pf_rd_i=3403856031")
>>> 
>>> res.status_code
200
>>> 
>>> res.text
View Solution-to-a list-dict-base-problem.md

Problem

In Python, list, dictionary are reference types. So if you will append the same dictionary to a list and if you will make any change to any of the dictionary, it will reflect in all other as well because all are pointing to the same memory location.

>>> l = [{"name": "Raghavendra Thakur", "age": 27}] * 4
>>> 
>>> l
[{'name': 'Raghavendra Thakur', 'age': 27}, {'name': 'Raghavendra Thakur', 'age': 27}, {'name': 'Raghavendra Thakur', 'age': 27}, {'name': 'Raghavendra Thakur', 'age': 27}]
>>> 
>>> l[0]
@hygull
hygull / roserocket-entity-fields.md
Last active Jun 22, 2019
Roserocket get fields for ORDER, COMMODITY, CUSTOMER
View roserocket-entity-fields.md

Get entity fields - Roserocket (Customer, Order, Commodity)

// --- Date: 20 June 2019 ---
function get_customer_fields() {
    let customer_fields = [
        "address_1",
        "address_2",
        "billing_contact_email",
        "billing_contact_name",
View array.some-in-javascript.md
View Try-Restructured-Text.rst
@hygull
hygull / pandas-apply-itersection.md
Last active Mar 26, 2019
A solution to this problem - with a little research with passion (Until I got the result/success) - `26 March 2019, Tue`.
View pandas-apply-itersection.md
View solution-of-an-stackoverflow-q.md

Use the below statement as others suggested.

family._embedded['wp:featuredmedia']['0'].media_details.sizes["family-profile-thumb"].source_url

The below example clarifies when to use . (dot) & [] (brackets).

Creating an object

> o = {
... "fullname": "Rishikesh Agrawani",
@hygull
hygull / best-js-libraries-to-use-in-web-app.md
Last active Jan 11, 2019
Best JS libraries to use in web applications
You can’t perform that action at this time.