text
stringlengths
0
1.05M
meta
dict
from functools import lru_cache import sass from django.conf import settings from django.contrib.staticfiles.finders import get_finders from pipeline.compilers import CompilerBase from .sass_functions.svg_to_data_uri import svg_to_data_uri def svg_to_data_uri_(file_): return svg_to_data_uri(file_, get_include_p...
{ "repo_name": "bulv1ne/django-utils", "path": "utils/pipeline_compilers.py", "copies": "1", "size": "2345", "license": "mit", "hash": -1349512970398780700, "line_mean": 29.0641025641, "line_max": 87, "alpha_frac": 0.6341151386, "autogenerated": false, "ratio": 4.114035087719298, "config_test": ...
from functools import lru_cache import sublime import sublime_plugin __all__ = ( "ProjectFileChanges", ) MYPY = False if MYPY: from typing import Callable, Dict, Optional, TypeVar T = TypeVar("T") class GitSavvySettings: def __init__(self, window=None): # type: (sublime.Window) -> None ...
{ "repo_name": "divmain/GitSavvy", "path": "core/settings.py", "copies": "1", "size": "2736", "license": "mit", "hash": 6872041300600098000, "line_mean": 24.5700934579, "line_max": 82, "alpha_frac": 0.6096491228, "autogenerated": false, "ratio": 3.590551181102362, "config_test": false, "has_no...
from functools import lru_cache @lru_cache() def assay_term_name(*assay_names): """ file.dataset.assay_term_name auditor condition factory """ def assay_name_condition(value, system): context = system['context'] assay_uuid = context.upgrade_properties()['dataset'] assay_name = _assa...
{ "repo_name": "ENCODE-DCC/encoded", "path": "src/encoded/audit/conditions.py", "copies": "1", "size": "1052", "license": "mit", "hash": -4455436042704699000, "line_mean": 26.6842105263, "line_max": 62, "alpha_frac": 0.6549429658, "autogenerated": false, "ratio": 3.187878787878788, "config_test"...
from functools import lru_cache magic = 1362 # test data # magic = 10 # goal_x = 7 # goal_y = 4 # a goal_x = 31 goal_y = 39 # b max_steps = 51 visited = {} @lru_cache(None) def is_wall(x, y): factor = magic + x * x + 3 * x + 2 * x * y + y + y * y bits = 0 while True: bits += factor & 1 ...
{ "repo_name": "matslindh/codingchallenges", "path": "adventofcode2016/13.py", "copies": "1", "size": "1553", "license": "mit", "hash": -1083301737922663000, "line_mean": 16.0659340659, "line_max": 86, "alpha_frac": 0.5054732775, "autogenerated": false, "ratio": 2.8185117967332123, "config_test"...
from functools import lru_cache class Fibonacci: fibonacci_cache = {} def fibonacci_value(self, n): """This is function to print Fibonacci value of a number at Given position This function is coded in python 3.5. """ # check for integer if not isinstance(n, int): ...
{ "repo_name": "rvsingh011/NitK_Assignments", "path": "Sem1/Algorithm/fabonacci.py", "copies": "1", "size": "3333", "license": "mit", "hash": 2572596408504585700, "line_mean": 30.4433962264, "line_max": 105, "alpha_frac": 0.5538553855, "autogenerated": false, "ratio": 3.862108922363847, "config_...
from functools import lru_cache class Solution: def isInterleaveBU(self, s1: str, s2: str, s3: str) -> bool: l1, l2, l3 = len(s1), len(s2), len(s3) if l1 + l2 != l3: return False dp = [[False] * (l2 + 1) for _ in range(l1 + 1)] for i in range(l1 + 1): for j ...
{ "repo_name": "l33tdaima/l33tdaima", "path": "p097m/is_interleave.py", "copies": "1", "size": "1775", "license": "mit", "hash": -6008792071698867000, "line_mean": 35.2244897959, "line_max": 86, "alpha_frac": 0.4304225352, "autogenerated": false, "ratio": 2.730769230769231, "config_test": false,...
from functools import lru_cache @lru_cache() def generate_map(serial): map = [] for y in range(0, 300): row = [] for x in range(0, 300): row.append(powerlevel(serial, x+1, y+1)) map.append(tuple(row)) return tuple(map) @lru_cache(maxsize=1280000) def sum_square(se...
{ "repo_name": "matslindh/codingchallenges", "path": "adventofcode2018/11.py", "copies": "1", "size": "2226", "license": "mit", "hash": -9193964186040557000, "line_mean": 20, "line_max": 62, "alpha_frac": 0.5489667565, "autogenerated": false, "ratio": 3, "config_test": false, "has_no_keywords"...
from functools import lru_cache from custom import rewards from stats.models import Award, Reward _awards_tour = Award.objects.filter(type='tour') _awards_mission = Award.objects.filter(type='mission') _awards_sortie = Award.objects.filter(type='sortie') _awards_vlife = Award.objects.filter(type='vlife') ...
{ "repo_name": "vaal-/il2_stats", "path": "src/stats/rewards.py", "copies": "1", "size": "1415", "license": "mit", "hash": -685535736879680900, "line_mean": 28.1063829787, "line_max": 79, "alpha_frac": 0.6770318021, "autogenerated": false, "ratio": 3.036480686695279, "config_test": false, "has...
from functools import lru_cache import cv2 import math import numpy as np import scipy import scipy.integrate as integrate from scipy.interpolate import interp1d from visnav.algo import tools from visnav.algo.image import ImageProc from visnav.algo.model import Camera from visnav.missions.didymos import...
{ "repo_name": "oknuutti/visnav-py", "path": "visnav/render/sun.py", "copies": "1", "size": "58918", "license": "mit", "hash": 9176452827914252000, "line_mean": 28.5591286307, "line_max": 139, "alpha_frac": 0.503089039, "autogenerated": false, "ratio": 1.9368815542917255, "config_test": false, ...
from functools import lru_cache @lru_cache(maxsize=None) def R(i, j, m): res = pof2[i*j] for a in range(1,i+1): for b in range(0, j+1): if a == i and b == j: continue res = (res - nCr[i-1][a-1]*nCr[j][b]*\ pof2[(i-a)*(j-b)]*R(a, b, ...
{ "repo_name": "baderj/project-euler", "path": "434/euler_434.py", "copies": "1", "size": "1311", "license": "mit", "hash": 6166072626842428000, "line_mean": 25.3125, "line_max": 60, "alpha_frac": 0.4515636918, "autogenerated": false, "ratio": 2.6115537848605577, "config_test": false, "has_no_...
from functools import lru_cache, singledispatch from typing import Any, Callable, List, Tuple, Union import attr from .errors import StructureHandlerNotFoundError @attr.s class _DispatchNotFound: """A dummy object to help signify a dispatch not found.""" pass class MultiStrategyDispatch: """ Mult...
{ "repo_name": "Tinche/cattrs", "path": "src/cattr/dispatch.py", "copies": "1", "size": "3900", "license": "mit", "hash": 3024851061255141400, "line_mean": 29.46875, "line_max": 73, "alpha_frac": 0.5761538462, "autogenerated": false, "ratio": 4.659498207885305, "config_test": false, "has_no_ke...
from functools import lru_cache, wraps from weakref import ref from colour_runner.django_runner import ColourRunnerMixin from django.test.runner import DiscoverRunner from django.utils.crypto import get_random_string as _get_random_string from django.utils.encoding import force_text from django.utils.safestring import...
{ "repo_name": "karolyi/forum-django", "path": "backend/forum/utils/__init__.py", "copies": "1", "size": "2061", "license": "mit", "hash": 6230680658972882000, "line_mean": 32.2419354839, "line_max": 77, "alpha_frac": 0.6695778748, "autogenerated": false, "ratio": 3.9482758620689653, "config_tes...
from functools import namedtuple Tile = namedtuple('Tile', ['top', 'bottom']) def placeDominoTile(tiles, newTile): if not tiles: return [newTile] elif len(tiles) == 1: if tiles[0].bottom == newTile.top: tiles.append(newTile) return tiles elif tiles[0].top == new...
{ "repo_name": "adrianbeloqui/Python", "path": "domino_tiles_reworked.py", "copies": "1", "size": "1632", "license": "mit", "hash": -441264587387693500, "line_mean": 33.7446808511, "line_max": 89, "alpha_frac": 0.5808823529, "autogenerated": false, "ratio": 3.1445086705202314, "config_test": fal...
from functools import * class INHooker: '''The IN Hook system. ''' # for hook registration __In_hooks__ = {} #OrderedDict() # to notify the callbacks of the interest about the new hook. hook_callbacks = {} ################### __ recusrsive hooks __ ###################### # context needs to be initiated b...
{ "repo_name": "vinoth3v/In", "path": "In/core/hooker.py", "copies": "1", "size": "11208", "license": "apache-2.0", "hash": 227922586459780960, "line_mean": 25.4964539007, "line_max": 145, "alpha_frac": 0.6372234118, "autogenerated": false, "ratio": 3.316957679786919, "config_test": false, "ha...
from functools import partial as curry from django import forms from django.utils import timezone from django.utils.text import slugify from django.utils.translation import ugettext_lazy as _ from pinax.images.models import ImageSet from .conf import settings from .models import Post, Revision, Section from .signals...
{ "repo_name": "pinax/pinax-blog", "path": "pinax/blog/forms.py", "copies": "1", "size": "4178", "license": "mit", "hash": 2936923382800509400, "line_mean": 26.1298701299, "line_max": 86, "alpha_frac": 0.5753949258, "autogenerated": false, "ratio": 3.956439393939394, "config_test": true, "has_...
from functools import partial as _partial from .formatstring import fmtstr black = _partial(fmtstr, style="black") red = _partial(fmtstr, style="red") green = _partial(fmtstr, style="green") yellow = _partial(fmtstr, style="yellow") blue = _partial(fmtstr, style="blue") magenta = _partial(fmtstr, style="magenta") cyan...
{ "repo_name": "sebastinas/curtsies", "path": "curtsies/fmtfuncs.py", "copies": "1", "size": "1045", "license": "mit", "hash": -2312427595971407000, "line_mean": 35.0344827586, "line_max": 54, "alpha_frac": 0.7062200957, "autogenerated": false, "ratio": 2.9353932584269664, "config_test": false, ...
from functools import partial, lru_cache from Levenshtein import hamming feature_order = ['syllabic', 'stress', 'long', 'consonantal', 'sonorant', 'continuant', 'delayedrelease', 'approximant', ...
{ "repo_name": "kdelwat/LangEvolve", "path": "engine/deparse.py", "copies": "1", "size": "3568", "license": "mit", "hash": 9019424864553604000, "line_mean": 30.8571428571, "line_max": 79, "alpha_frac": 0.5877242152, "autogenerated": false, "ratio": 4.421313506815365, "config_test": false, "has...
from functools import partialmethod as P from unittest.mock import MagicMock from ..CPU import CPU32 from ..FPU import binary80 from ..util import Instruction if __debug__: import logging logger = logging.getLogger(__name__) # FLD class FLD(Instruction): m_st = MagicMock(return_value=False) def __i...
{ "repo_name": "ForceBru/PyVM", "path": "VM/instructions/floating.py", "copies": "1", "size": "10127", "license": "mit", "hash": -5023852498283869000, "line_mean": 23.3389423077, "line_max": 86, "alpha_frac": 0.4462222222, "autogenerated": false, "ratio": 2.992021276595745, "config_test": false,...
from functools import partialmethod as P from unittest.mock import MagicMock from ..CPU import CPU32 from ..util import Instruction, to_int, to_signed, byteorder if __debug__: from ..debug import debug_operand, debug_register_operand import logging logger = logging.getLogger(__name__) MAXVALS = [None, (1...
{ "repo_name": "ForceBru/PyVM", "path": "VM/instructions/control.py", "copies": "1", "size": "14663", "license": "mit", "hash": 8536883855305437000, "line_mean": 24.4124783362, "line_max": 130, "alpha_frac": 0.4838027689, "autogenerated": false, "ratio": 3.2001309471846353, "config_test": false,...
from functools import partialmethod from flask import flash, url_for, redirect from wtforms import fields, validators import wtforms.fields.html5 as html5_fields from flask_wtf import FlaskForm from flask_wtf.file import FileAllowed from fernet import db, images from fernet.models import User, UserTag from fernet.util ...
{ "repo_name": "teknologkoren/fernet", "path": "fernet/forms.py", "copies": "1", "size": "10537", "license": "mpl-2.0", "hash": -6312307037982863000, "line_mean": 28.6816901408, "line_max": 79, "alpha_frac": 0.6004555376, "autogenerated": false, "ratio": 4.3559322033898304, "config_test": false,...
from functools import partialmethod import itertools import logging import random import pandas as pd import numpy as np __author__ = 'michael.p.schroeder@gmail.com' import multiprocessing as mp class MutExResult(object): def __init__(self, coverage, signal, higher_coverage_count, lower_coverage_count, permutat...
{ "repo_name": "mpschr/mutex", "path": "mutex/mutex.py", "copies": "1", "size": "6093", "license": "mit", "hash": -654653638130358700, "line_mean": 37.08125, "line_max": 121, "alpha_frac": 0.5995404563, "autogenerated": false, "ratio": 3.8784213876511777, "config_test": false, "has_no_keywords...
from functools import partialmethod base = 'http://lms.nthu.edu.tw' class CourseRoute(): rules = { 'forum': 'forumlist', 'homework': 'hwlist', 'document': 'doclist', 'forum_detail': 'forumlist', 'homework_detail': 'hw', 'document_detail': 'doc', 'homework_...
{ "repo_name": "leVirve/iLms-nthu-API", "path": "ilms/route.py", "copies": "1", "size": "1743", "license": "mit", "hash": -2449156344603244000, "line_mean": 27.5737704918, "line_max": 110, "alpha_frac": 0.5576592083, "autogenerated": false, "ratio": 3.2824858757062145, "config_test": false, "h...
from functools import partial from acousticsim.main import analyze_file_segments from acousticsim.analysis.intensity import signal_to_intensity_praat as PraatIntensity_signal, \ file_to_intensity_praat as PraatIntensity_file from .segments import generate_utterance_segments from ..exceptions import AcousticError, ...
{ "repo_name": "samihuc/PolyglotDB", "path": "polyglotdb/acoustics/intensity.py", "copies": "1", "size": "2582", "license": "mit", "hash": 7939694592654586000, "line_mean": 42.0333333333, "line_max": 109, "alpha_frac": 0.6673121611, "autogenerated": false, "ratio": 4.14446227929374, "config_test...
from functools import partial from aiohttp_session import get_session from .cfg import cfg def message(request, message, level='info'): request.setdefault( cfg.REQUEST_FLASH_OUTGOING_KEY, []).append((message, level)) debug = partial(message, level='debug') info = partial(message, level='info') success ...
{ "repo_name": "imbolc/aiohttp-login", "path": "aiohttp_login/flash.py", "copies": "1", "size": "1100", "license": "isc", "hash": -5513786838899696000, "line_mean": 28.7297297297, "line_max": 68, "alpha_frac": 0.6609090909, "autogenerated": false, "ratio": 3.678929765886288, "config_test": false...
from functools import partial from base import DuplicateLabel from pyll.base import Apply from pyll import scope from pyll import as_apply # # Hyperparameter Types # @scope.define def hyperopt_param(label, obj): """ A graph node primarily for annotating - VectorizeHelper looks out for these guys, and optimize...
{ "repo_name": "jaberg/hyperopt", "path": "hyperopt/pyll_utils.py", "copies": "3", "size": "5716", "license": "bsd-3-clause", "hash": 809872000066592400, "line_mean": 29.0842105263, "line_max": 88, "alpha_frac": 0.5787263821, "autogenerated": false, "ratio": 4.068327402135231, "config_test": fal...
from functools import partial from bluesky.standard_config import * from bluesky.scans import * from bluesky.callbacks import * from bluesky.broker_callbacks import * from bluesky.suspenders import * # Set up required metadata fields with dummy values for now. gs.RE.md['group'] = '' gs.RE.md['config'] = {} gs.RE.md['b...
{ "repo_name": "NSLS-II-SRX/ipython_ophyd", "path": "profile_bs/startup/01-bluesky.py", "copies": "1", "size": "1235", "license": "bsd-2-clause", "hash": 3936228929463587000, "line_mean": 41.5862068966, "line_max": 119, "alpha_frac": 0.6372469636, "autogenerated": false, "ratio": 2.865429234338747...
from functools import partial from boardFrame import BoardFrame from board import Board from Tkinter import * from pubsub import pub from ai import AI class BoardController: def __init__(self): self.root = Tk() w, h = self.root.winfo_screenwidth()/2, self.root.winfo_scree...
{ "repo_name": "statox/pylitaire", "path": "src/boardController.py", "copies": "1", "size": "5496", "license": "mit", "hash": 3706025641421150000, "line_mean": 39.4117647059, "line_max": 109, "alpha_frac": 0.624636099, "autogenerated": false, "ratio": 4.151057401812689, "config_test": false, "...
from functools import partial from broca.tokenize import Tokenizer from broca.common.shared import spacy from broca.common.util import parallel, penn_to_wordnet from broca.tokenize.keyword.rake import RAKETokenizer from gensim.models import Phrases from nltk.stem.wordnet import WordNetLemmatizer class OverkillTokeniz...
{ "repo_name": "ftzeng/broca", "path": "broca/tokenize/keyword/overkill.py", "copies": "2", "size": "2658", "license": "mit", "hash": 1445650539983239200, "line_mean": 33.9736842105, "line_max": 113, "alpha_frac": 0.568096313, "autogenerated": false, "ratio": 3.553475935828877, "config_test": fa...
from functools import partial from celery.schedules import crontab from celery.task import periodic_task from corehq.apps.commtrack.models import CommTrackUser, SupplyPointCase from corehq.apps.sms.api import send_sms_to_verified_number from custom.ilsgateway.models import SupplyPointStatus, SupplyPointStatusTypes, Sup...
{ "repo_name": "SEL-Columbia/commcare-hq", "path": "custom/ilsgateway/reminders/delivery.py", "copies": "1", "size": "3141", "license": "bsd-3-clause", "hash": -598844753103776100, "line_mean": 45.8955223881, "line_max": 134, "alpha_frac": 0.7026424706, "autogenerated": false, "ratio": 3.309799789...
from functools import partial from collections.abc import Iterator from toolz.compatibility import iteritems, map from toolz import assoc from .utils import transitive_get as walk from .variable import Var, var, isvar from .dispatch import dispatch ################ # Reificiation # ################ @dispatch(Iterato...
{ "repo_name": "mrocklin/unification", "path": "unification/core.py", "copies": "1", "size": "2452", "license": "bsd-3-clause", "hash": -8888234438738700000, "line_mean": 20.1379310345, "line_max": 59, "alpha_frac": 0.5383360522, "autogenerated": false, "ratio": 2.8578088578088576, "config_test"...
from functools import partial from collections.abc import MutableSequence class BasePoolArray(BaseBuiltinWithGDObjOwnership, MutableSequence): __slots__ = () GD_TYPE = None def _gd_to_py(self, value): return self._contained_cls.build_from_gdobj(value) def _py_to_gd(self, value): self...
{ "repo_name": "razvanc-r/godot-python", "path": "pythonscript/cffi_bindings/builtin_pool_arrays.inc.py", "copies": "1", "size": "6098", "license": "mit", "hash": -5106850801166408000, "line_mean": 32.1413043478, "line_max": 137, "alpha_frac": 0.5878976714, "autogenerated": false, "ratio": 3.26445...
from functools import partial from collections import Collection, Mapping import asyncio import aiofiles import os from peewee import Func from peewee import Field class csv_writer: def __init__(self,fh,fieldnames=None,delimiter=','): self.fh = fh self.delimiter = delimiter if fieldnames: ...
{ "repo_name": "Python-Tools/aioorm", "path": "aioorm/utils/csv_utils/csv_dump.py", "copies": "1", "size": "2707", "license": "mpl-2.0", "hash": 8959602636732554000, "line_mean": 28.4239130435, "line_max": 92, "alpha_frac": 0.5397118581, "autogenerated": false, "ratio": 4.126524390243903, "confi...
from functools import partial from collections import Counter from django import forms from django.conf import settings from django.contrib import admin from django.contrib.auth import get_user_model from django.contrib.admin.widgets import FilteredSelectMultiple from django.db.models import TextField from django.db i...
{ "repo_name": "City-of-Helsinki/kerrokantasi", "path": "democracy/admin/__init__.py", "copies": "1", "size": "15122", "license": "mit", "hash": -410380793452284900, "line_mean": 37.7666666667, "line_max": 114, "alpha_frac": 0.6449500628, "autogenerated": false, "ratio": 4.102849389416553, "conf...
from functools import partial from collections import Counter from ...external.qt.QtGui import (QWidget, QSlider, QLabel, QComboBox, QHBoxLayout, QVBoxLayout) from ...external.qt.QtCore import Qt, Signal from ..widget_properties import (TextProperty, ...
{ "repo_name": "bsipocz/glue", "path": "glue/qt/widgets/data_slice_widget.py", "copies": "1", "size": "6320", "license": "bsd-3-clause", "hash": 775078417938795400, "line_mean": 27.9908256881, "line_max": 75, "alpha_frac": 0.5224683544, "autogenerated": false, "ratio": 4.1172638436482085, "confi...
from functools import partial from collections import defaultdict, namedtuple import os import threading import sublime_plugin import sublime p = namedtuple('Project', ['name', 'match']) #How many files do we want to keep in our history number_of_recent_files = 500 #put this in front of directories to make it easy...
{ "repo_name": "toddsifleet/sublime_open", "path": "sublime_open.py", "copies": "1", "size": "18027", "license": "mit", "hash": 3598291995291298300, "line_mean": 33.0150943396, "line_max": 116, "alpha_frac": 0.5887834914, "autogenerated": false, "ratio": 4.008672448298866, "config_test": false, ...
from functools import partial from collections import defaultdict from time import time, sleep from itertools import count as itercount try: from itertools import imap except ImportError: # In python3, map is now lazy. imap = map try: from itertools import ifilter except ImportError: # In python3, m...
{ "repo_name": "andrewguy9/farmfs", "path": "farmfs/util.py", "copies": "1", "size": "5276", "license": "mit", "hash": 1065105555760289500, "line_mean": 22.1403508772, "line_max": 121, "alpha_frac": 0.6231993935, "autogenerated": false, "ratio": 3.5103127079174983, "config_test": false, "has_n...
from functools import partial from collections import defaultdict import json import warnings from distutils.version import LooseVersion import pandas as pd import pyarrow as pa import pyarrow.parquet as pq from ....utils import getargspec from ..utils import _get_pyarrow_dtypes, _meta_from_dtypes from ...utils import...
{ "repo_name": "blaze/dask", "path": "dask/dataframe/io/parquet/arrow.py", "copies": "1", "size": "40090", "license": "bsd-3-clause", "hash": -730241780850876700, "line_mean": 35.9493087558, "line_max": 88, "alpha_frac": 0.5235719631, "autogenerated": false, "ratio": 4.407431838170624, "config_t...
from functools import partial from collections import defaultdict import re from adder import problem, logic from adder.logic import (Braces, LogicOperator, DefiniteClause, standardize_variables, StandartizationReplacer, skolemize, unify, unify_substitutions, substitut...
{ "repo_name": "NikolaDimitroff/Adder", "path": "adder/fologic.py", "copies": "1", "size": "7026", "license": "mit", "hash": 781592235168366800, "line_mean": 34.4848484848, "line_max": 86, "alpha_frac": 0.61058924, "autogenerated": false, "ratio": 3.8414434117003826, "config_test": false, "has...
from functools import partial from collections import defaultdict from .models import UNTITLED_ARTIST, UNTITLED_ALBUM FIELDS_ORDER = [ 'id', 'source', 'source_id', 'title', 'number', 'mbid', 'artist_mbid', 'album_mbid' ] def compress_tracks_to_json(tracks): """ Serialize tra...
{ "repo_name": "seem-sky/cloudtunes", "path": "cloudtunes-server/cloudtunes/library/utils.py", "copies": "14", "size": "1042", "license": "bsd-3-clause", "hash": 7332052926431564000, "line_mean": 22.1555555556, "line_max": 72, "alpha_frac": 0.5537428023, "autogenerated": false, "ratio": 3.74820143...
from functools import partial from collections import defaultdict from pygoap.actions import Action from pygoap.goals import * from pygoap.precepts import * from storymaker.english import make_english def get_known_agents(agent): """get all known entities at this point do by checking for "name" DatumPrecepts...
{ "repo_name": "bitcraft/storymaker", "path": "storymaker/actions.py", "copies": "1", "size": "4398", "license": "mit", "hash": 160214806564324320, "line_mean": 26.835443038, "line_max": 80, "alpha_frac": 0.6170986812, "autogenerated": false, "ratio": 3.7946505608283, "config_test": false, "ha...
from functools import partial from collections import defaultdict import sqlalchemy from ..types import String, Integer from ..graph import Nothing, Maybe, One, Many from ..engine import pass_context def _translate_type(column): if isinstance(column.type, sqlalchemy.Integer): return Integer elif isi...
{ "repo_name": "vmagamedov/hiku", "path": "hiku/sources/sqlalchemy.py", "copies": "1", "size": "4903", "license": "bsd-3-clause", "hash": 5835504299556532, "line_mean": 31.045751634, "line_max": 77, "alpha_frac": 0.5737303692, "autogenerated": false, "ratio": 3.8667192429022084, "config_test": f...
from functools import partial from collections import defaultdict class FSM(object): """ A simple finite state machine that defines a set of states and the transitions between those states. The constructor takes the name of the initial state, a list of transitions, and a dictionary of callbacks. `...
{ "repo_name": "calebsmith/yape", "path": "yape/fsm.py", "copies": "1", "size": "7625", "license": "bsd-2-clause", "hash": 6797321831755299000, "line_mean": 41.8370786517, "line_max": 96, "alpha_frac": 0.630557377, "autogenerated": false, "ratio": 4.565868263473054, "config_test": false, "has_...
from functools import partial from collections import deque from llvmlite import ir from numba.core.datamodel.registry import register_default from numba.core import types, cgutils from numba.np import numpy_support class DataModel(object): """ DataModel describe how a FE type is represented in the LLVM IR ...
{ "repo_name": "stonebig/numba", "path": "numba/core/datamodel/models.py", "copies": "3", "size": "44192", "license": "bsd-2-clause", "hash": -264198707642144770, "line_mean": 31.0929557008, "line_max": 83, "alpha_frac": 0.6056299783, "autogenerated": false, "ratio": 3.7751580386126773, "config_...
from functools import partial from collections import deque from tornado.ioloop import IOLoop from ..commands import command, define_command from ..entity import entity_method from .. import actions, events @entity_method def teleport(self, dest_path): """ Moves the entity directly to the specified destinati...
{ "repo_name": "wirefish/amber", "path": "amber/systems/movement.py", "copies": "1", "size": "5201", "license": "bsd-3-clause", "hash": -6185169918418863000, "line_mean": 34.6232876712, "line_max": 97, "alpha_frac": 0.6402614882, "autogenerated": false, "ratio": 3.8270787343635027, "config_test"...
from functools import partial from collections import namedtuple, defaultdict import struct from zorro.util import cached_property try: from .shm import ShmPixbuf except ImportError: import warnings warnings.warn('Shm is not available, expect poor performance.') try: from .pixbuf import Pixbuf except...
{ "repo_name": "tailhook/tilenol", "path": "tilenol/xcb/core.py", "copies": "1", "size": "7370", "license": "mit", "hash": 3988127496228673500, "line_mean": 28.8380566802, "line_max": 79, "alpha_frac": 0.5362279512, "autogenerated": false, "ratio": 3.8048528652555498, "config_test": false, "ha...
from functools import partial from collections import namedtuple from copy import copy from http.cookies import SimpleCookie from urllib.parse import urlparse, urljoin from pulsar.api import PulsarException from pulsar.apps.ws import WebSocketProtocol, WS from pulsar.utils.httpurl import ( REDIRECT_CODES, requote_...
{ "repo_name": "quantmind/pulsar", "path": "pulsar/apps/http/plugins.py", "copies": "1", "size": "7783", "license": "bsd-3-clause", "hash": -209100073886835870, "line_mean": 29.5215686275, "line_max": 79, "alpha_frac": 0.5979699345, "autogenerated": false, "ratio": 4.345616973757677, "config_tes...
from functools import partial from collections import namedtuple from copy import copy from urllib.parse import urlparse, urljoin from pulsar import OneTime, Future, task from pulsar.apps.ws import WebSocketProtocol, WS from pulsar.utils.internet import is_tls from pulsar.utils.httpurl import REDIRECT_CODES, requote_u...
{ "repo_name": "tempbottle/pulsar", "path": "pulsar/apps/http/plugins.py", "copies": "5", "size": "7367", "license": "bsd-3-clause", "hash": 477573883161826500, "line_mean": 31.8883928571, "line_max": 79, "alpha_frac": 0.6170761504, "autogenerated": false, "ratio": 4.300642148277875, "config_tes...
from functools import partial from collections import namedtuple import xml.dom from prang.simplification import PrangException class PrangNode(): def __init__(self, attrs, children): self._attrs = attrs self._children = tuple(children) @property def attrs(self): return self._attr...
{ "repo_name": "tlocke/prang", "path": "prang/validation.py", "copies": "1", "size": "19766", "license": "mit", "hash": -2662663556738130400, "line_mean": 27.3180515759, "line_max": 79, "alpha_frac": 0.5563088131, "autogenerated": false, "ratio": 3.61815852095918, "config_test": false, "has_no...
from functools import partial from collections import namedtuple import numpy as np import theano import theano.tensor as T from neupy import algorithms from neupy.utils import asfloat import neupy.algorithms.gd.conjgrad as cg from data import simple_input_train, simple_target_train from utils import compare_network...
{ "repo_name": "stczhc/neupy", "path": "tests/algorithms/gd/test_conjgrad.py", "copies": "1", "size": "4244", "license": "mit", "hash": 3931742541242882000, "line_mean": 31.3969465649, "line_max": 76, "alpha_frac": 0.472667295, "autogenerated": false, "ratio": 4.317395727365208, "config_test": t...
from functools import partial from collections import OrderedDict from werkzeug.local import LocalProxy from werkzeug.datastructures import MultiDict from flask import request, current_app, get_template_attribute from .utils import get_url _anyform = LocalProxy(lambda: current_app.extensions['anyform']) _endpoints = ...
{ "repo_name": "fc-thrisp-hurrata-dlm-graveyard/flask-anyform", "path": "flask_anyform/anyform.py", "copies": "1", "size": "5176", "license": "mit", "hash": 3572110241266112500, "line_mean": 30.5609756098, "line_max": 93, "alpha_frac": 0.595633694, "autogenerated": false, "ratio": 3.68398576512455...
from functools import partial from collections import OrderedDict import json import warnings import pandas as pd import pyarrow as pa import pyarrow.parquet as pq from pyarrow.compat import guid from ....utils import natural_sort_key, getargspec from ..utils import _get_pyarrow_dtypes, _meta_from_dtypes from ...utils...
{ "repo_name": "ContinuumIO/dask", "path": "dask/dataframe/io/parquet/arrow.py", "copies": "1", "size": "31580", "license": "bsd-3-clause", "hash": -7615407034314589000, "line_mean": 39.3320561941, "line_max": 87, "alpha_frac": 0.5242241925, "autogenerated": false, "ratio": 4.4560462819246505, "...
from functools import partial from collections import OrderedDict try: import shiboken except ImportError: from PySide import shiboken from PySide import QtGui, QtCore from jukeboxcore.gui.main import JB_MainWindow class WidgetToolTip(QtGui.QWidget): """A ToolTip that can be installed on a widget via :m...
{ "repo_name": "JukeboxPipeline/jukebox-core", "path": "src/jukeboxcore/gui/widgets/tooltip.py", "copies": "1", "size": "14267", "license": "bsd-3-clause", "hash": -1364760232753933600, "line_mean": 33.5447941889, "line_max": 140, "alpha_frac": 0.6111305811, "autogenerated": false, "ratio": 4.3285...
from functools import partial from collections import Sequence from flask import Blueprint, g, abort, Response, jsonify, request, \ render_template, escape from werkzeug.utils import cached_property from flask.ext.introspect import Tree, TreeRootView, NOTEXIST def setup_tree( objects, root_class, roo...
{ "repo_name": "denz/flask_introspect", "path": "flask_introspect/rest.py", "copies": "1", "size": "2616", "license": "bsd-3-clause", "hash": -4090849128459230700, "line_mean": 24.3980582524, "line_max": 78, "alpha_frac": 0.5967125382, "autogenerated": false, "ratio": 3.8584070796460175, "config...
from functools import partial from ...compat.collections import Counter from ...external.qt.QtGui import (QWidget, QSlider, QLabel, QComboBox, QHBoxLayout, QVBoxLayout) from ...external.qt.QtCore import Qt, Signal from ..widget_properties import (TextProperty, ...
{ "repo_name": "JudoWill/glue", "path": "glue/qt/widgets/data_slice_widget.py", "copies": "1", "size": "6642", "license": "bsd-3-clause", "hash": -7086894498370508000, "line_mean": 27.5064377682, "line_max": 75, "alpha_frac": 0.5264980428, "autogenerated": false, "ratio": 4.128029832193909, "con...
from functools import partial from .compatibility import wraps __all__ = ('unwrap', 'kwargs_decorator') def unwrap(func, stop=None): """Backport of Python 3.4's inspect.unwrap function. Retrieves the object wrapped by func, following the chain of __wrapped__ attributes to reach the originally wrapped obj...
{ "repo_name": "justanr/toolshed", "path": "toolshed/funcs.py", "copies": "1", "size": "3718", "license": "bsd-3-clause", "hash": 3194004190168260600, "line_mean": 30.5084745763, "line_max": 77, "alpha_frac": 0.5790747714, "autogenerated": false, "ratio": 3.840909090909091, "config_test": false,...
from functools import partial from compat import izip from generics import GenericType, is_generic, ImpT def split_implicits(types): cTypes = [] imps = [] for t in types: (cTypes if isinstance(t, type) else imps).append(t) return cTypes, imps def resolve_generics(types, ret): generics = ...
{ "repo_name": "Refefer/ptype", "path": "ptype/function.py", "copies": "1", "size": "5727", "license": "apache-2.0", "hash": -8863907628352269000, "line_mean": 28.5206185567, "line_max": 80, "alpha_frac": 0.5351842151, "autogenerated": false, "ratio": 3.6664532650448143, "config_test": false, ...
from functools import partial from .compat import wraps __all__ = ('optional_kwargs', 'annotate', 'method_optional_kwargs') def optional_kwargs(deco): """This is a decorator-decorator (a metadecorator if you will) that allows creating decorators that accept keyword arguments. It's a relatively simple tr...
{ "repo_name": "justanr/pynads", "path": "pynads/utils/decorators.py", "copies": "1", "size": "4578", "license": "mit", "hash": 3109199107360857000, "line_mean": 27.6125, "line_max": 78, "alpha_frac": 0.5548274356, "autogenerated": false, "ratio": 4.286516853932584, "config_test": false, "has_...
from functools import partial from compony.core import create_element def generate_element_function(tag_name, self_closing=False, multiline=True): """ (tag_name: str, self_closing: bool, multiline: bool) -> Callable """ return partial(create_element, tag_name, self_closing, multiline) e = generate_el...
{ "repo_name": "mbylstra/compony", "path": "compony/elements.py", "copies": "1", "size": "3162", "license": "mit", "hash": 8886071996029545000, "line_mean": 19.6666666667, "line_max": 76, "alpha_frac": 0.6084756483, "autogenerated": false, "ratio": 2.7118353344768438, "config_test": false, "ha...
from functools import partial from context import Scope, Symbol from type_objects import Bool, Num, Str, List, Tuple, Set, BaseTuple, \ Dict, Function, Instance, Unknown, NoneType, Class, Union, Maybe from evaluate import static_evaluate, UnknownValue from util import unify_types, type_intersection, type_subset fro...
{ "repo_name": "clark800/pystarch", "path": "backend/expr.py", "copies": "1", "size": "16129", "license": "mit", "hash": 6330930879317508000, "line_mean": 42.1256684492, "line_max": 79, "alpha_frac": 0.5828631657, "autogenerated": false, "ratio": 4.30221392371299, "config_test": false, "has_no...
from functools import partial from Cookie import SimpleCookie from intranet3.asyncfetchers.trac import TracFetcher from intranet3.asyncfetchers.base import FetchException, cached_bug_fetcher from intranet3.log import INFO_LOG, DEBUG_LOG LOG = INFO_LOG(__name__) DEBUG = DEBUG_LOG(__name__) class CookieTracFetcher(Tra...
{ "repo_name": "pytlakp/intranetref", "path": "src/intranet3/asyncfetchers/cookietrac.py", "copies": "1", "size": "3421", "license": "mit", "hash": -4869953910187609000, "line_mean": 44.0131578947, "line_max": 137, "alpha_frac": 0.6407483192, "autogenerated": false, "ratio": 3.6706008583690988, ...
from functools import partial from corehq.form_processor.interfaces.dbaccessors import CaseAccessors from dimagi.utils.dates import force_to_datetime import fluff from corehq.fluff.calculators.case import CasePropertyFilter from custom.world_vision import WORLD_VISION_DOMAINS from corehq.apps.users.models import CommCa...
{ "repo_name": "qedsoftware/commcare-hq", "path": "custom/world_vision/models.py", "copies": "1", "size": "7686", "license": "bsd-3-clause", "hash": 3901417431859225000, "line_mean": 38.0152284264, "line_max": 140, "alpha_frac": 0.691907364, "autogenerated": false, "ratio": 3.2065081351689613, "...
from functools import partial from .core import unify, reify from .variable import var from .dispatch import dispatch def unifiable(cls): """ Register standard unify and reify operations on class This uses the type and __dict__ or __slots__ attributes to define the nature of the term See Also: ...
{ "repo_name": "mrocklin/unification", "path": "unification/more.py", "copies": "1", "size": "2874", "license": "bsd-3-clause", "hash": -7403693045690377000, "line_mean": 21.992, "line_max": 73, "alpha_frac": 0.4846903271, "autogenerated": false, "ratio": 3.0770877944325483, "config_test": false...
from functools import partial from corpustools.corpus.classes import Word from corpustools.symbolsim.khorsi import khorsi from corpustools.symbolsim.edit_distance import edit_distance from corpustools.symbolsim.phono_edit_distance import phono_edit_distance from corpustools.exceptions import StringSimilarityError def...
{ "repo_name": "PhonologicalCorpusTools/CorpusTools", "path": "corpustools/symbolsim/string_similarity.py", "copies": "1", "size": "5556", "license": "bsd-3-clause", "hash": 5981188909054042000, "line_mean": 37.3172413793, "line_max": 107, "alpha_frac": 0.5966522678, "autogenerated": false, "ratio...
from functools import partial from couchdbkit import ResourceNotFound from couchdbkit.ext.django.schema import * import itertools from corehq.apps.cachehq.mixins import CachedCouchDocumentMixin from dimagi.utils.couch.database import iter_docs from dimagi.utils.decorators.memoized import memoized from datetime import d...
{ "repo_name": "benrudolph/commcare-hq", "path": "corehq/apps/locations/models.py", "copies": "1", "size": "21779", "license": "bsd-3-clause", "hash": 7514116045174328000, "line_mean": 32.8709175739, "line_max": 126, "alpha_frac": 0.6025070022, "autogenerated": false, "ratio": 4.124810606060606, ...
from functools import partial from ...custom_tag_index import custom_tag_index from ... import utils SIDE_COLOR = "color(var(--orangish) blend(var(--background) 60%))" def get_inline_documentation(cfml_view, doc_type): if not cfml_view.project_name: return None if cfml_view.view.match_selector(cfml...
{ "repo_name": "jcberquist/sublimetext-cfml", "path": "src/plugins_/custom_tags/documentation.py", "copies": "2", "size": "1671", "license": "mit", "hash": -4433611294972765000, "line_mean": 29.9444444444, "line_max": 82, "alpha_frac": 0.5954518253, "autogenerated": false, "ratio": 3.263671875, ...
from functools import partial from datetime import datetime from logbook import Logger from .sync import sync, fast_sync, regular assert regular from .mod import mod log = Logger(__name__) def has(backend, kind, text): return backend.has_filled_query_bi_kind_and_text(kind, text) def query(backend, kind, text,...
{ "repo_name": "Answeror/torabot", "path": "torabot/core/query.py", "copies": "1", "size": "2054", "license": "mit", "hash": -4385720599757784000, "line_mean": 29.2058823529, "line_max": 81, "alpha_frac": 0.558909445, "autogenerated": false, "ratio": 3.9198473282442747, "config_test": false, "...
from functools import partial from datetime import datetime, timedelta, time from collections import MutableMapping import numpy as np from pandas._libs import tslib from pandas._libs.tslibs.strptime import array_strptime from pandas._libs.tslibs import parsing, conversion from pandas._libs.tslibs.parsing import ( #...
{ "repo_name": "pratapvardhan/pandas", "path": "pandas/core/tools/datetimes.py", "copies": "1", "size": "30078", "license": "bsd-3-clause", "hash": 7349405014616780000, "line_mean": 33.4536082474, "line_max": 79, "alpha_frac": 0.570117694, "autogenerated": false, "ratio": 4.220289041672513, "con...
from functools import partial from datetime import datetime, timedelta, time from collections import MutableMapping import numpy as np from pandas._libs import tslib, tslibs from pandas._libs.tslibs.strptime import array_strptime from pandas._libs.tslibs import parsing, conversion, Timestamp from pandas._libs.tslibs....
{ "repo_name": "kdebrab/pandas", "path": "pandas/core/tools/datetimes.py", "copies": "1", "size": "30058", "license": "bsd-3-clause", "hash": -3882714463341317000, "line_mean": 33.43069874, "line_max": 79, "alpha_frac": 0.5700312729, "autogenerated": false, "ratio": 4.228756330894766, "config_te...
from functools import partial from datetime import datetime, time from collections import MutableMapping import numpy as np from pandas._libs import tslib, tslibs from pandas._libs.tslibs.strptime import array_strptime from pandas._libs.tslibs import parsing, conversion, Timestamp from pandas._libs.tslibs.parsing imp...
{ "repo_name": "cython-testbed/pandas", "path": "pandas/core/tools/datetimes.py", "copies": "4", "size": "30680", "license": "bsd-3-clause", "hash": 4453117511039858700, "line_mean": 34.0628571429, "line_max": 79, "alpha_frac": 0.5672425033, "autogenerated": false, "ratio": 4.278343327290475, "c...
from functools import partial from datetime import timedelta from tornado import gen from tornadoredis import Client from tornadoredis.exceptions import ResponseError from tornadoredis.pubsub import BaseSubscriber class CelerySubscriber(BaseSubscriber): def unsubscribe_channel(self, channel_name): """Uns...
{ "repo_name": "mher/tornado-celery", "path": "tcelery/redis.py", "copies": "1", "size": "2812", "license": "bsd-3-clause", "hash": 5428786467046942000, "line_mean": 37.5205479452, "line_max": 83, "alpha_frac": 0.6233997155, "autogenerated": false, "ratio": 4.299694189602446, "config_test": fals...
from functools import partial from dateutil import rrule from corehq.apps.locations.dbaccessors import get_one_user_at_location from corehq.apps.locations.models import SQLLocation, Location from corehq.apps.reports.datatables import DataTablesHeader, DataTablesColumn from corehq.apps.users.models import CommCareUser f...
{ "repo_name": "puttarajubr/commcare-hq", "path": "custom/ilsgateway/tanzania/reports/randr.py", "copies": "1", "size": "9532", "license": "bsd-3-clause", "hash": -3221698666377305600, "line_mean": 41.7443946188, "line_max": 114, "alpha_frac": 0.5675618968, "autogenerated": false, "ratio": 4.30338...
from functools import partial from dateutil.parser import parse from xml.etree import ElementTree as ET from pyramid.decorator import reify from intranet3.asyncfetchers.base import ( BaseFetcher, CSVParserMixin, SimpleProtocol, BasicAuthMixin, FetchException, Bug, cached_bug_fetcher ) from intranet3 import he...
{ "repo_name": "pytlakp/intranetref", "path": "src/intranet3/asyncfetchers/bugzilla.py", "copies": "1", "size": "13440", "license": "mit", "hash": -5482245253591781000, "line_mean": 38.884272997, "line_max": 156, "alpha_frac": 0.5636160714, "autogenerated": false, "ratio": 3.8609594943981613, "c...
from functools import partial from difflib import HtmlDiff import random import string import base64 import copy from pathlib import Path from collections.abc import Mapping import black import pandas as pd from IPython.display import HTML, Image from jinja2 import Environment, PackageLoader from .NotebookIntrospecto...
{ "repo_name": "edublancas/sklearn-evaluation", "path": "src/sklearn_evaluation/nb/NotebookCollection.py", "copies": "1", "size": "10961", "license": "mit", "hash": 6919255241869113000, "line_mean": 29.7030812325, "line_max": 152, "alpha_frac": 0.5897272147, "autogenerated": false, "ratio": 3.9556...
from functools import partial from dimagi.utils.dates import force_to_datetime import fluff from corehq.fluff.calculators.case import CasePropertyFilter from custom.world_vision import WORLD_VISION_DOMAINS from corehq.apps.users.models import CommCareUser, CommCareCase from custom.utils.utils import flat_field from cus...
{ "repo_name": "puttarajubr/commcare-hq", "path": "custom/world_vision/models.py", "copies": "2", "size": "7599", "license": "bsd-3-clause", "hash": 2811377786907437600, "line_mean": 38.578125, "line_max": 140, "alpha_frac": 0.68838005, "autogenerated": false, "ratio": 3.1915161696766066, "confi...
from functools import partial from django.conf import settings from django.template.loader import render_to_string from django.core.urlresolvers import reverse from django import template import pytz from django.utils.html import escape from django.utils.translation import ugettext as _ from couchdbkit.exceptions impo...
{ "repo_name": "benrudolph/commcare-hq", "path": "corehq/apps/reports/templatetags/xform_tags.py", "copies": "1", "size": "6974", "license": "bsd-3-clause", "hash": 3550223074278264300, "line_mean": 34.2222222222, "line_max": 136, "alpha_frac": 0.6304846573, "autogenerated": false, "ratio": 3.5491...
from functools import partial from django.contrib.auth.models import User from rest_framework import serializers, fields from contact.models import (Contact, Skill, ContactMail, ContactPhone, ContactAddress, Group, ContactErrorDuplicate, ContactErrorMultiple) from...
{ "repo_name": "NoumirPoutipou/oanq", "path": "api/serializers.py", "copies": "1", "size": "12780", "license": "bsd-3-clause", "hash": -368433609351312300, "line_mean": 36.5882352941, "line_max": 86, "alpha_frac": 0.5781690141, "autogenerated": false, "ratio": 4.28140703517588, "config_test": fa...
from functools import partial from django.contrib import admin, messages from .models import Grain, Hop, UserOrder, Supplier, OrderItem, SupplierOrder, OrdersEnabled, Surcharge from orders.forms import SupplierOrderAdminForm class IngredientAdmin(admin.ModelAdmin): list_display = ("name", "supplier_name", "unit_c...
{ "repo_name": "gkampjes/ucbc", "path": "orders/admin.py", "copies": "2", "size": "4003", "license": "mit", "hash": -6952299718924593000, "line_mean": 35.3909090909, "line_max": 128, "alpha_frac": 0.6989757682, "autogenerated": false, "ratio": 3.6523722627737225, "config_test": false, "has_no_...
from functools import partial from django.db.models import Avg from django.http import HttpResponse import json from core.models import DBDataSource, GameResult, Entity from logic.Akinator import Akinator from logic.AkinatorDataSource import ANSWERS sessions_pool = {} ANSWERS_MAP = { 0: ANSWERS.YES, 1: ANSWE...
{ "repo_name": "igor-kondratiev/akinator", "path": "akinator/core/views.py", "copies": "1", "size": "3372", "license": "mit", "hash": 2209695644066472400, "line_mean": 23.4347826087, "line_max": 96, "alpha_frac": 0.631376038, "autogenerated": false, "ratio": 3.7466666666666666, "config_test": fa...
from functools import partial from django import template from django.template.base import TagHelperNode, token_kwargs from django.template.defaultfilters import safe register = template.Library() class EmailContentTransform(TagHelperNode): def __init__(self, tag_name, parser, token): self.tag_name = tag...
{ "repo_name": "jiaaro/django-alert", "path": "alert/templatetags/alert_email_tags.py", "copies": "1", "size": "2410", "license": "mit", "hash": 2340435386034712600, "line_mean": 29.5189873418, "line_max": 78, "alpha_frac": 0.6273858921, "autogenerated": false, "ratio": 3.843700159489633, "confi...
from functools import partial from django import template from django.template import Context from django.template.base import Node, TemplateSyntaxError from ..compat import generic_tag_compiler, getargspec register = template.Library() def lazy_tag(self, func=None, takes_context=None, name=None, node_class=None): ...
{ "repo_name": "5monkeys/djedi-cms", "path": "djedi/templatetags/template.py", "copies": "1", "size": "2813", "license": "bsd-3-clause", "hash": 3192461349134118000, "line_mean": 37.0135135135, "line_max": 103, "alpha_frac": 0.6139353004, "autogenerated": false, "ratio": 4.486443381180223, "conf...
from functools import partial from django.shortcuts import render_to_response from django.template import RequestContext from . import models def blog_list(request): blogs = models.Blog.objects.all() return render_to_response('fn_blog/blog_list.html', locals(), context_instance...
{ "repo_name": "fengb/fn", "path": "fn_blog/views.py", "copies": "1", "size": "1519", "license": "bsd-3-clause", "hash": -5024991397985506000, "line_mean": 34.3255813953, "line_max": 81, "alpha_frac": 0.6741277156, "autogenerated": false, "ratio": 3.8553299492385786, "config_test": false, "has...
from functools import partial from email.utils import unquote from email.mime.image import MIMEImage from django.core.mail import make_msgid from django.utils.module_loading import import_string from django.conf import settings import six def _get_klass_from_config(config_variable, default): klass_path = getatt...
{ "repo_name": "BradWhittington/django-templated-email", "path": "templated_email/utils.py", "copies": "1", "size": "1791", "license": "mit", "hash": 9175526399067090000, "line_mean": 26.5538461538, "line_max": 81, "alpha_frac": 0.6700167504, "autogenerated": false, "ratio": 3.7705263157894735, ...
from functools import partial from enum import Enum from os import rename import subprocess SOURCE_FILE_NAME = 'packages.txt' OUTPUT_FILE_NAME = 'packages.results.txt' OLD_FILE_NAME = 'packages.old.txt' class bcolors: HEADER = '\033[95m' OKBLUE = '\033[94m' OKGREEN = '\033[92m' WARNING = '\033[93m...
{ "repo_name": "kriswithank/apt-marker", "path": "apt-marker.py", "copies": "1", "size": "3636", "license": "mit", "hash": -6699307571378592000, "line_mean": 24.7872340426, "line_max": 125, "alpha_frac": 0.5533553355, "autogenerated": false, "ratio": 3.4661582459485225, "config_test": false, "...
from functools import partial from enum import Enum from sentinels import NOTHING class InvalidCommand(DocDescribed, ValueError): "Command {name} was not found" def __init__(self, name): self.name = name class InvalidRevision(DocDescribed, Exception): "Expected {expected} revision but got {got}" ...
{ "repo_name": "Evgenus/revigred-server", "path": "revigred/model/graph/client.py", "copies": "1", "size": "6493", "license": "bsd-3-clause", "hash": -1981543705146031000, "line_mean": 29.919047619, "line_max": 86, "alpha_frac": 0.5858616972, "autogenerated": false, "ratio": 3.6559684684684686, ...
from functools import partial from .flacro import FlacroFor from flask import url_for class LiItem(FlacroFor): """A list item containing a link. Any kwargs left over will be passed to url creation :param li_tag: a tag for item :param kind: type of li item: plain(tag only), link, macro ...
{ "repo_name": "thrisp/flacro", "path": "flask_flacro/packaged_macros.py", "copies": "1", "size": "4965", "license": "mit", "hash": -8157126750519315000, "line_mean": 35.2408759124, "line_max": 110, "alpha_frac": 0.552265861, "autogenerated": false, "ratio": 3.669623059866962, "config_test": fal...
from functools import partial from fn.op import identity default_cmp = (lambda a,b: -1 if (a < b) else 1) class _MergeBased(object): def __nonzero__(self): return self.root is not None def __bool__(self): return self.__nonzero__() def __iter__(self): """Extract elements one-by-o...
{ "repo_name": "FunctionalX/FunctionalX.py", "path": "FunctionalX/src/fn/immutable/heap.py", "copies": "2", "size": "6562", "license": "mit", "hash": -5672335863462397000, "line_mean": 34.6630434783, "line_max": 89, "alpha_frac": 0.6266382201, "autogenerated": false, "ratio": 3.5956164383561644, ...
from functools import partial from _Framework.Util import group from Ubermap import UbermapDevices ubermap = UbermapDevices.UbermapDevices() """ Ubermap alpha v0.1: modified devices.py --------------------------------------- This file has been modified from the version edited by Stray on 10/26/13 to allow easy map...
{ "repo_name": "jim-cooley/abletonremotescripts", "path": "remote-scripts/samples/ubermap-master/Devices/Devices.py", "copies": "1", "size": "48999", "license": "apache-2.0", "hash": -5029983746829039000, "line_mean": 58.034939759, "line_max": 283, "alpha_frac": 0.6156452172, "autogenerated": false,...
from functools import partial from functional.util import compose, parallelize class ExecutionStrategies(object): """ Enum like object listing the types of execution strategies. """ PRE_COMPUTE = 0 PARALLEL = 1 class ExecutionEngine(object): """ Class to perform serial execution of a Se...
{ "repo_name": "EntilZha/ScalaFunctional", "path": "functional/execution.py", "copies": "2", "size": "2583", "license": "mit", "hash": -2396390930550984700, "line_mean": 32.9868421053, "line_max": 88, "alpha_frac": 0.6225319396, "autogenerated": false, "ratio": 5.207661290322581, "config_test": ...
from functools import partial from functools import partialmethod from django.db import models from django.db.models import Case from django.db.models import Max from django.db.models import Q from django.db.models import Subquery from django.db.models import When from django.db.models.functions import Coalesce from dj...
{ "repo_name": "ashleywaite/django-more", "path": "django_more/fields/orderbyfield.py", "copies": "1", "size": "9106", "license": "bsd-3-clause", "hash": 8983970108380691000, "line_mean": 49.032967033, "line_max": 123, "alpha_frac": 0.6416648364, "autogenerated": false, "ratio": 4.061552185548617,...
from functools import partial from functools import update_wrapper __author__ = "Christopher Henderson" __copyright__ = "Copyright 2015, Christopher Henderson" __license__ = "MIT" __version__ = "1.0.0" __maintainer__ = "Christopher Henderson" __email__ = "chris@chenderson.org" class Decorator(object): ''' D...
{ "repo_name": "christopher-henderson/Decorator", "path": "decorator.py", "copies": "1", "size": "5627", "license": "mit", "hash": 712447320455724500, "line_mean": 29.7486338798, "line_max": 88, "alpha_frac": 0.5661986849, "autogenerated": false, "ratio": 4.842512908777969, "config_test": false,...
from functools import partial from functools import wraps from flask import current_app from jsonschema import validate from flask import request from werkzeug.local import LocalProxy _fja = LocalProxy(lambda: current_app.extensions['flask_jsonschema_ext']) def generate_jsonschema(database_entity, parse_tree=None):...
{ "repo_name": "rachekalmir/flask-jsonschema-ext", "path": "flask_jsonschema_ext/core.py", "copies": "2", "size": "2393", "license": "mit", "hash": -4311446943045841000, "line_mean": 30.0779220779, "line_max": 110, "alpha_frac": 0.645215211, "autogenerated": false, "ratio": 4.147313691507799, "c...
from functools import partial from functools import wraps try: from unittest.mock import MagicMock except ImportError: from mock import MagicMock def doNothing(*args, **kwargs): ''' A test function that takes any arguments and does nothing. ''' doNothing.called = True doNothing.called = Fals...
{ "repo_name": "emrob/sleuth", "path": "test/fakemodule.py", "copies": "1", "size": "1126", "license": "mit", "hash": -8598728797562778000, "line_mean": 18.0847457627, "line_max": 62, "alpha_frac": 0.6731793961, "autogenerated": false, "ratio": 4.2330827067669174, "config_test": false, "has_no...
from functools import partial from glob import glob from itertools import chain from jsbuild.dependency import Dependency from jsbuild.logging import logger from jsbuild.manifest import Manifest from jsbuild.maps import get_class_by_format from jsbuild import templates import os.path import re clean_backdir = lambda p...
{ "repo_name": "azer/jsbuild", "path": "jsbuild/index.py", "copies": "1", "size": "3930", "license": "mit", "hash": 6466859445148958000, "line_mean": 32.3050847458, "line_max": 162, "alpha_frac": 0.6699745547, "autogenerated": false, "ratio": 3.438320209973753, "config_test": true, "has_no_key...
from functools import partial from hamcrest import assert_that, contains_string from hamcrest import not_ from allure_commons_test.report import has_test_case from allure_commons_test.result import with_status from allure_commons_test.result import has_step from allure_commons_test.result import has_attachment from all...
{ "repo_name": "allure-framework/allure-python", "path": "allure-behave/features/steps/report_steps.py", "copies": "1", "size": "6256", "license": "apache-2.0", "hash": 6278565976207351000, "line_mean": 38.3459119497, "line_max": 103, "alpha_frac": 0.7233056266, "autogenerated": false, "ratio": 3....
from functools import partial from hashlib import md5 import bleach from django.conf import settings from django.core.cache import cache from django.utils.safestring import mark_safe LONG_CACHE = 60 * 60 * 24 * 7 def cached_render(render_function, source, cache_tag, cache_time=LONG_CACHE): """Render a string t...
{ "repo_name": "mozilla/mozilla-ignite", "path": "apps/challenges/lib.py", "copies": "1", "size": "4237", "license": "bsd-3-clause", "hash": 1828373387150156800, "line_mean": 34.906779661, "line_max": 79, "alpha_frac": 0.6492801511, "autogenerated": false, "ratio": 4.432008368200837, "config_tes...
from functools import partial from html.parser import HTMLParser from typing import Any, Callable, Dict, List, Tuple from django.http import HttpRequest, HttpResponse from zerver.decorator import api_key_only_webhook_view from zerver.lib.request import REQ, has_request_variables from zerver.lib.response import json_s...
{ "repo_name": "timabbott/zulip", "path": "zerver/webhooks/intercom/view.py", "copies": "4", "size": "10675", "license": "apache-2.0", "hash": 799674196904705500, "line_mean": 35.186440678, "line_max": 104, "alpha_frac": 0.6614519906, "autogenerated": false, "ratio": 3.4258664955070603, "config_...
from functools import partial from html.parser import HTMLParser from typing import Any, Callable, Dict, List, Tuple from django.http import HttpRequest, HttpResponse from zerver.decorator import webhook_view from zerver.lib.exceptions import UnsupportedWebhookEventType from zerver.lib.request import REQ, has_request...
{ "repo_name": "andersk/zulip", "path": "zerver/webhooks/intercom/view.py", "copies": "6", "size": "10616", "license": "apache-2.0", "hash": 8922325530907713000, "line_mean": 31.9689440994, "line_max": 96, "alpha_frac": 0.6610776187, "autogenerated": false, "ratio": 3.424516129032258, "config_te...
from functools import partial from html.parser import HTMLParser from typing import Any, Dict, Tuple, Callable, List from django.http import HttpRequest, HttpResponse from zerver.decorator import api_key_only_webhook_view from zerver.lib.request import REQ, has_request_variables from zerver.lib.response import json_s...
{ "repo_name": "rishig/zulip", "path": "zerver/webhooks/intercom/view.py", "copies": "2", "size": "10684", "license": "apache-2.0", "hash": -4254489288972237300, "line_mean": 34.9730639731, "line_max": 104, "alpha_frac": 0.6616435792, "autogenerated": false, "ratio": 3.429855537720706, "config_t...
from functools import partial from http.cookies import SimpleCookie from http.client import responses import json import mimetypes import os.path import random import re import string import time from urllib.parse import parse_qs import bleach import redis ROOT = os.path.dirname(__file__) POOL = redis.ConnectionPool(...
{ "repo_name": "funkybob/mini_chat", "path": "chat.py", "copies": "1", "size": "7773", "license": "mit", "hash": -4048874166445350000, "line_mean": 29.2451361868, "line_max": 79, "alpha_frac": 0.5822719671, "autogenerated": false, "ratio": 3.7806420233463034, "config_test": false, "has_no_keyw...
from functools import partial from httplib import FORBIDDEN from django.contrib.sites.models import Site from django.core.urlresolvers import reverse from django.test import TestCase from django.utils.formats import date_format from django.utils.timezone import localtime from opendebates.forms import TopSubmissionFor...
{ "repo_name": "caktus/django-opendebates", "path": "opendebates/tests/test_top_archive.py", "copies": "1", "size": "11275", "license": "apache-2.0", "hash": -1235220486513323000, "line_mean": 43.04296875, "line_max": 87, "alpha_frac": 0.5853658537, "autogenerated": false, "ratio": 4.1074681238615...