Download from here:
MD5: 59bab8f71f8c096cd3f72cd73851515d
Rename it to: Sublime Text
Make it executable with: chmod u+x Sublime\ Text
Download from here:
MD5: 59bab8f71f8c096cd3f72cd73851515d
Rename it to: Sublime Text
Make it executable with: chmod u+x Sublime\ Text
| #!/usr/bin/al | |
| // Inspired by JavaScript, Java, Groovy, Ceylon, Swift, C, C++, D, and whatever else. | |
| // We need closures! | |
| namespace test; | |
| // It's redundant, I know. Trying to set an example for the stdlib. | |
| import std.datatypes.{String, Integer, Float, Double}; | |
| import std.Process; |
| class FutureGroup { | |
| Completer _completer = new Completer(); | |
| List<Future> _futures = new List<Future>(); | |
| FutureGroup(); | |
| bool add(Future future) { | |
| if(!_futures.contains(future)) { | |
| _futures.add(future); | |
| return true; |
| part of dartboard; | |
| class FutureGroup<E> { | |
| Completer<E> _completer = new Completer<E>(); | |
| Set<Future<E>> _futures = new Set<Future<E>>(); | |
| bool add(Future<E> future) => _futures.add(future); | |
| Future<List<E>> wait() { | |
| Future.wait(_futures).then((result) => _completer.complete(result)) |
| Future<String> getString(Uri uri) { | |
| return new HttpClient().getUrl(uri) | |
| .then((HttpClientRequest request) => request.close()) | |
| .then((HttpClientResponse response) => response.transform(UTF8.decoder).join()); | |
| } |
| import numpy as np | |
| from scipy.sparse import csc_matrix | |
| def pageRank(G, s = .85, maxerr = .001): | |
| """ | |
| Computes the pagerank for each of the n states. | |
| Used in webpage ranking and text summarization using unweighted | |
| or weighted transitions respectively. |
| library manager; | |
| import "dart:io"; | |
| import "package:irc/irc.dart" show Color; | |
| import 'package:polymorphic_bot/api.dart'; | |
| BotConnector bot; | |
| EventManager eventManager; |
| import "dart:async"; | |
| import "dart:io"; | |
| import "dart:math"; | |
| String generateToken(int length) { | |
| var r = new Random(); | |
| var buffer = new StringBuffer(); | |
| for (int i = 1; i <= length; i++) { | |
| if (r.nextBool()) { | |
| String letter = alphabet[r.nextInt(alphabet.length)]; |
| // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | |
| // for details. All rights reserved. Use of this source code is governed by a | |
| // BSD-style license that can be found in the LICENSE file. | |
| // Javascript preamble, that lets the output of dart2js run on V8's d8 shell. | |
| // Node wraps files and provides them with a different `this`. The global | |
| // `this` can be accessed through `global`. | |
| var self = this; |
| !/bin/bash | |
| # travis_ssh_key_encrypt_for_mac.ssh | |
| # Encrypts private SSH keys for use in .travis.yml. | |
| # Based on the excellent linux version: | |
| # https://gist.github.com/lukewpatterson/4242707 | |
| # Also see the travis documentation: | |
| # http://docs.travis-ci.com/user/build-configuration/#Secure-environment-variables | |
| # Usage: | |
| # Go to your git project: |