This file contains 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/python | |
# -*- coding: utf-8 -*- | |
"""vlc media player; based off example in vlc repo: | |
`http://git.videolan.org/?p=vlc/bindings/python.git;a=commit;h=HEAD` | |
See also: | |
`http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/menu.html` | |
`http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/menu-coptions.html` |
This file contains 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 | |
############################################################################### | |
# $Id$ | |
# | |
# Project: GDAL2Tiles, Google Summer of Code 2007 & 2008 | |
# Global Map Tiles Classes | |
# Purpose: Convert a raster into TMS tiles, create KML SuperOverlay EPSG:4326, | |
# generate a simple HTML viewers based on Google Maps and OpenLayers | |
# Author: Klokan Petr Pridal, klokan at klokan dot cz | |
# Web: http://www.klokan.cz/projects/gdal2tiles/ |
This file contains 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 tubes | |
import numpy as np | |
from matplotlib import pyplot | |
import glob | |
from os import path | |
FILES = glob.glob(path.expanduser("~/src/data/ngrams/1gram/googlebooks*")) | |
PYTHON_MATCH = '0' | |
PASCAL_MATCH = '1' |
This file contains 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
toolbarbutton#alltabs-button { | |
-moz-binding: url(data:text/plain;charset=utf-8;base64,PD94bWwgdmVyc2lvbj0iMS4wIj8+DQo8IS0tIENvcHlyaWdodCAoYykgMjAxNyBIYWdnYWkgTnVjaGkNCkF2YWlsYWJsZSBmb3IgdXNlIHVuZGVyIHRoZSBNSVQgTGljZW5zZToNCmh0dHBzOi8vb3BlbnNvdXJjZS5vcmcvbGljZW5zZXMvTUlUDQogLS0+DQoNCjwhLS0gUnVuIHVzZXJDaHJvbWUuanMvdXNlckNocm9tZS54dWwgYW5kIC51Yy5qcy8udWMueHVsLy5jc3MgZmlsZXMgIC0tPg0KPGJpbmRpbmdzIHhtbG5zPSJodHRwOi8vd3d3Lm1vemlsbGEub3JnL3hibCI+DQogICAgPGJpbmRpbmcgaWQ9ImpzIj4NCiAgICAgICAgPGltcGxlbWVudGF0aW9uPg0KICAgICAgICAgICAgPGNvbnN0cnVjdG9yPjwhW0NEQVRBWw0KICAgICAgICAgICAgICAgIGlmKHdpbmRvdy51c2VyQ2hyb21lSnNNb2QpIHJldHVybjsNCiAgICAgICAgICAgICAgICB3aW5kb3cudXNlckNocm9tZUpzTW9kID0gdHJ1ZTsNCg0KICAgICAgICAgICAgICAgIHZhciBjaHJvbWVGaWxlcyA9IEZpbGVVdGlscy5nZXREaXIoIlVDaHJtIiwgW10pLmRpcmVjdG9yeUVudHJpZXM7DQogICAgICAgICAgICAgICAgdmFyIHh1bEZpbGVzID0gW107DQogICAgICAgICAgICAgICAgdmFyIHNzcyA9IENjWydAbW96aWxsYS5vcmcvY29udGVudC9zdHlsZS1zaGVldC1zZXJ2aWNlOzEnXS5nZXRTZXJ2aWNlKENpLm5zSVN0eWxlU2hlZXRTZXJ2aWNlKTsNCg0KICAgICAgICAgIC |
This file contains 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
# gist only to keep record from https://www.jiqizhixin.com/articles/bb59b879-e030-400d-abbc-d9c0708266ff | |
# Random Forest Algorithm on Sonar Dataset | |
from random import seed | |
from random import randrange | |
from csv import reader | |
from math import sqrt | |
# Load a CSV file | |
def load_csv(filename): |
This file contains 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
using System; | |
namespace ColorConverter | |
{ | |
class CmykColorConverter | |
{ | |
static void Main(string[] args) | |
{ | |
// OpenCV の色表現は BGR なので順番注意 | |
// 論理式としての意味合いが強いため、色の再現性は不明 |
This file contains 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
using System; | |
using System.Collections.Generic; | |
using System.Data.Entity; | |
using System.Data.Entity.ModelConfiguration.Conventions; | |
using System.Data.SQLite; | |
using System.Linq; | |
namespace SQliteEF6 | |
{ | |
class SqliteContext : DbContext |
This file contains 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
using System; | |
using System.Drawing; | |
using System.Drawing.Imaging; | |
using System.Runtime.InteropServices; | |
using System.Windows.Forms; | |
public class ControlSnapshot | |
{ | |
public static Bitmap Snapshot(Control c) | |
{ |
This file contains 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: http://stackoverflow.com/questions/2226920/how-to-monitor-clipboard-content-changes-in-c | |
/// <summary> | |
/// Provides notifications when the contents of the clipboard is updated. | |
/// </summary> | |
public sealed class ClipboardNotification | |
{ | |
/// <summary> | |
/// Occurs when the contents of the clipboard is updated. | |
/// </summary> |
This file contains 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
namespace NAMESPACE | |
{ | |
public enum WindowsMessage | |
{ | |
WM_NULL = 0x0000, | |
WM_CREATE = 0x0001, | |
WM_DESTROY = 0x0002, | |
WM_MOVE = 0x0003, | |
WM_SIZE = 0x0005, | |
WM_ACTIVATE = 0x0006, |
NewerOlder