Skip to content

Instantly share code, notes, and snippets.

@rigibun
rigibun / downloader.py
Created February 9, 2024 19:32
file downloader
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:
let fetchRequest = NSFetchRequest(entityName: "Record")
fetchRequest.predicate = NSPredicate(format: "file == NULL")
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):
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='../')
module app;
import std.algorithm,
std.string,
std.random,
std.stdio,
std.range,
std.file;
import manakasi.mecab;
class Markov{
(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)
#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() {
#include <iostream>
#include <vector>
#include <algorithm>
#include <cstdlib>
#include <cstdint>
struct UnionFind {
private:
std::vector<int64_t> data;
public:
#include <cstdint>
#include <cstdlib>
#include <cstring>
#include <iostream>
#include <memory>
#include <sstream>
#include <string>
#include <stack>
#include <vector>
#include <boost/algorithm/string/split.hpp>
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