Download and install Solr from http://lucene.apache.org/solr/. You can access Solr admin from your browser: http://localhost:8983/solr/
download and install Solr from http://lucene.apache.org/solr/.
you can access Solr admin from your browser: http://localhost:8983/solr/
use the port number used in installation.
<form action="{{ action }}" name="payuForm" method="post">
{% csrf_token %}
<input type="hidden" name="key" value="{{ key }}" />
<input type="hidden" name="hash" value="{{ hash }}"/>
<input type="hidden" name="txnid" value="{{ txnid }}" />
<input type="hidden" name="amount" value="{{ amount }}" />
<input type="hidden" name="email" value="{{ email }}" />
<input type="hidden" name="firstname" value="{{ firstname }}" />
<input type="hidden" name="phone" value="{{ phone }}" />
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import asyncio # only here for debugging purposes | |
import aiohttp | |
USER_AGENT = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:61.0) Gecko/20100101 Firefox/61.1' | |
def default_headers(): | |
header = { | |
'User-Agent': USER_AGENT | |
} |
The standard way of understanding the HTTP protocol is via the request reply pattern. Each HTTP transaction consists of a finitely bounded HTTP request and a finitely bounded HTTP response.
However it's also possible for both parts of an HTTP 1.1 transaction to stream their possibly infinitely bounded data. The advantages is that the sender can send data that is beyond the sender's memory limit, and the receiver can act on
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class FloatingPointCursorPagination(CursorPagination): | |
__rounding_down = decimal.Context(prec=14, rounding=decimal.ROUND_FLOOR) | |
__rounding_up = decimal.Context(prec=14, rounding=decimal.ROUND_CEILING) | |
def _get_position_from_instance(self, instance, ordering): | |
field_name = ordering[0].lstrip('-') | |
if isinstance(instance, dict): | |
attr = instance[field_name] | |
else: | |
attr = getattr(instance, field_name) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*.pyc | |
/bin | |
/include | |
/lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.ByteArrayOutputStream; | |
import java.io.IOException; | |
import org.apache.avro.Schema; | |
import org.apache.avro.generic.GenericData; | |
import org.apache.avro.generic.GenericDatumReader; | |
import org.apache.avro.generic.GenericDatumWriter; | |
import org.apache.avro.generic.GenericRecordBuilder; | |
import org.apache.avro.io.BinaryDecoder; | |
import org.apache.avro.io.BinaryEncoder; | |
import org.apache.avro.io.DatumReader; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{% extends "base.html" %} | |
{% block content %} | |
<form method="post">{% csrf_token %} | |
{{ forms.subscription }} | |
<input type="submit" value="Subscribe"> | |
</form> | |
<form method="post">{% csrf_token %} | |
{{ forms.contact }} | |
<input type="submit" value="Send"> |
NewerOlder