repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
hikaruAi/hikaBGE | kart.py | 1 | 7488 | ##############KART CLASS###########3
import math
from hikaBGE import hikaMath
from mathutils import Vector
####FUNCTIONS####
def getWheels(car):
"""Get named wheels even grandchilds"""
dic={}
child=car.children
lista=list()
lista=child
for j in child:
lista=lista+ j.children
for i ... | mit | -2,973,398,476,803,459,000 | 35.521951 | 247 | 0.581753 | false | 3.537807 | false | false | false |
coffeecoco/python-scripts | techAssetMgmtV2.py | 1 | 15074 | #!/usr/bin/env python
# Author: Sumit Goel
# Description: A program to compare the Tech Assets data in CSV file with
# the Red Hat Satellite server. The program will create for the CSV
# for processing and create two CSV files with the differences in
# Tech Assets and Red Hat Satellite server.
import sys
... | mit | 7,757,788,677,896,680,000 | 39.521505 | 76 | 0.579143 | false | 4.002655 | false | false | false |
evan-phelps/epana | epana/db.py | 1 | 3684 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vim:fenc=utf-8
#
# Copyright © 2018 Evan T. Phelps
#
# Distributed under terms of the MIT license.
"""
Basic DB utilities.
"""
##############################################################################
import datetime
from pandas import Timestamp
import cx_Oracle
... | mit | -657,885,332,265,468,200 | 30.211864 | 78 | 0.511268 | false | 3.769703 | false | false | false |
stanford-ppl/spatial-lang | utilities/converter.py | 1 | 2790 | #!bin/python
# Helpful script for converting fixed point signed numbers to decimal
def letter2num(x):
if (x == "F" or x == "f"):
return 15
elif (x == "E" or x == "e"):
return 14
elif (x == "D" or x == "d"):
return 13
elif (x == "C" or x == "c"):
return 12
elif (x == "B" or x == "b"):
return 11
elif (x... | mit | 7,497,117,871,840,579,000 | 17.6 | 110 | 0.555556 | false | 2.473404 | false | false | false |
araines/pylightwaverf | pylightwaverf/pylightwaverf.py | 1 | 3621 | import socket
import re
class LightWaveRF():
SOCKET_TIMEOUT = 2.0
RX_PORT = 9761
TX_PORT = 9760
def __init__(self):
# Set up transmission socket (allow broadcasting)
tx_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
tx_sock.setsockopt(socket.SOL_SOCKET, socket.SO_BROADCAST, 1)
tx_... | mit | -6,575,420,525,230,705,000 | 22.211538 | 77 | 0.623308 | false | 2.664459 | false | false | false |
cloudops/mauth | setup.py | 1 | 1207 | #!/usr/bin/env python
# Copyright (c) 2011-2012 CloudOps
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 | 3,612,644,640,522,348,000 | 31.621622 | 74 | 0.707539 | false | 3.970395 | false | false | false |
CybOXProject/python-cybox | cybox/objects/win_task_object.py | 1 | 4853 | # Copyright (c) 2017, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.
from mixbox import entities
from mixbox import fields
import cybox.bindings.win_task_object as win_task_binding
from cybox.common import (Base64Binary, DateTime, Duration, HashList, Long,
ObjectProperties, ... | bsd-3-clause | 4,436,155,197,520,412,700 | 42.720721 | 90 | 0.73913 | false | 3.59748 | false | false | false |
mantasurbonas/angis-poc-sudoku | src/sudoku_lenta.py | 1 | 1901 | iš langelis reikalingas Langelis
iš regionas reikalingas Regionas, Linija, Kvadratas
iš taisykles reikalingas Sprendėjas
klasė SudokuLenta:
tai __init__(šis, matrica):
šis.langeliai = {} # žodynas (eil,stulp)=>langelis
šis.eilutės = [] # eilutės[0] reiškia pirmąją eilutę ir t.t
... | gpl-2.0 | -701,162,603,330,588,900 | 35.94 | 96 | 0.565782 | false | 2.370988 | false | true | false |
sdulal/oppia | core/controllers/admin.py | 7 | 10604 | # Copyright 2014 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | apache-2.0 | -3,995,113,526,604,767,000 | 41.586345 | 79 | 0.591192 | false | 4.243297 | true | false | false |
AnTAVR/aai2 | src/libs/net/__init__.py | 1 | 3766 | import ipaddress
import logging
import os
import platform
import subprocess
from typing import Union, List
from libs.log import decor_log_debug
from vendor.parser.unit import Unit
logger = logging.getLogger(__name__)
class Iface:
_PARAMS = ('address', 'broadcast')
_SYS_CLASS_NET = '/sys/class/net'
_LOC... | gpl-2.0 | 179,216,402,471,844,900 | 25.442857 | 92 | 0.572663 | false | 3.502365 | false | false | false |
Fat-Zer/FreeCAD_sf_master | src/Mod/Path/PathScripts/PostUtils.py | 13 | 6902 | # -*- coding: utf-8 -*-
#***************************************************************************
#* Copyright (c) 2014 Yorik van Havre <yorik@uncreated.net> *
#* *
#* This file is part of the FreeCAD CAx development system. ... | lgpl-2.1 | -6,297,142,182,281,898,000 | 39.6 | 155 | 0.571139 | false | 4.06239 | false | false | false |
codilime/contrail-controller | src/config/common/vnc_extensions.py | 5 | 1962 | #
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
import functools
import stevedore
class ApiHookManager(stevedore.hook.HookManager):
def __init__(self, namespace, hook_name):
super(ApiHookManager, self).__init__(namespace, hook_name,
invok... | apache-2.0 | -3,327,320,396,266,068,500 | 28.283582 | 66 | 0.562691 | false | 3.83953 | false | false | false |
colorado-code-for-communities/denver_streets | initialize_environment.py | 1 | 5436 | """Convienence CLI utility to initialize the local development database.
Convienece command line utility to initialize a local development database,
taking a single argument for the database type. Acceptable values for that
single argument include "development" and "test" as strings.
@author: A. Samuel Pottinger (Gle... | apache-2.0 | -2,951,621,009,014,440,400 | 31.550898 | 80 | 0.70677 | false | 3.950581 | true | false | false |
pexip/os-python-txdbus | txdbus/client.py | 2 | 23341 |
"""
This is a DBus client connection implementation. It provides the ability to
call methods on remote objects, receive signals, and export local objects and
methods over the DBus bus.
@author: Tom Cocagne
"""
import six
from twisted.internet import defer, reactor
from twisted.internet.error import ConnectError
from... | mit | -1,643,196,876,426,134,800 | 31.150138 | 79 | 0.576539 | false | 4.590167 | false | false | false |
wangshunzi/Python_code | 02-Python面向对象代码/面向对象-基础/方法相关-补充.py | 1 | 12605 | # _*_ encoding:utf-8 _*_
# class Person:
# __age = 18
#
# def __run(self):
# print("pao")
#
# def _Person__run(self):
# print("xxx")
#
#
# p = Person()
# p._Person__run()
#
# print(Person.__dict__)
# class Person:
# def __init__(self, n, a):
# self.name = n
# self.age =... | mit | 2,189,247,531,696,896,000 | 16.886536 | 85 | 0.450055 | false | 2.447319 | false | false | false |
SalvusHub/pyexodus | pyexodus/tests/test_writing_exodus.py | 1 | 62290 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
:copyright:
Lion Krischer (lionkrischer@gmail.com), 2016
:license:
MIT License
"""
import os
import platform
import h5netcdf
import numpy as np
import pytest
from pyexodus import exodus
_p = [
{"io_size": 4, "word_size": 4, "f_dtype": np.float32},
{"i... | mit | -5,404,230,207,184,901,000 | 28.661905 | 77 | 0.363429 | false | 4.076837 | true | false | false |
IvanAli/powerline | tests/vim.py | 15 | 18840 | # vim:fileencoding=utf-8:noet
_log = []
vars = {}
vvars = {'version': 703}
_tabpage = 0
_mode = 'n'
_buf_purge_events = set()
options = {
'paste': 0,
'ambiwidth': 'single',
'columns': 80,
'encoding': 'utf-8',
}
_last_bufnr = 0
_highlights = {}
from collections import defaultdict as _defaultdict
_environ = _defaultd... | mit | 4,514,735,052,001,041,000 | 19.500544 | 140 | 0.64018 | false | 2.768146 | false | false | false |
kartikpalani/Smart-Energy-Hackathon | Light Hackers/Raspberry Pi/hub.py | 1 | 4661 | import MySQLdb
import serial
import string
hub_id = '1'
nodes = [1,2,3,4]
locn = '\'43.3333N:72.6666E\''
install_date = '\'2004/01/04\''
server = '10.129.154.129'
self = 'localhost'
db1 = MySQLdb.connect(host=server, user='smart', passwd='smart', db='smartlight')
db2 = MySQLdb.connect(host=self, user='root', pa... | mit | 1,032,667,395,608,431,900 | 26.104651 | 225 | 0.661017 | false | 2.646792 | false | false | false |
riking/youtube-dl | youtube_dl/extractor/npo.py | 8 | 1996 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
unified_strdate,
)
class NPOIE(InfoExtractor):
IE_NAME = 'npo.nl'
_VALID_URL = r'https?://www\.npo\.nl/[^/]+/[^/]+/(?P<id>[^/?]+)'
_TEST = {
'url': 'http://www.npo.nl/nieuwsuur/22-06-20... | unlicense | -5,719,362,035,754,157,000 | 31.193548 | 110 | 0.519038 | false | 3.310116 | false | false | false |
zonca/rings | rings/utils.py | 1 | 8369 | import pandas as pd
import healpy as hp
import os
import numpy as np
import sqlite3
from numba import jit
from planck import private
from planck import Planck
from planck.metadata import get_g0
import matplotlib
def plot_pseudomap(clock, pseudomap, vmin=-3, vmax=3):
import matplotlib.pyplot as plt
plt.figure(... | gpl-3.0 | 203,812,422,420,147,230 | 37.925581 | 179 | 0.616681 | false | 2.940618 | false | false | false |
LCAS/spqrel_tools | actions/generatetaskdescription.py | 1 | 9971 | ### register the utterance from the operator and interpret it with lu4r ###
import qi
import argparse
import sys
import time
import threading
import random
import re
import pprint as pp
import action_base
from action_base import *
actionName = "generatetaskdescription"
SEMANTIC_INFO_MEM = "/semantic_info"
tasks_def... | mit | -2,553,441,742,043,907,000 | 31.691803 | 120 | 0.581085 | false | 3.679336 | false | false | false |
orsinium/djcore | djcore/utils/inc/mail.py | 1 | 2101 | from html.parser import HTMLParser
from django.core import mail
from django.template import Context, loader
from django.test.client import Client
try:
from django.conf import settings
EMAIL_USERNAME = settings.EMAIL_USERNAME
EMAIL_HOST_USER = settings.EMAIL_HOST_USER
except (ImportError, AttributeError):
... | lgpl-3.0 | 3,960,457,843,323,735,000 | 28.591549 | 86 | 0.610186 | false | 3.934457 | false | false | false |
pybel/pybel | src/pybel/parser/parse_metadata.py | 1 | 13288 | # -*- coding: utf-8 -*-
"""This module supports the relation parser by handling statements."""
import logging
import re
from typing import Mapping, Optional, Pattern, Set
from pyparsing import And, MatchFirst, ParseResults, Suppress, Word
from .baseparser import BaseParser
from .constants import NamespaceTermEncodi... | mit | 5,848,522,418,272,468,000 | 41.589744 | 157 | 0.660069 | false | 4.140854 | false | false | false |
rspavel/spack | var/spack/repos/builtin/packages/libgpg-error/package.py | 5 | 1321 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class LibgpgError(AutotoolsPackage):
"""Common error values for all GnuPG components."""
ho... | lgpl-2.1 | -2,295,175,739,855,038,200 | 39.030303 | 94 | 0.719909 | false | 2.636727 | false | false | false |
wjchen84/rapprentice | test/test_registration_synthetic.py | 3 | 4287 | import argparse, os.path as osp
parser = argparse.ArgumentParser()
parser.add_argument("--mode",choices=["self","pairwise"],default="self")
parser.add_argument("--sampledata_dir",default=osp.expanduser("~/Data/sampledata"))
parser.add_argument("--plotting", type=int,default=1)
parser.add_argument("--to3d", action="stor... | bsd-2-clause | -4,178,206,165,633,620,000 | 33.572581 | 107 | 0.552834 | false | 2.966782 | false | false | false |
rodyakin/chilly-build | share/chilly-build/buildsupport/Compilation.py | 1 | 14008 | ###############################################################################
# The MIT License (MIT)
# Copyright (c) 2007-2016 Roman Rodyakin
#
# 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 Softw... | mit | -6,697,801,386,291,809,000 | 42.912226 | 96 | 0.629783 | false | 5.037037 | false | false | false |
relic7/prodimages | python/import_404_Marketplace.py | 2 | 1362 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os,sys,sqlalchemy,glob,io
def import_404_data():
mysql_engine_data = sqlalchemy.create_engine('mysql+mysqldb://root:mysql@prodimages.ny.bluefly.com:3301/data_imagepaths')
mysql_engine_www = sqlalchemy.create_engine('mysql+mysqldb://root:mysql@prodimages.n... | mit | -6,632,637,829,310,122,000 | 33.075 | 130 | 0.606461 | false | 3.537662 | false | false | false |
jantman/TuxTruck-wxPython | test.py | 1 | 3594 | #!/usr/bin/env python
# TuxTruck testing file - used to test functions before addition to mainline code
# NOTICE - this is used to test simple (non object-oriented) functions ONLY
# Time-stamp: "2008-05-27 14:11:52 jantman"
# $Id: test.py,v 1.2 2008-05-27 18:23:08 jantman Exp $
import re
import elementtree.ElementTre... | gpl-3.0 | 4,447,374,324,896,333,000 | 37.645161 | 373 | 0.646912 | false | 3.708978 | true | false | false |
jschmid1/bzr | process_buildqueue.py | 1 | 2718 | import datetime
import time
from api.database.db import init_db, db_session
from api.logger.logger import log
from api.database.models import User, Producable, Inventory, BuildQueue
def process_buildqueue():
while(1):
prs = Producable.query.all()
for pr in prs:
log.debug("Checking buil... | gpl-3.0 | -8,733,355,413,974,707,000 | 52.294118 | 166 | 0.536792 | false | 4.10574 | false | false | false |
truls/almique | examples/ewma-int.py | 1 | 3464 | #!/usr/bin/env python3
from sme import External, Network, Function, Bus, SME, Types
t = Types()
#from baseavg import *
import numpy as np
from matplotlib import pyplot as plt
import pylab
import sys
class Source(External):
def setup(self, ins, outs, data, count):
self.map_outs(outs, "out")
self.dat... | gpl-3.0 | -6,889,542,767,311,067,000 | 28.862069 | 106 | 0.548788 | false | 3.149091 | false | false | false |
sylvanelite/universalSmashSystem | engine/abstractFighter.py | 1 | 60857 | import pygame
import engine.baseActions as baseActions
import engine.collisionBox as collisionBox
import math
import settingsManager
import spriteManager
import engine.article as article
import engine.hitbox as hitbox
import weakref
import xml.etree.ElementTree as ElementTree
import xml.dom.minidom
import os
import act... | gpl-3.0 | 1,216,565,689,778,460,400 | 41.379526 | 238 | 0.582645 | false | 3.883911 | false | false | false |
msabramo/kallithea | kallithea/model/user.py | 1 | 17119 | # -*- coding: utf-8 -*-
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that... | gpl-3.0 | -3,948,185,677,689,133,000 | 35.501066 | 94 | 0.559612 | false | 4.0375 | false | false | false |
dkobozev/tatlin | libtatlin/scene.py | 1 | 11829 | # -*- coding: utf-8 -*-
# Copyright (C) 2011 Denis Kobozev
#
# 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 pr... | gpl-2.0 | -5,715,753,680,528,909,000 | 32.041899 | 84 | 0.559811 | false | 3.841832 | false | false | false |
rstebbing/shards | solve_multiple_shards.py | 1 | 4772 | ##########################################
# File: solve_multiple_shards.py #
# Copyright Richard Stebbing 2014. #
# Distributed under the MIT License. #
# (See accompany file LICENSE or copy at #
# http://opensource.org/licenses/MIT) #
##########################################
# Imports
import a... | mit | -6,628,325,400,285,863,000 | 32.370629 | 74 | 0.515717 | false | 3.62614 | false | false | false |
styrmis/django-mail-queue | mailqueue/south_migrations/0005_auto__chg_field_mailermessage_html_content__chg_field_mailermessage_ap.py | 2 | 3642 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'MailerMessage.html_content'
db.alter_column(u'mailqueue_mailermessage', 'html_content', s... | mit | -5,447,404,109,654,143,000 | 54.19697 | 148 | 0.62905 | false | 3.567091 | false | false | false |
marcore/edx-platform | openedx/core/djangoapps/theming/models.py | 8 | 1262 | """
Django models supporting the Comprehensive Theming subsystem
"""
from django.db import models
from django.conf import settings
from django.contrib.sites.models import Site
class SiteTheme(models.Model):
"""
This is where the information about the site's theme gets stored to the db.
`site` field is fo... | agpl-3.0 | 4,928,382,667,648,986,000 | 31.358974 | 93 | 0.675119 | false | 4.165017 | false | false | false |
ravibhure/ansible | lib/ansible/modules/cloud/vmware/vmware_local_user_manager.py | 18 | 6348 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright IBM Corp. 2016
# Author(s): Andreas Nafpliotis <nafpliot@de.ibm.com>
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_META... | gpl-3.0 | 8,622,682,855,971,890,000 | 33.313514 | 132 | 0.622558 | false | 3.942857 | false | false | false |
bertothunder/m3u8 | tests/test_parser.py | 1 | 12741 | # coding: utf-8
# Copyright 2014 Globo.com Player authors. All rights reserved.
# Use of this source code is governed by a MIT License
# license that can be found in the LICENSE file.
import m3u8
import playlists
import pytest
from m3u8.parser import cast_date_time, ParseError
def test_should_parse_simple_playlist_fr... | mit | 6,864,849,483,971,950,000 | 48.19305 | 107 | 0.679303 | false | 3.022776 | true | false | false |
pierreroth64/robotframework-template | scripts/run_acceptancetest.py | 1 | 1743 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Runner script for acceptance testing"""
import os
import re
import sys
import string
from subprocess import call
def rework_args(args):
"""Rework args to be able to exclude list of tags (pybot hack)"""
# first loop to distinguish between previous, --exclude, ... | mit | 8,603,181,282,194,589,000 | 27.57377 | 81 | 0.597246 | false | 3.740343 | false | false | false |
llange/human_curl | examples/multi_get.py | 1 | 5274 | #http://rarestblog.com/py/multi_get.py.txt
import cStringIO
import sys
try:
import pycurl2 as pycurl
except ImportError:
import pycurl
import re
def removewww(a):
return a.replace('www.','')
def domain_from_url(url):
if re.findall(r'^[a-z]+://', url):
try: return re.findall('^[a-z]+://(www[0... | bsd-3-clause | 6,211,826,439,227,015,000 | 29.310345 | 130 | 0.503223 | false | 3.492715 | false | false | false |
7yl4r/eventsEngine | EventsEngine/EventsEngine.py | 1 | 1185 | '''
This class defines the object which holds all game information.
Think of it like a giant game container in which everything goes.
'''
from Event import Event
from Action import Action
from Trigger import Trigger
from Story import Story
class EventsEngine(object):
def __init__(self, eventList=None):
i... | gpl-2.0 | -3,477,089,523,513,707,000 | 28.625 | 88 | 0.603376 | false | 4.665354 | false | false | false |
teraspawn/endocytosis | images.py | 1 | 1703 | #! /usr/bin/python
from pyx import *
barrier = []
barrierfile = open('output/output-barriernumber')
for item in barrierfile:
item = item.split()
barrier.append(float(item[1]))
filaments = []
filamentsfile = open('output/output-length')
for item in filamentsfile:
item = item.split()
filaments.append(item[1:])
b... | gpl-2.0 | 1,323,854,876,540,445,200 | 26.467742 | 62 | 0.705226 | false | 2.51551 | false | false | false |
unioslo/cerebrum | Cerebrum/modules/virthome/LDIFHelper.py | 1 | 8620 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Copyright 2007-2018 University of Oslo, Norway
#
# This file is part of Cerebrum.
#
# Cerebrum 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... | gpl-2.0 | -5,031,888,653,987,470,000 | 36.807018 | 79 | 0.561833 | false | 4.066038 | false | false | false |
iliaselmatani/Praecipua | tweet.py | 1 | 1672 | import twitter, feedparser, tinyurl, hashlib
import time
i=0
api =""
class bcolors:
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[91m'
ENDC = '\033[0m'
def twitterLogin():
global api
api = twitter.Api(consumer_key='', consumer_secret='', access_token_key='', access_token_secret='')... | gpl-2.0 | -1,602,417,346,993,999,000 | 28.857143 | 103 | 0.546651 | false | 3.549894 | false | false | false |
xiaomatech/ops | library/idrac.py | 1 | 9484 | #!/usr/bin/env python
# -*- coding:utf8 -*-
import urllib2
from configs import idrac_config
class Idrac(object):
def __init__(self, host):
self.sid = None
self.host = host
self.username = idrac_config.get('username')
self.password = idrac_config.get('password')
def __enter__(... | mit | 7,063,150,415,932,120,000 | 32.160839 | 116 | 0.542598 | false | 3.988225 | true | false | false |
irvingprog/python-pilas-experimental | prueba.py | 3 | 1039 | # -*- encoding: utf-8 -*-
import sys
from PyQt4 import QtGui
import pilasengine
class VentanaAsistente(QtGui.QWidget):
def __init__(self):
super(VentanaAsistente, self).__init__()
self.initUI()
def agregar_widget(self, widget):
self.widget = widget
self.hbox.addWidget(self.... | lgpl-3.0 | 6,652,130,726,432,464,000 | 21.106383 | 60 | 0.627526 | false | 3.092262 | false | false | false |
fabioz/mu-repo | mu_repo/action_fix_eol.py | 1 | 1332 | from mu_repo.action_diff import ParsePorcelain
import os.path
from mu_repo.execute_command import ExecuteGettingStdOutput
from mu_repo.print_ import Print
import sys
#===================================================================================================
# Fix
#=============================================... | gpl-3.0 | 6,287,629,875,937,748,000 | 37.057143 | 100 | 0.436937 | false | 4.774194 | false | false | false |
CoBiG2/RAD_Tools | vcf_parser.py | 1 | 8328 | #!/usr/bin/python3
# Copyright 2015 Diogo N. Silva <o.diogosilva@gmail.com>
# Copyright 2020 Francisco Pina-Martins
# vcf_parser.py 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 Lice... | gpl-3.0 | 6,844,418,906,513,855,000 | 31.916996 | 99 | 0.551873 | false | 3.814934 | false | false | false |
SaintPawk/PyCrypto | xlLoop/src/xlloop.py | 1 | 9461 | import random, socket, select, struct, threading, traceback, types, SocketServer
import inspect
# Defines the XLoper types
XL_TYPE_NUM = 1
XL_TYPE_STR = 2
XL_TYPE_BOOL = 3
XL_TYPE_ERR = 4
XL_TYPE_MULTI = 5
XL_TYPE_MISSING = 6
XL_TYPE_NIL = 7
XL_TYPE_INT = 8
XL_TYPE_SREF = 9
# Defines XLError types
XL_... | mit | 8,419,797,492,355,339,000 | 35.248031 | 133 | 0.490963 | false | 4.014001 | false | false | false |
hellhound/dentexchange | dentexchange/apps/employer/admin.py | 2 | 4628 | # -*- coding:utf-8 -*-
from django.contrib import admin
from libs import admin
from .models import Business, Praxis, JobPosting
from . import strings
class BusinessAdmin(admin.ModelAdmin):
list_display = ('get_email', 'number_offices', 'is_mso',
'number_employees',)
search_fields = ('user__email', 'u... | bsd-3-clause | 4,390,987,681,915,482,600 | 43.07619 | 79 | 0.601124 | false | 3.163363 | false | false | false |
jrconlin/campaign_manager | campaign/views.py | 1 | 13736 | # 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/.
""" Cornice services.
"""
from campaign.logger import LOG
from decorators import checkService, authorizedOnly
from mako.t... | mpl-2.0 | 8,456,023,545,734,989,000 | 31.940048 | 79 | 0.568943 | false | 4.146091 | false | false | false |
realPy/docker-dyndock | event.py | 1 | 2353 | #!/usr/bin/env python
import docker
import json
import urllib2
import hashlib
import subprocess
import base64
import os
DOCKER_SOCK = 'unix:///docker.sock'
def get(d, *keys):
empty = {}
return reduce(lambda d, k: d.get(k, empty), keys, d) or None
class DockerMonitor(object):
def __init__(self, client):
... | gpl-2.0 | -5,855,067,378,453,291,000 | 25.438202 | 123 | 0.648534 | false | 2.897783 | false | false | false |
sharkykh/SickRage | sickbeard/providers/t411.py | 1 | 7414 | # coding=utf-8
# Author: djoole <bobby.djoole@gmail.com>
#
# URL: https://sickrage.github.io
#
# This file is part of SickRage.
#
# SickRage 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 ... | gpl-3.0 | -7,221,587,360,542,783,000 | 41.365714 | 194 | 0.541408 | false | 4.498786 | false | false | false |
LucasAlumni/Blog | Blog/settings.py | 1 | 3207 | """
Django settings for Blog project.
Generated by 'django-admin startproject' using Django 1.9.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os
# Buil... | mit | -1,032,281,940,282,914,800 | 25.286885 | 91 | 0.689429 | false | 3.528053 | false | false | false |
ibelie/typy | typy/Proto.py | 1 | 10795 | #-*- coding: utf-8 -*-
# Copyright 2017 ibelie, Chen Jie, Joungtao. All rights reserved.
# Use of this source code is governed by The MIT License
# that can be found in the LICENSE file.
SymbolDecodeMap = "-ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_"
SymbolEncodeMap = {}
for i, c in enumerate(Symb... | mit | -2,063,682,016,086,620,000 | 27.863636 | 150 | 0.626031 | false | 2.82001 | false | false | false |
chipx86/reviewboard | reviewboard/hostingsvcs/gitlab.py | 1 | 45543 | from __future__ import unicode_literals
import json
import logging
import re
from django import forms
from django.core.cache import cache
from django.core.exceptions import ValidationError
from django.utils.six.moves.urllib.error import HTTPError, URLError
from django.utils.six.moves.urllib.parse import quote, quote_... | mit | 2,766,033,803,404,899,000 | 33.21713 | 79 | 0.543069 | false | 4.744063 | false | false | false |
damix911/flask-bees | example.py | 1 | 1892 | from flask import Flask
from bees import Bees
app = Flask(__name__)
@app.route("/api-list")
def api_list():
from jinja2 import Environment, PackageLoader
env = Environment(loader=PackageLoader("resources", "."))
t = env.get_template("api-list.html")
return t.render(name = 'carlo')
bees = Bees(app, "/... | mit | -3,941,133,309,695,258,600 | 24.567568 | 71 | 0.490486 | false | 3.402878 | false | false | false |
afonari/q-e_schrodinger | bin/qexsd/qespresso/converters.py | 1 | 26473 | # -*- coding: utf-8 -*-
#
# Copyright (c), 2015-2016, Quantum Espresso Foundation and SISSA (Scuola
# Internazionale Superiore di Studi Avanzati). All rights reserved.
# This file is distributed under the terms of the MIT License. See the
# file 'LICENSE' in the root directory of the present distribution, or
# http://o... | gpl-2.0 | -2,765,496,500,377,660,000 | 39.110606 | 116 | 0.502474 | false | 3.817854 | false | false | false |
TribeMedia/synapse | synapse/storage/schema/delta/31/search_update.py | 2 | 2011 | # Copyright 2016 OpenMarket Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | apache-2.0 | 4,361,390,822,073,399,300 | 29.938462 | 74 | 0.680756 | false | 3.85249 | false | false | false |
yorvic/.vim | bundle/python-mode/pylibs/pylama/checkers/pylint/reporters/__init__.py | 3 | 3785 | # Copyright (c) 2003-2010 Sylvain Thenault (thenault@gmail.com).
# Copyright (c) 2003-2013 LOGILAB S.A. (Paris, FRANCE).
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2 of the L... | gpl-3.0 | -2,998,830,060,575,905,000 | 31.62931 | 80 | 0.60819 | false | 4.069892 | false | false | false |
fireeye/flare-floss | floss/plugins/mov_plugin.py | 1 | 2400 | # Copyright (C) 2017 FireEye, Inc. All Rights Reserved.
import logging
import envi
import viv_utils
from floss.plugins.function_meta_data_plugin import DecodingRoutineIdentifier
logger = logging.getLogger(__name__)
class MovPlugin(DecodingRoutineIdentifier):
"""
Identify suspicious MOV instructions.
""... | apache-2.0 | 3,216,988,100,988,478,500 | 46.058824 | 137 | 0.545417 | false | 4.678363 | false | false | false |
knightmare2600/d4rkc0de | others/Webclicker.py | 1 | 8634 | ## v1.0a
## sannes
import urllib2, httplib, socket, sys, threading
from re import search
from time import sleep
from random import randint
from optparse import OptionParser
url = urllib2
parser = OptionParser()
Hello = """
_____
/ ___/____ _____ ____ ___ _____
\_... | gpl-2.0 | 6,605,765,528,925,982,000 | 39.731132 | 163 | 0.493051 | false | 3.296678 | false | false | false |
rwl/PyCIM | CIM15/IEC61970/Informative/InfWork/CULaborItem.py | 1 | 5649 | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | mit | -4,888,909,022,456,698,000 | 39.934783 | 177 | 0.685608 | false | 4.046562 | false | false | false |
rhelmer/socorro | socorro/unittest/testlib/expectations.py | 11 | 2977 | # 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/.
class DummyObjectWithExpectations(object):
"""a class that will accept a series of method calls with arguments, but wi... | mpl-2.0 | -4,021,892,344,439,127,000 | 52.160714 | 143 | 0.674169 | false | 4.05034 | false | false | false |
GeHongpeng/PythonProject | Classification/SVM.py | 1 | 1743 | # _*_ coding= utf-8 _*_
import cv2
import numpy as np
# Load the data, converters convert the letter to a number
data = np.loadtxt('./hog/hog.csv', dtype='float32', delimiter=',')
# split the data to two, 10000 each for train and test
train, test = np.vsplit(data, 2)
# split trainData and testData to features and r... | gpl-3.0 | 8,267,157,326,996,205,000 | 26.666667 | 90 | 0.682731 | false | 3.036585 | true | false | false |
euri10/populus | populus/cli/compile_cmd.py | 1 | 1106 | import gevent
import click
from populus.utils.cli import (
compile_project_contracts,
watch_project_contracts,
)
from .main import main
@main.command('compile')
@click.option(
'--watch',
'-w',
is_flag=True,
help="Watch contract source files and recompile on changes",
)
@click.option(
'-... | mit | 8,228,847,951,546,464,000 | 22.041667 | 79 | 0.657324 | false | 3.964158 | false | false | false |
holiman/evmlab | evmlab/opcodes.py | 1 | 5383 | from copy import copy
import collections
import binascii
from . import parse_int_or_hex,decode_hex,remove_0x_head,bytearray_to_bytestr,encode_hex
# Taken from https://github.com/ethereum/pyethereum/blob/develop/ethereum/opcodes.py
# Done this way to reduce dependencies a bit
# schema: [opcode, ins, outs, gas]
opcode... | gpl-3.0 | 8,410,612,116,088,125,000 | 29.247191 | 88 | 0.546164 | false | 2.484079 | false | false | false |
gzzo/arachne | arachne/scripts/scan_sqli.py | 1 | 1387 | from arachne.base import Chooser
from arachne.utils import celery_output, strip_open, replace_params
from arachne.browser import Browser
from arachne.celery import celery
from collections import OrderedDict
name = 'sqli-scan'
def base_sqli_scan(url, browser_args):
b = Browser(name, **browser_args)
sqli_ke... | gpl-2.0 | -8,514,621,889,907,708,000 | 22.803571 | 67 | 0.638789 | false | 2.813387 | false | false | false |
Tesora-Release/tesora-trove | trove/guestagent/module/drivers/package_install_driver.py | 2 | 3097 | # Copyright 2016 Tesora, 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 ... | apache-2.0 | 6,419,181,602,636,991,000 | 35.011628 | 78 | 0.635131 | false | 3.920253 | false | false | false |
joshcvt/natinal | notifiers/ConsoleTextNotifier.py | 1 | 1392 | from .NotifierClass import Notifier
class ConsoleTextNotifier(Notifier):
def __init__(self,cfgParser,insec):
self.header = insec
# in a real notifier, you'd do some cfgParser.get(sec,"service_specific_value") = value action here
def pushResults(self,newres):
if "morningAnnounce" in list(newres.keys()):
... | mit | 7,847,422,084,920,771,000 | 23.857143 | 159 | 0.631466 | false | 3.026087 | false | false | false |
lastweek/gem5 | src/mem/slicc/ast/TypeFieldEnumAST.py | 8 | 2939 | # Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
# Copyright (c) 2009 The Hewlett-Packard Development Company
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met: redistributions of source co... | bsd-3-clause | -5,436,504,768,745,650,000 | 45.650794 | 80 | 0.70262 | false | 4.27802 | false | false | false |
ericflo/pynzb | setup.py | 1 | 4415 | from setuptools import setup, find_packages
version = '0.1.0'
LONG_DESCRIPTION = """
Introduction
------------
NZB is an XML-based file format for retrieving posts from NNTP (Usenet) servers.
Since NZB is XML-based, it's relatively easy to build one-off parsers to parse
NZB files. This project is an attempt to cons... | bsd-3-clause | -4,160,520,295,048,397,000 | 26.428571 | 111 | 0.683126 | false | 3.754252 | false | false | false |
francois-contat/scapy | scapy/contrib/automotive/obd/tid/tids.py | 1 | 3840 | # This file is part of Scapy
# See http://www.secdev.org/projects/scapy for more information
# Copyright (C) Andreas Korb <andreas.d.korb@gmail.com>
# Copyright (C) Nils Weiss <nils@we155.de>
# This program is published under a GPLv2 license
from scapy.fields import FlagsField, ByteField, ScalingField, PacketListField... | gpl-2.0 | 6,138,261,980,193,742,000 | 25.30137 | 77 | 0.58724 | false | 2.585859 | false | false | false |
naoina/pyroonga | pyroonga/odm/attributes.py | 1 | 5669 | # -*- coding: utf-8 -*-
# Copyright (c) 2013 Naoya Inada <naoina@kuune.org>
# Licensed under the MIT License.
"""Attributes of groonga"""
__author__ = "Naoya Inada <naoina@kuune.org>"
__all__ = [
'Symbol', 'TableFlags', 'ColumnFlagsFlag', 'ColumnFlags', 'DataType',
'TokenizerSymbol', 'Tokenizer', 'Normalize... | mit | -4,282,518,941,033,470,000 | 29.154255 | 100 | 0.678074 | false | 3.797053 | false | false | false |
MSOE-Supermileage/datacollector | src/sensors/joule_sensor.py | 1 | 1753 | #!/usr/bin/env python
# coding=utf-8
from sensor import BaseSensor
import time
class JouleSensor(BaseSensor):
def __init__(self, port='/dev/joulearduino', baudrate=9600, timeout=0.5):
BaseSensor.__init__(self, port, baudrate, timeout)
self.last_query_time = 0.0
def get_data(self):
d... | epl-1.0 | -5,223,397,570,491,005,000 | 28.728814 | 77 | 0.560753 | false | 3.417154 | false | false | false |
2e2a/l-rex | apps/contrib/csv.py | 1 | 3359 | import csv
from io import StringIO
from django import forms
DEFAULT_DELIMITER = ';'
DEFAULT_QUOTING = csv.QUOTE_MINIMAL
DEFAULT_DIALECT = {
'delimiter': DEFAULT_DELIMITER,
'quoting': DEFAULT_QUOTING,
'has_header': True,
}
def read_file(form_cleaned_data):
file = form_cleaned_data['file']
try:
... | gpl-3.0 | 6,291,066,792,523,452,000 | 30.990476 | 106 | 0.607026 | false | 3.878753 | false | false | false |
sfu-fas/coursys | relationships/migrations/0004_extend_length_of_event_types.py | 1 | 1346 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-07-18 14:04
from django.db import migrations, models
import relationships.handlers
class Migration(migrations.Migration):
dependencies = [
('relationships', '0003_add_company_name'),
]
operations = [
migrations.AlterField(
... | gpl-3.0 | 170,549,695,438,957,760 | 63.095238 | 947 | 0.738484 | false | 3.867816 | false | false | false |
dfdeshom/v8onpython | v8-src/tools/presubmit.py | 1 | 5777 | #!/usr/bin/env python
#
# Copyright 2008 Google Inc. All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this li... | bsd-3-clause | 2,105,180,298,792,533,800 | 27.043689 | 77 | 0.714731 | false | 3.984138 | false | false | false |
lukeshingles/artistools | artistools/makemodel/lapuente.py | 1 | 3734 | #!/usr/bin/env python3
import argparse
import math
# import os.path
import numpy as np
import pandas as pd
from astropy import units as u
from pathlib import Path
import artistools as at
def addargs(parser):
parser.add_argument('-inputpath', '-i',
default='.',
he... | mit | -6,227,611,810,015,835,000 | 36.717172 | 109 | 0.595876 | false | 3.244136 | false | false | false |
huggingface/transformers | tests/test_tokenization_gpt2.py | 2 | 6957 | # coding=utf-8
# Copyright 2020 The HuggingFace Team. 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 | 3,752,226,736,098,637,000 | 37.65 | 118 | 0.600259 | false | 3.837286 | true | false | false |
crazyhottommy/manta | src/python/libexec/mergeChromDepth.py | 2 | 2586 | #!/usr/bin/env python
#
# Manta - Structural Variant and Indel Caller
# Copyright (c) 2013-2015 Illumina, 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 3 of the License, ... | gpl-3.0 | -9,151,615,537,310,889,000 | 25.9375 | 112 | 0.62181 | false | 3.576763 | false | false | false |
dscplatform/dscframework | clients/dscframework.py | 1 | 4314 | import websockets
import sys
import struct
import asyncio
import numpy as np
import uuid
import json
# TODO attempt reconnect on connection failure
class Client:
CONST_REGISTER = 0x1
CONST_DEREGISTER = 0x2
CONST_SUBSCRIBE = 0x3
CONST_UNSUBSCRIBE = 0x4
CONST_BROADCAST = 0x5
CONST_UPDATE = 0x6
... | mit | 5,614,229,682,663,369,000 | 32.703125 | 134 | 0.557255 | false | 3.715762 | false | false | false |
Atomistica/atomistica | src/python/atomistica/__init__.py | 1 | 1367 | # ======================================================================
# Atomistica - Interatomic potential library and molecular dynamics code
# https://github.com/Atomistica/atomistica
#
# Copyright (2005-2020) Lars Pastewka <lars.pastewka@imtek.uni-freiburg.de>
# and others. See the AUTHORS file in the top-level A... | gpl-2.0 | 933,726,748,880,545,500 | 28.085106 | 75 | 0.678859 | false | 3.950867 | false | false | false |
csdl/makahiki | makahiki/apps/widgets/unlock_creator/views.py | 3 | 1758 | '''Provides the view for the Unlock Condition Creator widget.
Created on Jun 5, 2013
@author: Cam Moore
'''
from apps.managers.smartgrid_mgr import smartgrid_mgr
from apps.widgets.smartgrid_design.models import Draft
from django.http import Http404, HttpResponse
import json
from apps.managers.predicate_mgr import pred... | mit | 2,450,350,360,574,124,500 | 33.470588 | 74 | 0.66496 | false | 3.838428 | false | false | false |
edx-solutions/edx-platform | common/djangoapps/student/migrations/0002_auto_20151208_1034.py | 1 | 3053 | # -*- coding: utf-8 -*-
from django.db import migrations, models
import django.db.models.deletion
from django.conf import settings
from opaque_keys.edx.django.models import CourseKeyField
class Migration(migrations.Migration):
dependencies = [
('student', '0001_initial'),
]
operations = [
... | agpl-3.0 | -2,528,045,232,315,096,600 | 49.04918 | 239 | 0.59417 | false | 4.318246 | false | false | false |
jmgc/swift | utils/swift_build_support/swift_build_support/products/swiftpm.py | 3 | 4865 | # swift_build_support/products/swiftpm.py -----------------------*- python -*-
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.tx... | apache-2.0 | -7,670,690,660,615,384,000 | 31.651007 | 86 | 0.582323 | false | 3.981178 | true | false | false |
SecondLiners/GO2 | sendgrid/base_interface.py | 2 | 2232 | import python_http_client
class BaseInterface(object):
def __init__(self, auth, host, impersonate_subuser):
"""
Construct the Twilio SendGrid v3 API object.
Note that the underlying client is being set up during initialization,
therefore changing attributes in runtime will not affe... | gpl-3.0 | -7,804,516,613,148,099,000 | 35 | 95 | 0.583333 | false | 4.509091 | false | false | false |
jix/mimisc | mimisc/platforms/ztex_115d.py | 1 | 1491 | from mibuild.generic_platform import *
from mibuild.xilinx_ise import XilinxISEPlatform
from mibuild.crg import SimpleCRG
_io = [
("clk_if", 0, Pins("K20"), IOStandard("LVCMOS33")),
("fx2_fifo", 0,
Subsignal("sloe", Pins("U15"), Drive(12)),
Subsignal("slrd", Pins("N22"), Drive(... | bsd-2-clause | -7,586,789,482,603,552,000 | 33.674419 | 65 | 0.569416 | false | 2.940828 | false | false | false |
codegrafix/iRCSoccerB0t | ircbot.py | 2 | 3879 | import socket
import logging
def findcommand(message, command):
if message.find(command) != -1:
return True
class IrcBot:
""" A simple irc bot which handles basic irc server connection
"""
irc_socket = None
bot_name_ = ''
server_ = ''
port_ = 0
channel_ = ''
# List of own... | gpl-2.0 | -6,084,198,602,490,700,000 | 31.596639 | 114 | 0.549111 | false | 3.882883 | false | false | false |
kayarre/Tools | vmtk/writeNodesEdges.py | 1 | 12421 | import vtk
def getvtkarray(attribute_type):
# assume ints are positive
if attribute_type is int:
return vtk.vtkUnsignedIntArray()
elif attribute_type is float:
return vtk.vtkDoubleArray()
def writeObjects(graph,
node_scalar_list = [],
node_vector_list =... | bsd-2-clause | 1,000,104,222,128,325,100 | 36.868902 | 123 | 0.600837 | false | 3.891291 | false | false | false |
mmcauliffe/python-acoustic-similarity | conch/distance/xcorr.py | 1 | 1356 | import numpy as np
from numpy import log, sqrt, sum, correlate, argmax
from .base import DistanceFunction
class XcorrFunction(DistanceFunction):
def __init__(self):
super(XcorrFunction, self).__init__()
self._function = xcorr_distance
def xcorr_distance(rep_one, rep_two):
if not isinstance(... | mit | -5,754,735,331,945,858,000 | 31.285714 | 65 | 0.608407 | false | 3.450382 | false | false | false |
robmcmullen/peppy | peppy/major_modes/properties.py | 1 | 1499 | # peppy Copyright (c) 2006-2009 Rob McMullen
# Licenced under the GPLv2; see http://peppy.flipturn.org for more info
"""Properties programming language editing support.
Major mode for editing Properties files.
Supporting actions and minor modes should go here only if they are uniquely
applicable to this major mode an... | gpl-2.0 | -1,228,814,323,873,635,600 | 29.591837 | 75 | 0.735157 | false | 3.82398 | false | false | false |
Byron/btractor | src/python/btractor/alf/generators/nuke.py | 1 | 3320 | #-*-coding:utf-8-*-
"""
@package btractor.alf.generators.nuke
@brief Submission of nuke scripts
@note This module needs to be usable anywhere, and may not rely on being run from the nuke host application
@author Sebastian Thiel
@copyright [GNU Lesser General Public License](https://www.gnu.org/licenses/lgpl.html)
"""
... | lgpl-3.0 | 854,351,627,834,585,600 | 37.16092 | 113 | 0.629518 | false | 4.165621 | false | false | false |
six0four/StudentSenseHat | firmware/BlinkLED.py | 1 | 3489 | #!/usr/bin/python3
import sys
import os
from time import sleep
try:
import RPi.GPIO as GPIO
except RuntimeError:
print("Error importing RPi.GPIO! This is probably because you need superuser privileges. You can achieve this by using 'sudo' to run your script")
PIN_17=17
PIN_18=18
GPIO_Chan_List=[PIN_17,PIN_1... | agpl-3.0 | 1,425,474,975,052,381,000 | 23.921429 | 152 | 0.560906 | false | 3.148917 | false | false | false |
danieljjh/oppia | core/domain/user_jobs_test.py | 2 | 24478 | # coding: utf-8
#
# Copyright 2014 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | apache-2.0 | -748,883,406,030,935,200 | 42.09507 | 79 | 0.598088 | false | 3.906479 | true | false | false |
mediafactory/tryton_core_daemon | trytond/backend/postgresql/database.py | 1 | 15424 | #This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
from trytond.backend.database import DatabaseInterface, CursorInterface
from trytond.config import CONFIG
from psycopg2.pool import ThreadedConnectionPool
from psycopg2.extension... | gpl-3.0 | -8,826,127,391,464,552,000 | 34.869767 | 77 | 0.539484 | false | 3.957916 | true | false | false |
mstriemer/addons-server | src/olympia/compat/cron.py | 3 | 5654 | import logging
from collections import defaultdict
from django.db.models import Count, Max
import cronjobs
import elasticsearch.helpers
from olympia import amo
from olympia.amo import search as amo_search
from olympia.amo.utils import chunked
from olympia.addons.models import Addon
from olympia.compat import FIREFOX... | bsd-3-clause | 2,157,331,804,268,080,600 | 40.270073 | 79 | 0.566325 | false | 4.070554 | false | false | false |
badi/pwq | pwq/_wq/replication.py | 1 | 5715 | """
Provides a WorkQueue that supports task replication
"""
from . import decorator
import collections
import random
class _TagSet(object):
def __init__(self, maxreps=5):
self._tags = collections.defaultdict(set)
self._maxreps = maxreps
def can_duplicate(self):
"""
Can any of ... | gpl-2.0 | 8,468,490,841,998,493,000 | 28.611399 | 100 | 0.539458 | false | 4.199118 | false | false | false |
ui/django-post_office | post_office/tasks.py | 1 | 1534 | """
Only define the tasks and handler if we can import celery.
This allows the module to be imported in environments without Celery, for
example by other task queue systems such as Huey, which use the same pattern
of auto-discovering tasks in "tasks" submodules.
"""
import datetime
from django.utils.timezone import no... | mit | 5,002,918,956,571,159,000 | 32.304348 | 99 | 0.678198 | false | 4.074468 | false | false | false |
mhvuze/mhff | psp/package.py | 3 | 1367 | #!/usr/bin/python3
# Copyright 2013 Seth VanHeulen
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program i... | gpl-3.0 | 2,329,319,057,228,979,700 | 36.972222 | 110 | 0.702999 | false | 3.694595 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.