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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e0ne/python-brickagentclient | brickclient/utils.py | 1 | 9615 | # Copyright (c) 2013 OpenStack Foundation
# 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 ... | apache-2.0 | 8,105,161,997,605,742,000 | 29.33123 | 79 | 0.608632 | false | 3.892713 | false | false | false |
chicagopython/CodingWorkshops | problems/webdev/django_pn_tracker/django_pn_tracker/apps/challenges/models.py | 1 | 1614 | from django.db import models
from django.core.validators import MaxValueValidator, MinValueValidator
class DateModelBase(models.Model):
# Learn about model fields:
# https://docs.djangoproject.com/en/2.1/ref/models/fields/
created_date = models.DateTimeField(auto_now_add=True)
modified_date = models.D... | gpl-3.0 | 1,866,094,032,312,084,000 | 30.038462 | 87 | 0.627014 | false | 3.753488 | false | false | false |
MDAnalysis/mdanalysis | package/MDAnalysis/analysis/encore/dimensionality_reduction/reduce_dimensionality.py | 1 | 9928 | # -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4
#
# MDAnalysis --- https://www.mdanalysis.org
# Copyright (c) 2006-2017 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#
# Released under t... | gpl-2.0 | 4,101,917,889,993,468,400 | 40.714286 | 118 | 0.641821 | false | 4.527132 | false | false | false |
petertodd/replace-by-fee-tools | doublespend.py | 1 | 7977 | #!/usr/bin/python3
# Copyright (C) 2014 Peter Todd <pete@petertodd.org>
#
# This file is subject to the license terms in the LICENSE file found in the
# top-level directory of this distribution.
import argparse
import binascii
import bitcoin
import bitcoin.rpc
import logging
import math
import time
from bitcoin.core ... | gpl-3.0 | 4,352,845,094,395,134,500 | 35.095023 | 114 | 0.638084 | false | 3.35309 | false | false | false |
NICTA/dora | dora/active_sampling/delaunay_sampler.py | 1 | 4870 | """
Delaunay Sampler Module.
Provides the Delaunay Sampler Class which contains the strategies for
active sampling a spatial field
"""
from dora.active_sampling.base_sampler import Sampler, grid_sample
import numpy as np
from scipy.spatial import Delaunay as ScipyDelaunay
class Delaunay(Sampler):
"""
Delau... | apache-2.0 | 7,414,854,526,939,649,000 | 31.251656 | 78 | 0.582957 | false | 4.27193 | false | false | false |
pixyj/feel | django-server/feel/quiz/models.py | 1 | 5024 | import uuid
from django.db import models
from django.contrib.auth.models import User
#from taggit.managers import TaggableManager
from core.models import TimestampedModel, UUIDModel
QUIZ_TYPES = (
(1, 'SHORT_ANSWER'),
(2, 'MCQ'),
)
class Quiz(TimestampedModel, UUIDModel):
question_input = models.Text... | mit | 928,146,742,306,599,200 | 30.597484 | 120 | 0.627389 | false | 3.72424 | false | false | false |
windelbouwman/ppci-mirror | ppci/codegen/peephole.py | 1 | 1950 | """ Peephole optimization using the pipe-filter approach.
We face a certain stream of instructions. We take a look
at a very specific window and check if we can apply the
optimization. It's like scrolling over a sequence of
instructions and checking for possible optimizations.
"""
import logging
from ..binutils.outs... | bsd-2-clause | -6,551,982,787,213,748,000 | 29 | 68 | 0.597949 | false | 4.105263 | false | false | false |
drvinceknight/Nashpy | tests/unit/test_game.py | 1 | 20748 | """
Tests for the game class
"""
import unittest
import warnings
import numpy as np
from hypothesis import given
from hypothesis.extra.numpy import arrays
from hypothesis.strategies import integers
import pytest
import nashpy as nash
import nashpy.learning
class TestGame(unittest.TestCase):
"""
Tests for t... | mit | -1,008,487,849,415,531,000 | 38.747126 | 88 | 0.529304 | false | 3.288635 | true | false | false |
ksmit799/Toontown-Source | toontown/minigame/DistributedVineGameAI.py | 1 | 12010 | from DistributedMinigameAI import *
from direct.fsm import ClassicFSM, State
from direct.fsm import State
import VineGameGlobals
class DistributedVineGameAI(DistributedMinigameAI):
def __init__(self, air, minigameId):
try:
self.DistributedVineGameAI_initialized
except:
self... | mit | 129,006,357,430,881,300 | 36.53125 | 156 | 0.599334 | false | 3.596885 | false | false | false |
apache/airflow | airflow/migrations/versions/a13f7613ad25_resource_based_permissions_for_default_.py | 2 | 6614 | #
# 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... | apache-2.0 | -5,911,693,047,287,280,000 | 37.453488 | 107 | 0.666919 | false | 3.728298 | false | false | false |
chrishan/django-project-template | dataapp/blogpost_serializers.py | 1 | 1521 | from rest_framework import generics, permissions
from rest_framework import serializers
from django.contrib.auth.models import User
from .models import Post, Photo
class UserSerializer(serializers.ModelSerializer):
posts = serializers.HyperlinkedIdentityField('posts', view_name='userpost-list', lookup_field='user... | mit | -6,917,684,802,243,342,000 | 39.026316 | 201 | 0.7357 | false | 4.447368 | false | false | false |
TobiasNils/python-seabreeze | seabreeze/backends.py | 1 | 1377 | import warnings
__SEABREEZE_BACKEND = 'cseabreeze'
def use(backend):
if not backend in ['cseabreeze', 'pyseabreeze']:
raise Exception('Choose backend from "cseabreeze", "pyseabreeze"')
else:
global __SEABREEZE_BACKEND
__SEABREEZE_BACKEND = backend
def get_backend():
global __SEABR... | mit | -5,217,053,979,855,818,000 | 27.6875 | 93 | 0.608569 | false | 3.224824 | false | false | false |
Mikescher/Project-Euler_Befunge | compiled/Python2/Euler_Problem-074.py | 1 | 14739 | #!/usr/bin/env python2
# transpiled with BefunCompile v1.3.0 (c) 2017
import sys
import zlib, base64
_g = ("Ah+LCAAAAAAABADtmVc4nG/378eM3vuI3oIUDBmjRY/eJaL3SHRGLzEE0UWCJKJEjQhiCBGd0aJGDZMYwahRRtTBGLZf+R+8Z/vk3de1r73vk/u71vo833U/1zpcfCmU"
+ "gL8OKWAbM59ivxbUuxvlKvhD3K3C+tanWiVKJkibLzKHRuD1K34xKraiw5eZHW1CNz5pT5yFjsp7... | mit | -955,803,232,584,580,700 | 45.349057 | 136 | 0.785739 | false | 1.510608 | false | false | false |
umayrh/sketchy-polytopes | python/evolvingdag/src/evolvingdag/random_dag.py | 1 | 8463 | from networkx import DiGraph
from networkx.algorithms.dag import descendants
class LongitudinalRandomDag:
"""This class represents a hierarchical time series of RandomDag objects.
Each node in the hierarchy represents a time rollup. The top level is
'year', the second-lowest level 'hour', and each event ... | gpl-3.0 | -2,641,781,298,630,678,500 | 37.821101 | 77 | 0.590689 | false | 4.257042 | false | false | false |
games-useaible/Useaible-machine-learning-challenge | PythonCode/Lunarlander.py | 1 | 15973 | import numpy as np
import tempfile
import tensorflow as tf
import math
import json
import random
import puka
import pika
import thread
import time
from simulator import LanderSimulator
from mazeGame import mazeSimulator
credentials = pika.PlainCredentials('test', 'test')
parameters = pika.ConnectionPar... | gpl-3.0 | 1,451,919,710,287,650,000 | 35.064965 | 162 | 0.517248 | false | 3.999249 | false | false | false |
artoonie/RedStatesBlueStates | redblue/viewsenators/initialization.py | 1 | 6633 | import os
import requests
import viewsenators.cityToFbCode as cityToFbCode
import viewsenators.stateToFbCode as stateToFbCode
from .models import Party, City, State, Senator, Congressmember, ContactList
from .getPopulations import getCityStatePopulations
def populateParties(partyModel, partyObjects):
""" Takes in ... | gpl-3.0 | -1,083,945,771,229,619,600 | 37.12069 | 88 | 0.602744 | false | 4.211429 | false | false | false |
hxa7241/minilight-python | spatialindex.py | 1 | 5023 | # MiniLight Python : minimal global illumination renderer
#
# Harrison Ainsworth / HXA7241 and Juraj Sukop : 2007-2008, 2013.
# http://www.hxa.name/minilight
from triangle import Triangle, TOLERANCE
from vector3f import Vector3f, MAX
MAX_LEVELS = 44
MAX_ITEMS = 8
class SpatialIndex(object):
def __init__(s... | cc0-1.0 | 350,039,534,897,055,550 | 43.848214 | 80 | 0.430221 | false | 3.811077 | false | false | false |
g3-3k/libreant | presets/test/test_preset_paths.py | 1 | 2747 | '''
Collection of tests to verify preset paths loading
'''
from nose.tools import raises, eq_
from tempfile import NamedTemporaryFile, mkdtemp
from shutil import rmtree
from presets.presetManager import PresetException
import json
import os
from presets.presetManager import PresetManager
minimalBody = { "id": "id_te... | agpl-3.0 | -2,373,727,523,293,859,000 | 26.19802 | 79 | 0.647252 | false | 3.370552 | true | false | false |
Spredzy/dci-ansible | modules/dci_new_job.py | 1 | 3559 | #!/usr/bin/python
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# dist... | apache-2.0 | 327,745,215,869,741,700 | 27.934959 | 96 | 0.671537 | false | 3.472195 | false | false | false |
Monithon/Monithon-2.0 | reports/models.py | 1 | 2079 |
from django.contrib.gis.db import models
from monitor.models import MonitoringTeam
from projects.models import Monitorable
from customforms.models import Form as CustomForm, FormFieldOption
from customforms.models import FormField
import json
class Report(models.Model):
author = models.ForeignKey(MonitoringTeam, re... | gpl-2.0 | 8,316,690,550,272,615,000 | 29.588235 | 170 | 0.729197 | false | 3.263736 | false | false | false |
Stanford-Legal-Tech-Design/legaltech-rapidpro | temba/orgs/migrations/0001_initial.py | 2 | 12340 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.db.models.deletion
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('locations', '0001_initial'),
migrations.swappable_dependency(settin... | agpl-3.0 | 4,294,546,665,417,596,000 | 79.12987 | 347 | 0.62812 | false | 4.073952 | false | false | false |
jlubcke/csvpp | csvpp/csvpp.py | 1 | 1221 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
import csv
from io import StringIO
from itertools import count
import sys
try:
# Python 2
from itertools import izip_longest
except ImportError:
# Python 3
from itertools import zip_longest as izip_longest
def csvpp(csv_input):
max_widths = []
ma... | mit | 8,531,353,089,939,039,000 | 26.133333 | 82 | 0.595414 | false | 3.518732 | false | false | false |
sradanov/flyingpigeon | flyingpigeon/processes/wps_analogs.py | 1 | 8822 | from datetime import datetime, date
import types
import tempfile
import tarfile
import ocgis
from ocgis import RequestDataset
import datetime as dt
import os
from flyingpigeon import analogs
from pywps.Process import WPSProcess
import logging
class AnalogsProcess(WPSProcess):
def __init__(self):
# defini... | apache-2.0 | 6,331,289,109,474,151,000 | 30.283688 | 161 | 0.584788 | false | 3.1317 | true | false | false |
openweave/openweave-wdlc | backend/lib/nwv/proto_pool.py | 1 | 11246 | #
# Copyright (c) 2019-2020 Google LLC. All Rights Reserved.
# Copyright (c) 2016-2018 Nest Labs 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
#
# ... | apache-2.0 | 3,955,473,444,588,170,000 | 29.559783 | 79 | 0.66388 | false | 3.749917 | false | false | false |
Devyani-Divs/pagure | pagure/ui/admin.py | 1 | 1932 | # -*- coding: utf-8 -*-
"""
(c) 2014 - Copyright Red Hat Inc
Authors:
Pierre-Yves Chibon <pingou@pingoured.fr>
"""
from functools import wraps
import flask
import pagure.forms
from pagure import (APP, SESSION, LOG, cla_required, authenticated,
generate_gitolite_acls, generate_authorized_k... | gpl-2.0 | 4,236,048,646,403,969,000 | 25.833333 | 73 | 0.643892 | false | 3.715385 | false | false | false |
OpenBankProject/Hello-OBP-DirectLogin-Python | props/socgen.py | 1 | 1133 | # -*- coding: utf-8 -*-
"""
Settings for the hello scripts.
You most likely need to edit a few of them, e.g. API_HOST and the OAuth
credentials.
"""
OUR_BANK = '00100'
USERNAME = '1000203893'
PASSWORD = '1000203893'
CONSUMER_KEY = 'bvldezvlnqj4mtva4jfktke4xliep0bt1xm44yxi'
CONSUMER_SECRET... | apache-2.0 | 937,335,391,788,211,300 | 28.051282 | 77 | 0.704325 | false | 2.73012 | false | false | false |
saadasad/droid | Media.py | 1 | 2157 |
def menu():
from ftplib import FTP
import os
import time
from pygame import mixer
import sched
ftp = FTP()
choice = ''
while(choice!='0'):
print('1. Music')
print('2. Take a Picture')
print('3. Text To Speech')
print('0. To Exit')
choice = input('Enter Choice : ')
if(choice == '1'):
print('All... | gpl-3.0 | -5,024,645,450,757,786,000 | 24.093023 | 112 | 0.608716 | false | 2.853175 | false | false | false |
m-tmatma/svnmailer | src/lib/svnmailer/notifier/stdout.py | 1 | 3635 | # -*- coding: utf-8 -*-
# pylint: disable-msg=W0201
# pylint-version = 0.7.0
#
# Copyright 2004-2005 André Malo or his licensors, as applicable
#
# 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... | apache-2.0 | -8,386,982,354,865,713,000 | 27.833333 | 74 | 0.600055 | false | 4.161512 | false | false | false |
subhrm/google-code-jam-solutions | solutions/2018/1B/A/a.py | 1 | 1033 | # Problem a
def solve(n, l, ip):
assert n < 30, "n should be less than 300"
s = sum(ip)
rem = n - s
pc = [round_pc(v / n) for v in ip]
res = sum(pc)
if rem == 0:
return res
extra = [round_pc(i / n) for i in range(rem + 1)]
for v, p in zip(ip, pc):
if rem == 0:
... | mit | -8,473,355,274,586,894,000 | 17.781818 | 57 | 0.411423 | false | 3.14939 | false | false | false |
Conceiva/MezzmoKodiPlugin | common.py | 1 | 2918 | import xbmc
import xbmcaddon
import inspect
import os
import sys
import socket
import re
class printDebug:
def __init__(self, main, sub=None):
self.main=main
if sub:
self.sub="."+sub
else:
self.sub=''
self.level=settings.get_debug()
... | gpl-2.0 | 3,386,496,745,631,883,000 | 29.717391 | 102 | 0.562714 | false | 3.665829 | false | false | false |
rgmining/fraudar | fraudar/export/run_greedy.py | 1 | 2152 | # FRAUDAR: Bounding Graph Fraud in the Face of Camouflage
# Authors: Bryan Hooi, Hyun Ah Song, Alex Beutel, Neil Shah, Kijung Shin, Christos Faloutsos
#
# This software is licensed under Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a c... | gpl-3.0 | 2,092,366,812,794,951,000 | 41.196078 | 97 | 0.688197 | false | 2.857902 | false | false | false |
neilLasrado/erpnext | erpnext/selling/doctype/customer/customer.py | 1 | 22478 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
import json
from frappe.model.naming import set_name_by_naming_series
from frappe import _, msgprint
import frappe.defaults
from frappe.ut... | gpl-3.0 | 6,591,446,202,118,932,000 | 36.778151 | 161 | 0.696459 | false | 3.16547 | false | false | false |
barseghyanartur/jellyfish | jellyfish/porter.py | 1 | 6796 | from .compat import _range
_s2_options = {
'a': ((['a', 't', 'i', 'o', 'n', 'a', 'l'], ['a', 't', 'e']),
(['t', 'i', 'o', 'n', 'a', 'l'], ['t', 'i', 'o', 'n'])),
'c': ((['e', 'n', 'c', 'i'], ['e', 'n', 'c', 'e']),
(['a', 'n', 'c', 'i'], ['a', 'n', 'c', 'e']),),
'e': ((['i', 'z', 'e', 'r... | bsd-3-clause | 3,301,493,035,930,167,000 | 30.174312 | 78 | 0.332254 | false | 2.896846 | false | false | false |
letouriste001/SmartForest_2.0 | python3.4Smartforest/lib/python3.4/site-packages/django/contrib/gis/utils/wkt.py | 1 | 1923 | """
Utilities for manipulating Geometry WKT.
"""
from django.utils import six
def precision_wkt(geom, prec):
"""
Returns WKT text of the geometry according to the given precision (an
integer or a string). If the precision is an integer, then the decimal
places of coordinates WKT will be truncated t... | mit | -6,554,581,251,827,143,000 | 31.59322 | 88 | 0.593344 | false | 3.515539 | false | false | false |
isard-vdi/isard | webapp/webapp/webapp/lib/isardScheduler.py | 1 | 5947 | # Copyright 2017 the Isard-vdi project authors:
# Josep Maria Viñolas Auquer
# Alberto Larraz Dalmases
# License: AGPLv3
#!/usr/bin/env python
# coding=utf-8
from decimal import Decimal
import random, queue
from threading import Thread
import time, pytz
from webapp import app
import rethinkdb as r
from flask... | agpl-3.0 | -7,317,353,115,043,151,000 | 43.373134 | 155 | 0.602254 | false | 3.55622 | false | false | false |
syscoin/syscoin2 | test/functional/feature_dersig.py | 1 | 5813 | #!/usr/bin/env python3
# Copyright (c) 2015-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test BIP66 (DER SIG).
Test that the DERSIG soft-fork activates at (regtest) height 1251.
"""
from tes... | mit | 4,134,287,112,754,569,000 | 39.65035 | 189 | 0.640289 | false | 3.439645 | true | false | false |
bspaans/bookmark-tools | btools/matching/FileMatcher.py | 1 | 6660 | import os
import subprocess
import pipes
import btools.pybookmark as pybookmark
import btools.common as common
from ConfParser import ConfParser
class FileMatcher:
def __init__(self, bookmark_file = "", rules_file = ""):
if rules_file == "":
rules_file = common.get_conf_location()
c ... | gpl-3.0 | 1,900,317,324,360,998,400 | 37.947368 | 120 | 0.508709 | false | 3.820998 | false | false | false |
tuomas2/automate | src/automate/extensions/arduino/arduino_actuators.py | 1 | 6343 | # -*- coding: utf-8 -*-
# (c) 2015 Tuomas Airaksinen
#
# This file is part of automate-arduino.
#
# automate-arduino 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 yo... | gpl-3.0 | -8,866,919,606,858,639,000 | 32.389474 | 120 | 0.621157 | false | 3.834946 | false | false | false |
rlindner81/pyload | module/plugins/hoster/QuickshareCz.py | 1 | 3533 | # -*- coding: utf-8 -*-
import re
from module.plugins.internal.SimpleHoster import SimpleHoster
class QuickshareCz(SimpleHoster):
__name__ = "QuickshareCz"
__type__ = "hoster"
__version__ = "0.61"
__status__ = "testing"
__pattern__ = r'http://(?:[^/]*\.)?quickshare\.cz/stahnout-soubor/.+'
_... | gpl-3.0 | 3,966,324,045,635,866,600 | 36.978495 | 103 | 0.519253 | false | 3.419167 | false | false | false |
abec/getabe.com | DjangoSite/apps/flashcards/api.py | 1 | 1367 | import logging
from rest_framework.generics import GenericAPIView, ListCreateAPIView
from rest_framework.response import Response
from .models import FlashCard
from .serializers import FlashCardSerializer
LOG = logging.getLogger(__name__)
class ListAddFlashCards(ListCreateAPIView):
model = FlashCard
serialize... | mit | -1,976,269,114,206,792,000 | 24.314815 | 89 | 0.694952 | false | 3.616402 | false | false | false |
kdwink/intellij-community | python/helpers/rest_formatter.py | 1 | 11961 | import re
import sys
from docutils import nodes
from docutils.core import publish_string
from docutils.frontend import OptionParser
from docutils.nodes import Text, field_body, field_name, rubric
from docutils.parsers.rst import directives
from docutils.parsers.rst.directives.admonitions import BaseAdmonition
from doc... | apache-2.0 | -8,413,027,227,543,101,000 | 37.092357 | 103 | 0.553549 | false | 4.111722 | false | false | false |
fmfn/UnbalancedDataset | imblearn/ensemble/_weight_boosting.py | 2 | 11479 | from copy import deepcopy
import numpy as np
from sklearn.base import clone
from sklearn.ensemble import AdaBoostClassifier
from sklearn.ensemble._base import _set_random_states
from sklearn.utils import _safe_indexing
from ..under_sampling.base import BaseUnderSampler
from ..under_sampling import RandomUnderSampler... | mit | -2,642,542,450,865,235,500 | 35.211356 | 87 | 0.61974 | false | 4.123204 | false | false | false |
apdjustino/DRCOG_Urbansim | urbandeveloper/elasticity_model_2SLS.py | 1 | 6896 | __author__ = 'JMartinez'
import numpy as np, pandas as pd, os
from synthicity.utils import misc
import pysal as py
class elasticity_model(object):
def __init__(self, dset):
self.zones = dset.zones
self.buildings_far = pd.merge(dset.buildings, dset.fars, left_on='far_id', right_index=True)
... | agpl-3.0 | -512,548,573,087,698,000 | 39.327485 | 196 | 0.574101 | false | 2.83786 | false | false | false |
Huc91/TPB_Generator | tpb_ta_scrape.py | 1 | 1577 | """
The MIT License (MIT)
Copyright (c) 2016 Luca Ucciero
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, modify, merge, ... | mit | -4,126,343,385,891,779,000 | 41.621622 | 460 | 0.772353 | false | 4.064433 | false | false | false |
Konubinix/weboob | weboob/tools/date.py | 1 | 13543 | # -*- coding: utf-8 -*-
# Copyright(C) 2010-2013 Romain Bignon
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your... | agpl-3.0 | -3,805,756,433,733,235,000 | 35.682927 | 121 | 0.579492 | false | 3.381464 | false | false | false |
DempDemp/nautilus | modules/ircpaint.py | 1 | 1208 | import urllib2
from core import base
from core.auth import Auth
class IRCPaint(base.baseClass):
@classmethod
def get_drawing(cls, sid):
return urllib2.urlopen('http://ircpaint.randomlab.info/rawirc.php?q={}'.format(sid)).read()
def on_privmsg(self, address, target, text):
if target == self... | agpl-3.0 | -3,537,154,529,005,495,300 | 40.655172 | 99 | 0.543874 | false | 4.108844 | false | false | false |
e-matteson/pipit-keyboard | extras/audio/make_audio_files.py | 1 | 2652 | #!/bin/python2
from __future__ import division
import subprocess
from time import sleep
import os
# for generating sound files
import numpy as np
import matplotlib.pyplot as plt
import scipy.io.wavfile
import scipy.signal as sig
import scipy.stats as stats
master_volume = 1
sounds = {
'A':{'filename':'tick1.wa... | gpl-3.0 | -1,471,420,738,281,666,600 | 24.747573 | 79 | 0.524133 | false | 3.206771 | false | false | false |
vetu11/piloco | cosas/objetos.py | 1 | 4751 | # coding=utf-8
import json, time, threading, random, logging
from .funciones import nuevosMensajes
class Partida:
partidasEnCurso = []
def finder(self, host):
posicionPartida = 0
for e in self.partidasEnCurso:
if e["host"] == host:
return posicionPartida
... | gpl-3.0 | -6,997,027,026,198,008,000 | 41.833333 | 178 | 0.585376 | false | 3.113158 | false | false | false |
JohnReid/pybool | python/pybool/examples/neurogenesis.py | 1 | 6857 | #
# Copyright John Reid 2013
#
"""
Example to illustrate application of pybool. Based on regulatory network in paper
on robustness under functional constraint by Nakajima et al.
"""
import numpy as N, logging
from pybool.constraints import gene_off, gene_on
from pybool import network, constraints
class MetaData(c... | mit | 6,701,220,347,562,216,000 | 30.893023 | 89 | 0.495114 | false | 3.718547 | false | false | false |
CZAlmon/MangaMine | MangaMineBot_Folder/MangaBotDownloader.py | 1 | 57509 | #Ver. 0.0.7
#Author: Zach Almon
import urllib.request
import re
import os
import platform
import sys
import string
import html
import time
platformType = platform.system()
def Batoto(link_to_manga_site):
success = False
currentDirectory = os.getcwd()
if platformType == 'Windows':
MASTERdirecto... | gpl-2.0 | -3,809,125,284,167,767,600 | 37.161248 | 180 | 0.519571 | false | 4.425812 | false | false | false |
xiaohan2012/lst | dump_vis_timeline_data.py | 1 | 4095 | from check_k_best_trees import k_best_trees
from meta_graph_stat import MetaGraphStat, build_default_summary_kws_from_path
from datetime import datetime
from collections import Counter
def format_time(dt):
if dt.year < 1900:
return str(dt)
else:
return datetime.strftime(dt, '%Y-%m-%d %H:%M:%S'... | mit | 7,151,833,468,239,633,000 | 31.76 | 91 | 0.540171 | false | 3.682554 | false | false | false |
PythonCHB/NumpyExtras | cython_src/accumulator.py | 1 | 4171 | #!/usr/bin/env python
"""
accumulator class
Designed to be used as an expandable numpy array, to accumulate values, rather
than a python list.
Note that slices return copies, rather than views, unlike regular numpy arrays.
This is so that the buffer can be re-allocated without messing up any views.
"""
import numpy... | bsd-2-clause | -2,160,490,299,367,850,200 | 30.134328 | 101 | 0.57708 | false | 4.217391 | false | false | false |
WladimirSidorenko/DiscourseSegmenter | dsegmenter/common.py | 1 | 4516 | #!/usr/bin/env python2.7
# -*- mode: python; coding: utf-8; -*-
##################################################################
# Documentation
"""Module defining methods common to many modules.
Attributes:
_ispunct (method): check if word consists only of punctuation characters
prune_punc (method): remove tok... | mit | -8,265,603,846,203,108,000 | 27.225 | 79 | 0.54938 | false | 4.20876 | false | false | false |
indico/indico | indico/modules/events/models/persons.py | 1 | 17383 | # This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from operator import attrgetter
from sqlalchemy.event import listens_for
from sqlalchemy.ext.declarative ... | mit | 4,495,600,574,450,844,000 | 32.819066 | 119 | 0.59075 | false | 4.103636 | false | false | false |
avedaee/DIRAC | DataManagementSystem/Agent/RequestOperations/ReplicateAndRegister.py | 1 | 16844 | ########################################################################
# $HeadURL $
# File: ReplicateAndRegister.py
# Author: Krzysztof.Ciba@NOSPAMgmail.com
# Date: 2013/03/13 18:49:12
########################################################################
""" :mod: ReplicateAndRegister
=========================... | gpl-3.0 | 2,112,673,429,752,382,700 | 37.721839 | 120 | 0.601342 | false | 3.919032 | false | false | false |
art-solopov/mdwiki | wiki/migrations/0006_comment.py | 1 | 1317 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-07-07 16:48
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependen... | mit | -4,005,054,725,413,615,600 | 37.735294 | 130 | 0.600607 | false | 4.221154 | false | false | false |
bjsmith/motivation-simulation | ActionModel.py | 1 | 1161 | from UnitModel import *
__author__ = 'benjaminsmith'
"""Inherits from UnitModel"""
class ActionModel(UnitModel):
"""Set initial ActionModel."""
def __init__(self,action_name,tendency,value,pos_expectancy,neg_expectancy,pos_val,neg_val,threshold,chaos,persistence):
super(ActionModel,self).__init__(actio... | gpl-3.0 | 4,138,077,398,803,983,400 | 31.25 | 124 | 0.592593 | false | 3.424779 | false | false | false |
anidata/rasp | rasp/tor_engine.py | 1 | 6869 | import getpass
import os
from contextlib import contextmanager
from datetime import datetime, timedelta
from stem import Signal
from stem.connection import connect
from rasp.base import DefaultEngine
from rasp.errors import ControllerError
class TorController(object):
"""
Attributes:
address (str): I... | bsd-3-clause | 1,342,708,282,729,641,200 | 30.509174 | 83 | 0.569515 | false | 4.647497 | false | false | false |
feigaochn/leetcode | p745_prefix_and_suffix_search.py | 2 | 1582 | class WordFilter:
def __init__(self, words):
"""
:type words: List[str]
"""
from collections import defaultdict
self.prefix = defaultdict(list)
self.suffix = defaultdict(list)
for wi, word in enumerate(words):
for i in range(len(word) + 1):
... | mit | 7,729,836,571,861,658,000 | 28.849057 | 73 | 0.510746 | false | 3.189516 | false | false | false |
etkirsch/legends-of-erukar | erukar/system/engine/commands/TargetedCommand.py | 1 | 1711 | from erukar.system.engine import Interaction
from .Command import Command
from .CommandResult import CommandResult
class TargetedCommand(Command):
def process_args(self):
if not self.args:
raise Exception('Cannot process args -- Command\'s args are undefined')
if 'interaction' in self... | agpl-3.0 | 1,313,688,473,429,810,700 | 34.645833 | 84 | 0.631794 | false | 4.444156 | false | false | false |
ashione/bamslips | task/fund_realtime_net_unit.py | 1 | 1294 | from apscheduler.schedulers.blocking import BlockingScheduler
from bamslips.fund.fund_realtime_info import paralle_get_fund_realtime_info_according_fund_code
from bamslips.conf.fund_code_list import code_list
sched = BlockingScheduler()
#@sched.scheduled_job('cron',id='fund_realtime_fun_info_job',hour='0-4,9-16,21-2... | gpl-3.0 | -2,660,560,532,948,389,400 | 43.62069 | 98 | 0.732612 | false | 2.51751 | false | false | false |
arunkgupta/gramps | gramps/webapp/grampsdb/view/note.py | 1 | 5867 | # Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2009 Douglas S. Blank <doug.blank@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 Software Foundation; either version 2 of the L... | gpl-2.0 | -2,688,828,028,025,838,000 | 38.375839 | 110 | 0.593489 | false | 3.827136 | false | false | false |
google/llvm-propeller | lldb/test/API/commands/expression/persistent_variables/TestPersistentVariables.py | 2 | 1993 | """
Test that lldb persistent variables works correctly.
"""
import lldb
from lldbsuite.test.lldbtest import *
class PersistentVariablesTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
def test_persistent_variables(self):
"""Test that lldb persistent variables works correctly."""
... | apache-2.0 | 6,779,001,352,502,953,000 | 45.348837 | 114 | 0.625188 | false | 3.64351 | true | false | false |
EDUlib/eTracesX | Translation_software/edx_to_MOOCdb_piping/import.openedx.apipe/scripts/lookupOpenEdxHash.py | 1 | 1241 | #!/usr/bin/env python
import os
import sys
# Command line tool to look up the human readable strings that
# correspond to edX platform generated hash strings for problems and
# videos. The given strings may be just the 32 bit hex numbers, or the
# long strings in tracking logs that contain that hex number somewhere
... | agpl-3.0 | 3,710,170,186,341,521,000 | 32.540541 | 129 | 0.686543 | false | 3.704478 | false | false | false |
valmynd/MediaFetcher | src/plugins/youtube_dl/youtube_dl/extractor/ninenow.py | 1 | 2762 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..compat import compat_str
from ..utils import (
ExtractorError,
int_or_none,
float_or_none,
smuggle_url,
)
class NineNowIE(InfoExtractor):
IE_NAME = '9now.com.au'
_VALID_URL = r'https?://(?:www\.)?9now\.com\.au/(?:[... | gpl-3.0 | -6,856,496,807,797,869,000 | 30.033708 | 110 | 0.645909 | false | 2.705191 | false | false | false |
adamjermyn/AstroMicroPhysics | sourceClass.py | 1 | 14504 | from scipy.interpolate import RegularGridInterpolator, RectBivariateSpline, interp1d
from scipy.ndimage.filters import gaussian_filter, minimum_filter
import numpy as np
class source:
"""
An object which wraps equation of state tables and functions.
"""
def __init__(self, inNames, outNames, contains, smoothMask,... | gpl-2.0 | -8,063,195,906,572,634,000 | 46.090909 | 117 | 0.726076 | false | 3.716116 | false | false | false |
treebuilder/s3-mining | s3.py | 1 | 1359 | #!/usr/bin/env python
import requests
import sys
url = 'https://s3.amazonaws.com/'
name = sys.argv[1].strip()
common = ['test','dev','bucket','s3','aws','prd','prod','pub','public','production','development','testing','archive','backup','web','devops','sec','secure','hidden','secret','staging','download']
connectors ... | apache-2.0 | -3,350,466,829,300,532,700 | 23.709091 | 196 | 0.601177 | false | 2.849057 | false | false | false |
mnunberg/couchbase-python-client | txcouchbase/tests/test_txconn.py | 1 | 2526 | # Copyright 2013, Couchbase, 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... | apache-2.0 | -1,567,406,470,324,940,300 | 34.577465 | 79 | 0.669042 | false | 4.080775 | true | false | false |
lgarren/spack | var/spack/repos/builtin/packages/r-yaqcaffy/package.py | 1 | 1795 | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | 7,484,312,950,210,609,000 | 43.875 | 94 | 0.675209 | false | 3.74739 | false | false | false |
miguelinux/vbox | src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/GenFds/UiSection.py | 1 | 2838 | ## @file
# process UI section generation
#
# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
# which accompanies this distribution. The full text of the license... | gpl-2.0 | -5,052,365,324,939,483,000 | 35.384615 | 107 | 0.67019 | false | 4.054286 | false | false | false |
sjohannes/exaile | xlgui/panel/playlists.py | 1 | 38162 | # Copyright (C) 2008-2010 Adam Olsen
#
# 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 option)
# any later version.
#
# This program is distributed in the hope that... | gpl-2.0 | -3,871,848,738,192,207,000 | 37.315261 | 87 | 0.5506 | false | 4.430744 | false | false | false |
jespino/GalaxduS | libs/screens/newgame.py | 1 | 2534 | from galaxdustk.buttons import Button, CircularSelectButton, SelectButton
from galaxdustk.label import Label
from galaxdustk.screen import BaseScreen
import handlers
from gettext import gettext as _
class NewGameScreen(BaseScreen):
background_path = 'data/images/backgrounds/menu.png'
def __init__(self, cont... | gpl-3.0 | -5,865,235,871,812,638,000 | 37.984615 | 105 | 0.59708 | false | 3.461749 | false | false | false |
Stibbons/python-project-bootstrap | src/ppb/cli/main.py | 1 | 1483 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from ppb.cli import sub_cmd
from ppb.cli import version
import argparse
import sys
class Main(object):
'''
This command line tool ...
'''
def main(self):
# Global command-line arg... | bsd-3-clause | -4,540,101,688,897,022,500 | 31.955556 | 95 | 0.607552 | false | 4.336257 | false | false | false |
trappn/crosshair | include/patterns.py | 1 | 5162 | import cv2
import numpy as np
# number of available patterns:
maxpat = 10
# defining functions for all possible patterns follow,
# activated by patternswitch function
# pattern1: Bruker style crosshair with circles and ticks
def pattern1( arr, width, height, x, y, rad, col ):
cv2.line(arr,(0,y),(width,y),col,1)... | mit | -501,800,507,368,933,400 | 32.089744 | 61 | 0.531964 | false | 2.569438 | false | false | false |
kasbah/slim_looper | src/gui/carla_widgets/ui_inputdialog_value.py | 1 | 2493 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'resources/ui/inputdialog_value.ui'
#
# Created: Thu Jan 2 17:50:40 2014
# by: PyQt4 UI code generator 4.9.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.... | gpl-3.0 | 4,569,548,553,873,517,000 | 46.942308 | 124 | 0.720417 | false | 4.033981 | false | false | false |
srio/oasys-comsyl | orangecontrib/comsyl/widgets/applications/comsyl_propagate_beamline.py | 1 | 10084 | import os, sys
from PyQt5 import QtGui, QtWidgets
from PyQt5.QtGui import QPalette, QColor, QFont
from PyQt5.QtWidgets import QApplication, QFileDialog
from PyQt5.QtGui import QIntValidator, QDoubleValidator
from orangewidget import gui
from orangewidget.settings import Setting
from oasys.widgets import gui as oasys... | mit | -3,722,189,360,845,674,000 | 40.673554 | 170 | 0.653907 | false | 3.541974 | false | false | false |
liosha2007/temporary-groupdocs-python-sdk | examples/api-samples/inc_samples/sample07.py | 1 | 2600 | ####<i>This sample will show how to use <b>MoveFile</b> method from Storage Api to copy/move a file in GroupDocs Storage </i>
#Import of classes from libraries
import base64
import os
from pyramid.renderers import render_to_response
from groupdocs.ApiClient import ApiClient
from groupdocs.StorageApi import StorageAp... | apache-2.0 | -7,305,167,231,494,652,000 | 42.333333 | 142 | 0.647308 | false | 4.018547 | false | false | false |
paulscherrerinstitute/pcaspy | example/pysh.py | 1 | 2155 | #!/usr/bin/env python
import time
import sys
import threading
import subprocess
import shlex
from pcaspy import Driver, SimpleServer
prefix = 'MTEST:'
pvdb = {
'COMMAND' : {
'type' : 'char',
'count': 128,
'asyn' : True
},
'OUTPUT' : {
'type' : 'char',
'count': 500... | bsd-3-clause | -8,568,657,899,286,551,000 | 24.352941 | 85 | 0.500696 | false | 4.043152 | false | false | false |
nataddrho/DigiCue-USB | Python3/src/venv/Lib/site-packages/serial/urlhandler/protocol_alt.py | 2 | 2033 | #! python
#
# This module implements a special URL handler that allows selecting an
# alternate implementation provided by some backends.
#
# This file is part of pySerial. https://github.com/pyserial/pyserial
# (C) 2015 Chris Liechti <cliechti@gmx.net>
#
# SPDX-License-Identifier: BSD-3-Clause
#
# URL format: al... | mit | -5,356,293,284,131,419,000 | 34.666667 | 92 | 0.618298 | false | 3.505172 | false | false | false |
spmjc/plugin.video.freplay | resources/lib/channels/pluzz2.py | 1 | 6003 | # -*- coding: utf-8 -*-
import json
import resources.lib.utils as utils
from resources.lib import globalvar
title = ['La 1ère', 'France 2', 'France 3', 'France 4', 'France 5', 'France Ô']
img = ['la_1ere', 'france2', 'france3', 'france4', 'france5', 'franceo']
readyForUse = True
channelCatalog = 'http://pluzz.webserv... | gpl-2.0 | 2,164,653,935,708,546,000 | 35.284848 | 87 | 0.48288 | false | 3.700247 | false | false | false |
thusoy/grunt-pylint | postinstall.py | 1 | 1377 | #!/usr/bin/env python
import os
import subprocess
import sys
# Versions here must match what is bundled with the package (see package.json)
packages = [
'astroid-2.2.5.tar.gz',
'isort-4.3.17.tar.gz',
'lazy-object-proxy-1.3.1.tar.gz',
'mccabe-0.6.1.tar.gz',
'pylint-2.3.1.tar.gz',
'six-1.12.0.ta... | mit | 5,357,597,070,311,199,000 | 22.741379 | 91 | 0.580973 | false | 3.115385 | false | false | false |
os-cloud-storage/openstack-workload-disaster-recovery | dragon/engine/service.py | 1 | 12170 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
'''-------------------------------------------------------------------------
Copyright IBM Corp. 2015, 2015 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 c... | apache-2.0 | 5,487,951,247,764,430,000 | 38.00641 | 79 | 0.602219 | false | 4.104553 | false | false | false |
openstack/senlin | senlin/common/policy.py | 1 | 2008 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed unde... | apache-2.0 | 6,620,784,234,042,887,000 | 33.62069 | 112 | 0.690737 | false | 3.657559 | false | false | false |
TomMinor/MayaPerforce | Perforce/DepotClientTreeView.py | 1 | 16413 | import sys
import os
from PySide import QtCore, QtGui
from P4 import P4, P4Exception
# http://stackoverflow.com/questions/32229314/pyqt-how-can-i-set-row-heights-of-qtreeview
class TreeItem(object):
def __init__(self, data, parent=None):
self.parentItem = parent
self.data = data
self.ch... | mit | 848,327,769,677,595,500 | 29.793621 | 988 | 0.556876 | false | 3.722613 | true | false | false |
remodoy/reauth-python | reauth/reauth.py | 1 | 2556 | import json
import ssl
import time
import urllib.request
from datetime import timedelta
import logging
import Crypto.PublicKey.RSA
import python_jwt as jwt
_accepted_sign_algs = ["PS512"]
_pubkey_cache_living_time = 60*10 # 10min
_pubkey_cache_exp_time = 0
_pubkey_cache = ""
_iat_skew = timedelta(minutes=5)
logger... | mit | -6,493,516,370,609,133,000 | 33.08 | 118 | 0.670579 | false | 3.421687 | false | false | false |
dpwrussell/openmicroscopy | components/tools/OmeroPy/src/omero/plugins/chgrp.py | 1 | 4086 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011-2015 Glencoe Software, Inc. All Rights Reserved.
# Use is subject to license terms supplied in LICENSE.txt
#
"""
chgrp plugin
Plugin read by omero.cli.Cli during initialization. The method(s)
defined here will be added to the Cli class for... | gpl-2.0 | 1,640,687,123,089,833,700 | 31.951613 | 75 | 0.612335 | false | 3.847458 | false | false | false |
FederatedAI/FATE | python/fate_client/pipeline/component/hetero_fast_secureboost.py | 1 | 1367 | #
# Copyright 2019 The FATE 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 appli... | apache-2.0 | -4,138,726,635,919,116,000 | 35.945946 | 75 | 0.731529 | false | 3.962319 | false | false | false |
zaenalarifin/openshot_jmd | openshot/windows/TransitionProperties.py | 1 | 6330 | # OpenShot Video Editor is a program that creates, modifies, and edits video files.
# Copyright (C) 2009 Jonathan Thomas
#
# This file is part of OpenShot Video Editor (http://launchpad.net/openshot/).
#
# OpenShot Video Editor is free software: you can redistribute it and/or modify
# it under the terms of the GNU G... | gpl-3.0 | -4,757,252,386,056,559,000 | 29 | 166 | 0.705213 | false | 3.41056 | false | false | false |
jstasiak/python-zeroconf | tests/test_updates.py | 1 | 2301 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Unit tests for zeroconf._services. """
import logging
import socket
from threading import Event
import pytest
import zeroconf as r
from zeroconf import const
from zeroconf import Zeroconf
from zeroconf._services.browser import ServiceBrowser
from zeroconf._services... | lgpl-2.1 | 4,083,235,635,604,720,000 | 24.01087 | 102 | 0.662321 | false | 3.790774 | true | false | false |
zengchunyun/s12 | day9/temp/salt_server.py | 1 | 2506 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: zengchunyun
"""
# import salt
#
# <Salt ID>: # The id to reference the target system with
# host: # The IP address or DNS name of the remote host
# user: # The user to log in as
# passwd: # The password to log in with
#
# ... | gpl-2.0 | 7,667,011,008,322,292,000 | 26.549451 | 80 | 0.598962 | false | 3.27154 | false | false | false |
xzturn/caffe2 | caffe2/python/layers/sparse_lookup.py | 1 | 13116 | ## @package sparse_lookup
# Module caffe2.python.layers.sparse_lookup
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from caffe2.python.helpers.arg_scope import get_current_scope
from caffe2.python import schema
from ... | apache-2.0 | 2,038,187,127,026,722,600 | 38.625378 | 81 | 0.560689 | false | 3.990265 | false | false | false |
chawlanikhil24/glustercli-python | gluster/cli/quota.py | 1 | 4960 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016 Red Hat, Inc. <http://www.redhat.com>
# This file is part of GlusterFS.
#
# This file is licensed to you under your choice of the GNU Lesser
# General Public License, version 3 or any later version (LGPLv3 or
# later), or the GNU General Public License, version 2 (GPL... | gpl-2.0 | 3,638,174,245,203,720,700 | 25.524064 | 71 | 0.651613 | false | 3.63104 | false | false | false |
RafayelGardishyan/Python-minis | TheCoiner/main.py | 1 | 7776 | import time
import datetime
d = datetime.date.today()
dm = d.month
dd = d.day
print ('Welkom bij TheCoiner')
file = 'data/monthday/month.txt'
f = open(file)
file_contents = f.read()
pdm = file_contents
file = 'data/monthday/day.txt'
f = open(file)
file_contents = f.read()
pdd = file_contents ... | gpl-2.0 | 8,116,726,938,894,894,000 | 33.669725 | 139 | 0.42644 | false | 3.588371 | false | false | false |
golaizola/pelisalacarta-xbmc | pelisalacarta/channels/voxfilme.py | 1 | 5019 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Canal para voxfilme
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import urlparse,urllib2,urllib,re
import os, sys
from core imp... | gpl-3.0 | 60,435,188,117,971,440 | 36.133333 | 206 | 0.630162 | false | 3.540254 | false | false | false |
Iconik/eve-suite | src/view/blueprintcalculator/ui_blueprint_calculator.py | 1 | 4383 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui_blueprint_calculator.ui'
#
# Created: Sat Mar 19 14:47:54 2011
# by: pyside-uic 0.2.7 running on PySide 1.0.0~rc1
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
class Ui_BlueprintCalculato... | gpl-3.0 | -9,110,757,788,749,610,000 | 55.922078 | 156 | 0.736026 | false | 4.131008 | false | false | false |
smmoosavi/Theano-Tutorials | 5_convolutional_net.py | 1 | 3264 | import theano
from theano import tensor as T
from theano.sandbox.rng_mrg import MRG_RandomStreams as RandomStreams
import numpy as np
from theano.tensor.nnet.conv import conv2d
from theano.tensor.signal.downsample import max_pool_2d
from load import mnist, save_model
theano.config.floatX = 'float32'
srng = RandomStr... | mit | 4,246,695,362,939,347,500 | 27.382609 | 100 | 0.599877 | false | 2.596659 | false | false | false |
648trindade/pygame-engine-gamejam | src/engine/System.py | 1 | 13260 | import pygame
import pygame.gfxdraw
import os
import sys
from engine.Point import Point
from engine.Scene import Scene
from engine.managers.Texture import Texture
from engine.managers.Font import Font
from engine.managers.TextureSpec import TextureSpec
# tamanho fake da tela. Todos os objetos pensam que a tela tem ess... | gpl-3.0 | 3,898,391,146,138,423,300 | 34.383378 | 95 | 0.570693 | false | 3.552624 | false | false | false |
griest024/PokyrimTools | pyffi-develop/scripts/cgf/cgftoaster.py | 1 | 3462 | #!/usr/bin/python3
"""A script for casting spells on cgf files. This script is essentially
a cgf specific wrapper around L{pyffi.spells.toaster}."""
# --------------------------------------------------------------------------
# ***** BEGIN LICENSE BLOCK *****
#
# Copyright (c) 2007-2012, Python File Format Interface
... | mit | 1,480,470,326,199,739,000 | 37.466667 | 82 | 0.698729 | false | 3.929625 | false | false | false |
charley-ye/SCFS-v1 | simplecfs/message/network_handler.py | 1 | 1608 | # -*- coding: utf-8 -*-
"""
handle network sending and receiving data
"""
import logging
from simplecfs.common.parameters import DATA_FRAME_SIZE
from simplecfs.message.packet import pack, unpack
def send_command(socket_fd, message):
"""
send command message packet over socket
@socket_fd(socket.makefile('... | apache-2.0 | 124,670,732,131,371,360 | 23.738462 | 56 | 0.641169 | false | 3.526316 | false | false | false |
thenakliman/nirikshak | nirikshak/output/base.py | 1 | 1989 | # Copyright 2017 <thenakliman@gmail.com>
#
# 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... | apache-2.0 | -8,501,169,952,567,995,000 | 28.25 | 78 | 0.68175 | false | 3.774194 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.