repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
tempbottle/python-driver | tests/integration/standard/test_cython_protocol_handlers.py | 6 | 4435 | """Test the various Cython-based message deserializers"""
# Based on test_custom_protocol_handler.py
try:
import unittest2 as unittest
except ImportError:
import unittest
from cassandra.query import tuple_factory
from cassandra.cluster import Cluster
from cassandra.protocol import ProtocolHandler, LazyProtoc... | apache-2.0 | 1,678,659,623,024,413,400 | 33.379845 | 95 | 0.656144 | false | 3.984726 | true | false | false |
kaneorotar/Mabinogi_INI_Script | #skilliconDB_Compat.py | 1 | 3126 | # -*- coding: utf-8 -*-
import os
import codecs
import sys
import re
import datetime
import xml.etree.ElementTree as ET
def getTextID(txt):
txtgp = re.search(r"_LT\[xml.[^\.]*.([0-9]+)\]", txt)
if txtgp is None:
return ""
return int(txtgp.group(1))
targetName = "skillinfo"
targetTXTName = targetNa... | mit | -2,300,442,473,329,194,500 | 26.191304 | 83 | 0.581574 | false | 3.27673 | false | false | false |
MichaelMraka/dnf-plugins-extras | plugins/dnfpluginsextras/__init__.py | 4 | 3312 | # Copyright (C) 2014 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program is distributed in the hope that it will be u... | gpl-2.0 | -4,297,217,325,143,319,600 | 34.234043 | 77 | 0.696256 | false | 4.284605 | false | false | false |
ity/pants | src/python/pants/engine/legacy/parser.py | 1 | 3768 | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
import thr... | apache-2.0 | 5,205,157,451,023,971,000 | 35.230769 | 98 | 0.704352 | false | 3.978881 | false | false | false |
nke001/attention-lvcsr | libs/Theano/theano/sandbox/theano_object.py | 1 | 8601 | """DRAFT: TheanoObject
N.B. the gotcha with this design is listed in the documentation of `TheanoObject`
"""
from __future__ import print_function
import theano
from theano import tensor
import numpy
def theano_type(x):
"""Return a theano Type instance suitable for containing value `x`."""
if type(x) is int... | mit | -1,412,912,226,055,826,200 | 35.6 | 98 | 0.62981 | false | 4.262141 | false | false | false |
iamaris/ppf | ppf/core/leg.py | 1 | 2997 | class leg(object):
'''
>>> from ppf.date_time import *
>>> from pay_receive import *
>>> from generate_flows import *
>>> flows = generate_flows(
... start = date(2007, Jun, 29)
... , end = date(2017, Jun, 29)
... , resolution = date_resolutions.months
... , period = 6
..... | mit | -3,494,925,771,843,209,000 | 40.054795 | 82 | 0.628295 | false | 2.704874 | false | false | false |
Ashkeelun/GitHealth | GitHealth/health/models.py | 1 | 5145 | from django.db import models
from django.core.urlresolvers import reverse
import requests
from time import sleep
from .utils import *
# Repository Table
class RepositoryManager(models.Manager):
def create_repository(self, url):
repo = requests.get(url).text
domain = get_url_parts(url)[0]
... | mit | -2,708,766,986,539,718,000 | 34.729167 | 127 | 0.623712 | false | 3.504768 | false | false | false |
ddico/odoo | addons/stock/models/stock_package_level.py | 2 | 10696 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from itertools import groupby
from operator import itemgetter
from odoo import _, api, fields, models
class StockPackageLevel(models.Model):
_name = 'stock.package_level'
_description = 'Stock Package Level'
... | agpl-3.0 | 2,010,676,459,348,125,000 | 50.671498 | 155 | 0.56451 | false | 3.788877 | false | false | false |
matiaslindgren/not-enough-bogo | bogo/bogoapp/bogo_manager.py | 1 | 4905 | """
Fear and loathing.
"""
import ast
import asyncio
import logging
import time
from bogoapp import tools
from bogoapp.bogo import Bogo
logger = logging.getLogger("BogoManager")
class BogoError(Exception):
pass
class BogoManager:
"""
Manages all state related to bogosorting a sequence of lists.
""... | mit | 1,056,780,022,889,662,500 | 37.320313 | 76 | 0.59368 | false | 3.952458 | false | false | false |
huanpc/lab_cloud_computing | Jmeter Test Plan/Seeding_Data/Main.py | 1 | 1880 | __author__ = 'huanpc'
import constant
import argparse
from random import randint
# Duong dan toi thu muc output file dataseed
DIR_OUTPUT_PATH = './output'
# Chon gia tri cho id trong bang customer
customer_id_begin = 5
product_id_begin = 0
# So ban ghi can tao
num_of_row = 100
#def createProductData():
def createCus... | apache-2.0 | 7,157,417,236,255,695,000 | 39.869565 | 185 | 0.642021 | false | 3.191851 | false | false | false |
chantera/teras | teras/training/listeners.py | 1 | 8746 | from collections import OrderedDict
import os
import pickle
import logging
import numpy as np
from teras.training.event import Listener
from teras.utils.collections import ImmutableMap
class ProgressBar(Listener):
"""
Example::
>>> from tqdm import tqdm
>>> import time
>>> pbar = Pro... | mit | -6,274,623,873,771,057,000 | 32.381679 | 79 | 0.523668 | false | 4.115765 | false | false | false |
sinnwerkstatt/landmatrix | commands/link_comments.py | 1 | 1095 | #!/usr/bin/env python
from django.core.management import BaseCommand
class Command(BaseCommand):
help = "Replace historical activity IDs with activity IDs within Threaded comments"
def handle(self, *args, **options):
pass
"""
ThreadedComment = get_model()
passed, failed = 0, 0... | agpl-3.0 | 3,495,733,314,741,191,000 | 35.5 | 87 | 0.553425 | false | 4.76087 | false | false | false |
socialc0de/germany-says-welcome-backend | gsw/gsw/settings.py | 1 | 3165 | """
Django settings for gsw project.
Generated by 'django-admin startproject' using Django 1.8.5.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build paths in... | agpl-3.0 | 1,764,764,762,736,935,700 | 24.739837 | 71 | 0.686572 | false | 3.440217 | false | false | false |
bayesimpact/bob-emploi | frontend/server/asynchronous/i18n/download_translations.py | 1 | 4312 | """Download translations from Airtable for static server strings."""
import argparse
import collections
import json
import logging
import os
import typing
from typing import Any, Dict, Optional, Sequence, Set, Tuple
from airtable import airtable
import polib
from bob_emploi.frontend.server.mail import campaign
from ... | gpl-3.0 | -2,897,353,337,188,802,600 | 37.053097 | 98 | 0.654186 | false | 3.988868 | false | false | false |
brunobraga/termsaver-figlet | figlet/constants.py | 1 | 2794 | ###############################################################################
#
# file: constants.py
#
# Purpose: refer to module documentation for details
#
# Note: This file is part of Termsaver-Figlet plugin, and should not be
# used or executed separately.
#
####################################... | apache-2.0 | 5,993,225,176,620,943,000 | 27.510204 | 79 | 0.63529 | false | 4.37931 | false | false | false |
gmathers/iii-addons | account_payment_cc/account_voucher.py | 2 | 8836 | # -*- coding: utf-8 -*-
######################################################################
#
# Note: Program metadata is available in /__init__.py
#
######################################################################
from openerp.osv import osv
class account_voucher(osv.osv):
_inherit = 'account.vouch... | agpl-3.0 | 2,463,914,182,569,678,300 | 50.672515 | 166 | 0.454391 | false | 4.652975 | false | false | false |
AC130USpectre/ImagesWatermarks | Convert.py | 1 | 1634 | from GenerateNoise import noise
from PIL import Image, ImageDraw
import math
SCALE = 1#масштаб шума
def direct(rect, usernumber, userquantity, coordinate, dimension, seed):#наложить шум на прямоугольный кластер
n = noise(usernumber, userquantity, coordinate, dimension, seed)
n *= SCALE
if (n == 0.0):
... | gpl-2.0 | 6,767,493,533,111,639,000 | 30.510638 | 110 | 0.501013 | false | 2.76306 | false | false | false |
Xeralux/tensorflow | tensorflow/contrib/tpu/python/tpu/tpu_context.py | 1 | 18709 | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 8,212,790,590,476,293,000 | 35.684314 | 104 | 0.661981 | false | 3.804962 | true | false | false |
DarthMaulware/EquationGroupLeaks | Leak #5 - Lost In Translation/windows/Resources/Dsz/PyScripts/Lib/dsz/windows/sid/__init__.py | 1 | 1396 | # uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: __init__.py
import dsz
def GetWellKnownSid(wellknown, addr=dsz.script.Env['target_address']):
x = dsz.control.Method()
dsz.control.echo.Off(... | unlicense | 5,633,599,388,853,054,000 | 30.044444 | 100 | 0.59384 | false | 2.945148 | false | false | false |
Lucasgscruz/harpia | harpia/blockTemplate.py | 2 | 3317 | import s2idirectory
############################################################
##################### block templates ######################
class blockTemplate:
blockType = 'NA'
blockNumber = 'NA'
imagesIO = ''
dealloc = ''
outDealloc = ''
properties = []
myConnections = []
outputsToS... | gpl-2.0 | 5,695,901,803,973,828,000 | 47.072464 | 117 | 0.512813 | false | 3.71861 | false | false | false |
RocketPod/wagtail-cookiecutter | {{cookiecutter.repo_name}}/{{cookiecutter.repo_name}}/urls.py | 1 | 1210 | from django.conf.urls import include, url
from django.conf import settings
from django.contrib import admin
from wagtail.wagtailadmin import urls as wagtailadmin_urls
from wagtail.wagtaildocs import urls as wagtaildocs_urls
from wagtail.wagtailcore import urls as wagtail_urls
urlpatterns = [
url(r'^django-admin/... | bsd-3-clause | 7,428,504,255,464,982,000 | 30.025641 | 89 | 0.720661 | false | 3.878205 | false | false | false |
windskyer/k_nova | paxes_nova/network/powerkvm/agent/common/warning.py | 1 | 4125 | #
# =================================================================
# =================================================================
from nova import exception
from powervc_nova import _
class OVSWarning(exception.NovaException):
msg_fmt = _("An issue was detected during validation.")
name = "generic.wa... | apache-2.0 | 1,421,785,359,258,432,500 | 44.833333 | 79 | 0.62303 | false | 4.537954 | true | false | false |
BoPeng/simuPOP | docs/saveLoadPedigree.py | 1 | 1820 | #!/usr/bin/env python
#
# $File: saveLoadPedigree.py $
#
# This file is part of simuPOP, a forward-time population genetics
# simulation environment. Please visit http://simupop.sourceforge.net
# for details.
#
# Copyright (C) 2004 - 2010 Bo Peng (bpeng@mdanderson.org)
#
# This program is free software: you can redist... | gpl-2.0 | 7,416,597,249,696,086,000 | 30.37931 | 80 | 0.692308 | false | 3.215548 | false | false | false |
apetrone/gemini | tools/bootstrap.py | 1 | 2384 | # Adam Petrone
# August, 2014
import os
import sys
import logging
import subprocess
import platform
BOOTSTRAP_VIRTUALENV_PATH = "env"
REQUIREMENTS_FILE = "requirements"
def get_platform():
platform_line = platform.platform().lower()
if "linux" in platform_line:
return "linux"
elif "darwin" in platform_line:
... | bsd-2-clause | -5,418,729,175,523,367,000 | 22.372549 | 81 | 0.708893 | false | 3.076129 | false | false | false |
algui91/grado_informatica_MH_Practicas | src/qapproblem/MA_10_01_PMX.py | 1 | 1859 | '''
Created on June 27, 2014
@author: Alejandro Alcalde (elbauldelprogramador.com)
Licensed under GPLv3
'''
from timeit import Timer
from qapproblem.MA_10_1_PMX import MA_10_1_PMX
class MA_10_01_PMX(MA_10_1_PMX):
'''
A memetic genetic algorithm with local search. Every 10 generations
local search is ap... | gpl-2.0 | 8,342,235,070,847,642,000 | 28.983871 | 103 | 0.542227 | false | 4.103753 | false | false | false |
hongzhouye/frankenstein | mp/romp2.py | 1 | 2928 | """
ROHF-MP2
"""
import numpy as np
from pyscf import scf, mp, lib
def lorentz_regularization(denom, alpha, deg=2):
return denom + alpha**deg / denom
def kernel1(mp, mo_energy, mo_coeff, eris, with_t2, thr_zero, alpha, verbose):
if mo_energy is None or mo_coeff is None:
moidx = mp.get_frozen_mas... | bsd-3-clause | -2,246,946,983,703,782,700 | 34.277108 | 78 | 0.586749 | false | 2.429876 | false | false | false |
aniversarioperu/Proveedor | Proveedor/search_form.py | 2 | 1949 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask_wtf import Form
from wtforms import TextField, HiddenField, BooleanField
from wtforms import SelectMultipleField, DateField, DateTimeField
from wtforms import widgets
from wtforms.validators import DataRequired
etiquetas_data = [('irregulares','Fechas irregula... | gpl-3.0 | -7,707,249,838,963,322,000 | 32.050847 | 80 | 0.680862 | false | 3.354561 | false | false | false |
praekelt/airtime-service | airtime_service/tests/test_service.py | 1 | 1317 | from twisted.python.usage import UsageError
from twisted.trial.unittest import TestCase
from airtime_service import service
class TestService(TestCase):
def test_make_service(self):
svc = service.makeService({
'database-connection-string': 'sqlite://',
'port': '0',
})
... | bsd-3-clause | 8,046,536,479,329,052,000 | 32.769231 | 64 | 0.587699 | false | 4.052308 | true | false | false |
tensorflow/tfjs-converter | tfjs-converter/python/tensorflowjs/converters/common.py | 1 | 1272 | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | apache-2.0 | -1,322,221,879,318,080,000 | 34.333333 | 80 | 0.712264 | false | 3.854545 | false | false | false |
pycontribs/jira | docs/conf.py | 1 | 9563 | # -*- coding: utf-8 -*-
#
# Jira Python Client documentation build configuration file, created by
# sphinx-quickstart on Thu May 3 17:01:50 2012.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated fi... | bsd-2-clause | 1,172,788,009,354,954,800 | 31.198653 | 87 | 0.682317 | false | 3.72391 | true | false | false |
marcus-crane/site | site/stats/migrations/0001_initial.py | 1 | 1919 | # Generated by Django 2.0 on 2018-03-30 05:45
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Book',
fields=[
('id', models.AutoField(auto_... | mit | -5,596,246,032,809,652,000 | 34.537037 | 114 | 0.499739 | false | 4.6691 | false | false | false |
bcspragu/Machine-Learning-Projects | MovieLens/Code/run_me.py | 1 | 2959 | import numpy as np
import scipy.sparse
import kmeans
import json
#Make sure we get consistent, reproducible results
np.random.seed(seed=1)
#Define the data directory (change if you place data elsewhere)
data_dir = "/home/bsprague/Projects/CS589/MovieLens/Data/"
#Load the training ratings
A = np.load(data_dir +... | mit | -2,089,935,727,280,396,300 | 27.728155 | 131 | 0.64684 | false | 2.768007 | false | false | false |
kevinarpe/kevinarpe-rambutan3 | rambutan3/check_args/base/RAbstractForwardingTypeMatcher.py | 1 | 1929 | from abc import abstractmethod
from rambutan3.check_args.base.RAbstractTypeMatcher import RAbstractTypeMatcher
from rambutan3.check_args.base.traverse.RTypeMatcherError import RTypeMatcherError
class RAbstractForwardingTypeMatcher(RAbstractTypeMatcher):
# noinspection PyMissingConstructor
def __init__(self)... | gpl-3.0 | 7,008,961,957,703,396,000 | 30.622951 | 88 | 0.635044 | false | 3.97732 | false | false | false |
SnowWalkerJ/quantlib | quant/data/wind/tables/ashareipo.py | 1 | 6795 | from ....common.db.sql import VARCHAR, Numeric as NUMBER, DateTime as DATETIME, Column, BaseModel, CLOB, DATE
VARCHAR2 = VARCHAR
class AShareIPO(BaseModel):
"""
4.17 中国A股首次公开发行数据
Attributes
----------
object_id: VARCHAR2(100)
对象ID
s_info_windcode: VARCHAR2(40)
Wind代码
... | gpl-3.0 | -2,932,784,816,115,643,400 | 31.75419 | 109 | 0.621013 | false | 2.08722 | false | false | false |
pemryan/DAKOTA | examples/script_interfaces/Python/rosenbrock.py | 1 | 1473 | def rosenbrock_list(**kwargs):
num_fns = kwargs['functions']
# if num_fns > 1:
# least_sq_flag = true
# else:
# least_sq_flag = false
x = kwargs['cv']
ASV = kwargs['asv']
f0 = x[1]-x[0]*x[0]
f1 = 1-x[0]
retval = dict([])
if (ASV[0] & 1): # **** f:
f =... | lgpl-2.1 | 3,471,674,982,820,286,500 | 19.458333 | 50 | 0.39647 | false | 2.55286 | false | false | false |
mrphrazer/bjoern | python-bjoern/bjoern/all.py | 2 | 2645 | from py2neo import Graph
from py2neo.ext.gremlin import Gremlin
import os
DEFAULT_GRAPHDB_URL = "http://localhost:7474/db/data/"
DEFAULT_STEP_DIR = os.path.dirname(__file__) + '/bjoernsteps/'
class BjoernSteps:
def __init__(self):
self._initJoernSteps()
self.initCommandSent = False
def setGr... | gpl-3.0 | 8,872,401,343,072,897,000 | 33.802632 | 75 | 0.626843 | false | 4.050536 | false | false | false |
tawfiq9009/bottle-tweepy | bottle_tweepy.py | 1 | 1685 | import tweepy
import inspect
from bottle import PluginError
class TweepyPlugin(object):
name = 'tweepy'
api = 2
def __init__(self, consumer_key, consumer_secret, access_token, access_token_secret, keyword='api'):
self.consumer_key = consumer_key
self.consumer_secret = consumer_se... | mit | 1,766,222,548,043,890,700 | 37.318182 | 104 | 0.608309 | false | 4.201995 | false | false | false |
rouxcode/django-filer-addons | filer_addons/filer_signals/models.py | 1 | 6286 | from __future__ import unicode_literals
import os
from . import conf # noqa need the settings
from django.db.models.signals import pre_save, post_save
from django.dispatch import receiver
from django.core.files.base import File as DjangoFile
from filer.models import File, Folder
from filer.utils.files import get_val... | mit | -34,688,410,850,411,708 | 34.92 | 84 | 0.644448 | false | 3.795894 | false | false | false |
LYZhelloworld/Courses | 50.021/04/gm/gm2.py | 1 | 8780 | import pdb
import operator
def mul(seq):
return reduce(operator.mul, seq, 1)
print 'This version of gm for use during first lecture.'
class Potential:
# variables: list of strings naming the variables
# pot: dictionary mapping tuples of variable values to potential value
def __init__(self, variables, ... | mit | -4,116,659,734,526,188,500 | 38.54955 | 79 | 0.567426 | false | 3.456693 | false | false | false |
rueberger/MJHMC | mjhmc/misc/distributions.py | 1 | 16295 | """
This module contains the Distribution class which defines a standard
interface for distributions It also provides several implemented
distributions, which inherit from Distribution Any user-specified
distributions should inherit from Distribution
"""
import numpy as np
from .utils import overrides, package_path... | gpl-2.0 | 4,360,708,793,972,506,000 | 34.971302 | 116 | 0.607732 | false | 3.852246 | false | false | false |
batxes/4Cin | SHH_WT_models/SHH_WT_models_final_output_0.1_-0.1_11000/SHH_WT_models12018.py | 4 | 17586 | import _surface
import chimera
try:
import chimera.runCommand
except:
pass
from VolumePath import markerset as ms
try:
from VolumePath import Marker_Set, Link
new_marker_set=Marker_Set
except:
from VolumePath import volume_path_dialog
d= volume_path_dialog(True)
new_marker_set= d.new_marker_set
marker_set... | gpl-3.0 | -4,534,313,612,562,101,000 | 46.147453 | 75 | 0.699818 | false | 2.616575 | false | false | false |
Radagast-red/golem | apps/rendering/gui/controller/renderercustomizer.py | 2 | 11106 | import logging
import os
from copy import deepcopy
from PyQt5.QtWidgets import QFileDialog
from gui.controller.customizer import Customizer
logger = logging.getLogger("apps.rendering")
class RendererCustomizer(Customizer):
def __init__(self, gui, logic):
self.options = logic.options
Customizer.... | gpl-3.0 | -4,423,214,315,490,894,300 | 42.046512 | 118 | 0.598865 | false | 3.980645 | false | false | false |
lampwins/netbox | netbox/users/migrations/0001_api_tokens_squashed_0002_unicode_literals.py | 1 | 1389 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2018-08-01 17:43
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
replaces = [('users', '0001_api_tokens'), ('users', '0002_unico... | apache-2.0 | -3,063,974,207,590,273,500 | 41.090909 | 141 | 0.62059 | false | 4.221884 | false | false | false |
mazulo/tango_with_django_project | rango/views.py | 1 | 7098 | # -*- coding: utf-8 -*-
from django.shortcuts import render
from django.contrib.auth import authenticate, login, logout
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse, HttpResponseRedirect
from rango.models import Category, Page
from rango.forms import CategoryForm, PageF... | mit | -5,168,162,080,484,604,000 | 33.05314 | 78 | 0.625904 | false | 3.641012 | false | false | false |
MatiasSM/fcb | fcb/upload_checker.py | 1 | 1294 | import signal
import sys
from fcb.checker import mail, mega
from fcb.checker.settings import Configuration
from fcb.database.helpers import get_session
from fcb.database.helpers import get_db_version
from fcb.utils.log_helper import get_logger_module
log = get_logger_module('mail_checker')
def main():
# noinspe... | lgpl-3.0 | 2,179,570,835,735,439,600 | 23.884615 | 78 | 0.64915 | false | 3.594444 | false | false | false |
edonet/packages | Sass/completions/completions.py | 2 | 1410 | # import module
from Sass.completions import properties as prop
import sublime, re
# default
prop_default = prop.names + prop.tag
# Completions Flag
flag = sublime.INHIBIT_WORD_COMPLETIONS | sublime.INHIBIT_EXPLICIT_COMPLETIONS
# 【CSS】补全方法
def completions(self, view, prefix, locations):
# 获取当前位置
pt = locat... | isc | -60,636,841,419,177,210 | 22.241379 | 90 | 0.591246 | false | 2.969163 | false | false | false |
sthjs/python-learn | diamonds.py | 1 | 1102 | line = input()
while line != "":
rows = int(line)
diamonds = int(input())
symbol = input()
mid = rows // 2
# For each row
for currentRow in range(rows):
# For each diamond in the pattern
for diamond in range(diamonds):
# For each column in a diamond
for ... | gpl-3.0 | -3,858,567,009,583,473,000 | 33.4375 | 114 | 0.463702 | false | 4.630252 | false | false | false |
roderickmackenzie/opvdm | gui/scan.py | 1 | 19673 | # Organic Photovoltaic Device Model - a drift diffusion base/Shockley-Read-Hall
# model for organic solar cells.
# Copyright (C) 2012 Roderick C. I. MacKenzie
#
# roderick.mackenzie@nottingham.ac.uk
# www.opvdm.com
# Room B86 Coates, University Park, Nottingham, NG7 2RD, UK
#
# This program is free softwar... | gpl-2.0 | 5,365,791,326,686,025,000 | 31.145425 | 137 | 0.681137 | false | 2.864861 | false | false | false |
chbrown/argv | argv/parsers/inferential.py | 1 | 1820 | from argv.iterables import peekable
from argv.flags import parse_tokens
class InferentialParser(object):
def __repr__(self):
return '%s()' % self.__class__.__name__
def parse(self, args=None):
'''Parse a list of arguments, returning a dict.
Flags are only boolean if they are not foll... | mit | -1,911,478,264,357,357,600 | 39.444444 | 115 | 0.55989 | false | 4.631043 | false | false | false |
swooingfish/kidsafe | install/opt/kidsafe/kidsafe.py | 1 | 12889 | #!/usr/bin/env python
# kidsafe child safe proxy server using squid
# see http://www.penguintutor.com/kidsafe
# kidsafe.py - squid v3 authethentication helper application
# Copyright Stewart Watkiss 2012
# This file is part of kidsafe.
#
# kidsafe is free software: you can redistribute it and/or modify
# it under the... | gpl-3.0 | -5,666,652,179,323,141,000 | 32.477922 | 274 | 0.675925 | false | 3.33739 | false | false | false |
wasit7/parallel_forest | pforest/tree.py | 1 | 4251 | """
A tree module for pforest.
GNU GENERAL PUBLIC LICENSE Version 2
Created on Thu Oct 16 17:33:47 2014
@author: Wasit
"""
import numpy as np
try:
__import__('imp').find_module('pforest')
print "Found pforest"
from pforest.master import mnode
except ImportError:
print "Not found pforest. Importing... | mit | 3,306,292,795,613,459,000 | 24.769697 | 68 | 0.540108 | false | 3.365796 | false | false | false |
mikesligo/distributed-search | src/Messages/Message_handler.py | 1 | 7842 | import json
from Send_formatter import Send_formatter
from src.networking.IP_Parser import IP_Parser
from Exceptions.Table_lookup_failed_exception import Table_lookup_failed_exception
from src.Encoder import Encoder
from src.Search.Search_results import Search_results
from src.Search.Database import Database
import thr... | mit | 2,591,718,884,708,643,300 | 38.407035 | 111 | 0.601505 | false | 3.649139 | false | false | false |
gdos/parole | src/testgame/gamedir/data01.res/scripts/util.py | 2 | 1033 |
def messageBox(text, align='center', textWidth=274):
font = parole.resource.getFont("fonts/Arial.ttf", 14)
block = parole.shader.TextBlockPass(font, (255,255,255),
wrap_width=textWidth, bg_rgb=(0,64,128), align=align, wrap='word')
block.text = text
block.update()
sdr = parole.shader.Sha... | gpl-2.0 | 5,577,007,840,918,970,000 | 42.041667 | 84 | 0.607938 | false | 2.837912 | false | false | false |
fbuitron/TCHRBot | hr_bot_main.py | 1 | 10603 | import os
import time
import json
from slackclient import SlackClient
'''
Welcome to the code!
This is the main class for the hr_bot.
This code sucks: spaghetti, mixed, hardcoded and etc. So if you are a very opinionated person I am accepting refactoring PRs :)
Go ahead, have fun!
'''
# starterbot's ID as an environ... | mit | 657,540,030,640,269,400 | 40.096899 | 181 | 0.589927 | false | 3.72558 | false | false | false |
google-research/google-research | mol_dqn/chemgraph/dqn/deep_q_networks.py | 1 | 30250 | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | apache-2.0 | -6,469,962,716,477,765,000 | 38.388021 | 89 | 0.654909 | false | 3.731343 | false | false | false |
stuarteberg/lazyflow | lazyflow/operators/opCache.py | 1 | 7767 | ###############################################################################
# lazyflow: data flow based lazy parallel computation framework
#
# Copyright (C) 2011-2014, the ilastik developers
# <team@ilastik.org>
#
# This program is free software; you can redistribute it and/o... | lgpl-3.0 | -3,512,828,103,017,726,500 | 30.445344 | 79 | 0.642462 | false | 4.693051 | false | false | false |
tvshowtime/tvshowtime-plex-scrobbler | plex_tvst_scrobbler/tvst.py | 1 | 3813 | import urllib2
import urllib
import urlparse
import xml.etree.ElementTree
import re
from htmlentitydefs import name2codepoint
import hashlib
import sys
import logging
import time
import os
import json
class Tvst(object):
CLIENT_ID = 'va0D2CEfSPNNlLoYMYYT'
CLIENT_SECRET = 'RF51gSEZBJAbLXmEUCZ8thJAwJPAyQSafCQC... | mit | -2,433,716,835,912,450,600 | 29.504 | 132 | 0.547076 | false | 3.738235 | false | false | false |
feureau/Small-Scripts | Blender/Blender config/2.91/scripts/addons/bricker_v2-2-1/functions/bricksdict/getters.py | 1 | 2804 | # Copyright (C) 2020 Christopher Gearhart
# chris@bblanimation.com
# http://bblanimation.com/
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your opt... | gpl-3.0 | 2,340,659,080,343,046,700 | 37.410959 | 142 | 0.659058 | false | 3.294947 | false | false | false |
nevion/clcommons | tests/kernels.py | 1 | 2204 | import pyopencl as cl
import pyopencl.array as clarray
from time import time
import numpy as np
import os
from median_of_medians import base_path
from common import *
from numpy import uint32, int32
common_lib_path = base_path
#ctx = cl.create_some_context()
platform = cl.get_platforms()[0]
devices = [device for devi... | mit | -7,111,820,551,035,825,000 | 43.979592 | 123 | 0.703721 | false | 3.035813 | false | false | false |
cajus/qpid-cpp-store-debian | tests/persistence.py | 1 | 25530 | # Copyright (c) 2007, 2008 Red Hat, Inc.
#
# This file is part of the Qpid async store library msgstore.so.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the L... | lgpl-2.1 | 8,354,213,556,659,311,000 | 43.322917 | 138 | 0.620564 | false | 3.582655 | true | false | false |
cameronbwhite/GithubRemote | GithubRemote/Gui/AddAccountWizard.py | 1 | 8889 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
# Copyright (C) 2013, Cameron White
from .tools import waiting_effects
from github import Github
from github.GithubException import BadCredentialsException, \
TwoFactorException, GithubException
from github.Authorization import Authorization
from PyQt4.QtCore import QR... | bsd-3-clause | -8,045,317,347,130,864,000 | 32.670455 | 88 | 0.602655 | false | 4.473578 | false | false | false |
diamond-org/flask-diamond | setup.py | 1 | 1607 | # -*- coding: utf-8 -*-
# Flask-Diamond (c) Ian Dennis Miller
import re
import os
import codecs
from setuptools import setup, find_packages
def read(*rnames):
return codecs.open(os.path.join(os.path.dirname(__file__), *rnames), 'r', 'utf-8').read()
def grep(attrname):
pattern = r"{0}\W*=\W*'([^']+)'".forma... | mit | 7,841,562,046,073,927,000 | 28.218182 | 93 | 0.599253 | false | 3.754673 | false | false | false |
simock85/semantica-rt-py | semantica_rt_py/views.py | 1 | 1741 | from cornice import Service
from colander import MappingSchema, SchemaNode, String
import facebook
from semantica_rt_py.persistence_config import mongodb
FB_APP_ID = '156235004569304'
class AddPageSchema(MappingSchema):
user_token = SchemaNode(String(), location='body', type='str')
page_id = SchemaNode(Stri... | mit | 7,849,079,915,277,534,000 | 32.480769 | 98 | 0.610569 | false | 3.809628 | false | false | false |
Mercy-Nekesa/sokoapp | sokoapp/utils/admin.py | 1 | 1954 | from django.contrib import admin
from django.contrib.contenttypes import generic
from models import Attribute, BaseModel
from django.utils.translation import ugettext_lazy as _
class MetaInline(generic.GenericTabularInline):
model = Attribute
extra = 0
class BaseAdmin(admin.ModelAdmin):
"""
def get_re... | mit | -8,367,726,409,982,237,000 | 37.313725 | 115 | 0.622825 | false | 4.070833 | false | false | false |
fikipollo/paintomics3 | PaintomicsServer/src/servlets/DataManagementServlet.py | 1 | 20501 | #***************************************************************
# This file is part of Paintomics v3
#
# Paintomics is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (... | gpl-3.0 | 4,098,553,121,931,361,300 | 42.993562 | 158 | 0.524657 | false | 4.657201 | false | false | false |
suzuki-shunsuke/generator-ss-ansible-playbook | generators/app/templates/dynamic_inventories/env.py | 1 | 2345 | #!/usr/bin/env python
"""
environment variable inventory source
If the environment variable is undefined, the variable is also undefined.
The group level environment variables are only supported, and the host level environment variables are not supported.
The environment variable name must be uppercase.
## Examples
... | mit | 3,792,367,338,160,111,000 | 22.217822 | 117 | 0.598721 | false | 3.646967 | false | false | false |
okfse/froide | froide/tests/live/test_request.py | 1 | 18721 | import re
from django.conf import settings
from django.core.urlresolvers import reverse
from django.test import LiveServerTestCase
from django.contrib.auth import get_user_model
from django.core import mail
from selenium.webdriver.support.wait import WebDriverWait
from froide.foirequest.tests import factories
from f... | mit | -6,090,042,946,033,985,000 | 50.290411 | 110 | 0.629721 | false | 3.727798 | true | false | false |
r0balo/pelisalacarta | python/version-xbmc-09-plugin/core/config.py | 2 | 7245 | # -*- coding: utf-8 -*-
# ------------------------------------------------------------
# pelisalacarta 4
# Copyright 2015 tvalacarta@gmail.com
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#
# Distributed under the terms of GNU General Public License v3 (GPLv3)
# http://www.gnu.org/licenses/gpl-3.0.html
# --... | gpl-3.0 | -1,247,484,197,485,377,000 | 30.081545 | 120 | 0.645678 | false | 3.723393 | true | false | false |
amnet04/ALECMAPREADER1 | localidad.py | 1 | 3336 | import numpy as np
import re
import os
import cv2
import csv
import funcionesCV_recurrentes as cvr
import georef
from conf import RUTA_PLANTILLAS
numeros = re.compile('\D')
espacios = re.compile('\s')
with open(RUTA_PLANTILLAS+'/localidades.csv') as localidades:
reader = csv.DictReader(localidades)
err_msg = ... | mit | 651,476,822,275,177,600 | 36.829545 | 73 | 0.496846 | false | 3.658242 | false | false | false |
gridsync/gridsync | tests/test_filter.py | 1 | 22773 | # -*- coding: utf-8 -*-
import json
import os
from collections import OrderedDict
from unittest.mock import Mock
import pytest
from gridsync import autostart_file_path, config_dir, pkgdir
from gridsync.filter import (
apply_filters,
filter_tahoe_log_message,
get_filters,
)
@pytest.fixture
def core():
... | gpl-3.0 | 2,050,122,630,346,721,000 | 35.671498 | 214 | 0.472621 | false | 3.328899 | true | false | false |
gwtaylor/pyautodiff | autodiff/context.py | 2 | 55536 | import builtins
import logging
import copy
import meta
from ast import *
import types
import inspect
import numpy as np
import theano
import theano.tensor as T
import autodiff
import autodiff.utils as utils
import autodiff.functions
import collections
logger = logging.getLogger('autodiff')
# XXX FIXME This will not ... | bsd-3-clause | -2,614,805,434,270,758,400 | 35.877158 | 88 | 0.493572 | false | 4.650477 | false | false | false |
Froskekongen/oslodatascience-rl | havakv/havakv_atari.py | 1 | 24577 | import numpy as np
import gym
from keras.layers import Conv2D, Dense, Input, Flatten
from keras.models import Model, load_model
from keras.optimizers import RMSprop
from keras.utils.np_utils import to_categorical
import keras.backend as K
from common import LogPong
from skimage.color import rgb2gray
from skimage.transf... | mit | 3,123,711,620,279,126,500 | 35.68209 | 134 | 0.616308 | false | 3.968513 | false | false | false |
benvanwerkhoven/kernel_tuner | examples/cuda/zeromeanfilter.py | 1 | 1578 | #!/usr/bin/env python
from collections import OrderedDict
import numpy
from kernel_tuner import tune_kernel, run_kernel
def tune_zeromean():
with open('zeromeanfilter.cu', 'r') as f:
kernel_string = f.read()
height = numpy.int32(4391)
width = numpy.int32(3539)
image = numpy.random.randn(heig... | apache-2.0 | 5,507,747,072,151,338,000 | 27.178571 | 97 | 0.652091 | false | 3.017208 | false | false | false |
dangra/scrapy | scrapy/pqueues.py | 3 | 6791 | import hashlib
import logging
from scrapy.utils.misc import create_instance
logger = logging.getLogger(__name__)
def _path_safe(text):
"""
Return a filesystem-safe version of a string ``text``
>>> _path_safe('simple.org').startswith('simple.org')
True
>>> _path_safe('dash-underscore_.org').star... | bsd-3-clause | 4,832,771,251,509,741,000 | 32.955 | 95 | 0.594316 | false | 4.14338 | false | false | false |
brownnrl/moneyguru | core/gui/mass_edition_panel.py | 2 | 6043 | # Copyright 2019 Virgil Dupras
#
# This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
# which should be included with this package. The terms are also available at
# http://www.gnu.org/licenses/gpl-3.0.html
import weakref
from datetime import date
from core.util import allsame, fl... | gpl-3.0 | 6,142,993,101,749,881,000 | 36.76875 | 89 | 0.616747 | false | 3.868758 | false | false | false |
chennan47/osf.io | osf_tests/test_files.py | 6 | 2140 | import pytest
from addons.osfstorage import settings as osfstorage_settings
from osf.models import BaseFileNode, Folder, File
from osf_tests.factories import (
UserFactory,
ProjectFactory,
)
pytestmark = pytest.mark.django_db
@pytest.fixture()
def user():
return UserFactory()
@pytest.fixture()
def proje... | apache-2.0 | -3,613,884,070,172,181,500 | 32.968254 | 86 | 0.676636 | false | 3.689655 | true | false | false |
felixfan/PyHLA | prepareAAalignment/preALN.py | 1 | 1545 | #!/usr/bin/env python
import re
def oneline(infile, outfile):
pattern = re.compile(r'^(\w+)(\*){1}(\d+)(\:?)')
f = open(infile)
geno = {}
ref = ''
flag = False
for i in f:
i = i.strip()
if i and pattern.search(i):
fs = i.split()
if fs[0] not in geno:
geno[fs[0]]=''
for j in range(1, len(fs)):
... | gpl-2.0 | -966,945,801,158,386,200 | 23.539683 | 211 | 0.54822 | false | 2.188385 | false | false | false |
RethinkRobotics/intera_sdk | intera_examples/scripts/camera_display.py | 1 | 4324 | #! /usr/bin/env python
# Copyright (c) 2013-2018, Rethink Robotics Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | apache-2.0 | 4,880,555,437,848,059,000 | 35.957265 | 91 | 0.65148 | false | 3.552999 | false | false | false |
armando-migliaccio/tempest | tempest/test.py | 1 | 12158 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apach... | apache-2.0 | 4,834,938,428,252,851,000 | 35.731118 | 78 | 0.620415 | false | 4.398698 | true | false | false |
vileopratama/vitech | src/addons/vitech_backend_theme/models/res_config_settings.py | 1 | 1776 | # -*- coding: utf-8 -*-
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import api
from lxml import etree
from openerp.addons.base.res.res_config import \
res_config_settings
class ResConfigSettings(res_config_settings):
@api.model
def fields_view_get(self, view_id=None... | mit | 6,657,915,532,517,825,000 | 32.509434 | 74 | 0.530968 | false | 3.991011 | false | false | false |
Phasip/mc3p | mc3p/parsing.py | 1 | 9776 | # This source file is part of mc3p, the Minecraft Protocol Parsing Proxy.
#
# Copyright (C) 2011 Matthew J. McGill
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License v2 as published by
# the Free Software Foundation.
#
# This program is distrib... | gpl-2.0 | 1,744,634,293,767,756,500 | 28.714286 | 112 | 0.618249 | false | 3.081967 | false | false | false |
merantix/picasso | picasso/examples/keras-vgg16/model.py | 1 | 2147 | ###############################################################################
# Copyright (c) 2017 Merantix GmbH
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http:... | epl-1.0 | 2,342,119,976,921,186,300 | 34.783333 | 79 | 0.538426 | false | 4.276892 | false | false | false |
jimsrc/seatos | mixed/src/mcflag2/mixed.py | 2 | 4722 | #!/usr/bin/env ipython
import os
from pylab import *
from numpy import *
import matplotlib.patches as patches
import matplotlib.transforms as transforms
import console_colors as ccl
import numpy as np
#------------------------------
nbins = 50 # (revisar a ojo) bine por unidad de tiemp... | mit | 2,932,413,093,864,362,500 | 40.06087 | 154 | 0.557814 | false | 2.560738 | false | false | false |
moschlar/SAUCE | sauce/controllers/crc/selectors.py | 1 | 3164 | '''
@since: 2015-01-07
@author: moschlar
'''
import sqlalchemy.types as sqlat
import tw2.core as twc
import tw2.bootstrap.forms as twb
import tw2.jqplugins.chosen.widgets as twjc
import sprox.widgets.tw2widgets.widgets as sw
from sprox.sa.widgetselector import SAWidgetSelector
from sprox.sa.validatorselector import ... | agpl-3.0 | 3,641,152,664,509,198,000 | 33.769231 | 116 | 0.697535 | false | 3.940224 | false | false | false |
neohanju/GarbageDumping | EventEncoder/posetrack_generate_trajectories.py | 1 | 7755 | import os
import csv
import json
import glob
import progressbar
from collections import OrderedDict
from utils import intersection_over_union
kHaanjuHome = '/home/neohanju/Workspace/dataset'
kJMHome = 'C:/Users/JM/Desktop/Data/ETRIrelated/BMVC'
kCurrentHome = kJMHome
kPosetrackCSVAnnotationBasePath = os.path.join(kCu... | bsd-2-clause | 3,583,916,945,920,374,300 | 40.031746 | 129 | 0.608511 | false | 3.336919 | false | false | false |
bikashgupta11/javarobot | src/main/resources/jython/Lib/robot/utils/utf8reader.py | 8 | 1792 | # Copyright 2008-2015 Nokia Networks
# Copyright 2016- Robot Framework Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
... | gpl-3.0 | 1,502,093,724,916,351,200 | 33.461538 | 79 | 0.646763 | false | 3.87041 | false | false | false |
maxiimou/imapclient | imapclient/test/test_init.py | 2 | 2775 | # Copyright (c) 2014, Menno Smits
# Released subject to the New BSD License
# Please see http://en.wikipedia.org/wiki/BSD_licenses
from mock import patch, sentinel
from imapclient.imapclient import IMAPClient
from imapclient.test.util import unittest
class TestInit(unittest.TestCase):
def setUp(self):
s... | bsd-3-clause | 6,007,561,218,790,899,000 | 34.126582 | 83 | 0.654054 | false | 3.315412 | true | false | false |
lucaskotres/DTS_Charts | E3_DTS/sqlheatmap.py | 1 | 1374 | import datetime
import sys
begin = datetime.datetime.now()
import pyodbc
import numpy as np
import matplotlib.pyplot as plt
plt.style.use('ggplot')
dataini = "'"+str(sys.argv[1])
horaini = str(sys.argv[2])+"'"
datafim = "'"+str(sys.argv[3])
horafim = str(sys.argv[4])+"'"
cnxn = pyodbc.connect('DRIVER={SQL Server};... | mit | 6,285,247,639,477,630,000 | 21.9 | 200 | 0.684134 | false | 2.904863 | false | false | false |
andrei1089/canola-picasa | service/liblocation.py | 1 | 7950 | # Python wrapper to the Maemo 4.0 "Chinook" liblocation.
# Wrapper version 0.1.
#
# Copyright 2008 by Robert W. Brewer < rwb123 at gmail dot com >
# Licensed under GNU LGPL v3.
#
# This file is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as publishe... | gpl-3.0 | 1,680,566,774,803,956,500 | 26.894737 | 95 | 0.553836 | false | 3.491436 | false | false | false |
happy5214/manitae | manitae/core/managers/ManitaeLogger.py | 1 | 1469 | # Copyright (C) 2012 Alexander Jones
#
# This file is part of Manitae.
#
# Manitae is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later v... | gpl-3.0 | -6,643,320,039,052,473,000 | 43.515152 | 206 | 0.686181 | false | 3.361556 | false | false | false |
commial/miasm | example/jitter/unpack_upx.py | 1 | 3555 | from __future__ import print_function
import os
import logging
from pdb import pm
from miasm.loader import pe
from miasm.analysis.sandbox import Sandbox_Win_x86_32
from miasm.os_dep.common import get_win_str_a
# User defined methods
def kernel32_GetProcAddress(jitter):
"""Hook on GetProcAddress to note where UPX... | gpl-2.0 | 2,860,956,189,516,582,000 | 28.380165 | 78 | 0.695359 | false | 2.911548 | false | false | false |
2947721120/sagacious-capsicum | src/ggrc/services/search.py | 3 | 1821 | # Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: david@reciprocitylabs.com
# Maintained By: david@reciprocitylabs.com
import json
from flask import request, current_app
from ggrc.fulltext import g... | apache-2.0 | 7,198,063,677,188,458,000 | 28.852459 | 78 | 0.667765 | false | 3.372222 | false | false | false |
samupl/django-admin-autoregister | django_autoregister/apps.py | 1 | 1864 | from django.apps import AppConfig
from django.contrib import admin
from django.db import models
class AutoDisplayAdmin(admin.ModelAdmin):
list_links_fields = ('CharField',
'IntegerField',
'AutoField',
'DateField',
... | bsd-3-clause | 7,853,113,908,200,380,000 | 36.3 | 104 | 0.517167 | false | 5.221289 | false | false | false |
liuzheng712/jumpserver | apps/assets/utils.py | 1 | 1465 | # ~*~ coding: utf-8 ~*~
#
import os
import paramiko
from paramiko.ssh_exception import SSHException
from common.utils import get_object_or_none
from .models import Asset, SystemUser, Label
def get_assets_by_id_list(id_list):
return Asset.objects.filter(id__in=id_list).filter(is_active=True)
def get_system_user... | gpl-2.0 | -3,100,966,215,337,615,400 | 27.72549 | 70 | 0.659386 | false | 3.430913 | false | false | false |
SystemsBioinformatics/cbmpy | cbmpy/CBTools.py | 1 | 62009 | """
CBMPy: CBTools module
=====================
PySCeS Constraint Based Modelling (http://cbmpy.sourceforge.net)
Copyright (C) 2009-2018 Brett G. Olivier, VU University Amsterdam, Amsterdam, The Netherlands
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Publi... | gpl-3.0 | 1,549,951,368,185,540,000 | 32.737214 | 155 | 0.52723 | false | 3.738635 | false | false | false |
pnisarg/ABSA | src/ats_lexicon_detect.py | 1 | 3827 | # -*- coding: utf-8 -*-
import sys
import pickle
import json
import ast
import io
from ate_rule_learn import write_json
CONST_POS_SCORE = "POS_SCORE"
CONST_NEG_SCORE = "NEG_SCORE"
hindi_word_net = sys.argv[3]
word2Synset = pickle.load(open( hindi_word_net + "/WordSynsetDict.pk"))
synonyms = pickle.load(open(hindi_wor... | mit | -6,930,557,273,389,374,000 | 30.121951 | 98 | 0.608832 | false | 3.365875 | false | false | false |
JustinWingChungHui/MyFamilyRoot | facial_recognition/tests/test_resize_tags.py | 2 | 2983 | from django.conf import settings
from django.test import TestCase
from django.test.utils import override_settings
from gallery.models import Image, Gallery, Tag
from family_tree.models import Family, Person
from message_queue.models import Queue, Message
from facial_recognition.resize_tags import resize_tags
import o... | gpl-2.0 | -879,425,692,876,667,400 | 37.24359 | 175 | 0.656386 | false | 3.292494 | true | false | false |
akar43/lsm | tensorboard_logging.py | 1 | 3182 | import logging
from StringIO import StringIO
import matplotlib.pyplot as plt
import numpy as np
import tensorflow as tf
class TensorboardLogger(object):
"""Logging in tensorboard without tensorflow ops.
Adapted from https://gist.github.com/gyglim/1f8dfb1b5c82627ae3efcfbbadb9f514"""
def __init__(self,... | mit | -5,417,984,844,522,912,000 | 33.215054 | 110 | 0.580138 | false | 3.997487 | false | false | false |
hyperspy/hyperspyUI | hyperspyui/tests/conftest.py | 1 | 1572 |
import os
import tempfile
import shutil
from hyperspyui.version import __version__
from hyperspyui.__main__ import get_splash
import pytest
from qtpy import QtCore
# QtWebEngineWidgets must be imported before a QCoreApplication instance
# is created (used in eelsdb plugin)
# Avoid a bug in Qt: https://bugreports.q... | gpl-3.0 | -5,874,988,546,532,899,000 | 23.952381 | 72 | 0.734097 | false | 3.707547 | false | false | false |
vogelsgesang/checkmate | checkmate/management/commands/analyze.py | 3 | 15899 | # -*- coding: utf-8 -*-
"""
This file is part of checkmate, a meta code checker written in Python.
Copyright (C) 2015 Andreas Dewes, QuantifiedCode UG
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foun... | agpl-3.0 | 7,005,460,754,880,088,000 | 40.189119 | 103 | 0.551418 | false | 4.469778 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.