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 | |
""" | |
Usage: | |
url_to_sentence_collector_sentences <url> | |
Description: | |
https://commonvoice.mozilla.org/sentence-collector/#/how-to | |
""" | |
from docopt import docopt |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
""" | |
Usage: | |
Nielsen2017Linking_camera.py | |
Notes | |
----- | |
This script demonstrates the use of Wikidata together with | |
ImageNet-based deep learning classifiers. It relates to the manuscript | |
"Linking ImageNet WordNet Synsets with Wikidata" from 2018. |
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
{0: {'id': '01440764-n', | |
'label': 'tench, Tinca tinca', | |
'uri': 'http://wordnet-rdf.princeton.edu/wn30/01440764-n'}, | |
1: {'id': '01443537-n', | |
'label': 'goldfish, Carassius auratus', | |
'uri': 'http://wordnet-rdf.princeton.edu/wn30/01443537-n'}, | |
2: {'id': '01484850-n', | |
'label': 'great white shark, white shark, man-eater, man-eating shark, Carcharodon carcharias', | |
'uri': 'http://wordnet-rdf.princeton.edu/wn30/01484850-n'}, | |
3: {'id': '01491361-n', |
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
"""Federated queries with Virtuoso.""" | |
import sys | |
from SPARQLWrapper import SPARQLWrapper, JSON | |
QUERY_WIKIDATA = """ | |
PREFIX wd: <http://www.wikidata.org/entity/> |
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 | |
df = pd.DataFrame([[1, 2, 's'], [3, 4, 't'], [4, 5, 'u']], | |
index=[-1, 0, 1], columns=['a', 'b', 'c']) | |
>>> df.a # Correct type | |
-1 1 | |
0 3 | |
1 4 | |
Name: a, dtype: int64 |
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
# https://github.com/fnielsen/everything | |
from everything import * | |
import pyfftw.interfaces.scipy_fftpack | |
def is_prime(n): | |
"""https://stackoverflow.com/questions/18833759/""" | |
if n % 2 == 0 and n > 2: | |
return False |
NewerOlder