Skip to content

Instantly share code, notes, and snippets.

View gdchamal's full-sized avatar

Aymeric Barantal gdchamal

View GitHub Profile
class DeviceLocation(BaseModel):
"""Device defined location, based on IP address."""
user_id = columns.UUID(primary_key=True)
device_id = columns.UUID(primary_key=True)
address = columns.Text(primary_key=True) # IP address with CIDR
type = columns.Text() # home/work/etc
country = columns.Text()
class PublicKey(BaseModel):
"""Contact public cryptographic keys model."""
user_id = columns.UUID(primary_key=True)
resource_id = columns.UUID(primary_key=True) # clustering key
key_id = columns.UUID(primary_key=True) # clustering key
resource_type = columns.Text()
label = columns.Text()
(.venv) tao~/dev/caliopen/go/src/github.com/CaliOpen/Caliopen/src/frontend/web_application(master↑1|✚2…) % yarn
yarn install v1.2.1
[1/4] Resolving packages...
warning Resolution field "[email protected]" is incompatible with requested version "react@^15.6.1"
warning Resolution field "[email protected]" is incompatible with requested version "react-dom@^15.6.1"
[2/4] Fetching packages...
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
info [email protected]: The platform "linux" is incompatible with this module.
info "[email protected]" is an optional dependency and failed compatibility check. Excluding it from installation.
@gdchamal
gdchamal / cqlengine_get_error.md
Created July 3, 2016 11:36
cassandra.cqlengine.models.Model and get() exception for a deferred field
from cassandra.cqlengine import connection
from cassandra.cqlengine.management import create_keyspace_simple, sync_table

connection.setup(['127.0.0.1'], 'test')
create_keyspace_simple('test', 1)

from cassandra.cqlengine.models import Model, columns

In [25]: res.json()
Out[25]:
{'contact': {'additional_name': None,
'addresses': [],
'avatar': 'avatar.png',
'contact_id': 'bd724ec9-2746-4cf3-be11-eed0ed88d6e5',
'date_insert': '2015-12-19T12:15:50.284000',
'date_update': None,
'deleted': 0,
'emails': [],
Verifying that +chamal is my blockchain ID. https://onename.com/chamal
@gdchamal
gdchamal / gist:0b5cdd8f20a1ce74008e
Created January 21, 2015 13:16
load Interfaces
from caliopen.config import Configuration
from caliopen.core.config import includeme
pwd = os.path.dirname(os.path.realpath(__file__))
DEFAULT_CONFIG_FILE = '%s/../../../../config/caliopen.yaml.template' % pwd
Configuration.load(os.environ.get('CALIOPEN_CONFIG', DEFAULT_CONFIG_FILE),
'global')
includeme()

Keybase proof

I hereby claim:

  • I am gdchamal on github.
  • I am chamal (https://keybase.io/chamal) on keybase.
  • I have a public key whose fingerprint is 3A11 7218 7EF7 406F CBCE CFA6 0E68 C4F8 5D04 D8FC

To claim this, I am signing this object:

@gdchamal
gdchamal / gist:0fcfa10a38b3b5eb2b31
Created September 29, 2014 19:56
Draft caliopen architecture

Caliopen Architecture Guide

Context

Caliopen in this document refer to the technical messaging infrastructure developed to achieve Caliopen project aims.

Caliopen is designed as a scalable online platform for management of messages in many protocols. Mail and related protocols are the first implementation.

@gdchamal
gdchamal / gist:d5a41a384678bedf0141
Created September 3, 2014 13:50
Vagrant box diff to make backends start having enough memory
(.env)[mric@zen vagrant]$ diff Vagrantfile Vagrantfile.update
48c48
< # config.vm.provider "virtualbox" do |vb|
---
> config.vm.provider "virtualbox" do |vb|
53,54c53,54
< # vb.customize ["modifyvm", :id, "--memory", "1024"]
< # end
---
> vb.customize ["modifyvm", :id, "--memory", "2048"]