« first day (749 days earlier)      last day (1439 days later) » 

12:45 AM
1
Q: Redshift Load and Unload Wrapper class

flybonzaiWe do constant traffic with our Redshift tables, and so I created a wrapper class that will allow for custom sql to be ran (or a default generic stmt), and can run a safe_load where it first copies the info to a dev db to make sure it will work before it truncates the prod db. Let me know what I...

 
 
2 hours later…
2:55 AM
-1
Q: What's wrong about thos code

reaCodes#!/usr/bin/env python 'makeTextFile.py--create text file' import os ls=os.linesep # get filename while True: if os.path.exists(fname): print "ERROR: '%s' already exists" % fname else: break # get file content (text) lines all = [] print "\nEnter lines ('.' by itself to quit).\n" # l...

0
Q: What's wrong about those code

reaCodes#!/usr/bin/env python 'makeTextFile.py--create text file' import os ls=os.linesep # get filename while True: if os.path.exists(fname): print "ERROR: '%s' already exists" % fname else: break # get file content (text) lines all = [] print "\nEnter lines ('.' by itself to quit).\n" # l...

 
 
7 hours later…
9:46 AM
0
Q: "Guess my Number" game in Python (2.7.9)

SamanthaFirst time posting to Code Review. Just looking to get some advice on how I can write better code. I found the following exercise for a "Guess my Number" game on DaniWeb, but the linked source code file is no longer active. So while I know my code works, I'm not sure if I've written it in the be...

 
 
5 hours later…
2:37 PM
0
Q: Making my code faster: Finding the longest path, avoiding obstacles in a 2D plane

xorThe Scenario You are given a matrix of size m x n (width x height) with m*n spots where there are a few obstacles. Spots with obstacles are marked as 1, and those without are marked as 0. You can move vertically or horizontally, but can visit each spot only once. The goal is to cover as much are...

 
3:18 PM
[close] cleanup 1 2 3 4
 
Sam
3:34 PM
1 message moved from SO Close Vote Reviewers
 
 
2 hours later…
5:23 PM
1
Q: n-queens puzzle in Python

Pooshan VyasI want to increase the efficiency and time complexity for the n-queen problem in n*n matrix chess. I am able to run only still (11*11) in normal time otherwise for the big number it is taking much more time. How can I improve performance? import time start_time = time.time() def queensproblem(...

 
 
1 hour later…
6:26 PM
0
Q: Qt: placing an item by mouse in a QGraphicsScene by setting the center point doesn't work for me

Enjoys MathHere's my GraphicsScene.mouseMoveEvent(self, event): elif self.state == self.PLACING_ITEMS: if self.lastMousePos == None: self.lastMousePos = event.scenePos() GraphicsItem.setCenterPointOfItems(self.placeItems, self.lastMousePos) mousePos = event.s...

 
 
2 hours later…
8:51 PM
0
Q: Is something wrong with how I have installed anaconda?

user220238I am beginning to learn Ipython and I have installed anaconda. I added the the anaconda path to my system variables but as I fire ipython notebook or jupyter notebook, I find the notebooks tab under New is not enabled (it is not highlighted like python). Also, under New, it says terminals unavail...

 
 
1 hour later…
10:00 PM
0
Q: Coding in python

jojojoI require a Python coded Microsoft Word (extension .doc) exploit builder/Tool to convert executable files extensions to .doc file extensions that can be opened with any version of MS office Word. The doc exploit must be SILENT type (Not Macro). The word document when opened must silently and aut...

 
10:35 PM
0
Q: Improving this if condition with an equation

PuyoverI have the following method that is working perfectly. Main problem I see is that I think it can be done just in one line, but I don't know how: def _animate_display(self, display): self._timer += 1 / bge.logic.getAverageFrameRate() symbolic_level = self.battery.get_symbolic_level() ...

 
 
1 hour later…
11:59 PM
0
Q: Conversion of a simple Python Neural Network to a Haskell implementation

error_null_pointerI started with this code here:http://iamtrask.github.io/2015/07/12/basic-python-network/ I originally modified and expanded it in python. As an exercise/challenge to myself I decided to covert it to Haskell. I either write imperatively or functionally. This is the first time I have tried convert...

 

« first day (749 days earlier)      last day (1439 days later) »