Build a simple django A/B Testing framework [closed] - python

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 9 years ago.
Improve this question
I am not a expert django developer. I am building a site to gather user information and also run experiments. I want to build an A/B testing module to simply do following:
Randomly assign users to control and test group
Depend on the group that user is in allow user to have access to features.
I saw some heavyweight A/B testing modules they seems very complicated for my application and I realize adding something like that without understanding many nuts and bolts in django would cause me more trouble.
My question is how should I start building this? Can someone point me towards similar sample code where I can begin with and then built on top of that.

The simplest (but definitely not the best) way would be to do something like this:
def some_view(request):
test_pool = request.user.id % 2 # all users will be in test_pool 0 or 1
if test_pool == 0:
# allow feature
else:
# don't allow feature

Related

how to make a system in python that support limited users? for instance, it should support 200 users [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 months ago.
Improve this question
How to Limit the amount of user registration? a system that should support a limited amount of users? how can we do that? please someone suggest a tutorial, website, or any good source.
I try to search about it but I couldn't find any useful thing on the internet
Information you provided is little insufficient, but do you mean check of registered user before new registration?
Something like this?
def check_max_users(db_connection):
users_count = db_connection.query("SELECT COUNT(*) AS users_count FROM users").first().users_count
if users_count > 200:
raise MaxUsersError()

How do I generate random jsons from JSchema [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 2 years ago.
Improve this question
I am looking for a way to generate random data for testing purposes (around 10000 files). For this testing I have a json schema.
Generation JSchema:
RunTest(){
JSchemaGenerator generator = new JSchemaGenerator();
JSchema schemaBuilding = generator.Generate(typeof(TestClass));
}
The code itself is in C# so ideally I would have a C# code for doing this, though a python solution is also accaptable. I have found a number of questions on this topic that got websites or only focusses on a single prefixed sample but I can't find how to do this in C# (or less preferably python), anybody got any good way of doing this?
As for the reason for doing this: it's two fold: 1 this tests the stability of the system by entering a lot of random data looking for edge cases we haven't thought of and 2 it's a load test. (so basically a smoke+load test)
In Oxygen Developer there is a tool that allows you to generate random JSON files from a JSON Schema, but you need to do this manually from an interface. The action can be found in the Tools menu and it opens a dialog box where you can configure various options for generating the JSON instances.
You can find more details in the user manual: https://www.oxygenxml.com/doc/versions/23.0/ug-editor/topics/json-schema-instance-generator-2.html

How do you build large complex application in python with kivy [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 2 years ago.
Improve this question
How do you build complex application, I mean application with lots of code in kivy. Like a game that has many levels when you can't import one kivy file inside another(not .kv)
You can use Screen Manager for create pages so you can transfer values between these screens.It doesn't matter how many screen u created or you wrote code.You can create your own game which has different levels or characters (and other things.) I'm seeing you asking many questions in these days.But you're asking another question before giving any feedback or confirmation. You have to start coding first, after that you can share your issues here with an examples. Start coding for you game. So we can help you.

Django project structure [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 7 years ago.
Improve this question
I've been playing with Django for a couple of weeks and I decided to try to make my personal website with it.
The only thing I can't yet wrap my head around is how I should structure the project. The essential of the site will be a blog-like portfolio that shows projects. Those projects (comparable to categories on normal blogs) will contain posts about them.
Now my question is, should that be 1 big app or should I divide this into multiple smaller apps and in that case how would you do it?
For now it looks acceptable to have everything in one app, but my plan is to add features along the way and expand the site continuously. After some time I don't exclude the possibility that it could get pretty complex :)
Response to the fact that this question has been closed because it is "mostly opinion based"..
I am asking for experience (that I don't yet have), to be able to make a better choice about how I should structure my project in order to avoid having to restructure it later because I made a bad choice due to a lack of experience. Of course this requires some opinion based answers..
As you only have one category of articles, I recommend you to start with one application.
Hence, you can start with an application named projects. Then, if you want to write about your experiences, create a new application named experiences, and so on.
Personally, my portfolio is built around three categories/applications:
Skills,
Projects,
Experiences.
Applications are ideal for large Django websites. I advise you to add applications to your project when it becomes bigger and more complex. For now, make your life easier by using only one application ;)

Disadvantages of using multiple apps django [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
In django,What is the difference between creating multiple applications and using the same application and using all models and views in the same application? Will the latter create any problems?
Divide et impera.
This is one of the basic rule of programming.
Divide your problem in smaller pieces and on the long run you will be happy:
Code re-usability
Maintenance
Elegance?
Also if you are working on an opensource project your main goal would be to find someone else who is interested in it and that could help you. It is easier to find someone interested in something really specific than to find someone who wants to adopt your super-huge app which does a lot of beautiful things that nobody else like.

Categories