sudo -i
PIP_REQUIRE_VIRTUALENV=false pip uninstall virtualenv
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
| declare global { | |
| interface Array<T> { | |
| sortBy(selector: (elem: T) => any): T[]; | |
| } | |
| } | |
| if (!Array.prototype.sortBy) { | |
| Array.prototype.sortBy = function <T>(selector: (elem: T) => any): T[] { | |
| return this.sort((a, b) => { | |
| return selector(a) < selector(b) ? -1 : 1; |
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
| const http = require('http'); | |
| const url = require('url'); | |
| const path = require('path'); | |
| const fs = require('fs'); | |
| function wget(source, { onStart, onProgress } = {}) { | |
| return new Promise(function(y, n) { | |
| const output = path.basename(url.parse(source).pathname); | |
| const req = http.request(source, |
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
| #!/bin/sh | |
| # v = verbose | |
| # z = reduce the network transfer by adding compression | |
| # P = combines the flags --progress and --partial. | |
| # The first of these gives you a progress bar for the transfers and the second allows you to resume interrupted transfers | |
| rsync -vzP ftp.edrdg.org::nihongo/JMdict_e . |
Was facing this stupid error message:
~/anaconda3 ❯❯❯ bin/conda install tensorflow Solving environment: failed
UnsatisfiableError: The following specifications were found to be in conflict:
- scikit-image -> numpy[version='>=1.13.3,<2.0a0']
- tensorflow Use "conda info " to see the dependencies for each package.
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
| using System; | |
| using System.Text; | |
| using System.Text.RegularExpressions; | |
| using System.IO; | |
| namespace KlerksSoft | |
| { | |
| public static class TextFileEncodingDetector | |
| { | |
| /* |
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
| // In order to inject dependencies through constructor parameters, | |
| // use greedy constructor selection (versus modest constructor query/ModestConstructorQuery) | |
| // http://blog.ploeh.dk/2011/04/19/ConstructorstrategiesforAutoFixture/ | |
| // | |
| // OmitAutoProperties to stop it from mocking out properties | |
| // See https://github.com/AutoFixture/AutoFixture/issues/320 for combo of GreedyConstructorQuery and OmitAutoProperties | |
| AutoFixture.Customize<T>(c => c.FromFactory(new MethodInvoker(new GreedyConstructorQuery())).OmitAutoProperties()); | |
| // Trace construction of objects | |
| AutoFixture.Behaviors.Add(new TracingBehavior()); |
Warm-up 10 minutes. Build up from easy to a steady pace for a few minutes.
Cadence pyramids Do the following progression two to three times with 10 minutes of easy/steady riding in between:
- 100 r.p.m.
- 105 r.p.m.
- 110 r.p.m.
- 115 r.p.m.
- 120 r.p.m.
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
| https://social.msdn.microsoft.com/Forums/azure/en-US/afbfb7b3-92c9-4af6-9128-ba96795de5a6/not-able-to-delete-b2c-tenant?forum=WindowsAzureAD | |
| Please follow the following steps: | |
| Create Temporary Admin Account | |
| 1. Open a browser and login to https://manage.windowsazure.com | |
| 2. In the left hand menu navigate to Active Directory, and select your directory | |
| 3. Click Users and Groups > Add User | |
| 4. Create this user with a username of [email protected] and be sure to grant this user the role Global Administrator |