fugou : place piece "成"?
327717
def parse_fugou
      s0 = @current_pos
      s1 = parse_place
      if s1 != :failed
        s2 = parse_piece
        if s2 != :failed
          s3 = match_str("成")
          s3 = nil if s3 == :failed
          @reported_pos = s0
          s0 = { "to" => s1, "piece" => s2, "promote" => !!s3 }
        else
          @current_pos = s0
          s0 = :failed
        end
      else
        @current_pos = s0
        s0 = :failed
      end
      s0
    end
1210960
function makeRelative(location) {
		if (!location) {
			return location;
		}
		var hostName = window.location.protocol + "//" + window.location.host; //$NON-NLS-0$
		if (location.indexOf(hostName) === 0) {
			return location.substring(hostName.length);
		}
		return location;
	}
380404
def piece_at(self, square: Square) -> Optional[Piece]:
        """"""
        piece_type = self.piece_type_at(square)
        if piece_type:
            mask = BB_SQUARES[square]
            color = bool(self.occupied_co[WHITE] & mask)
            return Piece(piece_type, color)
        else:
            return None
354792
def glyphs2ufo(options):
    """"""
    if options.output_dir is None:
        options.output_dir = os.path.dirname(options.glyphs_file) or "."

    if options.designspace_path is None:
        options.designspace_path = os.path.join(
            options.output_dir,
            os.path.basename(os.path.splitext(options.glyphs_file)[0]) + ".designspace",
        )

    # If options.instance_dir is None, instance UFO paths in the designspace
    # file will either use the value in customParameter's FULL_FILENAME_KEY or be
    # made relative to "instance_ufos/".
    glyphsLib.build_masters(
        options.glyphs_file,
        options.output_dir,
        options.instance_dir,
        designspace_path=options.designspace_path,
        minimize_glyphs_diffs=options.no_preserve_glyphsapp_metadata,
        propagate_anchors=options.propagate_anchors,
        normalize_ufos=options.normalize_ufos,
        create_background_layers=options.create_background_layers,
        generate_GDEF=options.generate_GDEF,
        store_editor_state=not options.no_store_editor_state,
    )
1167047
function makeDirs(plan, dest, savedir, callback) {

  // フォルダパスのリストを作成
  let all = plan.map(file => {
    let dirname = path.dirname(path.join(savedir, dest, file)); //ファイル名を除外
    return pathcrumb(dirname);
  });

  // 配列をフラットにして重複分を排除
  let uniq = _.uniq(_.flatten(all));

  // フォルダを作成
  let shell = path.join(__dirname, '../sh/makedirs.sh');
  return exec('chmod +x ' + shell, (error, stdout, stderr) => {
    return execFile(shell, uniq, (error, stdout, stderr) => {
      if (error !== null) throw ('[Error: makeDirs makedis.sh:] ' + error);
    }).on('close', callback);
  });
}
1145354
def move_piece(self, initial, final):
        
        self.place_piece_at_square(self.piece_at_square(initial), final)
        self.remove_piece_at_square(initial)
490379
def make_hand(str)
      # Kifu for iPhoneは半角スペース区切り
      ret = { "FU" => 0, "KY" => 0, "KE" => 0, "GI" => 0, "KI" => 0, "KA" => 0, "HI" => 0 }
      return ret if str.empty?

      str.split(/[ 　]/).each do |kind|
        next if kind.empty?
        ret[kind2csa(kind[0])] = kind.length == 1 ? 1 : kan2n2(kind[1..-1])
      end

      ret
    end
1354331
function create() {
  var name = [ 'tobi', 'loki', 'jane', 'manny' ][ Math.random() * 4 | 0 ];
  var job  = jobs.create( 'video conversion', {
    title: 'converting ' + name + '\'s to avi', user: 1, frames: 200
  } );

  job.on( 'complete', function () {
    console.log( " Job complete" );
  } ).on( 'failed', function () {
    console.log( " Job failed" );
  } ).on( 'progress', function ( progress ) {
    process.stdout.write( '\r  job #' + job.id + ' ' + progress + '% complete' );
  } );

  job.save();

  setTimeout( create, Math.random() * 2000 | 0 );
}
933353
def make_result(self):
        """"""
        result = {}
        if self._base_image_build:
            result[BASE_IMAGE_KOJI_BUILD] = self._base_image_build
        if self._parent_builds:
            result[PARENT_IMAGES_KOJI_BUILDS] = self._parent_builds
        return result if result else None
