Skip to content

Instantly share code, notes, and snippets.

@duizendnegen
Last active August 27, 2020 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save duizendnegen/df99da1aa7f2b02fc01e538d3661d06b to your computer and use it in GitHub Desktop.
Save duizendnegen/df99da1aa7f2b02fc01e538d3661d06b to your computer and use it in GitHub Desktop.
if(len(content) < 100):
target_file = reject_file
else:
sample = content.split("\n")[0]
if(len(sample) > 15):
language = tc.guess_language(sample)
else:
language = tc.guess_language(content)
if('eng' in language):
target_file = accept_file
else:
target_file = reject_file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment