Skip to content

EHESPO/python-docs-samples

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12,176 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Google Cloud Platform Python Samples

Python samples for Google Cloud Platform products.

Google Cloud Samples

Check out some of the samples found on this repository on the Google Cloud Samples page.

Setup

  1. Install pip and virtualenv if you do not already have them.

  2. Clone this repository:

    git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git
    
  3. Obtain authentication credentials.

    Create local credentials by running the following command and following the oauth2 flow (read more about the command here):

    gcloud auth application-default login
    

    Read more about Google Cloud Platform Authentication.

How to run a sample

  1. Change directory to one of the sample folders, e.g. logging/cloud-client:

    cd logging/cloud-client/
    
  2. Create a virtualenv. Samples are compatible with Python 3.6+.

    python3 -m venv env
    source env/bin/activate
    
  3. Install the dependencies needed to run the samples.

    pip install -r requirements.txt
    
  4. Run the sample:

    python snippets.py
    

Contributing

Contributions welcome! See the Contributing Guide.

<title>Delete, allow, and manage cookies in Chrome</title> <style> * { margin: 0; padding: 0; box-sizing: border-box; } body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif; background-color: #fff; color: #1f1f1f; line-height: 1.6; padding: 24px 16px; } .container { max-width: 800px; margin: 0 auto; } h1 { font-size: 2rem; font-weight: 500; letter-spacing: -0.02em; margin-bottom: 0.25rem; } .subhead { font-size: 1rem; color: #3c4043; margin-bottom: 1.5rem; } hr { border: none; border-top: 1px solid #dadce0; margin: 1.5rem 0; } h2 { font-size: 1.5rem; font-weight: 500; margin: 1.5rem 0 0.5rem; } h3 { font-size: 1.2rem; font-weight: 500; margin: 1.25rem 0 0.25rem; } p, li { color: #202124; margin-bottom: 0.75rem; } ul, ol { padding-left: 1.5rem; margin-bottom: 1rem; } li { margin-bottom: 0.3rem; } .note, .tip { background-color: #f8f9fa; border-left: 4px solid #1a73e8; padding: 0.75rem 1rem; margin: 1rem 0; border-radius: 0 4px 4px 0; } .tip { border-left-color: #34a853; } .code-block { background: #f1f3f4; padding: 0.75rem 1rem; border-radius: 6px; font-family: 'Roboto Mono', 'Courier New', monospace; font-size: 0.9rem; overflow-x: auto; margin: 0.75rem 0; white-space: pre-wrap; word-break: break-word; } .badge { display: inline-block; background: #e8eaed; padding: 0.1rem 0.6rem; border-radius: 12px; font-size: 0.75rem; font-weight: 500; color: #3c4043; margin-right: 0.3rem; } .device-tabs { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1rem 0 0.5rem; } .device-tab { background: #e8eaed; padding: 0.3rem 1rem; border-radius: 20px; font-size: 0.85rem; font-weight: 500; color: #3c4043; } .device-tab.active { background: #1a73e8; color: white; } .step-list { list-style-type: decimal; padding-left: 1.5rem; } .step-list li { margin-bottom: 0.3rem; } .button-ghost { display: inline-block; background: #f1f3f4; padding: 0.1rem 0.6rem; border-radius: 4px; font-family: inherit; font-size: 0.9rem; } .toggle-row { display: flex; align-items: center; gap: 0.5rem; margin: 0.5rem 0; flex-wrap: wrap; } .toggle-label { font-weight: 500; min-width: 140px; } .toggle-value { background: #e8eaed; padding: 0.1rem 0.8rem; border-radius: 12px; font-size: 0.8rem; } .footer-links { margin-top: 2.5rem; border-top: 1px solid #dadce0; padding-top: 1.5rem; display: flex; flex-wrap: wrap; gap: 1rem 2rem; } .footer-links a, .related a { color: #1a73e8; text-decoration: none; } .footer-links a:hover, .related a:hover { text-decoration: underline; } .related { margin-top: 1.5rem; padding-top: 1rem; border-top: 1px solid #dadce0; } .related h3 { margin-top: 0; } .feedback { background: #f8f9fa; padding: 1rem; border-radius: 8px; margin: 2rem 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; } .feedback span { font-weight: 500; } .feedback .btn-group { display: flex; gap: 0.75rem; } .feedback .btn-group button { background: none; border: 1px solid #dadce0; padding: 0.2rem 1.2rem; border-radius: 20px; font-size: 0.9rem; cursor: default; color: #3c4043; } .help-community { background: #f8f9fa; padding: 1rem; border-radius: 8px; margin: 1rem 0; } .help-community p { margin-bottom: 0.25rem; } .help-community a { color: #1a73e8; text-decoration: none; } .help-community a:hover { text-decoration: underline; } @media (max-width: 480px) { h1 { font-size: 1.6rem; } .device-tabs { gap: 0.3rem; } .device-tab { font-size: 0.75rem; padding: 0.2rem 0.7rem; } .feedback { flex-direction: column; align-items: flex-start; } } </style>

