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
asdfasfd |
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
version: '3.1' | |
services: | |
drupal: | |
image: drupal:7.67-apache | |
ports: | |
- 80:80 | |
- 443:443 | |
volumes: |
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 date, timedelta | |
import random | |
import logging | |
from farmOS import farmOS | |
f = farmOS('tilth2019.farmos.net', 'paul', 'password') | |
log_name = 'Egg Collection' | |
log_type = 'farm_harvest' |
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 date, timedelta | |
import os | |
import random | |
import math | |
os.environ['OAUTHLIB_INSECURE_TRANSPORT'] = '1' | |
from farmOS import farmOS | |
farm = farmOS(hostname='http://localhost', username='user', password='pass', client_id='farm', scope='user_access') |
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
farm = farmOS(hostname=hostname, username=username, password=password) | |
test_log_done = {'name':'This is log is done', 'type':'farm_observation','done': 1} | |
test_log_not_done = {'name':'This is log is NOT done', 'type':'farm_observation', 'done': 0} | |
farm.log.send(test_log_done) | |
farm.log.send(test_log_not_done) | |
all_logs = farm.log.get() | |
for log in all_logs['list']: |
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
[ | |
{ | |
"id": "58ff452f.d398fc", | |
"type": "tab", | |
"label": "Test farmOS Flow", | |
"disabled": false, | |
"info": "" | |
}, | |
{ | |
"id": "4e4527de.360678", |
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
[ | |
{ | |
"id": "58ff452f.d398fc", | |
"type": "tab", | |
"label": "Test farmOS Flow", | |
"disabled": false, | |
"info": "" | |
}, | |
{ | |
"id": "9793e818.72b8b8", |
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 farmosaggregator import Tracker | |
# Define a tracker that inherits from the Aggregator Tracker base class | |
class SpinachStudy(Tracker): | |
def __init__(self): | |
self.name = "Spinach Study Tracker" | |
self.description = "Aggregate spinach plantings and field data for analysis." | |
def get_farm_data(self, farmos_client): | |
# this list represents one farm's data for the study |
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
/** | |
* Implements hook_init(). | |
* | |
* Performs a user login from the User ID of the Authentication Token. | |
*/ | |
function restws_oauth2_server_init() { | |
// Load the OAuth2 Server and Scope that are to be authenticated against. | |
$server_name = variable_get('restws_oauth2_server_name', FALSE); | |
$scope_name = variable_get('restws_oauth2_server_scope', FALSE); |
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
// This file should be in a ~/dist directory (can't show directories in gists) | |
// Field Module Code here |
OlderNewer