text:
static hashfs_db_t *db;

typedef struct {
	gint op;
	gchar *name;
} hashfs_db_query_cond_t;

static hashfs_db_query_cond_t query_cond[] = {
	{ TDBQCSTREQ,         "Equals" },
	{ TDBQCSTRINC,        "Contains" },
	{ TDBQCSTRBW,         "BeginsWith" },
	{ TDBQCSTREQ,         "EndsWith" },
	{ TDBQCSTRAND,        "IncludeAll" },
	{ TDBQCSTROR,         "Include" },
	{ TDBQCSTRRX,         "Regexp" },
};

gboolean
hashfs_db_init (gboolean readonly)
{
	gchar *path;
	gint flags;
	gboolean rval;

	g_return_val_if_fail(db == NULL, FALSE);

	path = g_build_filename(g_get_user_config_dir(), "hashfs", "metadata.tct", NULL);
	flags = readonly ? TDBOREADER | TDBONOLCK : TDBOWRITER | TDBOCREAT;

	db = g_new0(hashfs_db_t, 1);
	db->tdb = tctdbnew();
	db->path = path;
	db->flags = flags;

	if (!tctdbopen(db->tdb, path, flags)) {
		HASHFS_DEBUG("Unable to open DB: %s", hashfs_db_error());

		rval = FALSE;
	} else {
		HASHFS_DEBUG("Successfully opened DB");

		rval = TRUE;
	}

	return rval;
}

static void
hashfs_db_reload (void)
{
	tctdbclose(db->tdb);
	tctdbopen(db->tdb, db->path, db->flags);
}

void
hashfs_db_destroy (void)
{
	g_return_if_fail(db != NULL);

	if (!tctdbclose(db->tdb)) {
		HASHFS_DEBUG("Unable to close DB: %s", hashfs_db_error());
	} else {
		HASHFS_DEBUG("Successfully closed DB");
	}

	tctdbdel(db->tdb);

	g_free(db->path);
	free(db);
}

gboolean
hashfs_db_tran_begin (void)
{
	HASHFS_DEBUG("Starting transsaction");

	return (gboolean) tctdbtranbegin(db->tdb);
}

gboolean
hashfs_db_tran_commit (void)
{
	HASHFS_DEBUG("Comitting transsaction");

	return (gboolean) tctdbtrancommit(db->tdb);
}

gboolean
hashfs_db_tran_abort (void)
{
	HASHFS_DEBUG("Aborting transsaction");

	return (gboolean) tctdbtranabort(db->tdb);
}

gchar *
hashfs_db_error (void)
{
	gint ecode = tctdbecode(db->tdb);

	return (gchar *) tctdberrmsg(ecode);
}

hashfs_db_entry_t *
hashfs_db_entry_new (const gchar *prefix, const gchar *id,
                     const gchar *source, const gchar *type)
{
	gchar *pkey, *md5;

	md5 = hashfs_md5_str(id);

	if (!g_strcmp0(prefix, "set"))
		pkey = g_strdup_printf("%s:%s:%s:%s", prefix, source, type, md5);
	else
		pkey = g_strdup_printf("%s:%s", prefix, md5);

	g_free(md5);

	return hashfs_db_entry_new_from_key(pkey);
}

hashfs_db_entry_t *
hashfs_db_entry_new_from_key (const gchar *pkey)
{
	hashfs_db_entry_t *entry;
	TCMAP *curdata;

	entry = g_new0(hashfs_db_entry_t, 1);
	entry->pkey = g_strdup(pkey);

	hashfs_db_reload();
	curdata = tctdbget(db->tdb, pkey, strlen(pkey));

	if (curdata != NULL)
		entry->data = curdata;
	else
		entry->data = tcmapnew();

	HASHFS_DEBUG("Created entry with pkey: %s", pkey);

	return entry;
}

void
hashfs_db_entry_set (hashfs_db_entry_t *entry, const gchar *key,
                     const gchar *value)
{
	g_return_if_fail(entry != NULL);
	g_return_if_fail(entry->data != NULL);

	tcmapput2(entry->data, key, value);
}

