256 Kilobytes

Scripting and Automation

Type All Category Scripting and AutomationInformation and discussion of scripting of various types. Tag All

Profile Photo - August R. Garcia

Spit in the Face of God: Five Tasks You Didn’t Know Could be Done with Google Sheets

Articles in Spreadsheets | By August R. Garcia

Published | Last Update 📌

Profile Photo - Hash Brown

Last ReplyAny opportunity to spit in the face of god is good by me. Excellent post homie.  Hash Brown,

Any opportunity to spit i...

Mon, 27 May 2019 07:59:54 -07001 year ago1
🗨 2
🐏 2
👁 2,501
Profile Photo - Hash Brown

An introduction to scraping with Python and BeautifulSoup

Articles in Web Scraping, Data Analysis | By Hash Brown

Published | Last Update 📌

Profile Photo - August R. Garcia

Last ReplyVery nice, as they say. Other scraping methods For those who don’t perhaps have the skills needed to code something there are also other... August R. Garcia,

Very nice, as they say.

Wed, 09 Jan 2019 03:16:31 -08001 year ago1
🗨 1
🐏 1
👁 1,925
Profile Photo - Some Guy
Profile Photo - Default

Last ReplyThe $(…).modal is not a function is usually caused because scripts are loaded in the wrong order . The browser will execute the scripts in the... walemark,

The $(…).modal is...

Mon, 24 Aug 2020 04:07:56 -07003 weeks ago1
🗨 1
🐏 0
👁 307
Profile Photo - Some Guy
Profile Photo - Default

Last ReplyJust as the error message says, you can't modify a string. One approach, which will let you keep most of the code you've written, is to convert you... irvinborder,

Just as the error message...

Thu, 06 Aug 2020 00:29:51 -07001 month ago1
🗨 1
🐏 0
👁 298
Profile Photo - Some Guy
Profile Photo - Default

Last ReplyThe error message 'xrange' is not defined would seem to indicate that you are trying to run a Python 2 codebase with Python 3 . In Python 2, an iterab... murphybeck,

The error message 'xrange...

Sun, 12 Jul 2020 23:33:47 -07002 months ago1
🗨 1
🐏 0
👁 318
Profile Photo - Some Guy
Profile Photo - Default

Last ReplyPython makes a clear distinction between bytes and strings . Bytes objects contain raw data — a sequence of octets — whereas strings are U... bennetcole,

Python makes a clear dist...

Fri, 22 May 2020 03:51:31 -07003 months ago1
🗨 2
🐏 0
👁 502
Profile Photo - Some Guy
Profile Photo - rahuldev

Last ReplyWhen we try to use float numbers in Python range() function, we get a type error 'float' object that cannot be interpreted as an integer.&nb... rahuldev,

When we try to use float...

Tue, 24 Mar 2020 04:03:43 -07005 months ago1
🗨 2
🐏 0
👁 2,993
Profile Photo - Some Guy
Profile Photo - August R. Garcia

Last ReplyExplicitly cast the int object to a string: x = 10 # Integer print("X is set to " + str(10)) # Explicitly a string August R. Garcia,

Explicitly cast the int o...

Wed, 05 Feb 2020 13:31:04 -08007 months ago1
🗨 3
🐏 0
👁 662
Profile Photo - Default

TestNG Interview Questions and Answers

Forum in Scripting and Automation | By deep986

Published

Profile Photo - ThanhKim

Last ReplyWait, is this a spam post? You got me. ThanhKim,

Wait, is this a spam post...

Sun, 02 Feb 2020 23:00:02 -08007 months ago1
🗨 2
🐏 0
👁 477
Profile Photo - Some Guy

Fix "typeerror: 'module' object is not callable"?

Answers in Scripting and Automation | By Some Guy

Published

Profile Photo - August R. Garcia

Last ReplyThis error is likely occurring because of code that involves a module that contains a function that has the same name as the module. For example, the... August R. Garcia,

This error is likely occu...

Tue, 31 Dec 2019 10:29:43 -08008 months ago1
🗨 2
🐏 0
👁 369
Profile Photo - Some Guy
Profile Photo - August R. Garcia

Last ReplyIf there are some scenarios where the value is actually not intended to be a number, this can also be solved with a try-catch block: try: #... August R. Garcia,

If there are some scenari...

Tue, 03 Dec 2019 13:33:18 -08009 months ago1
🗨 2
🐏 0
👁 7,566
Profile Photo - Some Guy
Profile Photo - August R. Garcia

Last ReplyIt's possible that if you have an array of values that you believe to be integers, that at some point they were converted to floats. Try printing out... August R. Garcia,

It's possible that if you...

Mon, 11 Nov 2019 08:22:53 -080010 months ago1
🗨 1
🐏 0
👁 1,720
Profile Photo - August R. Garcia
Profile Photo - August R. Garcia

Alternatively "TypeError: %o format: an...

MoreThis is technically a different error message, but is what was causing the issue. string = "The value is one hundred (100)." # Raises an error...
🗨 0
🐏 0
👁 252
Profile Photo - August R. Garcia
Profile Photo - August R. Garcia

TFW

MoreSee code. Yeah, it seems like you do in fact have to make a bunch of additional HTTP requests. def resolve_t_co(t_co_url): if t_co_url !...
🗨 0
🐏 1
👁 268
Profile Photo - Some Guy
Profile Photo - August R. Garcia

Last ReplyWhat the fuck is this question. This is like eight different errors. The answer is probably to cast something as something else. Look at this thread:... August R. Garcia,

What the fuck is this que...

Thu, 17 Oct 2019 14:04:45 -070011 months ago1
🗨 1
🐏 0
👁 320
Profile Photo - Some Guy
Profile Photo - August R. Garcia