522075
function make( v1, v2, v3, detail ) {

		if ( detail < 1 ) {

			var face = new THREE.Face3( v1.index, v2.index, v3.index, [ v1.clone(), v2.clone(), v3.clone() ] );
			face.centroid.addSelf( v1 ).addSelf( v2 ).addSelf( v3 ).divideScalar( 3 );
			face.normal = face.centroid.clone().normalize();
			that.faces.push( face );

			var azi = azimuth( face.centroid );
			that.faceVertexUvs[ 0 ].push( [ 
				correctUV( v1.uv, v1, azi ),
				correctUV( v2.uv, v2, azi ),
				correctUV( v3.uv, v3, azi )
			] );

		}
		else {

			detail -= 1;
			// split triangle into 4 smaller triangles
			make( v1, midpoint( v1, v2 ), midpoint( v1, v3 ), detail ); // top quadrant
			make( midpoint( v1, v2 ), v2, midpoint( v2, v3 ), detail ); // left quadrant
			make( midpoint( v1, v3 ), midpoint( v2, v3 ), v3, detail ); // right quadrant
			make( midpoint( v1, v2 ), midpoint( v2, v3 ), midpoint( v1, v3 ), detail ); // center quadrant

		}

	}
565475
function roundToWithThousands(config, num, place) {
	var newval = 1 * unFormat(config, num);
	if (typeof(newval) == "number" && place != "none") {
		if (place <= 0) {
			var roundVal = -place;
			newval = +(Math.round(newval + "e+" + roundVal) + "e-" + roundVal);
		} else {
			var roundVal = place;
			var divval = "1e+" + roundVal;
			newval = +(Math.round(newval / divval)) * divval;
		}
	}
	newval = fmtChartJS(config, newval, "none");
	return (newval);
}
1102494
def build_item(
    title, key=None, synonyms=None, description=None, img_url=None, alt_text=None
):
    """"""
    item = {
        "info": {"key": key or title, "synonyms": synonyms or []},
        "title": title,
        "description": description,
        "image": {
            "imageUri": img_url or "",
            "accessibilityText": alt_text or "{} img".format(title),
        },
    }
    return item
1125769
def construction(self, column=None, value=None, **kwargs):
        
        return self._resolve_call('GIC_CONSTRUCTION', column, value, **kwargs)
326906
function build(config, locale, done) {
  const shouldWatch = (util.env[`watch`] || util.env[`w`]) && (config.watch !== false);

  if (locale && config.i18n && (config.i18n.locales instanceof Array) && (locale === config.i18n.locales[0]))
    locale = undefined;

  config = normalizeConfig(config, locale);

  metalsmith(config.base || __dirname)
    .clean(false)
    .source(config.src)
    .ignore(config.ignore)
    .destination(config.dest)
    .metadata(config.metadata.global)
    .use(collections(config.collections))
    .use(related(config.related))
    .use((config.tags) ? tags(config.tags) : noop())
    .use(pagination(config.pagination))
    .use(metadata(config.metadata.collections))
    .use(markdown(config.markdown))
    .use(config.multilingual ? multilingual(locale) : noop())
    .use(permalinks(config.permalinks))
    .use(pathfinder(locale, config.i18n && config.i18n.locales))
    .use(layouts(config.layouts))
    .use(inPlace(config.inPlace))
    .use((config.prism !== false) ? prism(config.prism, locale) : noop())
    .use((config.mathjax !== false) ? mathjax(config.mathjax, locale) : noop())
    .use(permalinks(config.permalinks))
    .use(reporter(locale))
    .build(function(err) {
      if (err && shouldWatch) util.log(util.colors.blue(`[metalsmith]`), util.colors.red(err));
      done(!shouldWatch && err);
    });
}
185314
function(places) {

      places = Math.pow(10, places || 0);

      if (isNaN(this["n"]) || isNaN(this["d"])) {
        return new Fraction(NaN);
      }
      return new Fraction(Math.floor(places * this["s"] * this["n"] / this["d"]), places);
    }
647177
function prettifyProjection(
  longitude,
  latitude,
  proj4Projection,
  proj4longlat,
  projectionUnits
) {
  const zone = 1 + Math.floor((longitude + 180) / 6);

  const projection =
    proj4Projection + " +zone=" + zone + (latitude < 0 ? " +south" : "");

  const projPoint = proj4(proj4longlat, projection, [longitude, latitude]);

  return {
    utmZone: zone + (latitude < 0.0 ? "S" : "N"),
    north: projPoint[1].toFixed(2) + projectionUnits,
    east: projPoint[0].toFixed(2) + projectionUnits
  };
}
321866
function(g, options) {
        var compositeOperation = options.compositeOperation
                || options.composition || 'source-over';
        g.globalCompositeOperation = compositeOperation;// 
        g.fillStyle = options.fillColor || options.color;
        if (options.fillImage) {
            g.fillStyle = g.createPattern(options.fillImage, "repeat");
        }
        g.globalAlpha = options.fillOpacity || options.opacity || 0;
    }