repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
skyoo/jumpserver | apps/perms/serializers/asset/user_permission.py | 1 | 2769 | # -*- coding: utf-8 -*-
#
from rest_framework import serializers
from django.utils.translation import ugettext_lazy as _
from assets.models import Node, SystemUser, Asset
from assets.serializers import ProtocolsField
from perms.serializers.asset.permission import ActionsField
__all__ = [
'NodeGrantedSerializer',... | gpl-2.0 | -5,017,376,578,356,509,000 | 27.052083 | 84 | 0.632009 | false | 3.787623 | false | false | false |
denny820909/builder | lib/python2.7/site-packages/buildbot-0.8.8-py2.7.egg/buildbot/db/builds.py | 4 | 2932 | # This file is part of Buildbot. Buildbot 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | mit | -2,494,213,062,618,674,700 | 35.65 | 79 | 0.610846 | false | 4 | false | false | false |
peterhogan/python | timer.py | 1 | 1713 | from datetime import datetime
from datetime import timedelta
from time import sleep
from time import strptime
from time import strftime
class Timer(object):
now = datetime.now()
def __init__(self, timevalue):
self.timevalue = timevalue
def inputtime(self):
return datetime.strptime(self.t... | mit | 6,972,669,525,992,226,000 | 25.765625 | 89 | 0.583771 | false | 3.495918 | false | false | false |
camconn/probot | plugins/wikipedia.py | 1 | 7061 | #!/usr/bin/env python3
# probot - An asynchronous IRC bot written in Python 3
# Copyright (c) 2016 Cameron Conn
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
... | agpl-3.0 | -5,288,311,132,269,801,000 | 34.129353 | 164 | 0.610112 | false | 3.656655 | false | false | false |
ralphiee22/kolibri | kolibri/content/content_db_router.py | 2 | 6821 | """
As we store content databases in separate SQLite files per channel, we need dynamic database connection routing.
This file contains a decorator/context manager, `using_content_database`, that allows a specific content
database to be specified for a block of code, as follows:
with using_content_database("naland... | mit | -6,517,660,795,330,440,000 | 36.070652 | 113 | 0.674681 | false | 4.344586 | false | false | false |
d-schmidt/hearthscan-bot | hearthscan-bot.py | 1 | 7345 | #!/usr/bin/env python3
import logging as log
import re
import time
from cardDB import CardDB
from constants import Constants
from helper import HSHelper
from praww import RedditBot
import commentDB
import credentials
import formatter
# answer pms of the same user only every x seconds
PM_RATE_LIMIT = 60
def answer... | mit | 6,084,005,707,293,402,000 | 29.106557 | 96 | 0.618652 | false | 3.884188 | false | false | false |
andybalaam/poemtube | server/src/poemtube/api/v1/authentication.py | 1 | 1285 | import base64
import re
import web
from web import webopenid
known_users = {
"user1": "pass1",
"user2": "pass2",
"user3": "pass3",
}
def unathorized():
return web.HTTPError(
"401 Unauthorized",
{
'WWW-Authenticate': 'Basic realm="PoemTube"',
'content-type': 'te... | gpl-2.0 | -796,029,123,556,662,700 | 21.155172 | 80 | 0.61323 | false | 3.735465 | false | false | false |
TheCacophonyProject/Raspberry_Pi_Recorder | CacophonyModules/util.py | 1 | 2242 | import os
import events
import random
import string
import json
import time
import requests
def make_dirs(dirs):
"""Makes the dirs in the list given"""
try:
for d in dirs:
if not os.path.exists(d):
os.makedirs(d)
except OSError as e:
print(e)
return False... | gpl-3.0 | -7,444,512,290,336,446,000 | 28.893333 | 94 | 0.589652 | false | 3.454545 | false | false | false |
pidydx/grr | grr/gui/api_plugins/report_plugins/server_report_plugins.py | 1 | 14271 | #!/usr/bin/env python
"""UI server report handling classes."""
import operator
from grr.gui.api_plugins.report_plugins import rdf_report_plugins
from grr.gui.api_plugins.report_plugins import report_plugin_base
from grr.gui.api_plugins.report_plugins import report_utils
from grr.lib import config_lib
from grr.lib im... | apache-2.0 | 3,755,911,516,339,074,000 | 33.223022 | 80 | 0.634223 | false | 3.870627 | false | false | false |
etingof/snmpsim | snmpsim/record/dump.py | 1 | 2041 | #
# This file is part of snmpsim software.
#
# Copyright (c) 2010-2019, Ilya Etingof <etingof@gmail.com>
# License: http://snmplabs.com/snmpsim/license.html
#
from pyasn1.error import PyAsn1Error
from pyasn1.type import univ
from snmpsim.error import SnmpsimError
from snmpsim.grammar import dump
from snmpsim.record im... | bsd-2-clause | 1,179,372,855,638,163,200 | 28.57971 | 84 | 0.585007 | false | 3.872865 | false | false | false |
yugangw-msft/azure-cli | src/azure-cli-core/azure/cli/core/_session.py | 3 | 3898 | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | mit | -5,590,041,453,470,257,000 | 31.214876 | 115 | 0.593381 | false | 4.331111 | false | false | false |
runeh/carrot | carrot/connection.py | 1 | 5146 | from amqplib import client_0_8 as amqp
class AMQPConnection(object):
"""A network/socket connection to an AMQP message broker.
:param hostname: see :attr:`hostname`.
:param userid: see :attr:`userid`.
:param password: see :attr:`password`.
:keyword virtual_host: see :attr:`virtual_host`.... | bsd-3-clause | 3,954,186,530,620,627,500 | 32.415584 | 77 | 0.5993 | false | 4.440035 | false | false | false |
VikParuchuri/movide | api/serializers.py | 1 | 19255 | from __future__ import unicode_literals
from django.forms import widgets
from rest_framework import serializers
from models import (Tag, Message, UserProfile, EmailSubscription, Classgroup,
Rating, ClassSettings, Resource, StudentClassSettings,
MESSAGE_TYPE_CHOICES, make_random_k... | agpl-3.0 | -4,851,591,364,296,762,000 | 41.694013 | 432 | 0.661906 | false | 4.521014 | false | false | false |
Tinkerforge/brickv | src/brickv/plugin_system/plugins/motorized_linear_poti/motorized_linear_poti.py | 1 | 5261 | # -*- coding: utf-8 -*-
"""
Motorized LinearPoti Plugin
Copyright (C) 2015-2017 Olaf Lüke <olaf@tinkerforge.com>
Copyright (C) 2016 Matthias Bolte <matthias@tinkerforge.com>
motorized_linear_poti.py: Motorized Linear Poti Plugin implementation
This program is free software; you can redistribute it and/or
modify it un... | gpl-2.0 | -8,878,518,259,202,620,000 | 38.548872 | 137 | 0.687833 | false | 3.833819 | false | false | false |
openpathsampling/openpathsampling | openpathsampling/shooting.py | 2 | 7855 | import math
import logging
import numpy as np
from openpathsampling.netcdfplus import StorableNamedObject
from openpathsampling import default_rng
logger = logging.getLogger(__name__)
init_log = logging.getLogger('openpathsampling.initialization')
class ShootingPointSelector(StorableNamedObject):
def __init__(... | mit | -6,294,389,502,952,380,000 | 29.445736 | 76 | 0.629663 | false | 4.390721 | false | false | false |
iskandr/cohort-seq2hla | cohort-seq2hla.py | 1 | 5885 |
# Copyright (c) 2015. Mount Sinai School of Medicine
#
# 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 ... | apache-2.0 | -1,169,457,863,651,158,800 | 33.421053 | 80 | 0.603398 | false | 3.746022 | false | false | false |
demisto/content | Packs/Gamma/Integrations/Gamma/Gamma_test.py | 1 | 13515 | import json
import pytest
import demistomock as demisto
from Gamma import Client, fetch_incidents, Command, main
MOCK_URL = "mock://fake-api.net"
MOCK_VIOLATION = {
"response": [{
"app_name": "jira",
"dashboard_url": f'{MOCK_URL}/violationId/2036',
"file_labels_map": {},
"text_labe... | mit | -614,382,760,543,915,300 | 35.04 | 100 | 0.57943 | false | 3.459176 | true | false | false |
mvollmer/cockpit | bots/machine/machine_core/constants.py | 2 | 1177 | # -*- coding: utf-8 -*-
# This file is part of Cockpit.
#
# Copyright (C) 2013 Red Hat, Inc.
#
# Cockpit is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your... | lgpl-2.1 | 5,782,083,369,937,720,000 | 36.967742 | 74 | 0.737468 | false | 3.324859 | false | false | false |
schocco/mds-web | apps/trails/gis_math.py | 1 | 5200 | from bisect import bisect
from django.contrib.gis.geos.point import Point
import math
def haversine(origin, destination):
'''
:param origin: start position
:param destination: end position
:return: length in meters
.. See::
http://www.movable-type.co.uk/scripts/gis-faq-5.1.html
'''... | mit | 8,821,322,964,885,942,000 | 36.15 | 107 | 0.572885 | false | 3.698435 | false | false | false |
mice-software/maus | bin/simulate_mice.py | 1 | 2540 | #!/usr/bin/env python
"""
Simulate the MICE experiment
This will simulate MICE spills through the entirety of MICE using Geant4, then
digitize and reconstruct TOF and tracker hits to space points.
"""
import io # generic python library for I/O
import MAUS # MAUS libraries
def run():
""" Run the macro
""... | gpl-3.0 | 6,921,036,674,128,893,000 | 33.794521 | 80 | 0.709843 | false | 3.190955 | false | false | false |
StevenReitsma/gensim-sklearn-wrapper | gensim_wrapper.py | 1 | 3933 | import numpy as np
from gensim import corpora, models, matutils
from sklearn.base import BaseEstimator
class LdaTransformer(BaseEstimator):
"""
See http://radimrehurek.com/gensim/models/ldamodel.html for parameter usage.
X should be a list of tokens for each document, e.g. [['This', 'is', 'document', '1'], ['Secon... | mit | -8,260,677,746,161,423,000 | 42.230769 | 372 | 0.715993 | false | 3.044118 | false | false | false |
reinforceio/tensorforce | examples/act_experience_update_interface.py | 1 | 2827 | # Copyright 2020 Tensorforce Team. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | apache-2.0 | -2,013,646,596,207,297,800 | 35.24359 | 96 | 0.638132 | false | 4.530449 | false | false | false |
collab-project/django-encode | encode/encoders.py | 1 | 4284 | # Copyright Collab 2013-2016
# See LICENSE for details.
"""
Encoders.
"""
from __future__ import unicode_literals
import os
import shlex
import logging
import subprocess
try:
from django.utils.module_loading import import_string
except ImportError:
from django.utils.module_loading import import_by_path as i... | mit | -5,457,834,688,075,999,000 | 26.63871 | 79 | 0.611578 | false | 4.111324 | false | false | false |
Xicnet/radioflow-scheduler | project/icecast_stats/realtime_stats.py | 1 | 5653 | __version__ = "0.1"
__author__ = "radiocicletta <radiocicletta@gmail.com>"
# borrowed from: https://github.com/radiocicletta/morganfreeman
import threading
from SocketServer import ThreadingTCPServer
import logging
import urllib2
from urllib import unquote
import re
import mimetypes
import os
import sys
import json
... | agpl-3.0 | 3,395,360,613,107,391,000 | 38.809859 | 178 | 0.482576 | false | 4.266415 | false | false | false |
stackforge/tacker | tacker/extensions/nfvo.py | 2 | 26383 | # Copyright 2016 Brocade Communications Systems 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
#
# ... | apache-2.0 | -2,946,161,441,141,614,000 | 28.120309 | 79 | 0.522003 | false | 3.883279 | false | false | false |
cfe316/atomic | examples/profiles.py | 1 | 3300 | """
typical carbon content is n_c / n_e = 0.05
"""
import numpy as np
import matplotlib.pyplot as plt
import atomic
from ensemble_average import annotate_lines
def parabolic_profile(y0):
x = np.linspace(1., 0, 50)
y = 1 - x**2
y *= y0
return x, y
r, temperature = parabolic_profile(3e3)
r, density = p... | mit | -2,027,741,804,067,600,400 | 23.087591 | 69 | 0.680606 | false | 2.614897 | false | false | false |
krfkeith/enough | livec/codegui/EnumWidget.py | 3 | 1748 | # Copyright (c) 2007 Enough Project.
# See LICENSE for details.
from gui.Box import VBox, HBox
from gui.TextEdit import TextEdit, make_label
from codegui.loop import loop
from codegui.widget_for import NormalWidgetMaker, indented
import style
from lib.observable.List import List
from functools import partial
class ... | gpl-3.0 | -7,926,893,740,873,075,000 | 32.615385 | 75 | 0.566934 | false | 3.70339 | false | false | false |
rajeevs1992/pyhealthvault | src/healthvaultlib/methods/getupdatedrecordsforapplication.py | 1 | 1686 | from lxml import etree
from healthvaultlib.methods.method import Method
from healthvaultlib.objects.updatedrecord import UpdatedRecord
from healthvaultlib.methods.methodbase import RequestBase, ResponseBase
class GetUpdatedRecordsForApplicationRequest(RequestBase):
'''
Gets a list of records for an appli... | mit | 4,035,345,967,672,432,000 | 32.058824 | 71 | 0.67675 | false | 4.556757 | false | false | false |
lwindg/sanji-bundle-cellular | index.py | 3 | 16773 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
import logging
import os
from threading import Thread
from traceback import format_exc
from sanji.connection.mqtt import Mqtt
from sanji.core import Sanji
from sanji.core import Route
from sanji.model_initiator import ModelInitiator
from voluptuous import All, Any, Lengt... | gpl-2.0 | -4,546,295,228,002,981,000 | 35.863736 | 117 | 0.524593 | false | 3.895262 | true | false | false |
wxiang7/airflow | airflow/contrib/hooks/gcloud/gcs_hook.py | 3 | 5781 | # -*- coding: 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, software
... | apache-2.0 | -9,131,217,837,836,201,000 | 30.418478 | 78 | 0.577755 | false | 4.22279 | false | false | false |
MissionCriticalCloud/marvin | marvin/cloudstackAPI/updateCloudToUseObjectStore.py | 1 | 1997 | """Migrate current NFS secondary storages to use object store."""
from baseCmd import *
from baseResponse import *
class updateCloudToUseObjectStoreCmd (baseCmd):
typeInfo = {}
def __init__(self):
self.isAsync = "false"
"""the image store provider name"""
"""Required"""
self.p... | apache-2.0 | -6,770,195,988,446,285,000 | 33.431034 | 159 | 0.577867 | false | 3.954455 | false | false | false |
ThomasChiroux/dipplanner | dipplanner/dive.py | 1 | 43456 | #
# Copyright 2011-2016 Thomas Chiroux
#
# 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... | gpl-3.0 | -5,919,731,483,727,860,000 | 41.272374 | 79 | 0.51933 | false | 4.407749 | false | false | false |
kwlzn/pex | tests/test_pex_builder.py | 1 | 5519 | # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import os
import stat
import pytest
from twitter.common.contextutil import temporary_dir
from twitter.common.dirutil import safe_mkdir
from pex.common import open_zip
from pex.compatibil... | apache-2.0 | -7,104,494,122,520,016,000 | 29.491713 | 90 | 0.64595 | false | 3.091877 | true | false | false |
avanwyk/cipy | examples/pso_optimizer.py | 1 | 1205 | # Copyright 2016 Andrich van Wyk
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | 5,783,334,716,175,215,000 | 34.441176 | 75 | 0.728631 | false | 4.198606 | false | false | false |
DarthMaulware/EquationGroupLeaks | Leak #4 - Don't Forget Your Base/EQGRP-Auction-File/Linux/bin/pyside/echocmd.py | 1 | 23387 | import base
import icmpecho
import tcpstream
import crypto
import time
import struct
import string
import re
import sha
import hex
class ECHOCMD(base.Command):
def __init__(self):
base.Command.__init__(self)
self.op = 0
self.res = 0
self.auth_1 = 0xFFFFFF00L
self.data = ""
... | unlicense | -3,864,204,355,794,672,000 | 35.035439 | 166 | 0.44157 | false | 3.902386 | false | false | false |
qilicun/python | python2/PyMOTW-1.132/PyMOTW/logging/logging_level_example.py | 1 | 1796 | #!/usr/bin/env python
#
# Copyright 2007 Doug Hellmann.
#
#
# All Rights Reserved
#
# Permission to use, copy, modify, and distribute this software and
# its documentation for any purpose and without fee is hereby
# granted, provided that the above copyright notice appear in all
# copies and tha... | gpl-3.0 | 8,593,154,985,870,459,000 | 32.259259 | 70 | 0.727728 | false | 3.862366 | false | false | false |
crazyskady/ai-game-python | Chapter04/TSP.py | 1 | 7689 | # -*- coding: utf-8 -*-
import random
import math
import copy
import pygame
from pygame.locals import *
from sys import exit
EPSILON = 0.000001
NUM_BEST_TO_ADD = 2
class CoOrd(object):
def __init__(self, a, b):
self._x = a
self._y = b
def X(self):
return self._x
def Y(self):
return self._y
class mapTSP... | mit | -2,548,125,952,688,736,000 | 23.641935 | 104 | 0.685954 | false | 2.737012 | true | false | false |
irl/ten-second-balls | universe.py | 1 | 3157 | #
# Ten Second Balls
# Copyright (C) 2013 Iain Learmonth
#
# 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 prog... | gpl-2.0 | 5,359,474,104,752,281,000 | 30.57 | 81 | 0.616408 | false | 3.579365 | false | false | false |
CasparLi/calibre | src/calibre/gui2/preferences/search.py | 14 | 10956 | #!/usr/bin/env python2
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
__license__ = 'GPL v3'
__copyright__ = '2010, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
from PyQt5.Qt import QApplication
from calibre.gui2.preferences import ConfigWidgetBase, test_widget, \
CommaSepa... | gpl-3.0 | -4,870,056,115,032,629,000 | 43.901639 | 98 | 0.622855 | false | 3.755914 | true | false | false |
andreadotti/StatTest | ROOTIO.py | 1 | 6085 | """
ROOT interfaces and utilities
"""
from Utils import WrongDataType,Error,logger
_logger=logger().getLogger('Interface')
def stripPathName( aPath ):
"""
Remove file name identifier and trailing / from ROOT
TDirectory path
"""
return aPath.GetPath()[aPath.GetPath().find(":")+1:].rstrip('/')
def r... | gpl-2.0 | -231,493,088,138,147,040 | 35.656627 | 127 | 0.618406 | false | 3.760816 | true | false | false |
DavideCanton/Python3 | num/gauss-seidel.py | 1 | 2710 | __author__ = 'davide'
import numpy as np
from collections import deque
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
import numpy.random as nprand
class Solver:
def __init__(self, start_x=None):
self.done = False
self.x = start_x
self.it = None
... | gpl-3.0 | 515,264,414,718,476,800 | 20.983051 | 75 | 0.460148 | false | 3.125721 | false | false | false |
iashwinprasada/VTU-Profiler | views.py | 1 | 1765 | from ResultBackEnd import resultlogic, USNValidate
from flask import Flask, request, flash, url_for, redirect, render_template, abort
import json
app=Flask(__name__)
app.config.from_pyfile('AppConfig.cfg')
app.config['PROPAGATE_EXCEPTIONS'] = True
@app.route('/result',methods=['GET', 'POST'])
def result():
return... | gpl-2.0 | 3,172,918,091,581,324,300 | 36.553191 | 234 | 0.567705 | false | 3.238532 | false | false | false |
riolet/SAM | sam/importers/import_aws.py | 2 | 1595 | import sys
from sam.importers.import_base import BaseImporter
import datetime
class AWSImporter(BaseImporter):
def translate(self, line, line_num, dictionary):
"""
Converts a given syslog line into a dictionary of (ip, port, ip, port)
Args:
line: The syslog line to parse
... | gpl-3.0 | 7,908,484,718,748,201,000 | 34.444444 | 97 | 0.576176 | false | 4.153646 | false | false | false |
Sorsly/subtle | google-cloud-sdk/lib/surface/dataflow/jobs/run.py | 6 | 2918 | # Copyright 2015 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 ag... | mit | 1,607,969,847,129,877,000 | 30.717391 | 74 | 0.668266 | false | 4.041551 | false | false | false |
mrcslws/nupic.research | nupic/research/frameworks/continual_learning/dendrite_layers.py | 3 | 6169 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2020, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... | agpl-3.0 | -6,019,589,543,891,049,000 | 32.895604 | 88 | 0.641109 | false | 3.714028 | false | false | false |
kapilsaxena33/pyentropy | setup.py | 3 | 2730 | import sys, os
import pyentropy
# BEFORE importing disutils, remove MANIFEST. distutils doesn't properly
# update it when the contents of directories change.
if os.path.exists('MANIFEST'): os.remove('MANIFEST')
from distutils.core import setup
from distutils.extension import Extension
from distutils.command.build_ext... | gpl-2.0 | -4,004,113,109,979,347,500 | 30.022727 | 80 | 0.651282 | false | 3.699187 | false | false | false |
abhinavgupta/YALDA | lda.py | 1 | 12462 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Latent Dirichlet Allocation + collapsed Gibbs sampling
# This code is available under the MIT License.
# (c)2010-2011 Nakatani Shuyo / Cybozu Labs Inc.
# UPDATES:
# -Parallelisation of the Gibbs Sampler
# -Online Processing of Documents
# Related Paper:
# -On-line Trend ... | apache-2.0 | -2,468,384,668,615,679,500 | 35.545455 | 102 | 0.55264 | false | 2.940538 | false | false | false |
NathanW2/qmap | src/qmap/datatimerpickerwidget.py | 1 | 4232 | from PyQt4.QtGui import QDialog,QApplication, QButtonGroup
from PyQt4.QtCore import QTime, Qt, QDateTime
from ui_datatimerpicker import Ui_datatimerpicker
from qgis.core import *
from utils import log
class DateTimePickerDialog(QDialog):
"""
A custom date picker with a time and date picker
"""
def __i... | gpl-2.0 | 8,286,299,197,854,796,000 | 30.589552 | 90 | 0.587902 | false | 3.850773 | false | false | false |
alej0varas/gibbles | gibbles/__main__.py | 1 | 7759 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# nibbles like game. much more fun, moves on all directions and jump, can be played with mouse.
from math import cos, radians, sin
from random import choice
import os
import sys
import pygame
from pygame.locals import *
from pygame.colordict import THECOLORS
import dat... | gpl-3.0 | 6,522,315,543,549,074,000 | 30.669388 | 148 | 0.553551 | false | 3.694762 | false | false | false |
potatosushi/Discord-Notification-Bot | discord/colour.py | 2 | 6599 | # -*- coding: utf-8 -*-
"""
The MIT License (MIT)
Copyright (c) 2015-2016 Rapptz
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 r... | mit | -4,478,125,788,136,537,600 | 31.328283 | 91 | 0.571147 | false | 3.942055 | false | false | false |
lkhomenk/integration_tests | cfme/roles.py | 2 | 22851 | from cfme.utils.log import logger
def _remove_page(roles, group, pages):
if group in roles:
for page in pages:
if page in roles[group]:
roles[group].remove(page)
else:
logger.info("Page %s attempted to be removed from role %s, "
... | gpl-2.0 | -5,444,973,989,046,818,000 | 38.60312 | 100 | 0.529036 | false | 4.190537 | true | false | false |
camptocamp/QGIS | python/plugins/processing/taudem/dinftranslimaccum.py | 1 | 4866 | # -*- coding: utf-8 -*-
"""
***************************************************************************
dinftranslimaccum.py
---------------------
Date : October 2012
Copyright : (C) 2012 by Alexander Bruy
Email : alexander dot bruy at gmail dot com
*******... | gpl-2.0 | -4,222,742,194,063,032,300 | 42.446429 | 146 | 0.639129 | false | 3.96577 | false | false | false |
wrightaprilm/squamates | prunetree.py | 1 | 4177 | #! /usr/bin/env python
import dendropy
from dendropy.utility.fileutils import find_files
## operations for the ml tree
ml = dendropy.Tree.get_from_path("filename", "format")
print(ml.description())
node_D = ml.find_node_with_taxon_label("Sphenodon punctatus")
outgroup_node = spe_node.parent_node
ml = ml.reroot_at_nod... | mit | -9,109,998,698,335,899,000 | 31.889764 | 88 | 0.734977 | false | 2.414451 | false | false | false |
jasonost/clinicaltrials | pubmed/Process_pub_data.py | 1 | 7282 | from bs4 import BeautifulSoup
import cPickle as pickle
import time
import os
def get_articles_data(data, investigator_mesh_dict):
time_count = 0
last_time = time.time()
auth_articles = {}
auth_articles_abs = {}
for key, value in data.items():
#test to see if value is null, if it is skip it
if... | mit | 7,680,286,593,999,288,000 | 34.521951 | 104 | 0.516754 | false | 4.497838 | false | false | false |
tschijnmo/ccpoviz | ccpoviz/defcamera.py | 1 | 3619 | """
Defining the camera for Pov-Ray visualization
=============================================
In order to hide the obsecure pov-ray camera definition from users, here
functions are provided to translate more user-friendly inputs into the pov-ray
options for the camera.
In order to specify a camera, the parameters n... | mit | -1,858,015,693,737,558,800 | 27.722222 | 79 | 0.648798 | false | 3.866453 | false | false | false |
ytyng/django-elasticindex | tests/tests.py | 1 | 5365 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import time
from django.test import TestCase
from .models import DummyModel, DummyESDocument, DummyESDocumentPresetIndex
class TestESDocumentTest(TestCase):
def setUp(self):
if DummyESDocument.index.exists():
DummyESDocument.inde... | bsd-3-clause | -8,059,776,069,640,500,000 | 33.5 | 79 | 0.546944 | false | 3.048015 | true | false | false |
spatchcock/models | gaussian_with_advection_and_decay.py | 1 | 1810 | # -*- coding: utf-8 -*-
"""
Created on Sun Jan 31 10:45:25 2016
@author: spatchcock
"""
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
import matplotlib.animation as animation
import matplotlib.colors as colors
#%%
def two_d_gauss(x, y, M, meanx, meany, stdevx, stdevy):
... | unlicense | -1,696,145,834,400,665,300 | 20.807229 | 152 | 0.600552 | false | 2.218137 | false | false | false |
deepmind/jax_verify | jax_verify/tests/ibp_test.py | 1 | 4160 | # coding=utf-8
# Copyright 2020 The jax_verify Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | apache-2.0 | -1,775,091,613,955,423,200 | 32.821138 | 79 | 0.621635 | false | 3.360258 | true | false | false |
pradeepchhetri/pyvultr | setup.py | 1 | 1297 | #!/usr/bin/env python
from pyvultr.meta import (__version__, __description__, __author__,
__author_email__, __url__)
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
packages = [
'pyvultr',
'pyvultr.cmd',
'pyvultr.lib'
]
requires = o... | unlicense | -4,166,431,794,577,748,500 | 27.822222 | 67 | 0.58751 | false | 4.02795 | false | true | false |
tiagoantao/AgeStructureNe | sampleLoci.py | 1 | 1346 | from __future__ import print_function
from sys import stdin, argv, exit
import bz2
import random
if len(argv) not in [4, 5]:
print("python %s genFile loci maxLoci [startLoci]" % (argv[0],))
exit(-1)
genFile = argv[1]
nloci = int(argv[2])
maxLoci = int(argv[3])
startLoci = int(argv[4]) if len(argv) == 5 else 0... | agpl-3.0 | -2,048,678,567,316,271,600 | 21.433333 | 74 | 0.59584 | false | 2.758197 | false | false | false |
inercia/evy | evy/patched/os.py | 1 | 3820 | #
# Evy - a concurrent networking library for Python
#
# Unless otherwise noted, the files in Evy are under the following MIT license:
#
# Copyright (c) 2012, Alvaro Saurin
# Copyright (c) 2008-2010, Eventlet Contributors (see AUTHORS)
# Copyright (c) 2007-2010, Linden Research, Inc.
# Copyright (c) 2005-2006, Bob Ippo... | mit | 8,417,243,514,126,850,000 | 29.07874 | 79 | 0.631675 | false | 3.752456 | false | false | false |
Relrin/aiorest-ws | aiorest_ws/auth/token/utils.py | 1 | 1071 | # -*- coding: utf-8 -*-
"""
Functions and constants, which can be used for work with Token models.
"""
SQL_CREATE_TOKEN_TABLE = """
CREATE TABLE IF NOT EXISTS aiorest_auth_token
(id INTEGER PRIMARY KEY NOT NULL,
name CHAR(64) NOT NULL, -- name of key (admin, api, etc.)
token TEXT NOT NULL,
creat... | bsd-3-clause | -4,285,003,790,112,530,400 | 32.46875 | 77 | 0.633053 | false | 3.275229 | false | false | false |
FrancescoCeruti/linux-show-player | lisp/ui/about.py | 2 | 6223 | # -*- coding: utf-8 -*-
#
# This file is part of Linux Show Player
#
# Copyright 2012-2016 Francesco Ceruti <ceppofrancy@gmail.com>
#
# Linux Show Player 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 ... | gpl-3.0 | 9,202,695,973,476,849,000 | 38.367089 | 85 | 0.604823 | false | 3.751508 | false | false | false |
mnesvold/Boil | test-boiler.py | 1 | 7629 | import os
import shutil
import sys
import tempfile
import unittest
try:
from cStringIO import StringIO
except ImportError:
from StringIO import StringIO
import boiler
class BoilerTests(unittest.TestCase):
def setUp(self):
self.boiler = boiler.Boiler()
self.temp_dirs = []
def tea... | mit | 153,866,880,273,420,260 | 35.328571 | 80 | 0.610434 | false | 4.128247 | true | false | false |
ckclark/leetcode | py/insert-delete-getrandom-o1-duplicates-allowed.py | 1 | 1787 | from collections import Counter
import random
class RandomizedCollection(object):
def __init__(self):
"""
Initialize your data structure here.
"""
self.counter = Counter()
self.redundant = Counter()
self.array = []
def insert(self, val):
"""
Ins... | apache-2.0 | 6,901,476,797,109,974,000 | 27.365079 | 137 | 0.543928 | false | 4.127021 | false | false | false |
pizzaro13/FakeNewsDetector | Exporter.py | 2 | 2515 | # -*- coding: utf-8 -*-
import sys,getopt,got,datetime,codecs
def main(argv):
if len(argv) == 0:
print 'You must pass some parameters. Use \"-h\" to help.'
return
if len(argv) == 1 and argv[0] == '-h':
print """\nTo use this jar, you can pass the folowing attributes:
username: Username of a specific t... | mit | 3,090,110,719,284,948,000 | 30.848101 | 194 | 0.656859 | false | 2.962309 | false | false | false |
GoogleCloudPlatform/keras-idiomatic-programmer | zoo/squeezenet/squeezenet_complex.py | 1 | 4023 | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | 1,582,759,778,911,955,200 | 32.525 | 92 | 0.661695 | false | 3.660601 | false | false | false |
cdd1969/pygwa | tests/test_01.py | 1 | 4619 | from __future__ import print_function
import sys
import os
# hack our sys argv path to match BASEDIRECTORY
sys.argv[0] = os.path.abspath(os.path.join(os.path.dirname(sys.argv[0]), os.pardir, 'pygwa.py'))
import unittest
from PyQt5 import QtGui, QtCore
from PyQt5.QtTest import QTest
from PyQt5.QtCore import Qt
impor... | gpl-2.0 | -1,722,578,703,316,824,800 | 32.715328 | 116 | 0.628708 | false | 3.564043 | true | false | false |
cs01/gdbgui | gdbgui/htmllistformatter.py | 1 | 1363 | from pygments.formatters import HtmlFormatter # type: ignore
class HtmlListFormatter(HtmlFormatter):
"""A custom pygments class to format html. Returns a list of source code.
Each element of the list corresponds to a line of (marked up) source code.
"""
def get_marked_up_list(self, tokensource):
... | gpl-3.0 | 7,960,633,443,017,061,000 | 37.942857 | 78 | 0.589875 | false | 4.020649 | false | false | false |
spyysalo/wvlib | relation.py | 1 | 1579 | #!/usr/bin/env python
"""Given phrases p1 and p2, find nearest neighbors to both and rank
pairs of neighbors by similarity to vec(p2)-vec(p1) in given word
representation.
The basic idea is a straightforward combination of nearest neighbors
and analogy as in word2vec (https://code.google.com/p/word2vec/).
"""
import... | bsd-3-clause | -3,324,974,838,855,572,500 | 31.22449 | 79 | 0.628879 | false | 2.996205 | false | false | false |
mahak/neutron | neutron/agent/windows/ip_lib.py | 2 | 2559 | # Copyright 2016 Cloudbase Solutions.
# 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 requ... | apache-2.0 | -109,766,519,154,845,980 | 28.079545 | 78 | 0.608832 | false | 4.167752 | false | false | false |
lokokung/Starburst-LabJack-OVRO | gen/gen_starburst_sf.py | 1 | 27052 | """
STARBURST OVRO Item Struct Decomposition
(Based on gen_schedule_sf.py)
Author: Lokbondo Kung
Email: lkkung@caltech.edu
"""
import struct
import numpy as np
import shutil
# NUMBER OF ELEMENTS IN CLUSTERS:
Nelements = 7
Nelements_starburst = 4
Nelements_lonoise = 12
Nelements_antenna = 24
# Version... | mit | -6,084,764,854,640,835,000 | 30.567095 | 106 | 0.436493 | false | 4.081473 | false | false | false |
KaranToor/MA450 | google-cloud-sdk/lib/surface/iam/service_accounts/delete.py | 2 | 2130 | # Copyright 2015 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 ag... | apache-2.0 | 7,105,143,336,546,863,000 | 35.724138 | 78 | 0.69108 | false | 4.268537 | false | false | false |
AstroPrint/AstroBox | src/astroprint/camera/v4l2/gstreamer/process/pipelines/bins/v4l2_video_src.py | 1 | 4311 | # coding=utf-8
__author__ = "AstroPrint Product Team <product@astroprint.com>"
__license__ = 'GNU Affero General Public License http://www.gnu.org/licenses/agpl.html'
import platform
from gi.repository import Gst
from .base_video_src import VideoSrcBinBase
from astroprint.manufacturerpkg import manufacturerPkgManag... | agpl-3.0 | -6,529,463,372,635,997,000 | 34.04878 | 196 | 0.729761 | false | 3.059617 | false | false | false |
simod/geonode | geonode/contrib/worldmap/wm_extra/admin.py | 2 | 1612 | from django.contrib import admin
from .models import ExtLayer, ExtMap, ExtLayerAttribute, LayerStats, MapStats, Endpoint, Action
class ExtLayerAdmin(admin.ModelAdmin):
list_display = (
'layer',
'last_modified',
'gazetteer_project',
'in_gazetteer',
'searchable',
'la... | gpl-3.0 | -6,687,725,279,111,101,000 | 21.704225 | 95 | 0.637717 | false | 3.647059 | false | false | false |
bluecube/codecad | codecad/shapes/__init__.py | 1 | 2712 | """ User facing constructors for basic shapes.
Names from this module may optionally be imported as "from codecad.shapes import *".
Basic shape interface is composed of functions defined here and of methods on
Shape objects (transformations, shell, extrude ...)"""
import math
from . import simple2d as _s2
from . im... | gpl-3.0 | 7,885,684,380,373,062,000 | 23.214286 | 87 | 0.623156 | false | 3.106529 | false | false | false |
praxigento/damvitool | damvitool/view.py | 1 | 3902 | from json import dumps
from damvitool.utils import to_json_type
from morepath import redirect, Response, NO_IDENTITY, Identity
from damvitool.main import DamvitoolApp
from damvitool.model import Root, Database, Table, Record, UniGridRequest
from webob.exc import HTTPException
__author__ = 'alex-smirnov'
@DamvitoolAp... | lgpl-3.0 | -5,720,538,941,035,803,000 | 28.119403 | 119 | 0.69631 | false | 3.47153 | false | false | false |
scwuaptx/CTF | 2017-writeup/secuinside/vvc.py | 1 | 3513 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pwnpwnpwn import *
from pwn import *
#host = "10.211.55.6"
#port = 8888
host = "52.79.83.139"
port = 31337
r = remote(host,port)
def register(ids,pw,name,types,profile=None):
r.recvuntil(">")
r.sendline("2")
r.recvuntil(":")
r.sendline(str(types))
... | gpl-2.0 | -7,201,957,698,225,920,000 | 17.489474 | 61 | 0.592941 | false | 2.558631 | false | false | false |
tedoreve/tools | maxwell.py | 1 | 1264 | # -*- coding: utf-8 -*-
"""
Created on Wed Jun 20 12:11:24 2018
@author: tedoreve
"""
import matplotlib.pyplot as plt
import numpy as np
import astropy.constants as con
import astropy.units as un
def maxwell(T,m,v):
a = np.sqrt(con.k_B*T/con.m_e)
print('a=',a.to('km/s'))
return np.sqrt(2... | mit | -5,786,362,109,074,876,000 | 25.521739 | 94 | 0.554589 | false | 2.672304 | false | false | false |
jessegonzalez/grinder | src/grinder/Filter.py | 2 | 3819 | # This software is licensed to you under the GNU General Public
# License as published by the Free Software Foundation; either version
# 2 of the License (GPLv2) or (at your option) any later version.
# There is NO WARRANTY for this software, express or implied,
# including the implied warranties of MERCHANTABILITY,
# ... | gpl-2.0 | 3,908,979,287,542,238,700 | 34.691589 | 88 | 0.622414 | false | 4.248053 | false | false | false |
ihsoft/EasyVesselSwitch | Tools/clients/SpacedockClient.py | 1 | 5778 | # Public domain license.
# Author: igor.zavoychinskiy@gmail.com
# GitHub: https://github.com/ihsoft/KSPDev_ReleaseBuilder
# $version: 1
# $date: 07/13/2018
"""A client library to communicate with Spacedock via API.
Example:
import SpacedockClient
print 'KSP 1.4.*:', SpacedockClient.GetVersions(r'1\.4\.\d+')
S... | unlicense | 1,102,166,776,733,838,200 | 28.329949 | 78 | 0.676878 | false | 3.508197 | false | false | false |
solvebio/solvebio-python | solvebio/cli/main.py | 1 | 17065 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import os
import sys
import copy
import argparse
import solvebio
from . import auth
from . import data
from .tutorial import print_tutorial
from .ipython import launch_ipython_shell
from ..utils.validators import validate_api_host_ur... | mit | -1,924,010,282,670,942,200 | 37.784091 | 79 | 0.438558 | false | 4.861823 | false | false | false |
luigivieira/fsdk | fsdk/detectors/test-emotions.py | 1 | 4073 | #!/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 | -7,315,364,115,541,169,000 | 34.736842 | 110 | 0.605696 | false | 3.81367 | false | false | false |
danianr/NINJa | cloudadapter.py | 1 | 8320 | from socket import *
from datetime import *
from subprocess import Popen, PIPE
from collections import deque
import sys
import os
import time
import random
import copy
class IndexView(object):
def __init__(self, username, indexFunc, displayFunc):
self.username = username
self.timestamp = time.time()
... | mit | -3,009,904,633,007,559,000 | 32.28 | 148 | 0.563822 | false | 3.913452 | false | false | false |
samdmarshall/pyXcode | pyXcode/xcodeproj.py | 1 | 2091 | import os
import sys
# importing the pbProj module
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'pbProj'))
from pbProj import pbProj
# importing the xcscheme module
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'pyxcscheme'))
from pyxcscheme import xcscheme
fro... | bsd-3-clause | 7,207,501,181,567,734,000 | 36.357143 | 95 | 0.596365 | false | 4.293634 | false | false | false |
nbigaouette/sorting | profiling/plot.py | 1 | 1144 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import glob
import re
import os
import sys
import numpy as np
import matplotlib.pyplot as plt
if len(sys.argv) == 1:
print('Usage: plot.py path/to/build/profiling')
sys.exit(1)
csv_files = glob.glob(os.path.join(sys.argv[1], '*.csv'))
if (len(csv_files) == 0)... | bsd-3-clause | 763,205,658,088,627,300 | 21 | 76 | 0.603147 | false | 2.503282 | false | false | false |
motherjones/mirrors | mirrors/models.py | 1 | 11917 | import datetime
import re
import sys
from django.dispatch import receiver
from django.contrib.auth.models import User
from django.db import models
from django.db.models import Max
from django.utils.timezone import utc
from django.utils import timezone
from django.core.urlresolvers import reverse
from jsonfield import... | mit | -1,367,688,952,275,133,000 | 32.102778 | 85 | 0.592683 | false | 4.478392 | false | false | false |
agisoft-llc/photoscan-scripts | src/model_style_transfer.py | 1 | 22320 | # This is python script for Metashape Pro. Scripts repository: https://github.com/agisoft-llc/metashape-scripts
#
# Based on https://colab.research.google.com/github/tensorflow/lucid/blob/master/notebooks/differentiable-parameterizations/style_transfer_3d.ipynb
# Modifications:
# 1. Taking into account cameras position... | mit | 3,523,976,573,227,111,400 | 41.113208 | 188 | 0.620116 | false | 3.71381 | false | false | false |
realms-team/solmanager | libs/sol-REL-1.7.5.0/tests/test_hdlc.py | 3 | 3377 | import os
from sensorobjectlibrary import openhdlc as hdlc
from sensorobjectlibrary import Sol as sol
JSON = {
'timestamp': 1521645792,
'mac': '00-17-0d-00-00-58-5b-02',
'type': 33,
'value': {
'manager': '00-17-0d-00-00-58-5b-02',
'valid': True,
'snapshot': {
'getNet... | bsd-3-clause | -905,223,369,981,711,500 | 33.459184 | 82 | 0.426118 | false | 3.191871 | false | false | false |
EnTeQuAk/dmlt | dmlt/node.py | 1 | 3237 | #-*- coding: utf-8 -*-
"""
dmlt.inodes
~~~~~~~~~~~
Node interface for DMLT.
:copyright: 2008 by Christopher Grebs.
:license: BSD, see LICENSE for more details.
"""
from dmlt import events
from dmlt.utils import node_repr, escape, striptags
from dmlt.query import NodeQueryMixin
class BaseNode(obj... | bsd-3-clause | -6,170,797,914,194,077,000 | 20.58 | 75 | 0.591597 | false | 3.77713 | false | false | false |
apenwarr/port | port.py | 1 | 8476 | #!/usr/bin/env python
# Copyright 2011-2012 Avery Pennarun and port.py contributors.
# 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 abov... | bsd-2-clause | -8,557,969,775,399,282,000 | 30.392593 | 77 | 0.541529 | false | 3.831826 | false | false | false |
selenamarie/nuthatch | migrations/versions/3394654f4780_.py | 1 | 1043 | """empty message
Revision ID: 3394654f4780
Revises: 23c49602b4ca
Create Date: 2015-01-30 14:49:18.237825
"""
# revision identifiers, used by Alembic.
revision = '3394654f4780'
down_revision = '23c49602b4ca'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
def upgrade():
... | mpl-2.0 | 6,663,940,205,437,048,000 | 28.8 | 82 | 0.680729 | false | 3.249221 | false | false | false |
deadlylaid/book_connect | wef/items/tests/booksale.py | 1 | 1589 | from django.core.urlresolvers import resolve
from django.test import TestCase
from items.models.item_post import ItemPost
from wef.views import Home
from items.views.booksale import BookSale
from wef.mixins.tests import SetUpLogInMixin
class BookSalePageTest(SetUpLogInMixin):
def test_booksale_url_resolves_to... | mit | -7,484,518,541,001,545,000 | 29.529412 | 71 | 0.550417 | false | 3.663529 | true | false | false |
paulsuh/paul-suh-recipes | TrueCrypt/TrueCryptURLProvider.py | 1 | 2381 | #!/usr/bin/env python
import re
import urllib
import urllib2
from autopkglib import Processor, ProcessorError
__all__ = ["TrueCryptURLProvider"]
DLV_URL = 'http://www.truecrypt.org/downloads'
DLS_URL = 'http://www.truecrypt.org/dl'
re_verfind = re.compile('<input type="hidden" name="DownloadVersion" value="([0-9A-Z... | apache-2.0 | 8,546,031,501,821,073,000 | 24.063158 | 96 | 0.672827 | false | 3.010114 | false | false | false |
tur103/social-network | server/database.py | 1 | 11888 | """
Author : Or Israeli
FileName : database.py
Date : 5.5.17
Version : 1.0
"""
import sqlite3
from constants import *
import os
class DataBase(object):
def __init__(self, path):
object.__init__(self)
self.database = sqlite3.connect(path)
def create_... | mit | 8,901,477,501,509,801,000 | 26.971765 | 78 | 0.527338 | false | 4.978224 | false | false | false |
thinkasoft/ProyectoRD-dev | l10n_ve_imex/model/invoice.py | 1 | 8350 | # -*- encoding: utf-8 -*-
###############################################################################
# Module Writen to OpenERP, Open Source Management Solution
# Copyright (c) 2013 Vauxoo C.A. (http://openerp.com.ve/)
# All Rights Reserved
############# Credits ###########################################... | agpl-3.0 | 4,054,325,678,371,464,000 | 44.380435 | 104 | 0.502156 | false | 3.914674 | false | false | false |
ourway/marmoolak | setup.py | 1 | 1727 | import glob
import imp
import io
import os
from os import path
from setuptools import setup, find_packages, Extension
import sys
MYDIR = path.abspath(os.path.dirname(__file__))
# NOTE
REQUIRES = ['fysom', 'redis']
cmdclass = {}
ext_modules = []
setup(
name='marmoolak',
version='1.0.7',
description='Yet... | mit | 8,931,730,525,621,194,000 | 31.584906 | 78 | 0.645049 | false | 4.092417 | false | false | false |
YiqunPeng/Leetcode-pyq | solutions/655PrintBinaryTree.py | 1 | 1788 | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def printTree(self, root):
"""
:type root: TreeNode
:rtype: List[List[str]]
"""
l... | gpl-3.0 | -7,238,612,738,662,014,000 | 28.816667 | 92 | 0.409955 | false | 4.267303 | false | false | false |
benzkji/django-admin-sort | admin_sort/admin/inlines.py | 1 | 5445 | from __future__ import unicode_literals
from django import forms
from django.conf import settings
from django.contrib import admin
from django.core.exceptions import ImproperlyConfigured
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
class SortableInlineMixinBas... | mit | 7,148,667,015,688,821,000 | 32.20122 | 80 | 0.5809 | false | 4.036323 | false | false | false |
yola/demands | demands/pagination.py | 1 | 5015 | from itertools import count
PAGE_PARAM = 'page_param'
PAGE_SIZE_PARAM = 'page_size_param'
PAGE_SIZE = 'page_size'
PAGINATION_TYPE = 'pagination_type'
RESULTS_KEY = 'results_key'
NEXT_KEY = 'next_key'
START = 'start'
class PaginationType(object):
ITEM = 'item'
PAGE = 'page'
class PaginatedResults(object):
... | mit | -8,171,778,497,806,336,000 | 32.885135 | 78 | 0.569292 | false | 3.618326 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.