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.Diagnostics; | |
namespace ConsoleApp6 | |
{ | |
internal class Program | |
{ | |
private static void Main(string[] args) | |
{ | |
const int Ntests = (int)1e4; |
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 python3 | |
# -*- coding: utf8 -*- | |
import collections | |
import itertools | |
def sieve(): | |
# This will store a running list of all the factors that can lead to a number: | |
# { number: [factors of the number] } |
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 python | |
# -*- coding: utf-8 -*- | |
""" | |
logging.fileConfig is pretty awesome already, | |
but if you could fragment the logging configuration into multiple configuration files | |
and then merge them together it be even more awesomer. Alas, it can't. | |
Therefore, this module provides a convenience class that you can feed with configuration files. | |
The instance will read the configuration files and merge the logging related bits into one. |
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
Looking for the first available camera | |
vendor name = Allied Vision Technologies | |
model name = Manta_G-032B | |
device id = 50-0503355825 | |
image width = 656 | |
image height = 492 | |
horizontal binning = 1 | |
vertical binning = 1 | |
payload = 322752 bytes | |
exposure = 15000 µs |
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 os | |
import string | |
alpha = string.letters + string.digits | |
max_ratio = -1 | |
best_line = "" | |
with open(os.path.expanduser('~/.bash_history')) as f: | |
for line in f: |
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 datetime | |
from itertools import takewhile, dropwhile | |
from dateutil.tz import tzoffset | |
from pprint import pprint | |
data = [{'id': 47}, | |
{'operator': [{'id': 2}, {'login': u'fse'}]}, | |
{'spot': [{'id': 207}, | |
{'position': u'A1'}, | |
{'spotDate': datetime.datetime(2015, 11, 4, 17, 7, 13, 326000, tzinfo=tzoffset(None, 3600))}, |
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
Searching for ghc in path. | |
Found ghc at C:\Haskell\2014.2.0.0\bin\ghc.exe | |
("C:\\Haskell\\2014.2.0.0\\bin\\ghc.exe",["--numeric-version"]) | |
C:\Haskell\2014.2.0.0\bin\ghc.exe is version 7.8.3 | |
looking for tool ghc-pkg near compiler in C:\Haskell\2014.2.0.0\bin | |
found ghc-pkg in C:\Haskell\2014.2.0.0\bin\ghc-pkg.exe | |
("C:\\Haskell\\2014.2.0.0\\bin\\ghc-pkg.exe",["--version"]) | |
C:\Haskell\2014.2.0.0\bin\ghc-pkg.exe is version 7.8.3 | |
("C:\\Haskell\\2014.2.0.0\\bin\\ghc.exe",["--supported-languages"]) | |
("C:\\Haskell\\2014.2.0.0\\bin\\ghc.exe",["--info"]) |
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
[ 1 of 79] Compiling Distribution.Compat.CreatePipe ( C:\Users\MIPPO_~1\AppData\Local\Temp\Cabal-1.22.2.0-3008\Cabal-1.22.2.0\Distribution\Compat\CreatePipe.hs, C:\Users\MIPPO_~1\AppData\Local\Temp\Cabal-1.22.2.0-3008\Cabal-1.22.2.0\dist\setup\Distribution\Compat\CreatePipe.o ) | |
[ 2 of 79] Compiling Distribution.Compat.Binary ( C:\Users\MIPPO_~1\AppData\Local\Temp\Cabal-1.22.2.0-3008\Cabal-1.22.2.0\Distribution\Compat\Binary.hs, C:\Users\MIPPO_~1\AppData\Local\Temp\Cabal-1.22.2.0-3008\Cabal-1.22.2.0\dist\setup\Distribution\Compat\Binary.o ) | |
[ 3 of 79] Compiling Distribution.GetOpt ( C:\Users\MIPPO_~1\AppData\Local\Temp\Cabal-1.22.2.0-3008\Cabal-1.22.2.0\Distribution\GetOpt.hs, C:\Users\MIPPO_~1\AppData\Local\Temp\Cabal-1.22.2.0-3008\Cabal-1.22.2.0\dist\setup\Distribution\GetOpt.o ) | |
[ 4 of 79] Compiling Distribution.TestSuite ( C:\Users\MIPPO_~1\AppData\Local\Temp\Cabal-1.22.2.0-3008\Cabal-1.22.2.0\Distribution\TestSuite.hs, C:\Users\MIPPO_~1\AppData\Local\Temp\Cabal-1.22.2.0-3008\Cabal-1.22.2.0\dist\setup\Dist |
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
{ | |
"spec_version": "v1.6", | |
"name": "An awesome modpack", | |
"identifier": "IpposModpack", | |
"kind" : "metapackage", | |
"abstract": "Example ckan metapackage", | |
"license": "CC-BY-SA", | |
"depends": [ | |
{ | |
"name": "FerramAerospaceResearch" |