repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
adisbladis/blues | blues/ruby.py | 3 | 1148 | """
Ruby Blueprint
==============
**Fabric environment:**
.. code-block:: yaml
blueprints:
- blues.ruby
settings:
ruby:
gems: # List of ruby gems to install (Optional)
# - sass
"""
from fabric.decorators import task
from refabric.api import run, info
from refabric.conte... | mit | 2,994,391,823,487,653,000 | 15.882353 | 77 | 0.584495 | false | 3.447447 | false | false | false |
levilucio/SyVOLT | t_core/rewriter.py | 1 | 4539 |
from .rule_primitive import RulePrimitive
from .messages import TransformationException
from core.himesis import Himesis
from core.himesis_utils import update_equations
from solver.simple_attribute_equation_evaluator import is_consistent
import traceback
import re
class Rewriter(RulePrimitive):
''... | mit | -5,431,089,744,704,395,000 | 36.142857 | 117 | 0.50738 | false | 4.839019 | false | false | false |
suutari-ai/shoop | shuup/admin/modules/contact_groups/__init__.py | 3 | 2024 | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from django.utils.transla... | agpl-3.0 | -7,866,033,174,984,438,000 | 35.142857 | 88 | 0.64081 | false | 3.776119 | false | false | false |
brittdawn/django-webstore | webstore/urls.py | 2 | 3563 | """webstore URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-ba... | mit | -7,629,831,077,194,379,000 | 48.486111 | 105 | 0.616896 | false | 3.898249 | false | false | false |
TheMrNomis/mavlink | pymavlink/tools/mavgpslock.py | 47 | 2056 | #!/usr/bin/env python
'''
show GPS lock events in a MAVLink log
'''
import sys, time, os
from argparse import ArgumentParser
parser = ArgumentParser(description=__doc__)
parser.add_argument("--condition", default=None, help="condition for packets")
parser.add_argument("logs", metavar="LOG", nargs="+")
args = parser... | lgpl-3.0 | -8,487,313,588,117,863,000 | 31.125 | 87 | 0.578794 | false | 3.607018 | false | false | false |
kumar303/addons-server | src/olympia/addons/tests/test_update.py | 2 | 26966 | # -*- coding: utf-8 -*-
import json
from unittest import mock
from datetime import datetime, timedelta
from email import utils
from django.db import connection
from services import update
from olympia import amo
from olympia.addons.models import (
Addon, CompatOverride, CompatOverrideRange, IncompatibleVersions... | bsd-3-clause | -3,774,008,587,513,542,700 | 35.939726 | 79 | 0.59334 | false | 3.565045 | true | false | false |
monetizeio/dj-user | setup.py | 1 | 2096 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright © 2013 by its contributors. See AUTHORS for details.
# Distributed under the MIT/X11 software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
from distutils.core import setup
from dj_user import get_version
#... | lgpl-3.0 | -7,464,357,450,241,061,000 | 34.372881 | 96 | 0.632487 | false | 3.610727 | false | false | false |
myadventure/myadventure-api | app/views/delorme.py | 1 | 5423 | """
Initialize adventure delorme controller
"""
import logging
import urllib.request, urllib.error, urllib.parse
import datetime
from pykml import parser
from flask import Blueprint, abort, request, jsonify
from werkzeug.exceptions import BadRequest
from app.decorators import crossdomain
from app.views.auth import OA... | apache-2.0 | 7,527,526,077,902,378,000 | 33.322785 | 91 | 0.551724 | false | 4.047015 | false | false | false |
OpenHydrology/lmoments3 | lmoments3/tests/test_samlmu_speed.py | 1 | 1493 | import unittest
from datetime import datetime
import lmoments3 as lm
from lmoments3 import distr
import numpy as np
class TestSamlmuSpeed(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.n = 50
kappa_distr = distr.kap(loc=-0.7, scale=2.6, k=0.9, h=1.6)
cls.record = kappa_distr... | gpl-3.0 | -230,801,476,502,980,300 | 29.489796 | 90 | 0.58138 | false | 3.016162 | true | false | false |
jpalladino84/Python-Roguelike-Framework | components/equipment.py | 2 | 4828 | from components.component import Component
from stats.enums import StatsEnum
from itertools import chain
from util.decorators import cached, invalidate_cache
class Equipment(Component):
NAME = "equipment"
"""
This component attaches itself to anything with a bodies.
It represents equipment worn or wie... | mit | 8,653,732,156,884,264,000 | 39.915254 | 113 | 0.594863 | false | 3.85623 | false | false | false |
palfrey/missing-albums | missing_albums.py | 1 | 12337 | from mutagen import File
from mutagen.asf import ASF, ASFTags
from mutagen.apev2 import APEv2File
from mutagen.flac import FLAC
from mutagen.id3 import ID3FileType
from mutagen.easyid3 import EasyID3
from mutagen.mp3 import MP3
from mutagen.oggflac import OggFLAC
from mutagen.oggspeex import OggSpeex
from mutagen.oggth... | agpl-3.0 | -8,553,838,431,859,450,000 | 29.017032 | 158 | 0.656156 | false | 3.023775 | false | false | false |
brokendata/bigmler | bigmler/checkpoint.py | 1 | 12195 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 BigML
#
# 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 | -7,124,479,175,667,289,000 | 30.757813 | 79 | 0.581058 | false | 4.294014 | false | false | false |
pavanw3b/sh00t | configuration/models.py | 1 | 3058 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.contrib.auth.models import User
from django.utils import timezone
from datetime import datetime
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class MethodologyMaster(mo... | apache-2.0 | -6,504,898,097,162,188,000 | 38.205128 | 116 | 0.691956 | false | 3.83208 | false | false | false |
hpfem/agros2d | resources/python/jedi/interpret.py | 2 | 5520 | """
Module to handle interpreted Python objects.
"""
import itertools
import tokenize
from jedi import parsing_representation as pr
class ObjectImporter(object):
"""
Import objects in "raw" namespace such as :func:`locals`.
"""
def __init__(self, scope):
self.scope = scope
count =... | gpl-2.0 | -4,367,904,602,826,180,600 | 31.280702 | 78 | 0.502536 | false | 4.509804 | false | false | false |
joelliusp/SpaceHabit | SpaceHabitRPG/Tests/ForHelpers/Test_Heap.py | 1 | 2353 | from TestDummyObjectMaker import DailySortingTestObject
from SpaceUnitTest import SpaceUnitTest
from collections import OrderedDict
from Heap import Heap
import random
class Test_Heap(SpaceUnitTest):
def setUp(self):
self.testList = []
self.controlList = []
for i in range(0,500):
u = i // 100
... | mit | -1,268,567,084,576,588,300 | 25.438202 | 70 | 0.632809 | false | 3.232143 | true | false | false |
Gimpneek/exclusive-raid-gym-tracker | app/views/view_sets/personalised_raids_view_set.py | 1 | 1052 | # pylint: disable=too-many-ancestors
""" View Set for personalised Gym api """
from rest_framework import viewsets
from app.models.profile import Profile
from app.models.raid_item import RaidItem
from app.serializers.raid_item import RaidItemSerializer
from app.views.view_sets.common import paginate_raids
class UserR... | gpl-3.0 | 5,658,764,516,406,136,000 | 32.935484 | 69 | 0.692015 | false | 4 | false | false | false |
mlperf/training_results_v0.7 | Fujitsu/benchmarks/resnet/implementations/implementation_open/mxnet/3rdparty/tvm/topi/python/topi/vision/rcnn/proposal.py | 2 | 3693 | # 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 | -6,410,807,795,262,336,000 | 31.973214 | 98 | 0.622258 | false | 2.995134 | false | false | false |
iago-suarez/ancoweb-TFG | src/ancoweb/settings.py | 1 | 4756 | """
Django settings for ancoweb project.
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""
# Build paths inside the project like this: BASE_DIR / "directory"
from pa... | apache-2.0 | -9,098,061,760,244,350,000 | 25.276243 | 75 | 0.691127 | false | 3.499632 | false | false | false |
DaniFdezAlvarez/wikidataExplorer | wikidata_exp/wdexp/model/wikidata.py | 1 | 7346 | __author__ = 'Dani'
class WikidataEntity(object):
def __init__(self, entity_id, label=None, description=None, aliases=None,
outcoming_properties_id=None, incoming_properties_id=None, pg_score=None):
self._id = entity_id
self._label = label
self._description = d... | gpl-2.0 | 977,541,087,363,265,300 | 22.006536 | 107 | 0.54887 | false | 3.97726 | false | false | false |
labkode/smashbox | protocol/test_protocol_file_checksum.py | 6 | 4068 | from smashbox.utilities import *
from smashbox.utilities.hash_files import *
from smashbox.protocol import chunk_file_upload, file_upload, file_download
import smashbox.protocol
import os
import os.path
@add_worker
def main(step):
d = make_workdir()
reset_owncloud_account()
URL = oc_webdav_url()
lo... | agpl-3.0 | 1,346,570,418,737,837,000 | 37.018692 | 132 | 0.69469 | false | 3.51599 | false | false | false |
henrybond158/Smart-Programming-Project | PiProgram2.py | 1 | 6190 | #!/usr/bin/python
import pygtk
import pygame
from pygame.locals import *
pygtk.require('2.0')
import gtk
import os
import wheel
import sys, select, tty, termios, bluetooth, time
from evdev import InputDevice, categorize, ecodes # Device Input
import threading
import gobject
#from lib import xbox_read # Controller Lib
... | gpl-2.0 | -8,124,626,648,320,981,000 | 24.265306 | 87 | 0.678998 | false | 2.784525 | false | false | false |
keldLundgaard/ase-anharmonics | define_rot_mode.py | 1 | 4665 | import numpy as np
from an_utils import to_massweight_coor
def get_rot_dict(atoms,
basepos,
branch,
symnumber=1,
indices=None,
rot_axis=None):
"""Define the rotational mode.
Get rotational axis, mode vector, and moment of ine... | lgpl-2.1 | -1,891,834,102,752,844,000 | 30.734694 | 72 | 0.587567 | false | 3.173469 | false | false | false |
guillaume-chs/Drive-in-Line | gdrive/gdrive_client.py | 1 | 2704 | #!/usr/bin/python
import sys
from sys import platform as _platform
sys.argv = ['']
import os.path
import subprocess
from gdrive.pydrive.auth import GoogleAuth
from gdrive.pydrive.drive import GoogleDrive
file_type = {
'folder': 'application/vnd.google-apps.folder'
}
class GoogleDriveClient():
def __init_... | gpl-3.0 | -44,829,841,352,414,264 | 27.166667 | 70 | 0.58432 | false | 3.644205 | false | false | false |
jacobwarduk/py-validate-dob | validate_dob.py | 1 | 1088 | #!/usr/bin/env python
import calendar
from datetime import date
from time import strptime
# Function to validate DOB input
# validate_dob("1985", "November", "18")
def validate_dob(y, m, d):
# Validating year
try:
if len(y) == 4 and not int(y) > date.today().year: # Year length must be 4 digits and be in the pas... | mit | -6,511,953,825,184,032,000 | 23.177778 | 146 | 0.676471 | false | 3.090909 | false | false | false |
karamanolev/WhatManager2 | myanonamouse/manage_mam.py | 3 | 2210 | import base64
import os
import os.path
from django.db import transaction
from WhatManager2.locking import LockModelTables
from WhatManager2.utils import norm_t_torrent
from home.models import ReplicaSet, DownloadLocation, TorrentAlreadyAddedException
from myanonamouse.models import MAMTorrent, MAMTransTorrent
def a... | mit | -4,014,386,551,576,631,300 | 34.645161 | 82 | 0.604072 | false | 4.003623 | false | false | false |
Silmathoron/NNGT | nngt/lib/connect_tools.py | 1 | 12235 | #!/usr/bin/env python
#-*- coding:utf-8 -*-
""" Generation tools for NNGT """
import logging
import numpy as np
import scipy.sparse as ssp
from scipy.spatial.distance import cdist
from numpy.random import randint
import nngt
from nngt.lib import InvalidArgument, nonstring_container
from nngt.lib.logger import _log_... | gpl-3.0 | -3,961,071,279,036,299,300 | 30.861979 | 79 | 0.545157 | false | 3.676382 | true | false | false |
pjox/scientific-programming | Parcial 1/PedroJavierOrtiz.py | 1 | 1188 | import math
def Interlace_Iter(L1, L2):
L3=[]
for i in range(min(len(L1),len(L2))):
L3.append(L1[i])
L3.append(L2[i])
if len(L1) < len(L2):
L3=L3+L2[len(L1):]
elif len(L2) < len(L1):
L3=L3+L1[len(L2):]
return L3
def Interlace_Rec(L1,L2):
L4=[]
def Recursive_Part(L1,L2,L4):
if len(L1)==0 or len(L2)==0... | mit | -4,420,393,802,670,555,000 | 15.732394 | 64 | 0.569865 | false | 1.797277 | false | false | false |
mozilla-iam/cis | python-modules/cis_identity_vault/tests/test_vault.py | 1 | 1707 | import os
import random
import subprocess
from moto import mock_dynamodb2
@mock_dynamodb2
class TestVault(object):
def test_crud_it_should_succeed(self):
from cis_identity_vault import vault
v = vault.IdentityVault()
os.environ["CIS_ENVIRONMENT"] = "purple"
os.environ["CIS_REGION_... | mpl-2.0 | 54,099,992,054,255,350 | 30.611111 | 76 | 0.585237 | false | 3.57113 | false | false | false |
dandycheung/androguard | androguard/decompiler/dad/decompile.py | 33 | 12763 | # This file is part of Androguard.
#
# Copyright (c) 2012 Geoffroy Gueguen <geoffroy.gueguen@gmail.com>
# 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://... | apache-2.0 | -8,862,995,910,666,431,000 | 34.851124 | 79 | 0.5599 | false | 3.997181 | false | false | false |
OAButton/tricorder | plugins/python/mdpi.py | 2 | 3568 | #!/usr/bin/env python2.6
import os, sys, re, urllib2, cookielib, string
from urllib import urlencode
from urllib2 import urlopen
from copy import copy
import BeautifulSoup
import htmlentitydefs
import html5lib
from html5lib import treebuilders
import warnings
import codecs
warnings.simplefilter("ignore",DeprecationWar... | bsd-3-clause | 8,792,032,125,478,959,000 | 23.108108 | 164 | 0.622478 | false | 2.905537 | false | false | false |
soellman/copernicus | cpc/dataflow/resource.py | 2 | 4264 | # This file is part of Copernicus
# http://www.copernicus-computing.org/
#
# Copyright (C) 2011, Sander Pronk, Iman Pouya, Erik Lindahl, and others.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as published
# by the Free Soft... | gpl-2.0 | -8,518,917,515,898,427,000 | 33.112 | 80 | 0.615385 | false | 3.94085 | false | false | false |
LennartFr/Hackathons | FlaskCloudant/welcome.py | 1 | 3515 | # Copyright 2015 IBM Corp. 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | apache-2.0 | -1,425,923,854,102,895,400 | 29.042735 | 114 | 0.579232 | false | 3.642487 | false | false | false |
unicefuganda/edtrac | edtrac_project/settings/schedule.py | 1 | 6645 | import datetime
from datetime import date
#All term schedulled polls are computed based on these dates
#these dates are necessary for the system to work properly and
#should be entered every beginning of year. See _next_term_question_date()
FIRST_TERM_BEGINS = datetime.datetime(2014, 2, 3)
SECOND_TERM_BEGINS = datet... | bsd-3-clause | -8,855,191,989,186,216,000 | 25.794355 | 85 | 0.53228 | false | 2.908096 | false | false | false |
mtanti/where-image | experiments/where_image/architecture/optimizers.py | 1 | 3775 | from __future__ import absolute_import, division, print_function, unicode_literals
from builtins import ascii, bytes, chr, dict, filter, hex, input, int, map, next, oct, open, pow, range, round, str, super, zip
import theano
import theano.tensor as T
import math
import numpy as np
from architecture.layer impo... | mit | -4,613,927,694,636,940,000 | 41.390805 | 140 | 0.441589 | false | 4.148352 | false | false | false |
jcushman/pywb | pywb/utils/test/test_loaders.py | 2 | 4867 | #=================================================================
r"""
# LimitReader Tests
>>> LimitReader(BytesIO('abcdefghjiklmnopqrstuvwxyz'), 10).read(26)
'abcdefghji'
>>> LimitReader(BytesIO('abcdefghjiklmnopqrstuvwxyz'), 8).readline(26)
'abcdefgh'
>>> LimitReader.wrap_stream(LimitReader(BytesIO('abcdefghjiklmn... | gpl-3.0 | 7,037,224,367,784,346,000 | 27.629412 | 191 | 0.66016 | false | 3.041875 | true | false | false |
tinkerinestudio/Tinkerine-Suite | TinkerineSuite/python/Lib/OpenGL/GL/ARB/uniform_buffer_object.py | 4 | 5168 | '''OpenGL extension ARB.uniform_buffer_object
This module customises the behaviour of the
OpenGL.raw.GL.ARB.uniform_buffer_object to provide a more
Python-friendly API
Overview (from the spec)
This extension introduces the concept of a group of GLSL uniforms
known as a "uniform block", and the API mechanisms to... | agpl-3.0 | 973,823,161,348,524,300 | 42.436975 | 74 | 0.766834 | false | 4.201626 | false | false | false |
anaruse/chainer | tests/chainer_tests/distributions_tests/test_normal.py | 1 | 1214 | from chainer import distributions
from chainer import testing
import numpy
@testing.parameterize(*testing.product({
'shape': [(3, 2), (1,)],
'is_variable': [True, False],
'sample_shape': [(3, 2), ()],
}))
@testing.fix_random()
@testing.with_requires('scipy')
class TestNormal(testing.distribution_unittest)... | mit | -3,783,134,970,045,142,500 | 30.128205 | 78 | 0.602965 | false | 3.508671 | true | false | false |
Carreau/Love | love/github.py | 1 | 2421 | import github
import getpass
import json
import keyring
import subprocess
import requests
GITHUB_NEW_TOKEN_URI = 'https://github.com/settings/tokens/new'
fake_username = 'love tools'
def get_auth_token(token):
if token is not None:
return token
token = keyring.get_password('github', fake_username)
... | mit | 3,058,954,655,249,858,600 | 30.441558 | 100 | 0.625361 | false | 3.836767 | false | false | false |
GNS3/gns3-server | tests/handlers/api/controller/test_drawing.py | 1 | 3125 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2020 GNS3 Technologies Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
... | gpl-3.0 | -2,907,817,951,550,079,000 | 34.91954 | 137 | 0.64512 | false | 3.483835 | false | false | false |
DataDog/integrations-core | datadog_checks_base/tests/test_utils.py | 1 | 8576 | # -*- coding: utf-8 -*-
# (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from decimal import ROUND_HALF_DOWN
import mock
import pytest
from six import PY2, PY3
from datadog_checks.base.utils.common import ensure_bytes, ensure_unicode, pattern_filter,... | bsd-3-clause | 6,135,690,517,738,410,000 | 32.790514 | 120 | 0.566031 | false | 3.5532 | true | false | false |
hmngwy/pipebin | helpers.py | 1 | 1045 | import datetime
import config
import random
import string
import os
import gnupg
textchars = bytearray({7,8,9,10,12,13,27} | set(range(0x20, 0x100)) - {0x7f})
is_binary_string = lambda bytes: bool(bytes.translate(None, textchars))
def log_to_stdout(message):
time_now = str(datetime.datetime.now()).split('.')[0]
... | gpl-2.0 | 6,882,945,678,450,637,000 | 28.027778 | 77 | 0.650718 | false | 2.910864 | false | false | false |
spacetelescope/asv | test/test_find.py | 3 | 1999 | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import os
import sys
import pytest
from asv.util import check_output, which
from . import tools
from .test_workflow im... | bsd-3-clause | -502,191,799,437,568,300 | 27.15493 | 104 | 0.604302 | false | 3.446552 | true | false | false |
rodekruis/shelter-database | src/web/views/api/shelter_api_v01.py | 2 | 3676 | #! /usr/bin/env python
#-*- coding: utf-8 -*-
# ***** BEGIN LICENSE BLOCK *****
# This file is part of Shelter Database.
# Copyright (c) 2016
# All rights reserved.
#
#
#
# ***** END LICENSE BLOCK *****
from bootstrap import app, manager
from web import models
from web import processors
# 'User' ... | mit | -5,800,293,617,874,024,000 | 35.510204 | 83 | 0.527476 | false | 4.504902 | false | true | false |
iAmMrinal0/wpstore-reddit-bot | wpstorebot.py | 1 | 4862 | import praw
import OAuth2Util
import requests
import re
import time
from bs4 import BeautifulSoup
STORE_LINK = "https://www.windowsphone.com/en-us/search"
SUBREDDIT = ""
SLEEP = 60
BOT_BY = """------
^Bot ^by ^[/u/iammrinal0](/user/iammrinal0)"""
def get_url(app_name):
set_of_links = ""
ctrl = 0
heads... | mit | 3,382,337,231,833,234,000 | 28.828221 | 78 | 0.529412 | false | 3.53343 | false | false | false |
tgcmteam/tgcmlinux | src/tgcm/contrib/freedesktopnet/dbusclient/__init__.py | 1 | 7706 | #!/usr/bin/env python
# Copyright (C) 2009 Martin Vidner
#
#
# Authors:
# Martin Vidner <martin at vidnet.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, or (at your... | gpl-2.0 | -9,011,943,761,378,264,000 | 32.215517 | 127 | 0.61225 | false | 3.941688 | false | false | false |
JasonHanG/tensor-gallery | alexNet-finetune/alexnet.py | 1 | 7368 | """This is an TensorFLow implementation of AlexNet by Alex Krizhevsky at all.
Paper:
(http://papers.nips.cc/paper/4824-imagenet-classification-with-deep-convolutional-neural-networks.pdf)
@original author: Frederik Kratzert (contact: f.kratzert(at)gmail.com)
"""
import tensorflow as tf
import numpy as np
class Al... | apache-2.0 | -1,476,436,430,964,266,200 | 37.176166 | 102 | 0.564332 | false | 3.761103 | false | false | false |
jgsogo/neutron | webapp/question/wordalternate/views/run_wordalternate.py | 1 | 2058 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.views.generic import TemplateView
from django.utils.translation import ugettext_lazy as _
from neutron.models import Meaning, WordAlternate, Word
from neutron.views import WordAlternateRandomMeaningRun
from ..forms import WordAlternateForm
import logging
lo... | gpl-2.0 | 6,908,316,499,432,080,000 | 39.352941 | 117 | 0.677357 | false | 3.93499 | false | false | false |
gordon-elliott/glod | src/glod/api/account_node.py | 1 | 1157 | __copyright__ = 'Copyright(c) Gordon Elliott 2017'
"""
"""
import graphene
from a_tuin.api import (
node_class,
node_connection_field,
get_update_mutation,
get_create_mutation,
get_local_fields
)
from glod.api.account_leaf import AccountLeaf
from glod.api.fund_node import FundLeaf
from glod.db.a... | mit | -5,361,489,816,740,549,000 | 24.711111 | 77 | 0.744166 | false | 3.495468 | false | false | false |
bd-j/sedpy | sedpy/attenuation.py | 1 | 12519 | import numpy as np
import warnings, sys
# --------------------
# ATTENUATION CURVES
# --------------------
def powerlaw(wave, tau_v=1, alpha=1.0, **kwargs):
"""Simple power-law attenuation, normalized to 5500\AA.
:param wave:
The wavelengths at which optical depth estimates are desired.
:param ... | gpl-2.0 | 6,990,991,466,777,430,000 | 31.1 | 86 | 0.529675 | false | 2.601621 | false | false | false |
jjgomera/pychemqt | tools/terminal.py | 1 | 2742 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
'''Pychemqt, Chemical Engineering Process simulator
Copyright (C) 2009-2017, Juan José Gómez Romera <jjgomera@gmail.com>
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 Softwar... | gpl-3.0 | 4,019,939,832,573,192,000 | 32.012048 | 79 | 0.617518 | false | 4.22188 | true | false | false |
ixaxaar/pytorch-dnc | dnc/dnc.py | 1 | 10617 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import torch.nn as nn
import torch as T
from torch.autograd import Variable as var
import numpy as np
from torch.nn.utils.rnn import pad_packed_sequence as pad
from torch.nn.utils.rnn import pack_padded_sequence as pack
from torch.nn.utils.rnn import PackedSequence
from... | mit | 3,054,484,300,671,407,000 | 32.377358 | 155 | 0.595534 | false | 3.356736 | false | false | false |
ukncsc/viper | viper/common/colors.py | 9 | 1468 | # This file is part of Viper - https://github.com/viper-framework/viper
# See the file 'LICENSE' for copying permission.
import os
import sys
def color(text, color_code, readline=False):
"""Colorize text.
@param text: text.
@param color_code: color.
@return: colorized text.
"""
# $TERM under W... | bsd-3-clause | -7,534,164,176,107,016,000 | 27.230769 | 74 | 0.662807 | false | 3.254989 | false | false | false |
mlperf/inference_results_v0.5 | closed/Google/code/resnet/tpu-resnet/third_party/mlperf/inference/loadgen/tests/perftests_null_sut.py | 5 | 2058 | # Copyright 2019 The MLPerf Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | apache-2.0 | 2,030,145,179,946,737,400 | 27.985915 | 79 | 0.693878 | false | 3.616872 | false | false | false |
lamby/django-debug-toolbar-user-panel | debug_toolbar_user_panel/panels.py | 1 | 3985 | """
:mod:`django-debug-toolbar-user-panel`
======================================
Panel for the `Django Debug Toolbar <https://github.com/django-debug-toolbar/django-debug-toolbar>`_
to easily and quickly switch between users.
* View details on the currently logged in user.
* Login as any user from an arbitrary ema... | bsd-3-clause | 3,879,896,755,053,177,300 | 28.518519 | 100 | 0.633626 | false | 3.985 | false | false | false |
HydrelioxGitHub/home-assistant | homeassistant/components/sensor/geo_rss_events.py | 4 | 5423 | """
Generic GeoRSS events service.
Retrieves current events (typically incidents or alerts) in GeoRSS format, and
shows information on events filtered by distance to the HA instance's location
and grouped by category.
For more details about this platform, please refer to the documentation at
https://home-assistant.io... | apache-2.0 | 2,592,984,052,436,335,000 | 34.913907 | 79 | 0.618108 | false | 4.165131 | true | false | false |
EDUlib/edx-platform | lms/djangoapps/instructor/tests/test_api.py | 1 | 190051 | """
Unit tests for instructor.api methods.
"""
import datetime
import functools
import io
import json
import random
import shutil
import tempfile
from unittest.mock import Mock, NonCallableMock, patch
import ddt
import pytest
import six
from boto.exception import BotoServerError
from django.conf import settings
from d... | agpl-3.0 | -7,379,486,599,918,372,000 | 41.9 | 202 | 0.613406 | false | 4.06535 | true | false | false |
dwaynebailey/translate | translate/lang/zh.py | 3 | 2423 | # -*- coding: utf-8 -*-
#
# Copyright 2007 Zuza Software Foundation
#
# This file is part of translate.
#
# translate 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 y... | gpl-2.0 | -8,731,170,228,729,389,000 | 31.726027 | 81 | 0.601088 | false | 3.871961 | false | false | false |
etingof/pysmi | pysmi/reader/callback.py | 1 | 1516 | #
# This file is part of pysmi software.
#
# Copyright (c) 2015-2020, Ilya Etingof <etingof@gmail.com>
# License: http://snmplabs.com/pysmi/license.html
#
import time
from pysmi.reader.base import AbstractReader
from pysmi.mibinfo import MibInfo
from pysmi import error
from pysmi import debug
class CallbackReader(Abs... | bsd-2-clause | 4,648,905,572,071,834,000 | 34.255814 | 120 | 0.652375 | false | 3.661836 | false | false | false |
sorenk/ansible | lib/ansible/modules/cloud/vmware/vmware_cluster_facts.py | 7 | 8021 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Ansible Project
# Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = ty... | gpl-3.0 | 5,528,659,484,127,036,000 | 34.648889 | 116 | 0.626855 | false | 3.903163 | true | false | false |
fredo-editor/FreDo | fredo/util/numpy_util.py | 1 | 2992 | from PySide.QtGui import QImage
import numpy as np
def qimage_to_numpy(qimage):
""" Returns an RGB array given any image. """
# Each row in a bitmap is stored in the size of multiples of 4
# If there are less number of bits in a row, it is padded with 0s
# a 32 bit format ensures that we can get away... | bsd-3-clause | -2,712,060,152,697,588,000 | 25.954955 | 79 | 0.583556 | false | 2.941986 | false | false | false |
fro391/Investing | ArticleScrape/Econ_Word_Scrape.py | 1 | 1039 | from newspaper import Article
import re
def textDownload (H_Link):
#gets article portion of the htmltext
try:
a = Article(H_Link)
a.download()
a.parse()
UnicodeArticle = a.text
StringArticle = UnicodeArticle.encode('ascii','ignore')
StrippedArticle = StringArtic... | gpl-2.0 | 3,965,828,110,465,999,400 | 32.548387 | 95 | 0.655438 | false | 3.73741 | false | false | false |
kernel1983/tornado_WeiboMixin | auth.py | 1 | 2378 | import time
import random
import string
import urlparse
import urllib
import hashlib
import tornado.web
import tornado.template
import tornado.auth
import tornado.escape
from setting import settings
import functools
from tornado import httpclient
from tornado import escape
class WeiboMixin(tornado.auth.OAuth2Mixi... | mit | 1,040,992,154,674,021,400 | 30.706667 | 113 | 0.619428 | false | 3.976589 | false | false | false |
scidam/leafs | leaf/leaf/main/mcreate.py | 1 | 2215 | from .models import LeafData
import csv
from datetime import datetime
import re
import os
from geoposition import Geoposition
from decimal import Decimal
from django.core.files import File
import matplotlib.pyplot as plt
def _get_data_from_filename(filename):
datepat = re.compile(r'.+\_(?P<day>\d\d)\_(?P<month... | mit | 3,333,425,212,414,557,000 | 33.092308 | 93 | 0.530023 | false | 3.182471 | false | false | false |
tivaliy/python-gerritclient | gerritclient/tests/utils/fake_comment.py | 1 | 1586 | #
# Copyright 2017 Vitalii Kulanov
#
# 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 | 7,630,968,110,726,776,000 | 32.744681 | 78 | 0.630517 | false | 3.740566 | false | false | false |
hlamer/qutepart | qutepart/bookmarks.py | 2 | 3298 | """Bookmarks functionality implementation"""
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import QAction
from PyQt5.QtGui import QKeySequence, QTextCursor
import qutepart
class Bookmarks:
"""Bookmarks functionality implementation, grouped in one class
"""
def __init__(self, qpart, markArea):
... | lgpl-2.1 | 3,291,824,203,735,315,000 | 36.908046 | 110 | 0.625531 | false | 4.206633 | false | false | false |
lmaurits/phyltr | src/phyltr/plumbing/sinks.py | 1 | 1699 | import sys
class NewickFormatter:
def __init__(self, out=sys.stdout, annotations=True, topology_only=False):
self.out = out
self.annotations = annotations
self.topology_only = topology_only
def consume(self, stream):
first = True
for t in stream:
if first:... | gpl-3.0 | -4,268,954,458,629,410,300 | 25.546875 | 86 | 0.516186 | false | 4.164216 | false | false | false |
SegFaultAX/graffiti | graffiti/core.py | 1 | 4367 | #!/usr/bin/env python
# Copyright (c) 2014 Michael-Keith Bernard
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy,... | mit | 8,746,022,454,410,757,000 | 33.65873 | 82 | 0.601786 | false | 3.962795 | false | false | false |
iastro-pt/ObservationTools | utils/parse.py | 2 | 3461 | """Functions for parsing the parameter files."""
import os
import logging
from typing import List, Dict, Union
def parse_obslist(fname, path=None):
# type: (str, str) -> List[str]
"""Parse Obslist file containing list of dates/times.
Parameters
----------
fname: str
Filename of obs_list f... | mit | -9,069,334,366,275,485,000 | 34.316327 | 112 | 0.540884 | false | 4.16988 | false | false | false |
d-quinn/bio_quinn2013 | multiple_reference/phased/make_two_vcfs_from_phased.py | 1 | 3495 | import csv
import pprint
def read_hapcut_output(input_hap):
with open(input_hap) as f:
record_lines = []
for line in f:
if not line.startswith('********'):
record_lines.append(line)
else:
yield record_lines
record_lines = []
... | mit | 1,369,937,598,004,088,800 | 36.580645 | 101 | 0.511588 | false | 3.481076 | false | false | false |
shelari/prereform_to_contemporary | word_tokenize.py | 1 | 7361 | # -*- coding: utf-8 -*-
__author__ = 'ElenaSidorova'
import re
SYMBOLS = {
'symbols': [u'[', u']', u'-', u"'"],
'numbers': [u'0', u'1', u'2', u'3', u'4', u'5', u'6', u'7', u'8', u'9'],
'brackets': [u'[', u']']
}
class WordTokenizer(object):
@classmethod
def tokenize(cls, text):
tokens = []... | mit | 5,302,391,894,709,455,000 | 34.350254 | 376 | 0.402556 | false | 3.76175 | false | false | false |
luis-wang/python_Tesseract_GUI_Demo | demo/mser.py | 1 | 1506 | #!/usr/bin/env python
'''
MSER detector demo
==================
mser.py [<video source>]
ESC - exit
Maximally stable extremal region extractor
forked from python2/mser.py
'''
import os,sys
sys.path.append(r'D:\workspaces\aptana3\openvc_demo\python2')
sys.path.append(r'D:\data\aptana34workspace\computer_cv\python2... | apache-2.0 | -3,223,163,544,533,769,000 | 21.147059 | 70 | 0.596946 | false | 2.794063 | false | false | false |
amiramix/serna-free | serna/i18n/check_literals.py | 5 | 7799 | ##
## Copyright(c) 2009 Syntext, Inc. All Rights Reserved.
## Contact: info@syntext.com, http://www.syntext.com
##
## This file is part of Syntext Serna XML Editor.
##
## COMMERCIAL USAGE
## Licensees holding valid Syntext Serna commercial licenses may use this file
## in accordance with the Syntext Serna Commercial... | gpl-3.0 | -4,606,029,231,923,006,000 | 30.321285 | 98 | 0.566868 | false | 3.473942 | false | false | false |
eduNEXT/edx-platform | openedx/core/djangoapps/enrollments/errors.py | 4 | 1532 | """All Error Types pertaining to Enrollment."""
class CourseEnrollmentError(Exception):
"""Generic Course Enrollment Error.
Describes any error that may occur when reading or updating enrollment information for a user or a course.
"""
def __init__(self, msg, data=None):
super().__init__(msg)... | agpl-3.0 | 9,033,921,829,456,944,000 | 27.90566 | 114 | 0.734334 | false | 4.545994 | false | false | false |
JordiGoPython/Python-Hack-Example | Xss.py | 1 | 1936 | from bs4 import BeautifulSoup
import urllib
import sys
import time
''' Ejemplos
http://kids.britannica.com/search?query=3
http://sonica.speedy.com.ar/resultado_busqueda.php?Tipo=1&Texto=2
--
'''
exploits = ['<script>a=document.cookie;alert(a)</script>',
'<IMG+"""><SCRIPT>alert(document.cookie)<%2FSCRIPT>']
#
Payloa... | gpl-2.0 | 3,106,751,860,605,959,000 | 27.895522 | 120 | 0.621384 | false | 2.933333 | false | false | false |
berkayaslan/Ornek_Algoritma_Cozumu | Kod_Dunyasi_Akademik_Soru/Cozumler/BtoAsalSayi/btoasal.py | 1 | 1160 | #! /usr/env/python3
import time as t
import Bolenler
"""
Kullanicidan alinan bir sayinin basamaklari ile yazilabilecek tum
asal sayilarin adedini ekrana yazdiran fonksiyon M() olsun.
__ORNEK:__
M(127):
| 2 | 7 | 17 | 71 | 127 | 271 |
= 6
__CIKTI:__
100.000'e kadar olan sayilar icinde M() fonksiyonundan en buy... | gpl-3.0 | 1,046,352,658,180,883,800 | 14.077922 | 71 | 0.589655 | false | 2.33871 | false | false | false |
mruwek/topydo | topydo/lib/EditCommand.py | 1 | 5712 | # Topydo - A todo.txt client written in Python.
# Copyright (C) 2014 Bram Schoenmakers <me@bramschoenmakers.nl>
#
# 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,... | gpl-3.0 | 6,091,048,701,608,074,000 | 33.409639 | 98 | 0.57563 | false | 4.091691 | false | false | false |
hozn/stravalib | stravalib/attributes.py | 1 | 12153 | """
Attribute types used for the model.
The types system provides a mechanism for serializing/un the data to/from JSON
structures and for capturing additional information about the model attributes.
"""
from __future__ import division, absolute_import, print_function, unicode_literals
import logging
from datetime impo... | apache-2.0 | 3,031,039,495,121,664,000 | 31.065963 | 123 | 0.581667 | false | 4.228601 | false | false | false |
mrgaaron/docs | source/conf.py | 1 | 4722 | # -*- coding: utf-8 -*-
#
# TempoIQ Manual documentation build configuration file
#
import sys
import os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it ab... | mit | -4,601,533,543,413,347,000 | 27.768293 | 79 | 0.639678 | false | 3.618098 | true | false | false |
chfoo/cloaked-octo-nemesis | areca-backup/git_fast_import.py | 1 | 2476 | import glob
import json
import zipfile
import tarfile
import os
import sys
import arrow
def main():
data_dir = 'data/'
infos = []
for info_filename in glob.glob(data_dir + '/*/info.json'):
with open(info_filename) as file:
info = json.loads(file.read())
info['dat... | gpl-3.0 | 5,252,097,189,589,740,000 | 28.488095 | 88 | 0.476171 | false | 4.485507 | false | false | false |
awg24/pretix | src/pretix/plugins/paypal/payment.py | 3 | 9967 | import json
import logging
from collections import OrderedDict
import paypalrestsdk
from django import forms
from django.contrib import messages
from django.template.loader import get_template
from django.utils.translation import ugettext as __, ugettext_lazy as _
from pretix.base.models import Quota
from pretix.base... | apache-2.0 | 7,816,629,109,855,938,000 | 40.016461 | 120 | 0.548008 | false | 4.595205 | false | false | false |
fg1/exif-revgeo | exif_revgeo/__init__.py | 1 | 4683 | #!/usr/bin/python
# -*- encoding: utf-8 -*-
"""
exif-revgeo
~~~~~~~~~~~
This utility reads the GPS coordinates from your photos, reverse geocode
them, and write the result to the appropriate EXIF city/country location
tags.
:copyright: (c) 2015 by fg1
:license: BSD, see LICENSE for more de... | bsd-3-clause | 5,753,826,818,839,148,000 | 33.688889 | 110 | 0.585522 | false | 3.558511 | false | false | false |
felipegerard/arte_mexicano_antiguo | felipegerard/code/luigi/itm/build/lib/itm/text_extraction_functions.py | 12 | 3950 | # coding=utf-8
import os
import io
import sys
import logging
import shutil
try:
from cStringIO import StringIO
except:
from StringIO import StringIO
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.converter import TextConverter
from pdfminer.layout import LAParams
from pdfm... | agpl-3.0 | 6,755,058,549,600,436,000 | 29.384615 | 110 | 0.643544 | false | 3.188055 | false | false | false |
GoogleCloudPlatform/tensorflow-recommendation-wals | airflow/dags/training.py | 1 | 4688 | # Copyright 2018 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 agree... | apache-2.0 | 4,713,744,455,293,275,000 | 27.760736 | 84 | 0.700725 | false | 3.389732 | false | false | false |
abramhindle/UnnaturalCodeFork | python/testdata/launchpad/lib/lp/bugs/interfaces/bugnotification.py | 1 | 4408 | # Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Bug notifications."""
__metaclass__ = type
__all__ = [
'IBugNotification',
'IBugNotificationFilter',
'IBugNotificationRecipient',
'IBugNotificationSet',
]
... | agpl-3.0 | 8,563,591,084,256,852,000 | 32.648855 | 78 | 0.661298 | false | 4.822757 | false | false | false |
raamana/pyradigm | pyradigm/utils.py | 1 | 13549 |
from collections import Iterable
import numpy as np
from pyradigm.base import missing_value_indicator
from pyradigm import ClassificationDataset, RegressionDataset
from pyradigm.pyradigm import MLDataset
feat_generator = np.random.randn
from pyradigm.base import is_iterable_but_not_str, BaseDataset
from warnings imp... | mit | -7,985,475,627,983,962,000 | 36.531856 | 91 | 0.568529 | false | 4.206458 | true | false | false |
wangz/future | obtaindata/obtain_cffex.py | 1 | 5908 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#encoding=utf-8
# pip install BeautifulSoup MySQL-python
# from 20100416
import sys,re,urllib2,urllib,cookielib,chardet,time
from BeautifulSoup import BeautifulSoup,Comment
from datetime import *
import time,logging,MySQLdb
import re
import xml.dom.minidom
import dbconf
reloa... | apache-2.0 | 7,432,032,874,748,383,000 | 29.928177 | 110 | 0.645766 | false | 2.835866 | false | false | false |
yv/exmldoc | py_src/exmldoc/__main__.py | 1 | 4583 | from __future__ import print_function
import optparse
import xml.etree.cElementTree as etree
from exmldoc import make_syntax_doc, process_schema, fill_attributes
def exml_lint_main(argv=None):
"""
Reads an EXML file and writes it back in normal form,
allowing a conversion between ExportXML and EXML-JSON
... | lgpl-3.0 | -6,588,277,450,625,900,000 | 41.045872 | 79 | 0.458652 | false | 4.377268 | false | false | false |
addisonElliott/SmartShopTouchScreen | Util/scanner.py | 1 | 9453 | import sys
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtWidgets import *
from Util.exception import *
from Util import constants
from datetime import date, datetime
if sys.platform.startswith("linux"):
from evdev import *
from evdev.ecodes import *
import re
keycodeToASCII = {
... | agpl-3.0 | 3,383,333,563,418,400,000 | 49.287234 | 134 | 0.520787 | false | 4.108214 | false | false | false |
benjaminnow/swimapp | job_choosing.py | 1 | 3447 | from db import *
import random
from operator import itemgetter
def get_min():
conn, cur = connection()
cur.execute('SELECT minimum FROM jobs')
draws = cur.fetchall()
count = 0
for i in range(len(draws)):
count += draws[i]['minimum']
return count
def get_available():
conn, cur = con... | mit | 7,270,981,957,304,775,000 | 29.236842 | 145 | 0.547433 | false | 3.643763 | false | false | false |
0todd0000/spm1d | spm1d/rft1d/examples/weather_1_rft.py | 1 | 2199 |
import numpy as np
from scipy.ndimage.filters import gaussian_filter1d
from matplotlib import pyplot
from spm1d import rft1d
#(0) Load weather data:
weather = rft1d.data.weather() #dictionay containing geographical locations
### choose two geographical locations:
yA,yB = weather['Atlantic'], weather['Continent... | gpl-3.0 | -8,181,589,285,242,608,000 | 27.558442 | 104 | 0.638927 | false | 2.398037 | false | false | false |
flyingarg/GPU-Viewer | GPU-Viewer/FrameBuffer.py | 1 | 3651 | import gi
import os
import Const
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
from Common import setScreenSize, setBackgroundColor, createScrollbar
FrameBufferList = ["vid", "vdep", "vt", "xsp", "bfsz", "lvl", "rt", "db", "st", "rsz", "gsz", "bsz", "asz", "flt",
"srgb", "aux", "de... | gpl-3.0 | -2,104,989,221,263,291,000 | 37.431579 | 157 | 0.580663 | false | 3.199825 | true | false | false |
motivator/clusto | src/clusto/drivers/base/device.py | 5 | 3638 | from clusto.drivers.base import Driver
import sys
class Device(Driver):
_properties = {'model':None,
'serialnum':None,
'manufacturer':None}
_clustotype = "device"
_driver_name = "device"
@classmethod
def get_by_serial_number(self, serialnum):
pass
... | bsd-3-clause | 3,395,162,878,551,785,000 | 30.912281 | 90 | 0.564596 | false | 4.176808 | false | false | false |
Yrthgze/prueba-sourcetree2 | Drake-Z/0002/0002.py | 2 | 1231 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
'第 0002 题:将 0001 题生成的 200 个激活码(或者优惠券)保存到 MySQL 关系型数据库中。'
__author__ = 'Drake-Z'
import mysql.connector
def write_to_mysql(filename):
conn = mysql.connector.connect(user='root', password='986535', database='test')
cursor = conn.cursor()
cursor.execute("DROP ... | mit | -1,601,573,057,003,070,500 | 30.297297 | 87 | 0.611927 | false | 2.981959 | false | false | false |
CanalTP/kirin | tests/mock_navitia/vj_9580.py | 1 | 29816 | # coding=utf-8
#
# Copyright (c) 2001, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobility and op... | agpl-3.0 | 8,753,083,801,675,113,000 | 29.749226 | 384 | 0.373305 | false | 3.691278 | false | false | false |
cemagg/sucem-fem | sucemfem/PostProcessing/ntff_expressions.py | 1 | 1402 | ## Copyright (C) 2011 Stellenbosch University
##
## This file is part of SUCEM.
##
## SUCEM 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 v... | gpl-3.0 | 1,902,183,725,171,656,400 | 34.948718 | 80 | 0.666904 | false | 3.067834 | false | false | false |
CuppenResearch/SmallTools | Annotate_CADD_Scores_In_VCF.py | 3 | 5238 | #!/usr/bin/python
import sys, os
import vcf
import tabix
from time import time
from time import sleep
import multiprocessing as mp
from optparse import OptionParser
"""
CADD FORMAT
#Chrom Pos Ref Alt RawScore PHRED
1 10001 T A 0.176634 5.959
1 10001 T C 0.114925 5.063
"""
parser = OptionParser()
parser.add_option("... | gpl-3.0 | -5,641,984,427,018,919,000 | 27.939227 | 260 | 0.682131 | false | 2.826767 | false | false | false |
SKIRT/PTS | eagle/extractor.py | 1 | 39415 | #!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
##... | agpl-3.0 | 7,663,827,819,299,570,000 | 47.719407 | 167 | 0.605166 | false | 3.252517 | false | false | false |
blachlylab/mucor | variant.py | 1 | 1480 | # Copyright 2013-2015 James S Blachly, MD and The Ohio State University
#
# This file is part of Mucor.
#
# Mucor 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,... | gpl-3.0 | -2,474,534,786,272,326,000 | 37.947368 | 176 | 0.666892 | false | 3.162393 | false | false | false |
BeatButton/beattie | cogs/default.py | 2 | 2318 | from io import BytesIO
import discord
from discord import File, Member
from discord.ext import commands
from discord.ext.commands import Cog
from bot import BeattieBot
from context import BContext
class Default(Cog):
"""Default useful commands."""
@commands.command()
async def avatar(self, ctx: BContex... | mit | 623,262,135,659,280,500 | 32.594203 | 85 | 0.609577 | false | 3.638932 | false | false | false |
shashanksingh/android_video_streamer | mineral-hangar-418/main.py | 1 | 2978 | import os
import urllib
import webapp2
import webapp2_extras.appengine.auth.models
from webapp2_extras import security
from webapp2_extras.appengine.auth.models import User
from google.appengine.ext import blobstore
from google.appengine.ext.webapp import blobstore_handlers
class MainHandler(webapp2.RequestHandler):... | gpl-3.0 | -323,633,904,016,594,000 | 39.794521 | 106 | 0.684352 | false | 4.176718 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.