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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
afeyrer/Final-Project | snake3.py | 1 | 4919 | from ggame import App, RectangleAsset, LineStyle, Color, Sprite
from random import randint
SCREEN_WIDTH = 800
SCREEN_HEIGHT = 600
blue=Color(0x87cefa, 1)
purple=Color(0x7b68ee, 1)
red=Color(0xff0000, 1)
line=LineStyle(0,blue)
black = Color(0, 1)
bg_asset = RectangleAsset(SCREEN_WIDTH, SCREEN_HEIGHT, line, black)
bg =... | mit | 1,678,767,428,972,253,400 | 26.176796 | 79 | 0.481602 | false | 3.190013 | false | false | false |
rschmertz/painless-scripting | painless/settings.py | 1 | 2418 | """
Django settings for painless 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, ...)
i... | gpl-2.0 | -6,880,812,622,390,018,000 | 24.1875 | 71 | 0.715881 | false | 3.198413 | false | false | false |
arangaraju/graph-stix | webDemo/model.py | 1 | 1599 | __author__ = 'apoorva'
from py2neo.database import Record
from graph_stix.config import stixGraph
from pandas import DataFrame as df
def getIPInfo(ipaddr):
result = df(stixGraph.run("MATCH (a:ObservableNode) WHERE a.AddressValue={x} RETURN a.ObservableID, a.ObjectID, a.IndicatorID",
... | mit | 8,318,012,064,140,282,000 | 39 | 167 | 0.64853 | false | 3.166337 | false | false | false |
davidrpugh/pyBEA | pybea/api.py | 1 | 28355 | import json
import xml.etree.ElementTree as ET
import numpy as np
import pandas as pd
import requests
class Request(dict):
"""Base class for a Request."""
_response = None
base_url = 'https://apps.bea.gov/api/data'
valid_formats = ['JSON', 'XML']
valid_methods = ['GetDataSetList',
... | mit | 4,444,875,001,557,656,000 | 38.679272 | 125 | 0.586884 | false | 4.607416 | false | false | false |
gangeli/ParsingTime | aux/tempeval2/scorer/score_entities_extended.py | 2 | 15621 | #!/usr/bin/python
"""
== score_entities.py
Script to calculate scores for events and timexes, both for the extents and the
attributes. Prints the counts and the calculated statistics to the standard output.
== usage
% python score_extents.py tokens extent_key extent_res attr_key attribute_res
tokens ... | lgpl-3.0 | -6,139,491,676,165,830,000 | 40.435013 | 140 | 0.542091 | false | 3.79519 | false | false | false |
franck-talbart/codelet_tuning_infrastructure | ctr-common/plugins/ffa07012-60ec-11e3-b233-cbdf068794cd/execute_fast_exp.py | 1 | 8734 | #!/usr/bin/env python
#************************************************************************
# Codelet Tuning Infrastructure
# Copyright (C) 2010-2013 Intel Corporation, CEA, GENCI, and UVSQ
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Licens... | gpl-3.0 | -4,185,517,764,168,831,000 | 36.008475 | 228 | 0.622853 | false | 3.314611 | false | false | false |
pmelchior/hydra | cputils.py | 1 | 1857 | #!/bin/env python
from os import popen,system
import sqlite3,json
from time import time, sleep
from math import floor, ceil
wait = 5 # minutes wait time between polls
def start_hosts():
fp = open("hosts")
hosts = []
for line in fp:
if line[0] != "#":
hosts.append(line.strip())
fp.... | mit | -4,437,558,350,049,912,300 | 27.136364 | 119 | 0.609047 | false | 3.252189 | false | false | false |
kislerdm/alibava_analysis-tool | ilcinstall_eutel-git/ilcsoft/marlinreco.py | 2 | 1079 | ##################################################
#
# MarlinReco module
#
# Author: Jan Engels, DESY
# Date: Jan, 2007
#
##################################################
... | gpl-2.0 | 7,454,740,562,709,732,000 | 28.162162 | 156 | 0.463392 | false | 4.15 | false | false | false |
KirarinSnow/Google-Code-Jam | Practice Problems/D.py | 1 | 2830 | #!/usr/bin/python
#
# Problem: Shopping Plan
# Language: Python
# Author: KirarinSnow
# Usage: python thisfile.py <input.in >output.out
# Comments: Fails on large set.
from math import *
MAX = 100000000000
def compute():
# Note: all item lists are represented as integers, where the i-th
# bit indicates mem... | gpl-3.0 | -892,458,273,042,816,300 | 21.283465 | 77 | 0.518728 | false | 2.529044 | false | false | false |
PyCon/pycon | pycon/sponsorship/models.py | 1 | 21010 | import datetime
from django.conf import settings
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
from django.core.urlresolvers import reverse
from django.db import models
from django.db.models import SET_NULL
from django.db.models.signals import post_init, post_save, pre_... | bsd-3-clause | 7,996,571,411,302,814,000 | 37.550459 | 138 | 0.618563 | false | 3.976154 | false | false | false |
kg-bot/SupyBot | plugins/Holdem/plugin.py | 1 | 2803 | from supybot.commands import *
import supybot.ircmsgs as ircmsgs
import supybot.callbacks as callbacks
import poker
reload(poker)
class Player:
def __init__(self,name,stack=1000):
self.name = name
self._stack = stack
self._hand = []
def bet(self, amount):
if amount <= self._st... | gpl-3.0 | 6,854,931,312,240,870,000 | 26.213592 | 77 | 0.551552 | false | 3.64026 | false | false | false |
wendlers/edubot-snap | src/edubot/snapext/nodebot/remote.py | 1 | 2288 | ##
# The MIT License (MIT)
#
# Copyright (c) 2016 Stefan Wendler
#
# 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 the Software without restriction, including without limitation the rights
# to use, copy,... | mit | 1,140,395,831,306,028,900 | 27.246914 | 106 | 0.639423 | false | 3.738562 | false | false | false |
gangadhar-kadam/smrterpshop | shopping_cart/templates/pages/invoice.py | 12 | 1051 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import flt, fmt_money
from shopping_cart.templates.utils import get_transaction_context
no_cach... | agpl-3.0 | -888,953,058,791,462,400 | 32.935484 | 89 | 0.694577 | false | 3.127976 | false | false | false |
tensorflow/tfx | tfx/components/trainer/executor_test.py | 1 | 8929 | # Lint as: python2, python3
# Copyright 2019 Google LLC. 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 req... | apache-2.0 | -466,334,855,189,075,200 | 37.15812 | 80 | 0.674656 | false | 3.578758 | true | false | false |
mcallaghan/tmv | BasicBrowser/tmv_app/migrations/0105_auto_20190321_1513.py | 1 | 1946 | # Generated by Django 2.1.2 on 2019-03-21 15:13
import django.contrib.postgres.fields
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('tmv_app', '0104_auto_20190320_0752'),
]
operations = [
migrations.Del... | gpl-3.0 | 2,273,752,258,711,488,800 | 39.541667 | 192 | 0.618191 | false | 4.167024 | false | false | false |
hrishioa/Aviato | flask/Lib/site-packages/osgeo/__init__.py | 1 | 1255 | # __init__ for osgeo package.
# unofficial Windows binaries: set GDAL environment variables if necessary
import os
try:
if 'GDAL_DATA' not in os.environ:
os.environ['GDAL_DATA'] = os.path.join(os.path.dirname(__file__), 'data', 'gdal')
# uncomment the next line to enable plugins
#os.environ... | gpl-2.0 | -116,989,872,943,755,260 | 32.026316 | 96 | 0.590438 | false | 3.849693 | false | false | false |
AlexBGoode/instabot | instabot/bot/bot_block.py | 1 | 2240 | import random
from tqdm import tqdm
from . import limits
from . import delay
def block(self, user_id):
user_id = self.convert_to_user_id(user_id)
if self.check_not_bot(user_id):
return True
if limits.check_if_bot_can_block(self):
delay.block_delay(self)
if super(self.__class__, se... | apache-2.0 | 5,953,676,787,477,968,000 | 32.432836 | 96 | 0.620982 | false | 3.279649 | false | false | false |
Luxtylo/amazon-wishlist-tools | src/arg_parser.py | 1 | 1695 | """
Amazon-wishlist-tools - Useful tools for your Amazon wishlist
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 version.
This program... | gpl-3.0 | 65,163,131,087,025,380 | 35.847826 | 70 | 0.60413 | false | 4.656593 | false | false | false |
phaezah7/misc | statki/main.py | 1 | 9332 | # short example of battleships game implementation
# by Adam Balawender
# Apr 03, 2015
import random
class board:
def __init__(self, n=10, sym=('.', '#', '/', 'x', 'X'), lengths = [4, 3, 3, 2, 2, 2, 1, 1, 1, 1] ):
self.n = n
self.sym = sym
self.lengths = lengths.copy()
self.data = [... | mit | -13,750,080,398,773,668 | 34.48289 | 108 | 0.469353 | false | 3.076822 | false | false | false |
yavalvas/yav_com | build/matplotlib/boilerplate.py | 1 | 10009 | """
Script to autogenerate pyplot wrappers.
When this script is run, the current contents of pyplot are
split into generatable and non-generatable content (via the magic header
:attr:`PYPLOT_MAGIC_HEADER`) and the generatable content is overwritten.
Hence, the non-generatable content should be edited in the pyplot.py ... | mit | 4,136,414,330,122,390,000 | 29.330303 | 119 | 0.529324 | false | 3.740284 | false | false | false |
Laurawly/tvm-1 | python/tvm/topi/hls/injective.py | 5 | 2055 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 1,214,453,724,305,481,500 | 29.671642 | 70 | 0.692457 | false | 4.005848 | false | false | false |
vencejo/Mapa-de-opinion-con-Python-y-Minecraft | campoOpinion.py | 1 | 18984 |
import mcpi.minecraft as minecraft
import conexionMinecraft as Conexion
import conexionLocalhost as ConexionLocal
import bloqueConTweet as Bloque
import math
import datetime
import time
import json
import threading
import preprocesadorTweets as preprocesador
import clasificadorPrensa
import logging
class CampoOpini... | gpl-2.0 | -2,551,504,589,814,039,000 | 49.092348 | 155 | 0.523546 | false | 3.466131 | false | false | false |
jeena/Bungloo | Windows/setup.py | 1 | 1127 | #!/usr/bin/env python2
import os
from distutils.core import setup
import py2exe
files = []
for dirname, dirnames, filenames in os.walk('WebKit'):
for filename in filenames:
files += [(dirname, [os.path.join(dirname, filename)])]
for dirname, dirnames, filenames in os.walk('images'):
for filename in f... | bsd-3-clause | -1,226,460,112,213,538,300 | 27.175 | 110 | 0.612245 | false | 3.354167 | false | false | false |
SVilgelm/CloudFerry | tests/lib/utils/test_override.py | 1 | 4473 | # Copyright (c) 2016 Mirantis 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 agreed to in writing, so... | apache-2.0 | 7,835,814,519,608,083,000 | 30.0625 | 74 | 0.477085 | false | 4.495477 | true | false | false |
skillflip/pyxero | tests/exceptions.py | 1 | 11939 | from __future__ import unicode_literals
from datetime import date
import unittest
from xml.dom.minidom import parseString
from mock import Mock, patch
from xero import Xero
from xero.exceptions import *
class ExceptionsTest(unittest.TestCase):
@patch('requests.put')
def test_bad_request(self, r_put):
... | bsd-3-clause | 1,869,336,786,531,411,700 | 40.168966 | 173 | 0.6328 | false | 4.047119 | true | false | false |
openvenues/libpostal | scripts/geodata/address_expansions/gazetteers.py | 1 | 10291 | import os
import six
from collections import defaultdict, OrderedDict
from geodata.address_expansions.address_dictionaries import address_phrase_dictionaries
from geodata.encoding import safe_decode, safe_encode
from geodata.i18n.unicode_paths import DATA_DIR
from geodata.text.normalize import normalized_tokens, norm... | mit | -7,863,214,584,060,852,000 | 38.580769 | 137 | 0.518123 | false | 4.059566 | false | false | false |
jdfekete/progressivis | progressivis/storage/numpy.py | 1 | 5204 |
import logging
import numpy as np
from progressivis.core.utils import integer_types
try:
from progressivis.utils.fast import next_pow2
except ImportError:
from progressivis.core.utils import next_pow2
from .base import StorageEngine, Dataset
from .hierarchy import GroupImpl, AttributeImpl
logger = logging.g... | bsd-2-clause | -7,410,677,494,590,629,000 | 28.908046 | 89 | 0.53555 | false | 4.018533 | false | false | false |
daikeren/opbeat_python | setup.py | 2 | 4684 | #!/usr/bin/env python
"""
opbeat
======
opbeat is a Python client for `Opbeat <https://opbeat.com/>`_. It provides
full out-of-the-box support for many of the popular frameworks, including
`Django <djangoproject.com>`_, `Flask <http://flask.pocoo.org/>`_, and `Pylons
<http://www.pylonsproject.org/>`_. opbeat also incl... | bsd-3-clause | -98,846,688,088,619,900 | 25.613636 | 88 | 0.626174 | false | 3.564688 | true | false | false |
jomauricio/abgthe | abgthe/apps/profiles/models.py | 1 | 3707 | # -*- coding: utf-8 -*-
from django.db import models
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from model_utils.models import TimeStampedModel
from model_utils import Choices
from localflavor.br.br_states import STATE_CHOICES
from django.core.urlresolvers import reverse
fr... | bsd-3-clause | -5,357,868,014,227,057,000 | 36.806122 | 118 | 0.740821 | false | 3.243433 | false | false | false |
DLR-SC/DataFinder | src/datafinder/gui/user/dialogs/privilege_dialog/items.py | 1 | 4825 | #
# $Filename$$
# $Authors$
# Last Changed: $Date$ $Committer$ $Revision-Id$
#
# Copyright (c) 2003-2011, German Aerospace Center (DLR)
# All rights reserved.
#
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions are
#met:
... | bsd-3-clause | -5,920,008,768,695,934,000 | 33.218978 | 74 | 0.649948 | false | 4.262367 | false | false | false |
zapcoop/vertex | vertex_api/service/models/ticket_subscriber.py | 1 | 2137 | from django.db import models
from django.utils.translation import ugettext_lazy as _
from vertex import rules
from vertex.models import AbstractDatedModel
from vertex.rules.predicates import has_django_permission, is_superuser, is_staff
__author__ = 'Jonathan Senecal <jonathan@zap.coop>'
class TicketSubscriber(Abst... | agpl-3.0 | 6,817,234,383,172,953,000 | 35.844828 | 133 | 0.684137 | false | 4.024482 | false | false | false |
cidles/poio-analyzer | src/poio/poioprojectold.py | 1 | 2447 | # -*- coding: utf-8 -*-
# (C) 2009 copyright by Peter Bouda
import os
from PyQt4 import QtCore
from poio.poiofile import PoioFile
class PoioProject(QtCore.QAbstractListModel):
def __init__(self, projectdir, parent = None):
QtCore.QAbstractListModel.__init__(self, parent)
self.projectfiles = []
... | apache-2.0 | -8,714,664,010,739,370,000 | 33.957143 | 80 | 0.590519 | false | 4.119529 | false | false | false |
amm042/cr_logger | cr_dump.py | 1 | 4652 | #!/usr/bin/python3
import time
import logging
import logging.handlers
import json
import pidfile
import datetime
import dateutil.parser
import os.path
import threading
from PyCampbellCR1000.pycampbellcr1000.exceptions import NoDeviceException
import sys
import traceback
logfile = os.path.splitext(sys.argv[0])[0] + "... | gpl-3.0 | 9,192,323,033,891,236,000 | 31.992908 | 104 | 0.52945 | false | 4.229091 | false | false | false |
zturchan/CMPUT410-Lab4 | exercise.py | 1 | 2338 | from flask import Flask, request, url_for, redirect
import sqlite3
app = Flask(__name__)
dbFile = 'db1.db'
conn = None
def get_conn():
global conn
if conn is None:
conn = sqlite3.connect(dbFile)
conn.row_factory = sqlite3.Row
return conn
@app.teardown_appcontext
def close_connection(exception):
global conn
i... | apache-2.0 | 8,176,702,887,357,126,000 | 27.168675 | 158 | 0.650984 | false | 3.001284 | false | false | false |
imsally/redash | redash/query_runner/athena.py | 4 | 2871 | import json
import os
import requests
from redash.query_runner import BaseQueryRunner, register
PROXY_URL = os.environ.get('ATHENA_PROXY_URL')
class Athena(BaseQueryRunner):
noop_query = 'SELECT 1'
@classmethod
def name(cls):
return "Amazon Athena"
@classmethod
def configuration_schema... | bsd-2-clause | 5,025,102,979,319,969,000 | 28.597938 | 122 | 0.505399 | false | 4.278689 | false | false | false |
accross/softeng-py | teach/3.functions/pizza3.py | 1 | 2707 | #pizza3.py pizza house without classes
#andyp 13.09.13
def num_enter(num_value, num_list):
if num_value not in num_list:
print('Enter a valid number')
return
def enter_pizza(num_of_pizza): #TODO combine these two and use pizza
print('Pablos Pizza Palace')
print('===================')
pr... | gpl-3.0 | 5,758,977,828,677,387,000 | 25.80198 | 125 | 0.600665 | false | 3.055305 | false | false | false |
jancsarc/KIM-Online | src/keys/urls.py | 1 | 1094 | from django.conf.urls import url
from django.views.generic import TemplateView
from . import views
urlpatterns = [
url(r'^(?P<key_id>\d+)/$', views.DisplayKeyLog.as_view()),
url(r'^keylist/$', views.KeyList.as_view(), name="all_keys"),
url(r'^keylist/search/$', views.KeySearch.as_view(), name="searc... | mit | -2,455,952,492,330,048,000 | 52.7 | 95 | 0.63894 | false | 3.171014 | false | true | false |
ccphillippi/AFP | afp/afp/keywords.py | 1 | 4383 | '''
.. module:: keywords
This module handles the keyword mappings required when counting words in articles for matrix generation
.. moduleauthor:: Christopher Phillippi <c_phillippi@mfe.berkeley.edu>
'''
from itertools import chain
from string import capwords
import afp.settings as settings
import csv
... | mit | -3,879,002,264,287,031,300 | 37.486486 | 103 | 0.600502 | false | 4.035912 | false | false | false |
rhelmer/socorro-lib | socorro/lib/transform_rules.py | 1 | 22551 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import re
import configman
import collections
import inspect
from configman import RequiredConfig, Namespace
from confi... | mpl-2.0 | -8,080,703,236,919,074,000 | 39.927405 | 79 | 0.499135 | false | 5.194886 | true | false | false |
camptocamp/mapproxy | mapproxy/test/system/test_cache_mbtiles.py | 6 | 2552 | # This file is part of the MapProxy project.
# Copyright (C) 2011 Omniscale <http://omniscale.de>
#
# 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... | apache-2.0 | -4,913,723,660,309,329,000 | 29.023529 | 76 | 0.619122 | false | 3.635328 | true | false | false |
Hyphen-ated/RebirthItemTracker | scripts/add_missing_glow_images.py | 2 | 1414 | # This script add glow versions of any item images that don't currently have glow versions.
# This script uses the "convert" command, which is part of ImageMagick:
# https://www.imagemagick.org/script/download.php
# You must use an old version of ImageMagick for the convert command to work properly.
# Version 6.9.3-7 ... | bsd-2-clause | -1,751,869,342,823,599,600 | 38.277778 | 103 | 0.580622 | false | 3.382775 | false | false | false |
QingChenmsft/azure-cli | src/command_modules/azure-cli-cosmosdb/azure/cli/command_modules/cosmosdb/_params.py | 4 | 7752 | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | mit | 3,387,348,767,511,346,700 | 81.468085 | 452 | 0.735036 | false | 3.95107 | false | false | false |
gabrielcsmo/drownAttackDemo | solution/client_proxy.py | 1 | 3648 | import uuid
import util
import socket
import pickle
from Crypto.Cipher import AES
import random
import string
import time
class Client():
def __init__(self, IP, PORT, SERVER_IP, SERVER_PORT):
self.address = (IP, PORT)
self.server_address = (SERVER_IP, SERVER_PORT)
self.server_address_str =... | gpl-3.0 | 8,502,400,823,434,179,000 | 37.808511 | 154 | 0.601425 | false | 3.464387 | false | false | false |
CatherineWong/zxing-glass | cpp/scons/scons-local-2.0.0.final.0/SCons/Tool/ilink.py | 34 | 2132 | """SCons.Tool.ilink
Tool-specific initialization for the OS/2 ilink linker.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SC... | apache-2.0 | 7,250,045,528,680,311,000 | 35.135593 | 95 | 0.734053 | false | 3.855335 | false | false | false |
tkas/osmose-backend | plugins/tests/Josm_deprecated_test.py | 3 | 1226 | #-*- coding: utf-8 -*-
import sys
from plugins.Plugin import TestPluginCommon
from plugins.Josm_deprecated import Josm_deprecated
class Test(TestPluginCommon):
def test(self):
n = Josm_deprecated(None)
class _config:
options = {"country": None, "language": None}
class father:
... | gpl-3.0 | -4,387,575,715,748,833,000 | 50.083333 | 171 | 0.558728 | false | 2.919048 | false | false | false |
Nebucatnetzer/tamagotchi | pet_functions.py | 1 | 6551 | # #!/usr/bin/env python3
# imports the global variables
import pet_variables
# imports the time library needed to delay certain functions
import time
# imports the random library needed to generate a random number for
# the guessing game
from random import randint
# imports the os library needed to clear the terminal
i... | gpl-2.0 | -6,800,616,362,073,304,000 | 27.714912 | 79 | 0.634642 | false | 3.311583 | false | false | false |
pxmkuruc/usd-qt | pxr/usdQt/opinionStackModel.py | 1 | 11834 | #
# Copyright 2017 Pixar
#
# Licensed under the Apache License, Version 2.0 (the "Apache License")
# with the following modification; you may not use this file except in
# compliance with the Apache License and the following modification to it:
# Section 6. Trademarks. is deleted and replaced with:
#
# 6. Trademarks. T... | apache-2.0 | 4,382,429,186,881,600,000 | 35.079268 | 98 | 0.622951 | false | 4.214387 | false | false | false |
nagyistoce/netzob | src/netzob/UI/Vocabulary/Views/VocabularyView.py | 1 | 34177 | # -*- coding: utf-8 -*-
#+---------------------------------------------------------------------------+
#| 01001110 01100101 01110100 01111010 01101111 01100010 |
#| |
#| Netzob : Inferring communication protocol... | gpl-3.0 | 7,700,394,194,584,760,000 | 50.38797 | 202 | 0.655605 | false | 4.555185 | false | false | false |
tomcounsell/Cobra | apps/communication/views/public_events.py | 2 | 1549 | import json
from django.http import HttpResponse
from django.views.decorators.csrf import csrf_exempt
from apps.communication.views.email_class import Email
@csrf_exempt
def subscribe(request): #ajax requests only
from django.db import IntegrityError, transaction
from apps.communication.models.subscription import ... | gpl-2.0 | -7,259,907,196,823,734,000 | 31.270833 | 119 | 0.726275 | false | 4.087071 | false | false | false |
DaveA50/lbry | lbrynet/core/client/DHTPeerFinder.py | 1 | 1493 | import binascii
from zope.interface import implements
from lbrynet.interfaces import IPeerFinder
class DHTPeerFinder(object):
"""This class finds peers which have announced to the DHT that they have certain blobs"""
implements(IPeerFinder)
def __init__(self, dht_node, peer_manager):
self.dht_node... | mit | 2,022,920,026,771,950,300 | 30.125 | 93 | 0.620898 | false | 3.695545 | false | false | false |
woutersmet/Molmodsummer | lib/molmod/io/cp2k.py | 1 | 11391 | # MolMod is a collection of molecular modelling tools for python.
# Copyright (C) 2007 - 2008 Toon Verstraelen <Toon.Verstraelen@UGent.be>
#
# This file is part of MolMod.
#
# MolMod 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... | gpl-3.0 | 5,851,042,637,124,493,000 | 33.518182 | 123 | 0.524625 | false | 4.093065 | false | false | false |
kata-csc/ckanext-statreports | ckanext/statreports/commands/reporter.py | 1 | 7103 | '''Report CKAN usage statistics'''
from datetime import datetime
import sys
import logging
from dateutil.relativedelta import relativedelta
from ckan.lib.cli import CkanCommand
import ckan.model
from ckanext.statreports.statistics.user import UserStats
from ckanext.statreports.statistics.package import PackageStats
... | agpl-3.0 | -2,657,966,256,597,401,000 | 39.357955 | 114 | 0.576658 | false | 4.307459 | true | false | false |
pytorch/vision | references/segmentation/coco_utils.py | 1 | 3747 | import copy
import torch
import torch.utils.data
import torchvision
from PIL import Image
import os
from pycocotools import mask as coco_mask
from transforms import Compose
class FilterAndRemapCocoCategories(object):
def __init__(self, categories, remap=True):
self.categories = categories
self.... | bsd-3-clause | -3,677,567,201,638,489,600 | 32.756757 | 93 | 0.618094 | false | 3.551659 | false | false | false |
srsohn/subtask-graph-execution-light | sge/playground.py | 1 | 4137 | from .utils import TYPE_PICKUP, TYPE_TRANSFORM, KEY, MOVE_ACTS
class Playground(object):
def __init__(self):
# map
self.env_name = 'playground'
nb_block = [0, 4]
nb_water = [0, 0]
# operation
operation_list = {
KEY.PICKUP: dict(name='pickup'... | mit | 6,361,184,327,834,053,000 | 43.966667 | 85 | 0.508098 | false | 3.687166 | false | false | false |
glassnotes/Balthasar | src/balthasar/latinsquare.py | 1 | 1928 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# latinsquare.py: A class for making Latin squares.
# ... | bsd-3-clause | -1,370,926,030,097,021,700 | 36.057692 | 83 | 0.415153 | false | 4.853904 | false | false | false |
nuobit/odoo-addons | connector_sage/models/payroll_sage_payslip_check/mapper.py | 1 | 1592 | # Copyright NuoBiT Solutions, S.L. (<https://www.nuobit.com>)
# Eric Antones <eantones@nuobit.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
import re
from odoo import _
from odoo.addons.component.core import Component
from odoo.addons.connector.components.mapper import (
mapping, external_t... | agpl-3.0 | 6,126,413,788,097,436,000 | 28.462963 | 77 | 0.634192 | false | 3.214141 | false | false | false |
uclouvain/osis | education_group/ddd/service/write/create_orphan_mini_training_service.py | 1 | 4338 | # ############################################################################
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, institutes and professional schools.
# The core business i... | agpl-3.0 | -4,963,946,473,614,328,000 | 41.519608 | 114 | 0.670279 | false | 3.91426 | false | false | false |
artemijan/shopcar | shop/shop_core/services/category_service.py | 1 | 1790 | from django.db import transaction, IntegrityError
from shop_core.model.category import Category
from shop_core.model.product import Product
from shop_core.model.category_group import CategoryGroup
from shop_core.common.errors import SaveEntityError, NotFoundError
__author__ = 'artem'
def get_by_id(id=None):
try:... | mit | -6,376,772,585,943,707,000 | 29.862069 | 100 | 0.688268 | false | 4.231678 | false | false | false |
konstantint/matplotlib-venn | matplotlib_venn/_common.py | 1 | 4078 | '''
Venn diagram plotting routines.
Functionality, common to venn2 and venn3.
Copyright 2012, Konstantin Tretyakov.
http://kt.era.ee/
Licensed under MIT license.
'''
import numpy as np
class VennDiagram:
'''
A container for a set of patches and patch labels and set labels, which make up the rendered venn dia... | mit | 1,384,102,882,174,928,400 | 37.847619 | 118 | 0.589014 | false | 3.168609 | false | false | false |
Miserlou/django-devsafe | devsafe/management/commands/devsafe.py | 1 | 2425 | from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from django.contrib.auth.models import User
from django.db.models import Q
from optparse import make_option
import random
import string
class Command(BaseCommand):
"""
Scrambles your sensitive user data.
""... | mit | 7,279,985,071,981,101,000 | 30.907895 | 138 | 0.524536 | false | 4.48244 | false | false | false |
cisco-openstack/tempest | tempest/tests/lib/services/identity/v2/test_endpoints_client.py | 7 | 3731 | # Copyright 2016 NEC Corporation. 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 la... | apache-2.0 | -4,718,981,325,636,419,000 | 36.686869 | 79 | 0.593139 | false | 3.878378 | true | false | false |
aepyornis/nyc-db | src/nycdb/typecast.py | 1 | 5016 | """
Typecasting for NYCDB
All values are converted into a suitable python class before
being passed to psycopg2 to be inserted into postgres.
See http://initd.org/psycopg/docs/usage.html#adaptation-of-python-values-to-sql-types
for how psycopg2 converts python types into postgres types
"""
import copy
import re
impor... | agpl-3.0 | 7,603,527,636,664,382,000 | 23.588235 | 95 | 0.515152 | false | 3.57265 | false | false | false |
bzamecnik/sms-tools | lectures/06-Harmonic-model/plots-code/oboe-autocorrelation.py | 1 | 1074 | import essentia.standard as ess
# matplotlib without any blocking GUI
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
from smst.utils import audio
(fs, x) = audio.read_wav('../../../sounds/oboe-A4.wav')
M = 500
start = .8 * fs
xp = x[start:start + M] / float(max(x[start:st... | agpl-3.0 | 2,164,423,634,662,400,800 | 28.027027 | 87 | 0.66946 | false | 2.569378 | false | true | false |
bcgov/gwells | app/backend/wells/migrations/0084_move_liner_perforations.py | 1 | 2007 | # Generated by Django 2.2.1 on 2019-05-13 22:19
from django.db import migrations
def move_liner_perforations(apps, schema_editor):
LinerPerforation = apps.get_model('wells', 'LinerPerforation')
ActivitySubmissionLinerPerforation = apps.get_model('wells', 'ActivitySubmissionLinerPerforation')
ActivitySubm... | apache-2.0 | -6,552,101,829,282,990,000 | 39.959184 | 110 | 0.713503 | false | 3.696133 | false | false | false |
timovanopstal/nutils | nutils/debug.py | 1 | 14572 | # -*- coding: utf8 -*-
#
# Module DEBUG
#
# Part of Nutils: open source numerical utilities for Python. Jointly developed
# by HvZ Computational Engineering, TU/e Multiscale Engineering Fluid Dynamics,
# and others. More info at http://nutils.org <info@nutils.org>. (c) 2014
"""
The debug module provides code inspectio... | mit | 5,409,151,014,712,073,000 | 31.427617 | 149 | 0.595055 | false | 3.245653 | false | false | false |
pacopablo/dustbowl | setup.py | 1 | 1651 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2009 John Hampton <pacopablo@pacopablo.com>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
#
# Author: John Hampton <pacopablo@pacopablo.com>
from setup... | mit | 8,916,668,733,630,495,000 | 32.693878 | 92 | 0.693519 | false | 3.490486 | false | false | false |
jython234/PyRakLib | tests/ProtocolTests.py | 1 | 3406 | """
PyRakLib networking library.
This software is not affiliated with RakNet or Jenkins Software LLC.
This software is a port of PocketMine/RakLib <https://github.com/PocketMine/RakLib>.
All credit goes to the PocketMine Project (http://pocketmine.net)
Copyright (C) 2015 PyRakLib Project
This progra... | gpl-3.0 | -6,264,636,134,346,830,000 | 28.885965 | 128 | 0.662067 | false | 3.433468 | true | false | false |
Shihira/policy-control | tests/command_test.py | 1 | 1599 | #!/usr/bin/env python
# Copyright(c) 2015, Shihira Fung <fengzhiping@hotmail.com>
import sys, os
sys.path.insert(0, os.path.join(os.path.dirname(__file__)))
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../core"))
from context import context
from parser import _parse_cmdline
import policy
def gen_cl(... | mit | -4,898,245,570,560,321,000 | 25.213115 | 70 | 0.589744 | false | 2.80035 | false | false | false |
leonardocsantoss/ehventos | lib/reportlab/graphics/barcode/common.py | 13 | 23382 | #
# Copyright (c) 1996-2000 Tyler C. Sarna <tsarna@sarna.org>
# 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, thi... | gpl-2.0 | -998,784,118,100,168,100 | 30.259358 | 97 | 0.529724 | false | 3.567592 | false | false | false |
onoga/wm | src/gnue/forms/GFObjects/GFComponent.py | 2 | 1888 | # GNU Enterprise Forms - GF Object Hierarchy - Component
#
# Copyright 2001-2007 Free Software Foundation
#
# This file is part of GNU Enterprise
#
# GNU Enterprise 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 Foundati... | gpl-2.0 | -8,460,487,708,194,494,000 | 33.962963 | 79 | 0.560381 | false | 4.582524 | false | false | false |
atmark-techno/atmark-dist | user/python/Tools/idle/ToolTip.py | 3 | 2521 | # Ideas gleaned from PySol
import os
from Tkinter import *
class ToolTipBase:
def __init__(self, button):
self.button = button
self.tipwindow = None
self.id = None
self.x = self.y = 0
self._id1 = self.button.bind("<Enter>", self.enter)
self._id2 = self.button.bind(... | gpl-2.0 | 7,421,835,656,898,136,000 | 27.977011 | 72 | 0.585879 | false | 3.674927 | false | false | false |
marmyshev/transitions | openlp/core/lib/renderer.py | 1 | 28796 | # -*- coding: utf-8 -*-
# vim: autoindent shiftwidth=4 expandtab textwidth=120 tabstop=4 softtabstop=4
###############################################################################
# OpenLP - Open Source Lyrics Projection #
# ------------------------------------------------------... | gpl-2.0 | -1,939,496,923,535,405,800 | 42.299248 | 117 | 0.546155 | false | 4.117546 | false | false | false |
jingzhehu/udacity_mlnd | P4_Training_a_Smartcab_to_Drive/smartcab/pygame/tests/surfarray_test.py | 2 | 29044 | if __name__ == '__main__':
import sys
import os
pkg_dir = os.path.split(os.path.abspath(__file__))[0]
parent_dir, pkg_name = os.path.split(pkg_dir)
is_pygame_pkg = (pkg_name == 'tests' and
os.path.split(parent_dir)[1] == 'pygame')
if not is_pygame_pkg:
sys.path.inser... | mit | -3,017,108,470,199,719,000 | 37.673768 | 80 | 0.499518 | false | 3.920097 | true | false | false |
LarryHillyer/PoolHost | PoolHost/poolgroup/forms.py | 1 | 2353 | from django import forms
from django.forms import ModelForm
from django.db import models
from app.models import PoolGroup, GroupOwner_Choices, GroupOwner
class PoolGroupForm_Create(ModelForm):
name = forms.CharField(max_length = 100,
widget = forms.TextInput({
... | gpl-3.0 | 4,939,171,840,962,590,000 | 36.349206 | 95 | 0.538462 | false | 5.071121 | false | false | false |
suqi/gym-sandbox | gym_sandbox/envs/police_base.py | 1 | 17239 | from collections import defaultdict
import gym
import gym.spaces
import numpy as np
import random
from gym_sandbox.envs.plot.balls_game_dashboard import BallsNotebookRender
from gym_sandbox.envs.plot.balls_bokeh_serve import BallsBokehServeRender
MOVE_ACTIONS = [[0, -1], [0, 1], [-1, 0], [1, 0]] # up/down/left/right... | mit | -4,111,028,123,158,162,400 | 38.721198 | 114 | 0.578514 | false | 3.417047 | false | false | false |
moisseev/rspamd | test/tools/http_put.py | 2 | 1409 | #!/usr/bin/env python3
"""
Small script to upload file using HTTP PUT
"""
import argparse
import os
import sys
import requests
def main():
parser = argparse.ArgumentParser(
description='Upload a file usgin HTTP PUT method',
epilog=(
"To use HTTP Auth set HTTP_PUT_AUTH environment var... | apache-2.0 | -1,348,982,610,444,040,700 | 26.627451 | 90 | 0.591199 | false | 3.797844 | false | false | false |
trcm/sacerdos | wallfly/permissions.py | 1 | 1400 | from rest_framework import permissions
from models import *
class IsRelatedToUser(permissions.BasePermission):
"""
IsRelatedToUser
Ensures that a user can only retrieve objects from the database that they have permission to view
eg. A tenant can only see their own property, an agent can only see the p... | mit | 3,081,587,033,262,640,000 | 24.925926 | 101 | 0.591429 | false | 4.307692 | false | false | false |
bodenr/tenacity | tenacity/tests/test_tenacity.py | 1 | 15664 | # Copyright 2016 Julien Danjou
# Copyright 2016 Joshua Harlow
# Copyright 2013 Ray Holder
#
# 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
#
# Un... | apache-2.0 | 3,983,063,478,948,792,300 | 30.453815 | 77 | 0.612104 | false | 3.602576 | true | false | false |
drcabana/euler-fp | source/py/p17.py | 1 | 1171 | word_for = {
0 : "",
1 : "one", 2 : "two", 3 : "three",
4 : "four", 5 : "five", 6 : "six",
7 : "seven", 8 : "eight", 9 : "nine",
10 : "ten", 11 : "eleven", 12 : "twelve",
13 : "thirteen", 14 : "fourteen", 15 : "fifteen",
16 : "sixteen", 17 ... | epl-1.0 | -4,334,103,577,684,560,400 | 25.613636 | 59 | 0.480786 | false | 2.774882 | false | false | false |
osantana/correios | correios/utils.py | 1 | 3275 | # Copyright 2016 Osvaldo Santana Neto
#
# 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 ... | apache-2.0 | -2,187,162,805,223,754,500 | 29.896226 | 90 | 0.622901 | false | 3.848414 | false | false | false |
ryanrhymes/personal | MLDHT/code/crawler.py | 1 | 6935 | #!/usr/bin/env python
#
# This script is experimental.
#
# Liang Wang @ Dept. Computer Science, University of Helsinki
# 2011.09.20
#
import os, sys
import socket
import pickle
import Queue
import random
import time
import threading
import resource
from khash import *
from bencode import bencode, bdecode
from common... | mit | 404,190,794,717,054,900 | 36.486486 | 110 | 0.494593 | false | 3.931406 | false | false | false |
vdmitriyev/services-to-wordcloud | services/orcid/pyorcid/utils.py | 3 | 1743 | def dict_value_from_path(d, path):
cur_dict = d
for key in path[:-1]:
cur_dict = cur_dict.get(key, {})
return cur_dict.get(path[-1], None) if cur_dict is not None else None
def dictmapper(typename, mapping):
"""
A factory to create `namedtuple`-like classes from a field-to-dict-path
map... | mit | -2,870,273,755,189,931,000 | 35.3125 | 80 | 0.589214 | false | 3.899329 | false | false | false |
jcatw/dcnn | python/layers.py | 1 | 13496 | import lasagne
import lasagne.layers
import theano
import theano.tensor as T
import numpy as np
import params
class DCNNLayer(lasagne.layers.MergeLayer):
"""A node-level DCNN layer.
This class contains the (symbolic) Lasagne internals for a node-level DCNN layer. This class should
be used in conjunctio... | mit | -228,758,068,408,351,100 | 27.53277 | 127 | 0.573281 | false | 3.438471 | false | false | false |
sotogarcia/odoo-development | modules/development_tools/tests/test_report_groups_users.py | 2 | 3383 | # -*- coding: utf-8 -*-
###############################################################################
# License, author and contributors information in: #
# __openerp__.py file at the root folder of this module. #
########################################################... | agpl-3.0 | -8,300,175,233,719,989,000 | 35.376344 | 79 | 0.484777 | false | 4.785007 | true | false | false |
skmezanul/easyengine | ee/cli/plugins/stack_services.py | 6 | 15003 | from cement.core.controller import CementBaseController, expose
from cement.core import handler, hook
from ee.core.services import EEService
from ee.core.logging import Log
from ee.core.variables import EEVariables
from ee.core.aptget import EEAptGet
class EEStackStatusController(CementBaseController):
class Meta... | mit | -2,009,488,890,373,329,200 | 39.114973 | 79 | 0.532827 | false | 3.836103 | false | false | false |
saxix/django-sysinfo | tests/demo/demoproject/settings.py | 1 | 4777 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
import os
import django
here = os.path.dirname(__file__)
# sys.path.append(os.path.abspath(os.path.join(here, os.pardir)))
# sys.path.append(os.path.abspath(os.path.join(here, os.pardir, "demo")))
DEBUG = True
# TEMPLAT... | bsd-3-clause | -800,801,331,424,131,600 | 25.247253 | 73 | 0.568348 | false | 3.402422 | false | false | false |
tboyce1/home-assistant | homeassistant/components/switch/flux.py | 3 | 10711 | """
Flux for Home-Assistant.
The idea was taken from https://github.com/KpaBap/hue-flux/
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/switch.flux/
"""
import datetime
import logging
import voluptuous as vol
import homeassistant.helpers.config_valid... | apache-2.0 | 3,249,868,490,580,655,600 | 37.253571 | 78 | 0.595183 | false | 3.792847 | true | false | false |
jounex/hue | desktop/core/src/desktop/require_login_test.py | 37 | 1846 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | apache-2.0 | 4,470,002,853,277,189,600 | 37.458333 | 125 | 0.73402 | false | 3.995671 | true | false | false |
GNOME/kupfer | kupfer/plugin/vim/service.py | 4 | 2919 |
import os
import sys
import traceback
import pygtk
pygtk.require('2.0')
import glib
import gobject
from kupfer.plugin.vim import vimcom
try:
import dbus
import dbus.service
#import dbus.glib
from dbus.mainloop.glib import DBusGMainLoop
except (ImportError, dbus.exceptions.DBusException) as exc:
print exc
ra... | gpl-3.0 | 7,204,931,458,458,604,000 | 23.529412 | 77 | 0.708119 | false | 2.82029 | false | false | false |
messense/wechatpy | wechatpy/work/client/__init__.py | 1 | 1553 | # -*- coding: utf-8 -*-
from wechatpy.client.base import BaseWeChatClient
from wechatpy.work.client import api
class WeChatClient(BaseWeChatClient):
API_BASE_URL = 'https://qyapi.weixin.qq.com/cgi-bin/'
agent = api.WeChatAgent()
appchat = api.WeChatAppChat()
batch = api.WeChatBatch()
calendar =... | mit | 8,613,695,425,224,514,000 | 30.06 | 77 | 0.620734 | false | 3.39083 | false | false | false |
gdsfactory/gdsfactory | pp/tests/test_add_pins.py | 1 | 1451 | import pytest
import pp
from pp.samples.pdk.fab_c import FACTORY, LAYER, WIDTH_NITRIDE_CBAND, straight_cband
@pytest.mark.parametrize("optical_routing_type", [0, 1])
def test_add_pins(optical_routing_type) -> None:
"""
Add grating couplers to a waveguide
ensure that all the waveguide routes have pins
... | mit | -1,701,813,267,798,138,400 | 29.229167 | 84 | 0.634735 | false | 2.997934 | false | false | false |
TheJJoker/video-chat | build/ensure_gcloud_sdk_is_installed.py | 1 | 2711 | #!/usr/bin/python
import os
import sys
import urllib3
import urllib3.contrib.pyopenssl
import certifi
import tarfile
import subprocess
# We are downloading a specific version of the Gcloud SDK because we have not
# found a URL to fetch the "latest" version.
# The installation updates the SDK so there is no need to up... | apache-2.0 | -5,353,170,948,032,837,000 | 33.316456 | 83 | 0.701586 | false | 3.094749 | false | false | false |
Nobu19800/RobotArmGUI | ManipulatorCommonInterface_DataTypes_idl.py | 1 | 5244 | # Python stubs generated by omniidl from idl/ManipulatorCommonInterface_DataTypes.idl
# DO NOT EDIT THIS FILE!
import omniORB, _omnipy
from omniORB import CORBA, PortableServer
_0_CORBA = CORBA
_omnipy.checkVersion(4,2, __file__, 1)
try:
property
except NameError:
def property(*args):
... | lgpl-3.0 | 4,692,213,356,824,374,000 | 39.619048 | 230 | 0.704424 | false | 2.428902 | false | false | false |
XerxesDGreat/library-app | library/models.py | 1 | 6191 | from django.db import models
from datetime import datetime
from django.utils.encoding import smart_text
import re
class LibraryModel(models.Model):
def form_display_text(self):
raise NotImplementedError
@classmethod
def build_from_value(cls, value):
raise NotImplementedError
class Met... | apache-2.0 | -6,911,738,975,767,593,000 | 36.98773 | 142 | 0.645292 | false | 3.545819 | false | false | false |
chenjiancan/WeRoBot | werobot/session/mongodbstorage.py | 14 | 1760 | # -*- coding: utf-8 -*-
from werobot.session import SessionStorage
from werobot.utils import json_loads, json_dumps
class MongoDBStorage(SessionStorage):
"""
MongoDBStorage 会把你的 Session 数据储存在一个 MongoDB Collection 中 ::
import pymongo
import werobot
from werobot.session.mongodbstorage ... | mit | -5,757,700,659,094,622,000 | 29 | 67 | 0.594737 | false | 4.180929 | false | false | false |
DanielleSucher/Glasstracer | glassworld.py | 1 | 4443 | import sys
import numpy
import glassmath
from PIL import Image
class Glass(object):
"""A slab of glass through which to see images"""
def __init__(self, img, thickness, zcoord):
self.first_z = zcoord / 2
self.second_z = self.first_z + thickness
self.first_points = numpy.array(((0, 0, s... | mit | -4,103,936,167,764,361,700 | 42.558824 | 125 | 0.584965 | false | 3.303346 | false | false | false |
willzfarmer/hadoopinspector_plugins | checks/check_tools.py | 1 | 7271 | #!/usr/bin/env python
""" Identifies data start & stop times for tables that are not partitioned.
"""
import os, sys, time
import datetime
from datetime import datetime as dtdt
import argparse
from os.path import dirname
from pprint import pprint as pp
import envoy
import subprocess
#--------------------------------... | bsd-3-clause | -7,088,755,776,610,821,000 | 32.818605 | 133 | 0.546967 | false | 3.674078 | false | false | false |
umanoidTyphoon/AMICO-CM_Sketches | demo/model_analysis/classifier_model_analyzer.py | 1 | 5051 | #! /usr/bin/python
###########################################################################
# Copyright (C) 2013 Phani Vadrevu #
# pvadrevu@uga.edu #
# ... | gpl-2.0 | -8,449,170,750,206,800,000 | 34.321678 | 78 | 0.497525 | false | 3.852784 | true | false | false |
bwesterb/py-seccure | src/tests/test_ec.py | 1 | 49887 | import unittest
import seccure
def nist_test_vectors():
# These test vectors have been derived from
# http://point-at-infinity.org/ecc/nisttv
return {
'secp192r1/nistp192': [
['#',
'#<%E/4#.v,7<^TdueIy@]IU5S%7,8?',
'D:/]|&5!rtYmWN,>BDR$OQNC&}Bxl'],
... | lgpl-3.0 | 6,794,176,915,784,660,000 | 51.790476 | 78 | 0.46914 | false | 1.67981 | false | false | false |
theirc/ServiceInfo | services/forms.py | 1 | 6245 | from django import forms
from django.contrib.auth import get_user_model
from django.contrib.gis.forms import PointField
from django.contrib.gis.geos import Point
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext as _
from services.models import Provider, Service, Selectio... | bsd-3-clause | -7,606,966,637,885,828,000 | 33.694444 | 94 | 0.632826 | false | 4.124835 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.