« first day (624 days earlier)      last day (1564 days later) » 

1:35 AM
0
Q: where is the mistake in my function for scalar multipication?

alexquestion def scalar_mult(sc,v): """ scalar multiplication (scalar * vector) :param sc: a scalar mulitplier :param v: a list - vector :return: sc * v """ answer def scalar_mult(sc, v): for x in sc: x = 'lambda' newVector = list() newVector.append(x *...

 
 
2 hours later…
3:35 AM
0
Q: Getting error message s.send("Initial cost from router 0 to other router's") TypeError: 'str' does not support the buffer interface

user202720import socket from bfd import * routes = { 'R0': {'R1': 1}, 'R1': {'R2': 2, 'R3': 2}, 'R2': {}, 'R3': {'R2': -1} } s = socket.socket() host = "" port = 50007 s.connect((host, port)) intial_route = first_route_cost(routes, 'R0') print ("Sending initial cost from router...

 
 
3 hours later…
6:50 AM
0
Q: Python API Query + Email Notification

Tobias FünkeI wrote this to query the Trello API to find the cards that haven't been updated in 7 days and send an email notification to the card's members as a digest. https://github.com/timwis/trello-reminder I'm a node.js & client-side js dev, and this is my first python script. I'd really appreciate an...

 
 
11 hours later…
5:21 PM
0
Q: Movement code for a game that should be able to handle almost infinite coordinates

PeterNow I've grasped the very basics of Pygame, I thought it'd be useful to make a few classes that I could use later on if I try make a simple RPG style game. I've done this to handle the coordinates, and tried to do it in a way where you wouldn't get the floating point precision errors that Minecra...

 
 
6 hours later…
11:31 PM
0
Q: Brute Force Cipher Decryption on Python

Ghest101def rotated(n: int): '''Returns a rotated letter if parameter is greater than 26''' ALPHABET = 'abcdefghijklmnopqrstuvwxyz' if n >= 26: n %= 26 return ALPHABET[n:26] + ALPHABET[:n] assert rotated(0) == 'abcdefghijklmnopqrstuvwxyz' assert rotated(26) == 'abcdefghijklmnopqrs...

 

« first day (624 days earlier)      last day (1564 days later) »