repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
coolhacks/docker-hacks | examples/dockpot/honssh/honsshServer.py | 1 | 4038 | # Copyright (c) 2013 Thomas Nicholson <tnnich@googlemail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, t... | mit | 4,699,163,925,898,010,000 | 44.886364 | 96 | 0.634968 | false | 4.374865 | false | false | false |
yschua/coc-clanwar-parser | cw_parser.py | 1 | 12770 | import sys
import struct
import os
import argparse
import json
import re
def readInt32(file):
value = file.read(4)
if not value:
return
return struct.unpack('>i', value)[0]
def readInt64(file):
value = file.read(8)
if not value:
return
return struct.unpack('>q', value)[0]
def... | mit | -3,481,080,587,038,575,600 | 31.002506 | 262 | 0.649828 | false | 3.228319 | false | false | false |
Danfocus/Flexget | flexget/plugins/operate/version_checker.py | 2 | 3855 | from __future__ import unicode_literals, division, absolute_import
from builtins import * # noqa pylint: disable=unused-import, redefined-builtin
from past.builtins import basestring
import logging
from datetime import datetime
from sqlalchemy import Column, DateTime
from flexget import db_schema, plugin
from flexg... | mit | -8,640,356,356,716,865,000 | 31.669492 | 116 | 0.608042 | false | 4.273836 | true | false | false |
intel-hpdd/intel-manager-for-lustre | chroma_core/models/step_result.py | 1 | 3465 | # coding=utf-8
# Copyright (c) 2020 DDN. All rights reserved.
# Use of this source code is governed by a MIT-style
# license that can be found in the LICENSE file.
from base64 import b64decode
from django.db import models
from django.db.models import CASCADE
from picklefield.fields import PickledObjectField
from i... | mit | 7,998,104,944,831,070,000 | 37.054945 | 120 | 0.680624 | false | 4.088548 | false | false | false |
great-expectations/great_expectations | great_expectations/core/run_identifier.py | 1 | 2944 | import datetime
import json
import warnings
from dateutil.parser import parse
from great_expectations.core.data_context_key import DataContextKey
from great_expectations.marshmallow__shade import Schema, fields, post_load
class RunIdentifier(DataContextKey):
"""A RunIdentifier identifies a run (collection of va... | apache-2.0 | 4,741,126,400,983,273,000 | 29.350515 | 100 | 0.589334 | false | 3.930574 | false | false | false |
google/zetasql | zetasql/base/net/simple_embedder.py | 1 | 1875 | #
# Copyright 2020 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,... | apache-2.0 | 5,766,937,934,244,512,000 | 29.241935 | 77 | 0.6928 | false | 3.342246 | false | false | false |
dani-i/bachelor-project | constants/gui_utils_constants.py | 1 | 3037 | import constants.global_constants as g_const
#############################################################################
# Browse frame
BF_INSTRUCTION_FONT = g_const.GLOBAL_FONT_M
BF_FILE_INFO_FONT = g_const.GLOBAL_FONT_S_ITALIC
BF_BROWSE_BUTTON_FONT = BF_INSTRUCTION_FONT
BF_BUTTON_TEXT = 'Browse ...'
BF_FRAME_... | apache-2.0 | 1,198,597,080,863,457,500 | 23.103175 | 77 | 0.527165 | false | 3.009911 | false | true | false |
forestdussault/olc_webportalv2 | olc_webportalv2/users/migrations/0002_auto_20171019_1310.py | 1 | 1196 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2017-10-19 17:10
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('users', '0001_initial'),
]
operations = [
migrations.AddField(
... | mit | 2,418,445,654,531,762,000 | 38.866667 | 354 | 0.562709 | false | 3.456647 | false | false | false |
pszemus/grpc | src/python/grpcio_tests/tests/qps/histogram.py | 31 | 2288 | # Copyright 2016 gRPC 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 applicable law or agreed to in writing... | apache-2.0 | 2,676,377,537,562,712,600 | 31.685714 | 76 | 0.595717 | false | 3.917808 | false | false | false |
Ledoux/ShareYourSystem | Pythonlogy/ShareYourSystem/Standards/Recorders/Brianer/draft/05_ExampleDoc.py | 2 | 2975 | #ImportModules
import ShareYourSystem as SYS
import operator
#Definition
MyBrianer=SYS.BrianerClass(
).produce(
"Neurongroupers",
['E','I'],
SYS.NeurongrouperClass,
#Here are defined the brian classic shared arguments for each pop
{
'NeurongroupingKwargVariablesDict':
{
'model':
'''
dv/dt... | mit | -5,784,747,473,641,213,000 | 20.557971 | 92 | 0.622185 | false | 2.719378 | false | false | false |
anirudhranganath/mashventure | app/modules/Search/UserFormSearch.py | 1 | 2413 | import urllib
import urllib2
import json
import StringIO
from math import sin, cos, sqrt, atan2, radians
from operator import itemgetter
from app.modules.SparqlInteractor import search as spqlsearch
def user_form_search_location(location):
results = spqlsearch.get_recarea_details_from_name(location)
'''
re... | gpl-3.0 | -5,898,260,473,678,140,000 | 39.898305 | 131 | 0.672607 | false | 3.287466 | false | false | false |
mfalesni/cfme_tests | cfme/fixtures/ansible_fixtures.py | 1 | 3811 | import fauxfactory
import pytest
from cfme.services.catalogs.catalog import Catalog
from cfme.services.service_catalogs import ServiceCatalogs
from cfme.services.myservice import MyService
from cfme.utils.appliance.implementations.ui import navigate_to
from cfme.utils.wait import wait_for
@pytest.fixture(scope="modu... | gpl-2.0 | 7,389,716,344,641,410,000 | 35.295238 | 93 | 0.667017 | false | 4.151416 | true | false | false |
TrimBiggs/calico | calico/felix/actor.py | 1 | 28383 | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Metaswitch Networks
# 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/LIC... | apache-2.0 | -6,686,574,449,901,262,000 | 37.987637 | 79 | 0.603354 | false | 4.361918 | false | false | false |
dylwhich/piapy | core/router.py | 1 | 1737 | # Copyright (C) 2013 Alexander Bauer, Dylan Whichard, and contributors;
# (GPLv3) see LICENSE.
# Router is the class which routes Events to the appropriate
# Plugins. It maintains a list of known Plugins and the proper
# routings as determined by each Plugin's events names.
class Router:
def __init__(self):
... | gpl-3.0 | -2,490,466,504,575,839,700 | 29.473684 | 71 | 0.599309 | false | 4.246944 | false | false | false |
dyermd/legos | scripts/pull_metrics_from_ts_api.py | 1 | 3137 | from optparse import OptionParser
import sys
import requests
__author__ = 'mattdyer'
## Make an API call and return the request object
# @param url The url to call
# @returns The JSON request object
def makeAPICall(url):
headers = {'Content-type': 'application/json'}
r = requests.get(url, headers=headers, aut... | gpl-2.0 | 8,205,170,489,359,826,000 | 34.247191 | 132 | 0.660185 | false | 3.677608 | false | false | false |
securesocketimproved/ssi | tests/test_server.py | 1 | 1469 |
import plugins.LSP.ptbase64.main as LSP
import plugins.LDBP.free.main as LDBP
import socket
print("[Server] =================================================================================")
print("[Server] Server side test unit, testing base64_LoginSocketProvider(Server-side functions),")
print(" Fre... | gpl-3.0 | -3,735,750,946,865,913,000 | 38.861111 | 99 | 0.639891 | false | 3.505967 | false | false | false |
ebewe/mangopay2-python-sdk | mangopaysdk/entities/payin.py | 1 | 1425 | from mangopaysdk.entities.transaction import Transaction
class PayIn (Transaction):
def __init__(self, id = None):
self.CreditedWalletId = None
# PayInPaymentType {CARD, BANK_WIRE, AUTOMATIC_DEBIT, DIRECT_DEBIT }
self.PaymentType = None
# One of PayInPaymentDetails implementations... | mit | 2,422,442,825,832,874,500 | 39.742857 | 88 | 0.590877 | false | 4.61165 | false | false | false |
alexandrovteam/curatr | mcf_standard_browser/standards_review/export.py | 1 | 4994 | import time
from django.http import FileResponse, HttpResponse
from collections import defaultdict
from django.conf import settings
import zipfile
from django.template import loader
from tempfile import TemporaryFile
from django.core.urlresolvers import reverse
import os
import logging
import datetime
def write_massba... | apache-2.0 | 5,988,230,385,551,908,000 | 38.952 | 99 | 0.629155 | false | 3.724087 | false | false | false |
RandolphVI/CNN-Text-Classification | HAN/text_han.py | 1 | 9368 | # -*- coding:utf-8 -*-
__author__ = 'Randolph'
import tensorflow as tf
from tensorflow.contrib.layers import batch_norm
class TextHAN(object):
"""A HAN for text classification."""
def __init__(
self, sequence_length, vocab_size, embedding_type, embedding_size, lstm_hidden_size,
fc_hi... | apache-2.0 | 7,871,590,395,115,710,000 | 52.844828 | 117 | 0.582622 | false | 3.611411 | false | false | false |
iphoting/healthchecks | hc/front/tests/test_cron_preview.py | 2 | 2648 | from datetime import datetime
from unittest.mock import patch
from hc.test import BaseTestCase
import pytz
class CronPreviewTestCase(BaseTestCase):
def test_it_works(self):
payload = {"schedule": "* * * * *", "tz": "UTC"}
r = self.client.post("/checks/cron_preview/", payload)
self.assertC... | bsd-3-clause | 5,574,139,105,382,989,000 | 42.344262 | 78 | 0.61233 | false | 3.597279 | true | false | false |
jincheng95/charges-tools | chargetools/plotting/PyQtGraph/widgets.py | 1 | 2440 | import pyqtgraph.opengl as gl
from pyqtgraph.Qt import QtCore
class SyncedWidget(gl.GLViewWidget):
def __init__(self, update_callback=None, cube_file=None, sync_with=[], *args, **kwargs):
self.update_callback = update_callback
self.cube_file = cube_file
self.sync_with = sync_with
s... | mit | 204,134,399,116,651,140 | 39.666667 | 108 | 0.563934 | false | 3.520924 | false | false | false |
ggaughan/dee | Dee.py | 1 | 60444 | """Dee: makes Python relational (http://www.quicksort.co.uk)"""
__version__ = "0.12"
__author__ = "Greg Gaughan"
__copyright__ = "Copyright (C) 2007 Greg Gaughan"
__license__ = "MIT" #see Licence.txt for licence information
import sys
import types
from datetime import datetime
import inspect
#############
... | mit | 6,903,172,203,632,027,000 | 40.00417 | 243 | 0.554546 | false | 4.006363 | false | false | false |
bfalacerda/strands_apps | reconfigure_inflation/scripts/reconfigure_inflation_server.py | 3 | 2988 | #! /usr/bin/env python
import rospy
from move_base_msgs.msg import *
import dynamic_reconfigure.client
from actionlib_msgs.msg import *
import actionlib
class ReconfigureInflationServer(object):
def __init__(self):
rospy.init_node('reconfigure_inflation_server')
self.move_base_action_clie... | mit | -1,704,628,726,404,492,500 | 47.193548 | 116 | 0.661312 | false | 3.68434 | true | false | false |
wdv4758h/ZipPy | edu.uci.python.benchmark/src/benchmarks/euler11-timed.py | 1 | 2809 | #runas solve()
#pythran export solve()
# 12/31/13 modified for benchmarking by Wei Zhang
import sys, time
NUMS = [
[ 8, 2,22,97,38,15, 0,40, 0,75, 4, 5, 7,78,52,12,50,77,91, 8,],
[49,49,99,40,17,81,18,57,60,87,17,40,98,43,69,48, 4,56,62, 0,],
[81,49,31,73,55,79,14,29,93,71,40,67,53,88,30, 3,49,13,36,65,],
... | bsd-3-clause | -6,361,119,432,481,708,000 | 35.480519 | 111 | 0.543966 | false | 2.124811 | false | false | false |
macmanes-lab/GeosmithiaComparativeGenomics | Scripts4phylogeny/renaming_trimalFiles_TA.py | 1 | 1063 | #!/usr/bin/python3
# A program for
# USAGE: ./renaming_trimalFiles_TA.py PATH_To_Directory_With_Orthofiles
# Author: Taruna Aggarwal
# Affiliation: University of New Hampshire, Durham, NH, USA
# Date: 01/28/2016
# Purpose is rename all the headers in orthofiles so they are same for the concatenation step.
import sys
i... | cc0-1.0 | -671,527,504,752,540,500 | 34.433333 | 94 | 0.617121 | false | 3.519868 | false | false | false |
rsms/smisk | lib/smisk/ipc/bsddb.py | 1 | 1878 | # encoding: utf-8
import os, atexit, shutil
from smisk.util._bsddb import db, dbshelve
from smisk.util.cache import app_shared_key
from tempfile import gettempdir
_dicts = {}
def shared_dict(filename=None, homedir=None, name=None, mode=0600, dbenv=None,
type=db.DB_HASH, flags=db.DB_CREATE, persistent=False):... | mit | 8,300,664,801,090,062,000 | 22.772152 | 90 | 0.675186 | false | 2.725689 | false | false | false |
blockstack/blockstack-server | integration_tests/blockstack_integration_tests/scenarios/attic/rest_register_recipient_minconfs.py | 1 | 13896 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Blockstack
~~~~~
copyright: (c) 2014-2015 by Halfmoon Labs, Inc.
copyright: (c) 2016 by Blockstack.org
This file is part of Blockstack
Blockstack is free software: you can redistribute it and/or modify
it under the terms of the GNU General... | gpl-3.0 | 2,899,457,861,210,347,500 | 34.002519 | 173 | 0.647956 | false | 3.227875 | true | false | false |
ryucc/CS766_FINAL | internals/video.py | 1 | 1237 | #!/usr/bin/env python
import cv2
import sys, os
def readVideo(filename,n = None):
cap = cv2.VideoCapture(filename)
frames = []
ret,f = cap.read()
fps = cap.get(cv2.cv.CV_CAP_PROP_FPS)
print fps
if n:
i = 0
while ret and i<n:
#cv2.imshow('aaa',f);
#cv2.wai... | mit | 7,077,762,456,335,669,000 | 22.339623 | 65 | 0.533549 | false | 3.100251 | false | false | false |
TLemur/freq-bot | src/plugins/help/set_help.py | 1 | 1803 | #!/usr/bin/env python
# -*- coding: utf8 -*-
#~#######################################################################
#~ Copyright (c) 2008 Burdakov Daniel <kreved@kreved.org> #
#~ #
#~ This file is part of FreQ-bot. ... | gpl-3.0 | -7,818,330,369,426,679,000 | 49.083333 | 73 | 0.448697 | false | 4.051685 | false | false | false |
eshoyfer/dwc_network_server_emulator | gamespy/gs_utility.py | 3 | 12197 | # DWC Network Server Emulator
# Copyright (C) 2014 polaris-
# Copyright (C) 2014 ToadKing
# Copyright (C) 2014 AdmiralCurtiss
# Copyright (C) 2014 msoucy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pu... | agpl-3.0 | -550,951,891,689,985,700 | 26.720455 | 139 | 0.558744 | false | 3.196279 | false | false | false |
WenTr/TrendingApps | youtubeStats.py | 1 | 4358 | import pymongo
import numpy
from collections import Counter
from textblob import TextBlob
class YoutubeStats:
def __init__(self):
self.conn = pymongo.MongoClient()
self.db = self.conn['trendingapps']
self.ycollec = self.db['youtube']
self.query = self.ycollec.find({}, {'_id': 0})
... | apache-2.0 | 2,214,908,238,769,371,600 | 43.938144 | 145 | 0.491051 | false | 4.042672 | false | false | false |
taigaio/taiga-back | taiga/permissions/permissions.py | 1 | 2901 | # -*- coding: utf-8 -*-
# Copyright (C) 2014-present Taiga Agile LLC
#
# 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 Foundation, either version 3 of the
# License, or (at your option) any later ver... | agpl-3.0 | 8,746,646,308,278,200,000 | 35.2625 | 97 | 0.588073 | false | 4.582938 | false | false | false |
ericzundel/pants | src/python/pants/backend/jvm/targets/credentials.py | 16 | 2497 | # coding=utf-8
# Copyright 2014 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 functools
fro... | apache-2.0 | -1,841,747,902,794,344,700 | 31.855263 | 99 | 0.722867 | false | 4.581651 | false | false | false |
mbodenhamer/syn | syn/tree/b/query.py | 1 | 7810 | from __future__ import division
from operator import itemgetter
import operator as op
from syn.five import STR
from syn.type.a import Type as Type_
from syn.type.a import AnyType
from syn.base.b import Attr, init_hook, create_hook
from syn.base_utils import assign
from .node import Node
POSITION = '_nodeset_position'
... | mit | -6,132,463,883,529,975,000 | 22.738602 | 80 | 0.44904 | false | 4.38764 | false | false | false |
drshellface/Empire | lib/modules/powershell/code_execution/invoke_shellcode.py | 2 | 6240 | import re
from lib.common import helpers
import pdb
class Module:
def __init__(self, mainMenu, params=[]):
self.info = {
'Name': 'Invoke-Shellcode',
'Author': ['@mattifestation'],
'Description': ("Uses PowerSploit's Invoke--Shellcode to inject "
... | bsd-3-clause | 6,458,138,533,802,566,000 | 40.6 | 229 | 0.499519 | false | 4.515195 | false | false | false |
GillesArcas/numsed | examples/ProjectEuler013.py | 2 | 6424 | # Project Euler #13: Large sum
x00 = 37107287533902102798797998220837590246510135740250
x01 = 46376937677490009712648124896970078050417018260538
x02 = 74324986199524741059474233309513058123726617309629
x03 = 91942213363574161572522430563301811072406154908250
x04 = 23067588207539346171171980310421047513778063246676
x05... | mit | 8,655,067,973,922,299,000 | 52.533333 | 61 | 0.881849 | false | 2.194739 | false | false | false |
fredreichbier/nirvana | settings.py | 1 | 2507 | # Django settings for nirvana project.
from server_settings import *
MANAGERS = ADMINS
DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
#DATABASE_NAME = 'nirvana.sqlite' # Or path to database file if using sqlite3. # see server_settings
DATABASE... | mit | 8,115,895,119,813,357,000 | 34.814286 | 112 | 0.710012 | false | 3.628075 | false | false | false |
PaloAltoNetworks/minemeld-core | minemeld/run/config.py | 1 | 16731 | # Copyright 2015 Palo Alto Networks, 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 by applicable law or agre... | apache-2.0 | 4,536,186,204,277,339,000 | 28.046875 | 110 | 0.557528 | false | 4.020908 | true | false | false |
ahmfrz/Let-s-Catalog | Lets_Catalog/views/oauth.py | 1 | 10892 | """Defines oauth endpoints"""
import os
import httplib2
import requests
import json
from flask import Blueprint, make_response, request, session
from flask import flash, redirect, url_for
from .. infrastructure import helper_methods
from oauth2client.client import flow_from_clientsecrets
from oauth2client.client impor... | mit | 2,873,684,780,719,240,000 | 36.558621 | 146 | 0.634411 | false | 3.846045 | false | false | false |
narfman0/ness_construct | ness_construct.py | 1 | 2133 | import ctypes, pytesseract, re, time
import win32api, win32con, win32gui
from PIL import Image, ImageGrab
from input import SendInput, KEYEVENTF_KEYUP, Keyboard, KEY_A, VK_LEFT, VK_RIGHT, VK_UP, VK_DOWN
hWnd = 0
bbox = []
debug = False
#directions = {0: VK_UP, 1: VK_RIGHT, 2: VK_DOWN, 3: VK_LEFT}
directions = {0: VK_L... | gpl-2.0 | -7,032,437,404,468,287,000 | 33.967213 | 106 | 0.595406 | false | 3.473941 | false | false | false |
PlanApp/SitioWeb | web/web/settings.py | 1 | 2254 | """
Django settings for web project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import... | gpl-2.0 | 2,020,788,000,918,447,900 | 23.236559 | 71 | 0.710736 | false | 3.197163 | false | false | false |
StellarCN/py-stellar-base | stellar_sdk/operation/create_account.py | 1 | 3070 | from decimal import Decimal
from typing import Optional
from typing import Union
from .operation import Operation
from .utils import check_ed25519_public_key, check_amount
from .. import xdr as stellar_xdr
from ..keypair import Keypair
from ..muxed_account import MuxedAccount
from ..strkey import StrKey
__all__ = ["C... | apache-2.0 | 4,840,961,354,966,535,000 | 35.547619 | 88 | 0.66645 | false | 3.881163 | false | false | false |
picoCTF/picoCTF-shell-manager | config/pam_auth.py | 1 | 3540 | import os
import pwd
import grp
import requests
import json
import subprocess
import time
from os.path import join
DEFAULT_USER = "nobody"
HACKSPORTS_ROOT = "/opt/hacksports/"
COMPETITORS_GROUP = "competitors"
config_file = join(HACKSPORTS_ROOT, "config.json")
config = json.loads(open(config_file).read())
SERVER ... | mit | -8,721,033,692,171,631,000 | 33.038462 | 118 | 0.631921 | false | 3.515392 | true | false | false |
lfowles/drunken-bugfixes | freecell/client/logic.py | 1 | 10581 | import copy
from board import Tableau, Deck
from events import *
import events
class FreeCellLogic(object):
def __init__(self):
self.deck = Deck()
self.table = Tableau()
self.event_dispatch = events.event_dispatch
def start(self):
self.event_dispatch.register(self.process_mov... | mit | 1,250,204,321,681,010,400 | 35.486207 | 124 | 0.559021 | false | 3.961438 | false | false | false |
rdmorganiser/rdmo | rdmo/accounts/serializers/v1.py | 1 | 1536 | from django.conf import settings
from django.contrib.auth.models import Group, User
from django.contrib.sites.models import Site
from rest_framework import serializers
from rdmo.projects.models import Membership
from ..models import Role
class SiteSerializer(serializers.ModelSerializer):
class Meta:
mo... | apache-2.0 | -7,963,161,064,357,886,000 | 18.948052 | 56 | 0.536458 | false | 4.755418 | false | false | false |
nelsonag/openmc | openmc/summary.py | 8 | 7891 | from collections.abc import Iterable
import warnings
import h5py
import numpy as np
import openmc
import openmc.checkvalue as cv
from .region import Region
_VERSION_SUMMARY = 6
class Summary:
"""Summary of geometry, materials, and tallies used in a simulation.
Attributes
----------
date_and_time :... | mit | -5,876,078,110,118,204,000 | 33.160173 | 81 | 0.568876 | false | 4.190653 | false | false | false |
bplower/legendary-waffle-lib | test/stories/story_2.py | 1 | 4326 | #!/usr/bin/env python
"""
Test story 2
"""
import os
import sys
import random
import sqlalchemy
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')))
import legendary_waffle
from legendary_waffle import models
from legendary_waffle import fixture
from legendary_waffle import actio... | apache-2.0 | 4,878,887,075,808,829,000 | 30.576642 | 104 | 0.724919 | false | 3.425178 | false | false | false |
RobSpectre/garfield | garfield/voice/models.py | 1 | 1352 | from django.db import models
from contacts.models import Contact
from phone_numbers.models import PhoneNumber
class Call(models.Model):
date_created = models.DateTimeField(auto_now_add=True, db_index=True)
date_modified = models.DateTimeField(auto_now=True)
deleted = models.BooleanField(default=False)
... | mit | -3,296,189,738,086,789,600 | 44.066667 | 73 | 0.527367 | false | 4.74386 | false | false | false |
freeflightsim/ffs-app-engine | google_appengine/google/appengine/api/matcher/matcher.py | 2 | 15395 | #!/usr/bin/env python
#
# Copyright 2007 Google 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 by applicable law o... | gpl-2.0 | 4,709,514,131,730,694,000 | 32.613537 | 80 | 0.706398 | false | 3.984213 | false | false | false |
ProkopHapala/ProbeParticleModel | examples/_bak/watter_monomer_4fold/LJ_4fold.py | 1 | 2389 | #!/usr/bin/python
#import matplotlib
#matplotlib.use('Agg') # Force matplotlib to not use any Xwindows backend.
import os
import numpy as np
import matplotlib.pyplot as plt
import sys
LWD = '/home/prokop/git/ProbeParticleModel/code'
print(" # ========== make & load ProbeParticle C++ library ")
'''
def makeclea... | mit | 6,107,370,675,963,696,000 | 27.105882 | 99 | 0.604437 | false | 2.577131 | false | false | false |
twerkmeister/iLID | tools/convert_to_mono_wav.py | 1 | 1030 | import os
import subprocess
from audio_length import escape_characters
import argparse
filetypes_to_convert=[".mp3",".m4a", ".webm"]
def convert(filename):
filename_extensionless, extension = os.path.splitext(filename)
new_filename = "".join([filename_extensionless, ".wav"])
if not os.path.exists(new_filename):... | mit | 8,202,145,845,440,856,000 | 28.428571 | 114 | 0.679612 | false | 3.564014 | false | false | false |
JRepoInd/plugin.video.tvondesizonexl | xoze/snapvideo/StageVU.py | 3 | 1147 | '''
Created on Jan 3, 2012
@author: ajju
'''
from xoze.snapvideo import VideoHost, STREAM_QUAL_SD, Video
from xoze.utils import http
import re
def getVideoHost():
video_host = VideoHost()
video_host.set_icon('http://userlogos.org/files/logos/jumpordie/stagevu-iphone.png')
video_host.set_name('StageVU')
... | gpl-3.0 | 467,236,078,388,014,700 | 33.757576 | 163 | 0.63034 | false | 3.151099 | false | false | false |
jhuapl-boss/heaviside | heaviside/utils.py | 1 | 7868 | # Copyright 2016 The Johns Hopkins University Applied Physics Laboratory
#
# 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,792,075,426,559,065,000 | 33.968889 | 107 | 0.59062 | false | 4.566454 | false | false | false |
anuragpapineni/Hearthbreaker-evolved-agent | hearthbreaker/cards/minions/rogue.py | 2 | 3853 | import copy
from hearthbreaker.effects.minion import Kill
import hearthbreaker.targeting
from hearthbreaker.constants import CHARACTER_CLASS, CARD_RARITY
from hearthbreaker.game_objects import MinionCard, Minion
from hearthbreaker.cards.battlecries import give_stealth
class DefiasRingleader(MinionCard):
def __ini... | mit | -3,569,118,973,746,648,000 | 35.009346 | 112 | 0.595899 | false | 3.512306 | false | false | false |
hickerson/bbn | fable/fable_sources/libtbx/command_line/parallel_simple.py | 1 | 7190 | from __future__ import division
import re
import time
import sys, os
op = os.path
def show_traceback(file):
import traceback
print >> file
traceback.print_exc(file=file)
print >> file
def fmt_time(t0):
return "JOB wall clock time: %.2f s" % (time.time() - t0)
def process_dollar_multi(line):
pat = "$(MULT... | mit | 7,396,954,485,256,613,000 | 28.588477 | 76 | 0.588595 | false | 3.126087 | false | false | false |
frankyao47/open-hackathon | open-hackathon-client/src/client/constants.py | 5 | 1668 | # -*- coding: utf-8 -*-
#
# -----------------------------------------------------------------------------------
# Copyright (c) Microsoft Open Technologies (Shanghai) Co. Ltd. All rights reserved.
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this softw... | mit | -3,205,195,729,750,214,000 | 35.26087 | 85 | 0.648681 | false | 4.180451 | false | false | false |
DarknessSwitch/django-tutorial | catalog/admin.py | 2 | 2208 | from django.contrib import admin
# Register your models here.
from .models import Author, Genre, Book, BookInstance, Language
"""
# Minimal registration of Models.
admin.site.register(Book)
admin.site.register(Author)
admin.site.register(BookInstance)
admin.site.register(Genre)
admin.site.register(Language)
"""
adm... | cc0-1.0 | 1,236,590,860,896,531,200 | 27.320513 | 83 | 0.665761 | false | 3.86014 | false | false | false |
jmborr/confinedBSA | simulation/silica/cristobalite/confineBSA/poretop/evaluate_bonding.py | 1 | 1349 | #!/usr/bin/env/python
from __future__ import print_function
import MDAnalysis as mda
import numpy as np
from silicanet import SilicaNetwork
if __name__ == '__main__':
u = mda.Universe('SiO2_protein_0.17.pdb')
ntw = SilicaNetwork(u.select_atoms('resname SIL'))
ntw.set_connections(1.7) # generous bond dista... | mit | 8,549,405,483,577,338,000 | 41.15625 | 112 | 0.604893 | false | 2.804574 | false | false | false |
AllanYangZhou/oppia | core/controllers/topics_and_skills_dashboard.py | 1 | 5389 | # Copyright 2018 The Oppia 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 applicable ... | apache-2.0 | -1,742,777,257,790,076,000 | 34.926667 | 80 | 0.644461 | false | 3.860315 | false | false | false |
OnRampOrg/onramp | server/ui/admin/migrations/0001_initial.py | 2 | 5351 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-10-19 03:16
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migratio... | bsd-3-clause | 962,750,554,903,668,500 | 40.48062 | 118 | 0.549243 | false | 4.308374 | false | false | false |
mitsei/dlkit | dlkit/abstract_osid/repository/search_orders.py | 1 | 9948 | """Implementations of repository abstract base class search_orders."""
# pylint: disable=invalid-name
# Method names comply with OSID specification.
# pylint: disable=no-init
# Abstract classes do not define __init__.
# pylint: disable=too-few-public-methods
# Some interfaces are specified as 'markers' and ... | mit | -6,350,424,338,266,557,000 | 33.662021 | 106 | 0.645858 | false | 4.491196 | false | false | false |
Superjom/webp | webp/webp/utils/module/shell.py | 1 | 2834 | # -*- coding: utf-8 -*-
from __future__ import division
'''
Created on 11 25, 2013
@author: Chunwei Yan @ pkusz
@mail: yanchunwei@outlook.com
'''
import os
import sys
reload(sys);
# using exec to set the encoding, to avoid error in IDE.
exec("sys.setdefaultencoding('utf-8')");
#----------------- debug -------------
i... | gpl-2.0 | 3,003,779,523,803,937,300 | 25.990476 | 84 | 0.503881 | false | 3.477301 | false | false | false |
yaongli/spadger | src/spadger/settings/development.py | 1 | 2220 | from .base import * # NOQA
import sys
import logging.config
# SECURITY WARNING: don't run with debug turned on in production!
DEBUG = True
TEMPLATES[0]['OPTIONS'].update({'debug': True})
# Turn off debug while imported by Celery with a workaround
# See http://stackoverflow.com/a/4806384
if "celery" in sys... | mit | 8,064,044,305,654,231,000 | 27.101266 | 119 | 0.568919 | false | 3.663366 | true | false | false |
shatakan/proxy | Proxy.py | 1 | 4096 | import socket
import threading
import sys
# Uses sys module for closing prompt upon exception, and for naming/checking args
# Main server function - accept args passed from main(), create TCP socket and handle errors (i.e. choose a port above 1024)
def server_routine(local_host,local_port,remote_host,remote_port,rec... | gpl-3.0 | -3,171,170,961,138,776,000 | 34.617391 | 125 | 0.599609 | false | 3.747484 | false | false | false |
mozilla/fjord | vendor/packages/urllib3/dummyserver/testcase.py | 8 | 3571 | import unittest
import socket
import threading
from nose.plugins.skip import SkipTest
from tornado import ioloop, web, wsgi
from dummyserver.server import (
SocketServerThread,
run_tornado_app,
run_loop_in_thread,
DEFAULT_CERTS,
)
from dummyserver.handlers import TestingApp
from dummyserver.proxy impor... | bsd-3-clause | -6,238,095,306,646,565,000 | 27.798387 | 77 | 0.625875 | false | 3.677652 | true | false | false |
chokribr/PIST | modules/webcomment/lib/webcomment_washer.py | 27 | 4062 | from invenio.htmlutils import HTMLWasher
import htmlentitydefs
import cgi
import re
RE_HTML_FIRST_NON_QUOTATION_CHAR_ON_LINE = re.compile('[^>]')
class EmailWasher(HTMLWasher):
"""
Wash comments before being sent by email
"""
line_quotation = ''
def handle_starttag(self, tag, attrs):
"""... | gpl-2.0 | -9,098,783,391,136,969,000 | 39.217822 | 101 | 0.499508 | false | 4.28481 | false | false | false |
emanueldima/b2share | tests/b2share_unit_tests/handle/test_handle_api.py | 1 | 2273 | # -*- coding: utf-8 -*-
#
# This file is part of EUDAT B2Share.
# Copyright (C) 2017 CERN.
#
# B2Share 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 2 of the
# License, or (at your option) any... | gpl-2.0 | -1,746,087,249,408,764,200 | 36.262295 | 76 | 0.67004 | false | 4.008818 | false | false | false |
qasimchadhar/thinkful | bicycleScript.py | 1 | 4816 | """
Thinkful Python Unit 1 Lesson 6 Assignment 4
Implement Bicycle in Python using Classes
Qasim Ijaz
"""
import random
#import bicycle classes
from bicycle import *
#create 3 wheel types
road_wheel = Wheels(21, 40, "Road")
bmx_wheel = Wheels(18, 50, "BMX")
mountain_wheel = Wheels(24, 60, "Mountain")
#print(bmx_whee... | mit | -1,296,443,981,050,146,300 | 34.674074 | 114 | 0.621678 | false | 2.873508 | false | false | false |
dschien/energy-aggregator | ep_site/urls.py | 1 | 1472 | """ep_site URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-bas... | mit | -3,378,211,522,301,101,600 | 32.454545 | 77 | 0.6875 | false | 3.415313 | false | false | false |
fronzbot/fronzbot.github.io | script/pyscripts/post_linter.py | 1 | 8963 | #!/usr/bin/env python
"""
post_linter.py
Author: Kevin Fronczak
Date: July 27, 2017
Usage:
python3 post_linter.py [opts]
Options:
--ignore [list] : Allow tags given in 'list'
--skip-html : Skips checking html
--center-images : Verifies markdown tag to center images exists in f... | mit | 7,234,978,448,455,363,000 | 33.473077 | 95 | 0.51032 | false | 3.814043 | false | false | false |
NeuralEnsemble/neuroConstruct | pythonnC/Ex6_LoadCells.py | 2 | 2260 | #
#
# A file which opens a neuroConstruct project, loads a cell morphology file
# and adds the cell to the project
#
# Author: Padraig Gleeson
#
# This file has been developed as part of the neuroConstruct project
# This work has been funded by the Medical Research Council
#
#
try:
from java.i... | gpl-2.0 | -5,301,999,984,761,250,000 | 28.958904 | 128 | 0.74115 | false | 3.251799 | false | false | false |
Cynary/distro6.01 | arch/6.01Soft/lib601-F13-4/form/formulae.py | 2 | 2256 | ################################form/formulae.py#################################
# form0.1
# / formulae.py
# (C) 2006-2008 Michael Haimes
#
# Protected by the GPL
#
#
# ...
# Go ahead, try and sue me
################################################################################
####################################... | mit | -1,865,858,102,278,331,000 | 34.25 | 81 | 0.575798 | false | 4.363636 | false | false | false |
geertj/bluepass | tools/strength.py | 1 | 2318 | #!/usr/bin/env python
#
# This file is part of Bluepass. Bluepass is Copyright (c) 2012-2013
# Geert Jansen.
#
# Bluepass is free software available under the GNU General Public License,
# version 3. See the file LICENSE distributed with this file for the exact
# licensing terms.
#
# This script calculates the strength... | gpl-3.0 | -6,136,972,370,955,079,000 | 31.647887 | 77 | 0.588438 | false | 2.994832 | false | false | false |
AC130USpectre/Python-programs | MillerRabinPrimeNumbersGenerator.py | 1 | 1497 | #generate prime number
#use miller-rabin test to check that number is prime
import math
import random
import time
import ModuleOperators
def mr_num(n):
(r, s) = (n - 1, 0)
while r % 2 == 0:
r //= 2
s += 1
return (r, s)
def isPrime(number, rounds):
#checking by list of ... | gpl-3.0 | 5,852,622,408,167,291,000 | 23.810345 | 66 | 0.536406 | false | 3.433486 | false | false | false |
Micronaet/micronaet-migration | __UNPORTED__/amazon_product_merger/wizard/category_wizard.py | 1 | 4312 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP module
# Copyright (C) 2010 Micronaet srl (<http://www.micronaet.it>)
#
# Italian OpenERP Community (<http://www.openerp-italia.com>)
#
#####################################################... | agpl-3.0 | -1,215,181,124,779,960,800 | 45.869565 | 113 | 0.562616 | false | 4.198637 | false | false | false |
CoJMC/jaam | jaam/photos/admin.py | 1 | 1803 | from django.contrib import admin
from jaam.photos.models import Photo, PhotoGallery, PhotoExifData, PhotoGalleryItem
from jaam.journalism.admin import BaseAdmin
class PhotoAdmin(BaseAdmin):
add_form_template = 'admin/photo_add.html'
search_fields = ('title', 'caption',)
list_display = ('__unicode__', 'proj... | gpl-3.0 | -6,717,533,054,295,097,000 | 37.361702 | 94 | 0.627288 | false | 3.672098 | false | false | false |
praba230890/PYPOWER | pypower/opf_costfcn.py | 2 | 6368 | # Copyright (c) 1996-2015 PSERC. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
"""Evaluates objective function, gradient and Hessian for OPF.
"""
from numpy import array, ones, zeros, arange, r_, dot, flatnonzero as find
from scipy.sparse im... | bsd-3-clause | -2,892,368,605,255,730,700 | 37.131737 | 80 | 0.519629 | false | 3.026616 | false | false | false |
microelly2/Animation | say.py | 1 | 1393 | # -*- coding: utf-8 -*-
#-------------------------------------------------
#-- Animation workbench
#--
#-- microelly 2016
#--
#-- GNU Lesser General Public License (LGPL)
#-------------------------------------------------
import FreeCAD
import FreeCADGui
App=FreeCAD
Gui=FreeCADGui
import PySide
from PySide import Qt... | gpl-2.0 | 2,766,614,397,319,252,000 | 18.082192 | 78 | 0.64178 | false | 2.837067 | false | false | false |
andrewjrobinson/SportsReview | test/video.py | 1 | 1130 | '''
Created on 22/03/2014
@author: arobinson
'''
import cv2
import numpy as np
from sportsreview.support.qtlib import QtGui
class Video():
def __init__(self,capture):
self.capture = capture
self.currentFrame=np.array([])
def captureFrame(self):
""" ... | lgpl-3.0 | -509,329,008,841,323,970 | 27.974359 | 138 | 0.49469 | false | 4.612245 | false | false | false |
jphnoel/udata | udata/search/__init__.py | 1 | 7948 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import bson
import datetime
import logging
from elasticsearch import Elasticsearch
from elasticsearch.helpers import scan
from elasticsearch_dsl import FacetedSearch
from elasticsearch_dsl import MultiSearch, Search, Index as ESIndex
from elasticsearch_d... | agpl-3.0 | -7,680,866,022,864,679,000 | 31.048387 | 78 | 0.637645 | false | 3.834057 | false | false | false |
thorrak/fermentrack | external_push/migrations/0007_fix_thingspeak.py | 1 | 1473 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.27 on 2020-02-03 04:28
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('app', '0009_auto_20180709_0256'),
('external_push'... | mit | -1,273,290,910,056,228,000 | 39.916667 | 251 | 0.619145 | false | 3.786632 | false | false | false |
DrGFreeman/rps-cv | rpscv/camera.py | 1 | 6769 | # camera.py
# Source: https://github.com/DrGFreeman/rps-cv
#
# MIT License
#
# Copyright (c) 2017-2019 Julien de la Bruere-Terreault <drgfreeman@tuta.io>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in ... | mit | 1,949,181,747,541,799,400 | 39.777108 | 80 | 0.631408 | false | 3.859179 | false | false | false |
jotes/pontoon | pontoon/checks/migrations/0001_squashed_0004_auto_20200206_0932.py | 1 | 4726 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.28 on 2020-03-08 19:52
from django.db import migrations, models
import django.db.migrations.operations.special
import django.db.models.deletion
def remove_warnings_and_errors(apps, schema_editor):
"""
Remove all warnings and errors related to Translate Toolki... | bsd-3-clause | -5,256,227,051,081,731,000 | 31.369863 | 87 | 0.401185 | false | 5.210584 | false | false | false |
sauloal/cnidaria | scripts/venv/lib/python2.7/site-packages/cogent/maths/stats/ks.py | 1 | 3653 | #!/usr/bin/env python
"""computes probabilities for the kolmogorov distribution.
Translated from R 2.4 by Gavin Huttley
"""
from __future__ import division
from numpy import sqrt, log, pi, exp, fabs, floor, zeros, asarray,\
dot as matrixmultiply, ones, array, reshape, ravel, sum, arange
from cogent.maths.... | mit | -1,155,965,426,319,061,800 | 28.224 | 79 | 0.501232 | false | 2.908439 | false | false | false |
hudl/redash | redash/utils/configuration.py | 13 | 2414 | import json
import jsonschema
from jsonschema import ValidationError
from sqlalchemy.ext.mutable import Mutable
SECRET_PLACEHOLDER = '--------'
class ConfigurationContainer(Mutable):
@classmethod
def coerce(cls, key, value):
if not isinstance(value, ConfigurationContainer):
if isinstance... | bsd-2-clause | -7,971,076,948,756,265,000 | 24.410526 | 78 | 0.582022 | false | 4.30303 | true | false | false |
mvaled/sentry | src/sentry/api/endpoints/team_groups_trending.py | 1 | 1829 | from __future__ import absolute_import
from datetime import timedelta
from django.utils import timezone
from rest_framework.response import Response
from sentry.api.base import EnvironmentMixin
from sentry.api.bases.team import TeamEndpoint
from sentry.api.serializers import serialize, GroupSerializer
from sentry.mod... | bsd-3-clause | -6,205,304,068,254,111,000 | 32.87037 | 94 | 0.617277 | false | 4.375598 | false | false | false |
Novartis/railroadtracks | src/model/diffexp.py | 1 | 5836 | # Copyright 2014-2015 Novartis Institutes for Biomedical Research
# 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 applic... | apache-2.0 | 303,477,690,438,420,800 | 37.143791 | 143 | 0.614633 | false | 3.935266 | false | false | false |
2ndQuadrant/ansible | test/integration/targets/win_unzip/files/create_crafty_zip_files.py | 3 | 1618 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2020 Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
import os
import shutil
import sys
import zipfile
# Ea... | gpl-3.0 | 7,351,366,751,608,564,000 | 23.892308 | 92 | 0.614957 | false | 3.39916 | false | false | false |
emesene/emesene | emesene/gui/qt4ui/menus/ContactMenu.py | 1 | 8306 | # -*- coding: utf-8 -*-
# This file is part of emesene.
#
# emesene 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 version.
#
#... | gpl-3.0 | -1,613,220,450,779,621,400 | 42.260417 | 83 | 0.622562 | false | 3.758371 | false | false | false |
Kankroc/pdf2image | pdf2image/parsers.py | 1 | 1320 | """
pdf2image custom buffer parsers
"""
from io import BytesIO
from PIL import Image
def parse_buffer_to_ppm(data):
"""
Parse PPM file bytes to Pillow Image
"""
images = []
index = 0
while index < len(data):
code, size, rgb = tuple(data[index:index + 40].split(b'\n')[0:3])
... | mit | 7,093,894,370,997,927,000 | 23 | 93 | 0.551515 | false | 3.165468 | false | false | false |
pombredanne/SourceForge-Allura | Allura/allura/tasks/repo_tasks.py | 2 | 3943 | import shutil
import logging
import traceback
from pylons import c
from allura.lib.decorators import task
from allura.lib.repository import RepositoryApp
from allura.lib import helpers as h
from allura.tasks.mail_tasks import sendmail
@task
def init(**kwargs):
from allura import model as M
c.app.repo.init()
... | apache-2.0 | 7,183,452,886,919,326,000 | 35.850467 | 126 | 0.59016 | false | 3.568326 | true | false | false |
buaakq/codezero | scripts/conts/packall.py | 3 | 2802 | #! /usr/bin/env python2.7
# -*- mode: python; coding: utf-8; -*-
#
# Codezero -- a microkernel for embedded systems.
#
# Copyright © 2009 B Labs Ltd
#
import os, sys, shelve
from os.path import join
PROJRELROOT = '../../'
SCRIPTROOT = os.path.abspath(os.path.dirname("."))
sys.path.append(os.path.abspath(os.path.joi... | gpl-3.0 | 4,432,567,777,555,355,600 | 27.876289 | 86 | 0.580864 | false | 3.31872 | false | false | false |
davecranwell/wagtail | wagtail/wagtailadmin/templatetags/wagtailuserbar.py | 1 | 2764 | from django import template
from django.template.loader import render_to_string
from wagtail.wagtailcore.models import Page, PageRevision, PAGE_TEMPLATE_VAR
# from django.contrib.auth.decorators import permission_required
from wagtail.wagtailadmin.userbar import AdminItem, ExplorePageItem, EditPageItem, AddPageItem,... | bsd-3-clause | 9,166,820,869,867,738,000 | 31.517647 | 97 | 0.664255 | false | 4.035036 | false | false | false |
jaspernbrouwer/powerline-gitstatus | powerline_gitstatus/segments.py | 1 | 8999 | # vim:fileencoding=utf-8:noet
from powerline.segments import Segment, with_docstring
from powerline.theme import requires_segment_info
from subprocess import PIPE, Popen
import os, re, string
@requires_segment_info
class GitStatusSegment(Segment):
def execute(self, pl, command):
pl.debug('Executing comm... | mit | 165,790,126,219,450,340 | 45.076923 | 325 | 0.594658 | false | 3.61715 | false | false | false |
JacekKarnasiewicz/HomePage | apps/tree_traversal/views.py | 1 | 1287 | from django.http import JsonResponse
from django.shortcuts import redirect, render
from django.template import RequestContext
from django.template.loader import render_to_string
from .forms import CatalogFormAdd, CatalogFormRemove, ItemFormAdd, ItemFormRemove
from .models import Catalog
def tree_traversal(request):
... | mit | -5,047,083,332,320,096,000 | 36.852941 | 157 | 0.73582 | false | 3.258228 | false | false | false |
eonpatapon/lollypop | src/widgets_artist.py | 1 | 14329 | # Copyright (c) 2014-2015 Cedric Bellegarde <cedric.bellegarde@adishatz.org>
# 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 option) any later vers... | gpl-3.0 | -4,396,167,413,840,474,000 | 33.694915 | 79 | 0.483425 | false | 4.521616 | false | false | false |
pz325/hornbook | wsgi/hornbook/study/views.py | 1 | 10903 | from django.shortcuts import get_object_or_404
from rest_framework import viewsets
from rest_framework import mixins
from rest_framework import permissions
from rest_framework.decorators import list_route
from rest_framework.response import Response
from django.contrib.auth.models import User
from models.study import... | artistic-2.0 | -896,609,366,961,327,400 | 38.791971 | 135 | 0.650096 | false | 3.72116 | false | false | false |
albfan/pudb | pudb/var_view.py | 1 | 17932 | # -*- coding: utf-8 -*-
# {{{ constants and imports
from __future__ import absolute_import, division, print_function
import urwid
try:
import numpy
HAVE_NUMPY = 1
except ImportError:
HAVE_NUMPY = 0
from pudb.py3compat import PY3, execfile, raw_input, xrange, \
integer_types, string_types
if PY3:... | mit | -4,272,594,410,700,198,400 | 32.070111 | 85 | 0.508982 | false | 3.967242 | false | false | false |
kariminf/ArArud | aruudy/lists/change.py | 1 | 2226 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2019 Abdelkrime Aries <kariminfo0@gmail.com>
#
# ---- AUTHORS ----
# 2019 Abdelkrime Aries <kariminfo0@gmail.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may ... | apache-2.0 | -7,439,059,733,820,339,000 | 27.6 | 75 | 0.578806 | false | 1.770476 | false | false | false |
ministryofjustice/manchester_traffic_offences_pleas | apps/plea/tests/test_sjp.py | 1 | 4848 | from django.test import TestCase
from django.test.client import RequestFactory
from django.template.context import RequestContext
from mock import Mock
from ..views import PleaOnlineForms
from ..models import CourtEmailCount, Court, Case
class TestMultiPleaFormBase(TestCase):
def create_court(self):
se... | mit | 293,121,254,600,447,000 | 32.666667 | 70 | 0.488036 | false | 4.094595 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.