« first day (629 days earlier)      last day (1559 days later) » 

00:35
-1
Q: Python - Why are all of my files being replaced with N instead of just replacing dates?

user4639302What I am trying to do is go through all files in a directory that start with a certain date, from there I replace that date in the file with new one, However all my new files just have "n" in them. What am I doing wrong? so heres the code: for i in dates: datepicker=random.randint(1,22) ...

 
1 hour later…
01:49
0
Q: A simple parcel checker Python script

zer0ptrMy current student accommodation uses a manual paper and pen system for checking if students have mail so I made this simple Python script to help mitigate the problem of manually searching through spreadsheets just to see if you have mail or not. It's quite basic but I figured I should probably ...

 
6 hours later…
07:46
1
Q: Python differential analysis of heat loss across a pipe

kilojoulesI made a differential equation solver to forecast heat loss through a pipe with heat loss coefficient contours. It does what I want it to do but I had to use global variables to change the outputs of my simulation function - is there a better way to deal with this issue? Another problem I have is...

 
1 hour later…
09:07
0
Q: What task queues come with job abstraction support in Python?

Adi KrishnanCelery is a great task queue to run background tasks asynchronously but it isn't the perfect solution for my needs. Here is what I am looking for specifically - The system needs to have a job like concept which abstracts over all individual tasks. So, task completion and job completion are two ...

09:23
print('Just a test')
"""
However here's Trash
"""
09:40
1
Q: Find the Nth number divisible by only 1,2,3,5,7

txizzleFirst post here! I recently participated in a small friendly competition and this was one of the questions: A number whose only prime factors are 2, 3, 5 or 7 is called a humble number. The first 20 humble numbers are: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27,...

 
2 hours later…
12:07
1
Q: Bad practice to define constants based on a function call?

SuperBiasedManIn Python when writing file management scripts I will often have a base path that is a constant, BASE = "C:/" Of course I'll be using that base path to create other paths later on, including other paths that will change in no other place. So I define constants like this: SUB_FOLDER = os.path....

 
3 hours later…
14:41
1
Q: Simple login system using Python Flask and MySQL

SakirThis is my first post on Code Review. I've made a login page using Python Flask which works with MySQL. I started learning Flask 2 days ago and it was fun. So I came up with this: from flask import Flask, session, redirect, url_for, escape, request, render_template from hashlib import md5 impor...

 
1 hour later…
16:11
0
Q: Eliminate duplication of code in two Python methods

Stephen K. KaranjaI'd like to eliminate the code duplication in the following two methods by moving the common code into a separate method callable by both. The comments indicate the blocks of code that have a differing implementation in each method. def compute_totals_h(self, size, bad_codes): with open(self...

16:27
Guys, do you like magic tricks, like card tricks, mentalism, etc?
Well if you do, please go follow: area51.stackexchange.com/proposals/92575/…
0
Q: python xbox controller wrapper

williambellwisdoI spent far too much time trying to simply get data from an xbox controller with python. This is the cleaned up result, classified. This requires xinput1_3 or possibly 1_4 - I'm running windows 7 and cannot use 1_4. import ctypes import threading import time xinput = ctypes.windll.xinput1_3 clas...

 
3 hours later…
19:49
0
Q: String filtering algorithm Python

SkumyolI need to filter Turkish words according to vovel alternation rules. For example -ler is plural but can have form of -lar thus I use metaphonemes for these transitive allomorphs as vovel_dict in my algorithm. There is only one condition not to alternate vovel it's 'ken' which excluded. I wrote t...

20:07
0
Q: Speeding up python code, element selection of 2d numpy array with second array

Pieter BosmaThe following code is a small part of the full code so it makes no sense. For some reason this part takes about 12 seconds.. how can I speed it up without running it parallel? And later on, how could this run in parallel easily? import itertools import numpy as np import time tr...

20:17
2 messages moved from Teenage Programmers Chatroom
 
1 hour later…
21:36
0
Q: What should I use for a website with simple mySQL queries, Python or PHP?

sabivI need to create a website that gets the content from a MySQL database with some basic queries. A sample query that i would like to achieve (and display its results )in pseudo code: queryWhereKey:"playerTeam" equalTo"Lakers" My goal is to write less code as possible, start coding fast (on M...

22:02
0
Q: Sort a list after putting together or after?

bspymasterI have to read through an extremely large amount of network data from various log files and compile relevant information about that data to perform statistical analysis on it (the top communicators, top ip addresses that send on average the largest packets, average packet size, etc.) I decided to...

22:44
LOL
that's not funny
but it's kinda funny
3 messages moved from Android

« first day (629 days earlier)      last day (1559 days later) »