cd /new/dir
(cd /old/dir; find . -type d ! -name .) | xargs mkdir
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
| """Update your default branch in GitHub (default: main). | |
| This script will rename the master branch (default: main), push the new branch to GitHub, | |
| optionally delete the master branch (default: True, delete master). | |
| python update_github_default_branch.py | |
| Installation | |
| ------------ |
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
| def batch(iterable, n=1): | |
| """ | |
| For batch processing of records | |
| :param iterable: | |
| :param n: batch size | |
| :return: generator | |
| """ | |
| l = len(iterable) | |
| for ndx in range(0, l, 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
| <?xml version="1.0" encoding="utf-8"?> | |
| <rdf:RDF xmlns:afni="http://purl.org/nidash/afni#" xmlns:crypto="http://id.loc.gov/vocabulary/preservation/cryptographicHashFunctions#" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dct="http://purl.org/dc/terms/" xmlns:dctype="http://purl.org/dc/dcmitype/" xmlns:fsl="http://purl.org/nidash/fsl#" xmlns:nfo="http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#" xmlns:nidm="http://purl.org/nidash/nidm#" xmlns:nlx="http://neurolex.org/wiki/" xmlns:obo="http://purl.obolibrary.org/obo/" xmlns:owl="http://www.w3.org/2002/07/owl#" xmlns:prov="http://www.w3.org/ns/prov#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:spm="http://purl.org/nidash/spm#" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" xmlns="http://www.semanticweb.org/owl/owlapi/turtle#"> | |
| <rdf:Description rdf:nodeID="genid1"> | |
| <rdf:type rdf:resource="http://www.w3.org/2002/07/owl#Ontology"/> |
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
| { | |
| "metadata": { | |
| "name": "", | |
| "signature": "sha256:b52d91c59219130c59f60a3b4d38f44bf63c0bb281cf4e10c43b025291a31537" | |
| }, | |
| "nbformat": 3, | |
| "nbformat_minor": 0, | |
| "worksheets": [ | |
| { | |
| "cells": [ |
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
| http PUT http://glia.ibic.washington.edu:8890/DAV/test.txt Content-Type:text/plain -a dav:dav < test.txt |
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
| # connect to virtuoso | |
| g = rdflib.ConjunctiveGraph('SPARQLUpdateStore', identifier='http://graphtoupdate') | |
| g.open((sparql_uri, update_uri)) | |
| g.store.setCredentials(update_usr, update_pwd) | |
| g.store.setHTTPAuth(update_auth) | |
| # create a graph to parse update file | |
| update = rdflib.graph() | |
| update.parse('file.ttl', format='turtle') | |
| update.skolemize(new_graph=g.store) |
NewerOlder