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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
RedHatInsights/insights-core | insights/parsers/tests/test_firewall_config.py | 1 | 1081 | import doctest
import pytest
from insights.parsers import firewall_config
from insights.parsers.firewall_config import FirewallDConf
from insights.tests import context_wrap
from insights.parsers import SkipException
FIREWALLD_CONFIG = """
# firewalld config file
# default zone
# The default zone used if an empty zone... | apache-2.0 | 8,679,554,816,207,746,000 | 23.022222 | 74 | 0.742831 | false | 3.50974 | true | false | false |
bingopodcast/bingos | bingo_emulator/nashville/game.py | 1 | 97141 | #!/usr/bin/python
import logging
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(name)s - %(levelname)s - %(message)s")
import procgame.game, sys, os
import procgame.config
import random
import procgame.sound
sys.path.insert(0,os.path.pardir)
import bingo_emulator.common.units as units
import bingo_em... | gpl-3.0 | 6,612,536,435,175,324,000 | 51.851469 | 222 | 0.517495 | false | 3.653291 | false | false | false |
RobinQuetin/CAIRIS-web | cairis/cairis/RequirementsDocumentationPanel.py | 1 | 5734 | # 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... | apache-2.0 | -8,549,029,831,841,858,000 | 42.439394 | 122 | 0.765085 | false | 3.306805 | false | false | false |
darwin4031/graphene-jwt-auth | graphene_jwt_auth/graphene/relay/mutation.py | 1 | 8227 | import binascii
import re
from functools import partial
import six
from django.core.exceptions import ValidationError
from django.shortcuts import get_object_or_404 as _get_object_or_404
from graphene.types import AbstractType, Argument, Field, InputObjectType, String
from graphene.types.objecttype import ObjectType, ... | mit | -6,095,938,651,786,830,000 | 31.517787 | 107 | 0.602164 | false | 4.267116 | false | false | false |
Bergurth/aes_cmdl.py | fileAES.py | 1 | 1701 | import os, random, struct
from Crypto.Cipher import AES
import hashlib
in_file = raw_input("please specify input file")
out_file = raw_input("please specify output file")
password = raw_input("please specify your password")
key = hashlib.sha256(password).digest()
def encrypt_file(key, in_filename, out_filename=N... | gpl-3.0 | 5,778,495,562,864,639,000 | 27.35 | 73 | 0.581423 | false | 3.974299 | false | false | false |
not-na/peng3d | peng3d/gui/button.py | 1 | 37792 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# button.py
#
# Copyright 2016 notna <notna@apparat.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 2 of the Licens... | gpl-2.0 | -826,491,473,431,291,100 | 36.492063 | 191 | 0.523788 | false | 3.262431 | false | false | false |
swiftcoder/aurae | glfw/glfw.py | 1 | 37564 | import libglfw
import ctypes
## MACROS
GLFW_VERSION_MAJOR = 3
GLFW_VERSION_MINOR = 0
GLFW_VERSION_REVISION = 1
GLFW_RELEASE = 0
GLFW_PRESS = 1
GLFW_REPEAT = 2
GLFW_KEY_UNKNOWN = -1
GLFW_KEY_SPACE = 32
GLFW_KEY_APOSTROPHE = 39
GLFW_KEY_COMMA = 44
GLFW_KEY_MINUS = 45
GLFW_KEY_PERIOD = 46
GLFW_KEY_SLASH = 47
GLFW_KEY_0 ... | mit | 3,688,109,167,696,255,500 | 24.852719 | 229 | 0.755511 | false | 3.181502 | false | false | false |
dgwartney/Coursera | ltp/assignment3/a3.py | 1 | 5839 | """A board is a list of list of str. For example, the board
ANTT
XSOB
is represented as the list
[['A', 'N', 'T', 'T'], ['X', 'S', 'O', 'B']]
A word list is a list of str. For example, the list of words
ANT
BOX
SOB
TO
is represented as the list
['ANT', 'BOX', 'SOB', 'TO']
"""
def is_v... | mit | 2,122,560,598,384,907,500 | 24.386957 | 101 | 0.560027 | false | 3.373195 | false | false | false |
yfdyh000/pontoon | pontoon/sync/tests/test_changeset.py | 1 | 10186 | from django_nose.tools import (
assert_equal,
assert_false,
assert_not_in,
assert_raises,
assert_true
)
from mock import Mock
from pontoon.base.models import Entity
from pontoon.base.tests import (
assert_attributes_equal,
TranslationFactory,
UserFactory,
)
from pontoon.base.utils impor... | bsd-3-clause | 2,789,968,064,152,634,000 | 34.866197 | 94 | 0.620067 | false | 4.013396 | true | false | false |
danaukes/popupcad | popupcad/manufacturing/transform_internal.py | 2 | 9863 | # -*- coding: utf-8 -*-
"""
Written by Daniel M. Aukes and CONTRIBUTORS
Email: danaukes<at>asu.edu.
Please see LICENSE for full license.
"""
import sys
import qt.QtCore as qc
import qt.QtGui as qg
import popupcad
from popupcad.filetypes.operation2 import Operation2
from popupcad.widgets.dragndroptree import Draggable... | mit | -5,331,008,609,656,373,000 | 37.527344 | 158 | 0.64747 | false | 3.623439 | false | false | false |
scsouthw/project-oxford-python | tests/projectoxford_tests/TestPersonGroup.py | 1 | 4061 | import os
import sys
import unittest
import uuid
rootDirectory = os.path.dirname(os.path.realpath('__file__'))
if rootDirectory not in sys.path:
sys.path.append(os.path.join(rootDirectory, '..'))
from projectoxford.Client import Client
class TestPersonGroup(unittest.TestCase):
'''Tests the project oxford API... | mit | 2,843,762,266,866,556,400 | 43.637363 | 98 | 0.682098 | false | 3.685118 | true | false | false |
googleapis/googleapis-gen | google/cloud/assuredworkloads/v1beta1/assuredworkloads-v1beta1-py/setup.py | 1 | 1802 | # -*- coding: utf-8 -*-
# Copyright 2020 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... | apache-2.0 | 775,368,215,547,300,900 | 33 | 74 | 0.660377 | false | 3.715464 | false | false | false |
VirgilSecurity/virgil-sdk-python | virgil_sdk/client/card_client.py | 1 | 5820 | # Copyright (C) 2016-2019 Virgil Security Inc.
#
# Lead Maintainer: Virgil Security Inc. <support@virgilsecurity.com>
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# (1) Redistribution... | bsd-3-clause | -1,768,210,681,196,314,400 | 31.513966 | 81 | 0.634021 | false | 4.439359 | false | false | false |
tonghuashuai/OnlyRSSWeb | _new/model/db.py | 1 | 3907 | #!/usr/bin/env python
#coding: utf-8
import mongokit
from mongokit import Document, Connection
from mongokit.document import DocumentProperties
from bson.objectid import ObjectId
from misc.config import MONGO_CONFIG, DB
_iterables = (list, tuple, set, frozenset)
mongo = Connection(**MONGO_CONFIG)
class CallableMi... | mit | 7,919,988,544,282,106,000 | 28.656489 | 91 | 0.550837 | false | 3.685958 | false | false | false |
andrewyoung1991/supriya | supriya/tools/synthdeftools/Range.py | 1 | 3122 | # -*- encoding: utf-8 -*-
import collections
from supriya.tools.systemtools.SupriyaObject import SupriyaObject
class Range(SupriyaObject):
r'''A range.
::
>>> synthdeftools.Range(-1., 1.)
Range(
minimum=-1.0,
maximum=1.0
)
::
>>> synthdeftool... | mit | -6,826,529,174,109,438,000 | 21.307143 | 77 | 0.502242 | false | 4.157124 | false | false | false |
roca-nation/microblog | config.py | 1 | 1351 | # -*- coding: utf8 -*-
import os
basedir = os.path.abspath(os.path.dirname(__file__))
CSRF_ENABLED = True
SECRET_KEY = 'you-will-never-guess'
OPENID_PROVIDERS = [
{'name': 'Google', 'url': 'https://www.google.com/accounts/o8/id'},
{'name': 'Yahoo', 'url': 'https://me.yahoo.com'},
{'name': 'AOL', 'url': 'h... | mit | 4,677,020,819,242,017,000 | 28.347826 | 75 | 0.674815 | false | 2.896996 | false | true | false |
Abjad/abjad | tests/test_mutate__split_container_by_duration.py | 1 | 2996 | import abjad
def test_mutate__split_container_by_duration_01():
"""
Split one container in score.
Adds tie after split.
"""
staff = abjad.Staff()
staff.append(abjad.Container("c'8 d'8"))
staff.append(abjad.Container("e'8 f'8"))
leaves = abjad.select(staff).leaves()
abjad.beam(leav... | gpl-3.0 | 4,066,872,706,251,469,000 | 20.098592 | 79 | 0.350801 | false | 3.952507 | false | false | false |
shiney-wh/phpsploit | deps/pyparsing-2.1.1/setup.py | 1 | 1266 | #!/usr/bin/env python
"""Setup script for the pyparsing module distribution."""
from setuptools import setup
import sys
import os
from pyparsing import __version__ as pyparsing_version
modules = ["pyparsing",]
setup(# Distribution meta-data
name = "pyparsing",
version = pyparsing_version,... | gpl-3.0 | 1,832,660,715,393,805,600 | 32.216216 | 81 | 0.612954 | false | 4.380623 | false | false | false |
box/box-python-sdk | test/unit/object/test_device_pin.py | 1 | 1639 | # coding: utf-8
from __future__ import unicode_literals
import pytest
from mock import Mock
from boxsdk.config import API
from boxsdk.object.device_pinner import DevicePinner
from boxsdk.network.default_network import DefaultNetworkResponse
@pytest.fixture(scope='module')
def delete_device_pin_response():
# py... | apache-2.0 | 4,855,624,397,770,303,000 | 33.87234 | 118 | 0.717511 | false | 3.393375 | true | false | false |
jashandeep-sohi/marsdial | analemma/gen_frames.py | 1 | 26548 | #!/usr/bin/python2
import argparse
import os
import psycopg2 as ps
from psycopg2.extensions import AsIs
from psycopg2.extras import Json, DictCursor
import bz2, cPickle
import numpy as np
import cv2
import colorsys
import matplotlib.pyplot as plt
from matplotlib.ticker import MultipleLocator
def unpack_img(bzip2ed_pi... | gpl-3.0 | -2,525,482,192,918,715,400 | 26.089796 | 109 | 0.629426 | false | 2.729871 | false | false | false |
Strubbl/pynder | socket_client.py | 1 | 1745 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This file is part of Pynder.
Pynder 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 ... | gpl-3.0 | 7,890,824,665,545,262,000 | 25.439394 | 84 | 0.596562 | false | 3.886414 | false | false | false |
AlexStarov/Shop | applications/authModel/models.py | 1 | 14329 | # -*- coding: utf-8 -*-
import re
import warnings
from django.db import models
from django.conf import settings
from django.core import validators
from django.core.mail import send_mail
from django.core.exceptions import ImproperlyConfigured
from django.contrib.auth.models import (
BaseUserManager, AbstractBaseUser... | apache-2.0 | -7,716,572,690,704,796,000 | 41.279874 | 107 | 0.51164 | false | 3.809861 | false | false | false |
spartakode/static-cms | src/core/posts/PostCRUD.py | 1 | 4621 | from ..statichtml import HtmlGenerator
import os, shutil
import filecmp
def savePost(postToSave, postDataStrategy):
postSaveResult = postDataStrategy.savePost(postToSave)
if postSaveResult:
postPageHtml = HtmlGenerator.generateHtmlForPostPage(postToSave)
mainPageHtml = HtmlGenerator.generateHtm... | gpl-2.0 | -561,678,747,646,950,200 | 53.364706 | 137 | 0.664358 | false | 3.966524 | true | false | false |
ndp-systemes/odoo-addons | stock_change_quant_reservation/tests/test_stock_change_quant_reservation.py | 1 | 18629 | # -*- coding: utf8 -*-
#
# Copyright (C) 2016 NDP Systèmes (<http://www.ndp-systemes.fr>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# Licen... | agpl-3.0 | -1,636,876,104,378,229,500 | 40.860674 | 112 | 0.582349 | false | 3.351565 | true | false | false |
AlexisEidelman/AnnuaireServicePublic | SIRENE/read_extract.py | 1 | 1226 | # -*- coding: utf-8 -*-
"""
@author: aeidelman
"""
import os
import pandas as pd
path = '/home/sgmap/data/SIRENE'
path_extract = os.path.join(path, 'sirene_NJ_4_et_7.csv')
tab = pd.read_csv(path_extract,
sep=';',
encoding='cp1252'
)
print(tab.SIREN.value_counts... | agpl-3.0 | 8,774,157,991,853,060,000 | 22.150943 | 65 | 0.595432 | false | 2.877934 | false | false | false |
AmeliaKnows/libgreader | libgreader/url.py | 1 | 1630 | # -*- coding: utf-8 -*-
class ReaderUrl(object):
READER_BASE_URL = 'https://www.google.com/reader/api'
API_URL = READER_BASE_URL + '/0/'
ACTION_TOKEN_URL = API_URL + 'token'
USER_INFO_URL = API_URL + 'user-info'
SUBSCRIPTION_LIST_URL = API_URL + 'subscription... | mit | 6,180,117,107,897,354,000 | 39.75 | 71 | 0.520859 | false | 3.299595 | false | false | false |
lsaffre/lino | lino/sphinxcontrib/actordoc.py | 1 | 21099 | # -*- coding: UTF-8 -*-
# Copyright 2013-2018 Rumma & Ko Ltd
# License: BSD (see file COPYING for details)
"""
A Sphinx extension used to write multilingual user documentation
for a Lino application.
.. rst:directive:: lino2rst
Execute Python code and process the output as reStructuredText
source code. This is ... | bsd-2-clause | 860,649,683,954,794,800 | 31.711628 | 110 | 0.553533 | false | 3.729715 | false | false | false |
open-mmlab/mmdetection | mmdet/models/losses/utils.py | 1 | 3055 | import functools
import mmcv
import torch.nn.functional as F
def reduce_loss(loss, reduction):
"""Reduce loss as specified.
Args:
loss (Tensor): Elementwise loss tensor.
reduction (str): Options are "none", "mean" and "sum".
Return:
Tensor: Reduced loss tensor.
"""
reduc... | apache-2.0 | 5,255,940,235,794,357,000 | 29.55 | 79 | 0.612766 | false | 3.941935 | false | false | false |
artemistomaras/django-ethereum-events | django_ethereum_events/migrations/0004_failedeventlog.py | 1 | 1618 | # Generated by Django 2.0.5 on 2018-06-01 14:42
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('django_ethereum_events', '0003_auto_20180531_0836'),
]
operations = [
migrati... | mit | -8,995,337,300,842,049,000 | 45.228571 | 174 | 0.60754 | false | 4.280423 | false | false | false |
anderscui/nails | nails/filesystem.py | 1 | 2608 | # coding=utf-8
import glob
import os
class File(object):
def __init__(self, path):
self.original = path
self.abspath = os.path.abspath(path)
def __str__(self):
prefix = ''
if self.isfile:
prefix = 'file: '
elif self.isdir:
prefix = 'dir: '
... | mit | 6,648,539,135,691,795,000 | 24.076923 | 74 | 0.580138 | false | 3.757925 | false | false | false |
simsays/fnc-1-baseline | imbd/imbd.py | 1 | 1197 | # LSTM for sequence classification in the IMDB dataset
import numpy
from keras.datasets import imdb
from keras.models import Sequential
from keras.layers import Dense
from keras.layers import LSTM
from keras.layers.embeddings import Embedding
from keras.preprocessing import sequence
# fix random seed for reproducibili... | apache-2.0 | 6,505,975,420,580,956,000 | 38.933333 | 87 | 0.768588 | false | 3.26158 | true | false | false |
omsharansalafia/waw | waw/vectors.py | 1 | 1569 | import numpy as np
#rotate vector
def Rotvec(v, axis, angle):
I = (axis, (axis+1)%3, (axis+2)%3)
v_r = np.zeros(3)
v_r[I[0]] = v[I[0]]
v_r[I[1]] = v[I[1]]*np.cos(angle) - v[I[2]]*np.sin(angle)
v_r[I[2]] = v[I[2]]*np.cos(angle) + v[I[1]]*np.sin(angle)
return v_r
#cross product
def CrossP(v1, v2):
v = np... | gpl-3.0 | 9,080,493,037,410,799,000 | 22.073529 | 160 | 0.636074 | false | 2.331352 | false | false | false |
novoid/Memacs | bin/memacs_git.py | 1 | 1115 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Time-stamp: <2013-04-04 16:18:40 vk>
from memacs.git import GitMemacs
PROG_VERSION_NUMBER = "0.1"
PROG_VERSION_DATE = "2011-12-20"
PROG_SHORT_DESCRIPTION = "Memacs for git files "
PROG_TAG = "git"
PROG_DESCRIPTION = """
This class will parse files from git rev-parse ou... | gpl-3.0 | 4,702,686,204,783,688,000 | 26.195122 | 67 | 0.688789 | false | 3.140845 | false | false | false |
stackforge/yaql | yaql/cli/run.py | 1 | 4906 | #!/usr/bin/env python
# Copyright (c) 2013-2015 Mirantis, 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
#
# Unles... | apache-2.0 | -3,969,916,339,632,384,500 | 37.031008 | 79 | 0.581737 | false | 4.054545 | false | false | false |
rmcgibbo/msmbuilder | msmbuilder/msm/bayesmsm.py | 1 | 16920 | """Bayesian Markov state model, with MCMC sampling of the transition matrix
posterior distribution. This can be used to assess sampling uncertainty
in the MSM transition matrix and functions of the transition matrix.
TODO
----
* MCMC for models which are not constrained to be reversible is currently
not implemented.... | lgpl-2.1 | -1,144,144,286,879,132,700 | 41.089552 | 107 | 0.618262 | false | 4.005682 | false | false | false |
selphia/ManagementScript | Aria2.py | 1 | 5019 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# File Title: Aria2.py
# Author: Selphia
# Mail: LoliSound@gmail.com
# Time: 2017年07月29日 星期六 21时49分38秒
# Version:
import os
import shutil
print('\033[32mYou will use the /var/www/html directory !!! y/n\033[0m')
confirm=input()
while True:
if confirm == "y" or con... | gpl-3.0 | -525,015,204,764,556,100 | 22.69375 | 80 | 0.699815 | false | 1.578925 | false | false | false |
pjh/walkscore-python | main.py | 1 | 2303 | #! /usr/bin/env python3
# Playground for exploring the Walk Score API. For now, just wrap the
# API calls with Python methods.
# Copyright (c) 2014 Peter Hornyack
from util.pjh_utils import *
from apis.walkscore import WalkScore
import argparse
import re
import sys
###################################################... | cc0-1.0 | -2,476,076,795,271,555,600 | 24.876404 | 78 | 0.644377 | false | 3.087131 | true | false | false |
cebix/ff7tools | ff7/data.py | 1 | 38665 | #
# ff7.data - Final Fantasy VII translation-related data tables
#
# Copyright (C) 2014 Christian Bauer <www.cebix.net>
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appe... | isc | 9,126,046,196,480,960,000 | 38.494382 | 120 | 0.530635 | false | 2.256888 | false | false | false |
hovo1990/deviser | generator/code_files/cpp_functions/ExtensionInitFunctions.py | 1 | 14595 | #!/usr/bin/env python
#
# @file ExtensionInitFunctions.py
# @brief class to create init and typedef functions specific to the
# extension class
# @author Frank Bergmann
# @author Sarah Keating
#
# <!--------------------------------------------------------------------------
#
# Copyright (c) 2013-2015 by the Cali... | lgpl-2.1 | 3,963,913,981,903,201,000 | 44.326087 | 81 | 0.473792 | false | 4.954175 | false | false | false |
YiqunPeng/Leetcode-pyq | solutions/538ConvertBSTToGreaterTree.py | 1 | 1251 | # Definition for a binary tree node.
# class TreeNode(object):
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
class Solution(object):
def convertBST(self, root):
"""
:type root: TreeNode
:rtype: TreeNode
"""
if not ... | gpl-3.0 | 2,915,769,715,882,592,000 | 31.947368 | 95 | 0.547562 | false | 3.183206 | false | false | false |
DavidAndreev/indico | indico/modules/bootstrap/forms.py | 1 | 1693 | # This file is part of Indico.
# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).
#
# Indico 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 (a... | gpl-3.0 | -3,164,545,394,781,205,000 | 46.027778 | 117 | 0.763733 | false | 4.129268 | false | false | false |
saskartt/P4UL | pyAnalyze/spectraFromData.py | 1 | 2684 | #!/usr/bin/env python
import sys
import numpy as np
import argparse
import matplotlib.pyplot as plt
from spectraTools import timeSeriesFromFiles, spectraAnalysis
from utilities import filesFromList
'''
Kaimal & Finnigan:
The requirements for averaging time T with T >> Tau_{\alpha} can then be expressed
in terms of \si... | mit | -7,516,670,325,188,104,000 | 38.470588 | 91 | 0.642325 | false | 3.481193 | false | false | false |
drzoidberg33/plexpy | plexpy/webserve.py | 1 | 230362 | # This file is part of Tautulli.
#
# Tautulli 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.
#
# Tautulli is distributed in the ... | gpl-3.0 | -1,186,629,433,141,431,800 | 38.277067 | 162 | 0.484338 | false | 4.444273 | true | false | false |
ciudadanointeligente/votainteligente-portal-electoral | suggestions_for_candidates/models.py | 1 | 4649 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from elections.models import Candidate
import uuid
from picklefield.fields import PickledObjectField
from django.utils.translation import ugettext_lazy as _
from django.core.urlresolvers import reverse
from votai_utils.send_ma... | gpl-3.0 | -693,950,009,193,505,200 | 40.150442 | 114 | 0.628092 | false | 4.332712 | false | false | false |
DataDog/integrations-core | zk/tests/common.py | 1 | 15616 | # (C) Datadog, Inc. 2010-present
# All rights reserved
# Licensed under Simplified BSD License (see LICENSE)
import os
from distutils.version import LooseVersion # pylint: disable=E0611,E0401
from datadog_checks.zk import ZookeeperCheck
ZK_VERSION = os.environ['ZK_VERSION']
STAT_METRICS = [
'zookeeper.latency... | bsd-3-clause | 4,162,607,959,543,834,000 | 38.836735 | 79 | 0.715868 | false | 3.195416 | false | false | false |
manuelcortez/socializer | src/views/dialogs/attach.py | 1 | 3005 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import wx
import widgetUtils
class attachDialog(widgetUtils.BaseDialog):
def __init__(self, voice_messages=False):
super(attachDialog, self).__init__(None, title=_("Add an attachment"))
panel = wx.Panel(self)
sizer = wx.BoxSizer(wx.VERTICAL)
lbl... | gpl-2.0 | 4,332,636,483,322,842,600 | 43.205882 | 195 | 0.679867 | false | 2.999002 | false | false | false |
Kiesum/tfrs-1 | server/urls.py | 1 | 9251 | """
REST API Documentation for the NRS TFRS Credit Trading Application
The Transportation Fuels Reporting System is being designed to streamline compliance reporting for transportation fuel suppliers in accordance with the Renewable & Low Carbon Fuel Requirements Regulation.
OpenAPI spec version: v1
... | apache-2.0 | 2,120,756,170,315,631,600 | 61.931973 | 208 | 0.689871 | false | 3.202146 | false | false | false |
valentin7/shazam-datascience | sql_exploration.py | 1 | 6552 | """
Thierry Bertin-Mahieux (2010) Columbia University
tb2332@columbia.edu
This code demo the use of the track_metadata.db
It is almost the same as demo_track_metadata.py
in the github repository
This is part of the Million Song Dataset project from
LabROSA (Columbia University) and The Echo Nest.
Copyright 2010, Thi... | mit | 210,318,195,930,757,250 | 34.61413 | 93 | 0.717949 | false | 3.468502 | false | false | false |
wingjay/ABot | common/entities.py | 1 | 1116 | # get entities from API.AI
import urllib2
import json
token = "8c1583c6a19d4ca09247a38ddcc2f740"
author_entity_id = "ad1e6041-0979-41bc-aa6b-3ef308f9045c"
time_range_entity_id = "c6645f34-3fdf-4ee6-8670-27991cb2dba6"
def get_all_entities():
return _handle_request("https://api.api.ai/v1/entities?v=20150910")
de... | mit | -6,456,663,891,065,940,000 | 29.162162 | 99 | 0.700717 | false | 2.936842 | false | false | false |
automan000/deeplab_v1_tf1.0 | eval_net.py | 1 | 6141 | """Training script for the DeepLab-LargeFOV network on the PASCAL VOC dataset
for semantic image segmentation.
This script trains the model using augmented PASCAL VOC dataset,
which contains approximately 10000 images for training and 1500 images for validation.
"""
from __future__ import print_function
import ar... | mit | 2,044,809,984,744,833,300 | 35.553571 | 109 | 0.617978 | false | 3.608108 | false | false | false |
pombredanne/django-fluent-contents | fluent_contents/admin/genericextensions.py | 1 | 3110 | from django.contrib.contenttypes.generic import BaseGenericInlineFormSet
from django.contrib.contenttypes.models import ContentType
from django.core.exceptions import ValidationError
from django.forms.formsets import ManagementForm
class BaseInitialGenericInlineFormSet(BaseGenericInlineFormSet):
"""
A formset... | apache-2.0 | 6,118,657,885,386,009,000 | 41.60274 | 104 | 0.599357 | false | 4.66967 | false | false | false |
izapolsk/integration_tests | cfme/tests/infrastructure/test_provisioning_dialog.py | 1 | 19319 | """This module tests various ways how to set up the provisioning using the provisioning dialog."""
import re
from datetime import datetime
from datetime import timedelta
import fauxfactory
import pytest
from widgetastic.utils import partial_match
from widgetastic_patternfly import CheckableBootstrapTreeview as CbTree
... | gpl-2.0 | -5,798,259,894,644,816,000 | 37.331349 | 100 | 0.639629 | false | 4.039941 | true | false | false |
Akki356/tunirtests | cloudservice.py | 1 | 1404 | """
From https://fedoraproject.org/wiki/QA:Testcase_base_service_manipulation.
"""
import unittest
from .testutils import system
class TestServiceManipulation(unittest.TestCase):
def test_service(self):
"Tests the crond service."
out, err, eid = system('systemctl status crond.service')
o... | gpl-2.0 | 7,676,986,060,129,325,000 | 29.521739 | 74 | 0.637464 | false | 3.754011 | true | false | false |
1905410/Misago | misago/users/views/admin/warnings.py | 1 | 2663 | from django.contrib import messages
from django.utils.translation import ugettext_lazy as _
from misago.admin.views import generic
from ...forms.admin import WarningLevelForm
from ...models import WarningLevel
class WarningsAdmin(generic.AdminBaseMixin):
root_link = 'misago:admin:users:warnings:index'
Model... | gpl-2.0 | 5,454,554,679,654,257,000 | 35.986111 | 79 | 0.651521 | false | 4.200315 | false | false | false |
nouiz/fredericbastien-ipaddr-py-speed-up | branches/1.1.x/ipaddr_test.py | 1 | 27006 | #!/usr/bin/python
#
# Copyright 2007 Google Inc.
# Licensed to PSF under a Contributor Agreement.
#
# 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/LICE... | apache-2.0 | -1,415,047,887,528,628,000 | 41.798732 | 80 | 0.586758 | false | 3.139867 | true | false | false |
googleapis/googleapis-gen | google/cloud/aiplatform/v1beta1/aiplatform-v1beta1-py/tests/unit/gapic/aiplatform_v1beta1/test_tensorboard_service.py | 1 | 310610 | # -*- coding: utf-8 -*-
# Copyright 2020 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... | apache-2.0 | -3,053,774,164,376,813,000 | 38.919034 | 271 | 0.666836 | false | 4.18928 | true | false | false |
smira/spamfighter | spamfighter/core/storage/dbm.py | 1 | 12214 | # -*- coding: utf-8 -*-
#
# SpamFighter, Copyright 2008, 2009 NetStream LLC (http://netstream.ru/, we@netstream.ru)
#
# This file is part of SpamFighter.
#
# SpamFighter 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 Fou... | gpl-3.0 | -7,370,860,864,834,763,000 | 28.504373 | 106 | 0.601383 | false | 2.436793 | false | false | false |
poeschlr/kicad-3d-models-in-freecad | cadquery/FCAD_script_generator/Buzzer_Beeper/cq_parameters_ProjectsUnlimited_AI_4228_TWT_R.py | 1 | 11578 | # -*- coding: utf-8 -*-
#!/usr/bin/python
#
# This is derived from a cadquery script for generating PDIP models in X3D format
#
# from https://bitbucket.org/hyOzd/freecad-macros
# author hyOzd
# This is a
# Dimensions are from Microchips Packaging Specification document:
# DS00000049BY. Body drawing is the same as QFP ... | gpl-2.0 | 4,031,514,028,823,489,500 | 39.065744 | 136 | 0.510537 | false | 3.575664 | false | false | false |
moralrecordings/mrcrowbar | mrcrowbar/utils.py | 1 | 42029 | """General utility functions useful for reverse engineering."""
import io
import json
import logging
import math
import mmap
import re
import time
logger = logging.getLogger( __name__ )
from mrcrowbar import ansi, colour, encoding as enco, statistics, sound
from mrcrowbar.common import is_bytes, read, bounds
globals... | bsd-3-clause | 2,572,690,008,431,053,300 | 32.041667 | 258 | 0.60601 | false | 4.149783 | false | false | false |
jamespcole/home-assistant | homeassistant/components/homematicip_cloud/light.py | 1 | 8295 | """Support for HomematicIP Cloud lights."""
import logging
from homeassistant.components.light import (
ATTR_BRIGHTNESS, ATTR_COLOR_NAME, ATTR_HS_COLOR, SUPPORT_BRIGHTNESS,
SUPPORT_COLOR, Light)
from . import DOMAIN as HMIPC_DOMAIN, HMIPC_HAPID, HomematicipGenericDevice
DEPENDENCIES = ['homematicip_cloud']
... | apache-2.0 | 2,990,449,941,266,183,000 | 31.916667 | 79 | 0.619048 | false | 4.044369 | false | false | false |
MrJarv1s/FEMur | FEMur/element1D.py | 1 | 5926 | from FEMur import Element
import sympy as sy
import numpy as np
import scipy as sc
import matplotlib.pyplot as plt
class Element1D(Element):
'Defines the Linear Elements with its nodes and shape functions'
total_elements = 0
def __init__(self, node_table):
Element.__init__(self) # Use methods def... | mit | 1,726,144,130,925,296,600 | 31.032432 | 79 | 0.545562 | false | 3.76972 | false | false | false |
depet/scikit-learn | sklearn/utils/tests/test_extmath.py | 1 | 12828 | # Authors: Olivier Grisel <olivier.grisel@ensta.org>
# Mathieu Blondel <mathieu@mblondel.org>
# Denis Engemann <d.engemann@fz-juelich.de>
#
# License: BSD 3 clause
import warnings
import numpy as np
from scipy import sparse
from scipy import linalg
from scipy import stats
from sklearn.utils.testing i... | bsd-3-clause | -6,668,223,828,831,916,000 | 33.858696 | 79 | 0.589258 | false | 3.265784 | true | false | false |
chrjxj/zipline | zipline/algorithm.py | 1 | 50802 | #
# Copyright 2014 Quantopian, 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 | 3,029,663,743,620,174,300 | 35.261242 | 98 | 0.577635 | false | 4.514931 | false | false | false |
drsuuzzz/murphy | murphy/Tree/intervalTree.py | 1 | 19911 | # Copyright 2016 Suzy M. Stiegelmeyer
#
# 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 agre... | apache-2.0 | -4,680,053,920,859,262,000 | 30.257457 | 80 | 0.470042 | false | 4.1292 | false | false | false |
ubuntunux/GuineaPig | PyEngine3D/Render/Renderer.py | 1 | 53223 | from ctypes import c_void_p
import math
import numpy as np
from OpenGL.GL import *
from OpenGL.GLU import *
from PyEngine3D.Common import logger, COMMAND
from PyEngine3D.Common.Constants import *
from PyEngine3D.Utilities import *
from PyEngine3D.OpenGLContext import InstanceBuffer, FrameBufferManager, RenderBuffer,... | bsd-2-clause | -8,127,988,727,559,477,000 | 48.555866 | 160 | 0.591211 | false | 3.928477 | false | false | false |
OpenKMIP/PyKMIP | kmip/tests/unit/core/messages/payloads/test_sign.py | 1 | 27056 | # Copyright (c) 2017 The Johns Hopkins University/Applied Physics Laboratory
# 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/LICEN... | apache-2.0 | -4,455,822,553,868,882,400 | 33.598465 | 79 | 0.598241 | false | 3.820929 | true | false | false |
jachym/PyWPS-SVN | pywps/Exceptions.py | 1 | 5645 | """Exception classes of WPS """
# Author: Jachym Cepicky
# http://les-ejk.cz
# Lince:
#
# Web Processing Service implementation
# Copyright (C) 2006 Jachym Cepicky
#
# 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
# th... | gpl-2.0 | 1,134,734,818,802,321,700 | 34.727848 | 156 | 0.66643 | false | 3.969761 | false | false | false |
isabellewei/deephealth | flask/classify.py | 1 | 1565 | import pandas as pd
import numpy as np
from sklearn.neighbors import KNeighborsClassifier
from sklearn.ensemble import AdaBoostClassifier, RandomForestClassifier
from sklearn.naive_bayes import GaussianNB
from sklearn.model_selection import train_test_split
from sklearn.metrics import accuracy_score
df = pd.read_csv('... | mit | -2,002,425,744,759,166,000 | 34.568182 | 100 | 0.746326 | false | 2.814748 | true | false | false |
scizzorz/tags | tags.py | 1 | 1923 | #!/usr/bin/env python
import argparse
import os
from datetime import datetime
class Tag:
DATE_FMT = '%a %m/%d/%y %I:%M%p'
def __init__(self, string=None, label=None, timestamp=None):
if string is not None:
temp = string.strip().split(maxsplit=1)
self.datetime = datetime.fromtimestamp(int(temp[... | mit | -3,636,266,787,856,154,600 | 27.279412 | 102 | 0.639626 | false | 3.40354 | false | false | false |
thombashi/pytablewriter | pytablewriter/writer/text/sourcecode/_pandas.py | 1 | 2546 | from typing import List
import typepy
from mbstrdecoder import MultiByteStrDecoder
from ....error import EmptyTableNameError
from ._numpy import NumpyTableWriter
class PandasDataFrameWriter(NumpyTableWriter):
"""
A writer class for Pandas DataFrame format.
:Example:
:ref:`example-pandas... | mit | -5,363,715,731,227,250,000 | 28.604651 | 112 | 0.575805 | false | 4.133117 | false | false | false |
seonon/conversion | conversion/cros.py | 1 | 1648 | from datetime import timedelta
from flask import make_response, request, current_app
from functools import update_wrapper
def crossdomain(origin=None, methods=None, headers=None,
max_age=21600, attach_to_all=True,
automatic_options=True):
if methods is not None:
methods = '... | apache-2.0 | 8,411,470,974,010,150 | 35.622222 | 67 | 0.601335 | false | 4.258398 | false | false | false |
ajweb/tweet-bed | tweetsheet/migrations/0001_initial.py | 1 | 1521 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.utils.timezone
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations ... | gpl-2.0 | -3,755,077,140,173,434,400 | 38 | 259 | 0.590401 | false | 4.408696 | false | false | false |
cmusatyalab/gabriel | examples/one_way/producer_client.py | 1 | 1552 | import argparse
import common
import cv2
from gabriel_protocol import gabriel_pb2
from gabriel_client.websocket_client import WebsocketClient
from gabriel_client.websocket_client import ProducerWrapper
from gabriel_client import push_source
DEFAULT_NUM_SOURCES = 1
ORG = (0, 120)
FONT_FACE = cv2.FONT_HERSHEY_PLAIN
FON... | apache-2.0 | -9,202,883,643,473,522,000 | 29.431373 | 71 | 0.63982 | false | 3.567816 | false | false | false |
bolkedebruin/airflow | airflow/providers/amazon/aws/operators/ecs.py | 1 | 9773 | # -*- coding: utf-8 -*-
#
# 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
#... | apache-2.0 | 4,982,320,452,461,951,000 | 39.891213 | 115 | 0.635015 | false | 4.185439 | true | false | false |
openslack/openslack-crawler | examples/dianpingtuan.py | 1 | 2344 | # -*- coding: utf-8 -*-
import logging
from xml.dom import minidom
import scrapy
from scrapy.utils.iterators import xmliter
from scrapy.utils.spider import iterate_spider_output
from crawler.utils.xml import get_xmlnode
logger = logging.getLogger("DianpingtuanSpider")
import sys
reload(sys)
sys.setdefaultencoding('... | apache-2.0 | -5,512,260,327,100,619,000 | 36.206349 | 96 | 0.578925 | false | 3.959459 | false | false | false |
box/box-python-sdk | test/unit/object/test_legal_hold_assignment.py | 1 | 2151 | # coding: utf-8
from __future__ import unicode_literals
import pytest
from mock import Mock
from boxsdk.object.legal_hold_policy_assignment import LegalHoldPolicyAssignment
from boxsdk.config import API
from boxsdk.network.default_network import DefaultNetworkResponse
def test_get(test_legal_hold_policy_assignment,... | apache-2.0 | 963,534,736,690,671,500 | 41.176471 | 128 | 0.726174 | false | 3.645763 | true | false | false |
angadpc/Alexa-Project- | twilio/rest/api/v2010/account/__init__.py | 1 | 34088 | # coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import InstanceResource
from twilio.base.... | mit | -4,228,409,906,570,266,600 | 30.130594 | 102 | 0.60335 | false | 4.263665 | false | false | false |
abramhindle/UnnaturalCodeFork | python/testdata/launchpad/lib/lp/blueprints/browser/person_upcomingwork.py | 1 | 11186 | # Copyright 2012 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Person upcoming view showing workitems and bugs for a person."""
__meta__ = type
__all__ = [
'PersonUpcomingWorkView',
]
from datetime import (
datetime,
timed... | agpl-3.0 | 987,920,398,187,531,000 | 33.418462 | 78 | 0.635527 | false | 4.183246 | false | false | false |
tomaspinho/python-rake | setup.py | 1 | 2518 | # This Python file uses the following encoding: utf-8
"""A setuptools based setup module.
See:
https://packaging.python.org/en/latest/distributing.html
https://github.com/pypa/sampleproject
"""
# Always prefer setuptools over distutils
from setuptools import setup, find_packages
setup(
name='python-rake',
#... | mit | 4,788,183,907,720,129,000 | 36.014706 | 97 | 0.652761 | false | 4.18802 | false | false | false |
arruda/rmr | rmr/apps/accounts/forms.py | 1 | 1626 | # -*- coding: utf-8 -*-
"""
apps.accounts.forms
~~~~~~~~~~~~~~
account forms
:copyright: (c) 2012 by arruda.
"""
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import User
from accounts.models import UserProfile, Quota
class Re... | mit | -3,323,253,853,036,967,000 | 27.051724 | 93 | 0.619926 | false | 4.394595 | false | false | false |
itucsdb1606/itucsdb1606 | diller.py | 1 | 2536 | import json
import datetime
import re
import os
import psycopg2 as dbapi2
from flask import Flask
from flask import render_template
from flask import redirect
from flask import request
from flask.helpers import url_for
class Dil:
def __init__(self, name, ulkesi, photo, bilenler):
self.name = name
... | gpl-3.0 | 7,185,455,684,053,360,000 | 24.029703 | 102 | 0.556171 | false | 3.22449 | false | false | false |
gmathers/iii-addons | partner_aging/supplier.py | 1 | 12614 | # -*- coding: utf-8 -*-
######################################################################
#
# Note: Program metadata is available in /__init__.py
#
######################################################################
from openerp.osv import fields, osv
from openerp import tools
class partner_aging_supplier(o... | agpl-3.0 | -7,394,357,974,684,762,000 | 58.781991 | 201 | 0.537419 | false | 3.79711 | false | false | false |
ganeshgore/myremolab | server/src/test/deployments/federated_basic_sql/provider1/provider1_machine/main_instance/core/server_config.py | 1 | 1797 | core_store_students_programs = False
core_store_students_programs_path = 'files_stored'
core_experiment_poll_time = 350 # seconds
# Ports
core_facade_soap_port = 20123
core_facade_xmlrpc_port = 29345
core_facade_json_port = 28345
admin_facade_json_port = 28545
core_web_facade_port = 29745
core_... | bsd-2-clause | -5,754,314,319,870,983,000 | 34.235294 | 117 | 0.593211 | false | 3.237838 | false | true | false |
zseder/hunmisc | hunmisc/wikipedia/split_inc.py | 1 | 2876 | """
Copyright 2011-13 Attila Zseder
Email: zseder@gmail.com
This file is part of hunmisc project
url: https://github.com/zseder/hunmisc
hunmisc 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
versi... | gpl-3.0 | -2,690,322,984,794,241,500 | 34.95 | 78 | 0.652643 | false | 3.855228 | false | false | false |
SAGES-UCSC/Photometry | createSexParam.py | 1 | 29377 | def createSexParam(name, doassoc):
param = name + '.param'
if doassoc == True:
va = "VECTOR_ASSOC"
na = "NUMBER_ASSOC"
else:
va = "#VECTOR_ASSOC"
na = "#NUMBER_ASSOC"
fout = open(param, 'w')
fout.write("""
NUMBER Running object number
#EXT_NUMBER ... | mit | -4,529,029,177,098,455,600 | 82.695157 | 103 | 0.530449 | false | 3.991983 | true | false | false |
nicholas-maltbie/Medina | HumanAgent.py | 1 | 11518 | """A human agent manages its own board and displays a board and adds moveable
pieces so a human agent can play pieces on the board from his or her hand"""
import Agent
import Move
import queue
import Board
import BoardCanvas
import Player
import Building
import Tile
import Location
import GameConstants
import threadin... | mit | -1,300,437,598,604,783,000 | 46.991667 | 132 | 0.584824 | false | 3.453673 | false | false | false |
alexandermendes/pybossa-github-builder | tests/test_view.py | 1 | 2824 | # -*- coding: utf8 -*-
import json
import urllib
from functools import wraps
from mock import patch, MagicMock, PropertyMock
from flask import Response, session, url_for, redirect
from default import flask_app, with_context
from helper import web
from pybossa_github_builder.view import _populate_form
from pybossa_gith... | bsd-3-clause | -2,648,864,846,172,951,600 | 42.446154 | 78 | 0.605524 | false | 3.884457 | false | false | false |
cuescience/cuescience-shop | shop/tests/support/view_support.py | 1 | 7510 | from decimal import Decimal
from django.test import TestCase
from natspec_utils.decorators import TextSyntax
from cuescience_shop.models import Product, Client, Order
from django.test.client import Client as TestClient
from cart.cart import Cart
class Request(object):
def __init__(self):
self.data = {}
... | mit | -1,757,960,965,274,652,200 | 41.191011 | 145 | 0.629827 | false | 3.753123 | true | false | false |
katsumin/HomeRpi | home_temp.py | 1 | 6602 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import smbus
import time
import datetime
import sys
sys.path.append("/home/pi/HomeRpi")
import commands
import ConfigParser
iniFile = ConfigParser.SafeConfigParser()
iniFile.read('./config.ini')
# influxDBサーバへ送信
url = iniFile.get('server', 'url')
def influxUp(text) :
... | mit | -388,211,997,118,062,700 | 30.114286 | 110 | 0.596419 | false | 2.146518 | false | false | false |
googleinterns/userjourneytool | ujt/id_constants.py | 1 | 6846 | """ Module holding constants for Dash components.
Let's improve the naming convention.
For signals, it makes sense to me to place the type first (i.e. "SIGNAL_*"),
since we want to quickly identify that it's a signal and we often group signals together.
For other types of components, it's unclear if this is better.
F... | apache-2.0 | -3,053,261,835,606,306,300 | 33.059701 | 93 | 0.753871 | false | 3.007909 | false | false | false |
SmartInfrastructures/fuel-web-dev | nailgun/nailgun/objects/base.py | 1 | 13974 | # -*- coding: utf-8 -*-
# Copyright 2013 Mirantis, 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 requi... | apache-2.0 | 7,444,869,341,868,258,000 | 31.725995 | 79 | 0.595248 | false | 4.550309 | false | false | false |
wido/cloudstack | systemvm/debian/opt/cloud/bin/cs/CsRoute.py | 1 | 4557 | # -- coding: utf-8 --
# 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
# "Li... | apache-2.0 | 3,773,684,739,197,071,000 | 36.975 | 91 | 0.599078 | false | 4.120253 | false | false | false |
PhoenixIgnis/Phoenix-Repo | Pygame/PyPet/main.py | 1 | 1188 | import pygame
pygame.init()
display_width = 800
display_height = 600
gameDisplay = pygame.display.set_mode((display_width,display_height))
pygame.display.set_caption('PyPet')
black = (0,0,0)
white = (255,255,255)
clock = pygame.time.Clock()
crashed = False
catImg = pygame.image.load('resources\image... | gpl-2.0 | -8,270,359,762,804,063,000 | 19.636364 | 73 | 0.520202 | false | 3.337079 | false | false | false |
Caoimhinmg/PmagPy | programs/agm_magic.py | 1 | 9499 | #!/usr/bin/env python
from __future__ import print_function
from builtins import range
import sys
import pmagpy.pmag as pmag
def main():
"""
NAME
agm_magic.py
DESCRIPTION
converts Micromag agm files to magic format
SYNTAX
agm_magic.py [-h] [command line options]
OPTIO... | bsd-3-clause | 3,609,177,167,160,688,600 | 38.252066 | 165 | 0.571323 | false | 3.327145 | false | false | false |
d4nielcosta/GIS-Emergency-Planning-DFG | tools/BNGtoLatLong-JSON/JSON_Converter.py | 1 | 1594 | import sys
import json
from BNGtoLatLong import OSGB36toWGS84
def convert(filename):
"""Converts co-ordinates in the given file to lat/long from the BNG system"""
if filename[-5:] != ".json":
print "Not valid input file"
sys.exit(1)
input_file = open(filename, "rb")
data = json.load(in... | mit | -8,843,943,797,394,694,000 | 39.897436 | 220 | 0.574655 | false | 3.614512 | false | false | false |
sigasi/SigasiProjectCreator | src/SigasiProjectCreator/createSigasiProjectFromListOfFiles.py | 1 | 1823 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
:copyright: (c) 2008-2017 Sigasi
:license: BSD, see LICENSE for more details.
"""
import os
from SigasiProjectCreator.ArgsAndFileParser import ArgsAndFileParser
from SigasiProjectCreator.Creator import SigasiProjectCreator
from SigasiProjectCreator import VhdlVersi... | bsd-3-clause | 390,115,223,074,363,800 | 34.745098 | 95 | 0.701591 | false | 3.602767 | false | false | false |
shaun-h/istaflow | views/ElementParameterDictionaryInputView.py | 1 | 2483 | # coding: utf-8
# coding: utf-8
from __future__ import absolute_import
import ui
import dialogs
class ElementParameterDictionaryInputView(object):
def __init__(self):
self.dictionary = {}
self.thememanager = None
def tableview_did_select(self, tableview, section, row):
key = list(self.dictionary.keys())[row]... | mit | 5,267,723,861,405,837,000 | 30.833333 | 150 | 0.715667 | false | 3.07302 | false | false | false |
Nordlxnder/Wetterstation | wetterserver.py | 1 | 6913 | #!/usr/bin/env python
# -*- coding: utf-8 -*
import socket
import sys
import subprocess
import re
import time ,threading
import Adafruit_DHT
from Adafruit.Adafruit_BMP180 import BMP085
exitFlag = 0
messdaten="0|0|0|0|0|0"
def cpu_temperatur():
cpu_temp = subprocess.check_output("/opt/vc/bin/vcgencmd measure_temp... | mit | -6,774,128,414,875,732,000 | 32.857843 | 111 | 0.604981 | false | 3.173713 | false | false | false |
klahnakoski/MySQL-to-S3 | vendor/pyLibrary/env/http.py | 1 | 12531 | # encoding: utf-8
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Author: Kyle Lahnakoski (kyle@lahnakoski.com)
#
# MIMICS THE requests API (http://docs.python-re... | mpl-2.0 | 52,390,902,330,259,580 | 31.213368 | 142 | 0.583912 | false | 3.91227 | false | false | false |
UbiCastTeam/gst-gtklaunch-1.0 | gst_gtklaunch/event.py | 1 | 10860 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Module to do event-driven programming very easily.
@author: Damien Boucard
@author: Dirk Van Haerenborgh
@license: Gnu/LGPLv2
@version: 1.1
Module attributes:
- dispatcher: accepted values:
'gobject' (asynchronous),
'callback' (synchronous).
"""
import loggin... | lgpl-2.1 | 7,533,372,519,166,335,000 | 38.635036 | 195 | 0.59116 | false | 4.214203 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.