gboolean
hashfs_db_entry_lookup (hashfs_db_entry_t *entry, const gchar *key,
                        const gchar **out)
{
	const gchar *val;

	val = tcmapget2(entry->data, key);

	if (val == NULL)
		return FALSE;

	*out = val;

	return TRUE;
}

static gboolean
eval_cb (const GMatchInfo *info, GString *res, gpointer data)
{
	const gchar *tmp;
	gchar *match;

	match = g_match_info_fetch(info, 1);

	if (hashfs_db_entry_lookup(data, match, &tmp))
		g_string_append(res, tmp);

	g_free(match);

	return FALSE;
}

gchar *
hashfs_db_entry_format (hashfs_db_entry_t *entry, const gchar *format)
{
	GRegex *regex;
	GMatchInfo *match;
	GError *error = NULL;
	gchar *rval;

	regex = g_regex_new("\\$(\\w+)", 0, 0, &error);

	if (error) {
		HASHFS_DEBUG("Failed to create regex: %s", error->message);

		g_error_free(error);

		return NULL;
	}

	rval = g_regex_replace_eval(regex, format, -1, 0, 0, eval_cb, entry, NULL);

	g_regex_unref(regex);

	return rval;
}

const gchar *
hashfs_db_entry_pkey (hashfs_db_entry_t *entry)
{
	return entry->pkey;
}

gboolean
hashfs_db_entry_put (hashfs_db_entry_t *entry)
{
	g_return_val_if_fail(entry != NULL, FALSE);
	g_return_val_if_fail(entry->pkey != NULL, FALSE);
	g_return_val_if_fail(entry->data != NULL, FALSE);

	return (gboolean) tctdbputcat(db->tdb, entry->pkey, strlen(entry->pkey),
	                              entry->data);
}

void
hashfs_db_entry_destroy (hashfs_db_entry_t *entry)
{
	g_return_if_fail (entry != NULL);

	if (entry->data)
		tcmapdel(entry->data);

	if (entry->pkey)
		g_free(entry->pkey);

	g_free(entry);
}

static gint
hashfs_db_query_op (gchar *name)
{
	for (gint i = 0; i < LENGTH(query_cond); i++) {
		if (g_strcmp0(name, query_cond[i].name) == 0)
			return query_cond[i].op;
	}

	return -1;
}

hashfs_db_query_t *
hashfs_db_query_new (const gchar *querystr)
{
	GRegex *regex;
	GMatchInfo *match;
	GError *error = NULL;
	hashfs_db_query_t *query;

	query = g_new0(hashfs_db_query_t, 1);
	query->query = tctdbqrynew(db->tdb);

	regex = g_regex_new(HASHFS_QUERY_PATTERN, 0, 0, &error);

	if (error) {
		HASHFS_DEBUG("Failed to create regex: %s", error->message);

		g_error_free(error);

		return NULL;
	}

	g_regex_match(regex, querystr, 0, &match);
	while (g_match_info_matches(match)) {
		gchar *key = g_match_info_fetch(match, 1);
		gchar *func = g_match_info_fetch(match, 2);
		gchar *val = g_match_info_fetch(match, 3);
		gint op;

		op = hashfs_db_query_op(func);

		HASHFS_DEBUG("Adding query condition: %s.%s(%s)", key, func, val);

		if (op >= 0) {
			if (!g_strcmp0(key, "pkey"))
				tctdbqryaddcond(query->query, "", op, val);
			else
				tctdbqryaddcond(query->query, key, op, val);
		}

		g_free(key); g_free(func); g_free(val);
		g_match_info_next(match, NULL);
	}

	g_match_info_free(match);
	g_regex_unref(regex);

	return query;
}

void
hashfs_db_query_set_limit (hashfs_db_query_t *query, gint limit, gint skip)
{
	tctdbqrysetlimit(query->query, limit, skip);
}

void
hashfs_db_query_set_order (hashfs_db_query_t *query, gchar *key, gint mode)
{
	tctdbqrysetorder(query->query, key, mode);
}

hashfs_db_result_t *
hashfs_db_query_result (hashfs_db_query_t *query)
{
	hashfs_db_result_t *result;

	hashfs_db_reload();

	result = g_new0(hashfs_db_result_t, 1);
	result->list = tctdbqrysearch(query->query);

	return result;
}