Delete, allow, and manage cookies in Chrome

You can choose to delete existing cookies, allow or block third-party cookies, and set preferences for certain websites.

Understand cookies

Cookies are files created by websites you visit. By saving information about your visit, they make your online experience easier. For example, sites can keep you signed in, remember your site preferences, and give you locally relevant content.

There are 2 types of cookies:

  • First-party cookies: Created by the site you visit. The site is shown in the address bar.
  • Third-party cookies: Created by other sites. A site you visit can embed content from other sites, for example images, ads, and text. Any of these sites can use third-party cookies to personalize content and ads, and learn about actions you take on other sites.
Tip: Some sites may prompt you to accept or reject cookies.

There are other ways that sites can personalize content and ads. Features like ad topics and site-suggested ads in Chrome allow sites to show you personalized content. These features limit what sites and their partners can learn about you. Learn more about managing these features.


Android Computer iPhone & iPad

Delete all cookies

Important: If you delete cookies, you may get signed out of sites that remember you. Your saved preferences can also be deleted. This applies whenever a cookie is deleted.
  1. On your Android device, open Chrome Chrome.
  2. At the top right, tap More Settings.
  3. Tap Privacy and security > Delete browsing data.
  4. Next to "Time range," from the dropdown menu, choose the browsing data time range you want to delete:
    • Last 15 minutes
    • Last hour
    • Last 24 hours
    • Last 7 days
    • Last 4 weeks
    • All time
  5. Check Cookies and site data.
  6. Check other items you want to delete.
  7. To confirm, tap Delete data.

Delete cookies from a single site

  1. On your Android device, open Chrome Chrome.
  2. Go to a website.
  3. At the top left of the address bar, tap Page info 🔒 > Cookies and site data.
  4. Next to the stored data, tap Delete 🗑️.

Change your third-party cookie settings

Allow or block third-party cookies

Allow third-party cookies for a specific site

Allow third-party cookies temporarily for a specific site

If you block third-party cookies, some sites may not work as you expected. You can temporarily allow third-party cookies for a specific site you visit.

  1. On your Android device, open Chrome Chrome.
  2. In the address bar, at the top left:
    • To allow third-party cookies: Tap Page info 🔒 > Cookies and site data and turn on Third-party cookies.
    • To block third-party cookies: Tap Page info 🔒 > Cookies and site data and turn off Third-party cookies.
Tips:
  • This option is only temporary and only for the site you’re on.
  • Sites get added to the exception list automatically.
  • If you temporarily allow third-party cookies on a site, that setting carries over into Incognito mode and you can't reset it from Incognito mode.

Allow related sites to access your activity

A company can define a group of sites that are related to each other. For example, a company might want to keep you signed in as you move between acme-music.example and acme-video.example.

  • If you allow third-party cookies: Allows related sites to access your activity to personalize content or keep you signed in across sites.
  • If you block third-party cookies: It often prevents this kind of connection between sites. You can block third-party cookies while you allow sites in the same group to improve your experience.

You can find the full list of companies who define groups of related sites on Github. Learn more about related sites and third-party cookies.

To allow related sites to find your activity within the group:

  1. On your Android device, open Chrome Chrome.
  2. At the top right, tap More Settings.
  3. Tap Privacy and security > Third-party cookies > Block third-party cookies.
  4. Tap the arrow next to "Block third-party cookies."
  5. Turn Allow related sites to see your activity in the group on or off.

To show related sites in the same group:

  1. On your Android device, open Chrome Chrome.
  2. At the top right, tap More Settings.
  3. Tap Site settings > All sites.
  4. Choose a site.
  5. Under “Sites under [website link],” find sites in the same group.

Give feedback about this article Was this helpful?
Yes No

Need more help?

Try these next steps:

Post to the help community   Get answers from community members

About

Code samples used on cloud.google.com

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Jupyter Notebook 83.5%
  • Python 15.5%
  • JavaScript 0.7%
  • HTML 0.1%
  • Shell 0.1%
  • Dockerfile 0.1%