repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cjbrasher/LipidFinder | LipidFinder/Configuration/LFParametersGUI.py | 1 | 38609 | # Copyright (c) 2019 J. Alvarez-Jarreta and C.J. Brasher
#
# This file is part of the LipidFinder software tool and governed by the
# 'MIT License'. Please see the LICENSE file that should have been
# included as part of this software.
"""Graphical User Interface (GUI) to manage the parameters' collection.
"""
from co... | mit | -4,986,626,818,987,311,000 | 45.34934 | 80 | 0.596623 | false | 4.573984 | false | false | false |
savioabuga/phoenix-template | phoenix/apps/records/views.py | 1 | 5138 | from django.contrib import messages
from django.shortcuts import HttpResponseRedirect
from django.core.urlresolvers import reverse
from smartmin.views import SmartCRUDL, SmartCreateView, SmartReadView, SmartListView
from phoenix.apps.animals.models import Animal
from phoenix.apps.utils.upload.views import UploadView, U... | bsd-3-clause | -1,207,090,966,957,749,500 | 36.510949 | 106 | 0.602374 | false | 3.704398 | false | false | false |
0lidaxiang/WeArt | chapter/view/getChapter.py | 1 | 2117 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import sys
import json
from django.http import JsonResponse
from django.shortcuts import render
from book.models import book
from chapter.models import chapter
def bookChapter(request):
context = {}
# get the book id of user input if it is not null
if 'idBook' no... | bsd-3-clause | 3,381,290,190,217,921,000 | 30.044118 | 108 | 0.639981 | false | 3.789946 | false | false | false |
quasiyoke/RandTalkBot | randtalkbot/stats.py | 1 | 1668 | # RandTalkBot Bot matching you with a random person on Telegram.
# Copyright (C) 2016 quasiyoke
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import datetime
import json
import logging
from peewee import DateTimeFiel... | agpl-3.0 | 3,084,319,754,593,820,700 | 25.47619 | 74 | 0.615707 | false | 3.641921 | false | false | false |
tedlaz/pyted | misthodosia/m13a/f_newCoWizard.py | 1 | 16787 | # -*- coding: utf-8 -*-
'''
Created on 15 Φεβ 2013
@author: tedlaz
'''
sqlco = u"INSERT INTO m12_co VALUES (1,'{0}','{1}','{2}',{3},'{4}','{5}','{6}','{7}','{8}','{9}','{10}','{11}','{12}','{13}')"
from PyQt4 import QtCore, QtGui,Qt
import utils_db,widgets
import osyk
from utils_qt import fFindFromList... | gpl-3.0 | 6,554,847,959,938,570,000 | 37.832061 | 129 | 0.590009 | false | 2.875459 | false | false | false |
denex/snafucator | Python/pin/pin_generator.py | 1 | 1028 | def _create_pins():
"""
:rtype: Iterable[int]
"""
middle = 5000
for i in range(0, 2 * middle):
if i % 2 == 0:
yield middle - i // 2 - 1
else:
yield middle + i // 2
PINS = tuple(_create_pins())
assert len(PINS) == 10000, "Len = %d" % len(PINS)
assert min(PINS... | gpl-3.0 | 7,676,437,677,112,655,000 | 20.87234 | 74 | 0.571984 | false | 3.005848 | false | false | false |
nodesign/weioMinima | weioLib/weioParser.py | 1 | 10962 | ###
#
# WEIO Web Of Things Platform
# Copyright (C) 2013 Nodesign.net, Uros PETREVSKI, Drasko DRASKOVIC
# All rights reserved
#
# ## ## ######## #### #######
# ## ## ## ## ## ## ##
# ## ## ## ## ## ## ##
# ## ## ## ###### ... | bsd-3-clause | -1,069,625,149,442,586,900 | 29.032877 | 89 | 0.614213 | false | 3.386469 | false | false | false |
wahaha02/myblog | blog/templatetags/highlight.py | 1 | 1181 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
from django.template import Library
import re
DEBUG = False
register = Library()
@register.filter
def highlight_format(value):
p_sub = re.compile('__codestart__ (\w+)')
value = p_sub.sub(r'<pre name="code" class="\g<1>">', value)
p_sub = re.compile(r'__codee... | bsd-3-clause | 7,682,443,373,309,620,000 | 28.525 | 95 | 0.515665 | false | 3.473529 | false | false | false |
OmkarPathak/Python-Programs | CompetitiveProgramming/HackerEarth/Algorithms/String/P11_CaesarsCipher.py | 1 | 2255 | # Caesar's Cipher is a very famous encryption technique used in cryptography. It is a type of substitution
# cipher in which each letter in the plaintext is replaced by a letter some fixed number of positions down
# the alphabet. For example, with a shift of 3, D would be replaced by G, E would become H, X would become... | gpl-3.0 | -6,465,062,925,664,911,000 | 30.535211 | 110 | 0.659669 | false | 3.203147 | false | false | false |
lmprice/ansible | lib/ansible/playbook/role/__init__.py | 13 | 18914 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible 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) an... | gpl-3.0 | -2,407,202,554,963,732,500 | 37.837782 | 156 | 0.596437 | false | 4.219991 | false | false | false |
shaih/HElib | utils/tests/diff-threshold.py | 1 | 3144 | #!/usr/bin/env python3
# Copyright (C) 2020 IBM Corp.
# This program is 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 applic... | apache-2.0 | -4,331,664,892,367,646,000 | 36.428571 | 84 | 0.57729 | false | 3.35539 | false | false | false |
Videonauth/passgen | tool/keyboard_list_generator.py | 1 | 2612 | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
############################################################################
#
# keyboard_list_generator.py
#
############################################################################
#
# Author: Videonauth <videonauth@googlemail.com>
# Date: 09.07.2016
# Purpose:
# ... | mit | 7,557,594,228,450,199,000 | 41.688525 | 76 | 0.504224 | false | 3.059929 | false | false | false |
CNR-ISMAR/rectifiedgrid | rectifiedgrid/hillshade.py | 1 | 1108 | from matplotlib.colors import LightSource
# Adapted from https://github.com/jobar8/graphics
def alpha_blend(rgb, intensity, alpha=0.7):
return alpha * rgb + (1 - alpha) * intensity
def get_hs(data,
cmap,
norm=None,
zf=10,
azdeg=315,
altdeg=45,
dx=... | gpl-3.0 | 3,936,537,537,660,941,000 | 28.157895 | 74 | 0.447653 | false | 3.971326 | false | false | false |
HyechurnJang/pygics | sample/simple_database.py | 1 | 1764 | # -*- coding: utf-8 -*-
'''
____ ___ ____________ ___ ___ ____ _________________
/ __ \/ _ | / __/ _/ __/ / _ \/ _ \/ __ \__ / / __/ ___/_ __/
/ /_/ / __ |_\ \_/ /_\ \ / ___/ , _/ /_/ / // / _// /__ / /
\____/_/ |_/___/___/___/ /_/ /_/|_|\____/\___/___/\___/ /_/
Operational Aid Source ... | apache-2.0 | -6,248,814,847,715,503,000 | 34.28 | 131 | 0.521542 | false | 3.005111 | false | false | false |
markvdw/GParML | scg_adapted_local_MapReduce.py | 2 | 8715 | '''
A bunch of support functions used for SCG optimisation. They depend on the
parallel implementation framework, but may change for other optimisers.
'''
import glob
import time
import numpy
from os.path import splitext
from local_MapReduce import load, save
time_acc = {
'embeddings_set_grads' : [],
'embeddi... | bsd-3-clause | -4,492,889,811,067,905,000 | 34.864198 | 109 | 0.618589 | false | 3.226583 | true | false | false |
KarolBedkowski/photomagic | photomagick/filters/bw.py | 1 | 1431 | #!usr/bin/python
# -*- coding: utf-8 -*-
__plugins__ = ('BwLuminosity', 'BwGreen', 'BwOrange', 'BwRed', 'BwYellow',
'BwInfrared')
__version__ = '2011-03-20'
__author__ = 'Karol Będkowski'
__copyright__ = "Copyright (c) Karol Będkowski, 2011"
import ImageOps
from photomagick.common import colors
from photomagick.co... | gpl-2.0 | -3,300,862,538,246,330,000 | 20.651515 | 74 | 0.664801 | false | 2.593466 | false | false | false |
ReedAnders/deepmap | deepmap/nn.py | 1 | 5374 | # Copyright (C) 2016 Reed Anderson.
# From: https://github.com/ReedAnders/deepmap
# License: MIT BY https://opensource.org/licenses/MIT
import pickle, os, binascii
from collections import deque
import numpy as np
from math import exp
from random import random
class NodeMap:
def __init__(self, input_node_populatio... | mit | -437,573,294,550,352,260 | 32.798742 | 103 | 0.600298 | false | 3.601877 | false | false | false |
aaronst/macholibre | macholibre/dictionary.py | 1 | 12913 | #!/usr/bin/env python
"""
Copyright 2016 Aaron Stephens <aaronjst93@gmail.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by a... | apache-2.0 | 3,063,381,205,710,470,000 | 22.912963 | 79 | 0.521567 | false | 2.603427 | false | false | false |
Multiscale-Genomics/mg-process-fastq | tadbit_model_wrapper.py | 1 | 10041 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
.. See the NOTICE file distributed with this work for additional information
regarding copyright ownership.
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 cop... | apache-2.0 | 7,750,510,198,224,055,000 | 35.915441 | 100 | 0.591077 | false | 4.224232 | true | false | false |
sjdv1982/seamless | seamless/communion_encode.py | 1 | 3566 | """
Encoding/decoding of communion messages
message must be a dict containing:
"mode": "request" or "response"
"id": 32-bit identifier, should increase
"content": None, bool, bytes, str, int, float, or tuple of str/int/float/bool
remaining keys: anything JSON-serializable
encoded message is binary, and... | mit | -6,822,255,612,640,416,000 | 32.327103 | 96 | 0.576837 | false | 3.442085 | false | false | false |
wmaciel/van-crime | src/run_demo.py | 1 | 4046 | # coding=utf-8
__author__ = 'walthermaciel'
from geopy.geocoders import DataBC
from geopy.exc import GeopyError
from time import sleep
import sys
from ssl import SSLError
from create_feature_vector import create_vector
import os
import pandas as pd
from sklearn.externals import joblib
from sklearn.ensemble import Ran... | mit | 1,701,064,191,257,659,000 | 27.9 | 79 | 0.555116 | false | 3.440476 | false | false | false |
ESEGroup/Paraguai | domain/usuario/servico_crud_usuario.py | 1 | 3946 | #-*- coding: utf-8 -*-
from .usuario import Usuario
from .nivel_acesso import *
from .senha_criptografada import *
from domain.excecoes import *
from domain.email import EmailUsuarioCadastrado, EmailUsuarioAlterado, EmailUsuarioRemovido
class ServicoCRUDUsuario():
"""Essa classe modela um serviço CRUD para Usuário... | apache-2.0 | 3,734,639,932,427,047,000 | 30.894309 | 91 | 0.653581 | false | 2.910237 | false | false | false |
lotharwissler/bioinformatics | python/gff/droso-chromosome-reconstruction.py | 1 | 2939 | #!/usr/bin/python
import os, sys # low level handling, such as command line stuff
import string # string methods available
import getopt # comand line argument handling
from collections import defaultdict
from low import * # custom functions, written by myself
# ========================================... | mit | 1,956,595,199,548,383,200 | 33.988095 | 96 | 0.50051 | false | 4.180654 | false | false | false |
kawamon/hue | apps/hbase/src/hbase/hbase_site.py | 2 | 3316 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | apache-2.0 | 4,130,980,423,032,617,500 | 28.607143 | 102 | 0.721653 | false | 3.090401 | false | false | false |
windelbouwman/ppci-mirror | ppci/binutils/disasm.py | 1 | 1210 | """ Contains disassembler stuff. """
from ..arch.data_instructions import DByte
class Disassembler:
""" Base disassembler for some architecture """
def __init__(self, arch):
self.arch = arch
for instruction in arch.isa.instructions:
# print(instruction, instruction.patterns)
... | bsd-2-clause | -6,070,502,765,213,653,000 | 29.25 | 62 | 0.52562 | false | 4.384058 | false | false | false |
Domatix/stock-logistics-workflow | stock_split_picking/models/stock_picking.py | 2 | 3356 | # Copyright 2013-2015 Camptocamp SA - Nicolas Bessi
# Copyright 2018 Camptocamp SA - Julien Coux
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, models
from odoo.exceptions import UserError
from odoo.tools.float_utils import float_compare
class StockPicking(models.Model):
... | agpl-3.0 | 3,325,539,118,000,248,000 | 40.95 | 76 | 0.470203 | false | 4.801144 | false | false | false |
tjctw/PythonNote | thinkstat/install_test.py | 2 | 1432 | """This file contains code used in "Think Stats",
by Allen B. Downey, available from greenteapress.com
Copyright 2010 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html
"""
import math
import matplotlib.pyplot as pyplot
import myplot
import Pmf
def NormalPdf(x):
"""Computes the PDF of x i... | cc0-1.0 | -2,332,128,312,569,563,000 | 23.689655 | 77 | 0.587291 | false | 3.140351 | false | false | false |
LiqunHu/MVPN | testing/testUser.py | 1 | 2284 | # -*- coding: utf-8 -*-
"""
Created on Thu May 12 16:25:02 2016
@author: huliqun
"""
import requests
import json
import uuid
import base64
_SERVER_HOST = '127.0.0.1'
_SERVER_PORT = 8000
_SERVER_BASE_URL = 'http://{0}:{1}/api/users'.format(_SERVER_HOST, _SERVER_PORT)
headers = {'content-type':'applic... | gpl-3.0 | -2,363,591,250,241,619,500 | 31.101449 | 136 | 0.662434 | false | 2.646582 | false | false | false |
roshantha9/AbstractManycoreSim | src/analyse_results/AnalyseResults_Exp_HEVCSplitTiles_KaushikTuner.py | 1 | 10541 | import sys, os, csv, pprint, math
#sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
## uncomment when running under CLI only version ##
#import matplotlib
#matplotlib.use('Agg')
#sys.path.append("/shared/storage/cs/staffstore/hrm506/simpy-3.0.5/")
#sys.path.append("/shared/storage/cs/staffstore/hrm506/... | gpl-3.0 | -5,360,821,009,173,282,000 | 29.731778 | 132 | 0.533725 | false | 3.567174 | false | false | false |
jimbelton/wikidata | lib/language.py | 1 | 19199 | # -*- coding: utf-8 -*-
# All language names have had the words characters, languages and language removed and all remaining words capitalized
# 1. The list of languages in ISO 639-1 is from the standard: http://www.loc.gov/standards/iso639-2/
# 2. The list of languages in wikidata was taken from the 'original language... | gpl-3.0 | -964,277,398,414,625,000 | 49.251309 | 131 | 0.414618 | false | 3.316517 | false | false | false |
chizarlicious/chapel | util/chplenv/chpl_comm.py | 3 | 1340 | #!/usr/bin/env python
import sys, os
import chpl_compiler
import chpl_platform
from utils import memoize
import utils
@memoize
def get():
comm_val = os.environ.get('CHPL_COMM')
if not comm_val:
platform_val = chpl_platform.get('target')
compiler_val = chpl_compiler.get('target')
# use... | apache-2.0 | 1,757,365,281,772,737,800 | 30.904762 | 79 | 0.602985 | false | 3.53562 | false | false | false |
zenweasel/cashflow2 | cashflow_project/settings/local-dist.py | 1 | 2546 | """
This is an example settings/local.py file.
These settings overrides what's in settings/base.py
"""
from . import base
# To extend any settings from settings/base.py here's an example:
INSTALLED_APPS = base.INSTALLED_APPS + ('django_nose',)
MIDDLEWARE_CLASSES = base.MIDDLEWARE_CLASSES.append('debug_toolbar.middl... | bsd-3-clause | 4,926,005,510,419,285,000 | 27.288889 | 102 | 0.663394 | false | 3.412869 | false | false | false |
agmscode/agms_python | agms/request/hpp_request.py | 1 | 7917 | from __future__ import absolute_import
import re
from agms.request.request import Request
from agms.exception.request_validation_exception import RequestValidationException
class HPPRequest(Request):
"""
A class representing AGMS HPP Request objects.
"""
def __init__(self, op):
Request.__init... | mit | 1,617,904,537,919,609,300 | 42.988889 | 114 | 0.48099 | false | 4.057919 | false | false | false |
fernandog/Medusa | medusa/session/hooks.py | 1 | 1640 | # coding=utf-8
from __future__ import unicode_literals
import logging
from medusa.logger.adapters.style import BraceAdapter
from six import text_type
log = BraceAdapter(logging.getLogger(__name__))
log.logger.addHandler(logging.NullHandler())
def log_url(response, **kwargs):
"""Response hook to log request U... | gpl-3.0 | 1,730,956,940,932,370,200 | 29.943396 | 84 | 0.532927 | false | 4.162437 | false | false | false |
IntegratedAlarmSystem-Group/ias | Tools/src/main/python/IASApiDocs/DocGenerator.py | 1 | 3590 | '''
Base class for java, scala and python API docs generators
Created on Jul 7, 2017
@author: acaproni
'''
import sys
import os
import logging
class DocGenerator(object):
'''
The base class for API docs generators
'''
def __init__(self,srcFolder,dstFolder,outFile=sys.stdout):
"""
... | lgpl-3.0 | -3,484,627,717,770,637,300 | 40.264368 | 134 | 0.637326 | false | 4.58493 | true | false | false |
JFinis/serverscript | src/ss/jobs/sync_job.py | 1 | 1469 | '''
Created on 21.01.2017
@author: gex
'''
from ss.jobs.job import Job
from ss.rsync import RSync
class SyncJob(Job):
'''
Synchronizes the 'to' directory with the 'from' directory.
I.e., the directories will be exectly the same after the command
'''
FROM_KEY='from'
TO_KEY... | mit | 1,426,035,962,513,237,000 | 33.02381 | 101 | 0.633084 | false | 3.855643 | false | false | false |
GirlsCodePy/girlscode-coursebuilder | modules/dashboard/dashboard.py | 3 | 26359 | # Copyright 2014 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 ... | gpl-3.0 | -358,744,994,067,295,900 | 38.998483 | 80 | 0.638833 | false | 4.213395 | false | false | false |
stormi/tsunami | src/primaires/communication/contextes/immersion.py | 1 | 14322 | # -*-coding:Utf-8 -*
# Copyright (c) 2010 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# l... | bsd-3-clause | 2,451,683,924,665,189,000 | 41.317507 | 80 | 0.563775 | false | 3.261148 | false | false | false |
jstasiak/pykka-injector | setup.py | 1 | 1150 | from os.path import abspath, dirname, join
from setuptools import setup
PROJECT_ROOT = abspath(dirname(__file__))
long_description = open(join(PROJECT_ROOT, 'README.rst')).read()
description = (
'Pykka (actor model implementation) and Injector '
'(dependency injection framework) integration module'
)
module... | mit | -1,447,326,377,970,167,000 | 30.944444 | 77 | 0.618261 | false | 3.59375 | false | false | false |
LxMLS/lxmls-toolkit | labs/scripts/non_linear_classifiers/exercise_2.py | 1 | 3897 |
# coding: utf-8
# ### Amazon Sentiment Data
# In[ ]:
import numpy as np
import lxmls.readers.sentiment_reader as srs
from lxmls.deep_learning.utils import AmazonData
corpus = srs.SentimentCorpus("books")
data = AmazonData(corpus=corpus)
# ### Exercise 2.2 Implement Backpropagation for an MLP in Numpy and train i... | mit | -5,639,140,880,735,986,000 | 26.835714 | 479 | 0.725173 | false | 3.529891 | false | false | false |
itdxer/neupy | examples/cnn/imagenet_tools.py | 1 | 3761 | from __future__ import division
import os
import requests
from tqdm import tqdm
import numpy as np
from imageio import imread
from skimage import transform
from neupy.utils import asfloat
CURRENT_DIR = os.path.abspath(os.path.dirname(__file__))
FILES_DIR = os.path.join(CURRENT_DIR, 'files')
IMAGENET_CLASSES_FILE =... | mit | -8,328,753,512,743,601,000 | 27.067164 | 74 | 0.581494 | false | 3.466359 | false | false | false |
pitivi/gst-editing-services | bindings/python/examples/material.py | 1 | 1281 | from gi.repository import Gst, GES, GLib
import os
class Simple:
def __init__(self, uri):
timeline = GES.Timeline()
trackv = GES.Track.video_raw_new()
self.layer = GES.Layer()
self.pipeline = GES.TimelinePipeline()
self.pipeline.add_timeline(timeline)
timeline.add... | lgpl-2.1 | -3,613,576,516,863,848,000 | 28.113636 | 102 | 0.596409 | false | 3.276215 | false | false | false |
ESultanik/lenticrypt | lenticrypt/iowrapper.py | 1 | 4442 | import collections.abc
import gzip
import sys
from io import BufferedReader, BytesIO, IOBase
from typing import BinaryIO, IO, Iterable, Union
IOWrappable = Union[bytes, bytearray, BinaryIO, Iterable[int]]
def get_length(stream: IO) -> int:
"""Gets the number of bytes in the stream."""
old_position = stream.... | gpl-2.0 | -7,377,706,488,560,450,000 | 31.903704 | 95 | 0.493246 | false | 4.367748 | false | false | false |
reuk/wayverb | demo/evaluation/receivers/cardioid.py | 2 | 1909 | #!/usr/local/bin/python
import numpy as np
import matplotlib
render = True
if render:
matplotlib.use('pgf')
import matplotlib.pyplot as plt
from matplotlib.ticker import MaxNLocator # added
import matplotlib.mlab as mlab
from string import split
import scipy.signal as signal
import pysndfile
import math
import os... | gpl-2.0 | 7,487,160,876,632,411,000 | 24.118421 | 93 | 0.614982 | false | 3.094003 | false | false | false |
sheepslinky/franklin | server/control.py | 1 | 2018 | #!/usr/bin/python3
# control.py - USB hotplug handling for Franklin
# Copyright 2014-2016 Michigan Technological University
# Copyright 2016 Bas Wijnen <wijnen@debian.org>
# Author: Bas Wijnen <wijnen@debian.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Af... | agpl-3.0 | 871,346,251,859,248,100 | 28.676471 | 86 | 0.69227 | false | 3.270665 | false | false | false |
Zamme/bge-editor | bgee_entity.py | 1 | 8653 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | lgpl-3.0 | -5,057,835,655,556,257,000 | 37.977477 | 151 | 0.624061 | false | 3.888989 | false | false | false |
Alberto-Beralix/Beralix | i386-squashfs-root/usr/share/system-config-printer/troubleshoot/QueueNotEnabled.py | 1 | 2871 | #!/usr/bin/python
## Printing troubleshooter
## Copyright (C) 2008, 2009 Red Hat, Inc.
## Copyright (C) 2008, 2009 Tim Waugh <twaugh@redhat.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 Foundat... | gpl-3.0 | -4,737,863,344,954,821,000 | 34.8875 | 82 | 0.599443 | false | 4.083926 | false | false | false |
tiagofrepereira2012/examples.tensorflow | examples/tensorflow/DataShuffler.py | 1 | 6754 | #!/usr/bin/env python
# vim: set fileencoding=utf-8 :
# @author: Tiago de Freitas Pereira <tiago.pereira@idiap.ch>
# @date: Wed 11 May 2016 09:39:36 CEST
import numpy
def scale_mean_norm(data, scale=0.00390625):
mean = numpy.mean(data)
data = (data - mean) * scale
return data, mean
"""
Data
"""
cla... | gpl-3.0 | 7,439,942,784,333,194,000 | 33.635897 | 114 | 0.56485 | false | 3.670652 | false | false | false |
luca-heltai/ePICURE | applications/arclength_example.py | 1 | 4351 | import numpy as np
import math
import scipy.special as sp
from scipy.interpolate import lagrange
from numpy.polynomial.chebyshev import chebgauss
#import sys
from utilities import *
from interfaces import *
#from utilities.arclength import*
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
R ... | gpl-2.0 | 6,500,625,509,890,941,000 | 36.834783 | 182 | 0.664675 | false | 2.28399 | true | false | false |
iulian787/spack | var/spack/repos/builtin/packages/blaze/package.py | 2 | 3063 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Blaze(CMakePackage):
"""Blaze is an open-source, high-performance C++ math library for de... | lgpl-2.1 | 5,871,476,873,201,262,000 | 62.8125 | 93 | 0.79889 | false | 2.242313 | false | false | false |
hackerspace-ntnu/website | website/migrations/0010_auto_20210322_1840.py | 1 | 1453 | # Generated by Django 3.1.2 on 2021-03-22 18:40
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('website', '0009_auto_20210322_1837'),
]
operations = [
migrations.AlterField(
model_name='banner',
name='color',
... | mit | -8,948,652,533,114,494,000 | 42.818182 | 262 | 0.625173 | false | 3.535452 | false | false | false |
kamcpp/tensorflow | tensorflow/contrib/bayesflow/python/kernel_tests/stochastic_graph_test.py | 10 | 9224 | # Copyright 2016 The TensorFlow 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 applica... | apache-2.0 | -1,007,608,493,723,966,100 | 39.279476 | 80 | 0.629445 | false | 3.499241 | true | false | false |
ForeverWintr/metafunctions | setup.py | 1 | 2340 | '''
MetaFunctions is a function composition and data pipelining library.
For more information, please visit the `project on github <https://github.com/ForeverWintr/metafunctions>`_.
'''
import os
import sys
import contextlib
import pathlib
import shutil
from setuptools import setup, find_packages, Command
import met... | mit | -1,384,161,527,418,276,900 | 27.814815 | 108 | 0.647815 | false | 4.038062 | false | false | false |
allancaffee/scaly-mongo | tests/acceptance/test_find.py | 1 | 7354 | from scalymongo import Document
from tests.acceptance.base_acceptance_test import BaseAcceptanceTest
class FindExample(Document):
structure = {
'name': basestring,
'age': int,
}
indexes = [{
'fields': [('name', 1)],
}]
__database__ = 'test'
__collection__ = __file__
... | bsd-3-clause | -104,822,185,336,807,870 | 27.614786 | 86 | 0.657057 | false | 3.777093 | true | false | false |
tcpcloud/python-heatclient | heatclient/tests/unit/test_template_format.py | 3 | 1628 | # 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
# d... | apache-2.0 | 8,902,788,243,648,320,000 | 31.56 | 78 | 0.67199 | false | 4.13198 | true | false | false |
benjamincongdon/adept | enemy.py | 1 | 1072 | import math
import random
import pygame
from buffalo import utils
from npc import NPC
class Enemy(NPC):
# Class for anything hostile. For now it just follows the player around,
# There's not enough in the game in terms of health, damage, and item usage
# To have actual combat
def __init__(self, name=None, fPo... | mit | 228,071,826,013,174,430 | 32.5 | 168 | 0.684701 | false | 2.858667 | false | false | false |
Sh4kE/ofm_helper | core/migrations/0004_checklist_checklistitem.py | 2 | 1625 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.8 on 2016-11-28 09:45
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependen... | agpl-3.0 | 8,514,440,296,711,046,000 | 42.918919 | 166 | 0.619692 | false | 3.934625 | false | false | false |
themiurgo/folium | folium/features.py | 1 | 26933 | # -*- coding: utf-8 -*-
"""
Features
------
Extra features Elements.
"""
from jinja2 import Template
import json
from .utilities import (color_brewer, _parse_size, legend_scaler,
_locations_mirror, _locations_tolist, image_to_url)
from .element import Element, Figure, JavascriptLink, CssLink,... | mit | 4,189,219,772,065,768,400 | 38.665685 | 126 | 0.502246 | false | 4.224122 | false | false | false |
hyperized/ansible | lib/ansible/module_utils/network/nxos/facts/l3_interfaces/l3_interfaces.py | 11 | 4905 | #
# -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)#!/usr/bin/python
"""
The nxos l3_interfaces fact class
It is in this file the configuration is collected from the device
for a given resource, parsed, and the facts tree is p... | gpl-3.0 | 8,065,667,181,968,915,000 | 37.928571 | 116 | 0.532314 | false | 4.246753 | true | false | false |
BFriedland/deck_of_cards | deck_of_cards.py | 2 | 3389 | import random
# Some of my assumptions:
# - Decks contain four suits with associated colors
# - Suits contain thirteen title-like designators
# - It doesn't matter if the deck's contents can change in any which way
# as long as the initial deck contains the correct 52 cards.
# - The random library is sufficient... | mit | 6,404,353,461,920,946,000 | 32.554455 | 77 | 0.576866 | false | 3.716009 | false | false | false |
danriti/raven-python | tests/transport/tests.py | 9 | 2708 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from raven.utils.testutils import TestCase
from raven.base import Client
# Some internal stuff to extend the transport layer
from raven.transport import Transport
from raven.transport.exceptions import DuplicateScheme
# Simplify comparing dicts with pri... | bsd-3-clause | -5,826,906,757,774,607,000 | 28.434783 | 108 | 0.599335 | false | 3.902017 | true | false | false |
gkotton/neutron | neutron/plugins/vmware/plugins/base.py | 6 | 128952 | # Copyright 2012 VMware, Inc.
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | apache-2.0 | -6,912,307,957,773,584,000 | 50.663462 | 79 | 0.549119 | false | 4.325216 | false | false | false |
kungpfui/pyCueSheet | src/cuejoin.py | 1 | 9187 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# $Id$
import os, sys, re
import time, math
import wave
import subprocess
import multiprocessing
class Decode:
""" Decoder """
def __init__(self, filename):
self.filename = filename
self.origin_filename = None
self.fileext = {
'.tta' : s... | gpl-3.0 | 6,097,720,098,156,660,000 | 25.020588 | 102 | 0.602917 | false | 2.847799 | false | false | false |
jrydberg/guild | examples/ring.py | 1 | 1777 | # Copyright (c) 2012, Johan Rydberg
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation files
# (the "Software"), to deal in the Software without restriction,
# including without limitation the rights to use, copy, modify, merge,
# publish, di... | mit | -1,933,545,526,922,268,200 | 31.907407 | 70 | 0.714688 | false | 4.066362 | false | false | false |
cashelcomputers/basaGC | basagc/telemachus.py | 1 | 5005 | #!/usr/bin/env python3
"""This module contains code that interacts with the Telemachus mod to access KSP telemetry"""
import json
import urllib.error
import urllib.parse
import urllib.request
from basagc import config
from basagc import utils
if config.DEBUG:
from pudb import set_trace # lint:ok
telemetry =... | gpl-2.0 | 382,405,559,617,665,600 | 30.484277 | 145 | 0.620979 | false | 3.580114 | true | false | false |
cryptickp/heat | heat/common/timeutils.py | 4 | 2566 | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | apache-2.0 | -719,043,924,277,491,600 | 30.292683 | 78 | 0.664069 | false | 3.697406 | false | false | false |
tgl-dogg/BCC-2s14-PI4-SteampunkSpider | src/steampunk_spider/database/correlacaoGenero.py | 1 | 2096 | # pegar a quantidade de horas totais em cada gênero
SELECT genre.name, SUM(hours) AS soma
FROM rel_player_software
INNER JOIN rel_software_genre ON rel_player_software.fk_software = rel_software_genre.fk_software
INNER JOIN genre ON rel_software_genre.fk_genre = genre.id_genre
GROUP BY rel_software_genre.fk_genre
ORD... | mit | 595,603,466,192,664,800 | 42.645833 | 97 | 0.795129 | false | 3.148872 | false | true | false |
HandyGuySoftware/dupReport | dupapprise.py | 1 | 6499 | #####
#
# Module name: dupApprise.py
# Purpose: Management class for Apprise notification service
#
# Notes: Uses the Apprise push notification utility from @caronc
# https://github.com/caronc/apprise
# For any Apprise support or feature requests, please see the Apprise GitHub site
#
#####
# Impor... | mit | -8,268,305,749,878,739,000 | 55.025862 | 237 | 0.667487 | false | 3.95076 | false | false | false |
FeitengLab/EmotionMap | 1SiteRanking/RegionExtract/union.py | 1 | 2843 | #分别得到min,max和Union三个含有时间的txt
import psycopg2
#链接到我的PostgreSQL数据库
connection = psycopg2.connect(database="postgres", user="postgres", host="127.0.0.1", port='5432', password="kwy17502X")
print(1)
#获取游标
cursor = connection.cursor()
print(2)
try:
cursor.execute("drop table min")
cursor.execute("drop table max")
#... | mit | -1,837,974,392,402,139,100 | 32.37037 | 140 | 0.601554 | false | 3.139373 | false | false | false |
gooddata/zuul | zuul/source/gerrit.py | 1 | 13993 | # Copyright 2012 Hewlett-Packard Development Company, L.P.
#
# 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 applicabl... | apache-2.0 | 2,095,542,611,283,106,300 | 38.640227 | 79 | 0.538841 | false | 4.405856 | false | false | false |
edsonlb/PoloVota | projects/models.py | 1 | 2825 | # This Python file uses the following encoding: utf-8
from django.db import models
from django.utils.translation import ugettext_lazy as _
class Project(models.Model):
area = models.CharField(_('área'), max_length=100, blank=False, null=False)
tema = models.CharField(_('tema'), max_length=200, blank=False, nul... | mit | -2,586,360,229,164,140,500 | 52.245283 | 101 | 0.68061 | false | 3.334515 | false | false | false |
samuelmaudo/yepes | yepes/fields/comma_separated.py | 1 | 2515 | # -*- coding:utf-8 -*-
from __future__ import unicode_literals
import re
from django.db import models
from django.utils import six
from django.utils.translation import ugettext_lazy as _
from yepes import forms
from yepes.fields.char import CharField
from yepes.utils.deconstruct import clean_keywords
class CommaS... | bsd-3-clause | -1,359,136,921,683,177,200 | 30.4375 | 81 | 0.614712 | false | 4.063005 | false | false | false |
MAndelkovic/pybinding | pybinding/chebyshev.py | 1 | 22137 | """Computations based on Chebyshev polynomial expansion
The kernel polynomial method (KPM) can be used to approximate various functions by expanding them
in a series of Chebyshev polynomials.
"""
import warnings
import numpy as np
import scipy
from . import _cpp
from . import results
from .model import Model
from .s... | bsd-2-clause | -5,052,924,310,591,643,000 | 37.697552 | 99 | 0.610165 | false | 4.072677 | false | false | false |
sajuptpm/contrail-controller | src/config/svc-monitor/svc_monitor/port_tuple.py | 1 | 9521 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2014 Cloudwatt
# 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/l... | apache-2.0 | 6,404,146,252,920,576,000 | 38.83682 | 84 | 0.573679 | false | 3.543357 | true | false | false |
muddyfish/PYKE | node/deep_for.py | 1 | 2419 | import copy
from nodes import Node
class DeepFor(Node):
char = ".F"
args = None
results = None
default_arg = 1
def __init__(self, args: Node.NumericLiteral, ast:Node.EvalLiteral):
self.args = args
self.ast = ast
if self.ast.nodes == []:
self.ast.add_node(b... | mit | 7,516,931,946,032,238,000 | 30.415584 | 97 | 0.468375 | false | 3.69313 | false | false | false |
5GExchange/nffg | nffg.py | 2 | 140053 | # Copyright 2017 Janos Czentye, Balazs Nemeth, Balazs Sonkoly
#
# 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 | -8,901,977,784,718,506,000 | 37.507836 | 88 | 0.587949 | false | 3.663719 | false | false | false |
jonnyhuck/GlobeMaker | makeGlobe.py | 1 | 8397 | #!/usr/bin/env python
import mapnik, ogr, osr, pyproj, os, sys, getopt
from PIL import Image
###
# Draw a Rhumb line with nPoints nodes
# @author jonnyhuck
###
def getRhumb(startlong, startlat, endlong, endlat, nPoints):
# calculate distance between points
g = pyproj.Geod(ellps='WGS84')
# calculate line... | lgpl-3.0 | -3,680,023,338,081,080,300 | 30.931559 | 137 | 0.640229 | false | 3.127374 | false | false | false |
rjschwei/azure-sdk-for-python | azure-mgmt-dns/azure/mgmt/dns/models/record_set.py | 1 | 4228 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -6,092,007,763,563,084,000 | 45.461538 | 248 | 0.617313 | false | 3.592184 | false | false | false |
thom-at-redhat/cfme_tests | cfme/storage/managers.py | 1 | 5166 | # -*- coding: utf-8 -*-
from functools import partial
from cfme import web_ui as ui
from cfme.web_ui.menu import nav
from cfme.exceptions import StorageManagerNotFound
from cfme.fixtures import pytest_selenium as sel
from cfme.web_ui import Form, InfoBlock, MultiFill, Region, SplitTable, fill, flash
from cfme.web_ui i... | gpl-2.0 | -8,675,807,006,659,604,000 | 32.115385 | 98 | 0.609756 | false | 3.934501 | false | false | false |
movio/maxwell-faker | setup.py | 1 | 1173 | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name='maxwell-faker',
version='0.1.0',
description='Maxwell faker for systems and load testing',
url='https://github.com/movio/maxwell-faker',
author='Nicolas Maquet and Nan Wu',
author_email='nicolas@movio.co, nan@movi... | mit | -8,835,322,440,469,028,000 | 31.583333 | 67 | 0.604433 | false | 3.796117 | false | false | false |
gdelnegro/django-translation-server | translation_server/forms.py | 1 | 1927 | # -*- coding: utf-8 -*-
# Created by Gustavo Del Negro <gustavodelnegro@gmail.com> on 9/30/16.
from django import forms
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from translation_server.models import *
from django.urls import reverse
class TranslationAdminForm(forms.Mode... | mit | 3,482,051,199,576,771,000 | 37.56 | 98 | 0.654385 | false | 4.153017 | false | false | false |
pirata-cat/mieli | geo/helpers.py | 1 | 2853 | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from geo.models import Geoname
from geo.api import location
from mieli.api import nexus
from django import forms
import re
def __admin2_sanitizer(admin2):
admin2.name = admin2.name.split(' ')[-1]
return admin2
def build_administra... | agpl-3.0 | 7,802,266,255,789,061,000 | 42.227273 | 139 | 0.645636 | false | 3.39239 | false | false | false |
heromod/migrid | mig/server/edituser.py | 1 | 4234 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# --- BEGIN_HEADER ---
#
# edituser - Edit a MiG user
# Copyright (C) 2003-2013 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 Public License as publis... | gpl-2.0 | 7,567,648,195,852,900,000 | 28.816901 | 81 | 0.577232 | false | 3.704287 | false | false | false |
apache/cloudstack-ec2stack | tests/password_tests.py | 3 | 2316 | #!/usr/bin/env python
# encoding: utf-8
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache Licens... | apache-2.0 | 5,318,389,458,403,325,000 | 32.085714 | 78 | 0.64076 | false | 3.986231 | true | false | false |
versae/ortograbot | bot.py | 1 | 6753 | # -*- coding: utf-8 -*-
import langid
import logging
import pymongo
import os
import re
import sys
import twitter
import urllib
from datetime import datetime
from datetime import timedelta
from random import choice
from random import randint
logging.basicConfig()
logger = logging.getLogger(__name__)
class OrtograBot... | mit | -7,809,110,081,855,427,000 | 41.433121 | 79 | 0.448064 | false | 3.900468 | false | false | false |
LarsFronius/ansible | lib/ansible/modules/network/illumos/ipadm_prop.py | 43 | 7530 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Adam Števko <adam.stevko@gmail.com>
#
# This file is part of Ansible
#
# Ansible 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 L... | gpl-3.0 | 8,330,504,288,972,269,000 | 26.778598 | 83 | 0.563762 | false | 4.11591 | false | false | false |
koorukuroo/networkx_for_unicode | networkx/linalg/spectrum.py | 10 | 2052 | """
Eigenvalue spectrum of graphs.
"""
# Copyright (C) 2004-2013 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
import networkx as nx
__author__ = "\n".join(['Aric Hagberg <aric.hagberg@gmail.com>',
... | bsd-3-clause | -2,793,521,151,012,232,700 | 24.02439 | 67 | 0.624269 | false | 3.864407 | false | false | false |
3324fr/spinalcordtoolbox | testing/testing_sct_propseg.py | 1 | 10478 | #!/usr/bin/env python
#########################################################################################
#
# Test function sct_propseg
#
# ---------------------------------------------------------------------------------------
# Copyright (c) 2014 Polytechnique Montreal <www.neuro.polymtl.ca>
# Author: Augustin ... | mit | 4,765,003,380,247,198,000 | 40.583333 | 173 | 0.556308 | false | 3.517288 | false | false | false |
andykimpe/chromium-test-npapi | tools/telemetry/telemetry/page/actions/repaint_continuously.py | 8 | 1481 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import time
from telemetry.page.actions import page_action
class RepaintContinuouslyAction(page_action.PageAction):
""" Continuously repaints the visible... | bsd-3-clause | 3,875,948,258,636,553,000 | 36.025 | 80 | 0.681972 | false | 3.807198 | false | false | false |
rapidpro/tracpro | tracpro/contacts/migrations/0015_auto_20170307_1338.py | 1 | 1034 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('contacts', '0014_auto_20170210_1659'),
]
operations = [
migrations.AlterField(
model_name='contact',
... | bsd-3-clause | -6,078,903,323,623,347,000 | 34.655172 | 169 | 0.609284 | false | 4.362869 | false | false | false |
indradhanush/U1DB-ZeroMQ-Transport | zmq_transport/tests/test_server.py | 1 | 5505 | # # System Imports
# import unittest
# import mock
# from mock import patch
# # ZeroMQ Imports
# import zmq
# from zmq.eventloop.ioloop import IOLoop
# # Local Imports
# import zmq_transport
# from zmq_transport.server.zmq_server import (
# ServerSocket,
# ApplicationHandler,
# ClientHandler,
# Publis... | gpl-2.0 | 6,322,063,380,592,175,000 | 31.767857 | 80 | 0.597275 | false | 3.560802 | true | false | false |
midvik/versionparser | main.py | 1 | 8709 | # -*- coding: utf-8 -*-
import requests
import sqlite3
from distutils.version import LooseVersion
import re
from bs4 import BeautifulSoup
import click
from tqdm import tqdm
import dominate
from dominate.tags import *
PORTAL_NAME = 'http://soft.mydiv.net'
DOWNLOAD_COM_SEARCH = 'http://download.cnet.com/1770-20_4-0.ht... | gpl-2.0 | -2,215,543,210,756,732,400 | 34.104839 | 132 | 0.568229 | false | 3.955475 | false | false | false |
liangjg/openmc | openmc/deplete/results_list.py | 2 | 6005 | import h5py
import numpy as np
from .results import Results, VERSION_RESULTS
from openmc.checkvalue import check_filetype_version, check_value
__all__ = ["ResultsList"]
class ResultsList(list):
"""A list of openmc.deplete.Results objects
It is recommended to use :meth:`from_hdf5` over
direct creation.... | mit | -7,802,270,205,093,695,000 | 29.953608 | 79 | 0.549875 | false | 4.225897 | false | false | false |
gion86/awlsim | awlsim/core/instructions/insn_ssd.py | 2 | 1673 | # -*- coding: utf-8 -*-
#
# AWL simulator - instructions
#
# Copyright 2012-2014 Michael Buesch <m@bues.ch>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
... | gpl-2.0 | 2,685,739,630,047,624,700 | 29.981481 | 82 | 0.711895 | false | 3.036298 | false | false | false |
PrincetonML/SIF | examples/sim_sif.py | 1 | 1983 | import pickle, sys
sys.path.append('../src')
import data_io, sim_algo, eval, params
## run
wordfiles = [#'../data/paragram_sl999_small.txt', # need to download it from John Wieting's github (https://github.com/jwieting/iclr2016)
'../data/glove.840B.300d.txt' # need to download it first
]
weightfile ... | mit | -3,068,620,019,999,747,000 | 41.108696 | 137 | 0.644478 | false | 3.12776 | false | false | false |
williballenthin/viv-utils | viv_utils/scripts/get_function_args.py | 1 | 1884 | import pprint
import logging
import viv_utils
import viv_utils.emulator_drivers
g_pp = pprint.PrettyPrinter()
class CallArgumentMonitor(viv_utils.emulator_drivers.Monitor):
""" collect call arguments to a target function during emulation """
def __init__(self, vw, target_fva):
""" :param target_fva... | apache-2.0 | -8,768,602,732,891,916,000 | 25.535211 | 97 | 0.644904 | false | 3.463235 | false | false | false |
Legilibre/SedLex | sedlex/template/__init__.py | 1 | 1464 | import jinja2
import os
import shutil
_ROOT = os.path.abspath(os.path.dirname(__file__))
def template_string(template, values):
template = os.path.join(_ROOT, template)
f = open(template, 'r')
e = jinja2.Environment(
loader=jinja2.FileSystemLoader(os.path.dirname(template))
)
t = e.from_st... | agpl-3.0 | 8,459,923,865,238,287,000 | 29.5 | 65 | 0.571038 | false | 3.412587 | false | false | false |
qiang437587687/pythonBrother | Borther/ReStartLearn/XPathLearn.py | 1 | 2575 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
tip : 1. // 定位根节点
tip : 2. / 往下层寻找
tip : 3. /text() 提取文本内容 其实就是把其中的内容转换为 str
tip : 4. /@xxx 提取属性内容
"""
from lxml import etree
import re
import requests
import logging
import json
logging.basicConfig(level=logging.INFO)
# import sys
# reload(sys)
# sys... | mit | 8,156,506,987,589,587,000 | 18.922414 | 113 | 0.578105 | false | 2.24587 | false | false | false |
hnu2013wwj/DHCodes | RandomizedAlgorithm/sim_hash.py | 2 | 1486 |
# coding:utf-8
# http://blog.csdn.net/sdj222555/article/details/7970466
class SimHash:
def __init__(self, tokens='', bits=128):
self.bits = bits
self.hash = self.simhash(tokens)
def __str__(self):
return str(self.hash)
def simhash(self, tokens):
v = [0] * self.bits
... | gpl-2.0 | 4,784,423,877,193,440,000 | 22.587302 | 61 | 0.419919 | false | 3.752525 | false | false | false |
juhaj/topics-python-in-research | codes/python/h5py_write_example.py | 1 | 2416 | import numpy
import h5py
import os
import tempfile
import cProfile
import pstats
def h5py_create(filename, datadict, compression):
'''Create a new HDF5 file called "filename" and save the values of "datadict" into it using its keys as
the dataset names; create an attribute called "compression" holding the valu... | gpl-3.0 | 3,002,537,640,296,865,000 | 36.75 | 112 | 0.659768 | false | 3.15817 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.