Skip to content

Instantly share code, notes, and snippets.

View hatone's full-sized avatar
🦋
Think deep, work hard.

Takako Ohshima hatone

🦋
Think deep, work hard.
View GitHub Profile
@korakot
korakot / sheet_df.py
Last active March 29, 2024 23:33
Save dataframe to Google Sheet from Colab
# authenticate
from google.colab import auth
auth.authenticate_user()
import gspread
from oauth2client.client import GoogleCredentials as GC
gc = gspread.authorize(GC.get_application_default())
# create, and save df
from gspread_dataframe import set_with_dataframe
title = 'New Sheet'
gc.create(title) # if not exist
@stefanfoulis
stefanfoulis / docker_for_mac_disk_default_size.md
Last active June 29, 2023 12:02
How to resize Docker for Mac Disk image and set the default size for new images

Set the default size for new Docker for Mac disk images

UPDATE: The instructions here are no longer necessary! Resizing the disk image is now possible right from the UI since Docker for Mac Version 17.12.0-ce-mac49 (21995).

If you are getting the error: No space left on device

Configuring the qcow2 size cap is possible in the current versions:

# my disk is currently 64GiB
@mocyuto
mocyuto / sql2case.py
Last active August 29, 2015 14:06
SQLをcase classに変換
# -*- coding:utf-8 -*-
import re
import sys
def to_camel_case(snake_str):
components = snake_str.split('_')
return components[0] + "".join(x.title() for x in components[1:])
def caseClass(list):
for i,elem in enumerate(list[0]):
@esehara
esehara / gist:1325133
Created October 29, 2011 21:45
Life Music (Life Game like Music Composer)
# -*- coding:utf-8 -*-
import pygame
from pygame.locals import *
import pygame.mixer
import sys
import copy
import array
sounds = [0 for j in range(0,20)]
cell = [[0 for j in range(0,20)] for i in range(0,20)]