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
package main | |
import ( | |
"encoding/csv" | |
"fmt" | |
"io" | |
"io/ioutil" | |
"net/http" | |
"net/http/cookiejar" | |
"net/url" |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<title>Hospital Charges Data</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> | |
<meta charset="utf-8"> | |
<!--[if lt IE 9]> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7/html5shiv.js"></script> | |
<![endif]--> |
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
#!/usr/bin/env python2 | |
#coding=utf-8 | |
#encoding=utf-8 | |
from __future__ import division | |
from collections import Counter | |
from math import log, sqrt | |
from time import clock | |
def benchmark(func): |
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
#!/usr/bin/env python2 | |
#coding=utf-8 | |
#encoding=utf-8 | |
import logging | |
logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO) | |
from collections import OrderedDict | |
from gensim import corpora, models, similarities |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <stdbool.h> | |
int number_of_digits(int num) { | |
int count = 0; | |
for (count = 0; num != 0; count++, num /= 10); | |
return count; | |
} |
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
package main | |
import "fmt" | |
import "bufio" | |
import "os" | |
func main() { | |
src, err := os.Open("RegistryBOM") | |
if err != nil { | |
panic(err) |
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
$('#importFile').on('click', function(event) { | |
var $this = $(this); | |
var $registryFile = $('#registryFile'); | |
event.preventDefault(); | |
$.ajax({ | |
beforeSend: function(jqXHR, settings) { | |
console.log(settings); | |
$registryFile.parent('.form-group').removeClass('has-error'); | |
$registryFile.next('.help-block').text('Importing... Please wait...'); | |
$this.prop('disabled', true); |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<title>ECharts</title> | |
<!-- 来自百度CDN --> | |
</head> | |
<body> | |
<!--Step:2 Prepare a dom for ECharts which (must) has size (width & hight)--> | |
<!--Step:2 为ECharts准备一个具备大小(宽高)的Dom--> |
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
<? | |
if(file_exists('/www/global/lockdown')) { | |
if($_COOKIE['4chan_auser'] && $_COOKIE['4chan_apass'] && ($_POST['mode']=='usrdel'||$_GET['mode']=='latest')) { | |
// ok | |
} | |
else { | |
die('Posting temporarily disabled. Come back later!<br/>—Team 4chan (uptime? what\'s that?)'); | |
} | |
} | |
include_once "./yotsuba_config.php"; |
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
#!/usr/bin/env python3 | |
import random | |
from bisect import bisect | |
from itertools import accumulate | |
from collections import Counter | |
import sys | |
total = 180 | |
n = 15 |
OlderNewer