This file contains hidden or 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
fsutil file createnew dummy.gz 306552800 |
This file contains hidden or 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 java.util.Scanner; | |
import java.util.regex.Matcher; | |
import java.util.regex.Pattern; | |
public class DuplicateWords { | |
/* | |
https://rubular.com/r/98MZ0vzUeX | |
\b : Any word boundary (\w+) : Select any word character (letter, number, underscore) | |
( : Grouping starts |
This file contains hidden or 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 org.junit.jupiter.api.Assertions; | |
import org.junit.jupiter.api.Test; | |
import java.util.*; | |
import java.util.concurrent.atomic.AtomicInteger; | |
/* | |
* Test for joining collection of String's into one | |
* like ["a", "aaa", "bbbb", "Dda"] to "a,aaa,bbbb,Dda" |
This file contains hidden or 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 bs4 import BeautifulSoup as bs | |
from urllib2 import urlopen | |
from time import sleep | |
soup = bs(html,"lxml") | |
gen_urls = [x for x in range(80000, 80002)] | |
base_url = 'http://joyreactor.cc/new/' | |
enlist_urls =[base_url+str(item) for item in gen_urls] |
This file contains hidden or 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
# -*- coding: utf-8 -*- | |
# Many thanks to http://stackoverflow.com/users/400617/davidism | |
# This code under "I don't care" license | |
# Take it, use it, learn from it, make it better. | |
# Start this from cmd or shell or whatever | |
# Go to favourite browser and type localhost:5000/admin | |
import sys | |
from flask import Flask | |
from flask.ext.sqlalchemy import SQLAlchemy | |
from flask.ext.admin import Admin |