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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
almann/ion-python | tests/test_core_multimap.py | 1 | 1665 | from amazon.ion.core import Multimap, record
import six
from tests import parametrize
class _P(record('pairs', 'expected_all_values', 'expected_single_value', 'expected_total_len')):
def __str__(self):
return '{name}'.format(name=self.pairs)
ALL_DATA = _P(
pairs=[('a', 1), ('a', 2), ('a', 3), ('a',... | apache-2.0 | -5,591,384,137,282,426,000 | 25.428571 | 98 | 0.533333 | false | 2.698541 | false | false | false |
TobiasLundby/UAST | Module1/exercise41/utm.py | 1 | 7035 | #!/usr/bin/env python
#*****************************************************************************
# Universal Transverse Mercator (UTM) conversion
# Copyright (c) 2013-2015, Kjeld Jensen <kjeld@frobomind.org>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification... | bsd-3-clause | 4,569,679,686,985,486,000 | 39.431034 | 130 | 0.632694 | false | 3.423358 | false | false | false |
yaoshanliang/markdown-preview.vim | pythonx/markdown_preview.py | 1 | 3976 | #!/usr/bin/env python
# encoding: utf-8
import socket
import vim
import markdown_parser
import webbrowser
import os, platform
import commands
import markdown_server
import markdown_lib
def markdownPreviewWithDefaultCodeStyle():
cssName = vim.eval("a:args1")
currentpath = commands.getstatusoutput("pwd")[1]
... | mit | 6,209,467,138,368,643,000 | 32.411765 | 104 | 0.589537 | false | 3.475524 | false | false | false |
eduardosan/window-manager | gwmanager/utils.py | 1 | 1379 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from glob import glob
from subprocess import check_output, CalledProcessError
def get_usb_devices():
"""
Lista dispositivos USB conectados
:return:
"""
sdb_devices = map(os.path.realpath, glob('/sys/block/sd*'))
usb_devices = (dev for de... | gpl-3.0 | -8,723,302,183,774,859,000 | 28.978261 | 81 | 0.57723 | false | 3.45614 | false | false | false |
kevinpt/symbolator | nucanvas/color/sinebow.py | 1 | 1400 | # -*- coding: utf-8 -*-
# Copyright © 2017 Kevin Thibedeau
# Distributed under the terms of the MIT license
import math
from math import sin, pi
import colorsys
def sinebow(hue):
'''Adapted from http://basecase.org/env/on-rainbows'''
hue = -(hue + 0.5) # Start at red rotating clockwise
rgb = sin(pi * hue), sin(p... | mit | -8,503,877,829,647,342,000 | 21.934426 | 75 | 0.580415 | false | 2.595547 | false | false | false |
sathnaga/virt-test | virttest/virt_vm.py | 1 | 42907 | import logging, time, glob, os, re
from autotest.client.shared import error
import utils_misc, utils_net, remote
class VMError(Exception):
pass
class VMCreateError(VMError):
def __init__(self, cmd, status, output):
VMError.__init__(self, cmd, status, output)
self.cmd = cmd
self.statu... | gpl-2.0 | 1,149,361,905,148,768,600 | 32.972288 | 86 | 0.573007 | false | 4.192593 | false | false | false |
SINGROUP/pycp2k | pycp2k/classes/_each134.py | 1 | 1114 | from pycp2k.inputsection import InputSection
class _each134(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 | -8,482,029,577,158,587,000 | 41.846154 | 447 | 0.576302 | false | 2.908616 | false | false | false |
anchore/anchore | anchore/anchore-modules/gates/11_check_image.py | 1 | 1615 | #!/usr/bin/env python
import sys
import os
import json
import re
import anchore
from anchore import anchore_utils
gate_name = "IMAGECHECK"
triggers = {
'BASEOUTOFDATE':
{
'description':'triggers if the image\'s base image has been updated since the image was built/analyzed',
'params':'None'
... | apache-2.0 | 1,436,451,591,911,512,000 | 25.47541 | 206 | 0.667492 | false | 3.166667 | false | false | false |
bluven/eonboard | eoncloud_web/biz/account/views.py | 1 | 12004 | #-*-coding-utf-8-*-
from datetime import datetime
import logging
from rest_framework import generics
from rest_framework import status
from rest_framework.response import Response
from rest_framework.decorators import api_view
from django.conf import settings
from django.shortcuts import render_to_response
from dja... | apache-2.0 | 4,892,102,443,532,302,000 | 32.252078 | 116 | 0.635955 | false | 4.039031 | false | false | false |
nikobockerman/rsnapshot-backup | rsnapshotbackup/argumentparser.py | 1 | 1573 | '''
http://stackoverflow.com/a/5943381
'''
import argparse
import sys
class ArgParser(argparse.ArgumentParser):
def __init__(self, *args, **kwargs):
"""Initialisation method for the parser class"""
super(ArgParser, self).__init__(*args, **kwargs)
#argparse.ArgumentParser.__init__(self, *... | bsd-2-clause | -1,816,188,652,166,511,000 | 30.46 | 77 | 0.574698 | false | 4.393855 | false | false | false |
surculus12/py-hyphen | hyphen/knuth_liang.py | 1 | 1704 | """
Our implementation of knuth-liang
"""
from string import digits
from collections import OrderedDict
from .language_patterns import LanguagePatterns
class KnuthLiang(object):
"""
This class implements knuth-liang
"""
__slots__ = ['language_patterns', 'limit_left', 'limit_right']
def __init__... | mit | 6,763,296,129,892,360,000 | 34.5 | 84 | 0.583333 | false | 3.820628 | false | false | false |
pferreir/indico-backup | indico/MaKaC/webinterface/common/contribFilters.py | 1 | 15606 | # -*- coding: utf-8 -*-
##
##
## This file is part of Indico.
## Copyright (C) 2002 - 2014 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; eith... | gpl-3.0 | 4,691,919,094,041,345,000 | 33.68 | 125 | 0.578111 | false | 4.053506 | false | false | false |
ymca-ireland/hth | app/main.py | 1 | 2477 | #!/usr/bin/env kivy
import kivy
import uuid
kivy.require('1.8.0')
from kivy.app import App
from kivy.properties import NumericProperty, ReferenceListProperty,ObjectProperty, StringProperty
from kivy.uix.button import Button
from kivy.uix.label import Label
from kivy.uix.boxlayout import BoxLayout
from kivy.uix.scre... | bsd-2-clause | 7,853,394,444,727,441,000 | 24.802083 | 97 | 0.654017 | false | 3.770167 | false | false | false |
Khan/react-components | make_template.py | 1 | 1966 | #!/usr/bin/env python
# TODO(colin): fix these lint errors (http://pep8.readthedocs.io/en/release-1.7.x/intro.html#error-codes)
# pep8-disable:E128
import os.path
import jinja2
from jinja2.ext import Extension
class CodeExampleExtension(Extension):
"""Insert a code example.
My plan for the docs is side-by-... | mit | 8,428,015,763,604,837,000 | 33.491228 | 105 | 0.632248 | false | 3.877712 | false | false | false |
testalt/electrum-ppc | setup-release.py | 1 | 2894 | """
py2app/py2exe build script for Electrum Litecoin
Usage (Mac OS X):
python setup.py py2app
Usage (Windows):
python setup.py py2exe
"""
from setuptools import setup
import os
import re
import shutil
import sys
from lib.util import print_error
from lib.version import ELECTRUM_VERSION as version
name = ... | gpl-3.0 | -7,215,813,235,646,526,000 | 30.11828 | 118 | 0.599516 | false | 3.499395 | false | false | false |
ddeepak6992/IITM-placement-Spyder | main.py | 1 | 1142 | # -*- coding: utf-8 -*-
"""
Created on Mon Nov 16 00:27:31 2015
@author: deep
"""
#####################################
USERNAME = ''
PASSWORD = ''
#####################################
import json
from scraper import scraper
import os
import time
def diff(A,B):
if len(A.keys()) > len(B.keys()):
A... | gpl-2.0 | 2,431,725,302,540,940,300 | 25.55814 | 73 | 0.478984 | false | 3.683871 | false | false | false |
hcarvalhoalves/hy | hy/importer.py | 1 | 6134 | # Copyright (c) 2013 Paul Tagliamonte <paultag@debian.org>
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modif... | mit | 3,325,653,699,906,485,000 | 29.216749 | 76 | 0.61477 | false | 3.684084 | false | false | false |
egabancho/invenio | invenio/modules/formatter/models.py | 1 | 4792 | # -*- coding: utf-8 -*-
#
## This file is part of Invenio.
## Copyright (C) 2013 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, or (at your option) an... | gpl-2.0 | -4,194,392,146,217,412,000 | 27.023392 | 78 | 0.600167 | false | 3.899105 | false | false | false |
dlage/spotifykodiweb | spotifykodiweb/settings/defaults.py | 1 | 2986 | """
Django settings for spotifykodiweb project.
Generated by 'django-admin startproject' using Django 1.8.5.
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/settings/
"""
# Bui... | mit | -7,200,818,063,775,890,000 | 25.900901 | 75 | 0.689216 | false | 3.567503 | false | false | false |
wichert/pyramid_jwt | tests/test_policy.py | 1 | 9249 | # vim: fileencoding=utf-8
import warnings
from datetime import timedelta
from webob import Request
from zope.interface.verify import verifyObject
from pyramid.security import forget
from pyramid.security import remember
from pyramid.testing import testConfig
from pyramid.testing import DummyRequest
from pyramid.testin... | bsd-2-clause | 6,635,171,839,500,509,000 | 31.780142 | 84 | 0.700563 | false | 3.794745 | true | false | false |
lukovnikov/teafacto | teafacto/blocks/lang/wordembed.py | 1 | 3771 | from teafacto.blocks.seq.rnn import SeqEncoder, MaskMode
from teafacto.blocks.seq.rnu import GRU
from teafacto.blocks.basic import IdxToOneHot, Embedder, VectorEmbed
from teafacto.blocks.lang.wordvec import Glove
from teafacto.core.base import *
from teafacto.core.base import tensorops as T
class WordEmbed(Embedder):... | mit | -9,127,946,652,017,896,000 | 42.344828 | 115 | 0.603023 | false | 3.147746 | false | false | false |
kvaps/vdsm | vdsm/virt/sampling.py | 1 | 27239 | #
# Copyright 2008-2015 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed ... | gpl-2.0 | -3,896,407,745,218,376,000 | 33.832481 | 79 | 0.556408 | false | 3.984057 | false | false | false |
nrz/ylikuutio | external/bullet3/examples/pybullet/gym/pybullet_envs/agents/configs.py | 2 | 4587 | # Copyright 2017 The TensorFlow Agents Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | agpl-3.0 | 6,645,876,306,263,930,000 | 27.141104 | 110 | 0.683453 | false | 3.367841 | true | false | false |
wolcomm/prngmgr | setup.py | 1 | 1795 | #!/usr/bin/env python
# Copyright 2016-2017 Workonline Communications (Pty) Ltd. All rights reserved.
#
# The contents of this file are licensed under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with the
# License. You may obtain a copy of the License at
#
# http://... | apache-2.0 | -2,536,337,764,862,797,000 | 32.240741 | 79 | 0.698607 | false | 4.164733 | false | false | false |
auscompgeek/chickenpie | chickenpie/debugger.py | 1 | 2507 | #!/usr/bin/env python
from __future__ import print_function
import sys
import traceback
from chickenpie import opcodes
from chickenpie.vm import Machine
def boot(argv=sys.argv):
m = Machine()
m.load_file(argv[1])
if len(argv) >= 3:
m.load_input(argv[2])
return m
def input_reader():
EX... | mit | -2,740,945,060,612,117,000 | 23.578431 | 81 | 0.462704 | false | 4.056634 | false | false | false |
fireeye/flare-ida | python/flare/objc2_xrefs_helper.py | 1 | 21650 | ############################################
##Author: James T. Bennett
##Objective-C xrefs helper IDApython script
############################################
########################################################################
# Copyright 2019 FireEye
#
# FireEye licenses this file to you under the Apac... | apache-2.0 | 5,568,455,069,248,737,000 | 35.586806 | 134 | 0.618152 | false | 3.88829 | false | false | false |
frastlin/PyAudioGame | pyaudiogame/console.py | 1 | 4516 | """Simple example showing how to get keyboard events.
Note that the mouse events don't work very well. Something is wrong with the pipe process that keeps the mouse event process from exiting in the inputs script. The bug has been reported, and as soon as it is fixed, uncommenting the run_mouse() function will work.
pr... | mit | -3,174,759,603,819,471,400 | 26.375758 | 263 | 0.658547 | false | 2.92487 | false | false | false |
thanm/devel-scripts | build-aosp-toolchain.py | 1 | 8147 | #!/usr/bin/python3
"""Perform a previously configured AOSP toolchain build.
This script kicks off a series of builds of the toolchain gcc compiler
for Android. It relies on previously established symbolic links set
up by hand or by "setup-aosp-toolchain-build.py".
"""
import getopt
import importlib
import multiproce... | apache-2.0 | -7,819,423,786,514,250,000 | 25.028754 | 71 | 0.62342 | false | 3.039925 | false | false | false |
madprof/alpha-hub | prototype/config.py | 1 | 1644 | # put this into ~/.alphahub/config.py and make sure it's not
# readable by anyone else (it contains passwords!)
# the host we run on and want to receive packets on; note
# that "localhost" is probably the wrong thing here, you
# want a host name that refers to an external network so you
# can receive packets from the ... | agpl-3.0 | 1,029,538,902,745,399,200 | 33.25 | 60 | 0.720195 | false | 3.410788 | false | false | false |
ejucovy/django-opendebates | opendebates/tests/test_registration.py | 1 | 4946 | import os
from django.contrib.auth import get_user_model
from django.core.urlresolvers import reverse
from django.test import TestCase
from django.test.utils import override_settings
from .factories import UserFactory
class RegisterTest(TestCase):
def setUp(self):
self.url = reverse('registration_regis... | apache-2.0 | 2,850,143,701,732,513,300 | 35.910448 | 92 | 0.596846 | false | 3.864063 | true | false | false |
AdamDynamic/TwitterMetrics | TrendingTermsSentiment.py | 1 | 1025 | #!/usr/bin/env python
# Scans twitter for trending terms, populates a database with the results and
# then creates a json file showing trends based on the data
import CreateJson as j
import TwitterSearch as t
import KeywordSearch as k
import Log as l
import logging
ProcessResult = False
FN_NAME = "TrendingTermsSenti... | gpl-2.0 | 6,986,279,648,277,726,000 | 26.702703 | 161 | 0.731707 | false | 3.583916 | false | false | false |
MOOCworkbench/MOOCworkbench | docs_manager/views.py | 1 | 2518 | from django.contrib.auth.decorators import login_required
from django.http import JsonResponse
from django.shortcuts import redirect, render
from django.views import View
from experiments_manager.consumers import send_message
from experiments_manager.helper import MessageStatus
from git_manager.helpers.git_helper impo... | mit | -6,071,420,683,983,865,000 | 38.968254 | 83 | 0.72359 | false | 3.940532 | false | false | false |
mar10/wsgidav | wsgidav/prop_man/couch_property_manager.py | 1 | 8148 | # -*- coding: utf-8 -*-
# (c) 2009-2021 Martin Wendt and contributors; see WsgiDAV https://github.com/mar10/wsgidav
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
"""
Implements a property manager based on CouchDB.
http://wiki.apache.org/couchdb/Reference
http://packages.python.o... | mit | 6,544,573,960,360,797,000 | 30.952941 | 91 | 0.4946 | false | 3.92864 | false | false | false |
ah-anssi/SecuML | SecuML/core/Data/Predictions.py | 1 | 1490 | # SecuML
# Copyright (C) 2018 ANSSI
#
# SecuML is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# SecuML is distributed in the hope t... | gpl-2.0 | -3,126,649,620,062,743,600 | 32.863636 | 73 | 0.67651 | false | 4.016173 | false | false | false |
calben/retino | scripts/generate_overview_figure_one.py | 1 | 6562 | import pickle
import retino
from retino.plot import *
from retino.utils import *
sns.set_style("ticks")
def plot_axon_growth_direction_algorithm(origin, end, target, ax):
a_origin = origin
a_end = end
desired_direction_weight = 1.1
momentum_direction_weight = 1
desired_direction = get_unit_dir... | mit | -5,546,933,092,631,977,000 | 33 | 120 | 0.682414 | false | 2.523846 | false | false | false |
goir/virtualenv-creator | create_virtualenv.py | 1 | 7979 | #!/usr/bin/env python
# coding=utf-8
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import absolute_import
import argparse
import hashlib
import inspect
import subprocess
import sys
import os
import urllib2
import shutil
WHEEL_PIP = 'https://pypi.python.org/packages/py2.p... | gpl-2.0 | -580,758,837,980,858,800 | 39.095477 | 172 | 0.652964 | false | 3.616954 | false | false | false |
regebro/svg.path | src/svg/path/tests/test_tokenizer.py | 1 | 2492 | import pytest
from svg.path import parser
PATHS = [
(
"M 100 100 L 300 100 L 200 300 z",
[("M", "100 100"), ("L", "300 100"), ("L", "200 300"), ("z", "")],
[("M", 100 + 100j), ("L", 300 + 100j), ("L", 200 + 300j), ("z",)],
),
(
"M 5 1 v 7.344 A 3.574 3.574 0 003.5 8 3.515 3.... | mit | 8,679,883,281,088,874,000 | 33.611111 | 105 | 0.400482 | false | 2.656716 | false | false | false |
JarbasAI/jarbas-core | mycroft/jarbas-skills/skill_roll_dice/__init__.py | 1 | 1300 | from os.path import dirname
from adapt.intent import IntentBuilder
from mycroft.skills.core import MycroftSkill
from mycroft.util.log import getLogger
import random
__author__ = 'paul'
LOGGER = getLogger(__name__)
class RollDiceSkill(MycroftSkill):
def __init__(self):
super(RollDiceSkill, self).__init... | gpl-3.0 | 3,298,990,753,935,752,000 | 29.232558 | 84 | 0.662308 | false | 3.163017 | false | false | false |
karimbahgat/PythonGis | pythongis/vector/saver.py | 1 | 6720 |
# import builtins
import itertools
import math
# import fileformats
import shapefile as pyshp
import pygeoj
# PY3 fix
try:
str = unicode # in py2, make str synonymous with str
zip = itertools.izip
except:
pass
NaN = float("nan")
def is_missing(value):
return value in (None,"") or (isinstance(val... | mit | -1,759,641,893,836,171,000 | 37.4 | 138 | 0.536756 | false | 4.702589 | false | false | false |
ereOn/azmq | azmq/mechanisms/plain_server.py | 1 | 2073 | """
The PLAIN server mechanism.
"""
from ..log import logger
from .base import Mechanism
class PlainServer(object):
def __call__(self):
return PlainServerMechanism()
class PlainServerMechanism(Mechanism):
name = b'PLAIN'
as_server = True
@classmethod
async def _read_plain_hello(cls, r... | gpl-3.0 | 2,243,719,306,831,642,600 | 27.013514 | 77 | 0.581283 | false | 4.080709 | false | false | false |
RasaHQ/rasa_nlu | rasa/nlu/featurizers/regex_featurizer.py | 1 | 5392 | import io
import logging
import numpy as np
import os
import re
import typing
from typing import Any, Dict, Optional, Text
from rasa.nlu import utils
from rasa.nlu.config import RasaNLUModelConfig
from rasa.nlu.featurizers import Featurizer
from rasa.nlu.training_data import Message, TrainingData
logger = logging.get... | apache-2.0 | 6,589,500,145,067,330,000 | 34.708609 | 88 | 0.611091 | false | 4.125478 | true | false | false |
javierder/dogestart.me | core/migrations/0001_initial.py | 1 | 11514 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Tag'
db.create_table(u'core_tag', (
(u'id', s... | mit | -3,946,435,351,670,234,000 | 62.269231 | 195 | 0.568873 | false | 3.54386 | false | false | false |
mrooney/wxbanker | wxbanker/tests/currconverttests.py | 1 | 1752 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# https://launchpad.net/wxbanker
# currconverttests.py: Copyright 2007-2010 Mike Rooney <mrooney@ubuntu.com>
#
# This file is part of wxBanker.
#
# wxBanker is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public... | gpl-3.0 | -1,414,807,178,836,616,400 | 39.744186 | 100 | 0.70605 | false | 3.560976 | true | false | false |
ruijie/quantum | quantum/plugins/rgos/common/config.py | 1 | 2220 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Ruijie network, 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-... | apache-2.0 | 6,913,264,159,414,557,000 | 34.806452 | 80 | 0.66036 | false | 3.507109 | false | false | false |
looselycoupled/xbus-501-timing-demonstrations | 1-example.py | 1 | 1744 | #!/usr/bin/env python
# 1-example
# A simple demonstration script to find the largest prime number
# below a given limit.
#
# This file is intentionally inefficient in order to demonstrate
# various ways to time execution
#
# Usage:
# time python 1-example.py 10000
#
# Author: Allen Leis <al1075@georgetown.edu>
# C... | mit | 4,661,781,988,558,868,000 | 24.647059 | 74 | 0.484518 | false | 4.518135 | false | false | false |
CloudBoltSoftware/cloudbolt-forge | actions/cloudbolt_plugins/skeleton_order_approval_action/order_approval_skeleton.py | 1 | 1792 | import sys
import time
from orders.models import Order
"""
Plug-in example for an Orchestration Action at the "Order Approval" trigger
point. May change CloudBolt's default approval behavior to implement custom
logic or integrate with an external change management system.
The context passed to the plug-in includes t... | apache-2.0 | 1,055,587,732,821,589,200 | 33.461538 | 91 | 0.720424 | false | 4.138568 | false | false | false |
medworx/MedUX | medux/plugins/core/icontext.py | 1 | 2440 | #
# Copyright (C) 2013 Christian A. Reiter
#
# This file is part of MedUX.
#
# MedUX is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#... | gpl-3.0 | -8,318,707,536,714,407,000 | 26.727273 | 77 | 0.605738 | false | 3.647235 | false | false | false |
stefanseefeld/synopsis | Synopsis/Formatters/HTML/Parts/Inheritance.py | 1 | 3851 | #
# Copyright (C) 2000 Stephen Davies
# Copyright (C) 2000 Stefan Seefeld
# All rights reserved.
# Licensed to the public under the terms of the GNU LGPL (>= 2),
# see the file COPYING for details.
#
from Synopsis.Processor import Parameter
from Synopsis import ASG
from Synopsis.Formatters.HTML.Part import Part
from S... | lgpl-2.1 | -537,067,839,087,499,260 | 33.383929 | 83 | 0.608154 | false | 4.08811 | false | false | false |
pferreir/indico-backup | indico/web/http_api/auth.py | 1 | 4009 | # -*- coding: utf-8 -*-
##
##
## This file is part of Indico.
## Copyright (C) 2002 - 2014 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; eith... | gpl-3.0 | 41,385,180,629,257,624 | 27.034965 | 90 | 0.623597 | false | 3.880929 | false | false | false |
ingadhoc/account-invoicing | account_invoice_partial/wizards/account_invoice_partial_wizard.py | 1 | 1689 | ##############################################################################
# For copyright and license notices, see __manifest__.py file in module root
# directory
##############################################################################
from odoo import models, fields
from odoo.tools import float_round
clas... | agpl-3.0 | -1,892,231,634,111,347,500 | 35.717391 | 93 | 0.557134 | false | 4.433071 | false | false | false |
woodem/woo | scripts/test-OLD/peri3dController_triaxialCompression.py | 1 | 3506 | # peri3dController_triaxialCompression.py
# script, that explains funcionality and input parameters of Peri3dController on the example of
# triaxial compression.
# Firstly, a hydrostatic preassure is applied, then a strain along z axis is increasing
# while x- and y- stress is constant
# The simulation is run on ro... | gpl-2.0 | 8,124,165,752,349,868,000 | 43.379747 | 128 | 0.615231 | false | 3.237304 | false | false | false |
TAMU-CPT/galaxy-tools | tools/gff3/gff3.py | 1 | 11156 | import copy
import logging
log = logging.getLogger()
log.setLevel(logging.WARN)
def feature_lambda(
feature_list,
test,
test_kwargs,
subfeatures=True,
parent=None,
invert=False,
recurse=True,
):
"""Recursively search through features, testing each with a test function, yielding matche... | gpl-3.0 | 1,892,358,789,450,623,700 | 31.242775 | 118 | 0.587755 | false | 4.137982 | true | false | false |
iphoting/healthchecks | hc/front/tests/test_add_sms.py | 1 | 3660 | from django.test.utils import override_settings
from hc.api.models import Channel
from hc.test import BaseTestCase
@override_settings(TWILIO_ACCOUNT="foo", TWILIO_AUTH="foo", TWILIO_FROM="123")
class AddSmsTestCase(BaseTestCase):
def setUp(self):
super().setUp()
self.url = "/projects/%s/add_sms/" ... | bsd-3-clause | 4,603,454,562,896,313,000 | 36.731959 | 80 | 0.637978 | false | 3.581213 | true | false | false |
yatmingyatming/LogisticRegressionSGDMapReduce | model_encoder.py | 1 | 1040 | #!/usr/bin/env python
import sys, json, datetime, uuid, os
def main(separator='\t'):
id = str(uuid.uuid1())
date_created = datetime.datetime.utcnow().isoformat() + 'Z'
mu = float(os.environ['MU']) if os.environ.has_key('MU') else 0.002
eta = float(os.environ['ETA']) if os.environ.has_key('ETA') else... | mit | -4,548,504,203,636,204,500 | 32.580645 | 96 | 0.580769 | false | 3.219814 | false | false | false |
shakamunyi/sahara | sahara/conductor/manager.py | 1 | 32113 | # Copyright (c) 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 required by applicable law or agreed to in writ... | apache-2.0 | 1,892,088,547,725,039,400 | 40.27635 | 79 | 0.616915 | false | 4.393624 | true | false | false |
gillett-hernandez/project-euler | Python/problem_192.py | 1 | 9573 | # -*- coding: utf-8 -*-
# @Author: Gillett Hernandez
# @Date: 2017-12-11 19:30:19
# @Last Modified by: Gillett Hernandez
# @Last Modified time: 2017-12-16 17:49:47
from euler_funcs import ContinuedFraction, solve_pell, analyze_triplets, sconvergents, lag, is_square, timed
from euler_funcs import timed, construct, ... | mit | 7,420,151,602,678,209,000 | 31.444068 | 150 | 0.491171 | false | 3.008802 | false | false | false |
vokimon/menjobe | menjobe/models.py | 1 | 1180 | from django.db import models
from mptt.models import MPTTModel, TreeForeignKey
class Product(MPTTModel) :
name = models.CharField(
max_length=200,
default=None,
unique=True,
)
group = TreeForeignKey('self',
null=True,
blank=True,
related_name='subgroups',
default=None,
)
class MPTTMeta:
pare... | agpl-3.0 | 2,554,657,755,027,349,000 | 19.344828 | 75 | 0.713559 | false | 3.089005 | false | false | false |
alexanderdreyer/polybori-debian | pyroot/polybori/gbcore.py | 1 | 19759 | from polybori.nf import *
from polybori.PyPolyBoRi import *
from polybori.ll import eliminate, ll_encode
from time import time
from copy import copy
from itertools import chain
from inspect import getargspec
from polybori.statistics import used_vars, used_vars_set
from polybori.heuristics import dense_system,gauss_on_... | gpl-2.0 | -4,579,446,247,877,077,500 | 31.551895 | 147 | 0.568855 | false | 3.329233 | false | false | false |
amirgeva/coide | qutepart/rectangularselection.py | 1 | 10665 | from PyQt4.QtCore import Qt, QMimeData
from PyQt4.QtGui import QApplication, QKeyEvent, QKeySequence, QPalette, QTextCursor, QTextEdit, QWidget
class RectangularSelection:
"""This class does not represent any object, but is part of Qutepart
It just groups together Qutepart rectangular selection methods and fi... | gpl-2.0 | -1,751,007,654,381,181,200 | 41.831325 | 104 | 0.595218 | false | 4.369111 | false | false | false |
zmlabe/IceVarFigs | Scripts/SeaIce/NSIDCseaice_quartiles.py | 1 | 7079 | """
Reads in current year's Arctic sea ice extent from Sea Ice Index 3 (NSIDC)
Website : ftp://sidads.colorado.edu/DATASETS/NOAA/G02135/north/daily/data/
Author : Zachary M. Labe
Date : 5 September 2016
"""
### Import modules
import numpy as np
import urllib.request
import urllib as UL
import datetime
impor... | mit | -8,125,626,366,478,504,000 | 33.705882 | 85 | 0.599237 | false | 2.814712 | false | false | false |
C-Codes/jupyterbar | jupyterbar/jupyterbar.py | 1 | 4049 | #!/usr/bin/env python
from __future__ import print_function
import os, sys
import time, datetime
import rumps
import webbrowser
from jupyter import Jupyter
class JupyterStatusBarApp(rumps.App):
#def __init__(self):
# super(JupyterStatusBarApp, self).__init__("jupyter")
# self.title="jupyter"
#... | mit | 3,329,891,740,349,573,600 | 31.134921 | 110 | 0.593727 | false | 3.502595 | false | false | false |
regosen/gallery_get | gallery_plugins/plugin_shimmie.py | 1 | 1738 | # Plugin for gallery_get.
import re
from gallery_utils import *
# Each definition can be one of the following:
# - a string
# - a regex string
# - a function that takes source as a parameter and returns an array or a string. (You may assume that re and urllib are already imported.)
# If you comment out a parameter, i... | mit | 6,606,265,935,221,166,000 | 41.414634 | 149 | 0.655926 | false | 3.770065 | false | false | false |
zchee/deoplete-jedi | rplugin/python3/deoplete/sources/deoplete_jedi.py | 1 | 10772 | import copy
import logging
import os
import re
from importlib.util import find_spec
from deoplete.base.source import Base
from deoplete.util import bytepos2charpos, getlines, load_external_module
load_external_module(__file__, 'sources')
from deoplete_jedi import profiler # isort:skip # noqa: E402
# Type mapping.... | mit | -6,750,035,902,205,924,000 | 30.869822 | 86 | 0.512811 | false | 3.985202 | false | false | false |
irregulator/ganetimgr | accounts/migrations/0009_auto__del_field_customregistrationprofile_admin_activated__del_field_c.py | 1 | 7670 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'CustomRegistrationProfile.admin_activated'
db.delete_co... | gpl-3.0 | -5,851,417,538,446,304,000 | 65.704348 | 185 | 0.57927 | false | 3.945473 | false | false | false |
csyhuang/hn2016_falwa | hn2016_falwa/beta_version.py | 1 | 20465 | def input_jk_output_index(j,k,kmax):
return j*(kmax) + k
def extrap1d(interpolator):
xs = interpolator.x
ys = interpolator.y
def pointwise(x):
if x < xs[0]:
return ys[0]+(x-xs[0])*(ys[1]-ys[0])/(xs[1]-xs[0])
elif x > xs[-1]:
return ys[-1]+(x-xs[-1])*(ys[-1]-ys... | mit | -4,612,132,919,616,612,000 | 43.200864 | 195 | 0.574151 | false | 2.715992 | false | false | false |
jimklo/LRSignature | src/LRSignature/sign/Sign.py | 1 | 6882 | '''
Copyright 2011 SRI International
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, softw... | apache-2.0 | -3,173,528,914,175,409,700 | 35.226316 | 192 | 0.574397 | false | 4.363982 | false | false | false |
PeridexisErrant/python-lnp | core/keybinds.py | 1 | 2131 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Keybinding management."""
from __future__ import print_function, unicode_literals, absolute_import
import os, shutil
from . import helpers, paths, log
def read_keybinds():
"""Returns a list of keybinding files."""
return tuple([
os.path.basename(o) for ... | isc | 7,327,233,250,507,444,000 | 28.191781 | 72 | 0.63069 | false | 3.924494 | false | false | false |
spetitjean/XMG-2 | contributions/core/pylibs/compgen/brick_parser.py | 1 | 3655 | import xmg.compgen.Symbol
import xmg.compgen.Grammar
# Punctuation
semicolon=xmg.compgen.Symbol.T(";")
colon=xmg.compgen.Symbol.T(":")
pipe=xmg.compgen.Symbol.T("|")
quote=xmg.compgen.Symbol.T("'")
arrow=xmg.compgen.Symbol.T("->")
equal=xmg.compgen.Symbol.T("=")
coma=xmg.compgen.Symbol.T(',')
openpred=xmg.compgen.Symb... | gpl-3.0 | -1,720,021,076,280,352,800 | 28.715447 | 194 | 0.720657 | false | 2.249231 | false | true | false |
isbadawi/maze-generation | io/canvas.py | 1 | 1094 | import Tkinter as tk
import sys
class Canvas(object):
def __init__(self, width, height, size):
self.width = width
self.height = height
self.size = size
self.root = tk.Tk()
self.root.title('Maze Generation Visualizer')
self.canvas = tk.Canvas(
self.root, ... | mit | -2,285,130,573,094,090,200 | 27.789474 | 68 | 0.538391 | false | 3.285285 | false | false | false |
sajuptpm/neutron-ipam | neutron/plugins/vmware/dbexts/networkgw_db.py | 1 | 24050 | # Copyright 2013 VMware, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | apache-2.0 | 6,341,488,234,011,928,000 | 47.196393 | 79 | 0.580042 | false | 4.43318 | false | false | false |
hogasa/normalizador-amba | usig_normalizador_amba/Direccion.py | 1 | 3312 | # coding: UTF-8
'''
Created on Apr 16, 2014
@author: hernan
'''
from __future__ import absolute_import
import re
from usig_normalizador_amba.settings import CALLE_ALTURA, CALLE_Y_CALLE, INVALIDO
from usig_normalizador_amba.Calle import Calle
class Direccion:
'''
@ivar calle: Calle de la direccion
@type ... | mit | 1,672,229,273,734,386,700 | 28.5625 | 117 | 0.530353 | false | 3.395897 | false | false | false |
pandada8/mirrord | mirrord/daemon.py | 1 | 1173 | import yaml
from task import RsyncTask
import asyncio
import logging
import argparse
class Application():
def __init__(self):
self.tasks = {}
def load_config(self, config):
with open(config) as fp:
data = yaml.safe_load(fp)
for i, j in data["task"].items():
... | mit | 6,706,579,774,450,081,000 | 25.659091 | 73 | 0.55584 | false | 3.858553 | true | false | false |
rosudrag/Freemium-winner | VirtualEnvironment/Lib/site-packages/jinja2/loaders.py | 1 | 17346 | # -*- coding: utf-8 -*-
"""
jinja2.loaders
~~~~~~~~~~~~~~
Jinja loader classes.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import os
import sys
import weakref
from types import ModuleType
from os import path
from hashlib import sha1
from jinja2.excepti... | mit | -6,711,097,313,728,890,000 | 35.06237 | 78 | 0.612418 | false | 4.561136 | false | false | false |
omarayad1/cantkeepup | app/core/helpers.py | 1 | 1103 | from json import dumps # pragma: no cover
from sqlalchemy.orm import class_mapper # pragma: no cover
from app.models import User, Group # pragma: no cover
def serialize(obj, columns):
# then we return their values in a dict
return dict((c, getattr(obj, c)) for c in columns)
def queryAllToJson(model,conditions):
# ... | mit | -3,075,995,795,545,022,500 | 30.542857 | 67 | 0.741614 | false | 3.282738 | false | false | false |
bayesimpact/bob-emploi | frontend/server/mail/jobbing.py | 1 | 2417 | """Focus email module for finding jobbing ideas."""
import typing
from typing import Any, Dict
from bob_emploi.frontend.api import user_pb2
from bob_emploi.frontend.api import reorient_jobbing_pb2
from bob_emploi.frontend.server import i18n
from bob_emploi.frontend.server import mongo
from bob_emploi.frontend.server ... | gpl-3.0 | 2,725,181,951,954,456,000 | 37.349206 | 95 | 0.685017 | false | 3.379021 | false | false | false |
chrislit/abydos | abydos/tokenizer/_c_or_v_cluster.py | 1 | 5291 | # Copyright 2019-2020 by Christopher C. Little.
# This file is part of Abydos.
#
# Abydos 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 versio... | gpl-3.0 | 110,880,648,427,213,950 | 33.129032 | 79 | 0.554253 | false | 4.245586 | false | false | false |
stormtrader/gw_trade | dysms_python/mns_python_sdk/mns/mns_client.py | 1 | 37956 | #coding=utf-8
# Copyright (C) 2015, Alibaba Cloud Computing
#Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merg... | gpl-3.0 | 1,831,573,942,415,423,500 | 45.975248 | 461 | 0.621035 | false | 3.727755 | false | false | false |
YeEmrick/learning | stanford-tensorflow/2017/examples/07_convnet_mnist_starter.py | 1 | 6444 | """ Using convolutional net on MNIST dataset of handwritten digit
(http://yann.lecun.com/exdb/mnist/)
Author: Chip Huyen
Prepared for the class CS 20SI: "TensorFlow for Deep Learning Research"
cs20si.stanford.edu
"""
from __future__ import print_function
from __future__ import division
from __future__ import print_func... | apache-2.0 | 3,841,000,186,712,797,000 | 33.465241 | 97 | 0.652855 | false | 3.414944 | false | false | false |
tiramiseb/abandoned_ospfm | ospfm/core/preference.py | 1 | 2559 | # Copyright 2012-2013 Sebastien Maccagnoni-Munch
#
# This file is part of OSPFM.
#
# OSPFM 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 you... | agpl-3.0 | -5,509,308,294,706,889,000 | 36.086957 | 79 | 0.62837 | false | 4.366894 | false | false | false |
Chris1221/Bandwidth-Daemon | daemon/teksavvy_cron.py | 1 | 2966 | #!/opt/local/bin/python
#you might have to change the above to point to your local python
from __future__ import division
import httplib, json, time
#replace this with your API key
APIKEY = "API_KEY"
#pull from api
headers = {"TekSavvy-APIKey": APIKEY}
conn = httplib.HTTPSConnection("api.teksavvy.com")
conn.req... | gpl-2.0 | -318,330,581,550,085,900 | 37.038462 | 311 | 0.629467 | false | 3.168803 | false | false | false |
robcarver17/pysystemtrade | systems/accounts/pandl_calculators/pandl_generic_costs.py | 1 | 3494 | import pandas as pd
from systems.accounts.pandl_calculators.pandl_calculation import pandlCalculation, apply_weighting
curve_types = ['gross', 'net', 'costs']
GROSS_CURVE = 'gross'
NET_CURVE = 'net'
COSTS_CURVE = 'costs'
class pandlCalculationWithGenericCosts(pandlCalculation):
def weight(self, weight: pd.Seri... | gpl-3.0 | 7,537,832,286,019,710,000 | 31.351852 | 106 | 0.620206 | false | 3.375845 | false | false | false |
dapengchen123/code_v1 | reid/models/resnet_btfu.py | 1 | 3793 | from __future__ import absolute_import
import torch.nn.functional as F
import torch.nn.init as init
from torch import nn
from torchvision.models import resnet18, resnet34, resnet50, resnet101, \
resnet152
class ResNet_btfu(nn.Module):
__factory = {
18: resnet18,
34: resnet34,
50: resne... | mit | -1,654,766,878,559,819,300 | 31.418803 | 80 | 0.530187 | false | 3.664734 | false | false | false |
waynew/simple-importer | importer/importer.py | 1 | 1305 | from __future__ import print_function, division
try:
import tkinter as tk
import configparser as configparser
from tkinter.filedialog import askdirectory
except ImportError:
# I guess we're running Python2
import Tkinter as tk
import ConfigParser as configparser
from tkFileDialog import ask... | mit | -3,465,383,677,578,508,300 | 27.369565 | 92 | 0.699617 | false | 2.98627 | false | false | false |
lacatus/TFM | __init__.py | 1 | 1514 | #!/usr/bin/env python
"""
Initialization of the project global variables
"""
import cv2
import os
from var import variables
def init():
initvariables()
def initvariables():
variables.app_path = os.path.dirname(os.path.realpath(__file__))
variables.datasets_path = variables.app_path + '/data'
"... | apache-2.0 | 715,981,144,961,745,200 | 21.939394 | 72 | 0.570674 | false | 3.228145 | false | false | false |
nhhegde/minimalist_item_catalog | Item_Catalog/add_test_user.py | 1 | 1698 | from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from database_setup import Base, User, Item
engine = create_engine('postgresql://postgres:postgresql@localhost:5432/user_item_catalog')
Base.metadata.bind = engine
DBSession = sessionmaker(bind=engine)
session = DBSession()
te... | agpl-3.0 | -8,792,218,446,548,541,000 | 32.653061 | 91 | 0.631331 | false | 3.748344 | true | false | false |
cfelton/minnesota | examples/boards/nexys/fpgalink/fpgalink.py | 1 | 2931 |
from myhdl import *
from mn.cores.usbext import fpgalink
from mn.cores.usbext import m_fpgalink_fx2
def fpgalink_nexys(
# ~~ FX2 interface signals ~~
IFCLK, # 48 MHz clock from FX2
RST, # active low async reset
SLWR, # active low write strobe
SLRD, # active low read stro... | gpl-3.0 | 7,793,902,359,878,588,000 | 25.889908 | 70 | 0.564654 | false | 2.775568 | false | false | false |
mitsuhiko/celery | celery/backends/amqp.py | 1 | 7035 | """celery.backends.amqp"""
import socket
import time
from datetime import timedelta
from carrot.messaging import Consumer, Publisher
from celery import conf
from celery import states
from celery.backends.base import BaseDictBackend
from celery.exceptions import TimeoutError
from celery.messaging import establish_con... | bsd-3-clause | -1,894,539,541,368,101,600 | 33.655172 | 76 | 0.589055 | false | 4.547511 | false | false | false |
plish/Trolly | trolly/organisation.py | 1 | 3394 | from . import trelloobject
class Organisation(trelloobject.TrelloObject):
def __init__(self, trello_client, organisation_id, name='', **kwargs):
super(Organisation, self).__init__(trello_client, **kwargs)
self.id = organisation_id
self.name = name
self.base_uri = '/organizations... | mit | 5,201,938,132,651,041,000 | 31.018868 | 79 | 0.57307 | false | 4.290771 | false | false | false |
hasgeek/outreach | tests/test_kharcha.py | 1 | 1236 | import json
import unittest
from flask import url_for
from outreach import app
from outreach.models import (db, SaleItem)
from fixtures import init_data
class TestKharchaAPI(unittest.TestCase):
def setUp(self):
self.ctx = app.test_request_context()
self.ctx.push()
db.drop_all()
db... | agpl-3.0 | -1,900,229,001,393,846,500 | 35.352941 | 202 | 0.644013 | false | 3.572254 | true | false | false |
phenoxim/nova | nova/api/openstack/compute/fping.py | 1 | 4844 | # Copyright 2011 Grid Dynamics
# Copyright 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses... | apache-2.0 | -8,144,105,723,976,514,000 | 33.848921 | 79 | 0.58815 | false | 3.990115 | false | false | false |
openstack/heat | heat/engine/resources/template_resource.py | 1 | 14723 | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | apache-2.0 | -2,389,991,223,551,367,000 | 39.671271 | 79 | 0.55865 | false | 4.57236 | false | false | false |
aaronmckinstry706/twitter-crime-prediction | src/jobs/crime_prediction/grid.py | 1 | 4226 | import bisect
import collections
import math
"""A class which defines a square by its upper and lower lat/lon bounds."""
LatLonSquare = collections.namedtuple('Square', ['lat_min', 'lat_max', 'lon_min', 'lon_max'])
class LatLonGrid(object):
"""
A data structure representing a rectangular grid of lati... | gpl-3.0 | -5,509,849,249,049,962,000 | 47.139535 | 100 | 0.635116 | false | 3.584394 | false | false | false |
MobProgramming/MobTimer.Python | Frames/MinimalScreenBlockerFrame.py | 1 | 8157 | from datetime import datetime
from tkinter import ttk, N, E, W
from Infrastructure import MobberManager
from Infrastructure.ImageUtility import ImageUtility
from Infrastructure.PathUtility import PathUtility
from Infrastructure.ScreenUtility import ScreenUtility
class MinimalScreenBlockerFrame(ttk.Frame):
def __i... | mit | -553,520,416,050,646,300 | 56.443662 | 139 | 0.653181 | false | 3.503866 | false | false | false |
arkanis/minidyndns | references/minidns.py | 1 | 3101 | #!/usr/bin/env python
# From https://code.google.com/p/minidns
import sys
import socket
import fcntl
import struct
# DNSQuery class from http://code.activestate.com/recipes/491264-mini-fake-dns-server/
class DNSQuery:
def __init__(self, data):
self.data=data
self.domain=''
tipo = (ord(data[2]) >> 3) & ... | mit | -9,193,250,370,974,597,000 | 27.712963 | 136 | 0.596259 | false | 3.193615 | false | false | false |
ozgurgunes/django-filizver | filizver/utils/views.py | 1 | 1468 | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from django.views.generic import View, ListView
from django.http import HttpResponse
from django.utils import simplejson as json
from filizver.forms import TopicForm
class ExtraContextMixin(View):
"""
A mixin that passes ``extra_c... | mit | 2,325,083,346,132,843,500 | 30.234043 | 88 | 0.654632 | false | 4.123596 | false | false | false |
alsoicode/django-maintenancemode-2 | testproject/testproject/settings.py | 1 | 4846 | """
Django settings for testproject project.
Generated by 'django-admin startproject' using Django 1.8.7.
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/settings/
"""
# Build ... | apache-2.0 | 4,587,498,070,320,832,000 | 28.730061 | 83 | 0.656211 | false | 3.771206 | false | false | false |
tempbottle/Nuitka | nuitka/nodes/ExecEvalNodes.py | 1 | 10309 | # Copyright 2015, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | apache-2.0 | -8,143,572,845,159,348,000 | 31.520505 | 88 | 0.588515 | false | 4.633258 | false | false | false |
peterstace/project-euler | OLD_PY_CODE/project_euler_old_old/102/102.py | 1 | 1554 | """
Three distinct points are plotted at random on a Cartesian plane, for which -1000 <= x, y <= 1000, such that a triangle is formed.
Consider the following two triangles:
A(-340,495), B(-153,-910), C(835,-947)
X(-175,41), Y(-421,-714), Z(574,-645)
It can be verified that triangle ABC contains the origin, whereas ... | unlicense | 7,183,141,705,756,104,000 | 30.08 | 216 | 0.60296 | false | 3.065089 | false | false | false |
CiscoSystems/networking-cisco | networking_cisco/plugins/cisco/l3/schedulers/l3_routertype_aware_agent_scheduler.py | 1 | 4496 | # Copyright 2014 Cisco Systems, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | apache-2.0 | 486,952,411,445,596,800 | 42.650485 | 78 | 0.637011 | false | 4.2058 | false | false | false |
jcchoiling/learningPython | aws/swf/register.py | 1 | 1618 | #!/usr/bin/env python3
"""
Registers domains, workflows and activities
"""
from botocore.exceptions import ClientError
from aws.swf.creds import init_aws_session, DOMAIN, WORKFLOW
import boto3
def register_domain(session):
try:
response = session.register_domain(
name=DOMAIN,
descri... | gpl-3.0 | -4,660,156,210,070,328,000 | 32.040816 | 78 | 0.609394 | false | 4.544944 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.