Edit: This list is now maintained in the rust-anthology repo.
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
| package main | |
| import ( | |
| "fmt" | |
| "net/http" | |
| "sort" | |
| "time" | |
| ) | |
| // a struct to hold the result from each request including an index |
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
| """ | |
| Upsert gist | |
| Requires at least postgres 9.5 and sqlalchemy 1.1 | |
| Initial state: | |
| [] | |
| Initial upsert: |
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
| #' Get publication metrics from iCite | |
| #' | |
| #' iCite is a tool to access a dashboard of bibliometrics for papers | |
| #' associated with a portfolio. Users upload the PubMed IDs of articles | |
| #' of interest (from SPIRES or PubMed), optionally grouping them for | |
| #' comparison. iCite then displays the number of articles, articles per | |
| #' year, citations per year, and Relative Citation Ratio (a field-normalized | |
| #' metric that shows the citation impact of one or more articles relative | |
| #' to the average NIH-funded paper). A range of years can be selected, | |
| #' as well as article type (all, or only research articles), and individual |
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 __future__ import print_function | |
| import httplib2 | |
| import os | |
| from apiclient import discovery | |
| import oauth2client | |
| from oauth2client import client | |
| from oauth2client import tools | |
- install dnsmasq
$ brew install dnsmasq
...
$ cp /usr/local/opt/dnsmasq/dnsmasq.conf.example /usr/local/etc/dnsmasq.conf
- edit
/usr/local/etc/dnsmasq.conf
address=/local/127.0.0.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
| query IntrospectionQuery { | |
| __schema { | |
| queryType { name } | |
| mutationType { name } | |
| subscriptionType { name } | |
| types { | |
| ...FullType | |
| } | |
| directives { |
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
| """ | |
| MIT License | |
| Copyright (c) 2018 Mitchel Cabuloy | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is |
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 org.eclipse.jetty.server.*; | |
| import org.eclipse.jetty.servlet.*; | |
| public class BamServer { | |
| public static void main(String[] args) throws Exception { | |
| Server jettyServer = new Server(8080); | |
| ServletContextHandler context = new ServletContextHandler(); | |
| context.setContextPath("/"); | |
| DefaultServlet servlet= new DefaultServlet(); |
This documentation aims at being a quick-straight-to-the-point-hands-on AWS resources manipulation with [boto3][0].
First of all, you'll need to install [boto3][0]. Installing it along with [awscli][1] is probably a good idea as
- [awscli][1] is boto-based
- [awscli][1] usage is really close to boto's