This file contains hidden or 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
| augroup VimjectsAutogroup | |
| au BufNewFile,BufRead .vimjectrc* setlocal ft=vim | |
| au VimEnter call vimjects#source("") | |
| au VimEnter let g:kdsfjdfksdfjsfj = "hello" | |
| au BufReadPre call vimjects#source("") | |
| augroup end |
This file contains hidden or 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
| class PlanDatesTest extends PHPUnit_Framework_TestCase | |
| { | |
| public function testDateDisplay() { | |
| $this->assertEquals(PlanDates::dateDisplay(1438198178), "July 29, 2015"); | |
| $this->assertEquals(PlanDates::dateDisplay("2015-03-7"), "March 7, 2015"); | |
| } | |
| public function testYearStart() { | |
| $this->getMock('Util', array("isGrad")); |
This file contains hidden or 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
| function safeCreateDir($dir, $exit = true) { | |
| if (!file_exists($dir)) { | |
| if (!mkdir($dir, 0700, true)) { | |
| $processUser = posix_getpwuid(posix_geteuid()); | |
| error_log($dir." ".implode($processUser)); | |
| if ($exit) { | |
| debugMail('failed to create dir: ' . $dir, true); | |
| } | |
| return false; | |
| } |
This file contains hidden or 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
| users | |
| primary key | |
| human/zombie/dead | |
| npc? | |
| admin? | |
| star timer | |
| name | |
| living area | |
| handle | |
| Facebook account |
This file contains hidden or 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 will make a single serving of an "Oatmeal in a Cup". Its taste and texture is similar to a muffin or a baked oatmeal dish. | |
| 1/2 cup of quick cook oatmeal | |
| 1/2 cup of milk | |
| 1 egg | |
| 1/3 apple, chopped | |
| 1/3 bannana | |
| a generous dash of cinnamon | |
| 1 teaspoon of honey |
This file contains hidden or 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
| function BayesNet(vars) { | |
| this.variables = {}; | |
| this.numVars = Object.keys(this.variables).length; | |
| for (v in vars) { | |
| this.variables[v] = new BayesNode(vars[v]); | |
| this.variables[v].CPTorder = this.generateDomainRows(vars[v].parents); | |
| this.variables[v].fullCPT = {}; | |
| this.variables[v].blocks = false; | |
| } | |
| for (v in vars) { |
This file contains hidden or 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
| function BayesNet(vars) { | |
| this.variables = {}; | |
| this.numVars = Object.keys(this.variables).length; | |
| for (v in vars) { | |
| this.variables[v] = new BayesNode(vars[v]); | |
| this.variables[v].CPTorder = this.generateDomainRows(this.variables[v].parents); | |
| this.variables[v].fullCPT = {} | |
| for (var i = 0; i < this.variables[v].CPTorder.length; i++) { | |
| this.variables[v].fullCPT[this.variables[v].CPTorder[i]] = this.variables[v].CPT[i]; | |
| } |
This file contains hidden or 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 urllib3 | |
| import re | |
| import us | |
| import string | |
| import json | |
| http = urllib3.PoolManager() | |
| req = http.request('get', "http://icanhazip.com") | |
| ip = req.data[:-1] | |
| req = http.request('GET', 'http://api.ipinfodb.com/v3/ip-city/?key=APIKEY&ip=' + ip) |
NewerOlder