repo_name stringlengths 8 92 | path stringlengths 5 221 | copies stringclasses 10
values | size stringlengths 4 6 | content stringlengths 974 828k | license stringclasses 15
values | hash int64 -9,212,977,344,346,658,000 9,220,224,517B | line_mean float64 8.67 91.6 | line_max int64 15 966 | alpha_frac float64 0.29 0.86 | autogenerated bool 1
class | nl_text stringlengths 0 164k | nl_size int64 0 164k | nl_language stringclasses 17
values | nl_language_score float64 0.04 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
qPCR4vir/orange3 | Orange/tests/test_ada_boost.py | 1 | 3357 | # Test methods with long descriptive names can omit docstrings
# pylint: disable=missing-docstring
import unittest
import numpy as np
from Orange.data import Table
from Orange.classification import TreeLearner
from Orange.regression import TreeRegressionLearner
from Orange.ensembles import SklAdaBoostLearner, SklAdaBo... | bsd-2-clause | 61,752,926,166,089,920 | 33.96875 | 77 | 0.657432 | false | Test methods with long descriptive names can omit docstrings pylint: disable=missing-docstring | 94 | en | 0.668338 |
kernsuite-debian/obit | python/OTWindow.py | 1 | 7357 | """ OTWindow allows running wxPython widgets
Widgets using wxPython must all be created and run in the same thread.
This class creates a wxPython App in a separate thread and allows starting
new widgets in this same thread.
New widgets can be created using the functions
newMsgWin(tw) create message windiow and e... | gpl-2.0 | 7,236,081,742,020,023,000 | 31.991031 | 74 | 0.537447 | false | $Id: OTWindow.py 2 2008-06-10 15:32:27Z bill.cotton $----------------------------------------------------------------------- Copyright (C) 2006 Associated Universities, Inc. Washington DC, USA. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License ... | 1,807 | en | 0.685705 |
guh/guh-cli | nymea/logs.py | 1 | 20827 | # -*- coding: UTF-8 -*-
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
# Copyright (C) 2015 - 2018 Simon Stuerz <simon.stuerz@guh.io> #
# ... | gpl-2.0 | 4,584,651,468,606,077,000 | 31.798425 | 257 | 0.561867 | false | -*- coding: UTF-8 -*- Copyright (C) 2015 - 2018 Simon Stuerz <simon.stuerz@guh.io> This file is part of nymea-cli. ... | 1,969 | en | 0.788424 |
pgjones/nusoft | nusoft/credentials.py | 1 | 1609 | #!/usr/bin/env python
#
# Credentials
#
# Collates and stores in memory user credentials needed for downloads
#
# Author P G Jones - 2014-03-23 <p.g.jones@qmul.ac.uk> : New file.
####################################################################################################
import getpass
import logging
logger = l... | mit | -1,743,196,074,267,851,000 | 33.234043 | 100 | 0.567433 | false | Receives and stores credentials.
:param _username: Download username
:param _password: Download password to go with a username
:param _token: Instead of username and password use token.
Initialise the credentials.
:param token: token to use
Returns either a token or the username and password.
:return: token or usern... | 545 | en | 0.716236 |
irvined1982/lavaflow | setup.py | 1 | 1269 | import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README')).read()
setup(
zip_safe=False,
name='django-lavaflow',
version='1.1',
packages=['lavaFlow'],
include_package_data=True,
license="GPL 3",
description="LavaFlow creates useful reports on the usage of hi... | gpl-3.0 | 8,221,223,443,358,147,000 | 38.65625 | 299 | 0.713948 | false | 0 | en | 0.110449 | |
pytorch/fairseq | tests/test_dataset.py | 1 | 2916 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import logging
import unittest
from typing import Sequence
from fairseq.data import LanguagePairDataset, ListDataset, RoundRobinZipDatasets
f... | mit | 1,653,650,448,822,139,000 | 43.181818 | 84 | 0.632373 | false | Copyright (c) Facebook, Inc. and its affiliates. This source code is licensed under the MIT license found in the LICENSE file in the root directory of this source tree. Dataset is now sorted by sentence length The item 2 of dataset 'a' is with item (2 % 2 = 0) of dataset 'b' Dataset is now sorted by sentence length Dat... | 357 | en | 0.909858 |
IuryAlves/code-challenge | app/load_data.py | 1 | 1329 | #!/usr/bin/env python
# coding: utf-8
from __future__ import (
print_function,
unicode_literals,
absolute_import
)
import argparse
import json
import os
def get_path():
return unicode(os.path.abspath('.'))
def parse_args():
_parser = argparse.ArgumentParser()
_parser.add_argument('--fixtur... | mit | -2,716,428,965,792,732,700 | 25.6 | 103 | 0.576373 | false | !/usr/bin/env python coding: utf-8 | 34 | en | 0.306214 |
LMSlay/wiper | modules/radare.py | 1 | 2920 | # -*- coding: utf-8 -*-
# This file is part of Viper - https://github.com/botherder/viper
# See the file 'LICENSE' for copying permission.
import os
import sys
import getopt
from viper.common.out import *
from viper.common.abstracts import Module
from viper.core.session import __sessions__
ext = ".bin"
run_radare =... | bsd-3-clause | 5,533,463,339,960,898,000 | 28.795918 | 91 | 0.510616 | false | -*- coding: utf-8 -*- This file is part of Viper - https://github.com/botherder/viper See the file 'LICENSE' for copying permission. | 132 | en | 0.898953 |
ghetzel/webfriend | webfriend/rpc/base.py | 1 | 2491 | """
Implementation of the Chrome Remote DevTools debugging protocol.
See: https://chromedevtools.github.io/devtools-protocol
"""
from __future__ import absolute_import
from webfriend.rpc.event import Event
from uuid import uuid4
from collections import OrderedDict
import logging
class Base(object):
supports_even... | bsd-2-clause | -6,752,092,870,117,730,000 | 27.306818 | 96 | 0.579285 | false | Implementation of the Chrome Remote DevTools debugging protocol.
See: https://chromedevtools.github.io/devtools-protocol
normalize method name create handler dict if we need to | 179 | en | 0.414941 |
lgarren/spack | lib/spack/spack/test/spec_syntax.py | 1 | 20244 | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | -8,615,010,693,867,667,000 | 35.475676 | 79 | 0.528453 | false | Check several ways to specify a spec by hash.
Check that the provided spec parses to the provided token list.
Assert that the provided spec is able to be parsed.
If this is called with one argument, it assumes that the
string is canonical (i.e., no spaces and ~ instead of - for
variants) and that it will convert back ... | 3,076 | en | 0.79464 |
kennydo/rename-archive-extension | Nautilus/rename_archive.py | 1 | 8817 | from gi.repository import Nautilus, GObject, Gtk
import functools
import os
import os.path
import urllib
import urlparse
import zipfile
try:
import rarfile
except ImportError:
rarfile = None
if rarfile:
# The default separator is '\\', which is different from what zipfile uses
rarfile.PATH_SEP = '/'
... | mit | -8,911,151,886,611,844,000 | 32.524715 | 101 | 0.58047 | false | Creates a submenu to rename archives after the name of a directory
within the archive.
Wrapped Gtk Message Dialog class
Returns the simple file path from a Nautilus.FileInfo.
Gets the "/path/to/file" part from "file:///path/to/file".
Args:
file_info: a Nautilus.FileInfo instance
Returns:
A string representin... | 2,472 | en | 0.861873 |
chrys87/orca-beep | test/keystrokes/firefox/aria_button.py | 1 | 1801 | #!/usr/bin/python
"""Test of ARIA button presentation."""
from macaroon.playback import *
import utils
sequence = MacroSequence()
#sequence.append(WaitForDocLoad())
sequence.append(PauseAction(5000))
sequence.append(utils.StartRecordingAction())
sequence.append(KeyComboAction("Tab"))
sequence.append(utils.AssertPr... | lgpl-2.1 | -427,095,397,982,902,140 | 36.520833 | 93 | 0.681843 | false | Test of ARIA button presentation.
!/usr/bin/pythonsequence.append(WaitForDocLoad()) | 84 | en | 0.437996 |
YangWanjun/areaparking | utils/constants.py | 1 | 11566 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
SYSTEM_NAME = "エリアパーキング"
END_DATE = '9999-12-31'
DATABASE_DEFAULT = "default"
DATABASE_REVOLUTION = "fk5dtsql"
MIME_TYPE_EXCEL = 'application/excel'
MIME_TYPE_PDF = 'application/pdf'
MIME_TYPE_ZIP = 'application/zip'
MIME_TYPE_HTML = 'text/html'
CONFI... | apache-2.0 | 438,389,379,480,348,300 | 24.060519 | 97 | 0.542778 | false | -*- coding: utf-8 -*- ('01', '申込書'), ('01', '申込書'), ('01', '申込書'), ('01', '申込書'), ('01', '申込書'), ('01', '申込書'), ('01', '申込書'), ('01', '申込書'), ('21', '名義変更'), 01 申込 03 審査 ('030', '住所・電話番号 審査・確認'), ('033', '申込ルート元審査'), 契約 入金 CHOICE_TASK_NAME_CATEGORY = [ ('210', '契約書及び請求書の発行'), ('211', '入金確認'), ('212', '新契約書・... | 352 | ja | 0.277411 |
lig/picket_classic | apps/picket/__init__.py | 1 | 1783 | """
Copyright 2008 Serge Matveenko
This file is part of Picket.
Picket 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.
Picket is distribut... | gpl-3.0 | -7,424,519,642,878,921,000 | 28.716667 | 68 | 0.748738 | false | Copyright 2008 Serge Matveenko
This file is part of Picket.
Picket 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.
Picket is distributed i... | 655 | en | 0.921468 |
bchareyre/trial | examples/test/periodic-triax.py | 1 | 1557 | # coding: utf-8
# 2009 © Václav Šmilauer <eudoxos@arcig.cz>
"Test and demonstrate use of PeriTriaxController."
from yade import *
from yade import pack,qt
O.periodic=True
O.cell.hSize=Matrix3(0.1, 0, 0,
0 ,0.1, 0,
0, 0, 0.1)
sp=pack.SpherePack()
radius=5e-3
num=sp.makeCloud(Vector3().Zero,O.cell.re... | gpl-2.0 | 248,881,559,573,020,220 | 30.653061 | 188 | 0.710509 | false | coding: utf-8 2009 © Václav Šmilauer <eudoxos@arcig.cz> min,max,radius,rRelFuzz,spheresInCell,periodicPeriTriaxController(maxUnbalanced=0.01,relStressTol=0.02,goal=[-1e4,-1e4,0],stressMask=3,globUpdate=5,maxStrainRate=[1.,1.,1.],doneHook='triaxDone()',label='triax'),using cell inertia | 285 | en | 0.212767 |
KangHsi/youtube-8m | model_utils.py | 1 | 4302 | # Copyright 2016 Google 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 or ... | apache-2.0 | 4,521,161,258,369,963,000 | 34.85 | 80 | 0.682938 | false | Pools over the frames of a video.
Args:
frames: A tensor with shape [batch_size, num_frames, feature_size].
method: "average", "max", "attention", or "none".
Returns:
A tensor with shape [batch_size, feature_size] for average, max, or
attention pooling. A tensor with shape [batch_size*num_frames, feature_size]... | 1,925 | en | 0.721112 |
andhit-r/opnsynid-accounting-report | opnsynid_asset_account/models/res_company.py | 1 | 1348 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2015 Andhitia Rama. All rights reserved.
# @author Andhitia Rama
#
# 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 | 5,641,121,555,060,802,000 | 36.444444 | 78 | 0.602374 | false | override company to add asset account
-*- coding: utf-8 -*- Copyright (c) 2015 Andhitia Rama. All rights reserved. @author Andhitia Rama This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Fou... | 805 | en | 0.895321 |
Azure/azure-sdk-for-python | sdk/keyvault/azure-keyvault-secrets/tests/test_secrets_client.py | 1 | 13664 | # ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import functools
from dateutil import parser as date_parse
import time
import logging
import json
from azure.core.exceptions import ResourceExistsError, ResourceNotFoun... | mit | -892,249,785,946,571,100 | 38.836735 | 120 | 0.629172 | false | ------------------------------------ Copyright (c) Microsoft Corporation. Licensed under the MIT License. ------------------------------------ used for logging tests create secret set secret with optional arguments wait to ensure the secret's update time won't equal its creation time delete secret create many secrets l... | 966 | en | 0.787486 |
peterwilletts24/Python-Scripts | plot_scripts/Rain/Diurnal/sea_diurnal_rain_plot_domain_constrain_bit_above western_ghats.py | 1 | 10333 | """
Load npy xy, plot and save
"""
import os, sys
import matplotlib
matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab!
import matplotlib.pyplot as plt
import matplotlib.cm as mpl_cm
from matplotlib import rc
from matplotlib.font_manager import FontProperties
from matplotlib import rcPa... | mit | 4,530,510,237,832,121,300 | 30.123494 | 195 | 0.594987 | false | Must be before importing matplotlib.pyplot or pylab!unrotate = imp.load_source('util', '/home/pwille/python_scripts/modules/unrotate_pole.py') Things to change Make own time x-axisexperiment_ids = ['djznw', 'djzny', 'djznq', 'djzns', 'dkjxq', 'dklyu', 'dkmbq', 'dklwu', 'dklzq', 'dkbhu', 'djznu', 'dkhgu' ] All 12 Most ... | 920 | en | 0.608092 |
dcalacci/Interactive_estimation | game/round/models.py | 1 | 2767 | from decimal import Decimal
from django.db import models
from django.conf import settings
from django.utils import timezone
# Create your models here.
from game.contrib.calculate import calculate_score
from game.control.models import Control
class Plot(models.Model):
plot = models.URLField()
answer = models... | mit | -4,080,133,973,543,304,000 | 36.391892 | 108 | 0.644742 | false | Create your models here. start time of the round end time of the round todo: change control treatment | 101 | en | 0.809739 |
pdl30/pychiptools | pychiptools/utilities/alignment.py | 1 | 3065 | #!/usr/bin/python
########################################################################
# 20 Oct 2014
# Patrick Lombard, Centre for Stem Stem Research
# Core Bioinformatics Group
# University of Cambridge
# All right reserved.
########################################################################
import argparse... | gpl-2.0 | 3,248,898,922,289,293,000 | 34.639535 | 185 | 0.596411 | false | !/usr/bin/python 20 Oct 2014 Patrick Lombard, Centre for Stem Stem Research Core Bioinformatics Group University of Cambridge All right reserved. | 145 | en | 0.511462 |
shawncaojob/LC | PY/140_word_break_ii.py | 1 | 4564 | # 140. Word Break II QuestionEditorial Solution My Submissions
# Total Accepted: 68516
# Total Submissions: 321390
# Difficulty: Hard
# Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word.
#
# Return all such possible sentences.
#
# For... | gpl-3.0 | 5,375,061,984,906,493,000 | 29.837838 | 163 | 0.510517 | false | :type s: str
:type wordDict: Set[str]
:rtype: List[str]
:type s: str
:type wordDict: Set[str]
:rtype: List[str]
:type s: str
:type wordDict: Set[str]
:rtype: List[str]
140. Word Break II QuestionEditorial Solution My Submissions Total Accepted: 68516 Total Submissions: 321390 Difficulty: Hard Given a string s and a... | 1,636 | en | 0.817012 |
abhigd/bigboy | app/views/link.py | 1 | 17235 | import time, uuid, json, calendar
from app import app
from app.lib import upload, auth, files
from app.lib import distribution, link
from app.lib import geo
from app.forms import *
from flask import request, redirect
from flask import session, render_template
from flask import make_response, abort
from flask import ... | apache-2.0 | 907,547,245,753,685,200 | 34.68323 | 92 | 0.59942 | false | TODO: Check if target's ACL still allows the owner of this link to access Check for temp uploads and move them to link_targets if complete. files will not be moved to the main bucket until the user approves it. File will be served until then from the S3 bucket del target["owner"] Check if this file really exists in S3 ... | 940 | en | 0.793495 |
david-mateo/marabunta | marabunta/models/PerimeterDefenseRobot.py | 1 | 7197 | from marabunta import BaseRobot
from math import *
class PerimeterDefenseRobot(BaseRobot):
"""Robot model for perimeter defense.
By iteratively calling the update() method,
this robot will communicate with the rest
of the swarm and move away from the others
as far as possible. Takes a *threshold*
... | gpl-3.0 | -524,198,928,009,362,900 | 35.348485 | 94 | 0.539669 | false | Robot model for perimeter defense.
By iteratively calling the update() method,
this robot will communicate with the rest
of the swarm and move away from the others
as far as possible. Takes a *threshold*
parameter to determine when it has gone
far enough and reached consensus. Can be
set to 0.
Obstacle avoidance (imple... | 2,219 | en | 0.912774 |
demisto/content | Packs/PANOSPolicyOptimizer/Integrations/PANOSPolicyOptimizer/PANOSPolicyOptimizer.py | 1 | 18763 | import hashlib
from CommonServerPython import *
class Client:
"""
Client to use in the APN-OS Policy Optimizer integration.
"""
def __init__(self, url: str, username: str, password: str, vsys: str, device_group: str, verify: bool, tid: int):
# The TID is used to track individual commands sen... | mit | -3,208,916,145,890,129,000 | 41.450226 | 122 | 0.557054 | false | Client to use in the APN-OS Policy Optimizer integration.
Gets the Policy Optimizer Statistics as seen from the User Interface
Gets the Policy Optimizer Statistics as seen from the User Interface
Gets the DAG
Gets the unused rules Statistics as seen from the User Interface
Gets the Policy Optimizer Statistics as seen f... | 1,833 | en | 0.830717 |
Hernanarce/pelisalacarta | python/main-classic/platformcode/platformtools.py | 1 | 48873 | # -*- coding: utf-8 -*-
# ------------------------------------------------------------
# pelisalacarta 4
# Copyright 2015 tvalacarta@gmail.com
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#
# Distributed under the terms of GNU General Public License v3 (GPLv3)
# http://www.gnu.org/licenses/gpl-3.0.html
# --... | gpl-3.0 | 2,443,567,850,198,299,000 | 42.925293 | 122 | 0.578759 | false | Función encargada de mostrar el itemlist en kodi, se pasa como parametros el itemlist y el item del que procede
@type itemlist: list
@param itemlist: lista de elementos a mostrar
@type parent_item: item
@param parent_item: elemento padre
Función para generar los menus contextuales.
1. Partiendo de los datos de ite... | 12,593 | es | 0.783741 |
CLVsol/odoo_addons | clv_person_mng/history/__init__.py | 1 | 1434 | # -*- encoding: utf-8 -*-
################################################################################
# #
# Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol #
# ... | agpl-3.0 | -1,074,229,779,788,836,500 | 70.7 | 80 | 0.410042 | false | -*- encoding: utf-8 -*- Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol This program is free software: you can redistribute it and/or ... | 1,185 | en | 0.891017 |
PyBossa/pybossa | test/factories/taskrun_factory.py | 1 | 1933 | # -*- coding: utf8 -*-
# This file is part of PYBOSSA.
#
# Copyright (C) 2015 Scifabric LTD.
#
# PYBOSSA is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your op... | agpl-3.0 | 9,141,680,664,959,028,000 | 32.327586 | 77 | 0.713399 | false | -*- coding: utf8 -*- This file is part of PYBOSSA. Copyright (C) 2015 Scifabric LTD. PYBOSSA is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later ve... | 700 | en | 0.878793 |
oldstylejoe/pychess-timed | lib/pychess/compat.py | 1 | 1109 | """ Some Python2/Python3 compatibility support helpers """
import sys
PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] == 3
if PY3:
basestring = str
cmp = lambda x, y: (x > y) - (x < y)
memoryview = memoryview
open = open
unichr = chr
unicode = lambda x: x
raw_input = input
i... | gpl-3.0 | 4,246,670,998,720,175,600 | 24.790698 | 69 | 0.696123 | false | Some Python2/Python3 compatibility support helpers | 50 | en | 0.725583 |
SurveyMan/SMPy | example_survey.py | 1 | 1248 | from survey.objects import *
import json
"""
This module provides an example of how to construct a questionnaire in Python.
Questionnaires can be saved by calling jsonize and dumping their contents.
Jsonized surveys can be reused, manipulated, and sent via RPC to another service.
"""
q1 = Question("What is your age?"... | apache-2.0 | -5,831,616,676,094,554,000 | 30.2 | 90 | 0.591346 | false | 0 | en | 0.110449 | |
chfritz/atom-sane-indentation | spec/fixtures/sample.py | 1 | 4084 | x = {
"a": 1,
'b': 2
}
x = [
3,
4
]
x = [
(sname, pname)
for (sno, sname) in suppliers
for (pno, pname) in parts
for (sp_sno, sp_pno) in suppart
if sno == sp_sno and pno == sp_pno
]
def testing_indentation_in_199(some_var):
first_line = "auto complete enabled by default?"
... | mit | -4,141,579,375,323,475,000 | 21.31694 | 143 | 0.600392 | false | Yay.
Comments sfg Backslash means line continuation: Backslash does not means continuation in comments :\ --------------------------------------------- TODO | 158 | en | 0.743673 |
FEniCS/ufl | ufl/finiteelement/mixedelement.py | 1 | 19622 | # -*- coding: utf-8 -*-
"This module defines the UFL finite element classes."
# Copyright (C) 2008-2016 Martin Sandve Alnæs
#
# This file is part of UFL (https://www.fenicsproject.org)
#
# SPDX-License-Identifier: LGPL-3.0-or-later
#
# Modified by Kristian B. Oelgaard
# Modified by Marie E. Rognes 2010, 2012
# Modi... | lgpl-3.0 | -8,729,777,980,419,253,000 | 39.539256 | 103 | 0.588859 | false | A finite element composed of a nested hierarchy of mixed or simple
elements.
A special case of a mixed finite element where all elements are
equal.
A special case of a mixed finite element where all elements are equal.
Create mixed finite element from given list of elements
Create vector element (repeated mixed element... | 5,316 | en | 0.736397 |
oudalab/phyllo | phyllo/extractors/johannesDB.py | 1 | 2507 | import sqlite3
import urllib
import re
from urllib.request import urlopen
from bs4 import BeautifulSoup, NavigableString
import nltk
nltk.download('punkt')
from nltk import sent_tokenize
def parseRes2(soup, title, url, cur, author, date, collectiontitle):
chapter = 0
sen = ""
num = 1
[e.extract() fo... | apache-2.0 | -3,149,571,058,116,537,300 | 31.986842 | 103 | 0.55724 | false | print(getp) make sure it's not a paragraph without the main text these are not part of the main t get proper URLs | 113 | en | 0.935243 |
mike-perdide/gfbi_core | tests/test1.py | 1 | 7715 | from subprocess import Popen, PIPE
from gfbi_core.git_model import GitModel
from gfbi_core.editable_git_model import EditableGitModel
from gfbi_core.util import Index, Timezone
from git.objects.util import altz_to_utctz_str
from datetime import datetime
import os
import time
REPOSITORY_NAME = "/tmp/tests_git"
AVAILAB... | gpl-3.0 | -2,993,049,151,893,016,600 | 32.689956 | 78 | 0.572391 | false | print "Running: %s" % command print "====================================== Before the write" for row in xrange(our_model.row_count()): print pretty_print_from_row(our_model, row) print "=======================================================" print "======================================= After the ... | 561 | en | 0.391002 |
sketchyfish/ypp-price-calculator | strip_automation.py | 1 | 5368 | #!/usr/bin/python
"""
This code uses .strip formatting once to remove the \n and another time to remove the \t from the below lists.
For readability, the script uses a print("\n") to add a new line between the two lists
"""
island_list = ['Armstrong Island', 'Atchafalaya Island', 'Immokalee Island', 'Moultrie Island'... | gpl-2.0 | -3,883,570,465,021,505,500 | 91.551724 | 162 | 0.607116 | false | This code uses .strip formatting once to remove the
and another time to remove the from the below lists.
For readability, the script uses a print("
") to add a new line between the two lists
!/usr/bin/python | 219 | en | 0.828232 |
markgw/pimlico | src/python/pimlico/cli/testemail.py | 1 | 1311 | # This file is part of Pimlico
# Copyright (C) 2020 Mark Granroth-Wilding
# Licensed under the GNU LGPL v3.0 - https://www.gnu.org/licenses/lgpl-3.0.en.html
from __future__ import print_function
from pimlico.cli.subcommands import PimlicoCLISubcommand
from pimlico.utils.email import send_pimlico_email
class EmailCm... | gpl-3.0 | 2,851,914,663,193,059,300 | 39.96875 | 106 | 0.710145 | false | This file is part of Pimlico Copyright (C) 2020 Mark Granroth-Wilding Licensed under the GNU LGPL v3.0 - https://www.gnu.org/licenses/lgpl-3.0.en.html Send a dummy email to see if email sending works | 199 | en | 0.807052 |
ellmetha/django-machina | tests/unit/apps/forum_conversation/test_forms.py | 1 | 16391 | import pytest
from django import forms
from django.contrib.auth.models import AnonymousUser
from faker import Faker
from machina.apps.forum_conversation.forms import PostForm, TopicForm
from machina.conf import settings as machina_settings
from machina.core.db.models import get_model
from machina.core.loading import g... | bsd-3-clause | 4,596,627,068,081,951,000 | 33.507368 | 99 | 0.558233 | false | Permission handler Create a basic user Set up a top-level forum Set up a topic and some posts Assign some permissions Setup Run Check Setup Run Check Setup Run Check Setup Run Check Setup Run Check Setup Run Check Setup Run Check Setup Run Check Setup Run Check Permission handler Create a basic user Set up a top-level ... | 559 | en | 0.637756 |
aangert/PiParty | color_tests/color_combo_test.py | 2 | 1075 | from enum import Enum
class Colors(Enum):
Pink = (255,96,96)
Magenta = (255,0,192)
Orange = (255,64,0)
Yellow = (255,255,0)
Green = (0,255,0)
Turquoise = (0,255,255)
Blue = (0,0,255)
Purple = (96,0,255)
color_list = [x for x in Colors]
quad_teams_banned = {
Colors.Pink : [Colors.M... | mit | -6,680,612,122,141,936,000 | 28.054054 | 111 | 0.606512 | false | 0 | en | 0.110449 | |
DrYerzinia/Cat-Finder | src/KittyTracker/kittyTracker.py | 1 | 1581 | from netaddr import *
from datetime import datetime
import blescan
import time
import sys
import bluetooth._bluetooth as bluez
from Kitty import Kitty
from CheckKittys import CheckKittys
from BLESerialScanner import BLESerialScanner
import SendMail
import config
def process(mac, rssi):
found = False
for k in confi... | unlicense | -1,341,239,824,988,486,700 | 19.532468 | 96 | 0.688805 | false | dev_id = 0 try: sock = bluez.hci_open_dev(dev_id) print "ble thread started" except: print "error accessing bluetooth device..." sys.exit(1) blescan.hci_le_set_scan_parameters(sock) blescan.hci_enable_le_scan(sock) returnedList = blescan.parse_events(sock, 1) for beacon in returnedList: mac, a, b, c, d, rssi = ... | 354 | en | 0.457002 |
alaski/nova | nova/tests/unit/virt/libvirt/test_driver.py | 1 | 828402 | # Copyright 2010 OpenStack Foundation
# Copyright 2012 University Of Minho
#
# 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 | 6,406,292,573,906,182,000 | 44.142063 | 97 | 0.549332 | false | Fake connection object.
Repeat all of the Libvirt snapshot tests, but with LXC enabled
Test for nova.virt.libvirt.libvirt_driver.LibvirtDriver.
Test libvirtd calls are nonblocking.
Tests for libvirtDriver.volume_snapshot_create/delete.
Test for LibvirtDriver.get_all_volume_usage.
Create a test instance.
Tests that the ... | 23,042 | en | 0.878799 |
kaidebrick/piface_thingsboard | piface_thingsboard.py | 1 | 1271 | #!/usr/bin/env python3
import paho.mqtt.client as mqtt
import configparser
import pifacedigitalio as PFIO
APPNAME = os.path.splitext(os.path.basename(__file__))[0]
INIFILE = os.getenv('INIFILE', APPNAME + '.ini')
config = configparser.ConfigParser()
config.read(INIFILE)
MODULE = 'PFIO'
MQTT_HOST = config.get("gl... | gpl-3.0 | -1,371,690,723,719,318,300 | 31.589744 | 70 | 0.698662 | false | !/usr/bin/env python3 | 21 | fr | 0.448822 |
anaran/olympia | apps/bandwagon/tasks.py | 1 | 4144 | import logging
import math
from django.core.files.storage import default_storage as storage
from django.db.models import Count
import elasticutils.contrib.django as elasticutils
from celeryutils import task
import amo
from amo.decorators import set_modified_on
from amo.helpers import user_media_path
from amo.utils i... | bsd-3-clause | 8,352,693,703,532,291,000 | 33.247934 | 79 | 0.625 | false | Use log to limit the effect of the multiplier. | 46 | en | 0.737965 |
FATSLiM/fatslim | docs/sphinx-src/documentation/tutorials/show_apl_map.py | 1 | 1525 | #!/usr/bin/env python
# -*- coding: utf8 -*-
import numpy as np
import matplotlib.pyplot as plt
from scipy.interpolate import griddata
CSV_FILENAME = "bilayer_prot_apl_frame_00000.csv"
GRO_FILENAME = "bilayer_prot.gro"
PNG_FILENAME = "bilayer_prot_apl_frame_00000.png"
# Get Box vectors
last_line = ""
with open(GRO_F... | gpl-3.0 | 6,198,686,079,688,072,000 | 22.828125 | 72 | 0.61377 | false | !/usr/bin/env python -*- coding: utf8 -*- Get Box vectors Get values Building data from plotting Plot map | 105 | en | 0.469091 |
andree182/podx3 | getrawaudio.py | 1 | 1079 | #!/usr/bin/env python
"""
Reads audio data from the device through isochronous transfer.
NOTE: Due to alignment or whatever, the data is not correct. Data size of
the input endpoint is 170B, but the the actual data size is 6 * (3*2*4),
the rest bytes are filled with zero.
"""
import usb.util
import time
ID_VENDOR = ... | gpl-2.0 | -2,545,959,085,404,143,600 | 20.58 | 88 | 0.624652 | false | !/usr/bin/env python d.write(0x02, emptyData) attempt to revive device after input stream freezes | 98 | en | 0.573888 |
CPedrini/TateTRES | erapi.py | 1 | 11009 | #-*- encoding: utf-8 -*-
import csv, math, time, re, threading, sys
try:
from urllib.request import urlopen
except ImportError:
from urllib import urlopen
class ErAPI():
# Metodo constructor, seteos basicos necesarios de configuracion, instancia objetos utiles
def __init__(self):
self.data = ... | apache-2.0 | -1,751,381,920,954,348,000 | 36.962069 | 195 | 0.511446 | false | -*- encoding: utf-8 -*- Metodo constructor, seteos basicos necesarios de configuracion, instancia objetos utiles Data format: {'XXCiro|BNC': {'id': 123456, 'nick': 'XXCiro', 'level': 49, 'strength': 532.5, 'rank_points': 1233354, 'citizenship': 'Argentina'}} Diccionario de puntos/rango Lista ordenada de rangos segun im... | 1,906 | es | 0.809898 |
vivaxy/algorithms | python/problems/sum_of_even_numbers_after_queries.py | 1 | 1068 | """
https://leetcode.com/problems/sum-of-even-numbers-after-queries/
https://leetcode.com/submissions/detail/215582833/
"""
from typing import List
class Solution:
def sumEvenAfterQueries(self, A: List[int], queries: List[List[int]]) -> List[int]:
ANS = []
ans = 0
for a in A:
... | mit | -5,519,847,744,780,625,000 | 23.272727 | 87 | 0.468165 | false | https://leetcode.com/problems/sum-of-even-numbers-after-queries/
https://leetcode.com/submissions/detail/215582833/ | 116 | en | 0.553799 |
heromod/migrid | mig/reST/html_writer.py | 1 | 1966 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# html_writer - [insert a few words of module description on this line]
# Copyright (C) 2003-2009 The MiG Project lead by Brian Vinter
#
# This file is part of MiG.
#
# MiG is free software: you can redistribute it and/or modify
# it under the terms ... | gpl-2.0 | 4,386,083,187,276,027,400 | 23.575 | 101 | 0.677009 | false | !/usr/bin/python -*- coding: utf-8 -*- --- BEGIN_HEADER --- html_writer - [insert a few words of module description on this line] Copyright (C) 2003-2009 The MiG Project lead by Brian Vinter This file is part of MiG. MiG is free software: you can redistribute it and/or modify it under the terms of the GNU General Publ... | 980 | en | 0.875024 |
davhenriksen/bringhomethebacon | web/web.py | 1 | 27835 | #!/usr/bin/env python
# web.py
# bring home the bacon Copyright (C) 2012 David Ormbakken Henriksen (davidohenriksen@gmail.com)
#
# 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, eit... | gpl-3.0 | -5,249,010,472,040,336,000 | 36.870748 | 188 | 0.496102 | false | !/usr/bin/env python web.py bring home the bacon Copyright (C) 2012 David Ormbakken Henriksen (davidohenriksen@gmail.com) 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 o... | 676 | en | 0.816246 |
elidaian/sudoku | src/server/users.py | 1 | 3651 | """
users.py
Created on: Aug 17 2013
Author: eli
"""
class UserPermission(object):
"""
Describes a permission for an operation for an user.
"""
PERMISSIONS = []
_curr_permission_bit = 1
def __init__(self, name, description, is_default):
"""
Construct a permissio... | gpl-3.0 | 2,345,246,301,992,049,000 | 27.748031 | 83 | 0.576828 | false | Represents a logged in user.
Describes a permission for an operation for an user.
Checks the equality of this object to other object.
Construct a permission given its description.
Initialize a user given its ID, username, display name and permissions.
Returns True if this user is allowed to create boards.
Returns True ... | 822 | en | 0.789506 |
tedlaz/pyted | misthodosia/m13/f_fmy_old.py | 1 | 1057 | # -*- coding: utf-8 -*-
'''
Created on 18 Νοε 2012
@author: tedlaz
'''
from PyQt4 import QtGui, QtCore
from gui import ui_fmy
from utils.fmy_etoys import makeFMYFile
class dlg(QtGui.QDialog):
def __init__(self, args=None, parent=None):
super(dlg, self).__init__(parent)
sel... | gpl-3.0 | 1,785,956,018,139,974,700 | 24.769231 | 92 | 0.56334 | false | Created on 18 Νοε 2012
@author: tedlaz
-*- coding: utf-8 -*- | 63 | en | 0.681977 |
schoolie/bokeh | bokeh/models/plots.py | 1 | 20026 | ''' Models for representing top-level plot objects.
'''
from __future__ import absolute_import
from six import string_types
from ..core.enums import Location
from ..core.properties import Auto, Bool, Dict, Either, Enum, Include, Instance, Int, List, Override, String
from ..core.property_mixins import LineProps, Fill... | bsd-3-clause | -4,859,454,633,804,849,000 | 31.0416 | 109 | 0.624688 | false | Model representing a plot, containing glyphs, guides, annotations.
Adds new DynamicImageRenderer into the Plot.renderers
Args:
image_source (ImageSource) : a image source instance which contain image configuration
Keyword Arguments:
Additional keyword arguments are passed on as-is to the dynamic image r... | 3,650 | en | 0.634715 |
expertanalytics/fagkveld | worldmap/src/worldmap/model/location.py | 1 | 1192 |
from typing import Dict, List, Tuple, Set, Optional
from abc import abstractmethod
import numpy
class Location:
name: str = ""
long_name: str = ""
border_x: List[numpy.ndarray]
border_hull_x: List[numpy.ndarray]
border_y: List[numpy.ndarray] = []
border_hull_y: List[numpy.ndarray] = []
... | bsd-2-clause | -622,663,362,204,864,100 | 21.923077 | 57 | 0.557886 | false | TODO: implement here TODO: implement here | 41 | es | 0.363973 |
dhp-denero/LibrERP | dt_product_brand/product_brand.py | 1 | 3987 | # -*- encoding: utf-8 -*-
#################################################################################
# #
# product_brand for OpenERP #
# Copyright (C) 2009 NetAndCo (<http://www.ne... | agpl-3.0 | 8,626,166,335,862,885,000 | 47.609756 | 136 | 0.493979 | false | When category changes, we search for taxes, UOM and product type
-*- encoding: utf-8 -*- product_brand for OpenERP Copyright (C) 2009 NetAndCo (<http://www.netandco.net>). ... | 1,585 | en | 0.822041 |
jithinbp/pslab-desktop-apps | psl_res/GUI/D_PHYSICS/B_physics/B_SpeedOfSound.py | 1 | 3745 | #!/usr/bin/python
"""
::
This experiment is used to study non-inverting amplifiers
"""
from __future__ import print_function
from PSL_Apps.utilitiesClass import utilitiesClass
from PSL_Apps.templates import ui_template_graph_nofft
import numpy as np
from PyQt4 import QtGui,QtCore
import pyqtgraph as pg
impor... | gpl-3.0 | 8,507,347,280,602,509,000 | 26.335766 | 123 | 0.695861 | false | !/usr/bin/pythonself.enableCrossHairs(self.plot,[])Control widgetsself.displayCrossHairData(self.plot,False,self.samples,self.I.timebase,[y],[(0,255,0)])Set SQR1 to 0 | 166 | en | 0.294382 |
massimovassalli/SingleCellForceSpectroscopy | sifork/qt/qtView.py | 1 | 7581 | from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
_fromUtf8 = lambda s: s
import os as os
import sys
import pyqtgraph as pg
import numpy as np
import Ui_qtView as qtView_face
from sifork import experiment
pg.setConfigOption('background', 'w')
pg.setConfigOption(... | mit | 3,310,249,543,625,385,500 | 38.284974 | 471 | 0.611661 | false | if i % 100 == 0: og = self.ui.griglia.items() for i in range(len(og)): if self.curves[-i-1].inconsistency: og[i].setBrush(self.cRosso) og[i].setPen(self.cRosso) QtCore.QObject.connect(self.ui.slide1, QtCore.SIGNAL(_fromUtf8("actionTriggered(int)")), self.mov... | 1,163 | en | 0.290062 |
vacancy/TensorArtist | examples/generative-model/desc_vae_mnist_mlp_bernoulli_adam.py | 1 | 4242 | # -*- coding:utf8 -*-
# File : desc_vae_mnist_mlp_bernoulli_adam.py
# Author : Jiayuan Mao
# Email : maojiayuan@gmail.com
# Date : 3/17/17
#
# This file is part of TensorArtist.
from tartist.core import get_env, get_logger
from tartist.core.utils.naming import get_dump_directory, get_data_directory
from tartist.... | mit | 2,794,771,510,245,185,000 | 33.487805 | 114 | 0.537247 | false | -*- coding:utf8 -*- File : desc_vae_mnist_mlp_bernoulli_adam.py Author : Jiayuan Mao Email : maojiayuan@gmail.com Date : 3/17/17 This file is part of TensorArtist. distrib_loss = 0.5 * (O.sqr(mu) + O.sqr(std) - 2. * O.log(std + 1e-8) - 1.0).sum(axis=1) wrapper.append_grad_modifier(optimizer.grad_modifier.WeightDe... | 349 | en | 0.249402 |
CLVsol/clvsol_odoo_addons | clv_person_aux/models/address_aux.py | 1 | 3795 | # -*- coding: utf-8 -*-
# Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
from odoo import api, fields, models
_logger = logging.getLogger(__name__)
class AddressAux(models.Model):
_inherit = 'clv.address_aux'
perso... | agpl-3.0 | -649,032,661,184,708,100 | 34.138889 | 117 | 0.594203 | false | -*- coding: utf-8 -*- Copyright (C) 2013-Today Carlos Eduardo Vercelino - CLVsol License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). store=True data_values['phone'] = person_aux.ref_address_aux_id.phone data_values['mobile'] = person_aux.ref_address_aux_id.mobile | 274 | en | 0.197446 |
mzdu/2048gae | src/main.py | 1 | 1335 | import webapp2
import jinja2
import os
import logging
jinja_environment = jinja2.Environment(loader = jinja2.FileSystemLoader(os.path.dirname(__file__) + '/templates'))
def doRender(handler, tname = 'index.html', values = {}):
temp = jinja_environment.get_template(tname)
handler.response.out.wr... | mit | 6,896,633,148,561,898,000 | 35.083333 | 114 | 0.495131 | false | 0 | en | 0.110449 | |
tylerlaberge/Jasper | jasper/steps.py | 1 | 1413 | """
The steps module.
"""
from functools import wraps
import asyncio
class Step(object):
"""
The Step class is used as a wrapper around functions for testing behaviours.
"""
def __init__(self, function, **kwargs):
"""
Initialize a new Step object.
:param function: The functio... | mit | 7,253,816,304,372,000,000 | 24.232143 | 86 | 0.587403 | false | The Step class is used as a wrapper around functions for testing behaviours.
Initialize a new Step object.
:param function: The function this step will call when this step is run.
:param kwargs: Kwargs to call the given function with.
A decorator for wrapping a function into a Step object.
:param func: The function t... | 444 | en | 0.720502 |
xbmcmegapack/plugin.video.megapack.dev | resources/lib/menus/home_countries_american_samoa.py | 1 | 1125 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
This file is part of XBMC Mega Pack Addon.
Copyright (C) 2014 Wolverine (xbmcmegapack@gmail.com)
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 Softwar... | gpl-3.0 | -8,099,804,973,255,031,000 | 37.758621 | 76 | 0.69724 | false | !/usr/bin/python -*- coding: utf-8 -*- | 38 | en | 0.437977 |
BurtBiel/azure-cli | src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_route_table/lib/models/__init__.py | 1 | 1448 | #---------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
#---------------------------------------------------------------------... | mit | -4,311,053,074,764,071,400 | 37.105263 | 94 | 0.593923 | false | --------------------------------------------------------------------------------------------- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See License.txt in the project root for license information.----------------------------------------------------------------------------... | 664 | en | 0.401507 |
Lana-Pa/Mantis-training | conftest.py | 1 | 2674 | import pytest
import json
import os.path
from fixture.application import Application
import ftputil
fixture = None
target = None
def load_config(file):
global target
if target is None:
config_file = os.path.join(os.path.dirname(os.path.abspath(__file__)), file)
with open(config_file) as f:
... | apache-2.0 | -8,926,993,292,282,782,000 | 36.971014 | 122 | 0.691603 | false | create fixture for initialization with checking check for fixture validness создаем соединение с удаленной машиной проверка наличия файла create fixture for finalizationcheck for preconditions before logout teardown function hook - add additional parameters to load tests from cmd parameter, what to do, definition of th... | 331 | ru | 0.285623 |
tsl143/addons-server | src/olympia/users/cron.py | 1 | 1443 | from django.db import connections
import multidb
from celery import group
import olympia.core.logger
from olympia.amo import VALID_ADDON_STATUSES
from olympia.amo.utils import chunked
from .tasks import update_user_ratings_task
task_log = olympia.core.logger.getLogger('z.task')
def update_user_ratings():
"""... | bsd-3-clause | 5,285,070,275,735,279,000 | 30.369565 | 79 | 0.615385 | false | Update add-on author's ratings.
We build this query ahead of time because the cursor complains about data truncation if it does the parameters. Also, this query is surprisingly quick, <1sec for 6100 rows returned | 215 | en | 0.804694 |
IncidentNormal/TestApps | ALE/Platform_nodes_Draft3b.py | 1 | 7673 | from SimPy.Simulation import *
import visual as v
import math
from random import seed, uniform, randint
class Global():
NUMNODES = 4
NUMCHANNELS = 1
Node_L_List = []
Node_A_List = []
Node_S_List = []
ChannelList = [] #stores
NodeSendQueueList = [] #stores
maxTime = 10
class Mon():
... | gpl-2.0 | -7,459,447,548,906,195,000 | 47.563291 | 176 | 0.524567 | false | storesstoresshould be int0=data, 1=confirmshared between Listen and Send processespotential to randomise this order to prevent all Nodes searching iterativelythis is a bit magic atm: checking packet without 'grabbing' itrenege after very short time: if item's not there immediately then move onyield get,self,chn,1,1 pri... | 1,111 | en | 0.843513 |
thinkingmachines/deeplearningworkshop | codelab_5_simple_cnn.py | 1 | 1964 | # SIMPLE MNIST CNN
# Source: https://www.tensorflow.org/tutorials/layers
def cnn_model_fn(features, labels, mode):
"""Model function for CNN."""
# Input Layer
input_layer = tf.reshape(features, [-1, 28, 28, 1])
# Convolutional Layer #1
conv1 = tf.layers.conv2d(
inputs=input_layer,
filters=32,
... | mit | 78,197,066,181,890,620 | 29.215385 | 79 | 0.653768 | false | Model function for CNN.
SIMPLE MNIST CNN Source: https://www.tensorflow.org/tutorials/layers Input Layer Convolutional Layer 1 Pooling Layer 1 Convolutional Layer 2 and Pooling Layer 2 Dense Layer Logits Layer Calculate Loss (for both TRAIN and EVAL modes) Configure the Training Op (for TRAIN mode) Generate Predictio... | 349 | en | 0.418599 |
Penaz91/Glitch_Heaven | Game/loadSaves.py | 1 | 2299 | # Load Game Menu Component
# Part of the Glitch_Heaven project
# Copyright 2015-2016 Penaz <penazarea@altervista.org>
from components.UI.loadmenu import loadMenu
from os import listdir
from os.path import join as pjoin
from os import remove
from game import Game
from components.UI.textMenuItem import textMenuItem
from ... | mit | 7,232,331,274,901,255,000 | 37.983051 | 97 | 0.545455 | false | Load Game Menu Component Part of the Glitch_Heaven project Copyright 2015-2016 Penaz <penazarea@altervista.org> | 111 | en | 0.476281 |
fedora-modularity/pdc-updater | pdcupdater/handlers/__init__.py | 1 | 1784 | import abc
import fedmsg.utils
def load_handlers(config):
""" Import and instantiate all handlers listed in the given config. """
for import_path in config['pdcupdater.handlers']:
cls = fedmsg.utils.load_class(import_path)
handler = cls(config)
yield handler
class BaseHandler(object... | lgpl-2.1 | 4,880,716,642,753,441,000 | 29.758621 | 79 | 0.638453 | false | An abstract base class for handlers to enforce API.
This is intended to be called from a cronjob once every few days
and is meant to (in a read-only fashion) check that what PDC thinks is
true about a service, is actually true.
It is expected to take a long time to run.
It should return a two lists. The first shoul... | 919 | en | 0.91657 |
ww9rivers/splunk-sdk-python | tests/test_kvstore_batch.py | 1 | 2815 | #!/usr/bin/env python
#
# Copyright 2011-2014 Splunk, 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... | apache-2.0 | 9,140,246,485,119,778,000 | 32.915663 | 94 | 0.608171 | false | !/usr/bin/env python Copyright 2011-2014 Splunk, 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 ... | 575 | en | 0.837922 |
QuLogic/meson | mesonbuild/mintro.py | 1 | 24506 | # Copyright 2014-2016 The Meson development team
# 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 agree... | apache-2.0 | -1,309,064,487,587,284,500 | 44.297597 | 172 | 0.615278 | false | This is a helper script for IDE developers. It allows you to
extract information such as list of targets, files, compiler flags,
tests and so on. All output is in JSON for simple parsing.
Currently only works for the Ninja backend. Others use generated
project files and don't need this info.
Copyright 2014-2016 The ... | 2,032 | en | 0.580248 |
djrrb/OldGlory | oldGlory.py | 1 | 7067 | """
OLD GLORY
By David Jonathan Ross <http://www.djr.com>
This drawbot script will draw the American Flag.
It's also responsive! I made this to experiment with Drawbot Variables.
For the most part, it follows the rules here:
http://en.wikipedia.org/wiki/Flag_of_the_United_States#Specifications
It does... | mit | 6,339,230,936,733,769,000 | 27.963115 | 113 | 0.600538 | false | OLD GLORY
By David Jonathan Ross <http://www.djr.com>
This drawbot script will draw the American Flag.
It's also responsive! I made this to experiment with Drawbot Variables.
For the most part, it follows the rules here:
http://en.wikipedia.org/wiki/Flag_of_the_United_States#Specifications
It does mak... | 2,678 | en | 0.906163 |
kalliope-project/kalliope | kalliope/__init__.py | 1 | 8965 | #!/usr/bin/env python
# coding: utf8
import argparse
import logging
import time
from kalliope.core import Utils
from kalliope.core.ConfigurationManager import SettingLoader
from kalliope.core.ConfigurationManager.BrainLoader import BrainLoader
from kalliope.core.SignalLauncher import SignalLauncher
from flask import ... | gpl-3.0 | -1,805,813,272,564,953,000 | 33.217557 | 106 | 0.608254 | false | Class used to add a custom entry into the logger
Prepare log folder in current home directory.
:param debug: If true, set the lof level to debug
Return a list of signal class name
For all synapse, each signal type is added to a list only if the signal is not yet present in the list
:param brain: Brain object
:type bra... | 1,679 | en | 0.669056 |
SU-ECE-17-7/hotspotter | hscom/fileio.py | 1 | 12148 | from __future__ import division, print_function
import __common__
(print, print_, print_on, print_off,
rrr, profile) = __common__.init(__name__, '[io]')
# Python
import os
import fnmatch
import pickle
import cPickle
from os.path import normpath, exists, realpath, join, expanduser, dirname
import datetime
import time
#... | apache-2.0 | -9,184,094,975,685,221,000 | 26.862385 | 88 | 0.583388 | false | helper
helper
Ensures a filepath has correct the extension
Loads data to the direcotry speficied
Saves data to the direcotry speficied
Python Science Hotspotterimport skimageimport shelveimport datetimeimport timeit 2 --- Saving --- --- Loading ---fpath = join(dpath, fname_) --- Smart Load/Save --- Get components... | 1,188 | en | 0.636076 |
Ghost-script/TaskMan | wsgi/taskman/taskman/views.py | 1 | 4067 | from django.shortcuts import render, HttpResponse, redirect
from forms import LoginForm, RegistrationForm
from django.contrib.auth import login, logout, authenticate
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from taskManager.forms import TaskCreate,MultipleSel... | gpl-2.0 | 6,536,155,798,609,383,000 | 34.365217 | 78 | 0.522252 | false | logging be implemented here | 27 | en | 0.746775 |
erikrose/sphinx-js | sphinx_js/typedoc.py | 1 | 13554 | """Converter from typedoc output to jsdoc doclet format"""
import os
import sys
import json
from six import iteritems
# JSDoc entries used in sphinx-js:
# - optional access of [ public, private, protected ]
# - optional classdesc
# - optional comment (controls doclet inclusion)
# - optional description
# - optional ... | mit | 7,926,526,332,986,313,000 | 36.545706 | 86 | 0.539324 | false | Encapsulation of the Typedoc to JSDoc conversion process.
Upon construction this class will convert the typedoc JSON
object to a list of JSDoc doclets in :py:attr:`jsdoc`.
This class holds all the state used during the conversion making
it easy to do multiple (sequential) conversions.
:ivar jsdoc: the list of generat... | 2,641 | en | 0.575224 |
openstack/networking-bgpvpn | bgpvpn_dashboard/test/admin/test_views.py | 1 | 3209 | # Copyright (c) 2017 Orange.
#
# 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, soft... | apache-2.0 | 7,976,155,279,535,758,000 | 38.617284 | 77 | 0.648177 | false | Copyright (c) 2017 Orange. 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 u... | 544 | en | 0.866023 |
lpfann/fri | fri/model/lupi_ordinal_regression.py | 1 | 12804 | from itertools import product
import cvxpy as cvx
import numpy as np
from sklearn.metrics import make_scorer
from sklearn.utils import check_X_y
from fri.model.base_lupi import (
LUPI_Relevance_CVXProblem,
split_dataset,
is_lupi_feature,
)
from fri.model.ordinal_regression import (
OrdinalRegression_R... | mit | 1,933,810,736,430,988,500 | 32.257143 | 130 | 0.559513 | false | Parameters
----------
lupi_features : int
Number of features in dataset which are considered privileged information (PI).
PI features are expected to be the last features in the dataset.
Get ordered unique classes and corresponding mapping from old names
Parameters
----------
y: array of discrete values (int, s... | 1,244 | en | 0.809346 |
bapakode/OmMongo | examples/advanced_modeling.py | 1 | 1048 | '''
This page is going to go through some more advanced modeling techniques
using forward and self-references
'''
from ommongo.document import Document
from ommongo.fields import *
from datetime import datetime
from pprint import pprint
class Event(Document):
name = StringField()
children = ListField(Docume... | mit | 491,704,710,223,334,700 | 25.2 | 72 | 0.611641 | false | This page is going to go through some more advanced modeling techniques
using forward and self-references | 106 | en | 0.944146 |
mrachinskiy/jewelcraft | ops_gem/gem_select_ops.py | 1 | 6067 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# JewelCraft jewelry design toolkit for Blender.
# Copyright (C) 2015-2021 Mikhail Rachinskiy
#
# 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, eith... | gpl-3.0 | 5,417,416,596,498,840,000 | 31.100529 | 100 | 0.577056 | false | BEGIN GPL LICENSE BLOCK JewelCraft jewelry design toolkit for Blender. Copyright (C) 2015-2021 Mikhail Rachinskiy 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... | 761 | en | 0.892378 |
norus/procstat-json | tornado/test/httputil_test.py | 1 | 7432 | #!/usr/bin/env python
from __future__ import absolute_import, division, with_statement
from tornado.httputil import url_concat, parse_multipart_form_data, HTTPHeaders
from tornado.escape import utf8
from tornado.log import gen_log
from tornado.testing import ExpectLog
from tornado.test.util import unittest
from torna... | gpl-3.0 | 8,831,329,724,078,077,000 | 31.740088 | 81 | 0.541039 | false | !/usr/bin/env python quotes are optional unless special characters are present The spec requires that data after the final boundary be ignored. http://www.w3.org/Protocols/rfc1341/7_2_Multipart.html In practice, some libraries include an extra CRLF after the boundary. Lines beginning with whitespace are appended to the... | 489 | en | 0.890521 |
vprime/puuuu | env/lib/python2.7/site-packages/paramiko/client.py | 1 | 21100 | # Copyright (C) 2006-2007 Robey Pointer <robeypointer@gmail.com>
#
# This file is part of paramiko.
#
# Paramiko 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 2.1 of the License, or (a... | mit | -2,178,805,618,934,213,600 | 39.655106 | 139 | 0.603839 | false | Copyright (C) 2006-2007 Robey Pointer <robeypointer@gmail.com> This file is part of paramiko. Paramiko 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 2.1 of the License, or (at your option)... | 1,352 | en | 0.885951 |
BlackHole/enigma2-obh10 | lib/python/Screens/EpgSelection.py | 2 | 4137 | from __future__ import print_function
from Screens.InfoBar import InfoBar
from enigma import eServiceReference
from Components.ActionMap import HelpableActionMap
from Screens.EpgSelectionChannel import EPGSelectionChannel
from Screens.EpgSelectionBase import EPGServiceZap
from Screens.TimerEntry import addTimerFromEven... | gpl-2.0 | -7,913,178,780,223,782,000 | 31.320313 | 183 | 0.751511 | false | Keep for backwards compatibility with plugins, including the parameter naming. This class assumes that EPGSelection is only used in the SingleEPG sense. Rewrite the EPG actions to invoke the compatibility functions. EPGSearch bypasses base class initialisation try to limit the scope of its quirkyness by providing a lim... | 600 | en | 0.823117 |
cpatrickalves/simprev | util/carrega_parametros.py | 1 | 1280 | # -*- coding: utf-8 -*-
"""
@author: Patrick Alves
"""
# Arquivo com os parâmetros de projeção
arquivo_parametros = "parametros.txt"
def obter_parametros():
# Dicionário que armazena os parâmetros
parametros = {}
with open(arquivo_parametros, 'r' ,encoding='utf-8') as arquivo:
for linha in ar... | gpl-3.0 | 8,191,328,923,808,139,000 | 34.166667 | 84 | 0.528063 | false | @author: Patrick Alves
-*- coding: utf-8 -*- Arquivo com os parâmetros de projeção Dicionário que armazena os parâmetros pula linhas em branco pula comentários Pega a primeira string antes do = e remove os espaços em branco Pega a segunda string antes do = e remove os espaços em branco Salva variáveis e parâmetros no... | 402 | pt | 0.983109 |
ryepdx/sale_negotiated_shipping | __init__.py | 1 | 1238 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2015 RyePDX LLC
# Copyright (C) 2011 NovaPoint Group LLC (<http://www.novapointgroup.com>)
# Copyright (C) 2004-2010 OpenERP SA (<http://www.ope... | agpl-3.0 | 2,449,599,019,303,715,000 | 40.3 | 78 | 0.636511 | false | -*- coding: utf-8 -*- OpenERP, Open Source Management Solution Copyright (C) 2015 RyePDX LLC Copyright (C) 2011 NovaPoint Group LLC (<http://www.novapointgroup.com>) Copyright (C) 2004-2010 OpenERP SA (<http://www.openerp.com>) This program is free software: you can redistribute it and/or modify it un... | 942 | en | 0.836516 |
Ginkgo-Biloba/Misc-Python | numpy/FractalAndChaos.py | 1 | 10149 | # coding=utf-8
"""
分形与混沌绘图
"""
import numpy as np
import pylab as pl
import time
from matplotlib import cm, collections
from math import log2, sin, cos
"""
Mandelbrot 集合 f_c(z) = z^2 + c, c \in \doubleZ
Mandelbrot 集合就是使以上序列不发散的所有c点的集合。
用程序绘制 Mandelbrot 集合时不能进行无限次迭代,最简单的方法是使用逃逸时间 (迭代次数) 进行绘制,具体算法如下:
判断每次调用函数 f_ c(z) ... | gpl-3.0 | 4,156,537,185,942,738,400 | 22.5 | 120 | 0.579037 | false | p: 每个函数的选择概率列表
eq: 迭代函数列表
init: 迭代初始点
n: 迭代次数
返回值: 每次迭代所得的X坐标数组, Y坐标数组, 计算所用的函数下标
使用迭代函数系统绘制蕨类植物叶子
演示分形绘制
展示 Mandelbrot 集合
画图
绘制点 (cx, cy) 附近正负 d 范围的 Mandelbrot 集合
绘制点 (cx, cy) 附近正负 d 范围的 Mandelbrot 集合
使用 NumPy 数组运算加速计算
计算逃逸所需的迭代次数 最多迭代 100 次
"
为了在不同的梯度之间进行渐变处理,使用下面的公式进行逃逸时间计算
n - \log_2 \log_2 |z_n|
z_n 是迭代n次之后... | 987 | zh | 0.942624 |
mothsART/linkmanager | linkmanager/tests/interface.py | 1 | 20597 | import json
from io import StringIO
from unittest.mock import (patch, mock_open, MagicMock)
import asyncio
from linkmanager.translation import gettext as _
class CP(object):
result = ''
def cpvar(self, r):
self.result = r
cp = CP()
addlink = iter([
### input on: test_cmd_flush
_('Y'),
... | bsd-2-clause | 5,549,153,208,129,339,000 | 27.43232 | 85 | 0.52548 | false | Inspiration by the mock_open function and
http://stackoverflow.com/questions/9349122/python-mock-mocking-several-open
input on: test_cmd_flush input on: test_cmd_addlinks 'link3_title', input on: test_cmd_addlinks_with_update like Yes input on: test_cmd_updatelinks input on: test_cmd_updatelinks_with_add input on: te... | 565 | en | 0.463946 |
pytlakp/intranetref | src/intranet3/views/scrum/sprint.py | 1 | 11968 | import json
import datetime
import markdown
from pyramid.view import view_config
from pyramid.httpexceptions import HTTPFound, HTTPForbidden, HTTPNotFound
from pyramid.response import Response
from intranet3.utils.views import BaseView
from intranet3.forms.scrum import SprintForm
from intranet3.forms.common import De... | mit | 3,481,813,588,570,232,000 | 34.725373 | 95 | 0.601939 | false | ugly hack | 9 | it | 0.266641 |
viktorTarasov/PyKMIP | kmip/tests/unit/core/messages/contents/test_protocol_version.py | 1 | 9321 | # Copyright (c) 2014 The Johns Hopkins University/Applied Physics Laboratory
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICEN... | apache-2.0 | -7,470,747,633,934,984,000 | 33.522222 | 79 | 0.62622 | false | Test that the greater than operator returns True/False when
comparing two different ProtocolVersions.
Test that the greater than or equal operator returns True/False when
comparing two different ProtocolVersions.
Test that the less than operator returns True/False when comparing
two different ProtocolVersions.
Test tha... | 1,038 | en | 0.830756 |
google/dotty | efilter_tests/unit/protocols/repeated.py | 1 | 3524 | # EFILTER Forensic Query Language
#
# Copyright 2015 Google 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
#
# Un... | apache-2.0 | -5,256,765,739,999,268,000 | 33.54902 | 77 | 0.637911 | false | Test function application across values.
Test that creation is reasonable.
Test that repeated vars remain flat.
Test that types are correctly derived and enforced.
EFILTER test suite.
EFILTER Forensic Query Language Copyright 2015 Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "L... | 1,326 | en | 0.897674 |
ikumen/project-euler | solutions/016.py | 1 | 1723 | #!/usr/bin/env python
'''
016.py: https://projecteuler.net/problem=16
Power digit sum
2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.
What is the sum of the digits of the number 2^1000?
'''
import os
import pytest
import time
import math
def power_digit_sum(N, P):
"""
Calculates the sum of dig... | mit | 8,554,294,037,166,094,000 | 21.671053 | 74 | 0.631457 | false | Main runner, delegates to solution.
Calculates the sum of digits for a number 'N' raise to power 'P'. Basic
algorithm is to apply long multiplication, storing the results in two
arrays, one for current digits, and other a tmp.
N must be between 2 <= N <= 9
Test
016.py: https://projecteuler.net/problem=16
Power digit... | 736 | en | 0.796137 |
cjaymes/pyscap | src/scap/model/oval_5/defs/independent/VariableStateElement.py | 1 | 1216 | # Copyright 2016 Casey Jaymes
# This file is part of PySCAP.
#
# PySCAP 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.
#
# PySCAP is ... | gpl-3.0 | -5,975,244,660,325,065,000 | 39.533333 | 173 | 0.683388 | false | Copyright 2016 Casey Jaymes This file is part of PySCAP. PySCAP 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. PySCAP is distributed in the ... | 648 | en | 0.911673 |
Kotaimen/stonemason | tests/formatbundle/test_tileformat.py | 1 | 1177 | # -*- encoding: utf-8 -*-
__author__ = 'kotaimen'
__date__ = '2/19/15'
import unittest
from stonemason.formatbundle import TileFormat, InvalidTileFormat
class TestTileFormat(unittest.TestCase):
def test_init(self):
fmt = TileFormat(format='JPEG')
self.assertEqual(fmt.format, 'JPEG')
sel... | mit | -7,065,150,623,025,478,000 | 30.810811 | 80 | 0.610025 | false | -*- encoding: utf-8 -*- | 23 | en | 0.76908 |
bhupennewalkar1337/erpnext | erpnext/accounts/doctype/purchase_invoice/purchase_invoice.py | 1 | 26311 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import cint, formatdate, flt, getdate
from frappe import _, throw
from erpnext.setup.utils import get_company_currency
i... | gpl-3.0 | -4,062,770,884,894,112,000 | 37.749632 | 184 | 0.689559 | false | Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors License: GNU General Public License v3. See license.txt validate cash purchase in case of auto inventory accounting, expense account is always "Stock Received But Not Billed" for a stock item except epening entry, drop-ship entry and fixed asset items '... | 1,415 | en | 0.832248 |
npilon/planterbox | planterbox/decorators.py | 1 | 2059 | """Decorators used when building a package of planterbox features to define
steps and hooks
Also some private functions used by those decorators.
"""
from functools import partial
import logging
import re
from six import (
string_types,
)
log = logging.getLogger('planterbox')
EXAMPLE_TO_FORMAT = re.compile(r'... | mit | -6,669,727,340,165,458,000 | 29.731343 | 78 | 0.668771 | false | Register a function as a hook to be run before or after
Inner decorator for making a function usable as a hook.
Inner decorator for making a function usable as a step.
Decorate a function with a pattern so it can be used as a step.
Optional arguments:
- multiline: If true, this step-pattern will be turned into a mult... | 653 | en | 0.875575 |
rahimnathwani/measure-anything | project/auth/models.py | 1 | 6772 | from datetime import datetime
import hashlib
from werkzeug.security import generate_password_hash, check_password_hash
from itsdangerous import TimedJSONWebSignatureSerializer as Serializer
from flask import current_app
from flask.ext.login import UserMixin, AnonymousUserMixin
from .. import db, login_manager
class P... | mit | -7,012,245,458,600,389,000 | 31.557692 | 73 | 0.603219 | false | 0 | en | 0.110449 | |
eubr-bigsea/tahiti | migrations/versions/1d7c21b6c7d2_add_keras_core_layer_operation_reshape.py | 1 | 10248 | # -*- coding: utf-8 -*-
"""Add Keras Core Layer Operation Reshape
Revision ID: 1d7c21b6c7d2
Revises: 4a4b7df125b7
Create Date: 2018-11-01 10:26:22.659859
"""
from alembic import op
import sqlalchemy as sa
from alembic import context
from alembic import op
from sqlalchemy import String, Integer, Text
from sqlalchemy.o... | apache-2.0 | 7,580,760,651,073,423,000 | 28.268571 | 113 | 0.577314 | false | Add Keras Core Layer Operation Reshape
Revision ID: 1d7c21b6c7d2
Revises: 4a4b7df125b7
Create Date: 2018-11-01 10:26:22.659859
-*- coding: utf-8 -*- revision identifiers, used by Alembic. Reshape ReshapeCore Layers ReshapeReshapeReshapeReshapeReshape - target_shapeReshape - input_shape(5133, 1, 1, 'execution'),Resha... | 1,027 | en | 0.533043 |
gdestuynder/MozDef | cron/google2mozdef.py | 1 | 8901 | #!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
# Copyright (c) 2014 Mozilla Corporation
import sys
import logging
import requests
import json
fr... | mpl-2.0 | -2,776,831,902,477,656,600 | 40.593458 | 125 | 0.569037 | false | Set the filename and populate self.data by calling self.read_stat_file()
given a dictionary, potentially with multiple sub dictionaries
return a period delimited version of the dict with or without values
i.e. {'something':'value'} becomes something=value
{'something':{'else':'value'}} becomes something.else=value... | 1,792 | en | 0.82672 |
bubbleboy14/cantools | cantools/web/dez_server/daemons.py | 1 | 2550 | import sys, json, gc, os
try:
import psutil
except ImportError as e:
pass # google crap engine (get it if you need it!)
from dez.memcache import get_memcache
from dez.http.application import HTTPApplication
from .routes import static, cb
from cantools import config
sys.path.insert(0, ".") # for dynamically load... | mit | 6,818,281,954,024,664,000 | 41.5 | 109 | 0.59098 | false | google crap engine (get it if you need it!) for dynamically loading modules | 75 | en | 0.697002 |
phtj/eddex | houdini/python_libs/houdini_ea/wrappers.py | 1 | 4084 | """
Executor classes used for executing tasks.
"""
import sys, os
import hou
from bson.binary import Binary
#Current working directory
HOU_FOLDER_PATH = os.getcwd()
#Helper functions
def _load_hip_file(hip_file_name):
"""Attempt to load a hip file in Houdini """
#Replacing "\\" with "/" is required to avoid ... | gpl-3.0 | 4,568,971,612,252,445,000 | 33.033333 | 87 | 0.63859 | false | Current working directoryHelper functionsReplacing "\\" with "/" is required to avoid errors in evaluating "$HIP" Functions for executing tasksget the genotypeopen the hipnc fileset the parameters using the individual's genessave phenotype to file get and save the phenotypeget the phenotypewrite the phenotype to a temp... | 446 | en | 0.764406 |
fugitifduck/exabgp | lib/exabgp/protocol/family.py | 1 | 5287 | # encoding: utf-8
"""
address.py
Created by Thomas Mangin on 2010-01-19.
Copyright (c) 2009-2015 Exa Networks. All rights reserved.
"""
from struct import pack
from struct import unpack
# =================================================================== AFI
# http://www.iana.org/assignments/address-family-number... | bsd-3-clause | 2,321,827,960,558,510,000 | 22.923077 | 142 | 0.566106 | false | address.py
Created by Thomas Mangin on 2010-01-19.
Copyright (c) 2009-2015 Exa Networks. All rights reserved.
encoding: utf-8 =================================================================== AFI http://www.iana.org/assignments/address-family-numbers/ internal socket.AF_INET, socket.AF_INET6, l2vpn info over ipv4 ... | 1,542 | en | 0.657142 |
DeV1doR/ethereumd-proxy | ethereumd/proxy.py | 1 | 36272 | import operator
import asyncio
import re
import logging
from enum import IntEnum
from aioethereum import create_ethereum_client
from aioethereum.errors import BadResponseError
from .utils import hex_to_dec, wei_to_ether, ether_to_gwei, ether_to_wei
GAS_AMOUNT = 21000
GAS_PRICE = 20 # Gwei
DEFAUT_FEE = wei_to_ether... | mit | 1,286,945,215,647,437,800 | 42.335723 | 236 | 0.611381 | false | Gwei TODO TODO TODO: Optimization?? TODO: Correct return data TODO TODO TODO TODO TODO TODO NOTE: minconf nt work curently NOTE: minconf nt work curently account = 'Account {0}'.format(i) TODO: Make workable include_watchonly flag TODO: add default fromaccount if empty as coinbase TODO: Add amount and address validatio... | 556 | en | 0.366335 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.