repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
WheatonCS/Lexos | test/unit_test/test_topword_model.py | 1 | 9035 | import numpy as np
import pandas as pd
from lexos.helpers.error_messages import SEG_NON_POSITIVE_MESSAGE, \
EMPTY_DTM_MESSAGE
from lexos.models.top_words_model import TopwordModel, TopwordTestOptions
from lexos.receivers.top_words_receiver import TopwordAnalysisType
# ---------------------------- Test for z-test ... | mit | -2,178,405,275,430,176,300 | 40.444954 | 78 | 0.57399 | false | 3.255856 | true | false | false |
bjohare/comap | routes/migrations/0001_initial.py | 1 | 1924 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
import django.contrib.gis.db.models.fields
class Migration(migrations.Migration):
dependencies = [
('auth', '0006_require_contenttypes_0002'),
migrations.swap... | gpl-3.0 | -3,934,772,199,248,944,000 | 38.265306 | 100 | 0.548337 | false | 4.402746 | false | false | false |
illwieckz/Urcheon | Urcheon/Bsp.py | 1 | 28141 | #! /usr/bin/env python3
#-*- coding: UTF-8 -*-
### Legal
#
# Author: Thomas DEBESSE <dev@illwieckz.net>
# License: ISC
#
from Urcheon import Ui
import __main__ as m
import argparse
import glob
import json
import logging
import os
import struct
import sys
from collections import OrderedDict
from logging import debug
... | isc | -5,190,399,393,648,954,000 | 29.255914 | 171 | 0.66842 | false | 2.717335 | false | false | false |
CubicERP/odoo | addons/account/report/account_invoice_report.py | 1 | 13010 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | 7,879,452,694,959,805,000 | 54.598291 | 200 | 0.556418 | false | 3.926954 | false | false | false |
NeCTAR-RC/swift | test/functional/test_account.py | 1 | 33052 | #!/usr/bin/python
# Copyright (c) 2010-2012 OpenStack Foundation
#
# 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 appl... | apache-2.0 | 3,144,785,634,165,491,700 | 38.48865 | 79 | 0.567439 | false | 3.905932 | true | false | false |
wevoice/wesub | apps/subtitles/pipeline.py | 1 | 24064 | # -*- coding: utf-8 -*-
# Amara, universalsubtitles.org
#
# Copyright (C) 2013 Participatory Culture Foundation
#
# 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 Foundation, either version 3 of the
#... | agpl-3.0 | -8,801,410,346,488,272,000 | 39.855688 | 95 | 0.651513 | false | 4.371299 | false | false | false |
enigmampc/catalyst | tests/utils/test_sentinel.py | 1 | 1394 | from copy import copy, deepcopy
from pickle import loads, dumps
from unittest import TestCase
from weakref import ref
from catalyst.utils.sentinel import sentinel
class SentinelTestCase(TestCase):
def tearDown(self):
sentinel._cache.clear() # don't pollute cache.
def test_name(self):
self.a... | apache-2.0 | 825,212,282,698,194,700 | 24.814815 | 57 | 0.584648 | false | 3.767568 | true | false | false |
BryanQuigley/sos | sos/report/plugins/ebpf.py | 1 | 3330 | # This file is part of the sos project: https://github.com/sosreport/sos
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# version 2 of the GNU General Public License.
#
# See the LICENSE file in the source distribution ... | gpl-2.0 | -5,323,800,136,664,238,000 | 38.176471 | 79 | 0.57027 | false | 3.885648 | false | false | false |
bgris/ODL_bgris | lib/python3.5/site-packages/spyder/utils/introspection/rope_plugin.py | 1 | 10936 | # -*- coding: utf-8 -*-
#
# Copyright © Spyder Project Contributors
# Licensed under the terms of the MIT License
# (see spyder/__init__.py for details)
"""
Rope introspection plugin
"""
import time
import imp
from spyder.config.base import get_conf_path, STDERR
from spyder.utils import encoding, progr... | gpl-3.0 | 657,168,870,950,388,400 | 36.639576 | 79 | 0.52931 | false | 4.349642 | false | false | false |
schwobaseggl/accessor | accessor/accessors.py | 1 | 2304 | # -*- coding: utf-8 -*-
from operator import itemgetter, attrgetter
from accessor.exceptions import ResolverException
from accessor.utils import indexgetter
class Accessor(object):
"""
Utility to resolve path on an object. Example:
> obj = [{'a': 'abc'}, 1]
> a = Accessor('0.a.upper')
> a.re... | mit | -366,590,921,044,994,560 | 25.181818 | 98 | 0.56684 | false | 4.290503 | false | false | false |
dpa-newslab/livebridge | livebridge/storages/dynamo.py | 1 | 14394 | # -*- coding: utf-8 -*-
#
# Copyright 2016 dpa-infocom GmbH
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | apache-2.0 | 3,861,242,784,049,790,000 | 42.225225 | 116 | 0.529665 | false | 4.243514 | false | false | false |
OzzieIsaacs/calibre-web | build/translate.py | 1 | 3781 | # #!/usr/bin/env python
# # -*- coding: utf-8 -*-
import subprocess
import sys
import glob, os
import shutil
import cPickle
import babel.messages.pofile as pofile
# Path to calibre-web location with -> location of mo files
FILEPATH="D:\\Desktop\\calibre-web\\"
with open('iso639.pickle', 'rb') as f:
need_iso = cP... | gpl-3.0 | 1,726,675,868,020,497,000 | 40.549451 | 187 | 0.685533 | false | 3.500926 | false | false | false |
fbessho/python-sybase | setup.py | 1 | 9641 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2001 by Object Craft P/L, Melbourne, Australia.
#
# LICENCE - see LICENCE file distributed with this software for details.
#
# To use:
# python setup.py install
#
"""Sybase module for Python
The Sybase module provides a Python interface to the Sybase r... | bsd-3-clause | 4,464,984,874,323,361,300 | 33.805054 | 100 | 0.57577 | false | 3.411536 | false | false | false |
tensorflow/tensor2tensor | tensor2tensor/data_generators/wikisum/wikisum.py | 1 | 19245 | # coding=utf-8
# Copyright 2021 The Tensor2Tensor Authors.
#
# 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 | -5,422,714,796,419,032,000 | 33.551167 | 80 | 0.657573 | false | 3.484519 | false | false | false |
edison-moreland/Tessellation-Station | tessellation_station/command_line.py | 1 | 3017 | from ast import literal_eval
class Error(Exception):
def __init__(self, message):
self.message = message
class CLI(object):
def __init__(self):
self.transformations = []
self.configurations = []
self.controls = []
self.loop = []
self.capture_loop = False
... | mit | -7,688,398,205,640,226,000 | 28.009615 | 103 | 0.522042 | false | 4.986777 | true | false | false |
mcallaghan/tmv | BasicBrowser/scoping/management/commands/update_keywords.py | 1 | 1561 | from django.core.management.base import BaseCommand, CommandError
from scoping.models import *
import re, nltk
from nltk.stem import SnowballStemmer
class Command(BaseCommand):
help = 'update kwps'
def add_arguments(self, parser):
parser.add_argument('--qid',type=int, default=0)
def handle(self,... | gpl-3.0 | -2,028,341,769,332,358,100 | 30.22 | 66 | 0.444587 | false | 4.151596 | false | false | false |
drhagen/scipy_ode | scipy_ode/__init__.py | 1 | 3770 | """
=============================================
Integration and ODEs (:mod:`scipy.integrate`)
=============================================
.. currentmodule:: scipy.integrate
Integrating functions, given function object
============================================
.. autosummary::
:toctree: generated/
quad ... | bsd-3-clause | -986,299,096,486,560,000 | 35.25 | 78 | 0.66366 | false | 4.198218 | false | false | false |
onepercentclub/django-sepa | sepa/sepa.py | 1 | 12847 | # Based on: https://github.com/digitick/php-sepa-xml
# This app will take information for several payments and create a SEPA xml file for internet banking.
# It takes specifics for Rabobank (The Netherlands)
# https://www.rabobank.com/en/images/SEPA%20Credit%20Transfer%20format%20description%20v1.0.pdf
import decimal
... | mit | -8,038,884,051,787,556,000 | 27.297357 | 106 | 0.548377 | false | 3.900121 | false | false | false |
tmerrick1/spack | var/spack/repos/builtin/packages/openspeedshop-utils/package.py | 1 | 14876 | ##############################################################################
# Copyright (c) 2013-2018, 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 | 5,815,238,906,243,891,000 | 41.624642 | 78 | 0.614749 | false | 3.516785 | false | false | false |
haizi-zh/Chilean | core/oplog_watcher.py | 1 | 4859 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import time
from pymongo.errors import AutoReconnect, OperationFailure
from utils.database import get_mongodb
from abstract_class import BaseWatcher
from core import OPLOG_WATCHER
import pika
import logging
class OplogWatcher(BaseWatcher):
"""
MongoDB oplog.rs Wa... | mit | 5,296,875,058,850,134,000 | 36.291339 | 110 | 0.48849 | false | 3.989048 | false | false | false |
sunnyelf/cheetah | cheetah.py | 1 | 22333 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Cheetah is a dictionary-based webshell password violent cracker
that runs like a cheetah hunt for prey as swift and violent.
Cheetah's working principle is that it can submit a large number
of detection passwords based on different web services at once,
bla... | gpl-3.0 | -6,054,936,873,131,986,000 | 38.828154 | 114 | 0.53862 | false | 3.889411 | false | false | false |
savi-dev/quantum | quantum/plugins/ryu/common/config.py | 1 | 1388 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Red Hat, 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
#
#... | apache-2.0 | -5,678,480,904,733,669,000 | 31.27907 | 78 | 0.693084 | false | 3.513924 | false | false | false |
digling/sinotibetan | datasets/TBL/import.py | 1 | 3518 | # author : Johann-Mattis List
# email : mattis.list@uni-marburg.de
# created : 2015-04-27 13:03
# modified : 2015-04-27 13:03
"""
import new data (TBL)
"""
__author__="Johann-Mattis List"
__date__="2015-04-27"
from lingpy import *
from lingpyd.plugins.lpserver.lexibase import LexiBase,load_sqlite
changes = dic... | gpl-2.0 | 1,753,425,669,453,039,900 | 28.563025 | 80 | 0.59892 | false | 2.579179 | false | false | false |
ashokpsg/apiai-weather-webhook-sample | app.py | 1 | 3046 | #!/usr/bin/env python
import urllib
import json
import os
import sys
from flask import Flask
from flask import request
from flask import make_response
# Flask app should start in global layout
app = Flask(__name__)
@app.route('/webhook', methods=['POST'])
def webhook():
req = request.get_json(silent=True, forc... | apache-2.0 | 3,322,779,132,360,774,700 | 23.174603 | 118 | 0.599146 | false | 3.422472 | false | false | false |
zafarali/emdp | tests/test_chain_MDP.py | 1 | 1393 | from emdp import build_chain_MDP
import numpy as np
def test_build_chain_MDP():
mdp = build_chain_MDP(n_states=3, starting_distribution=np.array([0, 0, 1]),
terminal_states=[0], reward_spec=[(1, 0, +5)], p_success=0.9)
"""
this MDP looks like this:
[ 0 ] --> [ 0 ] with probabi... | mit | -5,542,290,806,926,931,000 | 59.565217 | 134 | 0.615937 | false | 3.008639 | false | false | false |
steveb/heat | heat/engine/hot/functions.py | 1 | 27032 | #
# 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 | 9,040,869,011,473,077,000 | 32.959799 | 79 | 0.531296 | false | 4.40835 | false | false | false |
zaccone/pyadfsclient | adfs.py | 1 | 9572 | import datetime
import string
import urllib2
import uuid
import requests
from lxml import etree
class ADFSClient(object):
HEADER_SOAP = {"Content-Type": "application/soap+xml; charset=utf-8"}
HEADER_X_FORM = {"Content-Type": "application/x-www-form-urlencoded"}
ASSERTION_NAMESPACES = {
's': 'http... | mit | -3,973,313,951,088,651,000 | 36.833992 | 79 | 0.579921 | false | 3.574309 | false | false | false |
boxu0001/practice | py3/dynamicProgramming/S5_ManacherAlgo.py | 1 | 1679 | # Given a string s, find the longest palindromic substring in s. You may assume that the maximum length of s is 1000.
# Example:
# Input: "babad"
# Output: "bab"
# Note: "aba" is also a valid answer.
# Example:
# Input: "cbbd"
# Output: "bb"
#Manacher's Algo
class Solution:
def longestPalindrome(self, s):
... | gpl-3.0 | -169,681,256,529,589,700 | 28.982143 | 117 | 0.466945 | false | 3.097786 | false | false | false |
marscher/PyEMMA | pyemma/coordinates/transform/tica.py | 1 | 11462 | # This file is part of PyEMMA.
#
# Copyright (c) 2015, 2014 Computational Molecular Biology Group, Freie Universitaet Berlin (GER)
#
# PyEMMA 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 versi... | lgpl-3.0 | -3,940,986,915,072,458,000 | 46.560166 | 139 | 0.627203 | false | 3.917293 | false | false | false |
kevinaloys/airpy | airpy/install.py | 1 | 1219 | import os
import requests
import zipfile
import click
import io
import airpy
import simplejson as json
from airpy import utils
def install_metadata(name):
directory = airpy.data_directory + '/' + name
metadata_response = requests.get('https://pypi.python.org/pypi/'+ name + '/json')
if metadata_response.status_cod... | mit | 7,066,963,502,790,274,000 | 26.727273 | 99 | 0.695652 | false | 3.414566 | false | false | false |
IBM-Security/ibmsecurity | ibmsecurity/isam/web/runtime/federated_directories/suffix.py | 1 | 2895 | import logging
import ibmsecurity.utilities.tools
logger = logging.getLogger(__name__)
def get(isamAppliance, directory_name, check_mode=False, force=False):
"""
Retrieving the list of suffixes for a particular federated directory
"""
return isamAppliance.invoke_get("Retrieving the list of suffixes f... | apache-2.0 | 8,466,255,597,332,144,000 | 34.740741 | 119 | 0.639033 | false | 3.982118 | false | false | false |
casanovainformationservices/LazyLibrarian | lib/apscheduler/jobstores/sqlalchemy_store.py | 1 | 3135 | """
Stores jobs in a database table using SQLAlchemy.
"""
import pickle
import logging
from lib.apscheduler.jobstores.base import JobStore
from lib.apscheduler.job import Job
try:
from sqlalchemy import *
except ImportError: # pragma: nocover
raise ImportError('SQLAlchemyJobStore requires SQLAlchemy installe... | gpl-3.0 | -7,027,673,187,408,794,000 | 35.034483 | 77 | 0.57512 | false | 4.060881 | false | false | false |
Kha/odie-server | routes/accounting.py | 1 | 1757 | #! /usr/bin/env python3
import db.accounting
from .common import IdSchema, CashBoxField
from marshmallow import Schema, fields
from odie import sqla
from login import get_user, login_required
from api_utils import deserialize, api_route, ClientError
from db.documents import Deposit, Document
class ErroneousSaleLoa... | mit | -1,078,629,200,508,396,400 | 27.33871 | 82 | 0.705748 | false | 3.302632 | false | false | false |
anth0/nnplus | misc/update_scripts/update.py | 1 | 1977 | #!/usr/bin/env python
# Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://www.newznab.com/
#
# This file is part of Newznab
#
# Newznab 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 | -7,422,745,014,853,515,000 | 32.508475 | 98 | 0.738493 | false | 3.311558 | false | false | false |
balanced-ops/infra-kafka | formation/kafka.py | 1 | 1410 | #!/usr/bin/env python
from confu import atlas
from troposphere import (
Template, FindInMap, GetAtt, Ref, Parameter, Join, Base64, Select, Output,
ec2 as ec2
)
template = Template()
template.add_description('kafka')
atlas.infra_params(template) # ssh_key, Env, Silo
atlas.conf_params(template) # Conf Nam... | mit | 3,653,141,776,570,159,000 | 20.692308 | 78 | 0.653191 | false | 3.211845 | false | false | false |
Intel-Corporation/tensorflow | tensorflow/python/ops/nn_grad.py | 1 | 37589 | # Copyright 2015 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 | -4,054,416,086,370,532,000 | 32.772686 | 80 | 0.634361 | false | 3.336795 | false | false | false |
nutils/nutils | examples/platewithhole.py | 1 | 5645 | #! /usr/bin/env python3
#
# In this script we solve the linear plane strain elasticity problem for an
# infinite plate with a circular hole under tension. We do this by placing the
# circle in the origin of a unit square, imposing symmetry conditions on the
# left and bottom, and Dirichlet conditions constraining the d... | mit | -1,045,651,754,385,288,000 | 49.383929 | 122 | 0.717172 | false | 2.555707 | true | false | false |
bearing/dosenet-analysis | D3S_analysis/spectra_fitting_tools.py | 1 | 9343 | import numpy as np
from scipy import optimize
from scipy import asarray as ar,exp
from scipy.integrate import quad
import matplotlib.pyplot as plt
verbose = 0
#--------------------------------------------------------------------------#
# Fit Functions
#-------------------------------------------------------... | mit | -3,725,644,255,845,759,000 | 32.603704 | 118 | 0.569945 | false | 3.22506 | false | false | false |
kev-ss/SSPT | ephem-3.7.6.0/setup.py | 1 | 2117 | import os
from distutils.core import setup, Extension
from glob import glob
# Read the current version from ephem/__init__.py itself.
path = os.path.join(os.path.dirname(__file__), 'ephem', '__init__.py')
for line in open(path):
if line.startswith('__version__'):
__version__ = eval(line.split(None, 2)[2])... | gpl-2.0 | 4,993,327,479,694,074,000 | 35.5 | 76 | 0.564006 | false | 3.753546 | false | false | false |
Mapita/mapita_ci | mapita/mapita_ci/management/commands/syncdb_test.py | 1 | 1989 | from django.conf import settings
from django.core.management.commands import syncdb as django_syncdb
from django.core.management.sql import sql_custom
from django.core.management import call_command
from django.core.management.color import no_style
from django.db import models
from django.db import connections, transac... | mit | 5,195,289,300,096,601,000 | 43.222222 | 96 | 0.605832 | false | 4.459641 | false | false | false |
peter8472/dungeon-run-ls | dungeonrun.py | 1 | 3588 | #! /usr/bin/python
"""Xmlgame: does xmlstuff
jsgame: does js stuff
App: gets clipboard and runs UI
Right now everythign depends on the UI being up and running. This won't always be the case, and isn't necessary.
"""
import Tkinter
import os
import re
from Tkconstants import *
import sys
import json
from xml.dom imp... | apache-2.0 | 1,777,711,092,362,866,000 | 25.977444 | 113 | 0.625418 | false | 3.136364 | false | false | false |
hanteng/pyCountryGroup | pyCountryGroup/data/__init__.py | 1 | 2056 | # -*- coding: utf-8 -*-
#歧視無邊,回頭是岸。鍵起鍵落,情真情幻。
from __future__ import (absolute_import, division, print_function,
unicode_literals)
import pandas as pd
import os
__all__ = ["iso","iso2","ison","wb_cname","un_cname",\
"wb_r_long","un_r_long", "un_r_long_detail", "wb_region", "un_region... | gpl-3.0 | 4,161,789,342,414,068,000 | 36.962264 | 82 | 0.629225 | false | 2.733696 | false | false | false |
malaonline/Server | server/app/migrations/0161_schoolmaster.py | 1 | 1028 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-09-05 08:50
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... | mit | -7,709,143,905,819,381,000 | 33.266667 | 132 | 0.603113 | false | 4.063241 | false | false | false |
pchmieli/h2o-3 | h2o-py/tests/testdir_algos/gbm/pyunit_DEPRECATED_offset_gaussianGBM.py | 1 | 1830 | import sys
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
def offset_gaussian():
# Connect to a pre-existing cluster
insurance = h2o.import_file(pyunit_utils.locate("smalldata/glm_test/insurance.csv"))
insurance["offset"] = insurance["Holders"].log()
gbm = h2o.gbm(x... | apache-2.0 | -8,684,211,034,897,369,000 | 41.55814 | 120 | 0.631148 | false | 3.034826 | false | false | false |
amjames/psi4 | psi4/driver/qcdb/util/scipy_hungarian.py | 1 | 10333 | # [Apr 2018] stolen directly from scipy so I can get an array back
# https://github.com/scipy/scipy/blob/master/scipy/optimize/_hungarian.py
# Hungarian algorithm (Kuhn-Munkres) for solving the linear sum assignment
# problem. Taken from scikit-learn. Based on original code by Brian Clapper,
# adapted to NumPy by Ga... | lgpl-3.0 | -293,536,159,332,678,000 | 34.146259 | 81 | 0.618988 | false | 3.589093 | false | false | false |
xuhdev/nikola | scripts/jinjify.py | 1 | 9689 | #!/usr/bin/env python
"""Script to convert templates from Mako to Jinja2."""
import io
import glob
import sys
import os
import re
import json
import shutil
import tempfile
import colorama
import jinja2
dumb_replacements = [
["{% if any(post.is_mathjax for post in posts) %}", '{% if posts|selectattr("is_mathjax")... | mit | -3,567,311,414,146,262,500 | 35.700758 | 106 | 0.558056 | false | 3.163239 | false | false | false |
aryrobocode/apothecary | apothecary/cs/ds/disjoint_set.py | 1 | 4291 | class DJset:
def __init__(self, size, start = 0):
"""
Creates a new disjoint set data structure
Args:
start: The starting index for all elements (e.g. 0 or 1)
size: The number of elements to be considered (i.e. last index)
Operations:
find: Finds the representative of the group the element belongs ... | mit | 285,275,668,632,747,780 | 24.547619 | 89 | 0.669075 | false | 3.155147 | false | false | false |
toumorokoshi/miura | miura/data.py | 1 | 2224 | import os
import re
import yaml
from .exceptions import MiuraException
import logging
logger = logging.getLogger(__name__)
def load_data_from_path(path):
file_paths = load_file_or_directory(path)
return retrieve_data(file_paths)
def load_file_or_directory(path):
"""
given a path, determine if the p... | mit | -9,030,993,943,274,022,000 | 31.231884 | 82 | 0.582284 | false | 4.028986 | false | false | false |
georgesterpu/pyVSR | pyVSR/Features/roi.py | 1 | 9014 | from .feature import Feature
from urllib import request
import os
import cv2
import dlib
import numpy as np
from .. import utils
class ROIFeature(Feature):
r"""
Mouth ROI Extraction pipeline using OpenCV and dlib
Similar functionality, but without facial alignment, exists in DCTFeature. It will
soon ... | gpl-3.0 | -8,871,520,345,047,346,000 | 34.34902 | 118 | 0.59929 | false | 3.62008 | false | false | false |
safwanrahman/mozillians | mozillians/groups/api/v2.py | 1 | 3872 | from django.shortcuts import get_object_or_404
import django_filters
from funfactory.urlresolvers import reverse
from rest_framework import viewsets, serializers
from rest_framework.response import Response
from mozillians.common.helpers import absolutify
from mozillians.groups.models import Group, GroupMembership, S... | bsd-3-clause | 8,867,633,374,129,686,000 | 31.537815 | 93 | 0.673037 | false | 4.088701 | false | false | false |
freevo/freevo1 | src/skins/main/textentry_area.py | 1 | 3760 | # -*- coding: iso-8859-1 -*-
# -----------------------------------------------------------------------
# scrollabletext_area.py - A scrollable text area for the Freevo skin
# -----------------------------------------------------------------------
# $Id$
#
# Notes:
# Todo:
#
# -------------------------------------------... | gpl-2.0 | 3,474,443,716,475,095,000 | 31.136752 | 111 | 0.561702 | false | 4.113786 | false | false | false |
KarateJB/Python.Practice | src/TensorFlow/venv/Lab/Tutorials/Sample/LinearRegression_tb.py | 1 | 2301 | """Linear Regression
https://brohrer.mcknote.com/zh-Hant/how_machine_learning_works/how_linear_regression_works.html
"""
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
# Parameters
learning_rate = 0.2
training_epochs = 201
display_step = 20
# Create 100 training data
train_X = np.random.r... | mit | 6,974,094,202,091,287,000 | 30.094595 | 95 | 0.633203 | false | 3.182573 | false | false | false |
kalkin/qubes-core-admin | qubes/devices.py | 1 | 17113 | #
# The Qubes OS Project, https://www.qubes-os.org/
#
# Copyright (C) 2010-2016 Joanna Rutkowska <joanna@invisiblethingslab.com>
# Copyright (C) 2015-2016 Wojtek Porczyk <woju@invisiblethingslab.com>
# Copyright (C) 2016 Bahtiar `kalkin-` Gadimov <bahtiar@gadimov.de>
#
# This program is free software; you can r... | gpl-2.0 | -1,120,786,019,905,310,100 | 34.87631 | 79 | 0.626191 | false | 4.372253 | false | false | false |
andrasfuchs/BioBalanceDetector | Measurements/WaveForms/Experiments/SleepLogging/python/AnalogOut_Sine.py | 1 | 1355 | """
DWF Python Example
Author: Digilent, Inc.
Revision: 2018-07-19
Requires:
Python 2.7, 3
"""
from ctypes import *
import time
from dwfconstants import *
import sys
if sys.platform.startswith("win"):
dwf = cdll.dwf
elif sys.platform.startswith("darwin"):
dwf = cdl... | gpl-3.0 | 3,638,763,380,392,265,000 | 26.653061 | 87 | 0.727675 | false | 2.817048 | false | true | false |
6809/DwLoadServer | dwload_server/utils/file_tools.py | 1 | 2410 | # encoding:utf-8
"""
DwLoadServer - A DWLOAD server written in Python
================================================
:created: 2014 by Jens Diemer - www.jensdiemer.de
:copyleft: 2014 by the DwLoadServer team, see AUTHORS for more details.
:license: GNU GPL v3 or above, see LICENSE for more detai... | gpl-3.0 | 1,362,518,961,651,157,200 | 26.397727 | 87 | 0.604979 | false | 3.719136 | false | false | false |
blueboxgroup/nova | nova/utils.py | 1 | 40394 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2011 Justin Santa Barbara
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance wi... | apache-2.0 | -4,700,980,457,302,506,000 | 31.84065 | 79 | 0.599025 | false | 3.988743 | false | false | false |
Drapegnik/bsu | numerical-analysis/sem4/lab2/scripts.py | 1 | 1076 | A = -2.0
B = 2.0
eps = [0.5 * pow(10, -1 * i) for i in range(3, 8, 2)]
def f(x):
return float(x * (3 ** x + 1) ** (-1))
def rect(h):
int_sum = 0
x = A + h / 2.0
while x < B:
int_sum += f(x)
x += h
return h * int_sum
def trap(h):
int_sum = 0
x = A
while x < B:
... | mit | 1,965,298,469,731,756,500 | 19.301887 | 95 | 0.412639 | false | 2.428894 | false | false | false |
chazy/reviewboard | reviewboard/__init__.py | 1 | 2020 | # The version of Review Board.
#
# This is in the format of:
#
# (Major, Minor, Micro, Patch, alpha/beta/rc/final, Release Number, Released)
#
VERSION = (1, 6, 0, 0, 'final', 0, True)
def get_version_string():
version = '%s.%s' % (VERSION[0], VERSION[1])
if VERSION[2]:
version += ".%s" % VERSION[2]... | mit | 773,339,143,353,341,300 | 22.764706 | 79 | 0.60396 | false | 3.613596 | false | false | false |
supertree-toolkit/stk | stk/scripts/tree_from_taxonomy.py | 1 | 5734 | # trees ready for supretree construction.
# Copyright (C) 2015, Jon Hill, Katie Davis
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (a... | gpl-3.0 | 3,513,212,164,983,585,300 | 33.542169 | 256 | 0.509766 | false | 4.081139 | false | false | false |
homeworkprod/chatrelater | src/chatrelater/visualization.py | 1 | 1866 | """
chatrelater.visualization
~~~~~~~~~~~~~~~~~~~~~~~~~
Visualize relations between chat partners using GraphViz_ (has to be
installed).
.. _GraphViz: http://www.graphviz.org/
:Copyright: 2007-2021 Jochen Kupperschmidt
:License: MIT, see LICENSE for details.
"""
import math
from typing import List, Tuple
from grap... | mit | 2,838,336,131,534,534,700 | 22.923077 | 81 | 0.642551 | false | 3.455556 | false | false | false |
openstack/python-neutronclient | neutronclient/osc/v2/vpnaas/ikepolicy.py | 1 | 9098 | # Copyright 2017 FUJITSU LIMITED
# 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 req... | apache-2.0 | -2,731,209,515,089,461,000 | 36.286885 | 78 | 0.612003 | false | 3.876438 | false | false | false |
hzlf/openbroadcast | website/apps/alibrary/middleware/object_linker.py | 1 | 4611 | import re
from django.conf import settings
from django.db.models.loading import get_model
from django.core.cache import cache
from django.utils.safestring import mark_safe
class ObjectLinkerMiddleware(object):
def process_response(self, request, response):
print response['Conte... | gpl-3.0 | 6,399,902,080,093,638,000 | 27.288344 | 141 | 0.563435 | false | 4.02356 | false | false | false |
pescobar/easybuild-easyblocks | easybuild/easyblocks/generic/bundle.py | 1 | 11293 | ##
# Copyright 2009-2019 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (F... | gpl-2.0 | 4,453,393,424,235,920,000 | 43.992032 | 119 | 0.604002 | false | 4.181044 | true | false | false |
FreshXOpenSource/wallaby-frontend-qt | wallaby/frontends/qt/plugins/datetimeeditplugin.py | 1 | 1683 | # Copyright (c) by it's authors.
# Some rights reserved. See LICENSE, AUTHORS.
import wallaby.FXUI as FXUI
from wallaby.qt_combat import *
from wallaby.frontends.qt.widgets.edits.dateTimeEdit import DateTimeEdit
#============================================================================#
# The group name in desi... | bsd-2-clause | 7,495,198,909,785,957,000 | 28.017241 | 79 | 0.496732 | false | 4.701117 | false | false | false |
bat-serjo/vivisect | vstruct/cparse.py | 3 | 5364 | from pycparser import c_parser
import pycparser.c_ast as c_ast
import vstruct
import vstruct.primitives as vs_prim
class StructParser:
def __init__(self, psize=4, bigend=False):
self.psize = psize
self.pclass = vs_prim.v_ptr32
self.cls_parsers = {
c_ast.Decl: sel... | apache-2.0 | -1,098,476,479,139,844,100 | 29.651429 | 76 | 0.527778 | false | 3.499022 | false | false | false |
mfnch/pyrtist | pyrtist/gui/srcview.py | 1 | 4813 | # Copyright (C) 2011 Matteo Franchin
#
# This file is part of Pyrtist.
#
# Pyrtist 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) any la... | lgpl-2.1 | -547,014,662,898,154,300 | 33.625899 | 79 | 0.666528 | false | 3.212951 | false | false | false |
PNJenkinson/emicroblog | app/forms.py | 1 | 1508 | from flask_wtf import Form
from flask_babel import gettext
from wtforms import StringField, BooleanField, TextAreaField
from wtforms.validators import DataRequired, Length
from .models import User
class LoginForm(Form):
openid = StringField('openid', validators=[DataRequired()])
remember_me = BooleanField('re... | bsd-3-clause | -8,724,458,139,495,668,000 | 34.069767 | 78 | 0.649867 | false | 4.396501 | false | false | false |
ArthurChiao/code-snippets | python/turtleshell.py | 1 | 2878 | """
Example code from python doc:
https://docs.python.org/3.3/library/cmd.html
The Cmd class provides a simple framework for writing line-oriented command
interpreters. These are often useful for test harnesses, administrative tools,
and prototypes that will later be wrapped in a more sophisticated interface.
"""
imp... | mit | -8,552,807,441,469,732,000 | 34.097561 | 86 | 0.61501 | false | 3.713548 | false | false | false |
sjaa/scheduler | membership/config-example.py | 1 | 1338 | from enum import Enum, unique
TEST_EMAIL_MODE = 'print' # 'test email'
TEST_EMAIL_ADDR = 'Membership Chair <me@mail.com>'
@unique
class MembershipStatus(Enum):
expired = 0 # 'expired' must be < 'expiring'
expiring = 10
active = 11
admin = 100
coordator = 200
CHOICES_MEM_... | gpl-3.0 | 8,368,260,173,327,536,000 | 22.892857 | 105 | 0.655456 | false | 2.908696 | false | false | false |
jingzhehu/udacity_sdcnd | term1/P3_behavior_cloning/live_trainer.py | 1 | 12049 | """
Live trainer script for Udacity SDC sim
- Control car with Keras model
- Override with manual control
- Train model during manual control
- Record data from simulator
Usage guide
- accelerate/decelerate with "up/down" arrow keys
- navigation with "left/right" arrow keys
- change steering angle to "0" with "c" key
... | apache-2.0 | 1,367,188,065,342,590,700 | 30.791557 | 133 | 0.592414 | false | 3.741925 | false | false | false |
bospetersen/h2o-3 | h2o-py/tests/testdir_algos/glm/pyunit_mean_residual_devianceGLM.py | 1 | 1334 | import sys
sys.path.insert(1,"../../../")
import h2o, tests
def glm_mean_residual_deviance(ip,port):
cars = h2o.import_file(path=h2o.locate("smalldata/junit/cars_20mpg.csv"))
s = cars[0].runif()
train = cars[s > 0.2]
valid = cars[s <= 0.2]
predictors = ["displacement","power","weight","accelerati... | apache-2.0 | 8,200,899,898,499,487,000 | 48.407407 | 122 | 0.570465 | false | 3.368687 | false | false | false |
iksaif/euscan | pym/euscan/version.py | 1 | 3456 | import re
gentoo_unstable = ("alpha", "beta", "pre", "rc")
gentoo_types = ("alpha", "beta", "pre", "rc", "p")
def is_version_type_stable(version_type):
return version_type not in gentoo_unstable
def is_version_stable(version):
return is_version_type_stable(get_version_type(version))
def get_version_type(... | gpl-2.0 | 5,845,581,522,550,137,000 | 37.831461 | 79 | 0.643229 | false | 3.806167 | false | false | false |
ldjebran/robottelo | tests/foreman/cli/test_hammer.py | 2 | 7839 | """Tests related to hammer command and its options and subcommands.
:Requirement: Hammer
:CaseAutomation: Automated
:CaseLevel: Component
:CaseComponent: Hammer
:TestType: Functional
:CaseImportance: High
:Upstream: No
"""
import json
import re
from fauxfactory import gen_string
from robottelo import ssh
from r... | gpl-3.0 | 7,244,868,775,362,183,000 | 35.802817 | 89 | 0.580304 | false | 4.328548 | true | false | false |
smilix/TracMoinMoinAuth | tracmoinmoinauth/moinmoin_auth_by_provider.py | 1 | 2634 | # -*- coding: utf-8 -*-
#
# Get the user data from the https://github.com/smilix/moinAuthProvider action.
# Author: HolgerCremer@gmail.com
import requests
from requests.packages.urllib3 import PoolManager
class MoinMoinAuthByProvider():
def __init__(self, logger, provider_url, psk, ssl_fingerprint, ca_certs, dis... | mit | 8,862,389,650,365,923,000 | 34.12 | 135 | 0.595672 | false | 4.027523 | false | false | false |
icomfort/anaconda | iw/upgrade_bootloader_gui.py | 1 | 7815 | #
# upgrade_bootloader_gui.py: gui bootloader dialog for upgrades
#
# Copyright (C) 2002, 2007 Red Hat, Inc. All rights reserved.
#
# 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 versi... | gpl-2.0 | -1,104,869,317,210,438,500 | 36.392344 | 108 | 0.565963 | false | 4.06185 | true | false | false |
longyangking/Husky | Husky/GA/MultiUtils/Crossover.py | 1 | 8881 | # Author: Yang Long <longyang_123@yeah.net>
#
# License: LGPL-2.1
import numpy as np
def Laplacian(parents,rank,distance,LB,UB,IntCon,args):
'''
Laplacian Crossover Operator (Two parents, Two childs: Son & Girl)
'''
a = 0
breal = 0.5
bint = 0.75
if args.has_key('a'):
a = args['a']
... | lgpl-2.1 | 6,432,612,505,830,202,000 | 28.118033 | 126 | 0.56041 | false | 3.244794 | false | false | false |
decvalts/landlab | landlab/components/gflex/examples/gflex_coupled_driver.py | 1 | 2398 | # -*- coding: utf-8 -*-
"""
A driver for our version of AW's gFlex component.
Created on Fri Feb 20 11:17:52 2015
@author: danhobley
"""
from __future__ import print_function
from landlab.components.gFlex.flexure import gFlex
from landlab.components.flow_routing.route_flow_dn import FlowRouter
from landlab.component... | mit | 8,369,907,553,255,900,000 | 35.333333 | 113 | 0.725605 | false | 2.927961 | false | false | false |
marrow/monitor.collector | marrow/monitor/collector/ext/cpu.py | 1 | 4403 | # encoding: utf-8
import os
import subprocess
import mongoengine as db
try:
from itertools import izip as zip
except ImportError: # pragma: no cover
pass
class CPUDetail(db.EmbeddedDocument):
user = db.FloatField(db_field='u', verbose_name="Userspace Percentage")
nice = db.FloatField(db_field='n',... | mit | 5,991,399,908,975,429,000 | 34.796748 | 121 | 0.537361 | false | 3.147248 | false | false | false |
narusemotoki/awikie | awikie/settings.py | 1 | 1182 | # -*- coding: utf-8 -*-
# awikie -- This is Wiki engine working in Google App Engine.
# Copyright (C) <2013> Motoki Naruse <motoki@naru.se>
#
# 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 So... | agpl-3.0 | -7,708,945,888,221,004,000 | 26.488372 | 77 | 0.696277 | false | 3.466276 | false | false | false |
jwngr/sdow | sdow/database.py | 1 | 9203 | """
Wrapper for reading from and writing to the SDOW database.
"""
import os.path
import sqlite3
import helpers as helpers
from breadth_first_search import breadth_first_search
class Database(object):
"""Wrapper for connecting to the SDOW database."""
def __init__(self, sdow_database, searches_database):
if... | mit | -4,171,180,308,575,806,500 | 35.959839 | 140 | 0.688362 | false | 3.926195 | false | false | false |
szendrei/django-unleashed | suorganizer/blog/migrations/0001_initial.py | 1 | 1238 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-01-21 02:10
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
('organizer', '0001_initial'),
]
operations = [
migration... | gpl-3.0 | 2,204,611,866,440,416,000 | 35.411765 | 124 | 0.550081 | false | 4.16835 | false | false | false |
jialij-pdx/bpe_capstone | dashboard/admin.py | 1 | 2171 | # Bonneville Power Adminstration Front-End
# Copyright (C) 2015 Garrison Jenson, Matei Mitaru
#
# 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 op... | gpl-2.0 | 2,076,370,343,440,777,000 | 32.921875 | 80 | 0.67941 | false | 4.012939 | false | false | false |
synth3tk/the-blue-alliance | models/event.py | 1 | 11392 | from google.appengine.ext import ndb
import datetime
import json
import pytz
import re
from consts.district_type import DistrictType
from consts.event_type import EventType
class Event(ndb.Model):
"""
Events represent FIRST Robotics Competition events, both official and unofficial.
key_name is like '2010... | mit | -7,064,069,696,216,464,000 | 33.00597 | 207 | 0.597876 | false | 3.904044 | false | false | false |
FabricaSocial/sic | sic/auth/views.py | 1 | 2169 | # -*- coding: utf-8 -*-
from django.template import RequestContext
from django.shortcuts import render_to_response, redirect
from django.views.decorators.csrf import ensure_csrf_cookie
from django.contrib.auth.decorators import login_required
from django.contrib.auth import authenticate, login, logout
from django.cor... | gpl-2.0 | 5,723,092,688,333,388,000 | 24.821429 | 66 | 0.642692 | false | 3.633166 | false | false | false |
fabiocaccamo/django-admin-interface | admin_interface/migrations/0001_initial.py | 1 | 7501 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import colorfield.fields
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Theme',
fields=[
('i... | mit | -5,121,611,831,423,216,000 | 39.766304 | 63 | 0.383282 | false | 5.245455 | false | false | false |
Crossbow78/mbsolget | python/mbsolget_p1_a1.py | 1 | 2056 | #
# MBSolget P1 Telegram Catch
# DSMR 4
#
version = "v1.00"
import sys
import os
import stat
import serial
import datetime
import locale
###############################################################################################################
# Main program
####################################################... | gpl-3.0 | -3,780,634,384,614,253,600 | 24.7 | 122 | 0.510214 | false | 2.954023 | false | false | false |
qnib/python-docker-reg | test.py | 1 | 7451 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
"""
Usage:
cli.py [options]
cli.py (-h | --help)
cli.py --version
Options:
--local-url <url> URL of local docker-registry (default: $DOCKER_HOST)
--local-port <int> Port of local docker-registry [default: 5000]
--remote-url <url> URL of re... | apache-2.0 | 7,304,100,943,885,305,000 | 31.537118 | 92 | 0.520064 | false | 3.91334 | true | false | false |
rbuffat/pyidf | tests/test_thermalstorageicedetailed.py | 1 | 4659 | import os
import tempfile
import unittest
import logging
from pyidf import ValidationLevel
import pyidf
from pyidf.idf import IDF
from pyidf.water_heaters_and_thermal_storage import ThermalStorageIceDetailed
log = logging.getLogger(__name__)
class TestThermalStorageIceDetailed(unittest.TestCase):
def setUp(self)... | apache-2.0 | 4,151,299,527,143,488,000 | 48.574468 | 157 | 0.711526 | false | 3.244429 | false | false | false |
wufangjie/leetcode | 634. Find the Derangement of An Array.py | 1 | 1102 | class Solution(object):
def findDerangement(self, n):
"""
:type n: int
:rtype: int
"""
if n < 2:
return 0
p1, p2 = 1, 2
for i in range(4, n + 1):
if i & 1:
p2 = (i - 1) * (p1 + p2) % 1000000007
else:
... | gpl-3.0 | -2,006,659,796,012,118,800 | 27.25641 | 75 | 0.409256 | false | 2.892388 | false | false | false |
mediatum/mediatum | schema/test/test_schema.py | 1 | 1951 | # -*- coding: utf-8 -*-
"""
:copyright: (c) 2014 by the mediaTUM authors
:license: GPL3, see COPYING for details
"""
import schema.schema
from core.test.fixtures import editor_user
def test_filter_masks(content_node_with_mdt):
node = content_node_with_mdt
masks = node.metadatatype.filter_masks().all()
... | gpl-3.0 | -1,315,670,322,769,200,000 | 32.067797 | 105 | 0.656586 | false | 3.230132 | true | false | false |
2ndy/RaspIM | usr/lib/python2.6/distutils/ccompiler.py | 1 | 48809 | """distutils.ccompiler
Contains CCompiler, an abstract base class that defines the interface
for the Distutils compiler abstraction model."""
# This module should be kept compatible with Python 2.1.
__revision__ = "$Id$"
import sys, os, re
from types import *
from copy import copy
from distutils.errors import *
fro... | gpl-2.0 | -3,102,594,236,466,928,000 | 39.947148 | 86 | 0.594317 | false | 4.420705 | false | false | false |
nickthecoder/itchy | resources/Cover-of-Darkness/scripts/guard.py | 1 | 5272 | from common import *
properties = ArrayList()
properties.add( DoubleProperty( "forwardSpeed" ) )
properties.add( DoubleProperty( "turnSpeed" ) )
properties.add( StringProperty( "routeString" ) )
properties.add( BooleanProperty( "debug" ) )
# routeString is a set of parts separated by spaces.
# A part is either a nu... | gpl-3.0 | -537,064,699,696,413,000 | 34.38255 | 114 | 0.569803 | false | 4.147915 | false | false | false |
fajoy/horizon-example | openstack_dashboard/dashboards/project/images_and_snapshots/snapshots/views.py | 1 | 2200 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... | apache-2.0 | 3,185,531,436,873,776,600 | 32.846154 | 78 | 0.67 | false | 4.356436 | false | false | false |
woglinde/osmo-smsc | integration-tests/osmo-smsc-integrationtests.py | 1 | 2884 | # runs integration tests against the osmo-smsc restapi
# Copyright (C) 2016 Henning Heinold <henning@itconsulting-heinold.de>
#
# 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 Foundat... | agpl-3.0 | -3,718,793,537,376,352,000 | 35.05 | 114 | 0.633842 | false | 3.646018 | false | false | false |
ftp2010/svm-de-CAPTCHA | svm.py | 1 | 9550 | #!/usr/bin/env python
from ctypes import *
from ctypes.util import find_library
from os import path
import sys
try:
dirname = path.dirname(path.abspath(__file__))
print dirname
print sys.platform
if sys.platform == 'win32':
libsvm = CDLL(path.join(dirname, r'..\windows\libsvm.dll'))
else:
print path.joi... | gpl-2.0 | 2,175,319,489,963,224,300 | 28.84375 | 122 | 0.639686 | false | 2.655729 | false | false | false |
spudmind/parlparse | pyscraper/patchtool.py | 1 | 4596 | #!/usr/bin/env python
# vim:sw=8:ts=8:et:nowrap
import sys
import os
import shutil
import string
import miscfuncs
import re
import tempfile
import optparse
# change current directory to pyscraper folder script is in
os.chdir(os.path.dirname(sys.argv[0]) or '.')
from resolvemembernames import memberList
toppath = mis... | agpl-3.0 | -4,639,347,042,262,529,000 | 27.37037 | 88 | 0.683203 | false | 2.844059 | false | false | false |
mackst/vulkan-tutorial | 09_shader_modules.py | 1 | 17105 | # -*- coding: UTF-8 -*-
import sys
from vulkan import *
from PySide2 import (QtGui, QtCore)
validationLayers = [
'VK_LAYER_LUNARG_standard_validation'
]
deviceExtensions = [
VK_KHR_SWAPCHAIN_EXTENSION_NAME
]
enableValidationLayers = True
class InstanceProcAddr(object):
T = None
def __init__(self... | mit | -1,177,517,058,833,136,400 | 31.395833 | 120 | 0.638702 | false | 4.247579 | false | false | false |
GaneshPandey/alex-scraper | alexscrapper/spiders/yazing_spider.py | 1 | 2751 | # -*- coding: utf-8 -*-
import scrapy
from scrapy.http import Request, FormRequest
from scrapy.spiders import CrawlSpider
from alexscrapper.items import *
from datetime import datetime
from scrapy.conf import settings
import urllib
import csv
import json
import re
from datetime import datetime, timedelta
from dateutil... | gpl-3.0 | -3,813,770,262,426,610,000 | 34.282051 | 146 | 0.563795 | false | 3.447368 | false | false | false |
vsemionov/wordbase | src/wordbase/master.py | 1 | 3079 | # Copyright (C) 2011 Victor Semionov
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and t... | bsd-3-clause | -2,246,946,171,496,893,200 | 33.211111 | 101 | 0.714193 | false | 4.110814 | false | false | false |
robertz23/code-samples | python scripts and tools/get_photos.py | 1 | 1103 | import urllib2
"""
This script was only created to extract a several
photos, in jpg format, from an internal website.
It was a very quick script I made only for the
purpose decribe before.
"""
web_not_found = 0
web_found = 0
for num_photo in range(7277, 7630):
web_page = r'http://ntpnoapps0301.corp.codetel.com.d... | mit | -6,296,794,329,739,016,000 | 29.638889 | 162 | 0.635539 | false | 3.063889 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.