repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
chimmu/hailuo | conn.py | 1 | 1994 | # import socket
# import select
# import dispatch
import socket
import errno
import json
'''
struct head{
int type;
int len;
}
'''
import struct
class Connection:
def __init__(self):
self.buf = bytes()
pass
def disconnect(self):
self.sock.close()
def read(self, size):
... | gpl-2.0 | -3,076,117,434,816,348,000 | 24.896104 | 72 | 0.495988 | false | 3.894531 | false | false | false |
seewindcn/tortoisehg | src/mercurial/graphmod.py | 1 | 20628 | # Revision graph generator for Mercurial
#
# Copyright 2008 Dirkjan Ochtman <dirkjan@ochtman.nl>
# Copyright 2007 Joel Rosdahl <joel@rosdahl.net>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
"""supports walking the history as D... | gpl-2.0 | 8,596,684,982,809,293,000 | 35.44523 | 80 | 0.55827 | false | 4.005437 | true | false | false |
CZ-NIC/foris | foris/config/pages/about.py | 1 | 1216 | #
# Foris
# Copyright (C) 2019 CZ.NIC, z.s.p.o. <http://www.nic.cz>
#
# 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.
#
... | gpl-3.0 | -8,288,962,230,043,935,000 | 32.777778 | 71 | 0.725329 | false | 3.8 | false | false | false |
drufat/dec | doc/plot/cheb/plot_basis_fn_chebyshev.py | 1 | 1379 | from dec.spectral import *
from dec.grid1 import *
import matplotlib.pyplot as plt
def fix_axis_labels():
plt.tick_params(labelsize=45)
plt.xticks((-1, 0, 1), ('$-1$', '$0$', '$+1$'))
plt.yticks((0, 1), ('$0$', '$1$'))
plt.axis([-1.5, 1.5, -0.5, 1.5])
def draw_stemlines(x, y):
markerline, stemline... | gpl-3.0 | 2,457,492,339,963,417,600 | 27.729167 | 74 | 0.553299 | false | 2.436396 | false | false | false |
thegricean/sinking-marbles | models/complex_prior/smoothed_unbinned15/runStandardModelEpsilonSmooth.py | 1 | 3483 | import os
import math
import subprocess
########################################
#f = open("standard_model.church")
f = open("standard_model_uniform.church")
ch_model = [l.rstrip() for l in f.readlines()]
f.close()
#pfile = open("binned_priors.txt")
pfile = open("/Users/titlis/cogsci/projects/stanford/projects/theg... | mit | -2,257,986,860,409,763,600 | 60.105263 | 363 | 0.595177 | false | 3.115385 | false | false | false |
alejandroesquiva/ZeroMQ-Python | Publish-Subscribe/Client1.py | 1 | 1387 | #
# Weather update client
# Connects SUB socket to tcp://localhost:5556
# Collects weather updates and finds avg temp in zipcode
#
import sys
import zmq
import time
# Socket to talk to server
context = zmq.Context()
socket = context.socket(zmq.SUB)
print("Collecting updates from weather server…")
socket.conne... | mit | -6,053,244,881,576,592,000 | 24.2 | 58 | 0.685921 | false | 3.198614 | false | false | false |
guillaume-miara/allodoc | allodoc/users/models.py | 1 | 2224 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals, absolute_import
import json
import requests
from django.contrib.auth.models import AbstractUser
from django.core.urlresolvers import reverse
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.tra... | mit | 5,649,086,522,377,660,000 | 28.263158 | 114 | 0.638489 | false | 4.164794 | false | false | false |
leppa/home-assistant | homeassistant/helpers/entity_platform.py | 1 | 16964 | """Class to manage the entities for a single platform."""
import asyncio
from contextvars import ContextVar
from typing import Optional
from homeassistant.const import DEVICE_DEFAULT_NAME
from homeassistant.core import callback, split_entity_id, valid_entity_id
from homeassistant.exceptions import HomeAssistantError, ... | apache-2.0 | -2,178,695,690,634,535,400 | 34.940678 | 88 | 0.57286 | false | 4.480718 | true | false | false |
fireeye/flare-floss | tests/test_memdiff.py | 1 | 1613 | # Copyright (C) 2017 FireEye, Inc. All Rights Reserved.
import pytest
import envi.memory
from floss.string_decoder import memdiff
basic_tests = [
# Empty strings
("", ""),
# Single byte matching
("a", "a"),
# Single byte diffing
("a", "b"),
# Multi-byte first character diff
("aaa", "b... | apache-2.0 | -8,013,141,217,759,897,000 | 26.338983 | 71 | 0.513949 | false | 2.901079 | true | false | false |
mclumd/pelawak | pelawak/settings.py | 1 | 4994 | """
Django settings for pelawak project.
Generated by 'django-admin startproject' using Django 1.8.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build path... | mit | 8,990,372,021,132,386,000 | 28.904192 | 85 | 0.647177 | false | 3.868319 | false | false | false |
Strangemother/python-state-machine | scratch/machine_4/address.py | 1 | 7541 | '''
An address helps couple a message to a location. By parsing and
creating strings to be manipulated by the bridge
'''
import copy
from collections import deque, namedtuple
AddressParts = namedtuple('AddressParts', 'prefix nodes machines')
def make_hash(o):
"""
Makes a hash from a dictionary, list, tuple ... | mit | -4,579,846,829,456,940,500 | 28.228682 | 95 | 0.546612 | false | 3.917403 | false | false | false |
philanthropy-u/edx-platform | openedx/features/job_board/constants.py | 1 | 1050 | """
Constants for Job Board app
"""
JOB_PARAM_QUERY_KEY = 'query'
JOB_PARAM_COUNTRY_KEY = 'country'
JOB_PARAM_CITY_KEY = 'city'
JOB_PARAM_TRUE_VALUE = '1'
JOB_TYPE_REMOTE_KEY = 'remote'
JOB_TYPE_ONSITE_KEY = 'onsite'
JOB_TYPE_CHOICES = (
(JOB_TYPE_REMOTE_KEY, 'Remote'),
(JOB_TYPE_ONSITE_KEY, 'Onsite'),
)
JO... | agpl-3.0 | 2,042,669,443,996,058,600 | 23.418605 | 49 | 0.677143 | false | 2.459016 | false | false | false |
daimon99/ssadmin | src/ssadmin/admin.py | 1 | 1088 | # coding: utf8
from django.conf.urls import url
from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.contrib.auth.models import User
import models
class SSUserAdmin(admin.StackedInline):
model = models.SSUser
fk_name = 'user'
class UserAdmin(BaseUser... | mit | -5,805,649,661,301,906,000 | 23.636364 | 70 | 0.652214 | false | 3.777003 | false | false | false |
istellartech/OpenTsiolkovsky | tools/mc_all_in_dir.py | 1 | 1669 | #!/usr/bin/python3
# coding: utf-8
import os
import sys
import subprocess as sp
if __name__ == "__main__":
if(len(sys.argv) == 1):
print("usage: python", sys.argv[0], "TAGET_DIR", "[N_ARRAY]")
exit(1)
parent_dir = sys.argv[1]
print("TARGET_DIR:", parent_dir)
if(len(sys.argv) > 2):
... | mit | 3,024,870,016,652,491,300 | 32.38 | 167 | 0.538646 | false | 2.969751 | false | false | false |
Dev-Cloud-Platform/Dev-Cloud | dev_cloud/cc1/src/clm/views/user/ctx.py | 1 | 1972 | # -*- coding: utf-8 -*-
# @COPYRIGHT_begin
#
# Copyright [2010-2014] Institute of Nuclear Physics PAN, Krakow, Poland
#
# 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.apac... | apache-2.0 | 8,264,995,869,716,974,000 | 27.171429 | 119 | 0.6714 | false | 3.165329 | false | false | false |
srmanikandasriram/multi-agent-robot-test-platform | cc/src/rosserial_python/src/rosserial_python/SerialClient.py | 1 | 28712 | #!/usr/bin/env python
#####################################################################
# Software License Agreement (BSD License)
#
# Copyright (c) 2011, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that th... | mit | -4,756,909,680,455,247,000 | 39.212885 | 212 | 0.58641 | false | 4.087117 | false | false | false |
somia/insertbuffer | insertbufferd.py | 1 | 7740 | #!/usr/bin/env python
#
# Copyright (c) 2011 Somia Dynamoid Oy
#
# 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 2 of the License, or
# (at your option) any later version.
#
imp... | gpl-2.0 | 4,622,423,972,153,492,000 | 21.697947 | 130 | 0.679845 | false | 3.163057 | false | false | false |
Azure/azure-sdk-for-python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/subscriptions/v2019_06_01/aio/operations/_operations.py | 1 | 4728 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit | 8,563,465,711,278,039,000 | 44.461538 | 133 | 0.648266 | false | 4.644401 | false | false | false |
FrBrGeorge/PyGame | balls.py | 1 | 5643 | #!/usr/bin/env python
# coding: utf
'''Dumb jumping balls'''
import pygame
import random
import sys
if sys.version_info[0]>2:
xrange = range
SIZE = 640, 480
def intn(*arg):
'''Return list of ints from arg tuple'''
return tuple(map(int,arg))
def Init(sz):
'''Turn PyGame on'''
global screen, scre... | gpl-3.0 | -9,164,708,732,791,351,000 | 25.871429 | 78 | 0.551125 | false | 3.749502 | false | false | false |
jolynch/mit-tab | mittab/libs/data_import/import_rooms.py | 1 | 1054 | from mittab.apps.tab.forms import RoomForm
from mittab.libs.data_import import Workbook, WorkbookImporter, InvalidWorkbookException
def import_rooms(file_to_import):
try:
workbook = Workbook(file_to_import, 2)
except InvalidWorkbookException:
return ["Rooms file is not a valid .xslx file"]
... | mit | 1,272,267,326,252,061,000 | 31.9375 | 88 | 0.588235 | false | 3.711268 | false | false | false |
MTG/dunya | docserver/urls.py | 1 | 3773 | # Copyright 2013,2014 Music Technology Group - Universitat Pompeu Fabra
#
# This file is part of Dunya
#
# Dunya 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 (FSF), either version 3 of the License, or... | agpl-3.0 | 6,515,515,269,406,524,000 | 64.051724 | 148 | 0.698648 | false | 3.353778 | false | false | false |
galileo-project/Galileo-gpm | gpm/cli/__init__.py | 1 | 1537 | from gpm.utils.opt import opt_parser
from gpm.utils.log import Log
from gpm.utils.conf import GPMConf
from gpm.const import DEFAULT_MOD, GPM_SRC
from gpm.const.status import Status
from gpm.utils.operation import LocalOperation
import pkgutil
class CLI(object):
def __init__(self):
self.config = GPMConf()
... | mit | -2,746,403,755,441,995,000 | 26.464286 | 71 | 0.607677 | false | 3.446188 | false | false | false |
amarszalek/PyOrderedFuzzyTools | pyorderedfuzzy/ofrandoms/estimators.py | 1 | 2080 | # -*- coding: utf-8 -*-
import numpy as np
from pyorderedfuzzy.ofnumbers.ofnumber import OFNumber, fmax
__author__ = "amarszalek"
def sample_mu(ofseries, ord_method='expected'):
n = len(ofseries)
suma = ofseries[0] if ofseries[0].order(method=ord_method) >= 0 else OFNumber(ofseries[0].branch_g,
... | mit | -1,071,619,706,852,037,600 | 33.098361 | 103 | 0.5625 | false | 3.001443 | false | false | false |
Daksh/help-activity | helpactivity.py | 1 | 7111 | # 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 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# bu... | gpl-3.0 | -5,091,947,597,963,151,000 | 33.023923 | 77 | 0.613978 | false | 3.738696 | false | false | false |
uduwage/Multilingual-Wikipedian-Research | codePy/CollectUsersWithTemplates.py | 1 | 24383 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import os
import sys, logging
import pywikibot
import csv
import MySQLdb as mdb
from MySQLdb import cursors
import traceback
import re
import time
import argparse
import utils
import pdb
NOW = time.strftime("%Y_%m_%d_%H_%M")
OUT_DIR_LOGS = os.path.expanduser('~/logs')
OUT_DIR... | mit | -8,788,072,647,558,120,000 | 40.680342 | 175 | 0.653515 | false | 3.149722 | false | false | false |
ragavvenkatesan/Convolutional-Neural-Networks | yann/utils/graph.py | 1 | 1039 | from networkx.drawing.nx_pydot import to_pydot
def draw_network(graph, filename = 'network.pdf', show = False, verbose = 2 ):
"""
This is a simple wrapper to the networkx_draw.
Args:
graph: Supply a networkx graph object. NNs are all DiGraphs.
filename: what file to save down as. Will add ... | mit | -4,739,895,124,660,449,000 | 33.633333 | 95 | 0.633301 | false | 3.791971 | false | false | false |
OnionIoT/Onion-Docs | Omega2/Kit-Guides/Starter/sevenSeg code/mohamed/sevenSegDisplay.py | 1 | 3437 | import registerClass
import onionGpio
import time
class sevenSegment:
#Initializes the GPIO objects based on the pin numbers
def __init__(self, digitOne, digitTwo, digitThree, digitFour):
self.shiftReg = registerClass.shiftRegister(1,2,3)
self.digitOne = onionGpio.OnionGpio(digitOne)
self.digitTwo = onio... | gpl-3.0 | 5,142,943,932,755,677,000 | 25.438462 | 64 | 0.693628 | false | 2.727778 | false | false | false |
nicholas-moreles/blaspy | blaspy/level_3/syr2k.py | 1 | 5321 | """
Copyright (c) 2014-2015-2015, The University of Texas at Austin.
All rights reserved.
This file is part of BLASpy and is available under the 3-Clause
BSD License, which can be found in the LICENSE file at the top-level
directory or at http://opensource.org/licenses/BSD-3-Clause
"""
from ..he... | bsd-3-clause | -4,301,542,516,958,458,000 | 42.268293 | 100 | 0.59782 | false | 3.61481 | false | false | false |
Edgar-Bruno/Estudos_iniciais_Python | GTK/sudoku/exemplos/telaexemplo.py | 1 | 1908 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#Exemplo de tela para montar o jogo SUDOKU
import pygtk
pygtk.require('2.0')
import gtk
class Aplicacao:
def __init__(self):
self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
self.window.set_title("Sudoku")
self.window.connect('destroy', lambda w: gtk.main_quit())
... | gpl-3.0 | 7,216,871,628,185,183,000 | 18.670103 | 71 | 0.527254 | false | 2.180571 | false | false | false |
elterminad0r/cipher_tools | src/scripts/advent.py | 1 | 1360 | """
merry christmas
"""
import datetime
import argparse
def get_args():
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("nothing", type=str)
parser.add_argument("--infinity", action="store_true")
return parser.parse_args()
xm_form = "{days:02} days, {hours:02} hours, {minute... | gpl-3.0 | 1,804,011,296,876,668,400 | 36.777778 | 119 | 0.621324 | false | 3.2 | false | false | false |
mborho/baas | baas/plugins/maemo.py | 1 | 4277 | # -*- coding: utf-8 -*-
# Copyright 2009 Martin Borho <martin@borho.net>
# GPL - see License.txt for details
from urllib import urlencode, quote_plus
from baas.core.plugins import Plugin
from baas.core.helpers import strip_tags, xmlify, htmlentities_decode, load_url
try:
# appengine
from django.utils import si... | gpl-3.0 | -6,609,921,343,890,420,000 | 31.157895 | 96 | 0.498246 | false | 3.982309 | false | false | false |
loghaan/warmice | lib/python/warmice/docengine/rst/writers.py | 1 | 1653 | from docutils import utils
from docutils.writers import html4css1
from warmice import config
class HTMLWriter(html4css1.Writer):
def __init__(self):
html4css1.Writer.__init__(self)
self.translator_class = HTMLTranslator
def translate(self):
html4css1.Writer.translate(self)
se... | gpl-3.0 | -21,095,475,573,128,116 | 30.188679 | 118 | 0.61827 | false | 3.689732 | false | false | false |
pycollada/meshtool | meshtool/filters/panda_filters/pdae_utils/__init__.py | 1 | 2500 | try:
from pdae_cython import *
except ImportError:
from pdae_python import *
import unittest
import time
import os
try:
import cStringIO as StringIO
except ImportError:
import StringIO
CURDIR = os.path.abspath(os.path.dirname(__file__))
class PM_OP:
INDEX_UPDATE = 1
TRIANGLE_ADDITION = 2
... | bsd-3-clause | 1,694,289,745,187,187,500 | 33.722222 | 144 | 0.4664 | false | 4.012841 | true | false | false |
will-cromar/needy | recent_trend.py | 1 | 3087 | from sklearn import linear_model
from matplotlib import pyplot
from price_parsing import *
from xkcd import xkcdify
from datetime import datetime
DEFAULT_SAMPLES = 50
DEFUALT_LOOKBACK = 200
def extendGraphByN(X, n):
"""
Extend the domain of X by n
:param X: The current domain in sklearn format
:param... | mit | -4,323,322,907,432,731,000 | 32.565217 | 107 | 0.694525 | false | 3.844334 | false | false | false |
bmcfee/pumpp | pumpp/sampler.py | 1 | 9158 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
Data subsampling
================
.. autosummary::
:toctree: generated/
Sampler
SequentialSampler
VariableLengthSampler
'''
from itertools import count
import numpy as np
from .base import Slicer
from .exceptions import ParameterError, DataError
_... | isc | 490,653,026,509,169,000 | 27.61875 | 83 | 0.56366 | false | 4.572142 | false | false | false |
MacHu-GWU/single_file_module-project | sfm/winzip.py | 1 | 4194 | # -*- coding: utf-8 -*-
"""
A file compress utility module. You can easily programmatically add files
and directorys to zip archives. And compress arbitrary binary content.
- :func:`zip_a_folder`: add folder to archive.
- :func:`zip_everything_in_a_folder`: add everything in a folder to archive.
- :func:`zip_many_fil... | mit | -8,784,013,377,599,383,000 | 22.86755 | 80 | 0.586293 | false | 2.574286 | false | false | false |
DarkPhoenix6/My_Libraries | Python/AES/matrix.py | 1 | 5923 | import sys
import hashlib
import binascii
import os
import struct
import copy
from cryptography.hazmat.primitives import padding, hashes
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
from cryptography.hazmat.backends import default_backend
from Utils import methoddispatch, singledispatch,... | gpl-3.0 | 8,222,050,417,249,060,000 | 28.467662 | 110 | 0.539423 | false | 3.544584 | false | false | false |
jeroanan/zoetrope | lib/boincindicator/resulttypes/AvailableProject.py | 1 | 1623 | # Copyright (c) David Wilson 2015, 2016, 2021
#
# Licensed under the GPL version 3
import lib.boincindicator.basetypes.Struct as struct
import lib.boincindicator.util.xmlutil as xmlutil
from xml.etree import ElementTree
class AvailableProject(struct.Struct):
def __init__(self):
self.fields = [
... | gpl-3.0 | 2,428,483,349,158,260,700 | 23.223881 | 67 | 0.518792 | false | 4.398374 | false | false | false |
bigartm/visartm | algo/assessment/close_topics.py | 1 | 4493 | from models.models import ArtmModel, Topic
import json
import numpy as np
# Number of assessment for each topic.
ASSESS_RATIO = 5
def initialize_problem(problem):
if problem.model:
topics = dict()
for topic in problem.model.get_topics(layer=problem.layer):
topics[str(topic.index_id)] ... | bsd-3-clause | -7,461,193,080,389,600,000 | 28.366013 | 79 | 0.600045 | false | 3.679771 | false | false | false |
luigivieira/fsdk | fsdk/analysis/blink/compare.py | 1 | 4238 | #!/usr/bin/env python
#
# This file is part of the Fun SDK (fsdk) project. The complete source code is
# available at https://github.com/luigivieira/fsdk.
#
# Copyright (c) 2016-2017, Luiz Carlos Vieira (http://www.luiz.vieira.nom.br)
#
# MIT License
#
# Permission is hereby granted, free of charge, to any person obtai... | mit | -2,815,348,760,164,422,000 | 31.860465 | 80 | 0.595328 | false | 3.616041 | false | false | false |
jdepoix/goto_cloud | goto_cloud/migration_commander/device_modification.py | 1 | 3114 | from command.public import SourceCommand
from remote_execution.public import RemoteHostExecutor
class DeviceModifyingCommand(SourceCommand):
"""
a command supplying utility methods for command which iterate over the devices of the source and target
"""
def _execute_on_every_device(self, executable_fo... | mit | 591,644,863,359,631,000 | 48.428571 | 119 | 0.594733 | false | 4.711044 | false | false | false |
stikonas/calamares | src/modules/plymouthcfg/main.py | 1 | 2339 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# === This file is part of Calamares - <https://github.com/calamares> ===
#
# Copyright 2016, Artoo <artoo@manjaro.org>
# Copyright 2017, Alf Gaida <agaida@siduction.org>
# Copyright 2018, Gabriel Craciunescu <crazy@frugalware.org>
# Copyright 2019, Adriaan de Gr... | gpl-3.0 | -5,162,571,362,015,826,000 | 32.414286 | 79 | 0.643865 | false | 3.533233 | false | false | false |
leandroreox/gnocchi | gnocchi/incoming/file.py | 1 | 7168 | # -*- encoding: utf-8 -*-
#
# 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 | -9,196,363,424,417,275,000 | 37.956522 | 78 | 0.578404 | false | 3.845494 | false | false | false |
MontpellierRessourcesImagerie/openmicroscopy | components/tools/OmeroWeb/omeroweb/webgateway/views.py | 1 | 105421 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# webgateway/views.py - django application view handling functions
#
# Copyright (c) 2007-2015 Glencoe Software, Inc. All rights reserved.
#
# This software is distributed under the terms described by the LICENCE file
# you can find at the root of the distribution bundle,... | gpl-2.0 | -5,965,343,648,575,260,000 | 35.02905 | 79 | 0.562231 | false | 3.842853 | false | false | false |
bigoldboy/repository.bigoldboy | plugin.video.VADER/plugintools.py | 1 | 18797 | # -*- coding: utf-8 -*-
#---------------------------------------------------------------------------
# Plugin Tools v1.0.8
#---------------------------------------------------------------------------
# License: GPL (http://www.gnu.org/licenses/gpl-3.0.html)
# Based on code from youtube, parsedom and pelisalacarta addon... | gpl-3.0 | 1,719,842,315,153,659,100 | 55.942424 | 260 | 0.657708 | false | 3.404783 | false | false | false |
esparta/escrapper | escrapper/websvn.py | 1 | 3417 | """
Scrapper thinking on produce an "API" fot the WebSVN portal.
"""
from __future__ import absolute_import
from __future__ import unicode_literals
from .exceptions import InvalidWebSVN
from .escrapper import _BaseScrapper
class WebSVN(_BaseScrapper):
""""WebSVN class, a way to produce an interface to WebSVN port... | bsd-3-clause | 1,679,482,211,295,812,600 | 37.829545 | 77 | 0.533802 | false | 4.449219 | false | false | false |
a-iv/django-oscar-robokassa | robokassa/forms.py | 1 | 6721 | #coding: utf-8
from hashlib import md5
from urllib import urlencode
from django import forms
from robokassa.conf import LOGIN, PASSWORD1, PASSWORD2
from robokassa.conf import STRICT_CHECK, FORM_TARGET, EXTRA_PARAMS
from robokassa.models import SuccessNotification
class BaseRobokassaForm(forms.Form):
def __init_... | mit | -2,538,329,252,046,368,000 | 34.569697 | 103 | 0.652241 | false | 2.747659 | false | false | false |
danny200309/anaconda | anaconda_lib/jedi/evaluate/imports.py | 1 | 22065 | """
:mod:`jedi.evaluate.imports` is here to resolve import statements and return
the modules/classes/functions/whatever, which they stand for. However there's
not any actual importing done. This module is about finding modules in the
filesystem. This can be quite tricky sometimes, because Python imports are not
always ... | gpl-3.0 | -7,104,660,979,470,788,000 | 39.118182 | 94 | 0.550782 | false | 4.319695 | false | false | false |
jasonleaster/MIT_6.034_2015 | lab6/neural_net_api.py | 1 | 7441 | from copy import deepcopy
from random import shuffle
def distinct(seq):
seen = set()
seen_add = seen.add
return [x for x in seq if not (x in seen or seen_add(x))]
def approx_equal(a, b, epsilon):
return abs(a-b) <= epsilon
class Wire:
"""A Wire is a directed edge that can be used in a neural net ... | gpl-2.0 | -8,235,425,918,135,237,000 | 41.039548 | 80 | 0.60852 | false | 3.845478 | false | false | false |
cassiopagnoncelli/hacker-rank-solutions | no-prefix-set.py | 1 | 1036 | class Trie:
def __init__(self, final):
self.final = final
self.children = {}
def insert(self, word):
head = word[0]
tail = word[1:]
# Check string in trie prefixes `word'
if self.final:
return False
# Check `word' prefixes string in trie
if len(tail) == 0 and head in self.child... | mit | 6,676,781,716,807,010,000 | 23.666667 | 48 | 0.574324 | false | 3.268139 | false | false | false |
swones/swa | swa/swa/settings.py | 1 | 2669 | """
Django settings for swa project.
Generated by 'django-admin startproject' using Django 1.8.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build paths insi... | mit | 7,360,998,102,711,921,000 | 24.663462 | 71 | 0.688647 | false | 3.461738 | false | false | false |
astrorafael/twisted-mqtt | mqtt/client/interfaces.py | 1 | 10411 | # ----------------------------------------------------------------------
# Copyright (C) 2015 by Rafael Gonzalez
#
# 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, includi... | mit | -6,608,508,601,109,586,000 | 34.411565 | 130 | 0.587648 | false | 4.98134 | false | false | false |
bokeh/bokeh | bokeh/command/subcommands/serve.py | 1 | 34929 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2021, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | 5,120,128,224,446,226,000 | 36.317308 | 114 | 0.587363 | false | 4.492476 | true | false | false |
tietokilta-saato/tikplay | tikplay/provider/retrievers/generic_url.py | 1 | 2929 | #!/usr/bin/env python
# Part of tikplay
import json
import os.path
import re
import requests
from provider.retriever import Retriever
from utils import is_url
from utils.shell import call_subprocess
class GenericURLRetriever(Retriever):
"""
A generic URL retriever that tries to guess whether or not the given... | mit | 2,858,346,626,176,938,500 | 36.564103 | 119 | 0.619324 | false | 3.702908 | false | false | false |
betoesquivel/onforums-application | scraper/guardianukscraper/spiders/guardian_spider.py | 1 | 3388 | import scrapy
from ..items import Article, Comment
class GuardianSpider(scrapy.Spider):
name = "guardian"
allowed_domains = ["theguardian.com"]
start_urls = [
"http://www.theguardian.com/world/2016/feb/09/draft-snoopers-charter-fails-on-spying-powers-and-privacy-protections"
]
def __init_... | mit | -9,153,423,322,902,463,000 | 46.71831 | 132 | 0.58294 | false | 3.723077 | false | false | false |
NeCTAR-RC/reporting-api | reporting_api/common/apiversion.py | 1 | 1421 | """Abstract base class representing a particular version of an API spoken
by a WSGI application.
"""
import abc
from reporting_api.common.authapp import KeystoneApplication
import six
@six.add_metaclass(abc.ABCMeta)
class APIVersion(KeystoneApplication):
"""Abstract base class representing a particular version o... | apache-2.0 | 3,773,508,065,367,772,000 | 28 | 81 | 0.640394 | false | 4.511111 | false | false | false |
Tasignotas/topographica_mirror | topo/__init__.py | 1 | 9052 | """
Topographica cortical map simulator package.
Topographica is designed as a collection of packages from which
elements can be selected to model specific systems. For more
information, see the individual subpackages::
base - Core Topographica functions and classes
plotting - Visualization funct... | bsd-3-clause | 1,925,826,865,890,619,600 | 34.085271 | 107 | 0.717963 | false | 3.80496 | false | false | false |
mfalcon/edujango | students/forms.py | 1 | 3399 | # -*- encoding: utf-8 -*-
from django import forms
from django.forms import ModelForm, DateInput
from django.contrib.admin import widgets
from django.utils.translation import ugettext as _
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
from django.forms.models import inlineformset_factory
from... | apache-2.0 | -153,046,324,614,179,500 | 25.554688 | 101 | 0.588114 | false | 3.871298 | false | false | false |
danking/hail | benchmark/python/benchmark_hail/compare/compare.py | 1 | 4108 | import json
import os
import sys
import math
from scipy.stats.mstats import gmean, hmean
import numpy as np
def load_file(path):
if path.endswith('.json'):
with open(path, 'r') as f:
js_data = json.load(f)
elif path.endswith('.tsv'):
import pandas as pd
js_data = pd.read_t... | mit | -4,945,264,358,493,164,000 | 31.346457 | 119 | 0.562074 | false | 3.091046 | false | false | false |
lorensen/VTKExamples | src/Python/PolyData/IterateOverLines.py | 1 | 1442 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import vtk
def main():
origin = [0.0, 0.0, 0.0]
p0 = [1.0, 0.0, 0.0]
p1 = [0.0, 1.0, 0.0]
p2 = [0.0, 1.0, 2.0]
p3 = [1.0, 2.0, 3.0]
# Create a vtkPoints object and store the points in it.
points = vtk.vtkPoints()
points.InsertNextPoint(ori... | apache-2.0 | -6,862,633,042,450,291,000 | 27.84 | 85 | 0.626214 | false | 3.134783 | false | false | false |
ubiar/odoo | openerp/models.py | 1 | 283476 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | 7,229,094,870,013,787,000 | 45.624013 | 247 | 0.5518 | false | 4.278982 | false | false | false |
BinaryDragonStudios/ArenaGame | parse-cards.py | 1 | 1335 | #!/usr/bin/env python
# Use the built in json and sqlite library
import json
import sqlite3
def main():
# Running card counter
card_count = 0
# Load all json data into a collection
card_data = json.load(open('cards.collectible.json'))
# Connect to our database and creat table if it doesn't e... | mit | 1,264,251,716,106,469,400 | 31.560976 | 135 | 0.563296 | false | 3.803419 | false | false | false |
Paul-Ezell/cinder-1 | cinder/volume/drivers/huawei/huawei_driver.py | 1 | 49899 | # Copyright (c) 2015 Huawei Technologies Co., Ltd.
# 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
#
# ... | apache-2.0 | 2,286,386,708,563,684,400 | 40.617181 | 79 | 0.534319 | false | 3.973799 | false | false | false |
eamonnmag/hepdata3 | tests/migration_test.py | 1 | 4243 | #
# This file is part of HEPData.
# Copyright (C) 2015 CERN.
#
# HEPData 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 later version.
#
# HEPData is... | gpl-2.0 | 9,050,371,435,572,144,000 | 35.264957 | 114 | 0.669102 | false | 3.741623 | true | false | false |
ic-hep/DIRAC | docs/source/fakeEnvironment.py | 1 | 4176 | ''' fakeEnvironment
this module allows to create the documentation without having to do
any kind of special installation. The list of mocked modules is:
GSI
'''
import mock
import sys
#...............................................................................
# mocks...
class MyMock(mock... | gpl-3.0 | 1,321,243,197,060,662,300 | 43.913978 | 82 | 0.50455 | false | 3.631304 | false | false | false |
dmacias72/unRAID-plugins | source/qnotify/usr/local/emhttp/plugins/qnotify/PyQuassel/quassel.py | 1 | 1670 | from enum import IntEnum
class Message(dict):
class Type(IntEnum):
Plain = 0x00001
Notice = 0x00002
Action = 0x00004
Nick = 0x00008
Mode = 0x00010
Join = 0x00020
Part = 0x00040
Quit = 0x00080
Kick = 0x00... | gpl-2.0 | 7,600,243,104,377,693,000 | 22.521127 | 162 | 0.57006 | false | 3.415133 | false | false | false |
Elico-Corp/odoo_OCB | addons/l10n_br/account.py | 4 | 1811 | # -*- encoding: utf-8 -*-
import openerp
from openerp.osv import fields, osv
TAX_DEFAULTS = {
'base_reduction': 0,
'amount_mva': 0,
'amount_type': 'percent',
}
class account_tax_template(osv.osv):
""" Add fields used to define some brazilian taxes ... | agpl-3.0 | 5,387,798,143,675,682,000 | 41.116279 | 92 | 0.440641 | false | 4.631714 | false | false | false |
liucode/liucode.github.io | resume_tool/degree_extractor.py | 1 | 1417 | # encoding:utf-8
import re
degree_str1 = u"(初中|高中|职高|中专|技校|大专|本科|硕士研究生|在职研究生|工程硕士|专业硕士|博士研究生|博士在读|MBA硕士|MBA|EMBA|工商管理硕士|工学学士|访问学者|博士后|研究生|硕士|博士|学士)"
degree_pattern1 = re.compile(degree_str1)
# 抽取学位信息,并将日期按照顺序排列存入list
def degree_extract(str):
result_list = []
school_list = degree_pattern1.findall(str)
for ... | mit | 761,579,270,386,665,600 | 25.2 | 121 | 0.599661 | false | 2.094139 | false | false | false |
MaximeBiset/care4care | branch/migrations/0002_auto_20141127_0251.py | 1 | 1082 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import multiselectfield.db.fields
class Migration(migrations.Migration):
dependencies = [
('branch', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='jo... | agpl-3.0 | -5,120,916,554,649,062,000 | 38.740741 | 477 | 0.591799 | false | 3.092219 | false | false | false |
Amarite1/redlite | desktop.py | 1 | 1703 | '''
' This file is part of redlite.
'
' redlite 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.
'
' redlite is distributed in t... | gpl-3.0 | -7,214,781,612,312,186,000 | 19.047059 | 71 | 0.701116 | false | 3.207156 | false | false | false |
thehub/hubspace | hubspace/file_store.py | 1 | 2693 | from model import LocationFiles, MetaWrapper
from hubspace.utilities.image_preview import create_image_preview
import os
import StringIO
from sqlobject import AND
import logging
applogger = logging.getLogger("hubspace")
def save_file(location, fd, height=None, width=None, upload_dir=''):
"""here we will need to ge... | gpl-2.0 | 7,480,806,417,860,378,000 | 35.890411 | 117 | 0.62384 | false | 3.639189 | false | false | false |
vossman/ctfeval | appionlib/apSpider/operations.py | 1 | 5633 |
## python
import os
import re
import time
## appion
from appionlib import apDisplay
from appionlib import apFile
from appionlib import spyder
"""
A large collection of SPIDER functions for that are common to other SPIDER functions
I try to keep the trend
image file:
*****img.spi
image stack file:
*****stack.spi
do... | apache-2.0 | -5,093,390,546,841,311,000 | 27.306533 | 94 | 0.6327 | false | 2.668404 | false | false | false |
TissueMAPS/TmServer | tmserver/error.py | 1 | 4696 | # TmServer - TissueMAPS server application.
# Copyright (C) 2016 Markus D. Herrmann, University of Zurich and Robin Hafen
#
# 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... | agpl-3.0 | -3,627,920,703,996,297,700 | 30.516779 | 80 | 0.629685 | false | 4.519731 | false | false | false |
owais/django-allauth-slack | allauth_provider_slack/views.py | 1 | 1727 | import requests
from allauth.socialaccount.providers.oauth2.client import OAuth2Error
from allauth.socialaccount.providers.oauth2.views import (OAuth2Adapter,
OAuth2LoginView,
OAuth2CallbackView)
from .... | mit | -7,026,433,891,981,775,000 | 31.584906 | 77 | 0.570932 | false | 3.979263 | false | false | false |
stklik/tpg.now | tpgnow/server.py | 1 | 2562 | import os
from .arguments import Arguments
from .uiwriter import UiWriter, HtmlWriter, CLIFormatter, HtmlFormatter
from .tpg import Tpg
from config import Config
from datetime import datetime
from flask import render_template
from jinja2 import Environment, FileSystemLoader, DebugUndefined, Template
env = Environment... | mit | 7,447,804,413,094,546,000 | 35.084507 | 129 | 0.664715 | false | 3.818182 | false | false | false |
uclouvain/osis_louvain | assessments/business/score_encoding_progress.py | 1 | 8093 | ##############################################################################
#
# 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 ... | agpl-3.0 | -5,714,260,804,187,828,000 | 49.575 | 129 | 0.650395 | false | 3.909179 | false | false | false |
Zchander/RPi-PowerFunctions | XMLRPC Server/xmlrpcServer/i2cBoard.py | 1 | 2384 | """
LEGO PowerFunctions I2C Server
File: main.py
Author: Xander Maas <xander@xjmaas.nl>
Date: 10 oct 2014
LICENSE INFO:
AS FOR NOW THIS SOFTWARE IS NOT TO BE PUBLISHED WITHOUT MY EXPLICIT
WRITTEN PERMISSION ONLY.
Copyright (c) Xander Maas, 2014
This programm will create a tcp b... | gpl-2.0 | 7,652,262,946,433,646,000 | 29.564103 | 93 | 0.701342 | false | 3.11634 | false | false | false |
igryski/Indices_icclim_ClipC | src/calc_indices_icclim_RCM_TMAX_EUR_44.py | 1 | 20842 | # Make python script executable
#!/usr/bin/python
# Script name: calc_indices_icclim_RCM_PRECIP_EUR_44.py
# ==================================================
# Script to calculate indices from ensemble of RCMs (EURO-CORDEX)
# on resolutions 0.44deg (50km) for CLIPC
# This script does only TMAX indices
# ===========... | gpl-3.0 | -2,006,894,711,394,165,000 | 41.190283 | 106 | 0.517177 | false | 2.745258 | false | false | false |
sseemayer/qstat-pretty | qstatpretty/ttyutil/table.py | 1 | 3037 | # -*- coding: utf8 -*-
from qstatpretty.ttyutil.unicode import unicode, ulen
DELIMITERS_FULL = {
'header_tl': u"┌",
'header_t': u"─",
'header_tr': u"┐",
'header_b': u"─",
'header_bl': u"├",
'header_l': u"│",
'header_r': u"│",
'header_br': u"┤",
... | gpl-2.0 | -7,396,934,525,866,160,000 | 24.784483 | 127 | 0.457372 | false | 2.656306 | false | false | false |
neutrinoceros/el4 | diffgal/main.py | 1 | 1098 | #-*-coding:utf-8-*-
from classes import *
from functions import *
from time import time
import numpy as np
import pylab as pl
#-------------------------
# script
#-------------------------
pl.ion()
fig=pl.figure()
print "sourcing %.1e particles..." % (SAMPLESIZE)
t1=time()
bench = CRSet(int(SAMPLESIZE))
print "too... | gpl-2.0 | -7,135,156,615,798,624,000 | 18.963636 | 57 | 0.578324 | false | 3.033149 | false | false | false |
jelly/calibre | src/calibre/gui2/dialogs/choose_library.py | 1 | 7562 | #!/usr/bin/env python2
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import print_function
__license__ = 'GPL v3'
__copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import os, errno
from threading import Thread, Event
from PyQt5.Qt import QDialog, ... | gpl-3.0 | 5,655,586,295,917,245,000 | 39.010582 | 128 | 0.562946 | false | 4.148108 | false | false | false |
bbglab/adventofcode | 2017/iker/day10.py | 1 | 8740 | """
--- Day 10: Knot Hash ---
You come across some programs that are trying to implement a software emulation of a hash based on knot-tying. The hash these programs are implementing isn't very strong, but you decide to help them anyway. You make a mental note to remind the Elves later not to invent their own cryptogra... | mit | -1,022,563,351,272,090,000 | 63.740741 | 607 | 0.705835 | false | 3.570261 | false | false | false |
calvingiles/cosine_transform | cosine_transform/__init__.py | 1 | 1584 | from __future__ import print_function, absolute_import, unicode_literals
import numpy
from numpy import sin, cos, arccos, dot, isclose, count_nonzero
from scipy.spatial.distance import cosine, norm
__author__ = 'calvin'
def transform_to_similarity(v, s):
if v.shape[0] < 2:
raise ValueError('Cosine simila... | mit | 9,018,148,642,783,472,000 | 21.971014 | 92 | 0.527778 | false | 2.793651 | false | false | false |
tiagofrepereira2012/bob.learn.linear | bob/learn/linear/test.py | 1 | 28647 | #!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# Andre Anjos <andre.anjos@idiap.ch>
# Tue May 31 16:55:10 2011 +0200
#
# Copyright (C) 2011-2014 Idiap Research Institute, Martigny, Switzerland
"""Tests on the machine infrastructure.
"""
import os, sys
import nose.tools
import math
import numpy
from . import M... | bsd-3-clause | -8,985,137,233,965,356,000 | 28.441932 | 113 | 0.6312 | false | 2.701273 | true | false | false |
sunlightlabs/tcamp | tcamp/twit/migrations/0003_auto__del_field_sessionblocktweet_next__add_field_sessionblocktweet_pr.py | 1 | 6729 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'SessionBlockTweet.next'
db.delete_column(u'twit_sessionblocktweet', 'next_id')
# ... | bsd-3-clause | -4,248,672,245,849,296,000 | 69.842105 | 197 | 0.565166 | false | 3.665033 | false | false | false |
Movile/hecuba | setup.py | 1 | 2266 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
hecuba setup script
~~~~~~~~~~~~~~~~~~~
Setup script for packaging hecuba
:copyright: (c) 2016 by Hugo Cisneiros.
:license: GPLv2, see LICENSE for more details.
"""
import io
from hecuba import __version__
from os.path import abspath, dirname, join... | gpl-2.0 | 2,136,347,917,363,449,000 | 28.428571 | 75 | 0.575463 | false | 3.678571 | false | false | false |
kracekumar/pythonbyexamplestutorial | apr-workshop/solutions/06-for-loop.py | 1 | 2377 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Write a program to display the peom The Road Not Taken by Robert Frost.
Two roads diverged in a yellow wood,
And sorry I could not travel both
And be one traveler, long I stood
And looked down one as far as I could
To where it bent in the undergrowth;
Then took the ... | cc0-1.0 | -3,627,289,049,480,599,600 | 26.275862 | 71 | 0.697851 | false | 3.404591 | false | false | false |
cimat/data-visualization-patterns | display-patterns/Hierarchies/Pruebas/librerias.py | 1 | 1712 | import os
import re
class pruebas:
nombre=""
lib=0
loc=0
def __init__(self, nombre, lib):
self.nombre=nombre
self.lib=lib
self.loc=0
def SetLoc(self,loc):
self.loc=loc
if __name__ == '__main__':
path = '/home/juannis/data-visualization-patterns/display-patterns/Hierarchies/Pruebas'
lstDir = os.wa... | cc0-1.0 | 6,862,899,713,100,299,000 | 24.191176 | 112 | 0.586449 | false | 2.566717 | false | false | false |
maxivanoff/fftoolbox | run-examples/run-series-lebedev.py | 1 | 1197 | import fftoolbox as fftb
import logging, sys
#logger = logging.getLogger(__name__)
#lf = '%(levelname)s: %(funcName)s at %(filename)s +%(lineno)s\n%(message)s\n'
#logging.basicConfig(level=logging.DEBUG, format=lf)
#logging.basicConfig(filename='./log', filemode='w', level=logging.DEBUG, format=lf)
molecule_name = s... | gpl-2.0 | -1,236,776,701,782,292,700 | 29.692308 | 160 | 0.627402 | false | 2.941032 | false | false | false |
ysenko/python-from-zero-to-hero | twitter_explorer/twitter_backend/auth.py | 1 | 1799 | """Twitter authentication related utilities."""
import logging
import tweepy
log = logging.getLogger(__name__)
def get_authorized_api(access_token_key, access_token_secret, consumer_key, consumer_secret):
"""Return an API object initialized with the given token and secret.
:Parameters:
- `access_t... | mit | -5,645,576,772,357,424,000 | 34.98 | 115 | 0.678155 | false | 3.962555 | false | false | false |
unlimitedlabs/orchestra | orchestra/models/core/models.py | 1 | 33204 | from django.conf import settings
from django.db import models
from django.utils import timezone
from djmoney.models.fields import MoneyField
from jsonfield import JSONField
from phonenumber_field.modelfields import PhoneNumberField
from orchestra.models.core.mixins import CertificationMixin
from orchestra.models.core.m... | apache-2.0 | -4,198,072,921,720,905,000 | 38.48157 | 79 | 0.65209 | false | 4.408391 | false | false | false |
alexandrovteam/curatr | mcf_standard_browser/mcf_standard_browser/urls.py | 1 | 1109 | """mcf_standard_browser URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/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='hom... | apache-2.0 | 2,292,887,632,025,387,800 | 40.074074 | 79 | 0.714157 | false | 3.520635 | false | false | false |
anselmobd/fo2 | src/cd/views/mapa.py | 1 | 2526 | from pprint import pprint
from django.shortcuts import render
from django.views import View
class Mapa(View):
def __init__(self):
self.template_name = 'cd/mapa.html'
self.title_name = 'Mapa'
def mount_context(self):
enderecos = {}
letras = [
{'letra': 'A', 'int_i... | mit | -7,363,763,833,218,696,000 | 33.315068 | 75 | 0.381637 | false | 3.01444 | false | false | false |
ict-felix/stack | vt_manager_kvm/src/python/vt_manager_kvm/communication/sfa/rspecs/elements/versions/nitosv1Sliver.py | 1 | 2191 | from vt_manager_kvm.communication.sfa.util.xrn import Xrn
from vt_manager_kvm.communication.sfa.util.xml import XmlElement
from vt_manager_kvm.communication.sfa.rspecs.elements.element import Element
from vt_manager_kvm.communication.sfa.rspecs.elements.sliver import Sliver
from vt_manager_kvm.communication.sfa.rspecs... | apache-2.0 | 244,637,343,191,726,300 | 37.438596 | 97 | 0.602008 | false | 3.627483 | false | false | false |
TribeMedia/synapse | tests/storage/test_client_ips.py | 2 | 2133 | # -*- coding: utf-8 -*-
# Copyright 2016 OpenMarket Ltd
#
# 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 | 7,188,592,536,661,298,000 | 33.403226 | 75 | 0.630098 | false | 3.885246 | true | false | false |
reinout/django | django/db/backends/sqlite3/base.py | 1 | 18616 | """
SQLite3 backend for the sqlite3 module in the standard library.
"""
import decimal
import math
import re
import warnings
from sqlite3 import dbapi2 as Database
import pytz
from django.core.exceptions import ImproperlyConfigured
from django.db import utils
from django.db.backends import utils as backend_utils
from... | bsd-3-clause | -96,864,150,476,498,350 | 37.783333 | 105 | 0.605125 | false | 3.967604 | false | false | false |
RealTimeWeb/wikisite | MoinMoin/parser/text_docbook.py | 1 | 6883 | # -*- coding: iso-8859-1 -*-
"""
MoinMoin - DocBook-XML Parser
This code was tested with 4Suite 1.0a4 and 1.0b1
@copyright: 2005 Henry Ho <henryho167 AT hotmail DOT com>,
2005 MoinMoin:AlexanderSchremmer
@license: GNU GPL, see COPYING for details.
DOCBOOK Parser:
Features:
... | apache-2.0 | 312,725,940,336,476,350 | 34.117347 | 107 | 0.61049 | false | 3.771507 | false | false | false |
ArcherSys/ArcherSys | Lib/site-packages/github/tests/ConditionalRequestUpdate.py | 1 | 7268 | <<<<<<< HEAD
<<<<<<< HEAD
# -*- coding: utf-8 -*-
# ########################## Copyrights and license ############################
# #
# Copyright 2013 AKFish <akfish@gmail.com> #
# Copyright 2013 Vincent J... | mit | -2,833,190,042,739,354,000 | 51.666667 | 106 | 0.46863 | false | 5.075419 | true | false | false |
googleapis/googleapis-gen | google/devtools/cloudtrace/v2/devtools-cloudtrace-v2-py/google/cloud/trace_v2/services/trace_service/client.py | 1 | 21609 | # -*- coding: utf-8 -*-
# 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... | apache-2.0 | -3,905,905,250,935,435,000 | 41.621302 | 113 | 0.612846 | false | 4.565603 | false | false | false |
oser-cs/oser-website | projects/signals.py | 1 | 2877 | """Projects app signals."""
import logging
from django.db.models.signals import post_save, pre_delete
from django.dispatch import receiver, Signal
from . import notifications
from .models import Participation
logger = logging.getLogger('web.projects.signals')
pending = Signal(providing_args=('instance',))
valid =... | gpl-3.0 | -287,935,269,574,448,700 | 30.271739 | 77 | 0.72228 | false | 3.866935 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.