<commit_before>#!/usr/bin/env python2
#QUOD: Questionable Utility Of Doom
#most code copied from gblast3.py (which was written by <NAME> and <NAME>) except where noted
#-<NAME>
from __future__ import print_function, division

from Bio import SeqIO
import argparse
import tempfile, os, sys, re
import subprocess
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np


VERBOSITY = 0

class Wedge(object):
	def __init__(self, x, dx=0, y=0):
		self.x = x
		self.dx = dx
		self.y = y
	def draw(self, plt):
		if self.y > 0: ymin, ymax = 0.5, 1
		elif self.y < 0: ymin, ymax = 0, 0.5
		else: ymin, ymax = 0, 1
		plt.axvline(x=self.x, color='black', ymin=ymin, ymax=ymax)

		if self.dx:
			x = self.x + abs(self.dx)**.5 * (self.dx)/abs(self.dx)
			#if self.dx < 0: 
			if self.y == 0: y = 2
			else: y = self.y

			size = abs(self.dx)

			if self.dx < 0: marker = '<'
			else: marker = '>'

			plt.scatter((x,), (y,), marker=marker, color='black', s=25*size)

def hydro(gseq, window=19):
	#Copied with barely any modification from gblast3.py

	#sanitize the sequence, which may be a FASTA
	if gseq.startswith('>'):
		gseq = gseq[gseq.find('\n')+1:]
		gseq = re.sub('[^A-Z\-]', '', gseq)

	seq=gseq.replace('-','')

	prev = 0
	index = {'G':(-0.400,0.48),
			 'I':(4.500,1.38),<commit_msg>constrained quod to drawing within the plottable domain<commit_after>#!/usr/bin/env python2
#QUOD: Questionable Utility Of Doom
#most code copied from gblast3.py (which was written by <NAME> and <NAME>) except where noted
#-<NAME>
from __future__ import print_function, division

from Bio import SeqIO
import argparse
import tempfile, os, sys, re
import subprocess
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np


VERBOSITY = 0

class Wedge(object):
	def __init__(self, x, dx=0, y=0):
		self.x = x
		self.dx = dx
		self.y = y
	def draw(self, plt):
		#print(dir(plt))
		(plt.xlim(), plt.ylim())
		if self.y > 0: ymin, ymax = 0.5, 1
		elif self.y < 0: ymin, ymax = 0, 0.5
		else: ymin, ymax = 0, 1
		x = max(plt.xlim()[0], min(plt.xlim()[1], self.x))
		plt.axvline(x=x, color='black', ymin=ymin, ymax=ymax)

		if self.dx:
			x = x + abs(self.dx)**.5 * (self.dx)/abs(self.dx)
			#if self.dx < 0: 
			if self.y == 0: y = 2
			else: y = self.y

			size = abs(self.dx)

			if self.dx < 0: marker = '<'
			else: marker = '>'

			plt.scatter((x,), (y,), marker=marker, color='black', s=25*size)

def hydro(gseq, window=19):
	#Copied with barely any modification from gblast3.py

	#sanitize the sequence, which may be a FASTA
	if gseq.startswith('>'):
		gseq = gseq[gseq.find('\n')+1:]
		gseq = re.sub('[^A-Z\-]', '', gseq)

	seq=gseq.replace('-','')

	prev = 0
	index = {'G':(-0.400,0.48),
			 'I':(4.500,1.38),
{'fraction_non_alphanumeric': 0.17444806369887803, 'fraction_numerical': 0.03040173724212812, 'mean_word_length': 3.523731587561375, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1801459', 'n_tokens_mistral': 1274, 'n_tokens_neox': 1135, 'n_words': 321}