Search Results
|
Post |
Author |
Forum |
Replies |
Views |
Posted
[asc]
|
|
|
Thread: Help with itertools
Post: Help with itertools
Been a while since I did this.
Can't remember how to get from:
[[0], [4, 3, 14], [4, 3, 21], [4, 10, 16]]to:
[0, 4, 4, 4]
[0, 4, 4, 10]
[0, 4, 4, 16]
[0, 4, 3, 4]
[0, 4, 3, 10]
ETC ETC.
I figure it'... |
|
jarrod0987 |
General Coding Help |
1 |
1,830 |
Jun-09-2019, 02:15 PM |
|
|
Thread: How to convert rows to columns.
Post: How to convert rows to columns.
I'm playing around with incomplete columnar ciphers. What is the fastest was to convert rows to columns when the columns may not all be the same length?
Example:
rows = [
'SOME',
'TEXT',
'OFSO',
'ME... |
|
jarrod0987 |
General Coding Help |
1 |
3,494 |
May-14-2019, 04:37 PM |
|
|
Thread: Product expression.
Post: Product expression.
What I want to do it to use Product from itertools.
I want the length of the product to be variable.
so for example...
var = 'AB'
If I had product(var, var)
I would get
AA
AB
BA
BB
If product(var,... |
|
jarrod0987 |
General Coding Help |
1 |
2,380 |
Dec-13-2018, 11:05 AM |
|
|
Thread: File IO Help
Post: File IO Help
I have found that running a program in IDLE is slower then running it by right clicking and openwith Python. Also, that second way let's me run multiple instances. The following code works fine in IDL... |
|
jarrod0987 |
General Coding Help |
5 |
2,937 |
Dec-13-2018, 09:14 AM |
|
|
Thread: Help with building Cython modules.
Post: Help with building Cython modules.
After a week of pure hell and lot's of help I seem to have Cython and a compiler installed and working in Win 10.
I seem to have pyximport working now.
Setup.py does generate a .c file when I run it i... |
|
jarrod0987 |
General Coding Help |
2 |
3,363 |
Oct-10-2018, 03:33 PM |
|
|
Thread: Help with Cython in Win 10
Post: Help with Cython in Win 10
Trying to get it up and running so I can learn it.
I am pretty sure Cython and miniGW are installed. They seemed to match the demo video's process.
I also have the shortcut for msys which can bring up... |
|
jarrod0987 |
General Coding Help |
0 |
3,033 |
Oct-06-2018, 12:16 PM |
|
|
Thread: Dictionary or Numpy Array?
Post: RE: Dictionary or Numpy Array?
Seems to be what I wanted. Thanks |
|
jarrod0987 |
Data Science |
2 |
7,178 |
Oct-05-2018, 06:48 PM |
|
|
Thread: Dictionary or Numpy Array?
Post: Dictionary or Numpy Array?
First, can someone please show the proper code for creating a 5 row 2 column numpy array with type python object?
I see a lot of info online but none of it seems to quite show how to do that in one ex... |
|
jarrod0987 |
Data Science |
2 |
7,178 |
Oct-05-2018, 06:18 PM |
|
|
Thread: Help getting PIP working
Post: Help getting PIP working
DELETED BY OP
How do I make PIP install NUMPY please? |
|
jarrod0987 |
Data Science |
1 |
1,896 |
Oct-05-2018, 04:35 PM |
|
|
Thread: Help with learning threading please.
Post: Help with learning threading please.
I wrote a short test program to learn how to make threads. Right now there is only 1 thread. Going to increase that once I get it working.
It is throwing and error and I am not sure what I am doing wr... |
|
jarrod0987 |
General Coding Help |
3 |
14,456 |
Sep-23-2018, 06:41 AM |
|
|
Thread: itertools
Post: itertools
I know how to use itertools for permutations in the normal way.
permutations = (['a', 'b', 'c'], 2)would give
[a, b]
[a, c]
[b, a] etc...
What if I want each element in the permutation to have a sepa... |
|
jarrod0987 |
General Coding Help |
1 |
2,507 |
Jul-27-2018, 05:51 AM |
|
|
Thread: Branch and Bound
Post: RE: Branch and Bound
I have been playing with your code example and figuring out what it does.I think I will be able to do that on my own. How do you add rules about disallowing certain perms? I can't write it because I h... |
|
jarrod0987 |
General Coding Help |
7 |
5,205 |
Jul-26-2018, 06:38 PM |
|
|
Thread: Branch and Bound
Post: RE: Branch and Bound
(Jul-26-2018, 05:18 PM)ichabod801 Wrote: Permutations can be done with recursion:
def permutations(sequence, start = []):
if not sequence:
return [start]
else:
perms = []
... |
|
jarrod0987 |
General Coding Help |
7 |
5,205 |
Jul-26-2018, 05:38 PM |
|
|
Thread: Branch and Bound
Post: RE: Branch and Bound
(Jul-26-2018, 04:43 PM)ichabod801 Wrote: This isn't really a branch and bound problem. Branch and bound is looking at optimizing combinations with respect to some evaluation function. It's meant to ... |
|
jarrod0987 |
General Coding Help |
7 |
5,205 |
Jul-26-2018, 04:57 PM |
|
|
Thread: Branch and Bound
Post: Branch and Bound
I am trying to learn about branch and bound. I understand the concept but have not had any luck tracking down an example of the code that works for what I want to do.
Say I have some letters ABCDEFG ... |
|
jarrod0987 |
General Coding Help |
7 |
5,205 |
Jul-26-2018, 03:15 PM |
|
|
Thread: Permutation help.
Post: Permutation help.
What I have is a list of lists. Something like this:
[[1][4][2][3, 6][4][1]]what I want back is something like:
[1][4][2][3][4][1], [1][4][2][6][4][1]or even:
['142341', '142641']How can I accomplish ... |
|
jarrod0987 |
General Coding Help |
1 |
2,204 |
Jun-28-2018, 04:35 PM |
|
|
Thread: How to get python to select a dictionary.
Post: How to get python to select a dictionary.
I'm not even sure how to word my question. I know exactly what I want to do but I don't know how to ask it so I will try an example.
Suppose I have multiple dictionaries with the same keys but differ... |
|
jarrod0987 |
General Coding Help |
1 |
2,772 |
May-31-2018, 10:51 PM |
|
|
Thread: Faster way?
Post: RE: Faster way?
Turns out it was a bug causing the problem. Thanks for your help though. I think it is interesting. |
|
jarrod0987 |
General Coding Help |
2 |
2,655 |
May-02-2018, 08:29 AM |
|
|
Thread: Faster way?
Post: Faster way?
I am playing with breaking ancient ciphers.
In this particular puzzle, it is not allowed for a letter to encrypt to itself.
I am using word patterns to get a list of candidates for each cipher word.
I... |
|
jarrod0987 |
General Coding Help |
2 |
2,655 |
May-02-2018, 04:38 AM |
|
|
Thread: Square and Cube roots.
Post: Square and Cube roots.
What is an easy way to get the square or cube root of a number and not get the part after the decimal? I just want the whole number or maybe the whole number and a remainder. No decimals. Is that poss... |
|
jarrod0987 |
General Coding Help |
2 |
5,484 |
Apr-13-2018, 01:19 PM |