Skip to content

Instantly share code, notes, and snippets.

@hello009-commits
hello009-commits / BeyesianAvg.py
Created September 6, 2012 08:32 — forked from lastland/BeyesianAvg.py
尝试用这篇post: http://www.matrix67.com/blog/archives/5044 中的方法实现的一个自动中文抽词算法的Python程序
# -*- coding=utf-8 -*-
import collections
# Usage:
# 我的做法是把WordsDetector.py里的结果输出到文件,
# 然后把文件名放到下面的names列表中,运行本程序。
names = ['name0',
'name1',
'name2',
@hello009-commits
hello009-commits / 0_reuse_code.js
Last active August 29, 2015 14:18
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@hello009-commits
hello009-commits / sublime_text3_crack.md
Last active August 29, 2015 14:28 — forked from sublime-crack4/sublime_text3_crack.md
Sublime Text crack 3095 3083 Win64 Win32 Linux64 Linux32 OSX Mac MacOS latest

cat

For pupil: all binary can be downloaded http://pan.baidu.com/s/1ntCChyp

After overwriting, maybe need to run chmod +x /path/to/sublime_text. For linux default installation, need to add sudo.

For programmer:

VERSION PLATFORM OFFSET ORIGINAL CRACKED
@hello009-commits
hello009-commits / BinarySearch.scala
Created January 8, 2017 06:56 — forked from larroy/BinarySearch.scala
Binary search in scala
import scala.annotation.tailrec
object BinarySearch {
/**
* @param xs Sequence to search
* @param key key to find
* @param min minimum index (inclusive)
* @param max maximum index (inclusive)
* @param keyExtract function to apply to elements xs before comparing to key, defaults as identity
* @tparam T type of elements in the sequence
import ComparisonChain._
import java.io.BufferedInputStream
import java.io.BufferedOutputStream
import java.io.BufferedReader
import java.io.BufferedWriter
import java.io.Closeable
import java.io.File
import java.io.File
import java.io.FileInputStream
import java.io.FilenameFilter
@hello009-commits
hello009-commits / PreProcessLine.java
Created May 17, 2017 09:13 — forked from btiernay/PreProcessLine.java
Example of extracting information from HDFS paths in a Spark transformation
package org.icgc.dcc.etl.staging.function;
import static com.google.common.base.Stopwatch.createStarted;
import static com.google.common.collect.Iterables.toArray;
import static org.icgc.dcc.common.core.util.FormatUtils.formatCount;
import static org.icgc.dcc.common.core.util.FormatUtils.formatPercent;
import static org.icgc.dcc.common.core.util.Splitters.TAB;
import java.io.Serializable;
import java.util.Iterator;
import org.apache.hadoop.conf.Configuration
import org.apache.hadoop.io.{LongWritable, Text}
import org.apache.hadoop.mapreduce.lib.input.{FileSplit, TextInputFormat}
import org.apache.spark.{SparkConf, SparkContext}
import org.apache.spark.rdd.NewHadoopRDD
object Program {
def main(args: Array[String]): Unit = {
val srcFile = "hdfs://sandbox/Numbers.txt"
val conf = new SparkConf().setAppName("spark-numbers")
import org.apache.zookeeper.server.{NIOServerCnxn, ZooKeeperServer}
import java.net.{ServerSocket, InetSocketAddress}
import kafka.server.{KafkaServer, KafkaConfig}
import kafka.producer.{ProducerConfig, Producer}
import java.util.Properties
import kafka.serializer.{DefaultEncoder, StringEncoder}
import java.io.File
import scala.util.Random
import kafka.admin.AdminUtils
@hello009-commits
hello009-commits / AccessGranted.scala
Created July 28, 2017 17:18 — forked from Akjir/AccessGranted.scala
Access private fields and methods using Java Reflection in Scala.
object Main extends App {
val printer = new Printer[String]()
val break = true
val text = "access granted"
//cannot be accessed:
//printer.printCodeName
//printer.codeName = "Rejewski"
//printer.printCodeName

I’m looking for any tips or tricks for making chrome headless mode less detectable. Here is what I’ve done so far:

Set my args as follows:

const run = (async () => {

    const args = [
        '--no-sandbox',
        '--disable-setuid-sandbox',
        '--disable-infobars',