0x1f8972432b6e8ac7125be0bbfbddc22a7a35f8f3bcdff01407c36a15c986ab51
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 video_file_regex = Regex::new(r"https://.*\.ts").unwrap(); | |
let mut result_video_file = File::create("result.ts")?; | |
let futures: Vec<_> = video_file_regex.find_iter(&hd_playlist_content).map(|capture| { | |
let video_file_link = capture.as_str(); | |
let response = client.get(video_file_link.parse().unwrap()); | |
response.unwrap().body().concat2() | |
}).collect(); |
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
extern crate num_iter; | |
use num_iter::range_step; | |
pub fn sieve(n: u64) -> Vec<u64> { | |
let mut prime_identifers: Vec<bool> = vec![true; n as usize + 1]; | |
let primes: Vec<u64> = vec![]; | |
for i in 2..(n as f64).sqrt() as usize + 1 { | |
if *prime_identifers.get(i).unwrap() { |
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
#![feature(box_syntax)] | |
#![feature(box_into_raw_non_null)] | |
#![feature(nll)] | |
use std::collections::HashMap; | |
use std::hash::Hash; | |
use std::ptr::NonNull; | |
use std::cell::RefCell; | |
#[derive(Debug)] |
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 ruby | |
# frozen_string_literal: true | |
require 'optparse' | |
require 'ostruct' | |
require 'net/http' | |
require 'json' | |
require 'pathname' | |
options = OpenStruct.new( |
OlderNewer