Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Blog Directory  >  Software Blogs  >  Programming Blogs  >  Ricky's Python Notes programming Blog  > 

2019-12-22 18:32
'''This module parses the requests.csv file generated by blokada and createsa text file of the blocked and acceptedrequests.'''LOGFILE = 'requests.csv'ACCEPTED = 'a'BLOCKED = 'b'class Reques… Read More
2017-12-07 18:59
# -*- coding: utf-8 -*-"""requests._internal_utils~~~~~~~~~~~~~~Provides utility functions that are consumed internally by Requestswhich depend on extremely few external helpers (such as com… Read More
2017-12-07 05:25
"""Retrieve the weather report for the current location."""__author__ = 'T.V. Raman '__copyright__ = 'Copyright (c) 2009, Google Inc.'__license__ = 'Apache License, Version 2.0'import string… Read More
2017-12-07 04:53
__author__ = "Brian Lenihan __copyright__ = "Copyright (c) 2012 Python for Android Project"__license__ = "Apache License, Version 2.0"import osimport loggingimport sl4a"""Create and set a ne… Read More
2017-12-07 02:44
import sl4aimport cursesdroid = sl4a.Android()win=curses.initscr()result="No result"try: win.box() w,h=win.getmaxyx() win.addstr(2,2,"Curses Test %sx%s" % (w,h)) win.addstr(10,10,"Hit a… Read More
2017-12-07 02:40
# -*- coding: utf-8 -*-"""requests.models~~~~~~~~~~~~~~~This module contains the primary objects that power Requests."""import collectionsimport datetimeimport sys# Import encoding now, to a… Read More
2017-12-07 02:40
# -*- coding: utf-8 -*-"""requests.structures~~~~~~~~~~~~~~~~~~~Data structures that power Requests."""import collectionsfrom .compat import OrderedDictclass CaseInsensitiveDict(collections… Read More
2017-12-07 02:39
#!/usr/bin/env python# -*- coding: utf-8 -*-"""requests.certs~~~~~~~~~~~~~~This module returns the preferred default CA certificate bundle. There isonly one — the one from the certifi… Read More
2017-12-07 02:38
#-*-coding:utf8;-*-#qpy:3#qpy:consoleimport osimport math def convert_size(size_bytes): if size_bytes == 0: return "0B" size_name = ("B", "KB", "MB", "GB", "TB", "PB", "EB"… Read More
2017-12-07 02:37
import sl4aimport timedroid = sl4a.Android()droid.toggleBluetoothState(True)droid.dialogCreateAlert('Be a server?')droid.dialogSetPositiveButtonText('Yes')droid.dialogSetNegativeButtonText('… Read More
2017-12-07 02:36
#-*-coding:utf8;-*-#qpy:3#qpy:consoleimport urllib.requestfrom urllib.parse import urlparseimport reimport timefrom multiprocessing.pool import Poolseed = 'http://www.google.com'tocrawl = se… Read More
2017-12-07 02:33
# -*- coding: utf-8 -*-"""requests.compat~~~~~~~~~~~~~~~This module handles import compatibility issues between Python 2 andPython 3."""import chardetimport sys# -------# Pythons# -------# S… Read More
2017-12-07 02:31
# -*- coding: utf-8 -*-"""requests.auth~~~~~~~~~~~~~This module contains the authentication handlers for Requests."""import osimport reimport timeimport hashlibimport threadingimport warning… Read More
2017-12-07 02:30
# -*- coding: utf-8 -*-"""requests.session~~~~~~~~~~~~~~~~This module provides a Session object to manage and persist settings acrossrequests (cookies, auth, proxies)."""import osimport plat… Read More
2017-12-07 02:29
# -*- coding: utf-8 -*-"""requests.cookies~~~~~~~~~~~~~~~~Compatibility code to be able to use `cookielib.CookieJar` with requests.requests.utils imports from here, so be careful with import… Read More
2017-12-07 02:28
# -*- coding: utf-8 -*-"""requests.utils~~~~~~~~~~~~~~This module provides utility functions that are used within Requeststhat are also useful for external consumption."""import cgiimport co… Read More
2017-12-07 02:27
# -*- coding: utf-8 -*-"""requests.hooks~~~~~~~~~~~~~~This module provides the capabilities for the Requests hooks system.Available hooks:``response``: The response generated from a Reque… Read More
2017-12-07 02:26
# -*- coding: utf-8 -*-from .structures import LookupDict_codes = { # Informational. 100: ('continue',), 101: ('switching_protocols',), 102: ('processing',), 103: ('checkpoint… Read More
2017-12-07 01:45
#-*-coding:utf8;-*-#qpy:3#qpy:console'''A simple anonymous FTP server scanner.'''import socketimport ftplibimport structimport randomimport threadingimport ipaddressimport timefrom datetime… Read More
2017-12-06 23:25
#-*-coding:utf8;-*-#qpy:3import socketimport reHOST = 'irc.freenode.net' PORT = 6665 NICK = 'qwefgjut'USERNAME = 'megadeath'REALNAME = 'little pony'CHANNEL = NICKirc = socket.socket() # C… Read More
2017-12-06 22:42
#-*-coding:utf8;-*-#qpy:3#qpy:consoleimport urllib.requestfrom urllib.parse import urlparseimport reimport timefrom multiprocessing.pool import Poolseed = 'http://www.google.com'tocrawl = se… Read More
2017-12-06 22:40
def translate(text): return ' '.join('{}{}{}'.format(word, word[0], 'say')[1:] for word in text.split())while 1: word = input('Enter some words: ') if word == 'quit': break… Read More
2017-12-06 22:37
#-*-coding:utf8;-*-#qpy:3#qpy:consoleimport urllib.requestimport osimport shutilimport argparseUSER_AGENT = 'Mozilla/5.0 (X11; U; Linux x86_64; en-US) AppleWebKit/540.0 (KHTML,like Gecko) Ch… Read More
2017-12-06 22:36
import osimport os.pathimport sysimport readlineBIN_DIR = sys.executable+" "+sys.prefix+"/bin/"PIP_BIN = sys.prefix+"/bin/pip" PS1 = 'pip:--> 'if not os.path.exists(PIP_BIN): print('pi… Read More

Share the post

Ricky's Python Notes

×

Subscribe to Ricky's Python Notes

Get updates delivered right to your inbox!

Thank you for your subscription

×