Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: Interaction between different programming languages
Post: RE: Interaction between different programming lang...
Thank you I'll explore these ways :) |
|
Krookroo |
News and Discussions |
3 |
3,929 |
Sep-23-2017, 08:50 PM |
|
|
Thread: Interaction between different programming languages
Post: Interaction between different programming language...
Hello,
First, let me apologize for I don't have any code to show. This post is about getting pointers as to where to get the information I need.
I would like to have a python program running a scrip... |
|
Krookroo |
News and Discussions |
3 |
3,929 |
Sep-22-2017, 01:30 AM |
|
|
Thread: python machine learning model, macro precision score?
Post: RE: python machine learning model, macro precision...
I'm afraid that you don't give enough information for me to give you any more help.
If your assignment doesn't say anything more, you surely have courses you can refer to. |
|
Krookroo |
Homework |
5 |
7,253 |
Sep-22-2017, 01:15 AM |
|
|
Thread: While Loop; Can Else Point Back To Initial Input Command?
Post: RE: While Loop; Can Else Point Back To Initial Inp...
Nice :)
Just add a little bit, here's how I would have done it. The idea is to store the data we use in lists so that we can very easily tweak the algorithm for another set of currencies, just by edit... |
|
Krookroo |
Homework |
9 |
6,287 |
Sep-17-2017, 06:33 PM |
|
|
Thread: While Loop; Can Else Point Back To Initial Input Command?
Post: RE: While Loop; Can Else Point Back To Initial Inp...
There is the % operation (modulo operator) in python, do you have the right to use it?
Using the / operator on integers to get how much times you have the second number fitting in the first, and then ... |
|
Krookroo |
Homework |
9 |
6,287 |
Sep-16-2017, 12:05 AM |
|
|
Thread: How to generate the list I want?
Post: RE: How to generate the list I want?
a = [4, 4, 4, 4]
c = []
for i in range(4):
b = [elem for elem in a]
b[i] = 0
c.append(b)
print cOutput:[[0, 4, 4, 4], [4, 0, 4, 4], [4, 4, 0, 4], [4, 4, 4, 0]]Pheeew I managed to find a wa... |
|
Krookroo |
General Coding Help |
6 |
4,125 |
Sep-07-2017, 02:06 PM |
|
|
Thread: How to generate the list I want?
Post: RE: How to generate the list I want?
Compared to the first thing I tried above, which was just "generate full list, fill the right tiles with the right number in one go", it feels, to me, overly complicated. I have to admit that whatever... |
|
Krookroo |
General Coding Help |
6 |
4,125 |
Sep-07-2017, 01:40 PM |
|
|
Thread: How to generate the list I want?
Post: RE: How to generate the list I want?
Yeah it works.
But I made it by hand in the end, the list I needed was just twice as big.
But seriously, we need a module for that? I really have to read a whole manual just to make a simple list... A... |
|
Krookroo |
General Coding Help |
6 |
4,125 |
Sep-07-2017, 12:19 PM |
|
|
Thread: How to generate the list I want?
Post: How to generate the list I want?
Hi :)
I want to generate a list of lists of the form:
[ [0, 4, 4, 4, 4]
[4, 0, 4, 4, 4]
[4, 4, 0, 4, 4]
[4, 4, 4, 0, 4]
[4, 4, 4, 4, 0] ]Nothing I'm trying works, it seems python wants to si... |
|
Krookroo |
General Coding Help |
6 |
4,125 |
Sep-07-2017, 03:28 AM |
|
|
Thread: Reading floats and ints from csv-like file
Post: RE: Reading floats and ints from csv-like file
Thanks for your inputs guys, lots of leads, I'll investigate into all this tomorrow |
|
Krookroo |
General Coding Help |
15 |
20,083 |
Sep-05-2017, 03:58 PM |
|
|
Thread: python machine learning model, macro precision score?
Post: RE: python machine learning model, macro precision...
Are you in a regression or classifying task with that model?
I'm selftaught (and actually selfteaching currently) on ML and at that point myself as well.
If you have the fitted model m, you don't nee... |
|
Krookroo |
Homework |
5 |
7,253 |
Sep-05-2017, 03:55 PM |
|
|
Thread: Reading floats and ints from csv-like file
Post: RE: Reading floats and ints from csv-like file
@DeaD_EyE:
You think there is more to it than the fact that the file is written with mixed encodings making it ultra hard to process via python?
I spent one hour after my last post trying to force enc... |
|
Krookroo |
General Coding Help |
15 |
20,083 |
Sep-05-2017, 12:46 PM |
|
|
Thread: Reading floats and ints from csv-like file
Post: RE: Reading floats and ints from csv-like file
import csv
import os
filename = os.path.abspath('/media/dfuu/Data/mt4/EU-1H.txt')
def read_csv_data(filename):
try:
buffer = None
with open(filename) as csvfile:
buf... |
|
Krookroo |
General Coding Help |
15 |
20,083 |
Sep-04-2017, 11:42 PM |
|
|
Thread: Reading floats and ints from csv-like file
Post: RE: Reading floats and ints from csv-like file
import csv
def read_csv_data(filename):
try:
buffer = None
with open(filename) as csvfile:
buffer = csv.reader(csvfile, delimiter=',')
for row in buffer:... |
|
Krookroo |
General Coding Help |
15 |
20,083 |
Sep-04-2017, 10:35 PM |
|
|
Thread: Reading floats and ints from csv-like file
Post: RE: Reading floats and ints from csv-like file
Thanks for your input.
Larz60+'s format of output is exactly what I want, unfortunately:
import csv
def read_csv_data(filename):
try:
buffer = None
with open(filename) as csvfile... |
|
Krookroo |
General Coding Help |
15 |
20,083 |
Sep-04-2017, 09:47 PM |
|
|
Thread: How do I loop through a list and delete numerical elements that are 1 lower/higher?
Post: RE: How do I loop through a list and delete numeri...
It's hard to understand what you want, I'll try to translate:
=> you want to loop over slice[] and keep track of the index to be able to refer to count[] right?
=> something like that then to r... |
|
Krookroo |
General Coding Help |
4 |
4,319 |
Sep-04-2017, 05:26 PM |
|
|
Thread: For looping over a list, editing the list from inside the loop?
Post: RE: For looping over a list, editing the list from...
I ended up just rewriting everything with while loops instead. Works like a charm. |
|
Krookroo |
General Coding Help |
3 |
3,956 |
Sep-04-2017, 05:08 PM |
|
|
Thread: Reading floats and ints from csv-like file
Post: Reading floats and ints from csv-like file
Hello :)
I have stored numbers in a file from another program, and I'd like to extract the values in lists to use with another python program I already wrote, here is how the data file looks like:
�... |
|
Krookroo |
General Coding Help |
15 |
20,083 |
Sep-04-2017, 05:06 PM |
|
|
Thread: For looping over a list, editing the list from inside the loop?
Post: RE: For looping over a list, editing the list from...
I understand and recall that from courses I had long ago. However in that case I can't know in advance how much nodes there will be, nor how they will be connected...etc... More than this, I don't nee... |
|
Krookroo |
General Coding Help |
3 |
3,956 |
Aug-28-2017, 01:55 AM |
|
|
Thread: For looping over a list, editing the list from inside the loop?
Post: For looping over a list, editing the list from ins...
Hello,
I'm on a project where I want to code a random forest from scratch (to learn both how to code and the details and nuances of this type of machine learning). I know there are libraries to make s... |
|
Krookroo |
General Coding Help |
3 |
3,956 |
Aug-28-2017, 12:44 AM |