repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | 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 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
commaai/openpilot | selfdrive/locationd/models/car_kf.py | 1 | 4757 | #!/usr/bin/env python3
import math
import sys
from typing import Any, Dict
import numpy as np
from selfdrive.locationd.models.constants import ObservationKind
from selfdrive.swaglog import cloudlog
from rednose.helpers.kalmanfilter import KalmanFilter
if __name__ == '__main__': # Generating sympy
import sympy as... | mit | 7,562,025,558,407,216,000 | 27.656627 | 164 | 0.615304 | false |
excelly/xpy-ml | ex/ml/liblinear.py | 1 | 3853 | from common import *
import ex.ml.libsvm.linearutil as lu
def a2l(X, y = None):
'''convert arrays to list
'''
if y is not None:
y = y.tolist()
if issparse(X):
X = [dict(zip(find(row)[1], row.data)) for row in X]
else:
X = X.tolist()
if y is not None:
... | apache-2.0 | -1,892,333,781,465,634,600 | 24.516556 | 95 | 0.509473 | false |
googleads/google-ads-python | google/ads/googleads/v6/common/types/metrics.py | 1 | 42787 | # -*- 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 o... | apache-2.0 | 7,806,873,479,053,634,000 | 47.843607 | 126 | 0.65375 | false |
iandees/all-the-places | locations/spiders/aubonpain.py | 1 | 2580 | import scrapy
import re
import json
from locations.items import GeojsonPointItem
from locations.hours import OpeningHours
class AuBonPainSpider(scrapy.Spider):
name = "aubonpain"
download_delay = 0.5
allowed_domains = [
"www.aubonpain.com",
]
start_urls = (
'https://www.aubonpain.c... | mit | -4,718,689,655,118,514,000 | 35.857143 | 119 | 0.527907 | false |
douglasbgatti/rango-tutorial | tango_with_django_project/rango/bing_search.py | 1 | 2360 | import json
import urllib, urllib2
BING_API_KEY = '6uAUnyT0WuPBRqv5+AZIuWrpNsKJ++t0E9Sp9DDkh3Q'
def run_query(search_terms):
# Specify the base
root_url = 'https://api.datamarket.azure.com/Bing/Search/v1/'
source = 'Web'
# Specify how many results we wish to be returned per page.
# Offset specifi... | apache-2.0 | 702,510,726,307,883,600 | 34.238806 | 79 | 0.659322 | false |
njwilson23/scipy | scipy/cluster/hierarchy.py | 1 | 91969 | """
========================================================
Hierarchical clustering (:mod:`scipy.cluster.hierarchy`)
========================================================
.. currentmodule:: scipy.cluster.hierarchy
These functions cut hierarchical clusterings into flat clusterings
or find the roots of the forest f... | bsd-3-clause | 6,255,493,199,539,831,000 | 32.899373 | 155 | 0.588742 | false |
cloudera/Impala | tests/unittests/test_command.py | 2 | 1791 | # 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 | -3,043,633,197,999,597,600 | 35.55102 | 86 | 0.717476 | false |
danielecook/gist-alfred | urllib3/contrib/socks.py | 5 | 6386 | # -*- coding: utf-8 -*-
"""
This module contains provisional support for SOCKS proxies from within
urllib3. This module supports SOCKS4 (specifically the SOCKS4A variant) and
SOCKS5. To enable its functionality, either install PySocks or install this
module with the ``socks`` extra.
The SOCKS implementation supports t... | mit | 9,006,006,380,867,902,000 | 32.260417 | 79 | 0.612903 | false |
AutorestCI/azure-sdk-for-python | azure-servicefabric/azure/servicefabric/models/chaos_context_map_item.py | 1 | 1090 | # 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 ... | mit | -7,523,740,089,934,637,000 | 28.459459 | 76 | 0.544954 | false |
mirumee/python-invoicible | examples/cli.py | 1 | 7581 | import cmd
import copy
import httplib
import oauth.oauth as oauth
import pprint
import readline
import sys
import urlparse
import webbrowser
import invoicible
# key and secret granted by the service provider for this consumer application
CONSUMER_KEY = ''
CONSUMER_SECRET_KEY = ''
# access token for this consumer app... | lgpl-3.0 | -4,260,646,054,423,910,400 | 37.678571 | 225 | 0.664688 | false |
dials/dials | util/version.py | 1 | 4510 | # DIALS version numbers are constructed from
# 1. a common prefix
__dials_version_format = "DIALS %s"
# 2. the most recent annotated git tag (or failing that: a default string)
__dials_version_default = "3.5"
# 3. a dash followed by the number of commits since that tag
# 4. a dash followed by a lowercase 'g' and th... | bsd-3-clause | 3,118,716,970,657,075,000 | 35.967213 | 106 | 0.531486 | false |
sigmavirus24/pip | tasks/vendoring/__init__.py | 1 | 3688 | """"Vendoring script, python 3.5 needed"""
from pathlib import Path
import re
import shutil
import invoke
TASK_NAME = 'update'
FILE_WHITE_LIST = (
'Makefile',
'vendor.txt',
'__init__.py',
'README.rst',
)
def drop_dir(path):
shutil.rmtree(str(path))
def remove_all(paths):
for path in path... | mit | 8,446,935,301,462,685,000 | 26.729323 | 74 | 0.594902 | false |
provegard/airpnp | twisted/plugins/common.py | 1 | 3366 | # -*- coding: utf-8 -*-
# Copyright (c) 2011, Per Rovegård <per@rovegard.se>
# 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
#... | bsd-3-clause | 899,077,319,433,274,000 | 34.797872 | 102 | 0.707578 | false |
pivonroll/Qt_Creator | share/qtcreator/debugger/dumper.py | 1 | 74430 | ############################################################################
#
# Copyright (C) 2016 The Qt Company Ltd.
# Contact: https://www.qt.io/licensing/
#
# This file is part of Qt Creator.
#
# Commercial License Usage
# Licensees holding valid commercial Qt licenses may use this file in
# accordance with the co... | gpl-3.0 | 2,995,124,426,568,365,000 | 36.45848 | 103 | 0.55573 | false |
chapinb/shattered | libs/liblogcat.py | 1 | 4282 | #!/usr/bin/env python3
##################################################################################
## ##
## _____ _ _ _ _ ##
## | __| |_ ___| |_| |_ ___ ___ ___ _... | gpl-3.0 | 5,323,526,873,882,407,000 | 35.234783 | 94 | 0.429939 | false |
zzir/white | update_content.py | 1 | 3484 | import sqlite3
from wtforms.fields import StringField, IntegerField
from wtforms import validators
from wtforms_tornado import Form
from config import CONFIG
from get_content import TContents
class CheckContents(Form):
title = StringField(validators=[validators.length(min=1, max=100)])
slug = StringField(va... | mit | 5,526,406,091,569,730,000 | 30.192661 | 76 | 0.573235 | false |
IntegerMan/Pi-MFD | PiMFD/Applications/Navigation/MapLocations.py | 1 | 9253 | # coding=utf-8
"""
This file contains map locations information
"""
from PiMFD.Applications.MFDPage import MFDPage
from PiMFD.UI.Button import MFDButton
from PiMFD.UI.TextBoxes import TextBox
from PiMFD.UI.Widgets.MenuItem import TextMenuItem
__author__ = 'Matt Eland'
class MapLocation(object):
"""
Represe... | gpl-2.0 | -5,634,889,265,219,760,000 | 31.584507 | 118 | 0.608451 | false |
google/nerfactor | nerfactor/datasets/nerf.py | 1 | 9257 | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | 779,771,498,087,342,300 | 42.055814 | 80 | 0.555796 | false |
Superjom/bad_source | python/paper/spider/spider/spiders/amazon_notebook.py | 1 | 2872 | # -*- coding: utf-8 -*-
from __future__ import division
import sys
sys.path.append('../../')
import re
import time
import random
import urlparse as up
from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.exceptions import CloseSpider
from scra... | gpl-2.0 | 4,343,573,823,116,785,700 | 26.883495 | 134 | 0.614206 | false |
eugeniy/pytest-tornado | test/test_fixtures.py | 1 | 1385 | import pytest
import sys
from tornado import gen
_used_fixture = False
@gen.coroutine
def dummy(io_loop):
yield gen.sleep(0)
raise gen.Return(True)
@pytest.fixture(scope='module')
def preparations():
global _used_fixture
_used_fixture = True
pytestmark = pytest.mark.usefixtures('preparations')
... | apache-2.0 | -5,778,535,927,752,860,000 | 22.083333 | 75 | 0.633935 | false |
freezeeedos/revshelly | python_reverse_shell.py | 1 | 3523 | #!/usr/bin/python2
# -*- coding: utf-8 -*-
# Copyright (c) 2013 Quentin Gibert
# All rights reserved.
# Based on the work of:
# David Kennedy: http://www.secmaniac.com/june-2011/creating-a-13-line-backdoor-worry-free-of-av/
# Xavier Garcia: www.shellguardians.com
#Permission is hereby granted, free of charge, to... | mit | -661,312,054,476,301,800 | 32.552381 | 98 | 0.598354 | false |
WoLpH/EventGhost | eg/Classes/PluginItem.py | 1 | 6391 | # -*- coding: utf-8 -*-
#
# This file is part of EventGhost.
# Copyright © 2005-2016 EventGhost Project <http://www.eventghost.net/>
#
# EventGhost 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 versio... | gpl-2.0 | -8,394,167,896,932,475,000 | 30.019417 | 79 | 0.6 | false |
FabriceSalvaire/Musica | Musica/Geometry/Path.py | 1 | 2215 | ####################################################################################################
#
# Musica - A Music Theory Package for Python
# Copyright (C) 2017 Fabrice Salvaire
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as pub... | gpl-3.0 | 6,031,306,140,311,497,000 | 31.101449 | 100 | 0.463657 | false |
ikargis/horizon_fod | horizon/decorators.py | 1 | 3388 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 CRS4
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use th... | apache-2.0 | -4,795,479,006,821,248,000 | 35.042553 | 79 | 0.679752 | false |
quiltdata/quilt | api/python/quilt3/registry.py | 1 | 1604 | """
Microservice that provides temporary user credentials to the catalog
"""
from datetime import timedelta
import boto3
import requests
from botocore.exceptions import ClientError
from flask import Flask
from flask_cors import CORS
from flask_json import as_json
app = Flask(__name__) # pylint: disable=invalid-name... | apache-2.0 | -7,490,552,160,810,158,000 | 22.588235 | 79 | 0.642768 | false |
DarthMaulware/EquationGroupLeaks | Leak #5 - Lost In Translation/windows/Resources/Dsz/PyScripts/Lib/dsz/windows/driver/__init__.py | 1 | 11721 | # uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: __init__.py
import dsz
import dsz.file
import dsz.path
import dsz.version
def Install(project, driverName, localDriverName, startValue, typeValue, a... | unlicense | 6,155,391,410,086,799,000 | 38.073333 | 158 | 0.594233 | false |
Roshan2017/spinnaker | dev/generate_bom.py | 1 | 12830 | #!/usr/bin/python
#
# Copyright 2017 Google Inc. 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... | apache-2.0 | 735,947,141,761,425,800 | 37.878788 | 117 | 0.628059 | false |
bakostamas/weather-station | weather.py | 1 | 9237 |
import json, pprint, app_settings, pytz
import connected_sensor
from datetime import datetime
from urllib.request import urlopen # Only in Python 3
weather_list = {}
def get_weather_data(p_city_id, p_type, p_cnt):
"""
Get weather data from openweathermap.org
:param p_city_id: ID of the city
:param ... | gpl-3.0 | 1,599,481,039,528,907,800 | 42.570755 | 141 | 0.598354 | false |
michaelBenin/sqlalchemy | lib/sqlalchemy/engine/result.py | 1 | 36000 | # engine/result.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Define result set constructs including :class:`.ResultProxy`
and :class:`.RowProxy... | mit | 7,757,144,335,151,465,000 | 33.582133 | 84 | 0.566028 | false |
strahlex/machinekit | configs/ARM/BeagleBone/Replicape-Stretch/ARM.Replicape.B3/replicape.py | 5 | 1365 | #!/usr/bin/python2
# encoding: utf-8
"""
replicape.py
Machinekit HAL for Replicape Rev B3
Copyright (c) 2016 Sam Wong
Adaptation to Debian Stretch and kernel 4.14.x, extensions as in README.md:
Copyright (c) Karl Jacobs
Permission is hereby granted, free of charge, to any person obtaining a copy of this software a... | lgpl-2.1 | 4,948,745,157,163,811,000 | 51.5 | 460 | 0.791209 | false |
atitus5/MiniPlaces | DataLoader_multi.py | 1 | 9187 | import os
import numpy as np
import scipy.misc
import h5py
import random
np.random.seed(123)
# loading data from .h5
class DataLoaderH5(object):
def __init__(self, **kwargs):
self.load_size = int(kwargs['load_size'])
self.fine_size = int(kwargs['fine_size'])
self.data_mean = np.array(kwar... | mit | 7,697,863,647,594,161,000 | 40.949772 | 142 | 0.534669 | false |
benrudolph/commcare-hq | custom/ewsghana/reports/__init__.py | 1 | 11687 | from datetime import datetime
from django.core.urlresolvers import reverse
from django.db.models import Q
from corehq import Domain
from corehq.apps.programs.models import Program
from corehq.apps.reports.commtrack.standard import CommtrackReportMixin
from corehq.apps.reports.filters.dates import DatespanFilter
from co... | bsd-3-clause | -9,058,818,260,958,323,000 | 35.636364 | 115 | 0.608967 | false |
khosrow/metpx | sundew/lib/PDSLatencies.py | 1 | 7398 | #!/usr/bin/env python
"""
MetPX Copyright (C) 2004-2006 Environment Canada
MetPX comes with ABSOLUTELY NO WARRANTY; For details type see the file
named COPYING in the root of the source directory tree.
"""
"""
#############################################################################################
# Name: PDSLa... | gpl-2.0 | -795,901,474,159,940,700 | 42.011628 | 181 | 0.499594 | false |
CodeYellowBV/django-binder | tests/test_set_nullable_relation.py | 1 | 2202 | from binder.exceptions import BinderValidationError
from binder.router import Router
from binder.views import ModelView
from .testapp.views import AnimalView
from .testapp.models import Animal, Caretaker
from django.test import TestCase
class TestSetNullableRelations(TestCase):
def test_standard_filling_in_relati... | mit | 7,358,221,550,644,352,000 | 26.185185 | 99 | 0.624886 | false |
jonDel/torrents_manager | example.py | 1 | 4439 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import config,re,time
from tpb import TPB
from tpb import CATEGORIES, ORDERS
import OpenSubtitles
import logging
import gzip, os
import transmissionrpc
logging.basicConfig(level=logging.DEBUG)
uploaders = config.ConfigSectionMap("torrent_uploaders")
episode = config.Co... | gpl-3.0 | -1,485,059,765,586,805,000 | 27.980392 | 242 | 0.695535 | false |
EduardoMolina/SU2 | SU2_PY/SU2/run/merge.py | 1 | 3218 | ## \file merge.py
# \brief python package for merging meshes
# \author T. Economon, T. Lukaczyk, F. Palacios
# \version 7.0.3 "Blackbird"
#
# SU2 Project Website: https://su2code.github.io
#
# The SU2 Project is maintained by the SU2 Foundation
# (http://su2foundation.org)
#
# Copyright 2012-2020, SU2 Contributors... | lgpl-2.1 | 4,733,021,594,699,282,000 | 25.377049 | 72 | 0.568676 | false |
EliotBerriot/django-dynamic-preferences | tests/test_manager.py | 1 | 3314 | from __future__ import unicode_literals
from django.test import TestCase
from django.core.cache import caches
from django.urls import reverse
from django.contrib.auth.models import User
from dynamic_preferences.registries import (
global_preferences_registry as registry
)
from dynamic_preferences.models import Glo... | bsd-3-clause | -1,961,682,040,945,668,000 | 32.14 | 71 | 0.629451 | false |
STIXProject/python-stix | stix/core/stix_header.py | 1 | 5004 | # Copyright (c) 2017, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.
from mixbox import fields
import stix
from stix.utils import deprecated
from stix.common import InformationSource, StructuredTextList, Profiles
from stix.common.vocabs import VocabField, PackageIntent
from stix.dat... | bsd-3-clause | 8,210,940,760,186,117,000 | 34.489362 | 119 | 0.666267 | false |
moio/sumaform | salt/grafana/setup_grafana.py | 1 | 1107 | #!/usr/bin/env python
import base64
import errno
import httplib
import json
import socket
import sys
import time
def do(method, connection, headers, path, body=None):
connection.request(method, path, headers=headers, body=json.dumps(body))
resp = connection.getresponse()
content = resp.read()
if resp... | bsd-3-clause | 7,001,299,087,362,661,000 | 26 | 88 | 0.68112 | false |
RysavyD/platby | models/db_model.py | 1 | 5519 | # coding: utf8
import locale
from mz_wkasa_platby import fix_login, Uc_sa
# Uc_sa - id účtů účtové osnovy - při importu zde je vidí controléry i views
locale.setlocale(locale.LC_ALL, 'cs_CZ.UTF-8')
class IS_IN_DB_(IS_IN_DB):
def build_set(self):
super(IS_IN_DB_, self).build_set()
... | agpl-3.0 | -6,709,750,360,438,365,000 | 33.940789 | 94 | 0.581549 | false |
MSusik/invenio | invenio/base/bundles.py | 1 | 2885 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2014 CERN.
##
## Invenio 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) a... | gpl-2.0 | 4,890,553,612,865,183,000 | 23.65812 | 113 | 0.625303 | false |
tsdfsetatata/xserver | Server/dump_srv/print_wanyaogu.py | 1 | 3005 | #!/usr/bin/python
# coding: UTF-8
import sys
from socket import *
import struct
import raid_pb2
import wanyaogu_pb2
import login_pb2
import cast_skill_pb2
import move_direct_pb2
import team_pb2
import datetime
import get_one_msg
import scene_transfer_pb2
import horse_pb2
WATCH_PLAYER = {8589935415}
HOST='127.0.0.1'
... | gpl-3.0 | 5,305,513,111,979,851,000 | 27.45 | 140 | 0.603515 | false |
deapplegate/wtgpipeline | measure_skew_surface.py | 1 | 68615 | #!/usr/bin/env python
######################
from __future__ import with_statement
import unittest, sys, math, re, os, optparse
import numpy, astropy, astropy.io.fits as pyfits
from scipy import interpolate
import ldac, utilities
######################
__cvs_id__ = "$Id: measure_unstacked_photometry.py,v 1.15 2010-0... | mit | 1,512,173,792,022,315,300 | 31.518957 | 170 | 0.519143 | false |
coddingtonbear/jira | jira/client.py | 1 | 100626 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import print_function
"""
This module implements a friendly (well, friendlier) interface between the raw JSON
responses from JIRA and the Resource/dict abstractions provided by this library. Users
will construct a JIRA ob... | bsd-2-clause | 4,014,760,144,798,227,500 | 38.09324 | 203 | 0.59418 | false |
poojavade/Genomics_Docker | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/gemini-0.10.0-py2.7.egg/gemini/annotations.py | 1 | 30633 | #!/usr/bin/env python
import pysam
import sqlite3
import os
import sys
import collections
import re
from unidecode import unidecode
from bx.bbi.bigwig_file import BigWigFile
from gemini.config import read_gemini_config
# dictionary of anno_type -> open Tabix file handles
annos = {}
def get_anno_files( args ):
con... | apache-2.0 | 5,353,853,671,318,104,000 | 37.726928 | 369 | 0.565338 | false |
tarrow/librarybase-pwb | addpapers.py | 1 | 1993 | import queryCiteFile
import librarybase
import pywikibot
from epmclib.getPMCID import getPMCID
from epmclib.exceptions import IDNotResolvedException
import queue
import threading
import time
def rununthreaded():
citefile = queryCiteFile.CiteFile()
citations = citefile.findRowsWithIDType('pmc')
... | mit | 4,137,417,748,321,423,400 | 27.776119 | 92 | 0.60562 | false |
Autoplectic/dit | dit/pid/iwedge.py | 1 | 1110 | """
The I_wedge measure, as proposed by Griffith et al.
"""
from __future__ import division
from .pid import BasePID
from .. import Distribution
from ..algorithms import insert_meet
from ..multivariate import coinformation
class PID_GK(BasePID):
"""
The Griffith et al partial information decomposition.
... | bsd-3-clause | 7,420,420,584,193,200,000 | 24.227273 | 69 | 0.587387 | false |
pvo/swift | swift/common/middleware/tempauth.py | 1 | 21275 | # Copyright (c) 2011 OpenStack, LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | apache-2.0 | -6,645,367,474,745,003,000 | 43.139004 | 79 | 0.560188 | false |
CanuxCheng/Nagios-Auto | nrobot/host/host.py | 1 | 9599 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
######################################################################
# Copyright C 2015 Faurecia (China) Holding Co.,Ltd. #
# All rights reserved #
# Name: host.py
# Author: Canux canuxcheng@163.com ... | bsd-3-clause | -2,004,714,789,927,656,400 | 42.238739 | 79 | 0.449213 | false |
radomd92/botjagwar | api/decorator.py | 1 | 3279 | import datetime
import multiprocessing
import threading
import time
def critical_section(cs_lock: threading.Lock):
"""
Decorator which uses acquires the specified lock when entering in the decorated function
and releases it once out of the decorated function.
:param cs_lock:
:return:
"""
d... | mit | -8,227,460,502,292,809,000 | 24.818898 | 92 | 0.548033 | false |
noba3/KoTos | addons/plugin.video.ntv/net.py | 1 | 10537 | '''
common XBMC Module
Copyright (C) 2011 t0mm0
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.
Th... | gpl-2.0 | -4,163,256,744,423,435,000 | 30.174556 | 80 | 0.541425 | false |
LegoStormtroopr/canard | SQBLWidgets/sqblUI/logicNodeText.py | 1 | 3374 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui/logicNodeText.ui'
#
# Created: Sat Jul 25 12:16:46 2015
# by: PyQt4 UI code generator 4.9.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
excep... | gpl-3.0 | -7,360,708,022,024,144,000 | 54.311475 | 334 | 0.698281 | false |
rodgzilla/project-euler | problem_058/problem.py | 1 | 1801 | def _try_composite(a, d, n, s):
if pow(a, d, n) == 1:
return False
for i in range(s):
if pow(a, 2**i * d, n) == n-1:
return False
return True # n is definitely composite
def is_prime(n, _precision_for_huge_n=16):
if n in _known_primes or n in (0, 1):
return True
... | gpl-3.0 | -2,561,185,032,495,983,000 | 32.351852 | 84 | 0.514159 | false |
cdegroc/scikit-learn | sklearn/linear_model/ridge.py | 1 | 19134 | """
Ridge regression
"""
# Author: Mathieu Blondel <mathieu@mblondel.org>
# License: Simplified BSD
import numpy as np
from .base import LinearModel
from ..utils.extmath import safe_sparse_dot
from ..utils import safe_asarray
from ..preprocessing import LabelBinarizer
from ..grid_search import GridSearchCV
def _so... | bsd-3-clause | -420,045,437,906,127,550 | 31.157983 | 79 | 0.580799 | false |
davidvicenteranz/drf-api-dump | setup.py | 1 | 1451 | # -*- coding: utf-8 -*-
from setuptools import setup
DESCRIPTION = """
This Django app is intended for **dump data from apps or models via HTTP**. Basically exposes
dumdata command to http.
Features:
- Just accesible by superusers
- Ability to include or exclude any specific app or model
Requirements:
-... | mit | -2,079,235,607,391,890,700 | 27.470588 | 93 | 0.641626 | false |
edeposit/edeposit.amqp | bin/edeposit_amqp_ltpd.py | 1 | 2504 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Interpreter version: python 2.7
#
# Imports =====================================================================
"""
AMQP binding for LTP exporter. See `edeposit.amqp.ltp
<https://github.com/edeposit/edeposit.amqp.ltp>`_ for details.
"""
import os
import sys
import os... | gpl-2.0 | 4,022,404,615,706,803,700 | 26.217391 | 79 | 0.567492 | false |
garibaldi0/SecureCRT | s_nexthop_summary.py | 1 | 13227 | # $language = "python"
# $interface = "1.0"
import os
import sys
import logging
# Add script directory to the PYTHONPATH so we can import our modules (only if run from SecureCRT)
if 'crt' in globals():
script_dir, script_name = os.path.split(crt.ScriptFullName)
if script_dir not in sys.path:
sys.path.... | apache-2.0 | -3,942,150,797,001,814,000 | 40.46395 | 119 | 0.641113 | false |
alejandrobernardis/python-slot-machines | src/backend/backend/api/public/services.py | 1 | 3062 | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
# Copyright (c) 2014 Asumi Kamikaze Inc.
# Licensed under the MIT License.
# Author: Alejandro M. Bernardis
# Email: alejandro (dot) bernardis (at) asumikamikaze (dot) com
# Created: 02/Oct/2014 2:46 PM
from backend.api.base import BaseHandler
from tornado import gen
fr... | mit | -3,224,450,806,062,539,300 | 33.022222 | 73 | 0.59177 | false |
lasr/orbital_elements | convert/meeEl_meefl.py | 1 | 1858 | import numpy as np
__author__ = "Nathan I. Budd"
__email__ = "nibudd@gmail.com"
__copyright__ = "Copyright 2017, LASR Lab"
__license__ = "MIT"
__version__ = "0.1"
__status__ = "Production"
__date__ = "08 Mar 2017"
def meeEl_meefl(meefl):
"""Convert MEEs with true longitude to eccentric longitude.
Args:
... | mit | 7,915,249,333,846,053,000 | 35.431373 | 77 | 0.55436 | false |
beni55/djangolint | project/lint/migrations/0002_auto__add_fix.py | 2 | 2293 | # encoding: 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):
# Adding model 'Fix'
db.create_table('lint_fix', (
('id', self.gf('django.db.models.fields.Aut... | isc | 781,272,958,794,556,400 | 44.86 | 130 | 0.549935 | false |
fbradyirl/home-assistant | homeassistant/components/persistent_notification/__init__.py | 1 | 6944 | """Support for displaying persistent notifications."""
from collections import OrderedDict
import logging
from typing import Awaitable
import voluptuous as vol
from homeassistant.components import websocket_api
from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import TemplateError
f... | apache-2.0 | 7,887,698,443,924,102,000 | 30 | 86 | 0.639401 | false |
mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/galaxy/util/topsort.py | 1 | 7495 | """
Topological sort.
From Tim Peters, see:
http://mail.python.org/pipermail/python-list/1999-July/006660.html
topsort takes a list of pairs, where each pair (x, y) is taken to
mean that x <= y wrt some abstract partial ordering. The return
value is a list, representing a total ordering that respects all
the inpu... | gpl-3.0 | -1,747,945,830,861,587,700 | 32.311111 | 70 | 0.598799 | false |
QISKit/qiskit-sdk-py | qiskit/validation/jsonschema/schema_validation.py | 1 | 7210 | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2018.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | apache-2.0 | 3,412,556,992,353,730,600 | 32.534884 | 85 | 0.629681 | false |
crscardellino/thesis | thesis/scripts/unlabeled_corpora_meta.py | 1 | 1429 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
import argparse
import os
import sys
from functools import partial
from multiprocessing import Pool
from tabulate import tabulate
from thesis.utils import find
def process_file(ifile, meta):
print('Processing %s' %... | mit | -7,308,446,227,549,357,000 | 28.163265 | 84 | 0.604619 | false |
maxspad/MGrader | autograder/modules/questions/PythonQuestion.py | 1 | 2436 | '''
Contains the PythonQuestion class, which is an instructor-facing
question type that implements a grade() function.
All instructor-facing Question modules must implement
a grade() function at module level that returns a Result object.
@author: Max Spadafore
'''
from AbstractQuestion import AbstractQ
table_name =... | bsd-3-clause | 555,966,247,296,795,100 | 31.932432 | 149 | 0.688013 | false |
siggame/webserver | webserver/hermes/templatetags/hermes_tags.py | 1 | 3396 | from django import template
from django.template.defaultfilters import stringfilter
from competition.models.game_model import Game
import slumber
import datetime
import logging
import requests
logger = logging.getLogger(__name__)
register = template.Library()
@register.filter
@stringfilter
def iso_to_datetime(val... | bsd-3-clause | -4,488,372,421,264,011,300 | 29.594595 | 78 | 0.5904 | false |
ianmcmahon/linuxcnc-mirror | lib/python/gladevcp/hal_gremlin.py | 1 | 9842 | #!/usr/bin/env python
# vim: sts=4 sw=4 et
# GladeVcp Widgets
#
# Copyright (c) 2010 Pavel Shramov <shramov@mexmat.net>
#
# 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... | lgpl-2.1 | 7,631,646,314,919,300,000 | 43.533937 | 121 | 0.536883 | false |
chappers/Stan | stan/proc/proc_parse.py | 1 | 1781 | """
The :mod:`stan.proc.proc_parse` module is the proc parser for SAS-like language.
"""
import re
import pkgutil
from stan.proc.proc_expr import RESERVED_KEYWORDS, PROC_
import stan.proc_functions as proc_func
from stan.proc.proc_sql import proc_sql
def proc_parse(cstr):
"""proc parse converts procedure stateme... | mit | -3,020,345,216,742,110,000 | 29.706897 | 123 | 0.540707 | false |
DistributedML/TorML | ML/data/amazon/parse_amazon.py | 1 | 1657 | import numpy as np
import pandas as pd
import arff
import pdb
def main():
data = np.load('amazon.npy')
# Shuffle the data
sfflidx = np.random.permutation(data.shape[0])
data = data[sfflidx]
testidx = int(data.shape[0] * 0.7)
testdata = data[testidx:, ]
traindata = data[0:testidx, ]
... | mit | 6,870,042,225,450,228,000 | 22.338028 | 73 | 0.581774 | false |
SteffenGuertler/vertx-mod-asyncmongodb | src/test/resources/integration_tests/python/basic_integration_test.py | 1 | 1751 | # Simple integration test which shows tests deploying other verticles, using the Vert.x API etc
from org.vertx.testtools import VertxAssert
import vertx_tests
from core.event_bus import EventBus
import vertx
# The test methods must begin with "test"
def test_http():
# Create an HTTP server which just sends back O... | mit | -6,766,657,994,172,449,000 | 40.690476 | 120 | 0.727013 | false |
tdyas/pants | tests/python/pants_test/backend/jvm/tasks/jvm_compile/rsc/test_rsc_compile_integration.py | 1 | 2189 | # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import pytest
from pants_test.backend.jvm.tasks.jvm_compile.rsc.rsc_compile_integration_base import (
RscCompileIntegrationBase,
ensure_compile_rsc_execution_strategy,
)
class R... | apache-2.0 | -6,702,051,356,664,883,000 | 43.673469 | 116 | 0.727273 | false |
Magda-M/general-tools | fq.split.py | 1 | 2084 | """
SOURCE: https://gist.github.com/brentp/6625544
split a single fastq file in to random, non-overlapping subsets
arguments:
+ fastq file
+ number of splits
+ number of reps
e.g.:
python fq.split.py input.fastq 3 4
will create 12 new files in 4 sets of 3. Each
set of 3 will contain all of the original records.
... | gpl-3.0 | 607,869,430,377,086,200 | 27.561644 | 77 | 0.597409 | false |
goniz/buildscript | build_system/source.py | 1 | 2177 | #!/usr/bin/python2
from build_exceptions import BuildError
import os
import re
class File(object):
def __init__(self, path):
self.path = path
def is_newer(self, other):
if os.path.exists(other) is False:
return True
if os.path.exists(self.path) is False:
raise... | mit | -8,906,877,451,912,974,000 | 24.623529 | 82 | 0.569132 | false |
dkkline/CanSat14-15 | presenter/__init__.py | 1 | 1230 | """
Contains a Flask-based webserver in charge of presenting a website and
collected data to users connected via a webbrowser.
"""
__version__ = (0, 0, 1)
from .app import app
from .config import DevelopmentConfig, ProductionConfig
from flask_debugtoolbar import DebugToolbarExtension
def run_dev():
"""
Ru... | mit | -3,177,141,107,318,055,400 | 22.653846 | 70 | 0.701626 | false |
alexef/gobject-introspection | giscanner/girwriter.py | 1 | 23830 | # -*- Mode: Python -*-
# GObject-Introspection - a framework for introspecting GObject libraries
# Copyright (C) 2008 Johan Dahlin
# Copyright (C) 2008, 2009 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as publish... | gpl-2.0 | 7,605,723,460,842,861,000 | 41.477718 | 99 | 0.565883 | false |
PlainStupid/PlainCleanUp | CleanUp/FinalSol.py | 1 | 9335 | import re
import os
import shutil
import sys
# Regexes are in from most used to least used regex for
# a given file pattern.
regexShow = [
'''
# Matches with Show.S01E10.mp4
^ #Beginning of a string
(?P<ShowName>.+?) #Show name
[\.\_\-\s]+ #If it has dot, underscore or dash
... | mit | 6,587,270,393,259,099,000 | 30.12 | 105 | 0.582217 | false |
jjdmol/LOFAR | CEP/GSM/bremen/validate_install.py | 1 | 1521 | #!/usr/bin/python
"""
Script to check if the required modules are installed.
"""
class BColors:
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
def _test_import(libname):
"""
Try importing the library.
"""
t... | gpl-3.0 | -5,944,344,756,564,354,000 | 19.28 | 88 | 0.593031 | false |
GillesArcas/numsed | numsed/common.py | 1 | 2941 | from __future__ import print_function
import sys
import os
import subprocess
import time
try:
from StringIO import StringIO # Python2
except ImportError:
from io import StringIO # Python3
PY2 = sys.version_info < (3,)
PY3 = sys.version_info > (3,)
TMP_SED = 'tmp.sed'
TMP_INPUT = 'tmp.input'
TMP_PY = 'tmp.... | mit | 6,023,549,609,253,550,000 | 23.923729 | 76 | 0.524651 | false |
dstufft/warehouse | tests/unit/test_policy.py | 1 | 2168 | # 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, software
# distributed under the Li... | apache-2.0 | -2,289,942,341,886,902,800 | 31.358209 | 88 | 0.683118 | false |
knightmare2600/d4rkc0de | encryption/md5word.py | 1 | 1132 | #!/usr/bin/python
#Uses all wordlists in a dir to crack a hash.
#
#www.darkc0de.com
#d3hydr8[at]gmail[dot]com
import md5, sys, os, time
def getwords(wordlist):
try:
file = open(wordlist, "r")
words = file.readlines()
file.close()
except(IOError),msg:
words = ""
print "Error:",msg
pass
return wo... | gpl-2.0 | 3,432,820,828,723,467,000 | 19.581818 | 62 | 0.605124 | false |
google/capirca | tests/lib/windows_test.py | 1 | 4977 | # Copyright 2008 Google Inc. 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 law or a... | apache-2.0 | -2,680,503,843,350,668,000 | 25.902703 | 79 | 0.666064 | false |
gioman/QGIS | python/plugins/processing/algs/qgis/SinglePartsToMultiparts.py | 1 | 4039 | # -*- coding: utf-8 -*-
"""
***************************************************************************
SinglePartsToMultiparts.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
***************... | gpl-2.0 | 3,639,953,806,379,038,000 | 35.0625 | 107 | 0.564001 | false |
arrabito/DIRAC | DataManagementSystem/Agent/RequestOperations/ReplicateAndRegister.py | 1 | 28823 | ########################################################################
# File: ReplicateAndRegister.py
# Author: Krzysztof.Ciba@NOSPAMgmail.com
# Date: 2013/03/13 18:49:12
########################################################################
""" :mod: ReplicateAndRegister
==========================
.. mo... | gpl-3.0 | 803,170,856,147,399,300 | 37.025066 | 120 | 0.628526 | false |
fener06/pyload | module/plugins/hoster/EuroshareEu.py | 1 | 2302 | # -*- coding: utf-8 -*-
"""
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 is distributed in ... | gpl-3.0 | 7,234,009,282,891,823,000 | 40.071429 | 117 | 0.629839 | false |
SKIRT/PTS | do/core/show_simulation_log.py | 1 | 2931 | #!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
##... | agpl-3.0 | 2,216,039,816,062,871,300 | 35.17284 | 123 | 0.601024 | false |
labsquare/CuteVariant | cutevariant/core/writer/pedwriter.py | 1 | 2889 | import csv
from .abstractwriter import AbstractWriter
from cutevariant.core.sql import get_samples
class PedWriter(AbstractWriter):
"""Writer allowing to export samples of a project into a PED/PLINK file.
Attributes:
device: a file object typically returned by open("w")
Example:
>>> wi... | gpl-3.0 | -2,977,546,047,046,953,000 | 32.988235 | 88 | 0.563171 | false |
Callek/build-relengapi | relengapi/blueprints/tokenauth/util.py | 1 | 2357 | # 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 json
from itsdangerous import BadData
from relengapi.blueprints.tokenauth.tables import Token
from relengapi.lib... | mpl-2.0 | -2,998,231,699,835,763,000 | 23.05102 | 76 | 0.570216 | false |
russb78/RDuD2 | RDuD2/modules/helperfuncs.py | 1 | 1066 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# controlfuncs.py
#
# Copyright 2013 Russell Barnes
#
from nanpy import Arduino
def map(x, in_min, in_max, out_min, out_max):
"""
Arduino-style map function to take input min/max and apply to
output min/max.
"""
return (x - in_min) * (out_max ... | mit | 8,028,310,621,455,294,000 | 27.052632 | 76 | 0.567542 | false |
kubow/HAC | System/test.py | 1 | 3854 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
import unittest
from log import Log
from DV72 import ControlDevice
from OS74 import CurrentPlatform, FileSystemObject
from MP74 import OpenWeatherMap
from TX74 import WebContent
def load_platform_based(from_path, web=None):
base = FileSystemObject().dir_up(2)
print(... | unlicense | -2,545,163,283,945,300,000 | 37.929293 | 103 | 0.608978 | false |
tcalmant/ipopo | pelix/shell/eventadmin.py | 1 | 2445 | #!/usr/bin/env python
# -- Content-Encoding: UTF-8 --
"""
EventAdmin shell commands
Provides commands to the Pelix shell to work with the EventAdmin service
:author: Thomas Calmant
:copyright: Copyright 2020, Thomas Calmant
:license: Apache License 2.0
:version: 1.0.1
..
Copyright 2020 Thomas Calmant
Licen... | apache-2.0 | -5,305,253,819,971,711,000 | 25.290323 | 80 | 0.61227 | false |
openstack/networking-bgpvpn | networking_bgpvpn/tests/unit/services/bagpipe/test_bagpipe.py | 1 | 48898 | # Copyright (c) 2015 Orange.
# 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 a... | apache-2.0 | -7,102,266,521,299,206,000 | 42.697945 | 79 | 0.497157 | false |
Ixxy-Open-Source/django-linkcheck-old | linkcheck/migrations/0001_initial.py | 1 | 1560 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Link',
fields=[
... | bsd-3-clause | -7,173,154,571,665,117,000 | 37.04878 | 114 | 0.549359 | false |
FrederikDiehl/NNForSKLearn | NeuralNetwork.py | 1 | 14455 | __author__ = 'Frederik Diehl'
import numpy as np
from sklearn.base import BaseEstimator, RegressorMixin
from sklearn.utils import check_random_state
from sklearn.preprocessing import MinMaxScaler
class NeuralNetwork(BaseEstimator, RegressorMixin, object):
_maxSteps = None
_maxNonChangingSteps = None
_l... | mit | 6,231,215,392,406,471,000 | 44.602524 | 214 | 0.590384 | false |
NulledGravity/striptxt | striptxt.py | 1 | 5271 | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import os, time, sys
from sys import argv, stdout
# Global variables
INPUT = None
OUTPUT = None
LENGTH = None
VERBOSE = False
AUTOOUT = False
AUTOLEN = False
# Console colors
W = '\033[0m' # white (normal)
R = '\033[31m' # red
G = '\033[92m' # green
B = '\033[34m' ... | mit | 3,570,116,909,102,634,000 | 32.157233 | 117 | 0.47012 | false |
erickmendonca/gdg-django-lab | gdg_pizza/wsgi.py | 1 | 1503 | """
WSGI config for gdg_pizza project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION`... | mit | 7,895,412,395,360,587,000 | 40.75 | 79 | 0.790419 | false |
fredyw/git-migrator | gitmigrator.py | 1 | 3703 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2014 Fredy Wijaya
#
# 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 t... | mit | -2,902,482,159,053,309,400 | 37.175258 | 88 | 0.662436 | false |
zlpmichelle/crackingtensorflow | template/xgboost/xgboost_stock_pre.py | 1 | 1349 | import sys
import xgboost as xgb
import pandas as pd
import numpy as np
print("----reading data\n")
train = pd.read_csv("train.csv")
train_feature = train.columns[0:-1]
train_label = train.columns[-1]
print("----training a XGBoost\n")
dtrain = xgb.DMatrix(train[train_feature].values, label=train[train_label].values)
... | apache-2.0 | 927,858,347,399,894,100 | 23.089286 | 82 | 0.581913 | false |
whiterabbitengine/fifeplusplus | tests/extension_tests/modelview_tests.py | 1 | 2883 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# ####################################################################
# Copyright (C) 2005-2013 by the FIFE team
# http://www.fifengine.net
# This file is part of FIFE.
#
# FIFE is free software; you can redistribute it and/or
# modify it under the terms of ... | lgpl-2.1 | -7,791,245,036,448,926,000 | 33.592593 | 97 | 0.673257 | false |
sergei-maertens/bfeu.net | src/bfeu/conf/settings.py | 1 | 8042 | import os
import django.conf.global_settings as DEFAULT_SETTINGS
# Automatically figure out the ROOT_DIR and PROJECT_DIR.
DJANGO_PROJECT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir))
ROOT_DIR = os.path.abspath(os.path.join(DJANGO_PROJECT_DIR, os.path.pardir, os.path.pardir))
#
# Stan... | mit | -1,098,656,257,339,263,600 | 30.912698 | 127 | 0.642502 | false |
leecannon/trending | trending/tests/test_count.py | 1 | 3138 | # Copyright (c) 2016 Lee Cannon
# Licensed under the MIT License, see included LICENSE File
from unittest import TestCase
from trending import count
from trending import interaction
def _create_test_interactions():
i = interaction.Interaction('12/10/2016 03:15:55', 'ENTERPRISE ENTERPRISE USER DIRECTORY', 'DIIR-G... | mit | -4,855,461,745,092,158,000 | 44.478261 | 116 | 0.59369 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.