[1] pry(main)> require "narray"
=> true
[2] pry(main)> a = NArray[0..14].reshape(3, 5)
=> NArray::Int32#shape=[3,5]
[[0, 1, 2, 3, 4],
[5, 6, 7, 8, 9],
[10, 11, 12, 13, 14]]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| environment: | |
| matrix: | |
| - JAVA_HOME: C:\Program Files\Java\jdk1.8.0 | |
| install: | |
| - ps: choco install maven | |
| - cmd: SET PATH=C:\tools\apache-maven-3.3.3\bin;%JAVA_HOME%\bin;%PATH% | |
| - mvn --version | |
| build_script: | |
| - mvn package | |
| artifacts: |
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
| language: c | |
| sudo: false | |
| addons: | |
| apt: | |
| packages: | |
| - gcc | |
| - make | |
| - gettext | |
| - intltool | |
| install: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
| from bs4 import BeautifulSoup | |
| soup = BeautifulSoup(open("./msb201073-sup-0003.xml", encoding='utf-8').read(), 'xml') | |
| ann = soup.annotation | |
| import re | |
| sas = ann.find_all(re.compile("speciesAlias$")) | |
| for sa in sas: | |
| print(sa.get("id"), sa.bounds.get("h"), sa.bounds.get("w"), tag.bounds.get("x"), tag.bounds.get("y")) | |
python2 -m ipykernel installjupyterhub -f jupyterhub_config.py
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 pywikibot | |
| site = pywikibot.Site("wikidata", "wikidata") | |
| repo = site.data_repository() | |
| item = pywikibot.ItemPage(repo, u"Q415011") | |
| print item.get() | |
| stringclaim = pywikibot.Claim(repo, u'P2064') | |
| stringclaim.setTarget(u"C00000674") | |
| item.addClaim(stringclaim) |
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 pandas as pd | |
| a=pd.read_table("foo.out", sep=" ", header=None) | |
| >>> for i in ["%.2d" % i for i in range(1,25)]: | |
| ... print [i, a[3].str.contains(i+"/Feb").value_counts()[True]] | |
| ['01', 511] | |
| ['02', 1552] | |
| ['03', 283] | |
| ['04', 93] | |
| ['05', 207] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.