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
content = { | |
"physician_id": "testId", | |
"patient_birth_date": "1937-06-19", | |
"observation": "The patient was ok.", | |
"visit_date": "2015-02-19T16:39:47.807000" | |
} | |
document = chino.documents.create(schema_id, content) | |
document_id = document._id |
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
structure = [{ | |
"name": "physician_id", "type": "string", "indexed":True | |
},{ | |
"name": "patient_birth_date","type": "date", "indexed":True | |
},{ | |
"name": "observation","type": "string","indexed":True | |
},{ | |
"name": "visit_date","type": "datetime","indexed":True | |
}] | |
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
repository = chino.repositories.create('description') | |
repository_id = repository._id |
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
#step 1: install library | |
(sudo) pip install git+https://github.com/chinoio/chino-python.git | |
#step 0 create chino wrapper | |
from chino.api import ChinoAPIClient | |
customer_id="<your custimer id>" | |
customer_key="<your cutomer key>" | |
url = "https://api.test.chino.io" | |
chino = ChinoAPIClient(customer_id=customer_id, customer_key=customer_key,url=url) |
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
#replace xoxp-*****000 with your token from here https://api.slack.com/web#authentication | |
# for the start | |
do shell script "curl 'https://slack.com/api/dnd.setSnooze?token=xoxp-*****000&num_minutes=$duration'" | |
# for the end and interuption | |
do shell script "curl https://slack.com/api/dnd.endSnooze?token=xoxp-*****000" |
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
List of things worth to share about many things. | |
Video: | |
Randy Pausch Last Lecture: Achieving Your Childhood Dreams - https://www.youtube.com/watch?v=ji5_MqicxSo - One of the best video on youtube | |
Randy Pausch Time Managment - https://www.youtube.com/watch?v=oTugjssqOT0 | |
CtizenFour: kind of mind blowing. It's the story of "ed" | |
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
angular.module('gcCoachApp') | |
.controller('GcCourseFormCtrl', function ($scope, gcResourceCourses, $stateParams, gettext, $timeout) { | |
//... | |
$scope.editFn = function (course) { | |
$scope.edit = true; | |
//this is to overcome the problem in conversion. | |
//in this way we fake the conversion. | |
//we fill in the data that are shown in the form. | |
$scope.course._endDate = new Date(course.endDate); | |
$scope.course._startDate = new Date(course.startDate); |
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
{ | |
"results":[{"name":"item1"},{"name":"item2"},{"name":"item3"},{"name":"item4"},{"name":"item5"},{"name":"item6"},{"name":"item7"},{"name":"item8"}], | |
"total":8 | |
} |
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
http://127.0.0.1:8080/clubs?size=2 | |
{ | |
"nexPage": "E-ABAIICJ2oSZGV2fmZpbmUtcHJpZGUtNzMzchELEgRDbHViGICAgICAgIAJDIgCABQ=", | |
"total": 4, | |
"items": [ | |
{ | |
"description": "desc", | |
"id": 4785074604081152, |
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 datetime import datetime | |
import random | |
#user id | |
userId=122 | |
sessionId = 143 #141 #142 #143 | |
# this is needed to keep track of the new ids we create and use them in the indicator_measure | |
ids = [] | |
id = int(datetime.utcnow().strftime("%s")) |