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
| sudo apt-get install libssl-dev libwxgtk3-dev freeglut3dev |
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
| sudo apt-get install libxcb1-dev libxcb-keysyms1-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev \ | |
| libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-xinerama0-dev libpango1.0-dev \ | |
| libxcursor-dev libxcb-cursor-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev |
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
| BinAccessToken = list_to_binary(httpc_uri:encode(AccessToken)), | |
| Body = <<"--", Boundary/binary, ?CRLF, | |
| "Content-Disposition: form-data; name=\"access_token\"", ?CRLF, | |
| ?CRLF, | |
| BinAccessToken,?CRLF, | |
| --", Boundary/binary, ?CRLF, | |
| "Content-Disposition: form-data; name=\"", BinFieldName/binary, | |
| "\"; filename=\"", BinFileName/binary, "\"", ?CRLF, | |
| "Content-Type: application/octet-stream", ?CRLF, | |
| ?CRLF, |
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
| #! /usr/bin/env escript | |
| %% 2014, @tklx | |
| -define(SERVER_URL, "http://127.0.0.1:5000/"). | |
| -define(CRLF, "\r\n"). | |
| main([]) -> | |
| io:format("Usage: upload file1 file2...~n"); | |
| main(Args) -> |
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 time | |
| import unittest | |
| from selenium import selenium | |
| # Select Firefox as the browser | |
| # (Note that this is not Google's Chrome) | |
| BROWSER = '*chrome' | |
| SITE_URL = 'http://en.wikipedia.org' | |
| class WikipediaSeleniumTest(unittest.TestCase): |
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 Nearestneighbor: | |
| def __init__(self, dists): | |
| self.__dists = dists | |
| self.dimension = dists.shape[0] | |
| def construct(self, startcity = None): | |
| if startcity is None: | |
| self.startcity = rnd.randint(self.dimension) | |
| else: self.startcity = startcity |
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
| def nearestneighbor(size, dists): | |
| tour = [0]*size | |
| candy = [True]*size | |
| candy[0] = False | |
| for i in range(1, size): | |
| prev = tour[i - 1] | |
| tour[i] = min([(dists[prev][c], c) | |
| for c in range(size) if candy[c] and c != prev])[1] | |
| candy[tour[i]] = 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
| # infixoop.mar | Converts an infix expression into postfix | |
| # This implementation uses the object data as a hash-table | |
| # for operator precedence. | |
| "listop forth dequeop" use | |
| @@Infix | |
| @new # define the hash-table for operator precedence | |
| 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
| # infix.mar | Converts an infix expression into postfix | |
| # This implementation uses the global variable space as a hash-table | |
| # for operator precedence. | |
| "listop forth dequeop" use | |
| @|> globs & pushfrom ; | |
| @string dfront NONE = |
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
| package main | |
| import "fmt" | |
| import "http" | |
| import "os" | |
| import "bytes" | |
| import "regexp" | |
| import "strings" | |
| import "container/vector" | |
| import "flag" |