repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
grollins/foldkin | foldkin/zam_protein.py | 1 | 1049 | import os.path
from zam.protein import Protein
from zam.sequence import SeqToAA1
DEFAULT_PDB_DIR = os.path.expanduser("~/Dropbox/11_28_2011/pdb")
def create_zam_protein_from_path(file_path):
"""docstring for create_zam_protein"""
p = Protein(file_path)
new_zam_protein = ZamProtein(p)
return new_zam_pr... | bsd-2-clause | -148,482,932,432,346,660 | 27.351351 | 64 | 0.669209 | false | 3.005731 | false | false | false |
ProfessorX/Config | .PyCharm30/system/python_stubs/-1247971765/PyQt4/QtCore/QSemaphore.py | 1 | 1205 | # encoding: utf-8
# module PyQt4.QtCore
# from /usr/lib/python3/dist-packages/PyQt4/QtCore.cpython-34m-x86_64-linux-gnu.so
# by generator 1.135
# no doc
# imports
import sip as __sip
class QSemaphore(): # skipped bases: <class 'sip.simplewrapper'>
""" QSemaphore(int n=0) """
def acquire(self, int_n=1): # rea... | gpl-2.0 | -6,895,287,090,918,313,000 | 29.897436 | 106 | 0.619917 | false | 3.662614 | false | false | false |
google-research/google-research | depth_and_motion_learning/depth_motion_field_model.py | 1 | 18887 | # coding=utf-8
# Copyright 2021 The Google Research 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 applicab... | apache-2.0 | 2,114,861,337,026,813,700 | 38.762105 | 80 | 0.678721 | false | 3.625144 | false | false | false |
mullikine/ranger | ranger/container/settings.py | 1 | 8531 | # Copyright (C) 2009-2013 Roman Zimbelmann <hut@lepus.uberspace.de>
# This software is distributed under the terms of the GNU GPL version 3.
from inspect import isfunction
from ranger.ext.signals import SignalDispatcher, Signal
from ranger.core.shared import FileManagerAware
from ranger.gui.colorscheme import _colors... | gpl-3.0 | -4,823,316,337,248,086,000 | 32.586614 | 79 | 0.538155 | false | 3.940416 | false | false | false |
smendez-hi/SUMO-hib | tools/visualization/mpl_dump_onNet.py | 1 | 17971 | #!/usr/bin/env python
"""
@file mpl_dump_onNet.py
@author Daniel Krajzewicz
@author Michael Behrisch
@date 2007-10-25
@version $Id: mpl_dump_onNet.py 11671 2012-01-07 20:14:30Z behrisch $
This script reads a network and a dump file and
draws the network, coloring it by the values
found within the dump-file.... | gpl-3.0 | -7,227,673,384,518,771,000 | 38.935556 | 147 | 0.537032 | false | 3.648934 | false | false | false |
pyro-ppl/numpyro | test/test_pickle.py | 1 | 1681 | # Copyright Contributors to the Pyro project.
# SPDX-License-Identifier: Apache-2.0
import pickle
import pytest
from jax import random, test_util
import jax.numpy as jnp
import numpyro
import numpyro.distributions as dist
from numpyro.infer import (
HMC,
HMCECS,
MCMC,
NUTS,
SA,
BarkerMH,
... | apache-2.0 | 3,439,322,928,740,963,300 | 26.557377 | 81 | 0.693635 | false | 2.755738 | true | false | false |
fabianp/pytron | setup.py | 1 | 1329 | from Cython.Distutils import build_ext
import numpy as np
from glob import glob
from setuptools import setup, Extension
CLASSIFIERS = """\
Development Status :: 5 - Production/Stable
Intended Audience :: Science/Research
Intended Audience :: Developers
License :: OSI Approved
Programming Language :: Python
Programming... | bsd-3-clause | 1,267,563,133,996,209,700 | 28.533333 | 85 | 0.684725 | false | 3.553476 | false | false | false |
meskio/bitmask_client | src/leap/bitmask/platform_init/locks.py | 1 | 12103 | # -*- coding: utf-8 -*-
# locks.py
# Copyright (C) 2013 LEAP
#
# 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 ... | gpl-3.0 | -3,435,159,310,197,118,000 | 29.032258 | 79 | 0.512683 | false | 4.397892 | false | false | false |
RPGOne/Skynet | pytorch-master/torch/nn/parallel/data_parallel.py | 1 | 4062 | import torch
from ..modules import Module
from .scatter_gather import scatter_kwargs, gather
from .replicate import replicate
from .parallel_apply import parallel_apply
class DataParallel(Module):
"""Implements data parallelism at the module level.
This container parallelizes the application of the given mo... | bsd-3-clause | -7,975,203,935,464,098,000 | 38.436893 | 93 | 0.679468 | false | 4.074223 | false | false | false |
dkgroot/remotecontrol_skinny_phone | tests/conftest.py | 1 | 1313 | import pytest
import re
from SccpLogger.SccpLogger import SccpLogger, EOF, TIMEOUT
def handle_tone(ssh, index, child_result_list):
tone = int(ssh.match.group(2))
dir = int(ssh.match.group(3))
return 'Tone', {'State':ssh.match.group(1).decode('utf-8'),'Type':sccp.lookup_tone(tone),'Direction':sccp.lookup_toned... | gpl-3.0 | -8,339,181,251,816,196,000 | 36.514286 | 135 | 0.642803 | false | 3.688202 | false | false | false |
alt-core/sheetbot | models.py | 1 | 5113 | # coding: utf-8
import json
import random
import string
from google.appengine.ext import ndb
class GlobalBotVariables(ndb.Model):
scenario_uri = ndb.StringProperty()
class GroupMembers(ndb.Model):
members = ndb.StringProperty(repeated=True)
class PlayerStatus(ndb.Model):
scene = ndb.StringProperty()
... | mit | 7,030,397,467,821,336,000 | 26.478022 | 87 | 0.581684 | false | 3.579814 | false | false | false |
gem/oq-svir-qgis | svir/dialogs/load_hcurves_as_layer_dialog.py | 1 | 6001 | # -*- coding: utf-8 -*-
# /***************************************************************************
# Irmt
# A QGIS plugin
# OpenQuake Integrated Risk Modelling Toolkit
# -------------------
# begin : 2013-10-24
# copyright ... | agpl-3.0 | 54,562,013,012,367,380 | 41.864286 | 79 | 0.588402 | false | 3.656917 | false | false | false |
cliali/py2 | test.py | 1 | 11812 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import telebot
from telebot import types
from telebot import util
import re
import time
from time import sleep
import sys
import json
import os
import logging
import subprocess
import requests
import requests as req
import random
from random import randint
imp... | apache-2.0 | 4,858,250,203,884,125,000 | 62.588957 | 283 | 0.629084 | false | 2.142886 | false | false | false |
th0ma5w/pyPartOfSpeech | POSTagger.py | 1 | 2826 | """
* pyPOS
*
* Python Version Copyright 2011 Thomas Winningham
* Javascript Version and Comments Copyright 2010, Percy Wegmann
* Licensed under the LGPLv3 license
* http://www.opensource.org/licenses/lgpl-3.0.html
Parts of Speech Tagger
"""
from Lexicon import POSTAGGER_LEXICON
def is_number(s):
'''Simple ... | lgpl-3.0 | 7,371,887,207,909,501,000 | 29.387097 | 104 | 0.591295 | false | 2.626394 | false | false | false |
facebookexperimental/eden | eden/hg-server/edenscm/hgext/infinitepush/__init__.py | 1 | 13116 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2.
# Infinite push
""" store draft commits in the cloud
Configs::
[infinitepush]
# Server-side and client-side option. Pattern of the infinitepus... | gpl-2.0 | 4,742,549,794,455,033,000 | 34.069519 | 94 | 0.634568 | false | 4.114178 | false | false | false |
zstackio/zstack-woodpecker | integrationtest/vm/multihosts/volumes/paths/ceph_san_path8.py | 1 | 5935 | import zstackwoodpecker.test_state as ts_header
import zstackwoodpecker.operations.resource_operations as res_ops
import random
import os
TestAction = ts_header.TestAction
class VM(object):
def __init__(self, name=None):
self.name = name
self.cloned_name_list = [self.name + '_cloned_vm%s' % i for ... | apache-2.0 | -4,641,030,024,721,269,000 | 60.185567 | 152 | 0.533446 | false | 3.616697 | true | false | false |
vivainio/androguard | mercury/client/merc/lib/debuggable.py | 1 | 1148 | #!/usr/bin/python
#
# License: Refer to the README in the root directory
#
import argparse, shlex
from basecmd import BaseCmd
class Debuggable(BaseCmd):
def __init__(self, session):
BaseCmd.__init__(self, session)
self.prompt = "*mercury#debuggable> "
def do_back(self, _args):
"""
Re... | gpl-3.0 | -5,308,201,073,243,280,000 | 27.7 | 149 | 0.626307 | false | 4.205128 | false | false | false |
smclt30p/PCS | core/plugins/PluginMenu.py | 1 | 1947 | from PyQt5.QtCore import QObject, pyqtSlot
from PyQt5.QtCore import QSignalMapper
from PyQt5.QtCore import pyqtSignal
from PyQt5.QtWidgets import QAction
from core.plugins.PluginLoader import PluginLoader
class PluginMenu(QObject):
currRoot = None
def constructMenu(self, root):
self.currRoot = roo... | bsd-2-clause | 1,721,882,309,426,148,900 | 25.324324 | 64 | 0.616846 | false | 4.714286 | false | false | false |
lym/allura-git | ForgeSVN/forgesvn/svn_main.py | 1 | 8582 | # 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 (t... | apache-2.0 | 8,798,467,815,965,985,000 | 37.657658 | 104 | 0.612561 | false | 3.965804 | true | false | false |
XueqingLin/tensorflow | tensorflow/tensorboard/backend/server_test.py | 1 | 18758 | # Copyright 2015 The TensorFlow 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 applica... | apache-2.0 | -5,388,877,923,216,814,000 | 37.917012 | 97 | 0.625973 | false | 3.784144 | true | false | false |
radinformatics/whatisit | whatisit/apps/api/serializers.py | 1 | 1125 | from django.contrib.auth.models import User
from whatisit.apps.wordfish.models import (
Annotation,
AllowedAnnotation,
Report,
ReportCollection,
ReportSet
)
from rest_framework import serializers
class ReportSerializer(serializers.ModelSerializer):
class Meta:
model = Report
f... | mit | 860,719,285,074,145,900 | 25.162791 | 106 | 0.695111 | false | 4.293893 | false | false | false |
akvo/akvo-rsr | akvo/rsr/management/commands/a4a_optimy_import.py | 1 | 11690 | #!/usr/bin/env python3
# Akvo Reporting is covered by the GNU Affero General Public License.
# See more details in the license.txt file located at the root folder of the Akvo RSR module.
# For additional details on the GNU license please see < http://www.gnu.org/licenses/agpl.html >.
""" Import projects from Optimy f... | agpl-3.0 | 3,057,250,417,693,562,000 | 34.317221 | 97 | 0.635073 | false | 3.184418 | false | false | false |
vsemionov/boomerang | api/token.py | 1 | 1630 | from collections import OrderedDict
from rest_framework import viewsets, mixins, permissions, response
from rest_framework.authtoken.models import Token
from rest_framework.settings import api_settings as rest_settings
from rest_framework_jwt.settings import api_settings as jwt_settings
from rest_framework_jwt.authent... | mit | -8,011,112,225,322,380,000 | 30.960784 | 94 | 0.690184 | false | 4.233766 | false | false | false |
shootstar/novatest | nova/cells/state.py | 1 | 14713 | # Copyright (c) 2012 Rackspace Hosting
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless req... | apache-2.0 | -7,506,351,170,441,942,000 | 37.215584 | 78 | 0.583498 | false | 3.878988 | false | false | false |
bonyuta0204/NetDissec | src/netprobe_pytorch.py | 1 | 10545 | #!/usr/bin/env python
# Bolei added
import pdb
import torch
import torchvision
from torch.autograd import Variable as V
from torchvision import transforms as trn
import os
import numpy
import glob
import shutil
import codecs
import time
import sys
os.environ['GLOG_minloglevel'] = '2'
import caffe
from caffe.proto im... | mit | -4,024,479,165,878,248,000 | 32.906752 | 104 | 0.583215 | false | 3.922991 | false | false | false |
jonathanslenders/pyvim | pyvim/completion.py | 1 | 4439 | from __future__ import unicode_literals
from prompt_toolkit.completion import Completer, Completion
import re
import weakref
__all__ = (
'DocumentCompleter',
)
class DocumentWordsCompleter(Completer):
"""
Completer that completes on words that appear already in the open document.
"""
def get_com... | bsd-3-clause | -7,874,857,262,923,508,000 | 35.991667 | 101 | 0.590674 | false | 4.347698 | false | false | false |
anderfosca/contextbroker | code/virtualenv/broker/modules/update.py | 1 | 6420 | __author__ = 'anderson'
import xml.etree.ElementTree as ET
import sys
import re
import generic_response
import pymongo
from pymongo import MongoClient
from dateutil.parser import parse
import logging
def send_to_consumer(url, xml_string):
print "sending to: " + url + '\n' + xml_string
#r = requests.post(url, ... | gpl-2.0 | 1,476,318,394,329,219,600 | 50.36 | 124 | 0.568536 | false | 3.93865 | false | false | false |
arne-cl/discoursegraphs | src/discoursegraphs/readwrite/exmaralda.py | 1 | 19867 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Arne Neumann
"""
The ``exmaralda`` module converts a ``DiscourseDocumentGraph`` (possibly
containing multiple annotation layers) into an Exmaralda ``*.exb`` file
and vice versa.
"""
import os
import sys
from collections import defaultdict
from lxml import etree
... | bsd-3-clause | 1,024,340,223,439,078,100 | 37.353282 | 90 | 0.554236 | false | 4.077791 | false | false | false |
novapost/workalendar | workalendar/europe/russia.py | 1 | 3547 | from datetime import date
from ..core import OrthodoxCalendar, MON, daterange, cleaned_date
from ..registry_tools import iso_register
@iso_register('RU')
class Russia(OrthodoxCalendar):
'Russia'
# Civil holidays
include_labour_day = True
FIXED_HOLIDAYS = OrthodoxCalendar.FIXED_HOLIDAYS + (
(... | mit | 5,417,020,881,726,888,000 | 33.105769 | 79 | 0.50578 | false | 3.698644 | false | false | false |
dnguyen0304/clare | clare/clare/application/room_list_watcher/tests/test_scrapers.py | 1 | 1168 | # -*- coding: utf-8 -*-
import mock
from nose.tools import assert_equal
from .. import scrapers
class TestBufferingSourceAdapter(object):
def __init__(self):
self.elements = None
self.scraper = None
self.source = None
self.n = None
def setup(self):
self.elements = x... | mit | -6,742,735,069,976,354,000 | 30.567568 | 75 | 0.607021 | false | 3.560976 | false | false | false |
adammck/rapidsms-community-apps | tags/app.py | 1 | 1323 | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
import rapidsms
from models import *
class App(rapidsms.App):
def parse(self, msg):
text = msg.text
msg.tags = []
# check the contents of this message for EVERY SINGLE
# TAG that we know of. TODO: cache this for a little
... | bsd-3-clause | -7,288,373,953,676,032,000 | 31.268293 | 61 | 0.555556 | false | 4.160377 | false | false | false |
mistercrunch/panoramix | superset/dashboards/commands/importers/v0.py | 1 | 12454 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 3,782,625,302,160,400,400 | 35.521994 | 88 | 0.638028 | false | 3.748946 | false | false | false |
lino-framework/lino | lino/modlib/checkdata/choicelists.py | 1 | 5000 | # Copyright 2015-2020 Rumma & Ko Ltd
# License: GNU Affero General Public License v3 (see file COPYING for details)
from django.utils import translation
from lino.core.gfks import gfk2lookup
from lino.core.roles import SiteStaff
from django.utils.text import format_lazy
from lino.api import dd, rt, _
if False:
... | bsd-2-clause | -260,389,720,889,201,000 | 32.112583 | 82 | 0.5528 | false | 3.76506 | false | false | false |
CHBMB/LazyLibrarian | lib/fuzzywuzzy/fuzz.py | 1 | 8419 | #!/usr/bin/env python
# encoding: utf-8
"""
fuzz.py
Copyright (c) 2011 Adam Cohen
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 u... | gpl-3.0 | -7,268,800,526,245,139,000 | 30.650376 | 115 | 0.663618 | false | 3.466035 | false | false | false |
tuhuayuan/chatmind | main.py | 1 | 1130 | # -*- coding: UTF-8 -*-
import tornado.web
import tornado.httpserver
import tornado.ioloop
import wechat
from tornado.options import define, options
class Application(tornado.web.Application):
def __init__(self):
handlers = [
(r"/wechat_index", wechat.IndexHandler)
]
settings =... | mit | -8,163,191,410,808,373,000 | 26.560976 | 73 | 0.646018 | false | 3.951049 | false | false | false |
zwffff2015/stock | api/tushareApi.py | 1 | 1084 | import tushare as ts
def getOneSpecifiedPriceHistoryData(code, start, end, priceType='close'):
data = getSpecifiedPriceHistoryData(code, start, end, priceType)
# print data
for item in data:
return data[item]
def getSpecifiedPriceHistoryData(code, start, end, priceType='close'):
# print code... | mit | 638,128,801,533,022,700 | 26.1 | 77 | 0.654059 | false | 3.274924 | false | false | false |
AutorestCI/azure-sdk-for-python | azure-mgmt-compute/azure/mgmt/compute/v2017_03_30/models/disk_instance_view.py | 1 | 1509 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -3,492,721,895,791,761,000 | 37.692308 | 97 | 0.616302 | false | 4.399417 | false | false | false |
IBM-Security/ibmsecurity | ibmsecurity/isam/base/lmi.py | 1 | 2757 | import logging
import time
from ibmsecurity.appliance.ibmappliance import IBMError
logger = logging.getLogger(__name__)
def restart(isamAppliance, check_mode=False, force=False):
"""
Restart LMI
"""
if check_mode is True:
return isamAppliance.create_return_object(changed=True)
else:
... | apache-2.0 | -7,524,142,561,415,226,000 | 34.346154 | 118 | 0.654697 | false | 3.642008 | false | false | false |
avelino/pycorreios | setup.py | 1 | 1456 | from setuptools import setup
import os
DESCRIPTION = "API for Brazillian Correios in Python"
LONG_DESCRIPTION = None
try:
LONG_DESCRIPTION = open('README.md').read()
except:
pass
def get_version(version_tuple):
version = '%s.%s' % (version_tuple[0], version_tuple[1])
if version_tuple[2]:
ver... | mit | 2,467,762,093,427,377,000 | 27 | 77 | 0.64011 | false | 3.568627 | false | false | false |
kstateome/django-cas | cas/backends.py | 1 | 7139 | import logging
from xml.dom import minidom
import time
try:
from xml.etree import ElementTree
except ImportError:
from elementtree import ElementTree
try:
from urllib import urlencode
except ImportError:
from urllib.parse import urlencode
try:
from urllib import urlopen
except ImportError:
fro... | mit | -9,150,461,524,364,492,000 | 27.217391 | 118 | 0.600364 | false | 4.204358 | false | false | false |
macosforge/ccs-calendarserver | txweb2/filter/range.py | 1 | 4686 | # -*- test-case-name: txweb2.test.test_stream -*-
import os
import time
from txweb2 import http, http_headers, responsecode, stream
# Some starts at writing a response filter to handle request ranges.
class UnsatisfiableRangeRequest(Exception):
pass
def canonicalizeRange((start, end), size):
"""Return ca... | apache-2.0 | 1,989,880,107,851,133,000 | 32.71223 | 97 | 0.597525 | false | 4.334875 | false | false | false |
Brainiq7/Ananse | ananse_dl/extractor/gdcvault.py | 1 | 6407 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import (
compat_urllib_parse,
compat_urllib_request,
)
class GDCVaultIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?gdcvault\.com/play/(?P<id>\d+)/(?P<name>(\w|-)+)'
_TESTS = [
{
... | unlicense | 8,123,906,485,022,277,000 | 37.596386 | 146 | 0.524739 | false | 3.638274 | false | false | false |
Mandrilux/GOC_2017 | api/polydevs/parking/views.py | 1 | 1100 | from django.shortcuts import get_object_or_404
from rest_framework import viewsets, filters
from parking.models import Parking
from parking.serializers import ParkingSerializer, ParkingDetailSerializer
from parking.filters import FilterParking
class MultipleFieldLookupMixin(object):
def get_object(self):
... | agpl-3.0 | 6,739,548,767,564,175,000 | 35.666667 | 91 | 0.7 | false | 4.089219 | false | false | false |
meltwater/proxymatic | src/proxymatic/discovery/registrator.py | 1 | 2745 | import logging
import json
import socket
import traceback
import urllib2
from urlparse import urlparse
from proxymatic.services import Server, Service
from proxymatic import util
class RegistratorEtcdDiscovery(object):
def __init__(self, backend, url):
self._backend = backend
self._url = urlparse(u... | mit | -343,665,641,712,587,600 | 39.970149 | 135 | 0.55592 | false | 4.302508 | false | false | false |
CumulusNetworks/pyjeet | pyjeet/logcontainer.py | 1 | 5027 | #
# Copyright 2014 Cumulus Networks, Inc. All rights reserved.
# Author: Alexandre Renard <arenardvv@gmail.com>
#
# pyjeet --
# the distributed log analysis tool for networking troubleshooting.
#
from abc import ABCMeta, abstractmethod
from file import *
from network_obj import *
class LogContainer:
__metaclass_... | gpl-2.0 | 6,239,281,146,889,183,000 | 38.273438 | 120 | 0.600955 | false | 4.256562 | false | false | false |
yarray/md2pdf | compile.py | 1 | 2492 | #! /usr/bin/env python
'''
compiler from markdown file to pdf using wkhtmltopdf
Usage:
compile.py [--script FILE] [--style FILE]
[--pdf-options STRING] [--toc] <input> [<output>]
compile.py (-h | --help)
Options:
-h --help Show help screen
--script FILE Script re... | mit | 2,322,206,154,730,118,000 | 27 | 72 | 0.570225 | false | 3.534752 | false | false | false |
scorpionis/docklet | src/slot_scheduler.py | 1 | 10313 | # coding=UTF-8
#!/usr/bin/python3
# -*- coding: UTF-8 -*-
import math
import random
import numpy as np
from mdkp import Colony
from machine import AllocationOfMachine
import heapq
from connection import *
import time
import _thread
import logging
import json
import jsonpickle
from log import slogger
#import log
mac... | bsd-3-clause | -4,433,797,019,322,345,000 | 27.312155 | 111 | 0.602205 | false | 3.417472 | true | false | false |
nicostephan/pypuf | pypuf/simulation/arbiter_based/ltfarray.py | 1 | 15968 | from numpy import prod, shape, sign, dot, array, tile, transpose, concatenate, dstack, swapaxes, sqrt, amax, vectorize
from numpy.random import RandomState
from pypuf import tools
from pypuf.simulation.base import Simulation
class LTFArray(Simulation):
"""
Class that simulates k LTFs with n bits and a constan... | gpl-3.0 | -530,663,471,708,576,300 | 33.633406 | 145 | 0.500626 | false | 3.812321 | false | false | false |
arowser/wireshark-xcoin | tools/wireshark_gen.py | 1 | 95941 | # -*- python -*-
#
# wireshark_gen.py (part of idl2wrs)
#
# Author : Frank Singleton (frank.singleton@ericsson.com)
#
# Copyright (C) 2001 Frank Singleton, Ericsson Inc.
#
# This file is a backend to "omniidl", used to generate "Wireshark"
# dissectors from CORBA IDL descriptions. The output language generated
# ... | gpl-2.0 | 8,077,415,331,128,886,000 | 31.867763 | 223 | 0.592677 | false | 3.365524 | false | false | false |
ngageoint/scale | scale/storage/migrations/0008_auto_20170609_1443.py | 1 | 1859 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-06-09 14:43
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('batch', '0002_auto_20170412_1225'),
('recipe', '001... | apache-2.0 | -3,557,771,446,890,161,700 | 34.075472 | 128 | 0.586337 | false | 4.032538 | false | false | false |
dganbold/reinforcement_learning | NeuralQLearning/cartpole_learn.py | 1 | 3105 | #
#
import gym
from NeuralQLearner import *
#
#
if __name__ == "__main__":
# ----------------------------------------
# Define parameters for greedy policy
epsilon = 0.5 # exploration
epsilon_floor = 0.1
exploration_decay = 0.998
# Define parameters for Q-learning
alpha = 0.2
gamma = 0... | mit | -7,300,266,675,279,254,000 | 30.683673 | 115 | 0.498229 | false | 3.900754 | false | false | false |
ondrejch/FSM | scripts/mk1/writecore.py | 1 | 1343 | #!/usr/bin/env python3
#
# Write the FastDrum Serpent deck
# Ondrej Chvala, ochvala@utk.edu
# 2016-08-02
import drumdeck
import os
import argparse
# Serpent deck file name
filename = "ffrr.inp"
dirname = "./"
# Command line argument
parser = argparse.ArgumentParser(description='Writes Serpent2 input deck of the F... | gpl-3.0 | -5,168,715,324,540,304,000 | 27.574468 | 108 | 0.647803 | false | 3.045351 | false | false | false |
pitunti/alfaPitunti | mediaserver/platformcode/controllers/html.py | 1 | 33340 | # -*- coding: utf-8 -*-
# ------------------------------------------------------------
# Controlador para HTML
# ------------------------------------------------------------
import json
import os
import re
import threading
import time
import channelselector
from controller import Controller
from controller import Plat... | gpl-3.0 | -5,294,933,708,679,458,000 | 40.85804 | 125 | 0.526156 | false | 4.03622 | true | false | false |
canihavesomecoffee/sample-platform | tests/test_regression/TestControllers.py | 1 | 26178 | from unittest import mock
from flask import g
from sqlalchemy import and_
from werkzeug.exceptions import NotFound
from mod_auth.models import Role
from mod_customized.models import CustomizedTest
from mod_regression.models import (Category, InputType, OutputType,
RegressionTest, Re... | isc | 886,495,612,370,523,300 | 42.557404 | 118 | 0.596226 | false | 3.937133 | true | false | false |
bmars/sisko | sisko/utils.py | 1 | 2204 | # Copyright (C) 2014 Brian Marshall
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in... | gpl-3.0 | -8,794,476,572,636,623,000 | 35.733333 | 79 | 0.648367 | false | 3.630972 | false | false | false |
mtbarta/neural-tagger | src/models/dconv3Experiments/skipconn.py | 1 | 21980 | #!/usr/bin/python
# -*- coding: utf8
import tensorflow as tf
import numpy as np
from src.util.tf import tensorToSeq, seqToTensor, revlut
import math
from google.protobuf import text_format
from tensorflow.python.platform import gfile
import json
import os
from collections import defaultdict
import src.models.tf_utils ... | gpl-3.0 | 1,162,317,117,842,288,600 | 41.514507 | 182 | 0.553321 | false | 3.554334 | false | false | false |
nlevitt/brozzler | vagrant/vagrant-brozzler-new-site.py | 1 | 3061 | #!/usr/bin/env python
'''
vagrant-brozzler-new-site.py - runs brozzler-new-site inside the vagrant vm to
queue a site for your vagrant brozzler deployment.
Fills in the --proxy option automatically. Some other options are passed
through.
This is a standalone script with no dependencies other than python, and should
w... | apache-2.0 | -5,619,217,285,461,164,000 | 34.593023 | 79 | 0.656648 | false | 3.705811 | false | false | false |
jacor-/TuentiChallenge5 | problem16/snippet.py | 1 | 3091 | """
To solve this problem we have used the software
The Full Whiskas Model example in the package PuLP for python.
I have no clue about linear optimization... so this package has been intinitely
helpful. The code do not require much explanation and there is no much time
remaining in the contest... so I wont comment a... | mit | 1,703,887,847,516,692,000 | 38.126582 | 219 | 0.650922 | false | 2.99806 | false | false | false |
kdrone/crazyflie-python-client | build/lib.linux-i686-2.7/cfclient/ui/main.py | 1 | 21200 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# || ____ _ __
# +------+ / __ )(_) /_______________ _____ ___
# | 0xBC | / __ / / __/ ___/ ___/ __ `/_ / / _ \
# +------+ / /_/ / / /_/ /__/ / / /_/ / / /_/ __/
# || || /_____/_/\__/\___/_/ \__,_/ /___/\___/
#
# Copyright (C) 20... | gpl-2.0 | 9,170,019,072,597,132,000 | 40.48728 | 89 | 0.614717 | false | 4.073007 | true | false | false |
Joev-/HoNCore | honcore/lib/construct/adapters.py | 1 | 15909 | from core import Adapter, AdaptationError, Pass
from lib import int_to_bin, bin_to_int, swap_bytes, StringIO
from lib import FlagsContainer, HexString
#===============================================================================
# exceptions
#========================================================================... | unlicense | -5,460,892,987,634,537,000 | 32.006224 | 80 | 0.587466 | false | 4.125778 | false | false | false |
gamda/checkers | checkers/model.py | 1 | 14118 | # Copyright (c) 2015 Gamda Software, LLC
#
# See the file LICENSE.txt for copying permission.
from enum import Enum
from gameboard.gameboard import Gameboard
from gameboard.gameboard import Direction
from gameboard.coordinate import Coordinate
class Chip:
class Color(Enum):
white = True
black = Fa... | mit | -4,265,342,469,476,370,000 | 39.107955 | 79 | 0.555461 | false | 4.326693 | false | false | false |
chiffa/PolyPharma | bioflow/molecular_network/interactome_analysis.py | 1 | 22116 | """
New analytical routines for the interactome
"""
import pickle
from collections import namedtuple
from csv import reader
from csv import writer as csv_writer
from multiprocessing import Pool
from collections import defaultdict
import traceback
from pprint import pprint
import os
import psutil
from typing import Any,... | bsd-3-clause | 3,543,690,738,254,189,000 | 40.261194 | 128 | 0.614532 | false | 3.810476 | false | false | false |
mbylstra/django-wham | wham/fields.py | 1 | 3400 | from django.db import models
# the following will be required if we want to support south
# ----------------------------------------------------------------
# from south.modelsinspector import add_introspection_rules
#
# add_introspection_rules([], [
# "^wham\.models\.WhamCharField",
# "^wham\.models\.WhamText... | mit | 8,305,047,103,216,442,000 | 29.088496 | 73 | 0.631765 | false | 3.530633 | false | false | false |
wakiyamap/electrum-mona | electrum_mona/gui/qt/password_dialog.py | 1 | 11128 | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2013 ecdsa@github
#
# 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 li... | mit | 7,213,216,465,206,087,000 | 33.993711 | 118 | 0.604421 | false | 3.961552 | false | false | false |
ntthuy11/CodeFights | Arcade/04_Python/01_MeetPython/mexFunction.py | 1 | 1362 | # You've just started to study impartial games, and came across an interesting theory. The theory is quite complicated, but
# it can be narrowed down to the following statements: solutions to all such games can be found with the mex function.
# Mex is an abbreviation of minimum excludant: for the given set s it fin... | mit | -4,172,678,401,009,438,700 | 45.965517 | 124 | 0.690896 | false | 3.556136 | false | false | false |
flower-pot/xf-indicator | xf_indicator/build_status.py | 1 | 2244 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
### BEGIN LICENSE
# Copyright (C) 2014 Frederic Branczyk fbranczyk@gmail.com
# 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 ... | mit | 7,255,914,806,074,165,000 | 37.033898 | 79 | 0.666667 | false | 4.290631 | false | false | false |
rasmusprentow/mvln | mvln/test/test_converter.py | 1 | 1427 | #converter_test.py
import sys
sys.path.insert(0,"..")
sys.path.insert(0,"mvln")
from mvln import *
import unittest, os, shutil
testfolder = os.getcwd()+ "/__tmptest__/src/testfolder/"
testfolder_dest = os.getcwd()+"/__tmptest__/dst/testfolder/"
testfolder2 = os.getcwd()+ "/__tmptest__/src/testfolder2/"
testfold... | gpl-2.0 | 1,918,018,458,159,021,300 | 22.8 | 75 | 0.662228 | false | 2.854 | true | false | false |
ddico/odoo | addons/project_timesheet_holidays/models/hr_holidays.py | 2 | 5160 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models, _
from odoo.exceptions import ValidationError
class HolidaysType(models.Model):
_inherit = "hr.leave.type"
def _default_project_id(self):
company = self.company_id... | agpl-3.0 | 7,238,839,353,363,624,000 | 48.142857 | 239 | 0.645736 | false | 3.836431 | false | false | false |
MycroftAI/adapt | adapt/expander.py | 1 | 10830 | # Copyright 2018 Mycroft AI Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | apache-2.0 | 3,364,695,214,877,201,400 | 34.048544 | 141 | 0.574515 | false | 4.0577 | false | false | false |
LegionXI/pydarkstar | scrub.py | 1 | 5707 | """
Create item database.
"""
import logging
import os
import re
import pydarkstar.logutils
import pydarkstar.scrubbing.ffxiah
import pydarkstar.itemlist
import pydarkstar.options
import pydarkstar.common
class Options(pydarkstar.options.Options):
"""
Reads options from config file, then from command line.
... | mit | -6,963,018,258,926,190,000 | 31.061798 | 117 | 0.574908 | false | 3.914266 | false | false | false |
RickyCook/AliasKeepr | aliaskeepr.py | 1 | 2237 | #!/usr/bin/env python
import argparse
import os
import re
import shutil
import sys
from ConfigParser import SafeConfigParser
PARSER = argparse.ArgumentParser(description="Import some aliases")
PARSER.add_argument('profile', help="Profile to output config for")
PARSER.add_argument('-c', '--config',
... | mit | -4,410,401,499,480,091,600 | 25.630952 | 83 | 0.621815 | false | 3.415267 | true | false | false |
michaelimfeld/notipy-server | notipyserver/backends/telegram/userregistration.py | 1 | 1411 | """
`notipyserver` - User-Notification-Framework server
Provides a telegram handler function
for user registration.
:copyright: (c) by Michael Imfeld
:license: MIT, see LICENSE for details
"""
import telegram
from .usermanager import add_user, add_group
def register(bot, update):
"""
Saves the telegram use... | mit | -8,052,298,776,417,543,000 | 27.16 | 73 | 0.653409 | false | 3.846995 | false | false | false |
tracon/dragontail | site_specific/tracon2016/management/commands/setup_tracon2016.py | 1 | 6630 | # encoding: utf-8
from __future__ import print_function, unicode_literals
from datetime import datetime, timedelta, date
from django.core.files import File
from django.core.management import call_command
from django.core.management.base import BaseCommand
from django.utils.timezone import now
from wagtail.wagtailco... | mit | 6,052,349,529,121,051,000 | 33.581152 | 132 | 0.521575 | false | 3.931548 | false | false | false |
mdoucet/reflectivity_ui | test/notebooks/event_reduction.py | 1 | 18262 | import sys
import time
import multiprocessing
import mantid.simpleapi as api
import numpy as np
from reflectivity_ui.interfaces.data_handling import instrument
def load_data(run="REF_M_30769"):
if run.startswith("/SNS"):
filepath = run
else:
filepath = '/SNS/REF_M/IPTS-21391/nexus/' + run + ... | apache-2.0 | -5,111,205,279,837,215,000 | 41.078341 | 143 | 0.544464 | false | 3.166638 | false | false | false |
hajicj/safire | scripts/profile-training.py | 1 | 3750 | #!/usr/bin/env python
"""Testing script for the loader-setup-learner scenario. Runs a miniature
experiment."""
import argparse
import cProfile
import logging
import os
import pstats
import StringIO
from gensim import corpora
from safire.data.loaders import MultimodalDatasetLoader
from safire.learning.models.logistic_... | gpl-3.0 | 4,754,184,727,170,040,000 | 30.25 | 80 | 0.623467 | false | 4.067245 | false | false | false |
peter17/pijnu | test/timer.py | 1 | 1850 | # -*- coding: utf8 -*-
from __future__ import print_function
'''
Copyright 2009 Denis Derman <denis.spir@gmail.com> (former developer)
Copyright 2011-2012 Peter Potrowl <peter017@gmail.com> (current developer)
This file is part of Pijnu.
Pijnu is free software: you can redistribute it and/or modify it
under the term... | gpl-3.0 | 4,233,844,960,566,852,600 | 26.61194 | 74 | 0.603243 | false | 3.357532 | false | false | false |
AlexanderSk/fail2ban | fail2ban/server/jail.py | 1 | 6789 | # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: t -*-
# vi: set ft=python sts=4 ts=4 sw=4 noet :
# This file is part of Fail2Ban.
#
# Fail2Ban 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;... | gpl-2.0 | 600,484,904,292,077,600 | 28.262931 | 98 | 0.689645 | false | 3.263942 | false | false | false |
cprov/snapcraft | snapcraft/internal/elf.py | 2 | 26365 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2016-2018 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in ... | gpl-3.0 | 5,716,842,983,401,830,000 | 36.935252 | 88 | 0.573943 | false | 3.975422 | false | false | false |
smoitra87/gerbil | deepnet/impute.py | 1 | 24315 | """Computes partition function for RBM-like models using Annealed Importance Sampling."""
import numpy as np
from deepnet import dbm
from deepnet import util
from deepnet import trainer as tr
from choose_matrix_library import *
import sys
import numpy as np
import pdb
import time
import itertools
import matplotlib.pypl... | bsd-3-clause | 1,073,403,383,934,571,500 | 37.904 | 110 | 0.618096 | false | 3.616151 | false | false | false |
rcbops/opencenter | opencenter/db/migrate_repo/versions/001_initial_data.py | 1 | 6716 | #!/usr/bin/env python
# OpenCenter(TM) is Copyright 2013 by Rackspace US, Inc.
##############################################################################
#
# OpenCenter is licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.... | apache-2.0 | 595,253,243,819,142,300 | 39.457831 | 79 | 0.570876 | false | 3.811578 | false | false | false |
smn/blinky | blinky/slack/models.py | 1 | 1402 | from __future__ import unicode_literals
import requests
from django.db import models
class SlackWebhook(models.Model):
url = models.URLField()
username = models.CharField(max_length=255, null=True, blank=True)
icon_emoji = models.CharField(max_length=255, null=True, blank=True)
channel = models.CharF... | bsd-3-clause | 4,312,822,045,934,085,600 | 31.604651 | 78 | 0.631954 | false | 3.927171 | false | false | false |
yavalvas/yav_com | build/matplotlib/lib/matplotlib/mathtext.py | 1 | 111273 | r"""
:mod:`~matplotlib.mathtext` is a module for parsing a subset of the
TeX math syntax and drawing them to a matplotlib backend.
For a tutorial of its usage see :ref:`mathtext-tutorial`. This
document is primarily concerned with implementation details.
The module uses pyparsing_ to parse the TeX expression.
.. _p... | mit | 6,743,337,852,527,449,000 | 34.235275 | 117 | 0.521474 | false | 3.82342 | false | false | false |
arnavd96/Cinemiezer | myvenv/lib/python3.4/site-packages/music21/demos/trecento/largestAmbitus.py | 1 | 2001 | # -*- coding: utf-8 -*-
#-------------------------------------------------------------------------------
# Name: demos/trecento/largestAmbitus.py
# Purpose: find Trecento/ars nova pieces with large ambitus
#
# Authors: Michael Scott Cuthbert
#
# Copyright: Copyright © 2012 Michael Scott Cuth... | mit | 5,355,574,308,488,821,000 | 37.215686 | 80 | 0.5285 | false | 4.081633 | false | false | false |
zhengjue/mytornado | study/2/filecmp/simple2.py | 1 | 1828 | #!/usr/bin/env python
import os, sys
import filecmp
import re
import shutil
holderlist=[]
def compareme(dir1, dir2):
dircomp=filecmp.dircmp(dir1,dir2)
only_in_one=dircomp.left_only
diff_in_one=dircomp.diff_files
dirpath=os.path.abspath(dir1)
[holderlist.append(os.path.abspath( os.path.join(dir1,x)... | gpl-3.0 | 5,692,140,856,921,574,000 | 28.015873 | 85 | 0.622538 | false | 3.190227 | false | false | false |
cjlee112/socraticqs2 | mysite/pages/migrations/0008_listplugin.py | 1 | 1139 | from django.db import models, migrations
import djangocms_text_ckeditor.fields
class Migration(migrations.Migration):
dependencies = [
('cms', '0012_auto_20150607_2207'),
('pages', '0007_activelearningratesplugin'),
]
operations = [
migrations.CreateModel(
name='ListP... | apache-2.0 | 4,625,556,113,305,008,000 | 39.678571 | 174 | 0.592625 | false | 4.082437 | false | false | false |
Macainian/BaseDjangoProject | website/apps/search_filter_sort/views/class_based/BaseBrowseView.py | 1 | 10170 | import operator
import logging
from functools import reduce
from django.db.models import Q
from django.views.generic import ListView
from django.conf import settings
from website.apps.search_filter_sort.utils.misc import class_strings_to_class, convert_age_to_date
from website.mixins import LoginRequiredMixin
logg... | mit | -8,668,220,080,105,243,000 | 37.669202 | 158 | 0.550147 | false | 4.010252 | false | false | false |
luzhijun/Optimization | cma-es/batchcompute_python_sdk/vp/testWork.py | 1 | 1368 | #!usr/bin/env python
#encoding: utf-8
import os
import sys
import config as cfg
from math import sqrt
from simple_oss import SimpleOss
import json
TASK_ID = os.environ.get('ALI_DIKU_TASK_ID')
INSTANCE_COUNT = int(os.environ.get('INSTANCE_COUNT'))
INSTANCE_ID = int(os.environ.get('ALI_DIKU_INSTANCE_ID'))
OSS_HOST = os.... | apache-2.0 | -6,602,918,301,452,156,000 | 26.938776 | 85 | 0.647661 | false | 2.774848 | false | false | false |
boreq/archive_chan | archive_chan/management/commands/archive_chan_update.py | 1 | 2562 | import datetime, sys
from optparse import make_option
from django.core.management.base import BaseCommand, CommandError
from django.utils.timezone import utc
from tendo import singleton
from archive_chan.models import Board, Update
from archive_chan.lib.scraper import BoardScraper
from archive_chan.settings import A... | gpl-2.0 | -655,112,818,715,229,200 | 32.272727 | 137 | 0.559329 | false | 4.726937 | false | false | false |
maxogden/Locker | Connectors/XMPP/webservice.py | 1 | 2723 | import sys
import json
import logging
from flask import Flask, render_template, request, redirect, url_for
sys.path.append("../../Common/python")
import lockerfs
import client
import util
app = Flask(__name__)
@app.route("/setupAuth")
def setupAuth():
return render_template("setupAuth.html")
@app.route("/save"... | bsd-3-clause | -8,044,905,973,466,973,000 | 28.597826 | 118 | 0.632758 | false | 3.621011 | false | false | false |
doingmathwithpython/code | chapter3/solutions/stats.py | 1 | 1385 | '''
stats.py
Python module with functions for calculating common statistical measures
'''
from collections import Counter
def mean(numbers):
s = sum(numbers)
N = len(numbers)
mean = s/N
return mean
def median(numbers):
# find the numnber of items
N = len(numbers)
# sort the list in asc... | mit | 209,777,365,508,709,760 | 20.640625 | 72 | 0.59278 | false | 3.524173 | false | false | false |
jejimenez/invetronic | templated_docs_adecuated/templatetags/templated_docs_tags.py | 1 | 2274 | # --coding: utf8--
import os.path
from django.db.models.fields.files import ImageFieldFile
from django.utils.safestring import mark_safe
from django.utils.html import escape
from django import template
register = template.Library()
PIXEL_TO_CM = 0.00846666
class ImageNode(template.Node):
def __init__(self, val... | mit | 3,747,650,145,073,412,600 | 31.956522 | 77 | 0.583553 | false | 3.880546 | false | false | false |
haxandsnax/AnkhUtils | AnkhUtils/__init__.py | 1 | 4831 | import json
import os
import codecs
import math
#---------------------------------------
# inject decorator inserts the Utils object so it can be
# used directly in your Execute, Init functions etc.
#---------------------------------------
def inject(util):
def injectfn(fn):
def wrapped(*args, **kwargs):
u... | mit | 618,498,824,165,726,100 | 35.598485 | 107 | 0.634651 | false | 3.707598 | false | false | false |
hjweide/cifar-10-uncertainty | iter_funcs.py | 1 | 2875 | import lasagne
import theano
import theano.tensor as T
from lasagne import layers
from lasagne.regularization import regularize_network_params, l2
def create_iter_funcs_train(l_out, lr, mntm, wd):
X = T.tensor4('X')
y = T.ivector('y')
X_batch = T.tensor4('X_batch')
y_batch = T.ivector('y_batch')
... | mit | 9,025,105,275,118,694,000 | 26.644231 | 77 | 0.582609 | false | 3.029505 | false | false | false |
EDUlib/edx-ora2 | openassessment/assessment/migrations/0023_assign_criteria_and_option_labels.py | 1 | 14308 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
class Migration(DataMigration):
def forwards(self, orm):
"""
Default the criterion and option labels to the same value as "name".
"""
for criterion in orm... | agpl-3.0 | 5,719,073,179,449,297,000 | 79.836158 | 217 | 0.563042 | false | 3.695248 | false | false | false |
npapier/sbf | pak/mkdb/cityhash.py | 1 | 3317 | # SConsBuildFramework - Copyright (C) 2013, Nicolas Papier.
# Distributed under the terms of the GNU General Public License (GPL)
# as published by the Free Software Foundation.
# Author Guillaume Brocker
#
# http://code.google.com/p/cityhash/
import os
import re
import shutil
import subprocess
# Version ... | gpl-3.0 | 2,374,909,519,164,992,500 | 29.292453 | 139 | 0.669279 | false | 3.180249 | false | false | false |
desihub/qlf | backend/framework/qlf/dashboard/bokeh/qaskypeak/main.py | 1 | 6438 | from bokeh.layouts import row, column
from bokeh.models import HoverTool, ColumnDataSource, Span
from bokeh.models import LinearColorMapper
from bokeh.models import TapTool, OpenURL, Range1d
from bokeh.models.widgets import Div
from qlf_models import QLFModels
from dashboard.bokeh.helper import sort_obj
from dashboard... | bsd-3-clause | -3,194,120,361,751,438,300 | 35.168539 | 103 | 0.517552 | false | 3.592634 | false | false | false |
lmazuel/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2015_06_15/models/bgp_settings.py | 1 | 1394 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -7,371,447,792,608,689,000 | 35.684211 | 76 | 0.586083 | false | 4.076023 | false | false | false |
Spoken-tutorial/spoken-website | creation/migrations/0001_initial.py | 1 | 29727 | # -*- coding: utf-8 -*-
# Third Party Stuff
from django.conf import settings
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
... | gpl-3.0 | 8,895,247,861,478,283,000 | 44.040909 | 135 | 0.552192 | false | 4.713334 | false | false | false |
sh01/taf | setup.py | 1 | 1102 | #!/usr/bin/env python3
#Copyright 20015 Sebastian Hagen
# This file is part of taf.
# taf 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 Software Foundation
#
# taf is distributed in the hope that it will be useful,
# ... | gpl-2.0 | -1,341,954,545,255,813,000 | 29.611111 | 71 | 0.715064 | false | 3.339394 | false | false | false |
jeremiedecock/snippets | python/pyqt/pyqt5/widget_QTableView_delegate_on_edit_using_dateedit_widget.py | 1 | 4596 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Ref:
# - http://doc.qt.io/qt-5/modelview.html#3-4-delegates
# - http://doc.qt.io/qt-5/model-view-programming.html#delegate-classes
# - http://doc.qt.io/qt-5/qabstractitemdelegate.html#details
# - http://doc.qt.io/qt-5/qitemdelegate.html#details
# - http://doc.qt.io/qt-5... | mit | 1,544,970,414,205,038,800 | 34.353846 | 139 | 0.625762 | false | 3.718447 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.