Last ReplyCast the integer to be a string. # Probably something like this is causing the error x = 3 text = "whatever" # "TypeError: unsupported op... August R. Garcia,

Cast the integer to be a...

Thu, 17 Oct 2019 14:03:15 -070011 months ago1
🗨 2
🐏 0
👁 2,918
Profile Photo - August R. Garcia
Profile Photo - August R. Garcia

It's time to post code so that I can fin...

MoreIt's time to post code so that I can find this the next eight times I need to do this: # ##### ##### ################# ##### ##### # # ##### ###...
🗨 0
🐏 0
👁 208
Profile Photo - August R. Garcia
Profile Photo - August R. Garcia

Last ReplyHere's a better version that removes the " results" string and then casts the result to a number instead of a string: =VALUE(substitute(importXML... August R. Garcia,

Here's a better version t...

Tue, 08 Oct 2019 09:17:50 -070011 months ago1
🗨 1
🐏 0
👁 485
Profile Photo - August R. Garcia

[Solved] Python - Getting the remote/server IP address and port from an HTTP response using the requests library?

Answers in Web Scraping, Data Analysis | By August R. Garcia

Published | Last Update

Profile Photo - August R. Garcia

Some edge case what even is this.

MoreThe solution here seems to generally work: https://stackoverflow.com/questions/22492484/how-do-i-get-the-ip-address-from-a-http-request-using-th...
🗨 0
🐏 0
👁 544
Profile Photo - August R. Garcia

How to Make a Simple, Automatically-Updating Dashboard for Python Scripts Using HTML, JavaScript, and JSONP

Articles in Scripting and Automation | By August R. Garcia

Published | Last Update

Profile Photo - Default

Last ReplyThank you for the post. Blogger at Radio Box https://www.youtube.com/watch?v=Jfh_qbzhUKI RadioBox,

Thank you for the post.

Sat, 21 Sep 2019 04:07:21 -070011 months ago1
🗨 2
🐏 1
👁 923
Profile Photo - August R. Garcia
Profile Photo - August R. Garcia

Currently: Python, Bash

MoreSee: Correct Horse Battery Staple from XKCD, if somehow you haven't seen this before. There's also a generator that can be used here. How to...
🗨 0
🐏 1
👁 274
Profile Photo - August R. Garcia
Profile Photo - August R. Garcia

Code:

MoreCode: # string.punctuation contains the following characters: # !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~ import random, string print( rand...
🗨 0
🐏 0
👁 267
Profile Photo - August R. Garcia

[Solved] How to immediately kill all Python threads when working with multithreading

Answers in Scripting and Automation | By August R. Garcia

Published | Last Update

Profile Photo - August R. Garcia

why is this answer so hard to find

MoreNormally, to kill a Python script while it is running, pressing CTRL+C will work. However, if there are multiple threads running because the program i...
🗨 0
🐏 0
👁 997
Profile Photo - August R. Garcia
Profile Photo - August R. Garcia

Last ReplyFor Python 3: import http.client [...] try: msg = " " + http.client.responses[status_code] [...] Code is basically th... August R. Garcia,

For Python 3:

Mon, 09 Sep 2019 12:10:10 -07001 year ago1
🗨 1
🐏 0
👁 395
Profile Photo - Some Guy

Solve "Typeerror: unhashable type: 'list'"?

Answers in Scripting and Automation | By Some Guy

Published

Profile Photo - August R. Garcia

Last ReplyRan into this like five minutes ago and found this fucking thread in the SERPs. What a shitty fucking thread that did not answer my question. Anyway,... August R. Garcia,

Ran into this like five m...

Thu, 05 Sep 2019 07:50:44 -07001 year ago1
🗨 2
🐏 0
👁 791
Profile Photo - August R. Garcia

The Basics to Web Scraping with cURL and XPath

Articles in Web Scraping, Data Analysis | By August R. Garcia

Published | Last Update

Profile Photo - August R. Garcia

Last ReplyBump. Some more cURL, used to determine the quality of proxygo's proxies: for i in {1..48} ; do curl https://www.blackhatworld.com/seo/ssl-proxi... August R. Garcia,

Bump. Some more cURL, use...

Thu, 29 Aug 2019 18:31:09 -07001 year ago1
🗨 4
🐏 2
👁 20,270
Profile Photo - August R. Garcia

[Solved] Basic progress bar functionality with Python

Answers in Scripting and Automation | By August R. Garcia

Published | Last Update

Profile Photo - August R. Garcia

Commentary is hard. Use your reading ski...

MoreCommentary is hard. Use your reading skills to read this code: #!/usr/bin/env python # -*- coding: utf-8 -*- import time import sys from...
🗨 0
🐏 0
👁 349
Profile Photo - August R. Garcia

[Solved] How to Show Number of Remaining Threads in Python

Answers in Scripting and Automation | By August R. Garcia

Published | Last Update

Profile Photo - August R. Garcia

Self explanatory, mostly.

MoreSelf explanatory, mostly. Original Code import Queue from threading import Thread, active_count import time que = Queue.Queue()...
🗨 0
🐏 0
👁 257
Profile Photo - August R. Garcia
Profile Photo - August R. Garcia

The answer is to fucking kill yourself.<...

MoreThe answer is to fucking kill yourself.
🗨 0
🐏 0
👁 411
Profile Photo - August R. Garcia

[Solved, Basically] Nautilus - Open Multiple Tabs from Command Line?

Answers in Shell Scripting | By August R. Garcia

Published | Last Update

Profile Photo - August R. Garcia

How to open multiple GUI file manager ta...

MoreThe answer is that there's no built in option to do this in Nautilus, although there are Stack Exchange threads discussing ghetto hack workarounds....
🗨 0
🐏 2
👁 352