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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
JackMorris/CaiusHallHelper | main.py | 1 | 1768 | import sys
from datetime import date, timedelta
from configuration import Configuration
from service import raven_service, email_service
def main():
configuration_file_path = sys.argv[1]
configuration = Configuration(configuration_file_path)
_authenticate_services(configuration)
_make_user_bookings(co... | mit | 4,981,933,257,555,847,000 | 35.102041 | 78 | 0.68948 | false | 4.121212 | true | false | false |
pombredanne/pytype | pytype/tests/test_attributes.py | 1 | 2408 | """Test instance and class attributes."""
from pytype.tests import test_inference
class TestAttributes(test_inference.InferenceTest):
"""Tests for attributes."""
def testSimpleAttribute(self):
with self.Infer("""
class A(object):
def method1(self):
self.a = 3
def method2(self... | apache-2.0 | 7,313,925,799,556,199,000 | 24.083333 | 69 | 0.50789 | false | 3.610195 | true | false | false |
DolphinDream/sverchok | nodes/curve/nearest_point.py | 1 | 6929 | import numpy as np
import bpy
from bpy.props import FloatProperty, EnumProperty, BoolProperty, IntProperty
from mathutils import Matrix
from mathutils.kdtree import KDTree
import sverchok
from sverchok.node_tree import SverchCustomTreeNode
from sverchok.data_structure import updateNode, zip_long_repeat, ensure_nestin... | gpl-3.0 | -8,756,187,733,861,882,000 | 39.758824 | 141 | 0.499928 | false | 4.066315 | false | false | false |
lituan/tools | pisa/ccp4_pisa.py | 1 | 2552 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
run pisa to parse interfaces in PDBs
first install CCP4 and change the following variables
"""
import os
import sys
import subprocess
import cPickle as pickle
from multiprocessing import Pool
os.environ['CCP4_SCR'] = 'C:\\ccp4temp'
os.environ['CCP4I_TCLTK'] = 'C:\\CCP4... | cc0-1.0 | 6,509,973,869,992,154,000 | 34.943662 | 113 | 0.617947 | false | 2.804396 | false | false | false |
scowcron/ImagesOfNetwork | images_of/entrypoints/audit_mods.py | 1 | 1450 | import click
from images_of import command, settings, Reddit
@command
@click.option('--print-mods', is_flag=True, help='List the non-default moderators for all subreddits')
def main(print_mods):
"""Find subs without mods and disenfranchised mods"""
mods = settings.DEFAULT_MODS
r = Reddit('Moderator ... | mit | 2,044,205,861,254,028,000 | 26.884615 | 102 | 0.551034 | false | 3.460621 | false | false | false |
msmbuilder/mdentropy | mdentropy/cli/main.py | 1 | 1372 | from __future__ import print_function, absolute_import, division
import sys
import argparse
from .. import __version__
from . import dmutinf
from . import dtent
def main():
help = ('MDEntropy is a python library that allows users to perform '
'information-theoretic analyses on molecular dynamics (MD... | mit | 5,335,409,560,070,120,000 | 27 | 82 | 0.620991 | false | 3.728261 | false | false | false |
thorkd1t/lurkbot | query.py | 1 | 1330 | import sqlite3
import time
import joinlist
# the tables look like this:
# db name 'imaqtpie.db' (each channel in joinlist has its own .db)
# Table name chat (each db has one table named 'chat')
#___________________________________________________________________
# usr | mesg | id | flags | channel | ... | mit | -8,376,591,812,289,806,000 | 32.102564 | 82 | 0.437594 | false | 3.518519 | false | false | false |
umeboshi2/vignewton | vignewton/resources.py | 1 | 1855 | from pyramid.security import Allow, Everyone, Authenticated
from fanstatic import Library, Resource
from js.lightbox import lightbox
from haberdashery.resources import jqueryui, fc_css, deform_css
#from trumpet.resources import jqueryui
from trumpet.resources import StaticResources as TrumpetResources
library = Li... | unlicense | 3,318,480,387,530,409,500 | 27.538462 | 78 | 0.667925 | false | 3.46729 | false | false | false |
mikeboers/PyAV | tests/test_codec_context.py | 1 | 10799 | from fractions import Fraction
from unittest import SkipTest
import os
from av import AudioResampler, Codec, Packet
from av.codec.codec import UnknownCodecError
import av
from .common import TestCase, fate_suite
def iter_frames(container, stream):
for packet in container.demux(stream):
for frame in pack... | bsd-3-clause | 7,327,797,646,894,519,000 | 30.301449 | 88 | 0.548292 | false | 4.046085 | true | false | false |
cjmathy/ann_bmi203 | ann/rap1.py | 1 | 6499 | import numpy as np
import re
import random
def prepare_data():
"""This method prepares input positive and negative datasets as bitvectors for the Rap1 binding problem. Output: three lists of bitvectors, one containing positive samples, negative samples that are similar to positive samples, and negative examples t... | apache-2.0 | 5,019,768,587,822,818,000 | 35.717514 | 347 | 0.624558 | false | 3.479122 | false | false | false |
m87/pyEM | stepwise.py | 1 | 3019 | from thirdparty import log_mvnpdf, log_mvnpdf_diag
import numpy as np
from online import *
from scipy.misc import logsumexp
from gaussEM import GaussEM
class Stepwise(OnlineEM):
def __init__(self, param):
super().__init__(param)
self.param = float(param['alpha'])
self.skip = int(param['skip... | mit | 1,769,778,788,891,410,400 | 34.940476 | 133 | 0.56575 | false | 2.925388 | false | false | false |
gunan/tensorflow | tensorflow/python/kernel_tests/rnn_test.py | 1 | 32669 | # 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 | -9,210,532,734,080,610,000 | 37.388954 | 80 | 0.625578 | false | 3.480239 | true | false | false |
frankrousseau/weboob | weboob/capabilities/shop.py | 1 | 3939 | # -*- coding: utf-8 -*-
# Copyright(C) 2014 Oleg Plakhotniuk
#
# 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 o... | agpl-3.0 | -8,459,858,471,684,363,000 | 26.165517 | 77 | 0.611323 | false | 4.098855 | false | false | false |
gigglearrows/anniesbot | alembic/versions/3841cd597e_added_a_table_for_duel_stats.py | 1 | 1033 | """Added a table for duel stats
Revision ID: 3841cd597e
Revises: d5f1b8bd68
Create Date: 2015-12-02 00:12:07.548855
"""
# revision identifiers, used by Alembic.
revision = '3841cd597e'
down_revision = 'd5f1b8bd68'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade():... | mit | -8,916,108,574,692,642,000 | 27.694444 | 76 | 0.680542 | false | 3.248428 | false | false | false |
marscher/PyEMMA | pyemma/_ext/variational/estimators/tests/benchmark_moments.py | 1 | 5907 | from __future__ import absolute_import
from __future__ import print_function
__author__ = 'noe'
import time
import numpy as np
from .. import moments
def genS(N):
""" Generates sparsities given N (number of cols) """
S = [10, 90, 100, 500, 900, 1000, 2000, 5000, 7500, 9000, 10000, 20000, 50000, 75000, 90000] ... | lgpl-3.0 | -6,502,714,212,863,599,000 | 35.695652 | 115 | 0.583206 | false | 2.747442 | false | false | false |
09zwcbupt/undergrad_thesis | ext/poxdesk/qx/tool/pylib/ecmascript/frontend/Comment_2.py | 1 | 27369 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
################################################################################
#
# qooxdoo - the new era of web development
#
# http://qooxdoo.org
#
# Copyright:
# 2006-2012 1&1 Internet AG, Germany, http://www.1und1.de
#
# License:
# LGPL: http://www.gnu.org/li... | gpl-3.0 | 1,810,750,978,431,360,500 | 27.27376 | 161 | 0.483796 | false | 4.120596 | false | false | false |
TPopovich/mongo-connector | mongo_connector/oplog_manager.py | 1 | 31232 | # Copyright 2013-2014 MongoDB, 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 | 8,939,902,249,170,891,000 | 41.091644 | 132 | 0.493724 | false | 4.885343 | false | false | false |
arauzoliver/uip-iiig2016-prog3 | FinalPC3/noteapp.py | 1 | 1122 | import bottle
import pymongo
import book
"""
Ruta por defecto para el index
"""
@bottle.route('/')
def book_index():
mynames_list = book.find_names()
return bottle.template('index', dict(mynames = mynames_list))
"""
Postea las nuevas entrada para ser insertadas a MongoDB
"""
@bottle.route('/newgues... | mit | 6,061,514,939,707,263,000 | 20.039216 | 96 | 0.697861 | false | 3.008043 | false | false | false |
lhuriguen/tophandball | utils/models.py | 1 | 1767 | import urllib
import json
from decimal import Decimal
from django.db import models
class Marker(models.Model):
"""
Abstract model that provides geocoding for models with address.
"""
address = models.CharField(max_length=200, blank=True,
help_text="Separate address item... | mit | 1,176,390,992,221,440,800 | 38.266667 | 79 | 0.594228 | false | 4.187204 | false | false | false |
chop-dbhi/django-concerns | concerns/migrations/0004_auto__chg_field_concern_reporter.py | 1 | 4938 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'Concern.reporter'
db.alter_column('concerns_concern', 'reporter_id', self.gf('django.db.... | bsd-2-clause | -4,626,761,653,977,192,000 | 66.643836 | 182 | 0.560753 | false | 3.712782 | false | false | false |
JP-Ellis/django-select2-forms | select2/views.py | 1 | 6241 | import copy
import json
from django.apps import apps
from django.db import models
from django.forms.models import ModelChoiceIterator
from django.http import HttpResponse
from django.utils.encoding import force_text
import logging
logger = logging.getLogger(__name__)
class ViewException(Exception):
pass
class... | bsd-2-clause | 2,370,086,864,127,999,500 | 32.553763 | 100 | 0.573145 | false | 4.111331 | false | false | false |
Designist/pybuilder | setup.py | 1 | 1823 | #!/usr/bin/env python
#
# -*- coding: utf-8 -*-
#
# This file is part of PyBuilder
#
# Copyright 2011-2015 PyBuilder Team
#
# 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 | -1,571,231,106,159,978,200 | 32.759259 | 85 | 0.679649 | false | 3.375926 | false | false | false |
nens/sufriblib | setup.py | 1 | 1083 | from setuptools import setup
version = '0.5.dev0'
long_description = '\n\n'.join([
open('README.rst').read(),
open('CREDITS.rst').read(),
open('CHANGES.rst').read(),
])
install_requires = [
'setuptools',
'pyproj',
],
tests_require = [
'nose',
'coverage',
]
setup(name='sufrib... | gpl-3.0 | 5,829,553,528,773,567,000 | 24.785714 | 117 | 0.604801 | false | 3.504854 | false | false | false |
pdevetto/super-duper-disco | movies/migrations/0001_initial.py | 1 | 1056 | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-11-28 14:30
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Create... | gpl-3.0 | 874,054,082,737,347,300 | 31 | 115 | 0.574811 | false | 4.327869 | false | false | false |
jun66j5/trac-ja | sample-plugins/workflow/VoteOperation.py | 1 | 2994 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2007-2013 Edgewall Software
# Copyright (C) 2007 Eli Carter <retracile@gmail.com>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac.... | bsd-3-clause | 6,424,570,206,271,528,000 | 38.394737 | 98 | 0.642619 | false | 3.888312 | false | false | false |
CloudVLab/professional-services | tools/gsuite-exporter/setup.py | 1 | 2139 | # Copyright 2018 Google 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 wr... | apache-2.0 | -8,173,679,682,487,673,000 | 31.907692 | 74 | 0.661992 | false | 3.998131 | false | false | false |
UTNkar/moore | src/home/migrations/0027_manual_paragraph_data.py | 1 | 1268 | # Generated by Django 2.2.10 on 2020-04-02 21:08
from django.db import migrations
from itertools import chain
from utils.data_migrations import stream_field_filter_map
def richtext_to_paragraph(block):
return {
'type': 'paragraph',
'value': {
'text': block['value'],
'align... | agpl-3.0 | -3,568,786,183,921,958,400 | 25.978723 | 79 | 0.621451 | false | 3.436314 | false | false | false |
JonnyH/pyra-kernel | GTA04/root/vibra.py | 2 | 3531 | #!/usr/bin/env python
import fcntl, struct, time, array
#
# There are two steps to creating a rumble effect
# 1/ describe the effect and give it to the driver using an
# ioctl.
# There a 3 paramaters:
# strength: from 0 to 0xffff - this code takes a value from 0 to
# 1 and ... | gpl-2.0 | -7,004,655,211,986,307,000 | 30.810811 | 74 | 0.54857 | false | 3.124779 | false | false | false |
serge-sans-paille/pythran | pythran/transformations/remove_nested_functions.py | 1 | 4044 | """ RemoveNestedFunctions turns nested function into top-level functions. """
from pythran.analyses import GlobalDeclarations, ImportedIds
from pythran.passmanager import Transformation
from pythran.tables import MODULES
from pythran.conversion import mangle
import pythran.metadata as metadata
import gast as ast
c... | bsd-3-clause | -783,504,513,930,404,400 | 32.7 | 79 | 0.568249 | false | 4.011905 | false | false | false |
Hikasgai/HikasgaiApp | placeForMe/settings.py | 1 | 4053 | """
Django settings for gettingstarted project, on Heroku. For more info, see:
https://github.com/heroku/heroku-django-template
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/se... | mit | 7,661,293,483,091,938,000 | 27.342657 | 91 | 0.694547 | false | 3.426036 | false | false | false |
pombredanne/invenio | modules/bibindex/lib/bibindex_engine_stemmer.py | 1 | 18378 | ## This file is part of Invenio.
## Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, ... | gpl-2.0 | -8,048,510,486,832,647,000 | 37.367432 | 112 | 0.482098 | false | 3.776043 | false | false | false |
gurneyalex/odoo | addons/account/models/digest.py | 6 | 1557 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import fields, models, _
from odoo.exceptions import AccessError
class Digest(models.Model):
_inherit = 'digest.digest'
kpi_account_total_revenue = fields.Boolean('Revenue')
kpi_account_total_rev... | agpl-3.0 | -1,840,514,460,584,391,000 | 46.181818 | 134 | 0.635196 | false | 3.680851 | false | false | false |
phil0522/anote | anote-web/anoteweb/data/anote_pb2.py | 1 | 9335 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: anote.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
... | mit | -9,181,972,045,732,631,000 | 37.895833 | 857 | 0.681307 | false | 3.016155 | false | false | false |
mfitzp/padua | setup.py | 1 | 1035 | from setuptools import setup, find_packages
version = '0.1.16'
setup(
name='padua',
version=version,
url='http://github.com/mfitzp/padua',
author='Martin Fitzpatrick',
author_email='martin.fitzpatrick@gmail.com',
description='A Python interface for Proteomic Data Analysis, working with MaxQuan... | bsd-2-clause | 5,922,774,192,656,956,000 | 27.75 | 106 | 0.596135 | false | 3.980769 | false | false | false |
jianghuaw/nova | nova/conductor/manager.py | 1 | 56574 | # Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | apache-2.0 | -8,708,059,897,833,092,000 | 48.152042 | 79 | 0.565101 | false | 4.944415 | false | false | false |
E7ernal/quizwhiz | quizard/views/Results.py | 1 | 5042 | # vim: ts=4:sw=4:expandtabs
__author__ = 'zach.mott@gmail.com'
from django.conf import settings
from django.views import generic
from django.contrib import messages
from django.shortcuts import redirect
from django.template.loader import get_template
from django.utils.translation import ugettext_lazy as _
from email... | mit | -2,658,239,532,650,944,500 | 35.80292 | 106 | 0.61067 | false | 4.43058 | false | false | false |
macosforge/ccs-calendarserver | calendarserver/tools/agent.py | 1 | 10761 | #!/usr/bin/env python
# -*- test-case-name: calendarserver.tools.test.test_agent -*-
##
# Copyright (c) 2013-2017 Apple 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 ... | apache-2.0 | -6,349,575,303,463,743,000 | 28.401639 | 79 | 0.646222 | false | 4.426573 | false | false | false |
rocky/python2-trepan | trepan/bwprocessor/main.py | 1 | 18126 | # -*- coding: utf-8 -*-
# Copyright (C) 2008-2010, 2013-2015 Rocky Bernstein <rocky@gnu.org>
#
# 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... | gpl-3.0 | 3,372,832,090,076,952,000 | 35.692308 | 79 | 0.549542 | false | 4.270971 | false | false | false |
drewp/commentserve | commentServe.py | 1 | 12072 | #!/usr/bin/python
"""comment storage for blogs, photo site, etc
see also:
sioc:Post sioc:has_reply sioc:Post / types:Comment
sioc:content
content:encoded
dcterms:created
types:BlogPost
types:Comment
"""
import web, time, logging, pystache, trac... | bsd-2-clause | -3,934,038,125,280,826,400 | 35.252252 | 121 | 0.574387 | false | 3.91186 | false | false | false |
kivymd/KivyMD | demos/shrine/libs/baseclass/box_bottom_sheet.py | 1 | 4932 | from kivy.animation import Animation
from kivy.clock import Clock
from kivy.core.window import Window
from kivy.metrics import dp
from kivy.properties import BooleanProperty, ObjectProperty, StringProperty
from kivy.uix.behaviors import ButtonBehavior
from kivy.uix.image import Image
from kivy.uix.recycleview import Re... | mit | 7,916,162,452,998,090,000 | 34.228571 | 75 | 0.623682 | false | 3.711061 | false | false | false |
sernst/Trackway-Gait-Analysis | tracksim/cli/commands/list_.py | 1 | 1859 | from argparse import ArgumentParser
from tracksim import system
from tracksim import reader
from tracksim import paths
from tracksim import cli
DESCRIPTION = """
Removes all existing group and trial results from cached results folders
"""
def list_groups():
system.log('===== GROUPS =====', whitespace_bo... | mit | 1,463,846,575,669,535,500 | 20.125 | 76 | 0.534696 | false | 3.972222 | false | false | false |
num1r0/bb_tools | wordlist_generator.py | 1 | 4922 | """
Wordlist generator tool.
Generates extended wordlist based on an initial list of possible words
Used mainly with hash cracking tools: hashcat, john, etc.
TO DO:
- Add logging function
"""
import datetime
import itertools
import sys
import os
def usage():
""" Usage function """
usage_message = """Us... | gpl-3.0 | -3,724,301,158,258,055,000 | 30.350318 | 110 | 0.621902 | false | 3.956592 | false | false | false |
beakman/droidlab | droidlab/experiments/serializers.py | 1 | 1991 | from rest_framework import serializers
from rest_framework.reverse import reverse
from .models import Experiment, Result
class ResultSerializer(serializers.ModelSerializer):
class Meta:
model = Result
exclude = ('experiment',)
# class ExperimentSerializer(serializers.HyperlinkedModelSerializer):
# results = ser... | bsd-3-clause | 8,969,882,641,364,371,000 | 31.655738 | 88 | 0.690105 | false | 3.626594 | false | false | false |
OSSOS/MOP | src/ossos/core/scripts/process.py | 1 | 1397 |
from ossos.pipeline import mk_mopheader, mkpsf, step1, slow
from ossos import util, storage
import logging
import sys
import os
import shutil
util.config_logging(logging.INFO)
version='p'
force=False
dry_run=False
prefix=''
lines = open(sys.argv[1]).readlines()
basedir=os.getcwd()
for line in lines:
expnum =... | gpl-3.0 | -1,160,384,444,843,936,800 | 30.75 | 132 | 0.59413 | false | 3.358173 | false | false | false |
rrahmati/roboinstruct-2 | demonstrate_ros_package/scripts/record_demonstration.py | 1 | 15168 | #! /usr/bin/python
import rospy
from sensor_msgs.msg import Image
from cv_bridge import CvBridge, CvBridgeError
import numpy as np
import cv2
import sys
import os
from os.path import expanduser
import signal
import threading
from multiprocessing import Pool
import time
from random import randint
from std_msgs.msg impo... | mit | -7,426,183,828,414,585,000 | 53.171429 | 131 | 0.610562 | false | 3.709464 | false | false | false |
ChromiumWebApps/chromium | mojo/public/bindings/generators/mojom_js_generator.py | 1 | 7742 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Generates JavaScript source files from a mojom.Module."""
from generate import mojom
from generate import mojom_pack
from generate import mojom_generator... | bsd-3-clause | 4,849,057,587,439,504,000 | 30.34413 | 78 | 0.681478 | false | 3.290268 | false | false | false |
kmolab/kmolab.github.io | data/Brython-3.3.4/Lib/logging/brython_handlers.py | 1 | 1179 | import logging
from browser.ajax import ajax
class XMLHTTPHandler(logging.Handler):
"""
A class which sends records to a Web server, using either GET or
POST semantics.
"""
def __init__(self, url, method="GET"):
"""
Initialize the instance with the host, the request URL, and the m... | agpl-3.0 | 5,833,815,378,473,545,000 | 27.756098 | 78 | 0.579304 | false | 4.366667 | false | false | false |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2019_11_01/operations/_route_filters_operations.py | 1 | 27170 | # 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 may ... | mit | 116,262,467,864,763,620 | 47.691756 | 193 | 0.63537 | false | 4.269327 | true | false | false |
Stratos42/EveBot | plugins.disabled/bf.py | 1 | 2472 | '''brainfuck interpreter adapted from (public domain) code at
http://brainfuck.sourceforge.net/brain.py'''
import re
import random
from util import hook
BUFFER_SIZE = 5000
MAX_STEPS = 1000000
@hook.command
def bf(inp):
".bf <prog> -- executes brainfuck program <prog>"""
program = re.sub('[^][<>+-.,]', ''... | gpl-3.0 | 4,300,077,651,816,528,000 | 27.090909 | 61 | 0.480987 | false | 3.948882 | false | false | false |
koala-ai/tensorflow_nlp | nlp/chatbot/model.py | 1 | 10775 | import copy
import numpy as np
import tensorflow as tf
from nlp.chatbot.dataset import data_utils
class S2SModel(object):
def __init__(self,
source_vocab_size,
target_vocab_size,
buckets,
size,
dropout,
num_layers,
... | apache-2.0 | 883,289,279,071,003,100 | 34.851852 | 85 | 0.506622 | false | 4.05137 | false | false | false |
liosha2007/temporary-groupdocs-python-sdk | groupdocs/models/GetJobsDocumentsResponse.py | 1 | 1166 | #!/usr/bin/env python
"""
Copyright 2012 GroupDocs.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable... | apache-2.0 | 6,006,836,324,678,266,000 | 29.684211 | 77 | 0.650086 | false | 4.554688 | false | false | false |
rbuffat/pyepw | tests/test_typical_or_extreme_periods.py | 1 | 2262 | import os
import tempfile
import unittest
from pyepw.epw import TypicalOrExtremePeriods, TypicalOrExtremePeriod, EPW
class TestTypicalOrExtremePeriods(unittest.TestCase):
def setUp(self):
self.fd, self.path = tempfile.mkstemp()
def tearDown(self):
os.remove(self.path)
def test_create_ty... | apache-2.0 | 546,571,778,201,440,830 | 49.266667 | 131 | 0.707339 | false | 3.011984 | false | false | false |
prov-suite/interop-test-harness | prov_interop/provman/converter.py | 1 | 5717 | """Manages invocation of ProvScala `provmanagement` script.
"""
# Copyright (c) 2015 University of Southampton
#
# 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,
# includi... | mit | 7,667,281,623,494,982,000 | 44.015748 | 148 | 0.659612 | false | 4.275991 | true | false | false |
eRestin/Mezz | mhnweb/settings.py | 1 | 12829 | ALLOWED_HOSTS = ['*']
######################
# MEZZANINE SETTINGS #
######################
# The following settings are already defined with default values in
# the ``defaults.py`` module within each of Mezzanine's apps, but are
# common enough to be put here, commented out, for convenient
# overriding. Please consult... | bsd-2-clause | 3,279,203,851,268,689,400 | 34.244505 | 123 | 0.689376 | false | 3.540988 | false | false | false |
tavallaie/RoboDynamixel | dxl/dxlregisters.py | 1 | 1221 | #!/usr/bin/env python
# Dynamixel library for MX28 and MX64
# WINDOWS WARNING: For best performance, parameters of the COM Port should be set to maximum baud rate, and 1ms delay (Device Manager, COM Ports, properties, advanced)
class DxlRegister():
def __init__(self,address,size,mode='r',eeprom=Fa... | mit | 3,903,318,515,910,308,000 | 41.103448 | 171 | 0.685504 | false | 2.852804 | false | false | false |
trmznt/genaf | genaf/views/utils/plot.py | 1 | 3274 |
# general plot / graphics utility using matplotlib
from genaf.views.tools import *
from matplotlib import pyplot as plt
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
import pandas
import io, base64
@roles( PUBLIC )
def index(request):
# check... | lgpl-3.0 | -8,268,746,101,189,477,000 | 25.617886 | 84 | 0.583079 | false | 3.566449 | false | false | false |
Osndok/zim-desktop-wiki | zim/plugins/tasklist/__init__.py | 1 | 8109 | # -*- coding: utf-8 -*-
# Copyright 2009-2017 Jaap Karssenberg <jaap.karssenberg@gmail.com>
# TODO: allow more complex queries for filter, in particular (NOT tag AND tag)
# allow multiple tabs in dialog / side pane with configurable query
#
# TODO: add an interface for this plugin in the WWW frontend
#
# TODO: ... | gpl-2.0 | 1,262,954,511,106,585,300 | 34.41048 | 105 | 0.702429 | false | 3.370324 | false | false | false |
turdusmerula/kipartman | kipartbase/swagger_server/controllers/controller_upload_file.py | 1 | 1796 | import connexion
from swagger_server.models.upload_file import UploadFile
from swagger_server.models.upload_file_data import UploadFileData
from swagger_server.models.error import Error
from datetime import date, datetime
from typing import List, Dict
from six import iteritems
from ..util import deserialize_date, dese... | gpl-3.0 | 5,873,611,844,778,625,000 | 27.507937 | 86 | 0.713808 | false | 3.628283 | false | false | false |
mikelolasagasti/revelation | src/lib/ui.py | 1 | 48073 | #
# Revelation - a password manager for GNOME 2
# http://oss.codepoet.no/revelation/
# $Id$
#
# Module for UI functionality
#
#
# Copyright (c) 2003-2006 Erik Grinaker
#
# 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 Fr... | gpl-2.0 | 1,417,248,840,331,954,200 | 30.297526 | 239 | 0.599339 | false | 3.599356 | false | false | false |
conklinbd/MovementAnalysis | TemplateInstall/PortalDeploy/arcrest/ags/featureservice.py | 1 | 15911 | """
Contains information regarding an ArcGIS Server Feature Server
"""
from re import search
from .._abstract.abstract import BaseAGSServer, BaseSecurityHandler
from ..security import security
import layer
import json
from ..common.geometry import SpatialReference
from ..common.general import FeatureSet
from ..commo... | apache-2.0 | -8,352,142,267,933,846,000 | 39.281013 | 86 | 0.452831 | false | 5.612346 | false | false | false |
wbonnet/lffs | toolkit/dft/build_firmware_update.py | 1 | 8151 | #
# The contents of this file are subject to the Apache 2.0 license you may not
# use this file except in compliance with the License.
#
# Software distributed under the License is distributed on an "AS IS" basis,
# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
# for the specific language gov... | apache-2.0 | 8,113,699,216,175,973,000 | 38 | 100 | 0.617961 | false | 4.518293 | false | false | false |
ben-e-whitney/the-points-chart | utilities/views.py | 1 | 2100 | from django.shortcuts import render
import decimal
class TableElement:
"""
Represent an individual cell of an HTML table.
"""
def __init__(self, title=None, CSS_classes=None, content=None):
self.title = title
self.CSS_classes = CSS_classes
self.content = content
class TablePa... | gpl-3.0 | 7,983,015,587,877,793,000 | 30.757576 | 79 | 0.594943 | false | 3.910448 | false | false | false |
OpenBeta/beta | apiserver/model.py | 1 | 9792 | from flask_sqlalchemy import SQLAlchemy
from sqlalchemy.dialects import postgresql
from geoalchemy2 import Geometry
from sqlalchemy import func, ForeignKey, PrimaryKeyConstraint, event, Sequence
from sqlalchemy.schema import DropTable
from sqlalchemy.ext.compiler import compiles
import flask_login
from datetime import ... | gpl-3.0 | -8,655,785,475,700,712,000 | 33.478873 | 107 | 0.625613 | false | 3.495894 | false | false | false |
SINGROUP/pycp2k | pycp2k/classes/_each304.py | 1 | 1114 | from pycp2k.inputsection import InputSection
class _each304(InputSection):
def __init__(self):
InputSection.__init__(self)
self.Just_energy = None
self.Powell_opt = None
self.Qs_scf = None
self.Xas_scf = None
self.Md = None
self.Pint = None
self.Meta... | lgpl-3.0 | -3,167,931,075,788,382,700 | 41.846154 | 447 | 0.576302 | false | 2.908616 | false | false | false |
xia2/xia2 | src/xia2/Wrappers/Dials/EstimateGain.py | 1 | 1399 | from xia2.Driver.DriverFactory import DriverFactory
from xia2.Schema.Interfaces.FrameProcessor import FrameProcessor
def EstimateGain(DriverType=None):
"""A factory for EstimateGainWrapper classes."""
DriverInstance = DriverFactory.Driver(DriverType)
class EstimateGainWrapper(DriverInstance.__class__, F... | bsd-3-clause | 5,109,846,030,004,419,000 | 30.795455 | 78 | 0.591851 | false | 4.239394 | false | false | false |
yueyongyue/saltshaker | shaker/highstate.py | 1 | 1467 | import os
class HighState(object):
def __init__(self):
if os.path.isfile('/etc/salt/master.d/file_roots.conf') == True:
os.system("mkdir -p /srv/salt")
else:
file_roots = file("/etc/salt/master.d/file_roots.conf", "w+")
add = ["file_roots:\n", " base:\n", " -... | apache-2.0 | 7,973,569,440,805,450,000 | 28.34 | 73 | 0.521472 | false | 3.356979 | false | false | false |
mkollaro/destroystack | destroystack/tools/server_manager.py | 1 | 7151 | # Copyright (c) 2013 Red Hat, 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 ... | apache-2.0 | 3,963,596,485,430,058,500 | 37.240642 | 79 | 0.61418 | false | 4.441615 | true | false | false |
Som-Energia/invoice-janitor | invoicing/f1fixing/import_error/models.py | 1 | 24323 | # -*- coding: utf-8 -*-
from lxml import etree, objectify
import base64
import re
import os
from datetime import datetime
import dateutil.parser
import xmlformatter
## Codis OCSUM - F1
# Codi periode
codigoPeriodo_to_P = {
1:'P1', 03:'P2',10:'P1',21:'P1',22:'P2',31:'P1',32:'P2',33:'P3',41:'P1',
42:'P... | agpl-3.0 | -3,406,983,610,301,352,000 | 36.642415 | 201 | 0.525827 | false | 3.543573 | false | false | false |
Kayoku/iotari | work-area/wireless-sensor/sensor.py | 1 | 2978 | import datetime
import json
from pprint import pprint
import requests
class Sensor():
"""Abstract sensor class."""
def __init__(self, uuid):
"""Initialisation."""
# find a way to get a stable name
self.uuid = uuid
def save_measure(self):
"""How to save a ne... | mit | 6,726,347,953,359,607,000 | 33.879518 | 111 | 0.520484 | false | 4.309696 | false | false | false |
ContinuumIO/dask | dask/dataframe/accessor.py | 2 | 5362 | import numpy as np
import pandas as pd
from functools import partial
from ..utils import derived_from
def maybe_wrap_pandas(obj, x):
if isinstance(x, np.ndarray):
if isinstance(obj, pd.Series):
return pd.Series(x, index=obj.index, dtype=x.dtype)
return pd.Index(x)
return x
class... | bsd-3-clause | -6,140,759,249,159,344,000 | 29.64 | 107 | 0.586162 | false | 3.925329 | false | false | false |
fakdora/flaksy-upto-login | app/main/views.py | 1 | 3865 | from flask import render_template, redirect, url_for, abort, flash, request,\
current_app
from flask.ext.login import login_required, current_user
from . import main
from .forms import EditProfileForm, EditProfileAdminForm, PostForm
from .. import db
from ..models import Permission, Role, User, Post
from ..decorato... | mit | -6,375,092,692,908,061,000 | 35.809524 | 77 | 0.656145 | false | 3.545872 | false | false | false |
quentinhardy/odat | ExternalTable.py | 1 | 7140 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from DirectoryManagement import DirectoryManagement
import logging, random, string
from Utils import checkOptionsGivenByTheUser
from Constants import *
class ExternalTable (DirectoryManagement):
'''
Allow the user to read file thanks to external tables
'''
def __init__(... | lgpl-3.0 | 8,598,786,521,398,740,000 | 43.886792 | 405 | 0.711223 | false | 3.361752 | true | false | false |
Azure/azure-sdk-for-python | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_06_01/aio/operations/_deleted_web_apps_operations.py | 1 | 11568 | # 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 may ... | mit | -4,093,610,424,113,834,000 | 46.216327 | 179 | 0.635979 | false | 4.423709 | true | false | false |
werehuman/cocaine-tools | cocaine/tools/actions/crashlog.py | 1 | 7060 | #
# Copyright (c) 2013+ Anton Tyurin <noxiouz@yandex.ru>
# Copyright (c) 2013+ Evgeny Safronov <division494@gmail.com>
# Copyright (c) 2011-2014 Other contributors as noted in the AUTHORS file.
#
# This file is part of Cocaine-tools.
#
# Cocaine is free software; you can redistribute it and/or modify
# it under the ter... | lgpl-3.0 | -3,078,409,603,253,153,300 | 36.157895 | 109 | 0.616997 | false | 3.950755 | false | false | false |
yeti-platform/yeti | core/web/api/export.py | 1 | 3616 | from __future__ import unicode_literals
import os
from flask import send_from_directory, make_response
from flask_classy import route
from mongoengine.errors import DoesNotExist
from core.web.api.crud import CrudApi
from core import exports
from core.web.api.api import render
from core.helpers import string_to_timed... | apache-2.0 | 2,652,748,986,496,160,000 | 32.174312 | 148 | 0.595409 | false | 4.067492 | false | false | false |
Alexoner/mooc | coursera/nlpintro-001/Assignment2/solutionsA.py | 1 | 9462 | import math
import nltk
import time
import sys
# Constants to be used by you when you fill the functions
START_SYMBOL = '*'
STOP_SYMBOL = 'STOP'
MINUS_INFINITY_SENTENCE_LOG_PROB = -1000
log2 = lambda x: math.log(x, 2)
# TODO: IMPLEMENT THIS FUNCTION
# Calculates unigram, bigram, and trigram probabilities given a tra... | apache-2.0 | 5,338,700,109,794,599,000 | 32.792857 | 143 | 0.570915 | false | 3.636434 | false | false | false |
soumyanishan/azure-linux-extensions | VMAccess/vmaccess.py | 1 | 18922 | #!/usr/bin/env python
#
# VMAccess extension
#
# Copyright 2014 Microsoft Corporation
#
# 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
#
# Un... | apache-2.0 | 2,167,910,506,784,171,300 | 38.919831 | 133 | 0.595973 | false | 3.615899 | true | false | false |
firebase/firebase-admin-python | setup.py | 1 | 2584 | # Copyright 2017 Google 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 writing, ... | apache-2.0 | -2,863,027,261,551,218,000 | 35.914286 | 100 | 0.674923 | false | 3.839525 | false | false | false |
allanlei/django-backup | example/settings.py | 1 | 5087 | # Django settings for example project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle... | bsd-3-clause | 4,444,275,903,648,570,400 | 32.032468 | 134 | 0.684097 | false | 3.686232 | false | false | false |
iot-factory/synapse | synapse/storage/transactions.py | 1 | 10722 | # -*- coding: utf-8 -*-
# Copyright 2014, 2015 OpenMarket Ltd
#
# 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 | -488,149,266,400,128,260 | 29.202817 | 85 | 0.561929 | false | 4.533615 | false | false | false |
esa/SpaceAMPL | interplanetary/impulsive/single_phase/include/writeequations.py | 1 | 13720 | import sys;
file = open("equations.inc","w")
file2 = open("writeinitialguess.inc","w")
file3 = open("writesolution.inc","w")
file4 = open("guesstangential.inc","w")
n=int(sys.argv[1]);
file.write("#------------------------------------------------------------------------\n")
file.write("#Optimisation Variables\n\n")
... | gpl-2.0 | -1,191,002,370,958,845,400 | 54.772358 | 279 | 0.490233 | false | 2.27529 | false | false | false |
sky15179/Debug | TestTabelController/my-python/relaceGuideImages.py | 1 | 3738 | #!/usr/bin/python
# coding:utf-8
import os
import re
import fnmatch
import zipfile
import shutil
import getpass
import glob
PATH = "/Users/"+ getpass.getuser() + "/Downloads"
ProtectImagePath = "/Users/wzg/Downloads/testimage/help_images"
prefix = "FS_HelpGuide_"
#获取替换文件的路径
def realProtectImagePath():
global Pro... | apache-2.0 | 614,262,965,934,811,400 | 28.38843 | 99 | 0.600675 | false | 3.212285 | false | false | false |
mxcube/mxcube | mxcubeqt/utils/widget_utils.py | 1 | 9801 | #
# Project: MXCuBE
# https://github.com/mxcube
#
# This file is part of MXCuBE software.
#
# MXCuBE is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your... | lgpl-3.0 | -875,978,514,272,446,100 | 37.435294 | 86 | 0.540149 | false | 4.3502 | false | false | false |
google/tink | python/tink/jwt/_jwt_key_templates.py | 1 | 4813 | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | -4,097,483,200,969,170,000 | 31.965753 | 81 | 0.724288 | false | 2.73777 | false | false | false |
ramrom/haus | gmail.py | 1 | 2126 | #!/usr/local/bin/python
import httplib2
import os, pdb
from apiclient import discovery
from oauth2client import client
from oauth2client import tools
from oauth2client.file import Storage
try:
import argparse
flags = argparse.ArgumentParser(parents=[tools.argparser]).parse_args()
except ImportError:
flags... | mit | -8,412,286,651,052,823,000 | 28.943662 | 80 | 0.716369 | false | 3.796429 | false | false | false |
mouton5000/DiscreteEventApplicationEditor | game/Registeries/SpriteRegistery.py | 1 | 2662 | from pygame.rect import Rect
__author__ = 'mouton'
from pygame.sprite import Sprite
import pygame
from collections import defaultdict
from copy import copy
_rootDir = None
_spritesList = defaultdict(pygame.sprite.OrderedUpdates)
_rectsToUpdate = []
def init(rootDir):
global _rootDir
_rootDir = rootDir
... | mit | 7,548,703,405,394,868,000 | 25.89899 | 108 | 0.614576 | false | 3.507246 | false | false | false |
CVSoft/UTQuery | Demo_GSQuery.py | 1 | 3672 | from time import sleep
import GSQuery
# Let's pick a server. We'll use TeamRectifier as they're usually populated.
gs = GSQuery.GSServer('31.186.250.42')
# Let's get the basic server details with the GameSpy query protocol.
# The query methods return dictionary types, so we can store them for later use
# in... | gpl-3.0 | -4,055,352,095,003,567,600 | 40.697674 | 80 | 0.668573 | false | 3.607073 | false | false | false |
otsaloma/gaupol | aeidon/pattern.py | 1 | 1548 | # -*- coding: utf-8 -*-
# Copyright (C) 2007 Osmo Salomaa
#
# 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 pr... | gpl-3.0 | 660,636,134,076,191,900 | 31.93617 | 76 | 0.677649 | false | 4.095238 | false | false | false |
fernandog/Medusa | ext/sqlalchemy/engine/__init__.py | 1 | 20438 | # engine/__init__.py
# Copyright (C) 2005-2018 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""SQL connections, SQL execution and high-level DB-API interface.
The engine pa... | gpl-3.0 | 5,816,460,592,037,326,000 | 42.392781 | 137 | 0.683139 | false | 4.615628 | true | false | false |
Workday/OpenFrame | tools/telemetry/catapult_base/dependency_manager/cloud_storage_info.py | 1 | 3811 | # Copyright 2015 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import os
import stat
from catapult_base import cloud_storage
from catapult_base.dependency_manager import exceptions
class CloudStorageInf... | bsd-3-clause | 6,174,460,862,816,630,000 | 36.362745 | 80 | 0.674888 | false | 3.998951 | false | false | false |
smallyear/linuxLearn | salt/salt/states/reg.py | 1 | 13518 | # -*- coding: utf-8 -*-
r'''
===========================
Manage the Windows registry
===========================
Many python developers think of registry keys as if they were python keys in a
dictionary which is not the case. The windows registry is broken down into the
following components:
-----
Hives
-----
This is... | apache-2.0 | 7,227,832,016,917,860,000 | 31.731235 | 99 | 0.575159 | false | 3.961899 | true | false | false |
rfaulkner/databayes | http/databayes_api/views.py | 1 | 13088 | """
Defines the routing endpoints of the RESTful API for databayes.
Each method corresponds to an API action and returns the status of the action and the output. This
layer handles communication to the databayes daemon.
IMPORTANT NOTE! - Only one of these server instances should be running to avoid r... | apache-2.0 | 8,312,816,424,362,879,000 | 34.468835 | 103 | 0.575718 | false | 3.684685 | false | false | false |
purisc-group/purisc | compiler/class_def/conversions/arithmetic.py | 1 | 29184 | from helpers import next_subleq
from helpers import subleq
from helpers import clear
import re
def add(instr, assem):
a = instr.args[0];
b = instr.args[1];
c = instr.result;
t0 = assem.getNextTemp();
#check for literals
if re.match("\d+",a):
if a not in assem.dataMem:
asse... | gpl-2.0 | 1,400,089,787,447,496,400 | 34.20386 | 136 | 0.601186 | false | 2.42856 | false | false | false |
markmuetz/stormtracks | stormtracks/results.py | 1 | 3180 | import os
from glob import glob
import pandas as pd
from load_settings import settings
from utils.utils import compress_file, decompress_file
RESULTS_TPL = '{0}.hdf'
class ResultNotFound(Exception):
'''Simple exception thrown if result cannot be found in results manager or on disk'''
pass
class Stormtrac... | mit | -2,510,691,410,342,341,000 | 31.783505 | 103 | 0.650629 | false | 3.638444 | false | false | false |
guolivar/totus-niwa | service/thirdparty/featureserver/FeatureServer/DataSource/Flickr.py | 1 | 4910 | from FeatureServer.DataSource import DataSource
from vectorformats.Feature import Feature
from FeatureServer.Exceptions.NoGeometryException import NoGeometryException
import md5
import urllib
from lxml import etree
from StringIO import StringIO
class Flickr (DataSource):
def __init__(self, name, api_key, api_se... | gpl-3.0 | -8,789,628,092,533,478,000 | 31.959732 | 155 | 0.509776 | false | 4.074689 | false | false | false |
rmsk2/Das-grosse-Quiz | client/playingfield.py | 1 | 19375 | ################################################################################
# Copyright 2016 Martin Grap
#
# 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/li... | apache-2.0 | 3,814,428,693,370,683,400 | 45.130952 | 145 | 0.612284 | false | 4.459148 | false | false | false |
tcstewar/embodied_benchmarks | control.py | 1 | 3938 | import numpy as np
class Signal(object):
def __init__(self, D, L, dt, max_freq, seed=None):
rng = np.random.RandomState(seed=seed)
steps = int(max_freq * L)
self.w = 2 * np.pi * np.arange(steps) / L
self.A = rng.randn(D, steps) + 1.0j * rng.randn(D, steps)
power = np.sqrt(... | gpl-2.0 | 7,529,953,417,347,471,000 | 28.38806 | 90 | 0.550279 | false | 3.026902 | false | false | false |
mariodebian/jclic-browser | python-examples/demo.py | 1 | 3681 | # This is an example for demonstrating use of the GtkTreeView widget.
# The code in this example is not particularly good: it is written to
# concentrate on widget usage demonstration, not for maintainability.
import pygtk
pygtk.require("2.0")
import gtk
import gobject
view = None
choose_parent_view = None
dialog = N... | gpl-2.0 | 3,050,538,211,119,226,000 | 28.685484 | 79 | 0.646292 | false | 3.459586 | false | false | false |
blckshrk/Weboob | contrib/windows-install/ez_setup.py | 1 | 11838 | #!python
"""Bootstrap setuptools installation
If you want to use setuptools in your package's setup.py, just include this
file in the same directory with it, and add this to the top of your setup.py::
from ez_setup import use_setuptools
use_setuptools()
If you want to require a specific version of setuptools... | agpl-3.0 | -6,922,584,917,193,558,000 | 30.994595 | 87 | 0.622149 | false | 3.94995 | false | false | false |
KingxBanana/zulip | zproject/settings.py | 1 | 41223 | from __future__ import absolute_import
# Django settings for zulip project.
########################################################################
# Here's how settings for the Zulip project work:
#
# * settings.py contains non-site-specific and settings configuration
# for the Zulip Django app.
# * settings.py impor... | apache-2.0 | -763,140,899,692,655,200 | 36.853994 | 128 | 0.555418 | false | 3.860916 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.