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 requests | |
import time | |
download_count = 1 | |
def main(): | |
with open('download_list.txt', encoding="utf-8") as f: | |
urls = f.read().split() | |
for url in urls: |
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
let fetchRequest = NSFetchRequest(entityName: "Record") | |
fetchRequest.predicate = NSPredicate(format: "file == NULL") |
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 chainer | |
from chainer import functions as F | |
from chainer import links as L | |
from chainer import training | |
from chainer.training import extensions | |
BATCH_SIZE = 50 | |
EPOCH = 10 | |
class MLP(chainer.Chain): |
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 numpy as np | |
import chainer | |
from chainer import cuda, Function, gradient_check, Variable, optimizers, serializers, utils | |
from chainer import Link, Chain, ChainList | |
import chainer.functions as F | |
import chainer.links as L | |
from sklearn.datasets import fetch_mldata | |
mnist = fetch_mldata('MNIST original', data_home='../') |
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
module app; | |
import std.algorithm, | |
std.string, | |
std.random, | |
std.stdio, | |
std.range, | |
std.file; | |
import manakasi.mecab; | |
class Markov{ |
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
(define (product a next b) | |
(define (iproduct p a next) | |
(if (<= a b) | |
(iproduct (* a p) (next a) next) | |
p)) | |
(iproduct 1 a next)) | |
(define (isprime? x) | |
(define (iisprime? i) | |
(cond ((> i (sqrt x)) #t) |
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
#include <iostream> | |
#include <stdint.h> | |
#include <stdlib.h> | |
using namespace std; | |
const size_t SIZE = 100; | |
int64_t V[SIZE], E[SIZE][SIZE]; | |
int main() { |
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
#include <iostream> | |
#include <vector> | |
#include <algorithm> | |
#include <cstdlib> | |
#include <cstdint> | |
struct UnionFind { | |
private: | |
std::vector<int64_t> data; | |
public: |
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
#include <cstdint> | |
#include <cstdlib> | |
#include <cstring> | |
#include <iostream> | |
#include <memory> | |
#include <sstream> | |
#include <string> | |
#include <stack> | |
#include <vector> | |
#include <boost/algorithm/string/split.hpp> |
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
require 'twitter' | |
require 'pp' | |
client = Twitter::REST::Client.new do |config| | |
config.consumer_key = 'CK' | |
config.consumer_secret = 'CS' | |
config.access_token = 'AT' | |
config.access_token_secret = 'AS' | |
end |
NewerOlder