Skip to content

Posts...

Page 15 of 49

DRF: What is 'source' in Fields?

September 30, 2017Categories: Software, Tutorial
For a couple of days I've been trying to de-serialise a JSON to a model. My problem is the model and the JSON have different fields, mainly to keep the model pythonic and independent of a specific JSON source. So... I've been trying to use the source parameter for each Field in my serialiser to…

Timestamp to DateTime Serializer Field for DRF

September 29, 2017Categories: Software, Tutorial
I'm currently trying to deserialize JSON data to a Django model. This is quite straight forward for most numeric fields, but I have a DateTime field which is stored as a timestamp in the original JSON. At first, I thought I should read the timestamp as an integer and convert it through post…

Redis on Windows - Save RDB but Not Able to Persist

September 23, 2017Categories: IT, Tutorial
TL;DR : My windows service wasn't installed properly. Change the config file to point the DB to an accessible directory and reinstall the service. When trying to build a perioduc Celery task, I got the following error with Redis on Windows (running as a windows service): redis.exceptions…

Run Celery 4.1.0 on Windows 10

September 22, 2017Categories: Software, Tutorial
TL;DR : Use set FORKED_BY_MULTIPROCESSING=1 on the worker script/shell When running Celery on Windows 10, I got the following error : ValueError: not enough values to unpack (expected 3, got 0) This is quite unfortunate as Windows is supported on "best effort". A pull request has a change, but…

Use Docker Behind Proxy on Windows 8

September 21, 2017Categories: Software, Tutorial
The other day I had to install Docker at work, aka behind a corporate proxy (on Windows 8). While the docker installer is stand-alone and all is good, dealing with the VM is a different matter... The problem popped up when I tried to create a Django image and pip install failed miserably. To get…

Vega 56 and ETH - Keep Your Cool

September 18, 2017Category: Hardware
TL;DR: Keep your Vega cool if you want high hash rates! Recently, I've got a AMD Vega RX 56, to see for myself how good it is on mining. If you ignore the power consumption, it's quicker than my RX580 cards. I'm getting 33+MH/s consistently: At the beginning of the session I even got 36MH/s, but…

Check Computer Started without Admin Provileges

September 12, 2017Categories: IT, Tutorial
TL;DR : open the Event viewer , select the Windows Logs > System and Filter Current Log to the desired interval. Or you can scroll to the earliest entry of the day you need (more irritating because the event window doesn't refresh when scrolling). The other day I needed to find out when an…

Ethereum - Fix Slow Sync

September 2, 2017Category: Tutorial
To fix the slow sync problem in the ethereum miner, you need to: backup your account(s) and application data (from the eth wallet if you're using it) remove the chaindata content via delete the directory (easiest/quickest way) use the geth removedb command to do it properly reload the database…

Mining Rig Build Log - 1

September 1, 2017Categories: Hardware, Tutorial
I've decided to join the recent trend of mining cryptocoins with GPUs. First, I got a GPU (an EVGA 1070) to complement my 970 and stuck it in my desktop. This is nowhere near profitable because I'd have to block an I7 machine to mine on 2 cards, and also get annoyed because I can't use it. also…

Convert Timestamp to DateTime for Pandas DataFrame

August 8, 2017Categories: Software, Tutorial
To convert a pandas data frame value from unix timestamp to python datetime you need to use: where: timestamp is the column containing the timestamp value unit='s' defines the unit of the timestamp (seconds in this case) You can actually replace the column altogether: Unfortunately, the…
PreviousNext

All tags