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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ee08b397/HackerRankAlgorithms | Bigger is Greater.py | 1 | 1401 | # -*- coding: utf-8 -*-
"""
Problem Statement
Given a word w, rearrange the letters of w to construct another word s in such a way that, s is lexicographically
greater than w. In case of multiple possible answers, find the lexicographically smallest one.
Input Format
The first line of input contains t, number of test... | apache-2.0 | -5,662,736,376,435,517,000 | 22.762712 | 113 | 0.506067 | false | 3.528967 | false | false | false |
twoolie/ProjectNarwhal | narwhal/core/torrent/admin.py | 1 | 1675 | # -*- coding: utf-8 -*-
from hashlib import sha1
from bencode import bdecode, BTFailure
from django.contrib import admin
from django.forms import ValidationError
from django.utils.translation import ugettext_lazy as _
from sorl.thumbnail.admin import AdminImageMixin
from markitup.widgets import AdminMarkItUpWidget
fr... | gpl-3.0 | -8,731,757,047,459,328,000 | 33.183673 | 101 | 0.598209 | false | 3.913551 | false | false | false |
auag92/n2dm | Asap-3.8.4/Debug/TestRnd.py | 1 | 1203 | from asap3 import *
from ase import units
from ase.lattice.cubic import FaceCenteredCubic
import numpy as np
import matplotlib.pyplot as plt
import time
repeat = 25
AsapThreads()
#set_verbose(1)
atoms = FaceCenteredCubic(size=(50,50,50), symbol='Cu')
atoms.set_calculator(EMT())
lgv = Langevin(atoms, 5*units.fs, 0.0... | mit | 6,843,576,303,092,335,000 | 20.872727 | 67 | 0.627598 | false | 2.183303 | false | false | false |
sassoftware/rmake3 | rmake/lib/logfile.py | 1 | 3965 | #
# Copyright (c) SAS Institute 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 w... | apache-2.0 | 8,582,112,382,931,050,000 | 26.534722 | 74 | 0.533417 | false | 3.76186 | false | false | false |
LamCiuLoeng/gap | gapproject/model/size_label.py | 1 | 16632 | # -*- coding: utf-8 -*-
"""Sample model module."""
from datetime import datetime as dt
import traceback
import json
from tg import request
from sqlalchemy import *
from sqlalchemy.orm import mapper, relation, backref
from sqlalchemy import Table, ForeignKey, Column
from sqlalchemy.types import Integer, Unicode
# from ... | mit | -119,219,586,362,217,250 | 43.234043 | 168 | 0.638288 | false | 3.502949 | false | false | false |
lizardsystem/lizard-efcis | lizard_efcis/migrations/0023_auto_20150413_1449.py | 1 | 1266 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('lizard_efcis', '0022_auto_20150330_0920'),
]
operations = [
migrations.AlterField(
model_name='importmapping',
... | gpl-3.0 | -6,065,342,759,832,606,000 | 47.692308 | 489 | 0.609005 | false | 3.394102 | false | false | false |
libyal/dtfabric | scripts/validate-definitions.py | 1 | 3303 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# pylint: disable=invalid-name
"""Script to validate dtFabric format definitions."""
import argparse
import glob
import logging
import os
import sys
from dtfabric import errors
from dtfabric import reader
from dtfabric import registry
class DefinitionsValidator(object):... | apache-2.0 | 5,733,501,918,336,347,000 | 23.466667 | 79 | 0.663336 | false | 4.047794 | false | false | false |
MKDTeam/SSH-Client | ui_class/ui_LoadSettings.py | 1 | 4151 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui_LoadSettings.ui'
#
# Created by: PyQt5 UI code generator 5.7
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_qDialog_load(object):
def setupUi(self, qDialog_load):
... | mit | 2,192,943,162,820,737,000 | 52.697368 | 115 | 0.722127 | false | 3.946809 | false | false | false |
Lord-Phoenix/Instam | Instagram/migrations/0002_auto_20160214_1528.py | 1 | 1076 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-02-14 15:28
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('Instagram', '0001_initial'),
]
operations = [
migrations.RenameField(
... | bsd-3-clause | 1,799,239,568,947,666,400 | 25.9 | 63 | 0.537175 | false | 4.286853 | false | false | false |
ehdsouza/python-sdk | examples/conversation_tone_analyzer_integration/tone_detection.py | 1 | 8624 | # Copyright 2016 IBM All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | apache-2.0 | -1,402,762,438,901,459,200 | 34.933333 | 78 | 0.650046 | false | 4.033676 | false | false | false |
zhkzyth/storm_maker | template/src/log.py | 1 | 1055 | #! /usr/bin/env python
# encoding: utf-8
"""
log模块,这里利用了一些sys.modules和python系统库查找的一些trick。
log模块第一次导入的时候,是作为一个文件被查找到的。
查找成功后,文件会跑一个生成log实例的逻辑,然后把它加入到全局sys.modules字典里面。
以后所有模块的`import log`动作都会绕开文件查找的过程,直接在sys.modules里面找这个模块。
"""
import sys
import logging.handlers
from settings import (
LOG_NAME
)
class Log(objec... | mit | 8,243,332,184,773,985,000 | 20.410256 | 62 | 0.639521 | false | 2.345506 | false | false | false |
cwolferh/heat-scratch | heat/engine/resources/stack_resource.py | 1 | 23681 | #
# 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 | -3,361,759,251,738,460,000 | 38.600334 | 79 | 0.584942 | false | 4.570739 | false | false | false |
leakim/svtplay-dl | lib/svtplay_dl/service/mtvnn.py | 1 | 2850 | from __future__ import absolute_import
import re
import os
import xml.etree.ElementTree as ET
from svtplay_dl.service import Service, OpenGraphThumbMixin
from svtplay_dl.utils import is_py2_old
from svtplay_dl.error import ServiceError
from svtplay_dl.log import log
from svtplay_dl.fetcher.rtmp import RTMP
# This is... | mit | 9,012,013,050,944,890,000 | 35.538462 | 126 | 0.580702 | false | 3.571429 | false | false | false |
gfsmith/gears | wxgear.py | 1 | 2773 | import wx
from gears import Gear, InternalGear
class GearPanel(wx.Panel):
def __init__(self, parent, gear=None, margin=10):
self.gear = gear
wx.Panel.__init__(self, parent, -1)
self.SetBackgroundStyle(wx.BG_STYLE_CUSTOM)
self.Bind(wx.EVT_SIZE, self.on_size)
self.Bind(wx.EVT_... | mit | 932,677,239,065,179,300 | 26.74 | 84 | 0.544176 | false | 3.309069 | false | false | false |
I-sektionen/i-portalen | wsgi/iportalen_django/organisations/templatetags/organisation_tags.py | 1 | 1394 | from django.core.urlresolvers import reverse
from django.template.loader_tags import register
from organisations.models import Organisation
from django.utils.translation import ugettext as _
@register.assignment_tag
def get_menu_organisations():
organisations = {
"sektionen": list(Organisation.objects.fil... | mit | 7,963,087,325,601,647,000 | 26.313725 | 95 | 0.720747 | false | 3.665789 | false | false | false |
zhenzhai/edx-platform | openedx/core/lib/block_structure/cache.py | 1 | 4520 | """
Module for the Cache class for BlockStructure objects.
"""
# pylint: disable=protected-access
from logging import getLogger
from openedx.core.lib.cache_utils import zpickle, zunpickle
from .block_structure import BlockStructureModulestoreData
logger = getLogger(__name__) # pylint: disable=C0103
class BlockSt... | agpl-3.0 | -5,488,209,673,808,557,000 | 34.03876 | 95 | 0.605973 | false | 4.256121 | false | false | false |
ayes/bsmapp | allauth/socialaccount/admin.py | 1 | 1700 | from django.contrib import admin
from django import forms
from .models import SocialApp, SocialAccount, SocialToken
from ..account import app_settings
from ..utils import get_user_model
User = get_user_model()
class SocialAppForm(forms.ModelForm):
class Meta:
model = SocialApp
widgets = {
... | gpl-3.0 | -7,428,790,519,821,832,000 | 29.909091 | 70 | 0.616471 | false | 3.71179 | false | false | false |
drone115b/cog | cog/pr/session.py | 1 | 5366 | #####################################################################
#
# Copyright 2015 SpinVFX
#
# 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... | apache-2.0 | 5,170,754,577,203,698,000 | 36.524476 | 122 | 0.565412 | false | 3.966001 | false | false | false |
eswartz/RenderPipeline | rpplugins/dof/plugin.py | 2 | 1731 | """
RenderPipeline
Copyright (c) 2014-2016 tobspr <tobias.springer1@gmail.com>
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... | mit | 5,213,239,337,648,033,000 | 35.0625 | 77 | 0.751589 | false | 4.191283 | false | false | false |
thni/clash | checkpoint/writer.py | 1 | 4153 | from collections import OrderedDict
import yaml
import numpy as np
def list_to_crs(list_of_items):
"""
>>> list_of_items = [ [1,5,2], [6,0], [], [1,3,4], [7] ]
>>> data, index = list_to_crs(list_of_items)
>>> print(data)
[1 5 2 6 0 1 3 4 7]
>>> print(index)
[0 3 5 5 8 9]
"""
data =... | bsd-3-clause | 2,472,666,040,633,694,700 | 31.445313 | 83 | 0.576692 | false | 3.37368 | false | false | false |
hunter-cameron/Bioinformatics | python/mypyli/picrust.py | 1 | 12465 |
import sys
import os
import subprocess
import logging
import time
import re
import pandas
logging.basicConfig()
LOG = logging.getLogger(__name__)
class TraitTableEntry(object):
""" A single entry in a trait table """
def __init__(self, name):
self.name = name
self.traits = {}
def __str... | mit | 2,656,266,103,485,837,000 | 31.802632 | 168 | 0.539591 | false | 4.035287 | false | false | false |
autosportlabs/podium-api | podium_api/laps.py | 1 | 6556 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from podium_api.asyncreq import make_request_custom_success, get_json_header_token
from podium_api.types.paged_response import get_paged_response_from_json
from podium_api.types.lap import get_lap_from_json
def make_lap_get(token, endpoint,
expand... | mit | 5,120,784,259,262,049,000 | 34.021978 | 82 | 0.584198 | false | 4.713156 | false | false | false |
grapesmoker/regulations-parser | regparser/tree/struct.py | 2 | 8034 | from collections import defaultdict
from json import JSONEncoder
import logging
import hashlib
class Node(object):
APPENDIX = u'appendix'
INTERP = u'interp'
REGTEXT = u'regtext'
SUBPART = u'subpart'
EMPTYPART = u'emptypart'
INTERP_MARK = 'Interp'
def __init__(self, text='', children=[],... | cc0-1.0 | -175,724,102,707,968,580 | 30.754941 | 79 | 0.568584 | false | 3.995027 | false | false | false |
FUB-HCC/neonion | accounts/models.py | 1 | 3611 | from django.db import models
from django.contrib.auth.models import AbstractBaseUser, PermissionsMixin
from django.contrib.auth.models import Permission
from django.conf import settings
from documents.models import Document
from annotationsets.models import ConceptSet
from django.dispatch import receiver
from django.db... | gpl-2.0 | 3,542,351,326,208,814,000 | 35.11 | 100 | 0.692606 | false | 4.080226 | false | false | false |
jorsea/odoo-addons | product_supplier_pricelist/__openerp__.py | 1 | 1851 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2015 ADHOC SA (http://www.adhoc.com.ar)
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Pu... | agpl-3.0 | 586,951,906,193,661,700 | 32.672727 | 78 | 0.589411 | false | 4.023913 | false | false | false |
shaurz/devo | styled_text_ctrl.py | 1 | 14419 | import os.path
import string
import random
import re
import wx
import wx.stc
from contextlib import contextmanager
from find_replace_dialog import FindReplaceDetails, FindReplaceDialog
from go_to_line_dialog import GoToLineDialog
from menu_defs import edit_menu
from syntax import syntax_from_filename, syntax_plain
fro... | mit | 5,523,138,262,635,727,000 | 34.779156 | 125 | 0.621888 | false | 3.72584 | false | false | false |
oliverlee/antlia | python/wiener.py | 1 | 3564 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import pickle
import numpy as np
import scipy.signal
import matplotlib.pyplot as plt
import seaborn as sns
from antlia import filter as ff
from antlia import plot_braking as braking
from antlia import plot_steering as steering
from antlia import path
from antlia... | bsd-2-clause | 7,877,642,511,333,761,000 | 29.724138 | 87 | 0.604938 | false | 2.923708 | false | false | false |
nicococo/AdaScreen | scripts/experiment_view_properties.py | 1 | 3010 | import numpy as np
class ExperimentViewProperties(object):
""" An instance of this class is returned for each experiment
and contains plotting information.
"""
title = 'experiment'
info = ''
dataset = ''
x_axis_name = 'x-axis'
y_axis_name = 'y-axis'
xscale = 'linear'
fea... | mit | -5,007,963,576,327,995,000 | 34.833333 | 113 | 0.534219 | false | 3.090349 | false | false | false |
jkyeung/XlsxWriter | xlsxwriter/test/comparison/test_chart_column11.py | 1 | 1585 | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | bsd-2-clause | 6,366,998,469,490,249,000 | 24.983607 | 79 | 0.548265 | false | 3.468271 | true | false | false |
jaceyen/vocmon | server/battle/views.py | 1 | 4934 | # -*- coding:utf-8 -*-
from django.shortcuts import render
from django.http import HttpResponse
import json
from models import Trainer, Room, Move
from django.views.decorators.csrf import csrf_exempt
# Create your views here.
def status(request, channel):
response_data = {}
room = Room.objects.get(id=channel)
#如果两... | mit | 9,041,713,632,571,423,000 | 34.507463 | 84 | 0.666456 | false | 2.532198 | false | false | false |
CamdenCU/CSCI-5622_project | qanta.py | 1 | 9934 | from numpy import *
from util.gen_util import *
from util.math_util import *
from util.dtree_util import *
from rnn.adagrad import Adagrad
import rnn.propagation as prop
from classify.learn_classifiers import validate
import cPickle, time, argparse
from multiprocessing import Pool
# splits the training data into mini... | mit | -6,302,099,089,504,401,000 | 34.733813 | 104 | 0.580028 | false | 3.692937 | false | false | false |
bluebeel/beaglebone-lib | setup.py | 1 | 1567 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
with open('README.rst') as readme_file:
readme = readme_file.read()
with open('HISTORY.rst') as history_file:
history = history_file.read()
requirements = [
# TODO: put package requirements here
]
test_requirements = [
# TOD... | mit | -1,807,758,762,339,326,000 | 28.54717 | 68 | 0.623244 | false | 3.667447 | true | true | false |
MicroMagnum/MicroMagnum | src/magnum/micromagnetics/landau_lifshitz_gilbert.py | 1 | 5773 | # Copyright 2012, 2013 by the Micromagnum authors.
#
# This file is part of MicroMagnum.
#
# MicroMagnum 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) a... | gpl-3.0 | -6,193,523,791,874,354,000 | 35.537975 | 136 | 0.594838 | false | 3.261582 | false | false | false |
TopherGopher/aws-infra.jenkins-scripts | dns_lookup.py | 1 | 2883 | #!/usr/bin/python
import click
import os
import time
#import dns
import dns.resolver
import dns.query
import dns.zone
import sys
@click.command()
@click.option('--host', prompt="What host would you like to query?")
@click.option('--record-type', prompt="What type of record would you like to look-up?", type=click.Choic... | mit | -9,113,717,093,664,297,000 | 35.493671 | 166 | 0.67846 | false | 3.356228 | false | false | false |
codelieche/moocweb | apps/account/forms.py | 1 | 1364 | # _*_ coding:utf-8 _*_
__author__ = 'YaoYong'
__date__ = '2017/2/12 上午11:13'
from django import forms
from captcha.fields import CaptchaField
from .models import UserProfile
class LoginForm(forms.Form):
username = forms.CharField(required=True)
password = forms.CharField(required=True, min_length=5)
class ... | mit | 6,574,003,610,001,017,000 | 28.883721 | 73 | 0.685358 | false | 3.139364 | false | false | false |
oliver-newman/randommap-website | randommap/db.py | 1 | 3453 | import base64
import logging
from datetime import datetime
import background
import mapbox
from redis import StrictRedis
from . import application
from .geography import is_land, random_coords
from .models import SatMap
__all__ = ["get_current_map"]
logger = logging.getLogger("root")
redis = StrictRedis.from_url(ap... | mit | 235,098,005,476,397,000 | 26.188976 | 90 | 0.631625 | false | 3.200185 | false | false | false |
vikkyrk/incubator-beam | sdks/python/apache_beam/utils/timestamp.py | 1 | 6284 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | apache-2.0 | 7,029,545,838,768,393,000 | 29.357488 | 79 | 0.688415 | false | 3.954688 | false | false | false |
phodal/growth-code | chapter8/growth_studio/urls.py | 1 | 1240 | """growth_studio URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.10/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Cl... | mit | 2,644,287,657,994,282,500 | 35.470588 | 83 | 0.708065 | false | 3.512748 | false | false | false |
bioinform/varsim | generate_small_test_ref.py | 1 | 7472 | import os
import subprocess
import sys
import numpy
import argparse
import pysam
import vcf
import pybedtools
import logging
from collections import defaultdict, OrderedDict
from utils import makedirs
def uint(value):
if not value.isdigit(): raise argparse.ArgumentTypeError("%s is not digit-only" % value)
ret = in... | bsd-2-clause | 982,188,125,316,029,200 | 44.840491 | 323 | 0.659395 | false | 3.547958 | false | false | false |
boothead/karl | karl/utilities/mailin.py | 1 | 7220 | # Copyright (C) 2008-2009 Open Society Institute
# Thomas Moroz: tmoroz@sorosny.org
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License Version 2 as published
# by the Free Software Foundation. You may not use, modify or distribu... | gpl-2.0 | 3,161,503,228,973,107,700 | 36.025641 | 117 | 0.601524 | false | 3.721649 | false | false | false |
Acour83/ashflashtheorig | ashflash.py | 1 | 1208 | """
AshFlashtheOrig.net
~~~~~~~~~~~~~~~~~~~
AshFlash's website which serves as a hub to other interactive media hosted on
sites like YouTube, Soundcloud, Twitter and Facebook.
:copyright: (c) 2012 by Ash Courchene
"""
from flask import Flask
from media import Player
#App setup
app = Flask(__nam... | mit | 1,816,142,309,337,960,200 | 26.454545 | 111 | 0.615894 | false | 3.573964 | false | false | false |
ouspg/trytls | stubs/python3-aiohttp/run.py | 1 | 1086 | import argparse
import asyncio
import ssl
import aiohttp
@asyncio.coroutine
def main(conn, url):
with aiohttp.ClientSession(connector=conn) as session:
try:
response = yield from session.get(url)
yield from response.release()
except aiohttp.errors.ClientOSError as exc:
... | mit | -4,064,754,247,602,782,700 | 27.578947 | 63 | 0.608656 | false | 4.00738 | false | false | false |
djaodjin/djaodjin-pages | pages/api/relationship.py | 1 | 9581 | # Copyright (c) 2020, DjaoDjin 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:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and t... | bsd-2-clause | 6,198,214,166,352,397,000 | 29.906452 | 79 | 0.607557 | false | 4.237506 | false | false | false |
flammified/terrabot | terrabot/client.py | 1 | 2291 | import socket
import struct
import threading
from . import packets
class Client(object):
"""A class that handles the connection to a Terraria Server"""
def __init__(self, HOST, PORT, player, world, event_manager):
super(Client, self).__init__()
self.ADDR = (HOST, PORT)
self.player =... | mit | 6,343,849,997,680,148,000 | 29.546667 | 80 | 0.563073 | false | 4.195971 | false | false | false |
SINGROUP/pycp2k | pycp2k/classes/_each415.py | 1 | 1114 | from pycp2k.inputsection import InputSection
class _each415(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 | -5,434,648,259,353,519,000 | 41.846154 | 447 | 0.576302 | false | 2.908616 | false | false | false |
hachreak/invenio-accounts | tests/test_admin.py | 1 | 6499 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015, 2016, 2017 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 optio... | gpl-2.0 | -6,866,043,566,574,892,000 | 34.320652 | 76 | 0.621788 | false | 3.979792 | true | false | false |
knoxsp/hydrawebui | webui/config/middleware.py | 1 | 1264 | # -*- coding: utf-8 -*-
"""WSGI middleware initialization for the webui application."""
from webui.config.app_cfg import base_config
from webui.config.environment import load_environment
__all__ = ['make_app']
# Use base_config to setup the necessary PasteDeploy application factory.
# make_base_app will wrap the T... | gpl-3.0 | 5,534,573,368,139,551,000 | 31.410256 | 78 | 0.692247 | false | 3.795796 | true | false | false |
scienceopen/progress-post | TexCount.py | 1 | 1157 | #!/usr/bin/env python
'''
Michael Hirsch 2014
Reads a .tex file (say, your PhD dissertation) and plots the counts vs time
TeXcount, then optionally can post that png to an HTML server.
'''
from texcounts import moddet
from texcounts.plots import plotTexStats
from texcounts.ssh import uploadSFTP
def main(texfn,uplo... | gpl-3.0 | 4,529,049,618,205,188,600 | 38.896552 | 134 | 0.723423 | false | 3.54908 | false | false | false |
FireCARES/firecares | firecares/firestation/migrations/0067_auto_20210223_1052.py | 1 | 1291 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import firecares.firestation.models
import django.contrib.gis.db.models.fields
class Migration(migrations.Migration):
dependencies = [
('firestation', '0066_staffing_other_apparatus_type'),
]
... | mit | 7,127,194,379,537,610,000 | 34.861111 | 179 | 0.63749 | false | 3.797059 | false | false | false |
tbentropy/tilecutter | tcproject.py | 1 | 21913 | # coding: UTF-8
#
# TileCutter Project Module (Old version)
#
# Copyright © 2008-2011 Timothy Baldock. All Rights Reserved.
import os, sys
import wx
import logger
debug = logger.Log()
import config
config = config.Config()
from tc import Paths
paths = Paths()
from environment import getenvvar
# project[view][sea... | bsd-3-clause | 5,800,934,445,073,669,000 | 40.031835 | 130 | 0.567751 | false | 4.062106 | true | false | false |
valmynd/MediaFetcher | src/plugins/youtube_dl/youtube_dl/extractor/vh1.py | 1 | 1340 | # coding: utf-8
from __future__ import unicode_literals
from .mtv import MTVServicesInfoExtractor
class VH1IE(MTVServicesInfoExtractor):
IE_NAME = 'vh1.com'
_FEED_URL = 'http://www.vh1.com/feeds/mrss/'
_TESTS = [{
'url': 'http://www.vh1.com/episodes/0umwpq/hip-hop-squares-kent-jones-vs-nick-young-season-1-ep-12... | gpl-3.0 | 5,233,270,379,538,079,000 | 31.634146 | 130 | 0.665172 | false | 2.39356 | false | false | false |
bosha/torhandlers | torhandlers/templating/jinja2.py | 1 | 1052 | # -*- coding: utf-8 -*-
__author__ = 'Alex Bo'
__email__ = 'bosha@the-bosha.ru'
from torhandlers.base import HTTPError
from torhandlers.templating.base import BaseTemplater
from torhandlers.templating.exceptions import TemplatingException
class Jinja2Templater(BaseTemplater):
def render(self, **kwargs):
... | mit | -7,520,357,185,858,677,000 | 35.275862 | 76 | 0.663498 | false | 3.797834 | false | false | false |
MariaSG98/Competitive-programming | Coding Contest oct-2017/level3/level3.py | 1 | 1070 | def valid(trans,ok):
trans=trans.split()
nin=int(trans[1])
lis_in=[]
for i in range(3,nin*3+1,3):
lis_in.append([trans[i], trans[i+1]])
#ins=trans[1:(nin)*3+1]
nout=int(trans[nin*3+2])
lis_out=[]
for i in range(nin*3+3,nin*3+4+nout,3):
lis_out.append([trans[i], trans[i+1]])
tin=0
tout=0
for i in lis_in:... | mit | 6,340,603,308,231,508,000 | 19.980392 | 50 | 0.616822 | false | 2.127237 | false | false | false |
nbartos/mock | py/mockbuild/plugins/root_cache.py | 1 | 8860 | # vim:expandtab:autoindent:tabstop=4:shiftwidth=4:filetype=python:textwidth=0:
# License: GPL2 or later see COPYING
# Written by Michael Brown
# Copyright (C) 2007 Michael E Brown <mebrown@michaels-house.net>
# python library imports
import fcntl
import os
import time
# our imports
from mockbuild.trace_decorator impo... | gpl-2.0 | 7,852,149,457,600,191,000 | 41.190476 | 119 | 0.56851 | false | 4.043816 | true | false | false |
jeremiahyan/odoo | addons/mail/models/mail_template.py | 1 | 15587 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import base64
import logging
from odoo import _, api, fields, models, tools, Command
from odoo.exceptions import UserError
_logger = logging.getLogger(__name__)
class MailTemplate(models.Model):
"Templates for s... | gpl-3.0 | 1,603,413,026,934,116,900 | 49.937908 | 209 | 0.566947 | false | 4.435686 | false | false | false |
gorcajo/GuilleScripts | tunnels.py | 1 | 2870 | #!/usr/bin/env python3.6
import argparse
import subprocess
PRIVATE_RSA_KEY_PATH="~/.ssh/id_rsa"
PORTS = [3306, 27017]
def main():
parser = argparse.ArgumentParser()
group = parser.add_mutually_exclusive_group(required=True)
group.add_argument("-m", "--marte", action="store_true", help="re... | mit | 5,331,519,297,850,928,000 | 27.137255 | 149 | 0.556794 | false | 3.771353 | false | false | false |
khertan/KhtNotes | khtnotes/davlib.py | 1 | 12785 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# pylint: disable-msg=W0402,W0231,W0141,R0903,C0321,W0701,R0904,C0103
# pylint: disable-msg=W0201,W0102,R0913,W0622,E1101,C0111,C0121,R0901
# DAV client library
#
# Copyright (C) 1998-2000 Guido van Rossum. All Rights Reserved.
# Written by Greg Stein. Given to Guido. Lice... | gpl-3.0 | 634,034,585,222,952,800 | 32.121762 | 79 | 0.560657 | false | 3.724148 | false | false | false |
SymbiFlow/symbiflow-arch-defs | utils/mux_gen.py | 1 | 17393 | #!/usr/bin/env python3
"""
Generate MUX.
MUXes come in two types,
1) Configurable via logic signals,
2) Statically configured by PnR (called "routing") muxes.
"""
import argparse
import itertools
import lxml.etree as ET
import os
import sys
from lib import mux as mux_lib
from lib.argparse_extra import ActionStoreB... | isc | -4,190,226,086,415,681,500 | 31.269017 | 94 | 0.473581 | false | 3.776982 | false | false | false |
jeremyschulman/py-pim-demo | pim-save.py | 1 | 2560 | #!/usr/bin/env python2.7
import argparse
import os,sys
from getpass import getpass
from pprint import pprint as pp
from collections import Counter
from itertools import chain
from jnpr.junos import Device
from jnpr.junos.factory import loadyaml
from jnpr.junos.exception import RpcError
def parseargs():
p = argpar... | apache-2.0 | 4,634,298,368,493,446,000 | 27.131868 | 86 | 0.514453 | false | 3.99376 | false | false | false |
electrumalt/electrum-doge | gui/qt/qrwindow.py | 1 | 2759 | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2014 Thomas Voegtlin
#
# 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 y... | gpl-3.0 | -2,254,393,006,415,864,600 | 31.081395 | 141 | 0.662559 | false | 3.57847 | false | false | false |
deevarvar/myLab | baidu_code/cinema_monitor/CheckAction.py | 1 | 7487 | __author__ = 'yezhihua'
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#TODO: add UT
import requests
import common
import os
from pyquery import PyQuery
import common
import time
import logging
import sys
import re
import MySQLdb
import database
class CheckAction():
HTMLDIRBASE= "./html"
TIMETABLEDIRBASE = "... | mit | 6,324,490,852,516,339,000 | 35.526829 | 141 | 0.533992 | false | 3.775593 | false | false | false |
MaplePlan/djwp | base/views.py | 1 | 1685 | from django.shortcuts import render
from django.http import HttpResponse
from django.http import HttpResponseRedirect
from django.http import request
import json
import tenjin
from tenjin.helpers import *
# Create your views here.
from utils import *
###############
## API views ##
###############
def api_index(reque... | lgpl-3.0 | 7,560,915,765,793,160,000 | 25.328125 | 113 | 0.68724 | false | 3.12616 | false | false | false |
DarthMaulware/EquationGroupLeaks | Leak #5 - Lost In Translation/windows/Resources/Python/Core/Lib/compiler/pycodegen.py | 1 | 44909 | # uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: pycodegen.py
import imp
import os
import marshal
import struct
import sys
from cStringIO import StringIO
from compiler import ast, parse, walk, synta... | unlicense | -6,425,133,214,633,501,000 | 28.800929 | 186 | 0.559554 | false | 3.761853 | false | false | false |
alfa-addon/addon | plugin.video.alfa/channels/hdfulls.py | 1 | 13198 | # -*- coding: utf-8 -*-
# -*- Channel HDFullS -*-
# -*- Created for Alfa-addon -*-
# -*- By the Alfa Develop Group -*-
from builtins import chr
from builtins import range
import sys
PY3 = False
if sys.version_info[0] >= 3: PY3 = True; unicode = str; unichr = chr; long = int
if PY3:
from lib import alfaresolver_py... | gpl-3.0 | -5,018,244,296,102,544 | 32.642857 | 131 | 0.60954 | false | 3.536337 | false | false | false |
Bill48105/Doger | Irc.py | 1 | 11482 | import socket, random, threading, Queue, sys, traceback, time, ssl, signal
from string import maketrans
import Config, Global, Hooks, Logger, Commands
lowercase = "abcdefghijklmnopqrstuvwxyz[]~\\"
uppercase = "ABCDEFGHIJKLMNOPQRSTUVWXYZ{}^|"
caseless = "0123456789_-`@"
ircupper = maketrans(lowercase, uppercase)
def ... | gpl-3.0 | -1,725,329,486,274,918,400 | 32.281159 | 167 | 0.660338 | false | 2.973841 | true | false | false |
SilentIsGold/ATCommand | GPS.py | 1 | 3868 | import time
import sys
import glob
from datetime import datetime
from Log import Logger
count =0
class GPSCommand():
def __init__(self):
"""In case the GPS has different update rate or baud rate
updaterate use ms
"""
self.BaudRate = 9600
self.UpdateRate = 1000
sel... | cc0-1.0 | 7,246,058,595,596,543,000 | 32.938596 | 167 | 0.523785 | false | 3.51317 | false | false | false |
St0rn/NetHack | NetHackLib.py | 1 | 6778 | #
#======================================================================
#
# 88888888
# 88 888 88 88
# 888 88 88
# 788 Z88 88 88.888888 8888888 888888 88 8888888.
# 888888. 88 88 ... | gpl-3.0 | -2,590,653,426,170,341,000 | 29.669683 | 104 | 0.544113 | false | 3.475897 | false | false | false |
jdwittenauer/ionyx | ionyx/contrib/averaging_regressor.py | 1 | 3460 | import numpy as np
from sklearn.base import RegressorMixin, clone
from sklearn.externals.joblib import Parallel, delayed
from sklearn.utils import Bunch
from sklearn.utils.metaestimators import _BaseComposition
def _parallel_fit_estimator(estimator, X, y, sample_weight=None):
if sample_weight:
estimator.f... | apache-2.0 | 8,976,101,852,481,793,000 | 29.350877 | 85 | 0.600578 | false | 4.505208 | false | false | false |
alexherns/biotite-scripts | kcmgr.py | 1 | 6092 | #!/usr/bin/env python
import sys
import argparse
import os
import glob
import kyotocabinet as kc
KC_UTILITIES = [
'create',
'import',
'get',
'dump',
'getbulk'
]
def open_multi(db_names, mode = kc.DB.OREADER):
"""
Return kc.DB objects for all files in db_names
Input:
db_names <... | mit | 1,719,705,942,351,444,200 | 31.57754 | 118 | 0.543664 | false | 3.705596 | false | false | false |
snowman2/pangaea | setup.py | 1 | 1466 | # -*- coding: utf-8 -*-
#
# setup.py
# pangaea
#
# Created by Alan D Snow, 2017.
# BSD 3-Clause
from setuptools import setup, find_packages
requires = [
'gazar',
'wrf-python',
]
setup(name='pangaea',
version='0.0.4',
description='An xarray extension for gridded land surface'
... | bsd-3-clause | -8,048,871,452,215,886,000 | 26.148148 | 64 | 0.511596 | false | 4.106443 | false | false | false |
arivarton/workhours | stamp/add.py | 1 | 5131 | import sys
from datetime import datetime
from .exceptions import NoMatchingDatabaseEntryError, CurrentStampNotFoundError
from .mappings import Workday, Project, Customer, Invoice
from .db import Database
from .formatting import yes_or_no, provide_input, value_for
from .mappings import Customer, Project
__all__ = ['ne... | gpl-3.0 | 4,792,099,790,968,667,000 | 36.727941 | 117 | 0.564412 | false | 4.430915 | false | false | false |
aaront/calcmymarks | markcalc.py | 1 | 1461 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
calcmymarks.markcalc
~~~~~~~~~~~~~~~~~~~~
The mark calculator object
:copyright: (c) 2009-2010 by Aaron Toth.
:license: Apache 2.0, see LICENSE for more details.
"""
class MarkCalc(object):
"""A mark calculator"""
def __init__(self, curren... | apache-2.0 | -3,329,041,056,082,705,400 | 30.085106 | 78 | 0.561944 | false | 3.572127 | false | false | false |
Ayrx/Ayrx.github.io | app/serve.py | 1 | 1460 | import http.server
import os
import os.path
PORT = 8080
class BlogRequestHandler(http.server.SimpleHTTPRequestHandler):
def __init__(self, *args, directory=None, **kwargs):
super().__init__(*args, **kwargs)
def translate_path(self, path):
path = http.server.SimpleHTTPRequestHandler.trans... | mit | 6,237,403,581,883,016,000 | 28.2 | 80 | 0.632877 | false | 3.81201 | false | false | false |
FireCARES/firecares | firecares/firestation/migrations/0043_auto_20170131_1520.py | 1 | 2536 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('firestation', '0042_firedepartment_owned_tracts_geom'),
]
sql = """
CREATE OR REPLACE FUNCTION department_fts_document(integer) RET... | mit | -1,371,240,621,358,019,300 | 30.7 | 118 | 0.680599 | false | 3.713031 | false | false | false |
AscSecTeam/knackered-runner | Knackered-Backend/Conf.py | 1 | 2342 | # Backend configuration options are stored here
from collections import OrderedDict
class Conf:
def __init__(self):
self.WEB_ROOT = "/var/www/html/"
self.PLUGIN_DIRECTORY = "/usr/lib/nagios/plugins/"
self.DATABASE_USERNAME = "root"
self.DATABASE_PASSWORD = ""
self.DATABAS... | mit | -1,614,704,230,798,496,000 | 37.393443 | 110 | 0.542699 | false | 4.547573 | false | false | false |
ascension/angular-flask-mongo | angular_flask/models.py | 1 | 3114 | import datetime
import uuid
from angular_flask import app
from angular_flask.core import mongo_db
class Post2(mongo_db.Document):
created_at = mongo_db.DateTimeField(default=datetime.datetime.now, required=True)
title = mongo_db.StringField(max_length=255, required=True)
slug = mongo_db.StringField(max_length=255... | mit | -7,737,638,607,241,312,000 | 38.923077 | 120 | 0.759152 | false | 3.171079 | false | false | false |
edmundgentle/schoolscript | SchoolScript/bin/Debug/pythonlib/Lib/runpy.py | 1 | 11389 | """runpy.py - locating and running Python code using the module namespace
Provides support for locating and running Python scripts using the Python
module namespace instead of the native filesystem.
This allows Python code to play nicely with non-filesystem based PEP 302
importers when locating support scripts ... | gpl-2.0 | 8,557,384,942,205,761,000 | 37.545139 | 78 | 0.583458 | false | 4.051583 | false | false | false |
ytsapras/robonet_site | scripts/tests/test_api_telescope_record.py | 1 | 1246 | # -*- coding: utf-8 -*-
"""
Created on Mon May 22 18:29 2017
@author: ytsapras
"""
from os import getcwd, path, remove, environ
from sys import path as systempath
cwd = getcwd()
systempath.append(path.join(cwd,'../..'))
systempath.append(path.join(cwd,'..'))
from local_conf import get_conf
robonet_site = get_conf('ro... | gpl-2.0 | -5,650,984,758,185,483,000 | 26.688889 | 69 | 0.658909 | false | 3.349462 | false | false | false |
aricoin/Aricoin | contrib/testgen/base58.py | 1 | 2818 | '''
Aricoin base58 encoding and decoding.
Based on https://aricointalk.org/index.php?topic=1026.0 (public domain)
'''
import hashlib
# for compatibility with following code...
class SHA256:
new = hashlib.sha256
if str != bytes:
# Python 3.x
def ord(c):
return c
def chr(n):
return byte... | mit | -7,285,506,551,863,218,000 | 26.096154 | 97 | 0.607523 | false | 3.257803 | false | false | false |
IMAMBAKS/pyrelatics | pyrelatics/__init__.py | 2 | 1309 | # The MIT License (MIT)
#
# Copyright (c) 2015 Rashied Imambaks
#
# 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, ... | mit | -6,906,268,408,243,886,000 | 42.633333 | 79 | 0.758594 | false | 3.990854 | false | false | false |
lehmannro/pootle | local_apps/pootle_profile/views.py | 1 | 3835 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2009 Zuza Software Foundation
#
# This file is part of Pootle.
#
# 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 t... | gpl-2.0 | 3,372,596,008,094,237,000 | 35.179245 | 122 | 0.677705 | false | 4.159436 | false | false | false |
offtools/linux-show-player | lisp/ui/widgets/fade_combobox.py | 1 | 2113 | # -*- coding: utf-8 -*-
#
# This file is part of Linux Show Player
#
# Copyright 2012-2016 Francesco Ceruti <ceppofrancy@gmail.com>
#
# Linux Show Player 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 ... | gpl-3.0 | -7,149,332,451,194,562,000 | 31.015152 | 76 | 0.683862 | false | 3.515807 | false | false | false |
zniper/automag | magazine/apps/content/migrations/0001_initial.py | 1 | 9578 | # -*- 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 'Category'
db.create_table('content_category', (
... | mit | 4,767,488,133,118,275,000 | 67.421429 | 191 | 0.560138 | false | 3.775325 | false | false | false |
timofeymukha/eddylicious | eddylicious/generators/interpolation.py | 1 | 4148 | # This file is part of eddylicious
# (c) Timofey Mukha
# The code is released under the GNU GPL Version 3 licence.
# See LICENCE.txt and the Legal section in the User Guide for more information
"""Functions for generating inflow velocity fields by
interpolation of data (from a precursor).
"""
from __future__ import p... | gpl-3.0 | -1,587,783,866,885,491,200 | 36.035714 | 78 | 0.630665 | false | 4.027184 | false | false | false |
ryan-roemer/django-cloud-browser | cloud_browser/common.py | 1 | 5929 | """Common operations.
Because cloud operations are OS agnostic, we don't use any of :mod:`os` or
:mod:`os.path`.
"""
from datetime import datetime
from django.core.exceptions import ImproperlyConfigured
###############################################################################
# Constants.
#####################... | mit | -5,356,295,993,389,883,000 | 28.351485 | 79 | 0.553044 | false | 4.022388 | true | false | false |
astamp/PyXT | pyxt/tests/test_ppi.py | 1 | 3779 | import unittest
from pyxt.tests.utils import SystemBusTestable
from pyxt.ppi import *
class PPITests(unittest.TestCase):
def setUp(self):
self.ppi = ProgrammablePeripheralInterface(0x060)
self.ppi.write_diag_port = self.diag_port_hook
self.ppi.signal_keyboard_reset = self.signal_reset_hook... | gpl-2.0 | -3,673,670,119,934,624,000 | 38.789474 | 98 | 0.637735 | false | 3.199831 | true | false | false |
IIITS/iiits.ac.in | iiits/migrations/0063_auto_20160717_2322.py | 1 | 1525 | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-07-17 23:22
from __future__ import unicode_literals
import ckeditor.fields
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('iiits', '0062_auto... | mit | 8,603,002,351,790,251,000 | 31.446809 | 118 | 0.60459 | false | 4.344729 | false | false | false |
alberthrocks/mtgox_mon | screenshot.py | 1 | 1345 | #!/usr/bin/env python
# PyMtGoxMon v1.0 - Python-based monitor for MtGox BTC trading!
# Copyright (C) 2013 Albert Huang.
#
# 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 th... | gpl-3.0 | -9,141,184,397,926,556,000 | 33.487179 | 74 | 0.724164 | false | 3.070776 | false | false | false |
stormi/tsunami | src/primaires/communication/commandes/canaux/rejoindre.py | 1 | 2849 | # Copyright (c) 2010 LE GOFF Vincent
# 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
# list of conditions and ... | bsd-3-clause | -8,232,848,624,584,730,000 | 45.377049 | 79 | 0.694592 | false | 3.828146 | false | false | false |
sixu05202004/newsmeme | newsmeme-blueprints/newsmeme/newsmeme/apps/comment/views.py | 1 | 3064 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask import redirect, flash, g, jsonify, current_app
from flask.ext.mail import Message
from flask.ext.babel import gettext as _
from newsmeme import signals
from newsmeme.apps.comment import comment
from newsmeme.helpers import render_template
from newsmeme.permis... | bsd-3-clause | 7,467,992,429,473,181,000 | 24.747899 | 70 | 0.616514 | false | 3.787392 | false | false | false |
JrGoodle/clowder | clowder/cli/status.py | 1 | 2583 | """Clowder command line status controller
.. codeauthor:: Joe DeCapo <joe@polka.cat>
"""
import argparse
from typing import Tuple
import clowder.util.formatting as fmt
from clowder.clowder_controller import CLOWDER_CONTROLLER, print_clowder_name, valid_clowder_yaml_required
from clowder.config import Config
from cl... | mit | 6,382,497,949,525,730,000 | 33.44 | 110 | 0.716221 | false | 3.695279 | false | false | false |
victor-gil-sepulveda/pyProCT-GUI | pyproctgui/gui/pdbSelection.py | 1 | 2151 | '''
Created on 08/05/2013
@author: victor
'''
import os
import prody
import urllib2
def get_elements (pdb):
pdb_elements = pdb.getElements()
names = pdb.getNames()
elements = []
for i, element in enumerate(pdb_elements):
if len(element) == 0:
elements.append(names[i][0])
... | mit | -1,507,525,714,892,436,700 | 28.888889 | 111 | 0.606695 | false | 3.633446 | false | false | false |
dwang159/oncall | src/oncall/api/v0/upcoming_shifts.py | 1 | 2967 | # Copyright (c) LinkedIn Corporation. All rights reserved. Licensed under the BSD-2 Clause license.
# See LICENSE in the project root for license information.
from ... import db
from .events import all_columns
from ujson import dumps as json_dumps
from collections import defaultdict
import operator
def on_get(req, r... | bsd-2-clause | -3,157,749,975,111,549,400 | 33.114943 | 99 | 0.587462 | false | 3.818533 | false | false | false |
TomHodson/Py-in-the-Sky | Bot.py | 1 | 1744 | #!/usr/bin/env python
import Skype4Py
debug = False
import threading
import time
class BotSkypeinterface(object):
def __init__(self, commands, threading):
self.skype = Skype4Py.Skype(Transport='x11')
if not self.skype.Client.IsRunning:
print 'You need to start skype'
exit()
... | bsd-2-clause | 8,371,043,184,521,548,000 | 35.354167 | 93 | 0.620986 | false | 3.990847 | false | false | false |
DouglasRaillard/BrownBat | brownbat/core.py | 1 | 41633 |
# Copyright 2014 Douglas RAILLARD
#
# This file is part of BrownBat.
#
# BrownBat is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later versio... | lgpl-3.0 | -4,202,712,648,720,952,000 | 39.420388 | 194 | 0.636851 | false | 4.213866 | false | false | false |
edusegzy/pychemqt | lib/mEoS/Benzene.py | 1 | 8708 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from lib.meos import MEoS
from lib import unidades
class Benzene(MEoS):
"""Multiparameter equation of state for benzene"""
name = "benzene"
CASNumber = "71-43-2"
formula = "C6H6"
synonym = ""
rhoc = unidades.Density(304.79239968)
Tc = unidades.Tem... | gpl-3.0 | 2,639,155,977,263,230,500 | 40.260664 | 149 | 0.465311 | false | 2.421697 | false | false | false |
JohnyEngine/CNC | heekscnc/pycnc/Tool.py | 1 | 14817 | from Object import Object
from consts import *
import HeeksCNC
class Tool(Object):
def __init__(self, diameter = 3.0, title = None, tool_number = 0, type = TOOL_TYPE_SLOTCUTTER):
Object.__init__(self)
self.tool_number = tool_number
self.type = type
self.diameter = diameter
s... | apache-2.0 | 99,210,237,715,250,290 | 45.889241 | 128 | 0.551056 | false | 4.00135 | false | false | false |
nuagenetworks/monolithe | monolithe/generators/lang/html/writers/apiversionwriter.py | 1 | 5264 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2015, Alcatel-Lucent 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
# no... | bsd-3-clause | 5,645,175,313,393,737,000 | 42.866667 | 172 | 0.658245 | false | 4.379368 | false | false | false |
xbed/Mixly_Arduino | mixly_arduino/mpBuild/common/lib/ssd1306.py | 1 | 15582 | from micropython import const
from machine import *
import sys
import framebuf
import time
import esp
import ustruct
_DISPLAY_BLINK_CMD = 0x80
_DISPLAY_BLINK_DISPLAYON = 0x01
_DISPLAY_CMD_BRIGHTNESS = 0xE0
_DISPLAY_OSCILATOR_ON = 0x21
SET_CONTRAST = const(0x81)
SET_ENTIRE_ON = const(0xa4)
SET_NORM_INV ... | apache-2.0 | 3,818,875,348,226,045,000 | 28.967308 | 94 | 0.449236 | false | 3.019767 | false | false | false |
fabregas/nimbusfs-node | nimbus/fabnet/node.py | 1 | 4114 | from operator import itemgetter
import binascii
import heapq
class DHTNode:
def __init__(self, node_id, host=None, port=None,
ext_host=None, ext_port=None):
self.node_id = node_id
self.host = host
self.port = port
self.ext_host = ext_host
self.ext_port = ex... | apache-2.0 | 7,028,196,012,797,840,000 | 28.597122 | 78 | 0.553962 | false | 3.802218 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.