Skip to content

Instantly share code, notes, and snippets.

[Jun 27 15:34:27.967] Initializing community_wsgi.ini from community_wsgi.ini.sample
[Jun 27 15:34:27.972] Initializing tool_parameters_conf.xml from tool_parameters_conf.xml.sample
[Jun 27 15:34:27.975] Initializing external_service_types_conf.xml from external_service_types_conf.xml.sample
[Jun 27 15:34:28.104] Initializing reports_wsgi.ini from reports_wsgi.ini.sample
[Jun 27 15:34:28.107] Initializing shed_tool_conf.xml from shed_tool_conf.xml.sample
[Jun 27 15:34:28.111] Initializing tool_conf.xml from tool_conf.xml.sample
[Jun 27 15:34:28.242] Initializing tool_sheds_conf.xml from tool_sheds_conf.xml.sample
[Jun 27 15:34:28.246] Initializing openid_conf.xml from openid_conf.xml.sample
[Jun 27 15:34:28.382] Initializing tool-data/add_scores.loc from add_scores.loc.sample
[Jun 27 15:34:28.385] Initializing tool-data/alignseq.loc from alignseq.loc.sample
import pandas as pd
import os
import re
def df_for_all_houses(year, month):
"""month: number"""
dir_name = 'A-{0}-{1:02d}'.format(year, month)
dir_path = 'Home Group A/{0}'.format(dir_name)
use_series = {}
for entry in os.listdir(dir_path):
from netCDF4 import Dataset
ds = Dataset('Wheat.NetCDF')
ds
hwam = ds.variables['HWAM']
hwam.dimensions
hwam.shape
data = hwam[:]
reshaped = data.reshape(150, 8)
reshaped
import pandas as pd
def write_to_db(conn, file):
df = pd.read_csv(file, parse_dates=[1])
df2 = df.rename(columns={'dataid': 'house_id', 'use': 'total_energy'})
df3 = df2.fillna(0)
df3.utc = df3.utc.map(str)
sql.write_frame(df3, con=conn, name='readings', if_exists='append', flavor='mysql')
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
// Java
class Point {
int x;
int y;
public Point(int x, int y) {
x
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
def make_table(locations, variable):
columns = {}
for location in locations:
path = "C:\Users\Diego.Diego-PC\Documents\RDCEP\Experiments\DSSAT Outputs\\" + location + '.dssat_output'
table = pd.read_csv(path, skiprows=3, sep=' ', skipinitialspace=1)
columns[location] = table[variable]
return pd.DataFrame(data=columns)
# primitives
def literal(lit):
def parse(input):
if len(input) > 0 and input[0] == lit:
return input[1:]
else:
return False
return parse
Traceback (most recent call last):
File "/nfs/software/galaxy-es/galaxy/lib/galaxy/jobs/runners/condor.py", line 108, in queue_job
job_wrapper.prepare()
File "/nfs/software/galaxy-es/galaxy/lib/galaxy/jobs/__init__.py", line 187, in prepare
config_filenames = self.tool.build_config_files( param_dict, self.working_directory )
File "/nfs/software/galaxy-es/galaxy/lib/galaxy/tools/__init__.py", line 2443, in build_config_files
f.write( fill_template( template_text, context=param_dict ) )
File "/nfs/software/galaxy-es/galaxy/lib/galaxy/util/template.py", line 9, in fill_template
return str( Template( source=template_text, searchList=[context] ) )
File "/nfs/software/galaxy-es/galaxy/eggs/Cheetah-2.2.2-py2.7-linux-x86_64-ucs4.egg/Cheetah/Template.py", line 1004, in __str__