I hereby claim:
- I am rakanalh on github.
- I am rakanalh (https://keybase.io/rakanalh) on keybase.
- I have a public key ASCHbbaYDO4B663F3SbierImAoufooIdWudvhmKxMCr5jQo
To claim this, I am signing this object:
""" | |
What you have to do to use this is extending BaseItem rather than extending DjangoItem because DjangoItem looks for _meta.fields and ignores _meta.many_to_many. | |
This will handle the ManyToMany fields in your model. So you have to scrape the data using DDS and return an Item that contains the ManyToMany field but as a list []. | |
The BaseItem class will basically call a function in your Item class named save_%s_values for each ManyToMany field. So if your ManyToMany field is called | |
photos, you'll have to have a method called save_photos_values which accepts the model, the model_field and the list of values. Example: | |
def save_photos_values(self, model, model_field, values): | |
for value in values: | |
image_filename = settings.IMAGES_STORE + value['path'] | |
image = create_and_save_image_from_file(model.title, image_filename) | |
model_field.add(image) |
# Hacky script for downloading videos from PyVideo and converting them to m4v | |
# format so they can be synced onto your apple device. Useful if you | |
# want to see everything that happened at PyCon while commuting. | |
# This version supports the new PyVideo.org website | |
# | |
# Requirements: | |
# * pip install requests BeautifulSoup | |
# * youtube-dl (from https://github.com/rg3/youtube-dl/) - you can execute | |
# pip install youtube-dl to install it | |
# This was the only YouTube downloader I found that worked. It doesn't |
#!/usr/bin/env python | |
""" | |
This script compiles and installs Python3 on your CentOS server. | |
Built based on the steps described by Digital Ocean (https://www.digitalocean.com/community/tutorials/how-to-set-up-python-2-7-6-and-3-3-3-on-centos-6-4) | |
""" | |
import os | |
import subprocess |
# -*- coding: utf-8 -*- | |
"""Add permissions for proxy model. | |
This is needed because of the bug https://code.djangoproject.com/ticket/11154 | |
in Django (as of 1.6, it's not fixed). | |
When a permission is created for a proxy model, it actually creates if for it's | |
base model app_label (eg: for "article" instead of "about", for the About proxy | |
model). |
(defun close-all-buffers () | |
(interactive) | |
(mapc 'kill-buffer (buffer-list))) | |
(defun persp/get-root (branch-name) | |
(let ((current-project (projectile-project-name))) | |
(message current-project) | |
(message branch-name) | |
(if (and (not current-project) (not branch-name)) | |
(error "Could not find persp root")) |
######################################### | |
unmapAll # Use Emacs-style bindings only. | |
######################################### | |
# Modifier Keys w/ Emacs Terminology: | |
# `<c-*>` = ⌃ Control Key; i.e. `C-*`. | |
# `<a-*>` = ⌥ Meta Key (Alt/Option); i.e. `M-*`. |
I hereby claim:
To claim this, I am signing this object:
from eth_utils import to_canonical_address | |
from raiden.storage import serialize, sqlite | |
from raiden.storage.wal import WriteAheadLog | |
from raiden.transfer import channel, node, views | |
from raiden.transfer.architecture import StateManager | |
serializer = serialize.JSONSerializer() | |
2018-11-27 11:32:41 [debug ] JSONRPCClient created [raiden.network.rpc.client] available_nonce=3 client=Parity-Ethereum//v2.1.6-stable-491f17f149-20181114/x86_64-linux-gnu/rustc1.30.1 node=9734bc77 | |
Raiden is running in production mode | |
You are connected to the '17' network and the DB path is: /home/rakan/.raiden/node_9734bc77/netid_17/network_7098b039/v14_log.db | |
2018-11-27 11:32:41 [debug ] Fetching available matrix servers [raiden.ui.app] available_servers=['https://raidentransport.exchangeunion.com', 'https://persephone.raidentransport.digitalvirtues.com', 'https://raidentransport.ki-decentralized.com', 'https://raidentransport.mycryptoapi.com'] | |
2018-11-27 11:32:41 [debug ] Restoring from snapshot [raiden.storage.wal] from_state_change_id=1000 to_state_change_id=latest | |
2018-11-27 11:32:41 [debug ] Replaying state changes [raiden.storage.wal] num_state_changes=61 | |
2018-11-27 11:32:41 [debug ] Restored state from WAL [raiden.raiden_service] last_restored_block=1374 |
2018-11-27 13:18:55 [debug ] JSONRPCClient created [raiden.network.rpc.client] available_nonce=0 client=Parity-Ethereum//v2.1.6-stable-491f17f149-20181114/x86_64-linux-gnu/rustc1.30.1 node=7dfc0dd6 | |
Raiden is running in production mode | |
You are connected to the '17' network and the DB path is: /home/rakan/development/raiden/local/production/0x00a329c0648769A73afAc7F9381E08FB43dBEA72/data/node_7dfc0dd6/netid_17/network_acd2ed44/v14_log.db | |
2018-11-27 13:18:55 [debug ] Fetching available matrix servers [raiden.ui.app] available_servers=['https://raidentransport.exchangeunion.com', 'https://persephone.raidentransport.digitalvirtues.com', 'https://raidentransport.ki-decentralized.com', 'https://raidentransport.mycryptoapi.com'] | |
2018-11-27 13:18:59 [debug ] Matrix homeserver RTT times [raiden.network.transport.matrix] rtt_times=[('https://raidentransport.ki-decentralized.com', 0.03457166666666667), ('https://persephone.raidentransport.digitalvirtues.com', 0.03535733333333333), ('https://raidentr |