hashfs_db_result_t *
hashfs_db_query_group (hashfs_db_query_t *query, const gchar *groupby)
{
	hashfs_db_result_t *newres, *origres;

	origres = hashfs_db_query_result(query);
	newres = g_new0(hashfs_db_result_t, 1);
	newres->list = tclistnew();

	for (gint i = 0; i < hashfs_db_result_num(origres); i++) {
		hashfs_db_entry_t *entry;
		const gchar *val;

		entry = hashfs_db_result_get_entry(origres, i);

		if (hashfs_db_entry_lookup(entry, groupby, &val)) {
			if (tclistlsearch(newres->list, val, strlen(val)) < 0) {
				tclistpush2(newres->list, val);
			}
		}

		hashfs_db_entry_destroy(entry);
	}

	hashfs_db_result_destroy(origres);

	return newres;
}

void
hashfs_db_query_destroy (hashfs_db_query_t *query)
{
	if (query->query)
		tctdbqrydel(query->query);

	g_free(query);
}

gint
hashfs_db_result_num (hashfs_db_result_t *result)
{
	return (gint) tclistnum(result->list);
}

hashfs_db_entry_t *
hashfs_db_result_get_entry (hashfs_db_result_t *result, gint index)
{
	const gchar *key;
	gint len;

	key = tclistval(result->list, index, &len);

	return hashfs_db_entry_new_from_key(key);
}

void
hashfs_db_result_destroy (hashfs_db_result_t *result)
{
	if (result->list)
		tclistdel(result->list);

	g_free(result);
}


text: console.log("hello foobar");

redpajama_set_name: RedPajamaGithub


text:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <glib.h>
#include <math.h>

#include "osux/beatmap.h"
#include "osux/hitobject.h"
#include "osux/timingpoint.h"
#include "osux/taiko_autoconvert.h"
#include "osux/list.h"

#define OFFSET_EQUAL_PERCENTAGE 0.05

struct taiko_slider_converter {
    osux_hitobject *ho;
    double mpb; // ms per beat
    double mpt; // ms per tick
    double length; // full length of the slider in ms, this include repetitions. Use double for more precision as a division is involved
};

//---------------------------------------------------------------

static inline int offset_eq(double o1, double o2)
{
    return fabs(1. - o1 / o2) <= OFFSET_EQUAL_PERCENTAGE;
}

static inline int offset_le(double o1, double o2)
{
    return (o1 <= o2) || offset_eq(o1, o2);
}

//---------------------------------------------------------------

// this function return the full length of the slider in ms, repetitions are included

static double ho_slider_length(
    osux_hitobject const *ho, // the slider
    osux_timingpoint const *tp, // timing_point applying on the slider
    double slider_velocity // global beatmap slider velocity
)
{
    g_assert( HIT_OBJECT_IS_SLIDER(ho) );

    if (tp->inherited)
	slider_velocity *= -100. / tp->slider_velocity_multiplier;

    return (ho->slider.length * ho->slider.repeat * tp->millisecond_per_beat)
        / (100 * slider_velocity);
}

static osux_hitobject *hitobject_move(osux_hitobject *ho)
{
    osux_hitobject *copy = g_malloc(sizeof*ho);
    *copy = *ho;
    memset(ho, 0, sizeof *ho);
    return copy;
}

//---------------------------------------------------------------

// return the newly created taiko circle!
static osux_hitobject *ho_taiko_new(
    int offset,
    osux_hitobject const *old_slider,
    int edge_hs_index
)
{
    g_assert( HIT_OBJECT_IS_SLIDER(old_slider) );
    osux_hitobject *ho = g_malloc0(sizeof*ho);

    ho->offset = offset;
    ho->end_offset = offset;
    ho->type = HITOBJECT_CIRCLE;
    ho->timingpoint = old_slider->timingpoint;

    // by default the hit_object inherit the slider global hitsound
    // when the slider has no additional hitsounds the global hitsound is kept
    ho->hitsound.sample = old_slider->hitsound.sample;

    if (old_slider->slider.edgehitsounds != NULL) {
        // if the slider has edge hitsounds the new circle inherit one of them.
        // Sometimes, the edge hitsound used may not be correspond the the0
        // circle offset. This happens, mostly,
        // with simple sliders and high tick rate.

        // Example:
        // with 1/4 (each character represent 1/4 beat) and tick rate = 4
        // Simple slider (does not repeat):
        // s----
        // Slider hitsound: (there are hitsound only at the start and the end)
        // d---k
        // Circle in taiko:
        // dkdkd
        // As you can see, the end circle is a don while the slider end
        // hitsound is a kat.

        ho->hitsound.sample =
            old_slider->slider.edgehitsounds[edge_hs_index].sample;
    }
    return ho;
}

