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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CanalTP/Chaos | chaos/utils.py | 1 | 33018 | # Copyright (c) since 2001, Kisio Digital and/or its affiliates. All rights reserved.
from os import path
from functools import wraps
from datetime import datetime, timedelta
import uuid
import json
import logging
from math import ceil
from flask import url_for, g
import flask
from aniso8601 import parse_datetime, par... | agpl-3.0 | -4,752,298,675,579,261,000 | 35.525442 | 177 | 0.581168 | false | 4.069263 | false | false | false |
RENCI/xDCIShare | hs_composite_resource/page_processors.py | 1 | 1620 | from django.contrib import messages
from django.contrib.messages import get_messages
from mezzanine.pages.page_processors import processor_for
from hs_core import page_processors
from hs_core.views import add_generic_context
from .models import CompositeResource
@processor_for(CompositeResource)
def landing_page(r... | bsd-3-clause | 5,709,343,035,990,207,000 | 35.818182 | 95 | 0.646296 | false | 4.285714 | false | false | false |
YACOWS/opps-infographics | opps/infographics/models.py | 1 | 7538 | # -*- coding: utf-8 -*-
from django.db import models
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from django.core.exceptions import ValidationError
from taggit.managers import TaggableManager
from opps.core.models import Publishable, BaseBox, BaseConfig
class Infograph... | mit | -257,310,587,865,058,880 | 27.126866 | 92 | 0.603608 | false | 3.954879 | false | false | false |
kc4271/batch_downloader | eventlet/greenthread.py | 1 | 11303 | from collections import deque
import sys
from eventlet import event
from eventlet import hubs
from eventlet import timeout
from eventlet.hubs import timer
from eventlet.support import greenlets as greenlet, six
import warnings
__all__ = ['getcurrent', 'sleep', 'spawn', 'spawn_n', 'spawn_after', 'spawn_after_local', '... | mit | 8,197,925,153,677,488,000 | 38.659649 | 127 | 0.660798 | false | 4.011001 | false | false | false |
jorisrenkens/problog | src/ground.py | 1 | 10775 | import os,subprocess
from utils import Timer, Logger
from logic import Literal, LogicProgram
from weights import Weights
class Grounder(object):
def __call__(self, infiles, env):
self.__env = env
logfile = open(env.tmp_path('grounding.log'),'w')
logger = Logger(file = logfile,verbose = 1)
... | lgpl-3.0 | -2,574,029,709,052,745,700 | 37.620072 | 175 | 0.500789 | false | 4.173122 | false | false | false |
marianfx/ai-labs | Lab1_ChatBot/ChatBot.py | 1 | 1625 |
import aiml
import marshal
import os
# Create the kernel and learn AIML files
kernel = aiml.Kernel()
# If brain exists, load it, else, create it
if os.path.isfile("bot_brain.brn"):
kernel.bootstrap(brainFile="bot_brain.brn")
else:
kernel.bootstrap(learnFiles="std-startup.xml", commands="load aiml... | mit | -5,673,398,984,451,245,000 | 29.25 | 74 | 0.610462 | false | 3.619154 | false | false | false |
chop-dbhi/serrano | serrano/resources/query/forks.py | 1 | 3990 | import functools
from preserialize.serialize import serialize
from restlib2.http import codes
from avocado.models import DataQuery
from serrano.links import reverse_tmpl
from serrano.resources import templates
from serrano.resources.query.base import query_posthook, QueryBase
class QueryForksResource(QueryBase):
... | bsd-2-clause | -7,005,703,021,301,298,000 | 32.813559 | 78 | 0.600251 | false | 4.336957 | false | false | false |
mitschabaude/nanopores | scripts/howorka/selectivity.py | 1 | 4668 | """run diffusion equation to determine selectivity of fluophore,
i.e current and release time series for specific molecule."""
from nanopores.tools.fields import cache
import nanopores
import dolfin
import matplotlib.pyplot as plt
from nanopores.physics.convdiff import ConvectionDiffusion
import forcefields
from eikona... | mit | -279,110,832,715,525,500 | 27.638037 | 79 | 0.610111 | false | 2.842875 | false | false | false |
lochiiconnectivity/exabgp | lib/exabgp/bgp/message/update/nlri/evpn/ethernetad.py | 1 | 1172 | """
ethernetad.py
Created by Thomas Mangin on 2014-06-27.
Copyright (c) 2014-2015 Exa Networks. All rights reserved.
"""
# from struct import pack
# from struct import unpack
# from exabgp.protocol.family import AFI
# from exabgp.protocol.family import SAFI
# from exabgp.bgp.message.update.nlri.qualifier.esi import ... | bsd-3-clause | 1,402,455,218,036,721,400 | 29.842105 | 80 | 0.523038 | false | 3.65109 | false | false | false |
michaelerule/neurotools | spatial/spatialPSD.py | 1 | 7023 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
from __future__ import absolute_import
from __future__ import with_statement
from __future__ import division
from __future__ import unicode_literals
from __future__ import print_function
'''
2D spatial power spectral density
'''
def psd2d(data,spacing = 0.4):
'''
2D po... | gpl-3.0 | -7,235,978,638,687,569,000 | 32.764423 | 130 | 0.622099 | false | 2.842169 | true | false | false |
pioneers/PieCentral | runtime/runtime/ansible.py | 1 | 24347 | """Functions and classes for communication with Dawn."""
import asyncio
import os
import socket
import threading
import time
import sys
import selectors
import csv
import aio_msgpack_rpc as rpc
from . import runtime_pb2
from . import ansible_pb2
from . import notification_pb2
from .util import *
UDP_SEND_PORT = 1235
... | apache-2.0 | -6,815,167,071,453,000,000 | 39.646077 | 115 | 0.567421 | false | 4.380533 | false | false | false |
jkyeung/XlsxWriter | xlsxwriter/test/comparison/test_repeat03.py | 1 | 1361 | ###############################################################################
#
# 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 | 5,456,990,139,550,381,000 | 28.586957 | 91 | 0.584129 | false | 3.91092 | true | false | false |
nvbn/python-social-auth | social/utils.py | 1 | 4116 | import re
import sys
import unicodedata
import six
import collections
from social.p3 import urlparse, urlunparse, urlencode, \
parse_qs as battery_parse_qs
SETTING_PREFIX = 'SOCIAL_AUTH'
def import_module(name):
__import__(name)
return sys.modules[name]
def module_member(name):
... | bsd-3-clause | 2,391,804,344,682,172,400 | 27.985915 | 79 | 0.631681 | false | 3.961501 | false | false | false |
cernanalysispreservation/analysis-preservation.cern.ch | cap/modules/experiments/utils/questionnaire.py | 2 | 34335 | # * coding: utf8 *
#
# This file is part of CERN Analysis Preservation Framework.
# Copyright (C) 2016 CERN.
#
# CERN Analysis Preservation Framework 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 vers... | gpl-2.0 | 2,483,245,518,767,530,000 | 42.512041 | 79 | 0.541318 | false | 3.723536 | false | false | false |
robios/PySpW | pyspw/SpaceWire.py | 1 | 5634 | #
# SpaceWire.py
# SpaceWire Module
#
# 2011/05/30 K. Sakai (sakai@astro.isas.jaxa.jp)
import socket
import struct
import sys
# SSDTP2 Control Flags
DataFlag_Complete_EOP = '\x00'
DataFlag_Complete_EEP = '\x01'
DataFlag_Fragmented = '\x02'
ControlFlag_SendTimeCode = '\x30'
ControlFlag_GotTimeCode = '\x31'
ControlFlag... | mit | 6,624,399,634,295,638,000 | 27.316583 | 119 | 0.675896 | false | 3.040475 | false | false | false |
999gary/telrus | redam.py | 1 | 1052 | #implimentation of a shitty ui system I made 2 years ago in lua
#should be fine
import pygame
true = True;
class Redam:
def __init__(self, telrus):
#create local instance of telrus
self.telrus = telrus;
#self.uielements = {};
self.pygame = telrus.pygame;
def createObject( self, ... | gpl-3.0 | 7,066,769,914,984,890,000 | 21.382979 | 81 | 0.530418 | false | 3.05814 | false | false | false |
Ebag333/Pyfa | gui/graph.py | 1 | 1158 | # =============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of pyfa.
#
# pyfa 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 | -1,999,610,314,604,215,800 | 29.473684 | 79 | 0.602763 | false | 4.403042 | false | false | false |
interlegis/sigi | sigi/apps/ocorrencias/forms.py | 1 | 3455 | # -*- coding: utf-8 -*-
#
# sigi.apps.ocorrencias.forms
#
# Copyright (c) 2015 by Interlegis
#
# GNU General Public License (GPL)
#
# 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... | gpl-2.0 | 2,296,746,150,217,004,000 | 40.638554 | 110 | 0.614472 | false | 3.834628 | false | false | false |
magfest/ubersystem | alembic/versions/b574c0577253_add_separate_mits_showcase_scheduling_.py | 1 | 1930 | """Add separate MITS showcase scheduling column.
Revision ID: b574c0577253
Revises: 6c5cf22429e2
Create Date: 2018-09-26 19:29:40.149653
"""
# revision identifiers, used by Alembic.
revision = 'b574c0577253'
down_revision = '6c5cf22429e2'
branch_labels = None
depends_on = None
from alembic import op
import sqlalch... | agpl-3.0 | -2,870,814,270,213,000,700 | 30.639344 | 116 | 0.633161 | false | 3.534799 | false | false | false |
QuLogic/burnman | burnman/minerals/SLB_2011_ZSB_2013.py | 1 | 5451 | # BurnMan - a lower mantle toolkit
# Copyright (C) 2012, 2013, Heister, T., Unterborn, C., Rose, I. and Cottaar, S.
# Released under GPL v2 or later.
"""
SLB_2011_ZSB_2013
^^^^^^^^^^^^^^^^^
Minerals from Stixrude & Lithgow-Bertelloni 2011, Zhang, Stixrude & Brodholt 2013, and references therein.
"""
import burnman.... | gpl-2.0 | 7,476,243,532,179,493,000 | 27.243523 | 106 | 0.467437 | false | 2.668135 | false | false | false |
josephkirk/PipelineTools | packages/rjTools/tweakVertexWeights/ui.py | 1 | 18149 | import sys
from maya import OpenMaya, OpenMayaUI, cmds
from rjSkinningTools import ui, utils
from . import getSkinnedVertices
# ----------------------------------------------------------------------------
WINDOW_TITLE = "Tweak Vertex Weights"
WINDOW_ICON = "tweakVertexWeights.png"
ORANGE_STYLESHEET = "QLabel{color:... | bsd-2-clause | 1,000,790,706,428,210,000 | 31.466905 | 78 | 0.539093 | false | 4.704251 | false | false | false |
Montagon/A-music-score-creator | music_score_creator/music-score-creator.py | 1 | 10875 | #!/usr/bin/env python
# <Music score creator. Generate a sheet music from an audio.>
# Copyright (C) <2014> <Jose Carlos Montanez Aragon>
# 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 Softwa... | gpl-3.0 | 3,215,599,619,052,676,600 | 39.431227 | 222 | 0.625655 | false | 3.571429 | false | false | false |
okfn/foundation | foundation/organisation/models.py | 1 | 13587 | from hashlib import md5
from cms.models.pluginmodel import CMSPlugin
from cms.extensions import PageExtension
from django.core.urlresolvers import reverse
from django.db import models
from django.utils.text import slugify
from django_countries.fields import CountryField
from geoposition.fields import GeopositionField
... | mit | 6,686,354,038,866,053,000 | 31.427208 | 79 | 0.637521 | false | 4.003241 | false | false | false |
alecalve/troc-ecocup | modules/cas.py | 1 | 1824 | from flask import url_for, redirect, request, session, flash, Blueprint
import conf
import requests
from xml.dom.minidom import parseString
from models import User
import datetime
from database import db
bp = Blueprint('cas', __name__, url_prefix='/cas/')
@bp.route('login')
def login():
""" Loggue un utilisateur... | agpl-3.0 | -2,783,869,839,552,982,500 | 29.383333 | 115 | 0.623697 | false | 3.837895 | false | false | false |
Vishruit/DDP_models | data_extraction_code/prepareData_HDF5.py | 1 | 6847 | # This file automatically finds all the .ptw files in a given directory and
# converts them to a numpy array for reseach purposes. It bypasses the need of
# a proprietary software like ALTAIR to extract and read the data.
'''
Before running this file perform 'pip install pyradi'
Please run the test file before running... | gpl-3.0 | -2,530,152,975,544,454,000 | 35.227513 | 143 | 0.656054 | false | 3.41156 | false | false | false |
arkal/bioinfo_tool_wrappers | run_mutect.py | 1 | 6776 | #!/usr/bin/env python2.7
"""
Author : Arjun Arkal Rao
Affiliation : UCSC BME, UCSC Genomics Institute
File : docker_scripts/run_mutect.py
Program info can be found in the docstring of the main function.
Details can also be obtained by running the script with -h .
"""
from __future__ import division, print_function
fro... | gpl-2.0 | -6,230,030,069,098,139,000 | 45.095238 | 79 | 0.535272 | false | 4.104179 | false | false | false |
alex-petrenko/hierarchical-rl | microtbs_rl/utils/record_policy_execution.py | 1 | 3066 | """
Render the policy execution to gif or video.
Gifs are generated with pure python code.
To render a video, it just saves a bunch of images to a directory. Then it's very easy to render a video with ffmpeg.
Like: ffmpeg -framerate 8 -pattern_type glob -i '*.png' out.mp4
"""
import gym
import imageio
import matplotl... | mit | -8,374,211,624,731,095,000 | 32.326087 | 117 | 0.639922 | false | 3.332609 | false | false | false |
callowayproject/django-objectpermissions | objectpermissions/models.py | 1 | 7978 | from django.db import models
from django.contrib.auth.models import User, Group
from django.contrib.contenttypes.models import ContentType
from django.contrib.contenttypes import generic
class UnknownPermission(Exception):
"""
An attempt was made to query for a permission that was not registered for that model... | apache-2.0 | -6,343,879,770,877,125,000 | 31.831276 | 106 | 0.582602 | false | 4.268593 | false | false | false |
openstack/ironic-inspector | ironic_inspector/conf/port_physnet.py | 1 | 1213 | # 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
# distributed under the... | apache-2.0 | 2,527,631,294,805,894,000 | 32.694444 | 77 | 0.644683 | false | 4.111864 | false | false | false |
WladimirSidorenko/CGSA | cgsa/utils/word2vec.py | 1 | 6145 | #!/usr/bin/env python
# -*- coding: utf-8; mode: python; -*-
"""Module providing class for generic word embeddings.
Attributes:
WEMB (class):
class for fast retrieval and adjustment of the Google word embeddings
"""
##################################################################
# Imports
from __future__ i... | mit | -9,068,303,919,099,158,000 | 23.778226 | 73 | 0.540765 | false | 4.237931 | false | false | false |
ideascube/ideascube | ideascube/mediacenter/migrations/0009_auto_20160728_1317.py | 1 | 3428 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2016-07-28 13:17
from __future__ import unicode_literals
from django.db import migrations
import ideascube.models
class Migration(migrations.Migration):
dependencies = [
('mediacenter', '0008_auto_20160713_1605'),
]
operations = [
m... | agpl-3.0 | 3,710,928,358,708,377,600 | 51.4 | 79 | 0.416031 | false | 2.424056 | false | false | false |
securusglobal/iclass-cloner | menu.py | 1 | 1105 | import os
import time
import sys
import handler_ss
import handler_hs
import write_ss
import write_hs
import write_prox
import prox
while True:
os.system("clear")
print "Menu"
print "Please choose an option:"
print "1. Log iClass Standard Security & Prox"
print "2. Log iClass High Security & Prox"... | gpl-2.0 | -3,853,418,281,258,519,000 | 21.1 | 54 | 0.597285 | false | 3.564516 | false | false | false |
webmaven/moreblog | moreblog/model.py | 1 | 1405 | from sqlalchemy import (
Column,
Integer,
Text,
DateTime,
ForeignKey,
)
from sqlalchemy.orm import scoped_session, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
from zope.sqlalchemy import register
Base = declarative_base()
Session = scoped_session(sessionmaker())
regist... | mit | -4,320,904,581,599,226,000 | 22.032787 | 65 | 0.613523 | false | 3.968927 | false | false | false |
ehudmagal/robotqcapp | web/columns.py | 2 | 2424 | __author__ = 'Administrator'
from datable.web.columns import *
from datable.core.serializers import UnicodeSerializer
class ButtonColumn(Column):
formatter = 'button'
sortable = False
class IntegerColumn(Column):
formatter = 'integer'
sortable = True
class ButtonS3FileColumn(Column):
formatter = 'b... | bsd-3-clause | -5,331,958,851,521,029,000 | 31.77027 | 63 | 0.651815 | false | 4.026578 | false | false | false |
alphagov/tagalog | test/integration/test_unicode.py | 1 | 1145 | from __future__ import unicode_literals
from ..helpers import assert_equal, fixture
from subprocess import Popen, PIPE
def test_unicode():
data_in = fixture('utf8-demo.txt').read()
p = Popen('logtag -f init_txt | logtext',
shell=True,
stdout=PIPE,
stdin=PIPE)
dat... | mit | -725,700,276,538,635,100 | 26.926829 | 114 | 0.554585 | false | 3.501529 | true | false | false |
tartavull/google-cloud-python | logging/google/cloud/logging/_http.py | 1 | 17745 | # Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | -7,301,238,421,831,057,000 | 33.658203 | 90 | 0.618202 | false | 4.195035 | false | false | false |
jambonsw/django-improved-user | tests/test_factories.py | 1 | 2752 | """Test model factories provided by Improved User"""
from django.test import TestCase
from improved_user.factories import UserFactory
from improved_user.models import User
class UserFactoryTests(TestCase):
"""Test for UserFactory used with Factory Boy"""
def test_basic_build(self):
"""Test creation ... | bsd-2-clause | -299,661,601,248,394,240 | 37.676056 | 72 | 0.628186 | false | 4.002915 | true | false | false |
openstack/networking-plumgrid | networking_plumgrid/neutron/plugins/common/policy_validators.py | 1 | 4120 | # Copyright 2016 PLUMgrid, 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 applicable law ... | apache-2.0 | 3,254,178,775,962,632,000 | 37.867925 | 75 | 0.624029 | false | 3.718412 | false | false | false |
DataDog/integrations-core | process/setup.py | 1 | 1961 | # (C) Datadog, Inc. 2018-present
# All rights reserved
# Licensed under a 3-clause BSD style license (see LICENSE)
from codecs import open # To use a consistent encoding
from os import path
from setuptools import setup
HERE = path.dirname(path.abspath(__file__))
# Get version info
ABOUT = {}
with open(path.join(HER... | bsd-3-clause | -3,615,914,875,521,595,400 | 30.126984 | 77 | 0.659867 | false | 3.728137 | false | false | false |
JohanComparat/pyEmerge | bin/lc_create_shells.py | 1 | 10484 | """
Routine to create the light cones shells
L1 L2 L3 u11 u12 u13 u21 u22 u23 u31 u32 u33 (periodicity)
C2 '2.2361', '1.0954', '0.4082', '2', '1', '0', '1', '0', '1', '1', '0', '0', '(1)'
C15 '1.4142', '1.0000', '0.7071', '1', '1', '0', '0', '0', '1', '1', '0', '0', '(12)'
C6 '5.9161', '0.4140', '0.4082', '5... | unlicense | 7,452,115,236,242,259,000 | 43.612766 | 136 | 0.640023 | false | 2.296605 | false | false | false |
gkunter/coquery | coquery/gui/widgets/coqwidgetfader.py | 1 | 1678 | # -*- coding: utf-8 -*-
"""
coqstaticbox.py is part of Coquery.
Copyright (c) 2018 Gero Kunter (gero.kunter@coquery.org)
Coquery is released under the terms of the GNU General Public License (v3).
For details, see the file LICENSE that you should have received along
with Coquery. If not, see <http://www.gnu.org/licen... | gpl-3.0 | 958,086,470,874,148,400 | 32.56 | 75 | 0.561979 | false | 3.704194 | false | false | false |
megakevin/single-authored-code-evolution-analysis | get_devs_per_tag.py | 1 | 6900 | # Usage: $ python3 get_bug_commit_ratio_per_tag.py /home/kevin/Desktop/evolution-project/repos/facebook-android-sdk ./output/
# Calculates each files overall (not per tag) changes and bug related changes.
__author__ = 'kevin'
from datetime import datetime, timedelta
from subprocess import call, check_output
import sy... | mit | 4,738,780,832,827,010,000 | 30.944444 | 146 | 0.587391 | false | 3.701717 | false | false | false |
codilime/cloudify-agent | cloudify_agent/api/pm/base.py | 1 | 32068 | #########
# Copyright (c) 2015 GigaSpaces Technologies Ltd. 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... | apache-2.0 | -1,857,186,208,549,480,200 | 35.194131 | 79 | 0.594206 | false | 4.506464 | true | false | false |
adongy/pytwitcher | pytwitcher/protocol.py | 1 | 1507 | import asyncio
import logging
logger = logging.getLogger(__name__)
class IrcProtocol(asyncio.Protocol):
def __init__(self, factory):
self.factory = factory
self.encoding = factory.encoding
self.transport = None
self.closed = True
def connection_made(self, transport):
... | mit | -84,643,922,916,347,980 | 27.433962 | 75 | 0.565362 | false | 4.197772 | false | false | false |
invisiblehands/django-supasurvey | supasurvey/models.py | 1 | 29603 | import os, json, collections, copy
from datetime import datetime, date
from decimal import Decimal, InvalidOperation, DivisionByZero
from django.db import models
from django.db.models.signals import post_save
from django.conf import settings
from django.utils.html import mark_safe
from django.core.files.storage impor... | mit | -4,045,659,222,842,888,700 | 31.282443 | 175 | 0.609499 | false | 4.051321 | false | false | false |
google/usd_from_gltf | tools/ufgbatch/ufgcommon/util.py | 1 | 9093 | #!/usr/bin/python
#
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | apache-2.0 | -3,681,172,362,500,409,300 | 28.332258 | 78 | 0.65248 | false | 3.361553 | false | false | false |
ktraw2/TVBot | cogs/voice.py | 1 | 16125 | import config
import discord
import os
import requests
from discord.ext import commands
from discord.ext.commands import Cog
from modules import strings, parser, audio_player
class Voice(Cog):
def __init__(self, bot):
self.bot = bot
self.parse = parser.Parser(tvmaze_object=self.bot.api, server_dat... | gpl-3.0 | 504,472,773,272,281,200 | 53.110738 | 272 | 0.541085 | false | 4.45196 | true | false | false |
ssudholt/phocnet | tools/save_deploy_proto.py | 1 | 1028 | #!/usr/bin/env python
import argparse
import os
from phocnet.caffe.model_proto_generator import ModelProtoGenerator
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Save a PHOCNet deploy proto file to disk.')
parser.add_argument('--output_dir', '-od', action='store', type=str, default='... | bsd-3-clause | 5,187,680,118,631,901,000 | 59.529412 | 118 | 0.625486 | false | 3.671429 | false | true | false |
herilalaina/scikit-learn | sklearn/decomposition/truncated_svd.py | 13 | 8342 | """Truncated SVD for sparse matrices, aka latent semantic analysis (LSA).
"""
# Author: Lars Buitinck
# Olivier Grisel <olivier.grisel@ensta.org>
# Michael Becker <mike@beckerfuffle.com>
# License: 3-clause BSD.
import numpy as np
import scipy.sparse as sp
from scipy.sparse.linalg import svds
from ..... | bsd-3-clause | 2,060,464,242,120,085,200 | 35.427948 | 78 | 0.617238 | false | 4.041667 | false | false | false |
treycucco/py-utils | idb/util/field_mapping.py | 1 | 2255 | from collections import namedtuple
from . import has_value, set_value, namedtuple_with_defaults
from .convert import identity
class FieldMapping(object):
def __init__(self, source_name, destination_name=None, convert=None, is_required=True):
self.source_name = source_name
self.destination_name = destination... | bsd-3-clause | -5,325,962,432,835,589,000 | 35.967213 | 153 | 0.687361 | false | 3.949212 | false | false | false |
Genorch/Orchestration | genorch_serve.py | 1 | 3012 | #!/usr/bin/env python3
import json
import yaml
import click
from jinja2 import Environment, FileSystemLoader
import os
from domain.server import Server
from domain.service import Service
from domain.cluster import Cluster
from utils.common import translate_id, id_to_swarm
from database import db
from tinydb import w... | gpl-3.0 | -3,701,087,777,311,676,400 | 30.705263 | 78 | 0.506972 | false | 4.377907 | true | false | false |
danieledwardknudsen/weather | util.py | 1 | 3277 | import configparser
import pyodbc
import sqlalchemy
from os import getcwd
# Read configuration file
cfg = configparser.ConfigParser()
try:
cfg.read('weather.ini')
except Exception as e:
exit('Script could not be executed because a "weather.ini" config file could not be found.')
cfg['FILES']['cwd'] = getcwd()... | gpl-3.0 | -4,577,817,012,662,231,600 | 31.127451 | 113 | 0.652426 | false | 4.091136 | false | false | false |
adrn/streams | scripts/figures/spitzer_proposal_figures.py | 1 | 13920 | # coding: utf-8
""" A script for making figures for the Spitzer proposal """
from __future__ import division, print_function
__author__ = "adrn <adrn@astro.columbia.edu>"
# Standard library
import os, sys
import cPickle as pickle
# Third-party
from astropy.io import ascii
import astropy.units as u
import numpy as ... | mit | -7,469,774,232,044,243,000 | 34.065491 | 116 | 0.593319 | false | 2.798552 | false | false | false |
gciteam6/xgboost | src/models/xgb.py | 1 | 1546 | # Third-party modules
from xgboost import XGBRegressor
# Hand-made modules
from .base import BloscpackMixin, MyEstimatorBase, PickleMixin
MACHINE_LEARNING_TECHNIQUE_NAME = "xgb"
PICKLE_EXTENSION = "pkl"
SERIALIZE_FILENAME_PREFIX = "fit_model"
class MyXGBRegressor(MyEstimatorBase, BloscpackMixin, PickleMixin):
de... | mit | -1,641,280,863,636,377,000 | 31.893617 | 93 | 0.61837 | false | 3.505669 | false | false | false |
xcoder123/KodiLatviesiem | plugin.video.filmaslatviski/network.py | 1 | 4593 | # -*- coding: utf-8 -*-
import sys
import urllib, urllib2, ssl, re
import requests
import httplib
import urlparse
import re
UA = 'Mozilla/6.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.5) Gecko/2008092417 Firefox/3.0.3'
def cleanHTML(raw_html):
cleanr = re.compile('<.*?>')
cleantext = re.sub(cleanr, '', raw_html... | gpl-3.0 | -8,216,003,831,289,595,000 | 26.508982 | 132 | 0.644024 | false | 2.858121 | false | false | false |
mozman/ezdxf | examples_dxf/create_mtext_column_examples.py | 1 | 2961 | # Copyright (c) 2021, Manfred Moitzi
# License: MIT License
import ezdxf
from ezdxf import zoom
from ezdxf.math import Vec3
from ezdxf.lldxf import const
from ezdxf.tools.text_layout import lorem_ipsum
def create_doc(filename: str, dxfversion: str):
def add_mtext_columns(msp):
insert = Vec3(0, 0, 0)
... | mit | -46,317,164,573,828,980 | 39.013514 | 79 | 0.631543 | false | 3.615385 | false | false | false |
kiwiheretic/logos-v2 | bibleapp/models.py | 1 | 3007 | from django.db import models
DB_ROUTER={"bibles":('BibleTranslations', 'BibleBooks',
'BibleVerses', 'BibleConcordance',
'BibleDict', 'XRefs')}
class BibleColours(models.Model):
network = models.TextField()
room = models.TextField()
element = models.TextField()
mir... | apache-2.0 | 6,952,629,051,345,176,000 | 30.989362 | 77 | 0.616229 | false | 3.59689 | false | false | false |
GrossfieldLab/loos | Packages/PyLOOS/renum-by-mol.py | 1 | 1582 | #!/usr/bin/env python3
"""
Renumber a model so that the resids for each molecule start at 1
"""
"""
This file is part of LOOS.
LOOS (Lightweight Object-Oriented Structure library)
Copyright (c) 2016 Tod Romo, Grossfield Lab
Department of Biochemistry and Biophysics
School of Medicine & Dentistry, Universi... | gpl-3.0 | 8,267,078,855,940,090,000 | 27.25 | 77 | 0.709861 | false | 3.523385 | false | false | false |
mvaled/sentry | src/sentry/south_migrations/0312_create_missing_emails.py | 1 | 110908 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import DataMigration
from django.db import models
from sentry.utils.query import RangeQuerySetWrapperWithProgressBar
class Migration(DataMigration):
def forwards(self, orm):
db.commit_transact... | bsd-3-clause | 7,830,268,031,218,054,000 | 35.797611 | 100 | 0.397474 | false | 4.718285 | false | false | false |
cmajames/py_touhou | pytouhou/formats/t6rp.py | 1 | 6321 | # -*- encoding: utf-8 -*-
##
## Copyright (C) 2011 Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
##
## 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; version 3 only.
##
## This program is distri... | gpl-3.0 | -6,476,166,564,893,812,000 | 30.447761 | 122 | 0.577757 | false | 3.758026 | false | false | false |
rclmenezes/sqlalchemy | lib/sqlalchemy/schema.py | 1 | 131047 | # sqlalchemy/schema.py
# Copyright (C) 2005-2013 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""The schema module provides the building blocks for database metadata.
Each el... | mit | -6,112,658,784,394,598,000 | 36.282219 | 85 | 0.593802 | false | 4.609948 | false | false | false |
FreeScienceCommunity/PLPlot | examples/python/x12.py | 2 | 1201 | #!/usr/bin/env python
#
# x12c.c
#
# Bar chart demo.
import sys
import os
module_dir = "@MODULE_DIR@"
if module_dir[0] == '@':
module_dir = os.getcwd ()
sys.path.insert (0, module_dir)
# main
#
# Does a simple bar chart, using color fill. If color fill is
# unavailable, pattern fill is used instead (automatic).
... | lgpl-2.1 | -6,948,795,662,705,207,000 | 18.063492 | 70 | 0.545379 | false | 2.219963 | false | false | false |
tpsatish95/Universal-MultiDomain-Sentiment-Classifier | Thrift/server.py | 1 | 2422 | # -*- coding: utf-8 -*-
# Author : Satish Palaniappan
__author__ = "Satish Palaniappan"
'''
Copyright 2015 Satish Palaniappan
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.o... | apache-2.0 | -4,865,982,801,482,183,000 | 33.112676 | 208 | 0.732453 | false | 3.65861 | false | false | false |
PaddlePaddle/Paddle | python/paddle/fluid/dygraph/dygraph_to_static/convert_call_func.py | 1 | 9376 | # Copyright (c) 2020 PaddlePaddle 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 appli... | apache-2.0 | 2,091,633,303,029,675,500 | 35.200772 | 136 | 0.600683 | false | 4.300917 | false | false | false |
pope/SublimeYetAnotherCodeSearch | settings.py | 1 | 3377 | import sublime
import os.path
def fix_path(path, project_dir=None):
"""Resolves absolute path:
absolute path is reported as is
resolve paths with user home (~)
other relative paths resolved against project dir"""
path = os.path.expanduser(path)
if not os.path.isabs(path) and proje... | mit | 9,089,648,303,568,716,000 | 36.522222 | 78 | 0.615931 | false | 3.977621 | false | false | false |
zachtib/HouseholdQuests | quests/migrations/0001_initial.py | 1 | 2110 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-04-03 22:06
from __future__ import unicode_literals
from decimal import Decimal
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
depen... | mit | -5,799,994,657,903,302,000 | 38.074074 | 145 | 0.597156 | false | 4.228457 | false | false | false |
garthylou/Libreosteo | zipcode_lookup/management/commands/import_zipcodes.py | 1 | 2394 | import json
from urllib.request import urlopen, URLError
from django.core.management.base import BaseCommand, CommandError
from ...models import ZipcodeMapping
# https://www.data.gouv.fr/en/datasets/codes-postaux/
DEFAULT_JSON_URL = 'https://www.data.gouv.fr/en/datasets/r/34d4364c-22eb-4ac0-b179-7a1845ac033a'
class... | gpl-3.0 | 4,344,133,023,219,369,000 | 34.731343 | 104 | 0.565163 | false | 4.078365 | false | false | false |
clusterfudge/boomer | boomer/client/speech/listener.py | 1 | 9335 | # This file is part of Boomer Core.
#
# Boomer Core 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.
#
# Boomer Core is distributed in t... | gpl-3.0 | -8,681,405,689,325,949,000 | 34.359848 | 90 | 0.6 | false | 4.186099 | true | false | false |
Signbank/NGT-signbank | signbank/registration/urls.py | 1 | 3693 | """
URLConf for Django user registration.
Recommended usage is to use a call to ``include()`` in your project's
root URLConf to include this URLConf for any URL beginning with
'/accounts/'.
"""
from django.conf.urls import *
from django.urls import reverse_lazy
from django.views.generic import TemplateView
from djan... | bsd-3-clause | 1,424,423,522,740,892,200 | 45.746835 | 108 | 0.503114 | false | 5.122053 | false | false | false |
f3at/feat | src/feat/database/query.py | 1 | 24571 | import decimal
import inspect
import time
from zope.interface import implements, classProvides
from feat.common import serialization, enum, first, defer, annotate, error
from feat.common import container
from feat.database.interface import IPlanBuilder, IQueryField, IQueryFactory
from feat.database.interface import ... | gpl-2.0 | -5,811,510,325,973,837,000 | 32.069987 | 79 | 0.568923 | false | 4.192288 | false | false | false |
Rawash/parking-car-counter | skimage-Hog-CLFfromVideos.py | 1 | 1866 | import numpy as np
import pickle
import cv2
from skimage.feature import hog
from skimage.transform import pyramid_gaussian
print(cv2.__version__)
windowSize = [120,120]
stepSize = 60
def sliding_window(image, stepSize, windowSize):
# slide a window across the image
for x in range(0, image.shape[0], stepSize):... | mit | 6,633,590,432,293,883,000 | 30.627119 | 134 | 0.610397 | false | 2.980831 | false | false | false |
wangshiphys/HamiltonianPy | HamiltonianPy/quantumoperator/matrixrepr.py | 1 | 9096 | """
Implementation of the algorithm for calculating the matrix representation of
a Fermionic operator/term in occupation number representation.
"""
import numpy as np
from numba import jit, int64, uint64
from scipy.sparse import csr_matrix
from HamiltonianPy.quantumoperator.constant import CREATION
__all__ = [
... | gpl-3.0 | 2,622,375,520,283,315,000 | 36.432099 | 80 | 0.579925 | false | 3.548966 | false | false | false |
modoboa/modoboa | modoboa/admin/models/base.py | 1 | 2162 | """Base admin models."""
from django.contrib.contenttypes.fields import GenericRelation
from django.db import models
from django.utils import timezone
from modoboa.core import models as core_models
from modoboa.lib.permissions import (
grant_access_to_object, ungrant_access_to_object
)
class AdminObjectManager(... | isc | 349,020,989,349,496,700 | 28.616438 | 73 | 0.650786 | false | 4.141762 | false | false | false |
Jamil/sabre_dev_studio | examples/cheapest_destinations.py | 1 | 2424 | '''
Finds the cheapest fares filed to a given city
Example:
python cheapest-destinations.py YTO CA
Result:
FLL 165.62
MCO 165.62
JFK 172.36
LGA 191.12
'''
import datetime
import json
import sys
sys.path.append('..')
import sabre_dev_studio
import sabre_dev_studio.sabre_exceptions as sabre_except... | mit | -4,755,766,842,573,069,000 | 27.186047 | 84 | 0.516502 | false | 3.564706 | false | false | false |
lucastan/django-starter-box | djbase/models.py | 1 | 6234 | from __future__ import unicode_literals
from django.db import models
from django.utils.translation import ugettext_lazy as _
# for Python 2 & 3 compat
from django.utils.six import with_metaclass
from django.utils import six
from . import forms
# cPickle for speed
try:
import cPickle as pickle
except ImportError... | mit | 4,223,189,699,639,055,400 | 32.880435 | 90 | 0.646936 | false | 4.133952 | false | false | false |
bsmr-eve/Pyfa | gui/builtinItemStatsViews/itemCompare.py | 1 | 8648 | # noinspection PyPackageRequirements
import wx
from .helpers import AutoListCtrl
from service.price import Price as ServicePrice
from service.market import Market
from service.attribute import Attribute
from gui.utils.numberFormatter import formatAmount
class ItemCompare(wx.Panel):
def __init__(self, parent, stu... | gpl-3.0 | 5,095,220,946,369,849,000 | 40.980583 | 131 | 0.566952 | false | 4.058189 | false | false | false |
gangadhar-kadam/powapp | accounts/doctype/sales_invoice/sales_invoice.py | 1 | 37240 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
import webnotes.defaults
from webnotes.utils import add_days, cint, cstr, date_diff, flt, getdate, nowdate, \
get_first_day, get_la... | agpl-3.0 | 5,381,097,011,979,427,000 | 36.314629 | 286 | 0.657035 | false | 3.041241 | false | false | false |
GoogleCloudPlatform/solutions-cloud-orchestrate | api/orchestrateapi/commands/images/create.py | 1 | 1929 | # python3
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... | apache-2.0 | 6,861,793,614,863,113,000 | 31.15 | 79 | 0.743909 | false | 3.83499 | false | false | false |
valdecdev/odoo | addons/analytic/__openerp__.py | 1 | 1619 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name' : 'Analytic Accounting',
'version': '1.1',
'author' : 'OpenERP SA',
'website' : 'https://www.odoo.com/page/accounting',
'category': 'Hidden/Dependency',
'depends' : ['base', 'decimal_prec... | agpl-3.0 | -1,243,115,946,435,930,000 | 36.651163 | 78 | 0.636813 | false | 3.901205 | false | false | false |
rbuffat/pyidf | tests/test_exteriorlights.py | 1 | 1680 | import os
import tempfile
import unittest
import logging
from pyidf import ValidationLevel
import pyidf
from pyidf.idf import IDF
from pyidf.exterior_equipment import ExteriorLights
log = logging.getLogger(__name__)
class TestExteriorLights(unittest.TestCase):
def setUp(self):
self.fd, self.path = tempfi... | apache-2.0 | -4,872,944,371,620,351,000 | 30.12963 | 92 | 0.655357 | false | 3.58209 | false | false | false |
NYPDVisionZeroAccountability/compstat-vs-moving-violation-enforcement | tools/text2num.py | 1 | 3919 | # This library is a simple implementation of a function to convert textual
# numbers written in English into their integer representations.
#
# This code is open source according to the MIT License as follows.
#
# Copyright (c) 2008 Greg Hewgill
#
# Permission is hereby granted, free of charge, to any person obtaining ... | apache-2.0 | -5,403,188,165,344,453,000 | 28.689394 | 144 | 0.624394 | false | 3.455908 | false | false | false |
ClaudioNahmad/Servicio-Social | Parametros/CosmoMC/CosmoMC-master/python/GetDistGUI.py | 1 | 1231 | #!/usr/bin/env python
from __future__ import absolute_import
from __future__ import print_function
import sys
import logging
import getdist
try:
import argparse
except ImportError:
print('use "module load" to load python 2.7+, or see docs/readme_python.html for how to install')
sys.exit()
try:
from g... | gpl-3.0 | -8,061,934,203,258,364,000 | 29.02439 | 105 | 0.726239 | false | 3.497159 | false | false | false |
AlexKavourias/slackline | slack.py | 1 | 5471 | from slackclient import SlackClient
from slack_screen import SlackTerminal
import os
import json
import threading
import time
class SlackLine(object):
_name_to_ids = None
_ids_to_names = None
_user_id = None
_commands = ("lc", "sc", "exit", "quit", "is_online")
def __init__(self, slack_name, ... | mit | -169,065,942,854,007,420 | 38.644928 | 105 | 0.593127 | false | 3.955893 | false | false | false |
kappius/web2py_utils | web2py_utils/menu.py | 1 | 2842 | #
# Copyright (C) 2009 Thadeus Burgess
#
# 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 distr... | gpl-3.0 | 4,889,956,848,034,862,000 | 26.326923 | 97 | 0.512667 | false | 3.969274 | false | false | false |
oska874/raspberry | get_ip_send_email.py | 1 | 2318 | #!/usr/bin/python
#-*-coding:utf8-*-
__author__ = 'laixintao'
import socket
import fcntl
import time
import struct
import smtplib
import urllib
from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.image import MIMEImage
import re
import urllib2
# the e-mail config
# thi... | mit | -7,240,020,109,966,365,000 | 23.145833 | 59 | 0.610009 | false | 3.292614 | false | false | false |
SamK/pynagios | pynagios/check.py | 1 | 1975 | #!/usr/bin/env python
class Check:
""" Will calculate and print the check result
"""
# the status codes
status_codes = {'OK': 0, 'WARNING': 1, 'CRITICAL': 2, 'UNKNOWN': 3}
# The same status sorted from worst to best
status_order = ['CRITICAL', 'WARNING', 'UNKNOWN', 'OK']
#The list of the ... | mit | 1,523,309,798,690,544,000 | 28.044118 | 80 | 0.566582 | false | 4.193206 | false | false | false |
epheo/shaddock | shaddock/checks.py | 1 | 4479 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2014 Thibaut Lapierre <root@epheo.eu>. 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
#
# ... | apache-2.0 | -5,982,405,037,692,937,000 | 37.612069 | 78 | 0.538067 | false | 4.201689 | false | false | false |
sven1103/pibi-course | rosalind/long/main.py | 1 | 3980 | #!/usr/bin/python2.7
from __future__ import print_function
from rosalind.utils.orf_utils import read_multi_fasta
import argparse
# Create the CLI
cli_parser = argparse.ArgumentParser(description=
'Compute the Hamming distance matrix of '
'given ... | gpl-3.0 | -8,815,593,271,538,568,000 | 38.81 | 107 | 0.586181 | false | 3.948413 | false | false | false |
davy39/eric | Project/NewPythonPackageDialog.py | 1 | 1662 | # -*- coding: utf-8 -*-
# Copyright (c) 2007 - 2014 Detlev Offenbach <detlev@die-offenbachs.de>
#
"""
Module implementing a dialog to add a new Python package.
"""
from __future__ import unicode_literals
from PyQt5.QtWidgets import QDialog, QDialogButtonBox
from PyQt5.QtCore import pyqtSlot
from .Ui_NewPythonPacka... | gpl-3.0 | -4,034,412,619,558,682,000 | 28.157895 | 72 | 0.619134 | false | 4.144638 | false | false | false |
Masood-M/yalih | mechanize/_testcase.py | 2 | 4154 | from __future__ import absolute_import
import os
import shutil
import tempfile
import unittest
class SetupStack(object):
def __init__(self):
self._on_teardown = []
def add_teardown(self, teardown):
self._on_teardown.append(teardown)
def tear_down(self):
for func in reversed(self.... | apache-2.0 | -8,596,310,614,707,668,000 | 29.101449 | 79 | 0.610014 | false | 3.842738 | false | false | false |
openstack/nomad | cyborg/accelerator/drivers/fpga/intel/sysinfo.py | 1 | 4665 | # Copyright 2018 Intel, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | apache-2.0 | 2,078,273,668,625,966,800 | 27.619632 | 76 | 0.591426 | false | 3.103792 | false | false | false |
ryancoleman/traveldistance | src/tm3summarize.py | 1 | 1792 | #!/usr/bin/env python
#summarize data in a tm3 file
import tm3
import string
import sys
import statistics
def summarizeOneFeature(tmDataList, columnName, intervals=50, outName="a.txt"):
'''takes that column, makes a histogram for each structure'''
outFile = open(outName, 'w')
columnNum = tmDataList[0].titleToC... | gpl-2.0 | 1,415,430,397,039,921,400 | 33.461538 | 79 | 0.705915 | false | 3.2 | false | false | false |
TrentFranks/ssNMR-Topspin-Python | modules/Bak.July2013/SetupW.py | 1 | 22203 | """
Modules to Set default parameters:
W.T. Franks FMP Berlin
"""
import de.bruker.nmr.mfw.root as root
import math
import os
import sys
import TopCmds
import IntShape
import CPDtools
p90H=2.5
ampH=4.0
p90C=3.0
ampC=0.0
p90N=5.0
ampN=-2.0
MAS =10000.0
def dBtoW(dB):
watts=math.pow(10,-dB/10.)
#TopCmds.MSG("w... | mit | -4,134,814,152,606,690,300 | 29.624828 | 169 | 0.604963 | false | 2.345057 | false | false | false |
zcoinofficial/zcoin | src/tor/scripts/maint/redox.py | 1 | 7338 | #!/usr/bin/python
#
# Copyright (c) 2008-2019, The Tor Project, Inc.
# See LICENSE for licensing information.
#
# Hi!
# I'm redox.py, the Tor redocumentation tool!
# I am a horrible hack!
# I read the output of doxygen from stderr, and add missing DOCDOC comments
# to tell you where documentation should go!
# To us... | mit | -1,511,183,339,948,589,300 | 31.469027 | 135 | 0.588035 | false | 3.630876 | false | false | false |
KarlParkinson/412Project | src/tracker.py | 1 | 7708 | """
Modified camshift tracker from opencv sample
"""
import math
import json
import socket
import cv
CAM_WINDOW = "CamShiftTracker"
HISTOGRAM_WINDOW = "Histogram"
STOP_CRITERIA = (cv.CV_TERMCRIT_EPS | cv.CV_TERMCRIT_ITER, 10, 1)
TARGET_ELLIPSE_COLOR = (255, 255, 0)
CENTROID_COLOR = (255, 0, 0)
def is_rect_nonzero(r):... | mit | 3,815,445,395,101,629,000 | 37.733668 | 110 | 0.571484 | false | 3.226455 | false | false | false |
MuffinMedic/CloudBot | plugins/minecraft_user.py | 1 | 1961 | import re
import uuid
import requests
from cloudbot import hook
HIST_API = "http://api.fishbans.com/history/{}"
UUID_API = "http://api.goender.net/api/uuids/{}/"
def get_name(uuid):
# submit the profile request
request = requests.get(UUID_API.format(uuid))
request.raise_for_status()
data = request.... | gpl-3.0 | -4,586,829,106,227,990,000 | 30.126984 | 99 | 0.628251 | false | 3.735238 | false | false | false |
conorsch/securedrop | molecule/testinfra/app-code/test_securedrop_app_code.py | 1 | 3805 | import pytest
import testutils
securedrop_test_vars = testutils.securedrop_test_vars
testinfra_hosts = [securedrop_test_vars.app_hostname]
python_version = securedrop_test_vars.python_version
def test_apache_default_docroot_is_absent(host):
"""
Ensure that the default docroot for Apache, containing static ... | agpl-3.0 | -3,738,630,439,913,632,300 | 35.941748 | 98 | 0.690407 | false | 3.665703 | true | false | false |
hellrich/coling2016 | python/compare_top1_over_models_by_frequency.py | 1 | 1460 | import gensim
import sys
import collections
import codecs
import re
import math
from copy import deepcopy
bins = 100
def compare(models):
words = {}
counts = {}
sim = {}
rel = {}
for i in range(len(models)):
models[i] = gensim.models.Word2Vec.load_word2vec_format(
models[i], b... | gpl-3.0 | 792,174,899,140,383,000 | 26.54717 | 140 | 0.617123 | false | 3.560976 | false | false | false |
buscarini/meta | example_spec/platforms/swift_coredata/GlobalPlatform.py | 1 | 2121 | import os
import json
import sys
import meta
from meta.MetaProcessor import MetaProcessor
class GlobalPlatform(MetaProcessor):
"""docstring for Preprocessor"""
def __init__(self,config,stringUtils):
super(GlobalPlatform, self).__init__(config, stringUtils)
thisPath = os.path.realpa... | mit | 3,497,337,897,452,519,400 | 31.646154 | 86 | 0.558699 | false | 4.484144 | false | false | false |
britram/qof | pytools/qof_tcpopts.py | 1 | 5248 | import argparse
import bz2
from sys import stdin, stdout, stderr
import ipfix
import qof
import pandas as pd
args = None
def characteristic_present(df, flag):
return ((df["qofTcpCharacteristics"] & flag) == flag) | \
((df["reverseQofTcpCharacteristics"] & flag) == flag)
def ecn_negotiated(df):
ec... | gpl-2.0 | 63,505,606,524,413,700 | 37.881481 | 104 | 0.619665 | false | 2.963298 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.