-
How to add Tags from the Command Line
- maven run python trackmaven/manage.py create_test_tags --ws= 1 --tags=77 --num=1000
- this will add tweet objects to the es_index
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
python manage.py sqlclear myapp auth sites sessions contenttypes | sed 's/";/" CASCADE;/' | python manage.py dbshell |
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 CityAndStateInputMixin(object): | |
def __init__(self, *args, **kwargs): | |
super(CityAndStateInputMixin, self).__init__(*args, **kwargs) | |
#add custom error_class | |
self.error_class = CustomListError | |
#adding State Selct Widget and dynamic css edits | |
self.fields['state'] = forms.ChoiceField(choices=US_STATES, | |
widget=StateSelectWidget) |
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
body = { | |
"aggs" : { | |
"hashtags" : { | |
"terms" : { | |
"field" : "hashtags", | |
"size": 0 | |
} | |
} | |
} | |
} |
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
# you can override this using by setting a system property, for example -Des.logger.level=DEBUG | |
es.logger.level: INFO | |
rootLogger: ${es.logger.level}, console, file | |
logger: | |
# log action execution errors for easier debugging | |
action: DEBUG | |
# reduce the logging for aws, too much is logged under the default INFO | |
com.amazonaws: WARN | |
# gateway |
I hereby claim:
- I am nearhan on github.
- I am nearhan (https://keybase.io/nearhan) on keybase.
- I have a public key whose fingerprint is E0C0 DBED DE06 6619 DE1A 9046 AFBB 0235 3BF3 88AB
To claim this, I am signing this object:
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
<?xml version="1.0" encoding="UTF-8" ?> | |
<Response> | |
<Say>I will pause 10 seconds starting now!</Say> | |
<Pause length="10"/> | |
<Say>I just paused 10 seconds</Say> | |
</Response> |
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
from datadog import statsd | |
statsd.increment('test.test.test') | |
statsd.event('This is a test Event', 'This is a a Test Event') |
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
package main | |
import ( | |
"encoding/json" | |
"fmt" | |
"io/ioutil" | |
"net/http" | |
"sync" | |
) |
OlderNewer