//---------------------------------------------------------------

static void
slider_converter_init(struct taiko_slider_converter *tc,
                      osux_hitobject *ho,
                      osux_timingpoint const *tp,
                      double slider_velocity,
                      double tick_rate)
{
    memset(tc, 0, sizeof *tc);

    tc->ho = ho;
    tc->mpb = tp->millisecond_per_beat;
    tc->mpt = tc->mpb / tick_rate; // millisecond per (slider) tick
    tc->length = ho_slider_length(ho, tp, slider_velocity);
}

void taiko_slider_converter_print(struct taiko_slider_converter const *tc)
{
    fprintf(stderr, "taiko_slider_converter:\n");
    fprintf(stderr, "\toffset: %ld\n", tc->ho->offset);
    fprintf(stderr, "\tmpb: %g\n", tc->mpb);
    fprintf(stderr, "\tmpt: %g\n", tc->mpt);
    fprintf(stderr, "\tlength: %g\n", tc->length);
}

//---------------------------------------------------------------

static void slider_to_circles_normal(
    const struct taiko_slider_converter *tc, osux_list *ho_list)
{
    if (tc->length <= tc->mpt) {
	// if slider length is lower than duration of 1 (slider) tick
        // then replace the slider by two circle:
        // positions are start and end of the old slider

        osux_hitobject *ho1, *ho2;

	// start
	ho1 = ho_taiko_new(tc->ho->offset, tc->ho, 0);
	osux_list_append(ho_list, ho1);

	// end
        ho2 = ho_taiko_new(tc->ho->offset + tc->length, tc->ho, 1);
	osux_list_append(ho_list, ho2);

    } else {
        // else, the slider last for more than one tick.
	unsigned i;
        double offset;

	// add a circle for each tick, without exceeding slider length
	// But there is a small margin in the comparision, sliders are
	// considered slightly longer than they are.
	// It is quite hard to guess how peppy is computing this margin
	// so the margin used here is likely to be wrong.
	// See offset_eq and offset_le for the margin computation.
	for (i = 0, offset = 0.;
             offset_le(offset, tc->length);
             offset += tc->mpt, ++i)
        {
	    osux_hitobject *ho;

	    // The inherited hitsound is alterning between the start one (0)
	    // and the end one (1).
	    // Thus i%2 is used as the edge hitsound index.
            ho = ho_taiko_new(tc->ho->offset + offset, tc->ho, i % 2);
	    osux_list_append(ho_list, ho);
	}
    }
}

static void slider_to_circles_repeat(
    const struct taiko_slider_converter *tc, osux_list *ho_list)
{
    // compute the length in ms for the slider without repetitions
    double unit = tc->length / tc->ho->slider.repeat;

    // add one circle for each times the slider is repeated
    // circle are disposed with constant spacing ('unit')
    // so that the whole slider length is filled with circles.
    for (unsigned i = 0; i <= tc->ho->slider.repeat; i++) {
	osux_hitobject *ho;

	// the edge hitsound used is the one corresponding to the
	// i-th repeat part.
        ho = ho_taiko_new(tc->ho->offset + (i * unit), tc->ho, i);
	osux_list_append(ho_list, ho);
    }
}

//---------------------------------------------------------------

static void taiko_slider_converter_convert(
    const struct taiko_slider_converter *tc, osux_list *ho_list)
{
    if (tc->length >= 2*tc->mpb) {
        // if slider length if big enough, keep the slider
	osux_list_append(ho_list, hitobject_move(tc->ho));
    } else {
        // when the slider is too short, convert it to circles:
        // (two rules according to the slider being repeated or not)
	if (tc->ho->slider.repeat != 1)
	    slider_to_circles_repeat(tc, ho_list);
	else
	    slider_to_circles_normal(tc, ho_list);
        osux_hitobject_free(tc->ho);
    }
}

