Python Forum
Search Results
Post Author Forum Replies Views Posted [asc]
    Thread: struct.error: unpack requires a buffer of 14 bytes
Post: struct.error: unpack requires a buffer of 14 bytes

Hi, I am trying to read data from a socket and unpack it. But I get this error while running the code. import socket as socket_mod import struct import textwrap def main(): conn=socket_mod.socke...
upasana Networking 0 8,645 Apr-18-2018, 11:06 AM
    Thread: plotting 2 different set of data in a single plot with shared axes.
Post: RE: plotting 2 different set of data in a single p...

(Mar-21-2018, 01:29 PM)DeaD_EyE Wrote: x1 = [1,2,3,4,5] x2 = list(reversed(x1)) y1 = [10, 20, 30, 40, 50] y2 = [100, 200, 300, 400, 500] # x and y must have the same length. plt.plot(x1, y1) plt...
upasana General Coding Help 4 3,687 Mar-21-2018, 01:43 PM
    Thread: plotting 2 different set of data in a single plot with shared axes.
Post: RE: plotting 2 different set of data in a single p...

(Mar-21-2018, 12:23 PM)sparkz_alot Wrote: What have you tried? Have you looked at Matplotlib?Yea i did. fig=plt.figure() ax=fig.add_subplot(111,label="1") ax2=fig.add_subplot(111,label="2",frame_on...
upasana General Coding Help 4 3,687 Mar-21-2018, 01:01 PM
    Thread: plotting 2 different set of data in a single plot with shared axes.
Post: plotting 2 different set of data in a single plot ...

Hi.. I have 2 different sets of data like, x1=[1,2,3,4,5],y1=[some corresponding data] and x2=[6,7,8,9,10],y2=[some corresponding data]. How can i plot these in a single plot with shared axes? to be ...
upasana General Coding Help 4 3,687 Mar-21-2018, 12:19 PM
    Thread: beginner : unexpected EOF errors
Post: RE: beginner : unexpected EOF errors

(Mar-19-2018, 04:15 PM)buran Wrote: forget about pdb for now... resolve problems that raise when you run it.Thank you so much for your help. The code runs without any error and I get the desired out...
upasana General Coding Help 6 4,703 Mar-19-2018, 04:18 PM
    Thread: beginner : unexpected EOF errors
Post: RE: beginner : unexpected EOF errors

(Mar-19-2018, 04:00 PM)buran Wrote: you need to check it against str l[0]!= '0': # do something else: # do something ese or if l[0].startswith('0'): # do something if it start with 0 else: # do some...
upasana General Coding Help 6 4,703 Mar-19-2018, 04:09 PM
    Thread: beginner : unexpected EOF errors
Post: RE: beginner : unexpected EOF errors

(Mar-19-2018, 02:34 PM)buran Wrote: first of all, don't use dict as a variable name, it's a built-in function and using it as a variable name you overwrite it. second, when you read from file, it wi...
upasana General Coding Help 6 4,703 Mar-19-2018, 03:20 PM
    Thread: beginner : unexpected EOF errors
Post: beginner : unexpected EOF errors

Hi.. I am new to python programming. I am trying to generate a raster plot here. my code: from brian2 import * import matplotlib start_scope() cnt=1 ct=0 f= open("list.txt") dict={} i=[] t=[] line...
upasana General Coding Help 6 4,703 Mar-19-2018, 02:13 PM

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020