Skip to content

Instantly share code, notes, and snippets.

Dwight Gunning dgunning

Block or report user

Report or block dgunning

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
dgunning / BertFinetuning
Last active Oct 27, 2019
An example of finetuning a language model using the Huggingface Transformer library
View BertFinetuning
mkdir -p output
# Install Transformers
pip install transformers
# Download the wikitext raw data files
if [ ! -d "wikitext-2-raw" ];
dgunning / DataFrameHolder
Created Oct 22, 2019
A delegate class for pandas dataframes .. an alternative to subclassing pandas dataframes
View DataFrameHolder
import pandas as pd
class DataFrameHolder:
def __init__(self, data: pd.DataFrame, title=''): = data
self.title = title
def __len__(self):
return len(
View gist:9bc4e8711f240e3884460abfd83dbdd7
* Gets an HTTP resource
* @param url the url
* @return an InputStream from the resource
public static InputStream get(String url){
HttpClient client = HttpClientBuilder.create().build();
try {
return client.execute( new HttpGet(url)).getEntity().getContent();
} catch (IOException e) {
dgunning /
Last active Dec 18, 2017
A template for creating a new insert statement from an existing one in Java
package com.dgunning.testtools.sql;
import java.util.Arrays;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import static;
import static;
You can’t perform that action at this time.