//---------------------------------------------------------------

static osux_list * taiko_autoconvert_ho_list(const osux_beatmap *bm)
{
    uint32_t current_tp = 0;
    osux_list *new_ho_list = osux_list_new(LI_FREE, g_free);

    for (uint32_t i = 0; i < bm->hitobject_count; ++i) {
	osux_hitobject *ho = &bm->hitobjects[i];

        // for each hit object
        // compute timing point applying on this hit object
	while (current_tp < (bm->timingpoint_count - 1) &&
	       bm->timingpoints[current_tp + 1].offset <= ho->offset)
	    current_tp++;

	osux_timingpoint *tp = &bm->timingpoints[current_tp];

	if (HIT_OBJECT_IS_SPINNER(ho) || HIT_OBJECT_IS_CIRCLE(ho)) {
	    // keep spinner and circle
	    osux_list_append(new_ho_list, hitobject_move(ho));
	} else if (HIT_OBJECT_IS_SLIDER(ho)) {
	    // build convert helper
	    struct taiko_slider_converter tc;
	    slider_converter_init(
		&tc, ho, tp,
		bm->SliderMultiplier, bm->SliderTickRate);

	    // convert the slider to circles
	    // the result hit objects are appended into new_ho_list
	    taiko_slider_converter_convert(&tc, new_ho_list);
	}
    }
    return new_ho_list;
}

//---------------------------------------------------------------

static osux_hitobject *osux_list_to_ho_array(osux_list const *l)
{
    osux_hitobject *array;
    unsigned size = osux_list_size(l);
    array = g_malloc(sizeof*array * size);

    for (unsigned i = 0; i < size; ++i)
	array[i] = *(osux_hitobject*) osux_list_get(l, i+1);

    return array;
}

int osux_beatmap_taiko_autoconvert(osux_beatmap *bm)
{
    if (bm->game_mode != GAME_MODE_STD)
	return -1;

    osux_list *new_ho_list;
    osux_hitobject *array;
    unsigned hitobject_count;

    new_ho_list = taiko_autoconvert_ho_list(bm);
    hitobject_count = osux_list_size(new_ho_list);
    array = osux_list_to_ho_array(new_ho_list);

    osux_list_free(new_ho_list);
    g_free(bm->hitobjects);

    bm->game_mode       = GAME_MODE_TAIKO;
    bm->hitobject_count = hitobject_count;
    bm->hitobject_bufsize = hitobject_count;
    bm->hitobjects      = array;
    osux_beatmap_prepare(bm);

    return 0;
}


text:
package org.elasticsearch.common.io.stream;

import org.apache.lucene.util.BytesRef;

import java.io.EOFException;
import java.io.IOException;

/**
 * Resettable {@link StreamInput} that wraps a byte array. It is heavily inspired in Lucene's
 * {@link org.apache.lucene.store.ByteArrayDataInput}.
 */
public class ByteArrayStreamInput extends StreamInput {

    private byte[] bytes;
    private int pos;
    private int limit;

    public ByteArrayStreamInput() {
        reset(BytesRef.EMPTY_BYTES);
    }

    public ByteArrayStreamInput(byte[] bytes) {
        reset(bytes);
    }

    @Override
    public int read() throws IOException {
        return readByte() & 0xFF;
    }

    public void reset(byte[] bytes) {
        reset(bytes, 0, bytes.length);
    }

    public int getPosition() {
        return pos;
    }

    public void setPosition(int pos) {
        this.pos = pos;
    }

    public void reset(byte[] bytes, int offset, int len) {
        this.bytes = bytes;
        pos = offset;
        limit = offset + len;
    }

    public int length() {
        return limit;
    }

    public void skipBytes(long count) {
        pos += count;
    }

    @Override
    public void close() {
        // No-op
    }

    @Override
    public int available() {
        return limit - pos;
    }

    @Override
    protected void ensureCanReadBytes(int length) throws EOFException {
        if (pos + length > limit) {
            throw new EOFException("tried to read: " + length + " bytes but only " + available() + " remaining");
        }
    }

    @Override
    public byte readByte() {
        return bytes[pos++];
    }

