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
import json | |
from panel.auth import LogoutHandler | |
from panel.io.resources import BASIC_LOGIN_TEMPLATE, CDN_DIST | |
from panel.util import base64url_encode | |
from bokeh.server.auth_provider import AuthProvider | |
from tornado.web import RequestHandler | |
from tornado.escape import url_escape |
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
<link rel="import" href="../paper-tabs/paper-tabs.html"> | |
<link rel="import" href="../paper-tabs/paper-tab.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; |
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
@Override | |
public boolean onItemUse(ItemStack itemStack, EntityPlayer entityPlayer, World world, int par4, int par5, int par6, int par7, float par8, float par9, float par10) { | |
if (Minecraft.getMinecraft().objectMouseOver.entityHit != null) { | |
System.out.println(Minecraft.getMinecraft().objectMouseOver.entityHit); | |
return true; | |
} else { | |
return 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
import urllib2 | |
#GitHub's API url | |
github_url = "https://api.github.com/" | |
#Release URL | |
github_release = "repos/<user>/<repo>/releases" | |
#Request info about releases from GitHub | |
response = urllib2.urlopen(github_url + github_release) |
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
@Override | |
protected void drawGuiContainerForegroundLayer(int x, int y) { | |
String containerName = StatCollector.translateToLocal(techTable.getInventoryName()); | |
fontRendererObj.drawString(containerName, ((xSize / 2) - (fontRendererObj.getStringWidth(containerName) / 2)), 6, 0x404040); | |
fontRendererObj.drawString(StatCollector.translateToLocal("container.inventory"), 8, ySize - 94, 0x404040); | |
renderItems(); | |
} |
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
@Override | |
public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { | |
for (int i = 1; i <= 16; i++) { | |
for (int j = 1; j <= 16; j++) { | |
int coordinateX = chunkX*16 + i; | |
int coordinateZ = chunkZ*16 + j; | |
int coordinateY = (int)Math.round((Math.cos(0.05 * coordinateX)) * 32) + 64; | |
world.setBlock(coordinateX, coordinateY, coordinateZ, 5); | |
} | |
} |