Skip to content

Instantly share code, notes, and snippets.

# -*- coding:utf-8 -*-
import json
from article.parsers import EntertainmentStationArticleParser
import os.path
def dump(filename):
with open(filename) as fp:
parser = EntertainmentStationArticleParser(fp.read())
result = parser.parse()
using System;
using System.Net.Http;
using System.Threading.Tasks;
using System.Net.Http.Headers;
namespace HttpClientSample
{
class MainClass
{
public static void Main (string[] args)
{
using System;
using System.Net.Http;
using System.Threading.Tasks;
using System.Net.Http.Headers;
namespace CookieCheck
{
class MainClass
{
public static void Main (string[] args)
using NUnit.Framework;
using System;
namespace mockSample
{
public interface IFoo
{
bool DoSomething (string message);
bool TryParse (string message, out string outstring);
using NUnit.Framework;
using System;
namespace mockSample
{
public class AlarmEventArgs : EventArgs
{
private readonly int nrings = 0;
private readonly bool snoozePressed = false;
@podhmo
podhmo / Result.cs
Created February 2, 2014 15:24
hmm
using System;
/*
* f0 :: a -> R<F,T0>
* f1 :: t0 -> a -> R<F,T1>
* F :: a -> R<F,T1>
* F = f0 * f1 みたいなことしたい.
*/
namespace TT
@podhmo
podhmo / adt.py
Last active August 29, 2015 13:56
# -*- coding:utf-8 -*-
"""
Result code message value = Failure code message | Success value
match x => Failure code, message -> ("oop" code, message) | Success value -> ("ok" value)
"""
from collections import namedtuple
import inspect
class NotComprehensive(Exception):
<Window x:Class="WpfApplication6.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:c="clr-namespace:WpfApplication6"
Title="MainWindow" Height="350" Width="525">
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<c:UserControl1>
<Border Margin="0,10,0,10" >
<WrapPanel>
<TextBlock Foreground="Aqua">AAAA</TextBlock>
<Window x:Class="WpfApplication7.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:c="clr-namespace:WpfApplication7"
Title="MainWindow" Height="350" Width="525">
<Window.Resources>
<c:BindingData x:Key="bd" PreviewType="password"/>
</Window.Resources>
<StackPanel>
<StackPanel DataContext="{StaticResource bd}">
<Application x:Class="WpfApplication7.App"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
StartupUri="MainWindow.xaml">
<Application.Resources>
</Application.Resources>
</Application>