    @Override
    public void readBytes(byte[] b, int offset, int len) {
        System.arraycopy(bytes, pos, b, offset, len);
        pos += len;
    }
}


text:
//
//  MJHAFNetworking.h
//  MJHFoundation
//
//  Created by chni on 16/8/2.
//  Copyright © 2016年 孟家豪. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"

@interface MJHAFNetworking : NSObject

///请求成功block
typedef void (^successBlock)(NSURLSessionDataTask *task, id responseObject);

///请求失败block
typedef void (^failureBlock)(NSURLSessionDataTask *task,NSError *error);

typedef void (^formDataBlock)(id <AFMultipartFormData> formData);

typedef void (^progressBlock)(NSProgress * uploadProgress);

///创建SessionManager
+ (MJHAFNetworking *)shareMJHAFNetworking;

/**
 *  POST请求
 *
 *  @param url       网址
 *  @param parameter 参数字典
 *  @param time      请求超时时间
 *  @param success   请求成功
 *  @param failure   请求失败
 *
 */
- (NSURLSessionDataTask *)MJHPost:(NSString *)url
                        parameter:(NSDictionary *)parameter
                  timeOutInterval:(NSTimeInterval)time
                          success:(successBlock)success
                          failure:(failureBlock)failure;
/**
 *  GET请求
 *
 *  @param url       网址
 *  @param parameter 参数字典
 *  @param time      请求超时时间
 *  @param success   请求成功
 *  @param failure   请求失败
 *
 */
- (NSURLSessionDataTask *)MJHGet:(NSString *)url
                       parameter:(id)parameter
                 timeOutInterval:(NSTimeInterval)time
                         success:(successBlock)success
                         failure:(failureBlock)failure;

/**
 *  上传数据
 *
 *  @param url       网址
 *  @param parameter 参数
 *  @param time      上传时间
 *  @param dataProcessing     构造数据的地方,例:
 [formData appendPartWithFileData:imgData name:@"uploadFile" fileName:imgNameStr mimeType:@"image/jpg"];  //imgData图片数据,name上传参数名,fileName文件名
 *  @param progress   上传进度
 *  @param success   请求成功
 *  @param failure   请求失败
 *
 */
- (NSURLSessionDataTask *)MJHUploadFile:(NSString *)url
                              parameter:(NSDictionary *)parameter
                        timeOutInterval:(NSTimeInterval)time
                             uploadBody:(formDataBlock)dataProcessing
                         uploadProgress:(progressBlock)progress
                                success:(successBlock)success
                                failure:(failureBlock)failure;
@end


text:
package org.jetbrains.plugins.cbt.runner.internal

import com.intellij.execution.configurations.{ConfigurationFactory, ConfigurationType, RunConfiguration}
import com.intellij.openapi.module.Module
import com.intellij.openapi.project.Project

class CbtDebugConfigurationFactory(task: String,
                                   module: Module,
                                   configType: ConfigurationType)
  extends ConfigurationFactory(configType) {
  override def createTemplateConfiguration(project: Project): RunConfiguration =
    new CbtDebugConfiguration(task, module, project, this)
}


text:
__author__ = 'joon'

import sys

sys.path.insert(0, 'src')
sys.path.insert(0, 'lib')
sys.path.insert(0, 'ResearchTools')

from imports.basic_modules import *
from imports.ResearchTools import *
from imports.libmodules import *

