دادههای خام را به تصمیمهای اثربخش تبدیل کنید
با فرمهای آنلاین تعاملی و ابزارهای تحلیلی قدرتمند، کسبوکار خود را متحول کنید
https://www.porsline.ir/
#porsline #پرسشنامه #فرم #استارتـآپ
با فرمهای آنلاین تعاملی و ابزارهای تحلیلی قدرتمند، کسبوکار خود را متحول کنید
https://www.porsline.ir/
#porsline #پرسشنامه #فرم #استارتـآپ
پرس لاین
پرس لاین: پرسشنامه آنلاین | نظرسنجی اینترنتی | فرم آنلاین - (رایگان شروع کنید)
پرسشنامه آنلاین، آزمون آنلاین و فرم نظرسنجی با فرم ساز پرس لاین، رایگان و سریع، بسازید یا از نمونه پرسشنامه های آماده استفاده کنید و در وقت و هزینه تحقیقات بازار، نظرسنجی مشتری و کارکنان صرفهجویی کنید.
Media is too big
VIEW IN TELEGRAM
#ansible part2 - Ansible requirements
In Django unittests you can use fixtures in order to create dummy data. To create fixtures you can use django dumpdata command to dump a specific data:
This is how you can dump data and use it as your data backend for unittests.
#django #python3 #dumpdata #unittest
python3 manage.py dumpdata --indent 4 YOUR_APP.YOUR_TABLE > output_data.json
This is how you can dump data and use it as your data backend for unittests.
#django #python3 #dumpdata #unittest
Tech C**P
In Django unittests you can use fixtures in order to create dummy data. To create fixtures you can use django dumpdata command to dump a specific data: python3 manage.py dumpdata --indent 4 YOUR_APP.YOUR_TABLE > output_data.json This is how you can dump…
Coderwall
Django dumpdata and loaddata (Example)
A protip by itseranga about django, database, model, and dumpdata.
How to delete a git branch?
https://makandracards.com/makandra/621-git-delete-a-branch-local-or-remote
#git #branch #delete
https://makandracards.com/makandra/621-git-delete-a-branch-local-or-remote
#git #branch #delete
Is there a way to create ObjectID from an INT in
#mongodb #objectid #pymongo #python #bson #int
MongoDB
?import bson
def object_id_from_int(n):
s = str(n)
s = '0' * (24 - len(s)) + s
return bson.ObjectId(s)
def int_from_object_id(obj):
return int(str(obj))
n = 12345
obj = object_id_from_int(n)
n = int_from_object_id(obj)
print(repr(obj)) # ObjectId('000000000000000000012345')
print(n) # 12345
#mongodb #objectid #pymongo #python #bson #int
https://medium.com/@nielssj/docker-volumes-and-file-system-permissions-772c1aee23ca
#medium #docker #volumes #file_system
#medium #docker #volumes #file_system
Medium
Docker volumes and file system permissions
The docker volume feature offers a way to support persistent storage, but it comes with some gotchas regarding file system permissions.
To get an expiration time of a redis key you can use
To read more about setting expiration time and or other options:
- https://redis.io/commands/expire
#redis #expiration_time #expire #ttl
TTL
like below:TTL "YOUR_KEY_NAME"
To read more about setting expiration time and or other options:
- https://redis.io/commands/expire
#redis #expiration_time #expire #ttl
What does
In the above code 2 queries are issued in DB side. First it gets Entry record and then blog is fetched from DB when
You can follow foreign keys in a similar way to querying them. If you have the following models:
Then a call to
#python #django #select_related #join #database #models
select_related
do in Django
?select_related
does a join in case needed on the DB side and reduce query counts. Let's look at an example:# Hits the database.
e = Entry.objects.get(id=5)
# Hits the database again to get the related Blog object.
b = e.blog
In the above code 2 queries are issued in DB side. First it gets Entry record and then blog is fetched from DB when
e.blog
is called. And here’s select_related lookup:# Hits the database.
e = Entry.objects.select_related('blog').get(id=5)
# Doesn't hit the database, because e.blog has been prepopulated
# in the previous query.
b = e.blog
You can follow foreign keys in a similar way to querying them. If you have the following models:
from django.db import models
class City(models.Model):
# ...
pass
class Person(models.Model):
# ...
hometown = models.ForeignKey(
City,
on_delete=models.SET_NULL,
blank=True,
null=True,
)
class Book(models.Model):
# ...
author = models.ForeignKey(Person, on_delete=models.CASCADE)
Then a call to
Book.objects.select_related('author__hometown').get(id=4)
will cache the related Person and the related City:# Hits the database with joins to the author and hometown tables.
b = Book.objects.select_related('author__hometown').get(id=4)
p = b.author # Doesn't hit the database.
c = p.hometown # Doesn't hit the database.
# Without select_related()...
b = Book.objects.get(id=4) # Hits the database.
p = b.author # Hits the database.
c = p.hometown # Hits the database.
#python #django #select_related #join #database #models
https://xiaoxiaoke.wordpress.com/2015/10/06/changing-java-security-restriction-for-network-connect-error-issue-in-kvm/
#linux #devops #sysadmin #kvm #hp
#linux #devops #sysadmin #kvm #hp
Ke Xu | Geek World
Changing java security restriction for “Network connect error” issue in KVM
I am using KVM to manage the servers in a rack. When launching the session jnlp files with javaws, I saw the “Network connect error” message. This is due to the default java security re…
https://www.toptal.com/python/introduction-python-microservices-nameko
#nameko #microservice #rabbitmq #python #docker #greenlet
#nameko #microservice #rabbitmq #python #docker #greenlet
Toptal
Introduction to Python Microservices With Nameko
We will focus on building a proof of concept microservices application using Python. For that, we will use Nameko, a Python microservices framework. It has RPC over AMQP built in, allowing for you to easily communicate between your services.