Innovate anywhere, anytime withruncode.io Your cloud-based dev studio.

MicroPyramidBlog

Explore a blog dedicated to a wide spectrum of topics including Django, Python, Machine Learning, Salesforce, Angular, React, Flutter, Svelte, LINUX, and Amazon Web Services.

Programming with Python: Decorators

Python decorators supports aspect-oriented programming. It is used to add or modify code in functions or classes. Using decorators will provide security, tracing, looking ..etc Let see an example:

@fundecorator
def myfunc():
print "This is my function"

QRCode Generation in Python

A Quick Response code(QRCode) is a two-dimensional pictographic code used for its fast readability and comparatively large storage capacity. The code consists of black modules arranged in a square pattern on a white background. The information encoded can be made up of any kind of data (e.g., binary, alphanumeric, or Kanji symbols).

Sendgrid Inbound Email Parsing with Django

Using the Inbound parse web hook, we can parse the contents, attachments of an incoming email.

How to Customize the Admin Actions in List Pages of Django Admin?

Django by default provides automatic admin interface, that reads metadata from your models to provide a beautiful model interface where trusted users can manage content on your site. With this interface we can perform actions like delete, filter and other. In this blog post we learn to add new actions to the admin dashboard and how to disable built in actions of the admin dashboard.

Autocomplete with Django-Haystack and Elasticsearch with Single Letter Querying

Django's haystack provides autocomplete functionality. To do autocomplete effectively, the search backend(elasticsearch in this case) uses n-grams (essentially a small window passed over the string). Because this alters the way your data needs to be stored. We had two choices: NgramField and EdgeNgramField used as n-grams in search backend. The major drawback of the n-grams is that they take minimum of 3 letters in the search query.

How to Create Periodic Tasks with Django Celery?

Celery provides asynchronous job queues, which allows you to run Python functions in the background. Celery is on the Python Package Index (PyPi), and can be easily installed with pip or easy_install and its dependencies.

Implement Search with Django-haystack and Elasticsearch Part-1

Haystack works as a search plugin for Django. You can use different backends Elastic-search, Whose, Sorl, Xapian to search objects. All backends work with the same code. In this post, I am using elastic search as backend.

How to Use List Methods in Salesforce

Apex provides collections such as List, Set, Map. These are similar to arrays, but these collections have advanced features and easier methods than an array. We will see about List, which is used widely in salesforce.

Salesforce Read Full Post

Inbound Email Service for Creating Records in Salesforce

For any type of CRM, we will receive various emails from different external systems. To create or save the information received via emails in Salesforce, we have Email Services known as Inbound Email Service

Salesforce Read Full Post

How to Index Binary Files in Django Haystack

Now we are going to index text content which is stored in structured files such as PDFs, Microsoft Office documents, images, etc using haystack and sorl's

In order to read and store the data, we can use SearchBackend.extract_file_contents(self, file_obj) method. It takes the file object, returns a dictionary containing two keys: metadata and contents. The contents value will be a string containing all of the text which the backend managed to extract from the file contents