def config_generate(control, conf, EXP_PHASE):
    assert (EXP_PHASE == 'guide-generate')

    assert (control['g_test_dataset'] == control['s_test_dataset'])
    assert (control['test_dataset'] == control['s_test_dataset'])
    assert (control['g_test_datatype'] == control['s_test_datatype'])
    assert (control['test_datatype'] == control['s_test_datatype'])

    control_seed = subcontrol(control, 'g')
    control_saliency = subcontrol(control, 's')

    from seed.config import config_test as config_test_seed
    from saliency.config import config_test as config_test_saliency

    control_seed, _, control_seed_token, _ = config_test_seed(control_seed, conf, 'seed-test')
    control_saliency, control_saliency_token, _ = config_test_saliency(control_saliency, conf, 'saliency-test')

    defaults = dict(
        # seed
        g_init='VGG_ILSVRC_16_layers',
        g_dataset='voc12train_aug',
        g_datatype='Segmentation',
        g_base_lr=0.001,
        g_batch_size=15,
        g_balbatch='clsbal',
        g_test_iter=8000,
        g_test_dataset='voc12train_aug',
        g_test_datatype='Segmentation',
        g_test_ranking='none',
        g_test_interpord=1,
        g_test_gtcls='use',

        # SAL
        s_net='DeepLabv2_ResNet',
        s_dataset='MSRA',
        s_datatype='NP',
        s_test_dataset='voc12train_aug',
        s_test_datatype='Segmentation',

        gtcls='use',
        seedthres=50,
        salthres=50,
        test_dataset='voc12train_aug',
        test_datatype='Segmentation',
    )

    control_token = control.copy()
    for ky in defaults:
        if control_token[ky] == defaults[ky]:
            control_token.pop(ky)

    conf['EXP_PHASE'] = EXP_PHASE
    load_pascal_conf(control, conf)

    pprint.pprint(conf)
    pprint.pprint(control)

    return control, control_token, control_seed, control_seed_token, control_saliency, control_saliency_token, conf


text:
ACCEPTED

#### According to
Index Fungorum

#### Published in
Deutschl. Fl. (Erlangen), Zweiter Theil 125 (1796)

#### Original name
Cladonia squamosa subsp. attenuata Hoffm.

### Remarks
null


text:
title: App Lab Docs
embedded_layout: simple_embedded
---

[name]

## turnTo(angle)

[/name]

[category]

Category: Turtle

[/category]

[description]

[short_description]

Changes the turtle's direction to a specific angle. 0 is up, 90 is right, 180 is down, and 270 is left.

[/short_description]

Sometimes you need to orient the turtle in a certain direction before drawing something. turnTo changes the turtle's direction to be *angle* degrees clockwise from a line pointing up. The turtle's position remains the same.

[/description]

### Examples
____________________________________________________

[example]

```
// Turtle faces right.
turnTo(90);
```

[/example]

____________________________________________________

[example]

**Example: Look South** Turtle faces down.

```
// Turtle faces down.
turnTo(180);
```

[/example]

____________________________________________________

[example]

**Example: Clock Face** Draw a minute and hour marks on a clock face

// Draw a minute and five minute marks on a clock face
for (var minute = 0; minute <= 60; minute++) {
  penUp();
  moveTo(160, 240);
  turnTo(minute*6); // Every minute is 6 degrees.
  penUp();
  if(Math.round(minute/5)*5==minute) { // Must be a five minute mark.
    moveForward(50);
    penDown();
    moveForward(25);
  }
  else {
    moveForward(70);
    penDown();
    moveForward(5);
  }
}

[/example]

____________________________________________________

[syntax]

### Syntax

```
turnTo(angle);
```

[/syntax]

[parameters]

### Parameters

| Name  | Type | Required? | Description |
|-----------------|------|-----------|-------------|
| angle | number | Yes | The angle to point the turtle.  |

[/parameters]

[returns]

### Returns
No return value. Rotates turtle only.

[/returns]

[tips]

### Tips
- You can specify a negative angle to rotate to, measured counterclockwise from up (0 angle).
- There are three ways to rotate the turtle in place
	- turnRight(*angle*) - Rotates the turtle right **by** the specified angle relative to the current turtle direction. The turtle's position remains the same.
	- turnLeft(*angle*) - Rotates the turtle left **by** the specified angle relative to the current turtle direction. The turtle's position remains the same.
	- turnTo(*angle*) - Rotates the turtle **to** a specific angle. 0 is up, 90 is right, 180 is down, and 270 is left. The turtle's position remains the same.

[/tips]

[bug]

Found a bug in the documentation? Let us know at documentation@code.org

[/bug]

<%= view :applab_docs_common %>


text:
require "nizicon/version"
require "nizicon/core"
require "nizicon/members"

module Nizicon
  def self.core
    Nizicon::Core.instance
  end
end

module Nizicon
  def self.method_missing(name, *args, &block)
    Nizicon.core.send(name, *args, &block)
  end

  def self.name
    Nizicon.core.name
  end

  def self.to_s
    Nizicon.core.name
  end
end