repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mbrubeck/servo | tests/wpt/web-platform-tests/tools/wptserve/tests/test_replacement_tokenizer.py | 5 | 1106 | import pytest
from wptserve.pipes import ReplacementTokenizer
@pytest.mark.parametrize(
"content,expected",
[
["aaa", [('ident', 'aaa')]],
["bbb()", [('ident', 'bbb'), ('arguments', [])]],
["$ccc:ddd", [('var', '$ccc'), ('ident', 'ddd')]],
["$eee", [('ident', '$eee')]],
... | mpl-2.0 | -317,046,476,585,617,900 | 28.891892 | 64 | 0.491863 | false | 3.511111 | false | false | false |
smakonin/AMPds | make_AMPds2_power.py | 1 | 14976 | #!/usr/bin/env python3
#
# A utility of make the AMPds Release 2 public dataset: power meter data (make_AMPds2_power.py)
#
# Copyright (C) 2015 Stephen Makonin. All Right Reserved.
#
import os, math, csv, time
from datetime import datetime
from calendar import timegm
# set the proper timezone to locati... | mit | -3,979,442,485,149,273,000 | 42.411594 | 298 | 0.52898 | false | 3.035266 | false | false | false |
landongr/inf1340-2015-labs | lab4.py | 1 | 1369 | #!/usr/bin/env python3
""" Graded Lab #4 for Inf1340, Fall 2015
This program computes federal and provincial sales tax.
Assume that the provincial sales tax is 5 percent and
the federal sales tax is 2.5 percent. It displays the
amount of the purchase, the provincial sales tax, the
federal sales ta... | mit | 2,554,164,183,988,906,000 | 32.414634 | 83 | 0.681519 | false | 3.076404 | false | false | false |
hijiangtao/statePrediction | util/tripFlow/LinkList.py | 1 | 2641 | #!/usr/bin/python
# -*- coding: utf-8 -*-
class Node(object):
def __init__(self, val, p=0):
self.data = val
self.next = p
self.prev = p
class LinkList(object):
def __init__(self):
self.head = 0
def __getitem__(self, key):
if self.is_empty():
print 'linklist is empty.'
return None
elif key < 0 ... | apache-2.0 | -1,819,180,913,807,945,000 | 15.308642 | 62 | 0.574782 | false | 2.630478 | false | false | false |
lucienfostier/gaffer | python/GafferUI/BoxUI.py | 3 | 12989 | ##########################################################################
#
# Copyright (c) 2013-2015, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redi... | bsd-3-clause | 2,521,508,636,894,102,000 | 33.823056 | 141 | 0.691046 | false | 3.55279 | false | false | false |
carthage-college/django-djforms | djforms/athletics/soccer/views.py | 2 | 9299 | from django.conf import settings
from django.shortcuts import render
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from djforms.athletics.soccer import BCC, INSURANCE_TO_LIST, TO_LIST
from djforms.processors.models import Order
from djforms.processors.forms import Tru... | unlicense | 978,684,549,721,022,600 | 36.26749 | 79 | 0.471341 | false | 4.538311 | false | false | false |
upTee/upTee | docs/settings_production/settings_local.py | 1 | 3512 | # pylint: disable-all
"""
settings_local.py
Change site-specific settings here.
"""
from settings_default import *
"""
There's a list of settings that you will probably override.
"""
"""
DEBUG
Turns Django into development mode.
Default: False
"""
#DEBUG = True
"""
TEMPLATE_DEBUG
Additional debug data for templ... | bsd-3-clause | -8,594,794,080,764,101,000 | 20.156627 | 100 | 0.654328 | false | 3.276119 | false | false | false |
YannThorimbert/ThorPy-1.4.3 | thorpy/elements/keytogglable.py | 1 | 1095 | from pygame.locals import KEYDOWN
from thorpy.elements.pressable import Pressable
from thorpy.miscgui.constants import STATE_NORMAL, STATE_PRESSED, REAC_UNPRESS
class KeyTogglable(Pressable):
"""Keyboard togglable element"""
def __init__(self, key, text="", elements=None, normal_params=None,
... | mit | -3,500,602,131,825,467,000 | 38.107143 | 78 | 0.621918 | false | 3.686869 | false | false | false |
nion-software/nionswift | nion/swift/model/Migration.py | 1 | 53190 | import collections
import copy
import datetime
import gettext
import logging
import typing
import uuid
from nion.swift.model import Utility
_ = gettext.gettext
def migrate_to_latest(reader_info_list, library_updates) -> None:
migrate_to_v2(reader_info_list)
migrate_to_v3(reader_info_list)
migrate_to_v4... | gpl-3.0 | -1,865,272,848,469,336,000 | 63.00722 | 248 | 0.553751 | false | 4.52219 | false | false | false |
vivek8943/soft-boiled | src/algorithms/gmm.py | 1 | 21038 | from sklearn import mixture
import numpy as np
import urlparse
# local includes
from src.utils.geo import bb_center, GeoCoord, haversine
import statsmodels.sandbox.distributions.extras as ext
import math
import gzip
import csv
import itertools
from collections import namedtuple, defaultdict
GMMLocEstimate = namedtuple... | apache-2.0 | 2,417,962,291,723,024,400 | 39.302682 | 127 | 0.634138 | false | 3.703221 | false | false | false |
helloTC/LearnPython | framework_attempt/MRFreeframe3.py | 1 | 4791 | import nibabel as nib
from nibabel import freesurfer
import numpy as np
class Region(object):
def __init__(self, name, layer = None, space_name = None, hemisphere = None):
self.name = name
self.layer = layer
self.space = space_name
self.hemisphere = hemisphere
def __add__(self)... | mit | -6,282,240,733,139,324,000 | 31.371622 | 96 | 0.56627 | false | 3.93673 | false | false | false |
elmadjian/pcs5735 | linear_regression.py | 1 | 3359 | import sys, re
import matplotlib.pyplot as plt
import numpy as np
theta_list = []
x_list = []
y_list = []
def main():
if len(sys.argv) != 2:
print("modo de usar: <este_programa> <arquivo_csv>")
sys.exit()
csv_file = sys.argv[1]
with open(csv_file, "r") as arquivo:
classes = arquiv... | mpl-2.0 | -5,736,494,114,967,597,000 | 29.807339 | 96 | 0.509529 | false | 2.979592 | false | false | false |
Kalvar/python-GreyTheory | greytheory/packages/libs/grey_lib.py | 1 | 1087 | import numpy as np
class GreyLib:
def __init__(self, alpha=0.5):
self.alpha = alpha
# Generates AGO via patterns.
def ago(self, patterns):
# do ago
ago_boxes = [] #np.array([], dtype=np.float)
z_boxes = []
pattern_index = 0
# x1 which is index 0 the o... | mit | -4,238,165,995,591,937,500 | 31 | 96 | 0.473781 | false | 3.827465 | false | false | false |
Andlon/crest | util/generate_quadrature_macros.py | 1 | 2107 | # Utility script to generate macros from
# the triangle quadrature rules retrieved from the appendix of
# F.D. Witherden, , P.E. Vincent, "On the identification of symmetric quadrature rules for finite element methods"
# Department of Aeronautics, Imperial College London, SW7 2AZ, United Kingdom
import sys
from pathli... | mit | -1,699,766,786,044,995,800 | 26.723684 | 132 | 0.582819 | false | 3.339144 | false | false | false |
elentarion/RatticWeb | cred/migrations/0006_auto__del_category__add_tag__chg_field_cred_category.py | 7 | 5685 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Rename table
db.rename_table('cred_category', 'cred_tag')
db.send_create_signal('cred', ['Tag'])
... | gpl-2.0 | 7,655,690,580,552,867,000 | 63.602273 | 182 | 0.550572 | false | 3.660657 | false | false | false |
mcgettin/ditOldProgramming | yr2/sem1/labs/Lab4/sampSol4.py | 2 | 3175 | '''
In this lab we will create a program that can encrypt and decrypt strings
using a simple algorithm.
The algorithm we will use is the following:
* To encrypt a string, we reverse it and add 1 to the ASCII code for each
character. For example, if we take the word:
python
When we encrypt the word it becomes:
opi... | mit | 4,830,264,621,582,672,000 | 22.69403 | 81 | 0.668661 | false | 2.819716 | false | false | false |
orb-framework/orb | orb/core/context.py | 2 | 13129 | """
Defines the different options that can be used throughout the system. Often,
classes and methods will accept a variable set of keyword arguments. As
opposed to hard-coding these options everywhere and updating them, they
will map to one of the classes defined in this module.
"""
import copy
import threading
from... | mit | -4,409,310,641,993,528,300 | 32.237975 | 131 | 0.550537 | false | 4.231067 | false | false | false |
DTOcean/dtocean-app | dtocean_app/simulation.py | 1 | 5470 | # -*- coding: utf-8 -*-
# Copyright (C) 2016-2018 Mathew Topper
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later... | gpl-3.0 | -2,813,475,949,867,480,600 | 25.425121 | 77 | 0.545155 | false | 4.355096 | false | false | false |
mrry/tensorflow | tensorflow/contrib/cudnn_rnn/__init__.py | 22 | 1147 | # 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 | -8,983,872,218,084,996,000 | 46.791667 | 80 | 0.727986 | false | 4.081851 | false | false | false |
mozman/ezdxf | examples/blocks/exploding_with_attribs.py | 1 | 1939 | # Copyright (c) 2020, Manfred Moitzi
# License: MIT License
from typing import cast, Tuple, TYPE_CHECKING
from pathlib import Path
import ezdxf
import random
DIR = Path('~/Desktop/Outbox').expanduser()
if TYPE_CHECKING:
from ezdxf.eztypes import Insert, BaseLayout
def get_random_point() -> Tuple[int, int]:
... | mit | -1,507,136,572,540,065,800 | 31.316667 | 101 | 0.65343 | false | 2.929003 | false | false | false |
levilucio/SyVOLT | ECore_Copier_MM/transformation-Large/HeannotationOUTeAnnotationsSolveRefEAnnotationEAnnotationEAnnotationEAnnotation.py | 1 | 5106 |
from core.himesis import Himesis
class HeannotationOUTeAnnotationsSolveRefEAnnotationEAnnotationEAnnotationEAnnotation(Himesis):
def __init__(self):
"""
Creates the himesis graph representing the AToM3 model HeannotationOUTeAnnotationsSolveRefEAnnotationEAnnotationEAnnotationEAnnotation.
... | mit | -8,084,542,176,894,112,000 | 48.572816 | 302 | 0.52546 | false | 3.048358 | false | false | false |
gitenberg-dev/pg-epubmaker | epubmaker/mydocutils/writers/xhtml1.py | 1 | 16004 | #!/usr/bin/env python
# -*- mode: python; indent-tabs-mode: nil; -*- coding: utf-8 -*-
"""
xhtml1.py
Copyright 2010-2012 by Marcello Perathoner
Distributable under the GNU General Public License Version 3 or newer.
A modified XHTML writer.
"""
# FIXME: move hr.pb out of sections
import re
from docutils import... | gpl-3.0 | 3,098,531,728,778,293,000 | 32.06405 | 97 | 0.543586 | false | 3.869197 | false | false | false |
dongweiming/code | vilya/models/tag.py | 3 | 10203 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from datetime import datetime
from vilya.libs.store import mc, cache
from vilya.libs.store import store
MC_KEY_TAG_TYPE_IDS_BY_TAG_ID = "code:tags:type_ids:by:tag_id:%s"
MC_KEY_TAG_IDS_BY_TARGET_ID_AND_TYPE = "code:tag_ids:by:target_id:%s:type:%s"
ONE_D... | bsd-3-clause | 6,011,401,277,773,327,000 | 32.019417 | 78 | 0.552093 | false | 3.346343 | false | false | false |
algorhythms/LintCode | Copy Books.py | 1 | 3818 | """
Given an array A of integer with size of n( means n books and number of pages of each book) and k people to copy the
book. You must distribute the continuous id books to one people to copy. (You can give book A[1],A[2] to one people, but
you cannot give book A[1], A[3] to one people, because book A[1] and A[3] is n... | apache-2.0 | 5,032,894,488,925,592,000 | 26.47482 | 120 | 0.478261 | false | 3.433453 | false | false | false |
RobertABT/heightmap | build/scipy/scipy/linalg/benchmarks/bench_sqrtm.py | 18 | 2108 | """ Benchmark linalg.sqrtm for various blocksizes.
"""
from __future__ import division, print_function, absolute_import
import time
import numpy as np
from numpy.testing import assert_allclose
import scipy.linalg
def bench_sqrtm():
np.random.seed(1234)
print()
print(' Matrix Squa... | mit | 3,705,560,293,805,776,400 | 35.982456 | 79 | 0.502846 | false | 4.061657 | false | false | false |
FedoraScientific/salome-hexablock | src/TEST_PY/recettes/tuyauterie.py | 1 | 9652 | # -*- coding: latin-1 -*-
# Copyright (C) 2009-2014 CEA/DEN, EDF R&D
#
# This library 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 later ... | lgpl-2.1 | -8,847,826,486,178,031,000 | 33.594982 | 147 | 0.645669 | false | 2.497283 | false | false | false |
jaredsohn/hacker-news-download-all-comments | getcomments.py | 1 | 1544 | import urllib2
import json
import datetime
import time
import pytz
import pandas as pd
import os
from pandas import DataFrame
filename = 'hacker_news_comments.csv'
def update_csv(f, df):
df["comment_text"] = df["comment_text"].map(lambda x: x.translate(dict.fromkeys([0x201c, 0x201d, 0x2011, 0x2013, 0x2014, 0x2018, 0... | apache-2.0 | -39,528,588,373,431,710 | 27.611111 | 188 | 0.666451 | false | 2.752228 | false | false | false |
tokatikato/OIPA | OIPA/api/views.py | 1 | 1795 | from rest_framework.decorators import api_view
from rest_framework.reverse import reverse
from rest_framework.response import Response
@api_view(('GET',))
def welcome(request, format=None):
"""
# REST API
The REST API provides programmatic access to read and write IATI data.
Fetch IATI Activity, Tran... | agpl-3.0 | -3,050,431,507,122,915,000 | 27.492063 | 74 | 0.529805 | false | 4.443069 | false | false | false |
ncloudioj/splice | migrations/versions/c662f052956_.py | 3 | 1507 | """empty message
Revision ID: c662f052956
Revises: 52c5946188c4
Create Date: 2016-08-29 10:00:57.532481
"""
# revision identifiers, used by Alembic.
revision = 'c662f052956'
down_revision = '52c5946188c4'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def upgrade(engine_name... | mpl-2.0 | 8,236,370,538,986,678,000 | 24.116667 | 121 | 0.669542 | false | 3.537559 | false | false | false |
hradec/gaffer | python/GafferImageTest/ImageNodeTest.py | 8 | 3790 | ##########################################################################
#
# Copyright (c) 2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistrib... | bsd-3-clause | 997,347,437,487,613,400 | 30.065574 | 103 | 0.690501 | false | 3.875256 | true | false | false |
appapantula/deeppy | deeppy/siamese/loss.py | 17 | 1139 | import cudarray as ca
from ..loss import Loss
class ContrastiveLoss(Loss):
def __init__(self, margin=1.0):
self.name = 'contrastive'
self.margin = margin
self._tmp_x1 = None
self._tmp_x2 = None
self._tmp_dists = None
def fprop(self, x1, x2):
if self._tmp_x1 is ... | mit | 4,463,760,830,903,724,500 | 29.783784 | 73 | 0.56892 | false | 2.966146 | false | false | false |
madeddie/python-bunq | examples/output_balance.py | 1 | 1692 | #!/usr/bin/env python
# This example uses a previously registered public key and related
# Installation token to create a new Session and retrieve the current
# Balance of the first account of the first user connected to the
# given api key
from bunq import API
from pprint import pprint
# installation token
i_token ... | mit | 6,166,199,841,236,125,000 | 32.84 | 79 | 0.663121 | false | 3.174484 | false | false | false |
DHI-GRAS/processing_SWAT | ClimateStationsSWAT_old.py | 2 | 14613 | """
***************************************************************************
ClimateStationsSWAT.py
-------------------------------------
Copyright (C) 2014 TIGER-NET (www.tiger-net.org)
***************************************************************************
* This plugin is part of the Water Observation... | gpl-3.0 | -295,950,669,457,981,630 | 47.390728 | 139 | 0.526244 | false | 3.448903 | false | false | false |
KelSolaar/sIBL_GUI | sibl_gui/components/addons/sibl_edit_utilities/sibl_edit_utilities.py | 1 | 21080 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
**sibl_edit_utilities.py**
**Platform:**
Windows, Linux, Mac Os X.
**Description:**
Defines the :class:`sibl_edit_utilities` Component Interface class.
**Others:**
"""
from __future__ import unicode_literals
import os
from PyQt4.QtCore import QProcess
fro... | gpl-3.0 | 5,364,299,689,888,081,000 | 34.250836 | 133 | 0.606214 | false | 4.045289 | false | false | false |
laurenbarker/SHARE | share/admin.py | 1 | 13055 | import ast
import datetime
import importlib
from furl import furl
import celery
from django import forms
from django.apps import apps
from django.conf.urls import url
from django.contrib import admin
from django.contrib.admin import SimpleListFilter
from django.contrib.admin.views.main import ChangeList
from django.c... | apache-2.0 | -1,734,718,528,152,940,000 | 34.283784 | 156 | 0.645576 | false | 3.892367 | true | false | false |
wiktorski/opentsdb_pandas | opentsdb_pandas.py | 1 | 2971 | """
This module provides methods to fetch data from OpenTSDB HTTP interface and convert them into Python's Pandas Timeseries object.
2014.02, Tomasz Wiktorski, University of Stavanger, Norway
"""
import pandas as pd
import urllib2
import datetime as dt
def ts_get(metric, start, end, tags='', agg='avg', rate=False,... | mit | 8,242,590,273,292,756,000 | 46.15873 | 240 | 0.713564 | false | 3.470794 | false | false | false |
snahelou/awx | awx/main/tests/functional/test_rbac_organization.py | 2 | 1209 | import mock
import pytest
from awx.main.access import (
BaseAccess,
OrganizationAccess,
)
@mock.patch.object(BaseAccess, 'check_license', return_value=None)
@pytest.mark.django_db
def test_organization_access_admin(cl, organization, user):
'''can_change because I am an admin of that org'''
a = user('... | apache-2.0 | 8,044,709,000,582,127,000 | 30.815789 | 66 | 0.711332 | false | 3.504348 | false | false | false |
feroda/gasistafelice | extra/forum/gasistafelice/auth_backend.py | 3 | 1496 | from django.contrib.auth.models import User, check_password
class GasistaFeliceBackend(object):
"""
Authenticate against User database in Gasista Felice
it uses database alias 'gasistafelice'
"""
supports_inactive_user = False
supports_anonymous_user = False
supports_object_permissions = ... | agpl-3.0 | -3,135,266,044,662,186,000 | 31.521739 | 139 | 0.596257 | false | 3.96817 | false | false | false |
fnp/wolnelektury | src/paypal/views.py | 1 | 2494 | # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
from decimal import Decimal
from django.contrib.auth.decorators import login_required
from django.http import Http404
from django.http.response import HttpResponse... | agpl-3.0 | -4,727,467,378,309,389,000 | 37.953125 | 99 | 0.687124 | false | 4.073529 | false | false | false |
dmvieira/randomcopy | sourcewin.py | 1 | 17142 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# generated by wxGlade 0.6.3 on Mon Oct 25 20:16:49 2010
import wx, locale
import random, shutil, os
# begin wxGlade: extracode
# end wxGlade
curdir = "" # Use filename as a flag
palavras=[]
if locale.getdefaultlocale()[0]=='pt_BR' or locale.getdefaultlocale()[0]=='pt'... | gpl-3.0 | 210,899,934,951,365,570 | 47.075843 | 247 | 0.545954 | false | 3.266845 | false | false | false |
orezpraw/unnaturalcode | unnaturalcode/check_pypy_syntax.py | 2 | 2577 | #!/usr/bin/python
# Copyright 2017 Dhvani Patel
#
# This file is part of UnnaturalCode.
#
# UnnaturalCode 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 Licen... | agpl-3.0 | 5,575,957,887,915,754,000 | 28.965116 | 112 | 0.674428 | false | 3.205224 | false | false | false |
aioc/aminiaio | aminiaio/db/student.py | 1 | 2840 | from . import conn
import random
class Student(object):
''' Represents a student for a particular contest instance. '''
def __init__(self, studentId, name, username=None, password=None):
self._studentId = studentId
self._name = name
self._username = username
self._password = password
@classmethod
def _us... | mit | -2,514,495,027,871,151,600 | 29.869565 | 118 | 0.683803 | false | 3.434099 | false | false | false |
soylentdeen/Graffity | src/Grism.py | 1 | 1436 | import scipy
import numpy
class GrismInstrument( object ):
def __init__(self, Grism = None, f1 = 24.0, f2 = 24.0, CCD = None):
self.Grism = Grism
self.f1 = f1
self.f2 = f2
self.CCD = CCD
def setSlitSize(self, imageWidth=2.5, pixelSize=15.0):
self.deltaX_slit = (imageWid... | mit | -5,540,934,862,363,869,000 | 35.820513 | 133 | 0.622563 | false | 2.740458 | false | false | false |
rosarior/rua | rua/apps/api/urls.py | 2 | 1340 | from __future__ import absolute_import
from django.conf.urls import patterns, url, include
from .views import (AgencyList, AgencyDetail, AgencyPositionDetail,
AgencyDepartmentDetail, DepartmentLocationDetail, DepartmentEmployeeDetail,
PersonList, PersonDetail)
urlpatterns = patterns('api.views',
url(r'^$', 'a... | gpl-3.0 | 8,655,624,117,556,589,000 | 43.666667 | 124 | 0.662687 | false | 3.213429 | false | true | false |
dchoruzy/python-stdnum | stdnum/be/vat.py | 4 | 2332 | # vat.py - functions for handling Belgian VAT numbers
#
# Copyright (C) 2012, 2013 Arthur de Jong
#
# This library 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... | lgpl-2.1 | 6,566,674,733,897,167,000 | 30.093333 | 78 | 0.687393 | false | 3.899666 | false | false | false |
abe-winter/pg13-py | test_pg13/test_threevl.py | 1 | 1957 | import pytest
def test_3vl_basics():
from pg13.threevl import ThreeVL
assert bool(ThreeVL('t'))
assert not bool(ThreeVL('f'))
# with pytest.raises(ValueError): bool(ThreeVL('u')) # I think this needs to be false at the top level
with pytest.raises(ValueError): ThreeVL('bad value')
assert ThreeVL('f')!=Thre... | mit | -3,361,597,091,984,488,400 | 30.063492 | 104 | 0.570772 | false | 2.836232 | true | false | false |
Fingel/puamana | puamana.py | 1 | 1543 | from flask import Flask
from flask import render_template, redirect, url_for
from flask import request
from flask.ext.pymongo import PyMongo
import datetime
import urllib2
import re
app = Flask(__name__)
mongo = PyMongo(app)
@app.route('/')
def index():
today = datetime.datetime.now();
if today.weekday() == ... | gpl-2.0 | 7,225,524,143,974,639,000 | 27.054545 | 108 | 0.613091 | false | 3.14898 | false | false | false |
pranjalv123/TaxonDeletion | src/xylem-run.py | 2 | 2121 | import argparse
import sys
import os
import imp
import runpy
import Scheduler
import subprocess32
import string
template = """#!/bin/bash
#PBS -l nodes=1:ppn=$ppn
#PBS -M pr@nj.al
#PBS -m a
#PBS -j oe
#PBS -l walltime=$walltime
#PBS -l naccesspolicy=singleuser
#PBS -q $queue
#PBS -N $scriptname
#PBS -t 0-$njobs
#PBS ... | gpl-3.0 | 34,213,491,439,012,868 | 22.054348 | 115 | 0.589345 | false | 2.885714 | false | false | false |
agoravoting/agora-dev-box | authapi/templates/deploy.py | 1 | 6528 | # This file is part of agora-dev-box.
# Copyright (C) 2014-2016 Agora Voting SL <agora@agoravoting.com>
# agora-dev-box is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License.... | agpl-3.0 | -5,780,882,276,254,883,000 | 30.68932 | 124 | 0.646906 | false | 3.428571 | true | false | false |
DaniLabs/rexploit | rexploit/views/dialog/updateview.py | 1 | 2603 | # Imports
from rexploit.interfaces.dialog import Dialog
from rexploit.views.aux.messagebox import MessageBox
class UpdateView(Dialog):
"""
This class is a view inherit from QDialog. This class permits update and upgrade the exploits.
"""
def __init__(self, updateController):
"""Initializ... | gpl-3.0 | 9,213,033,755,197,821,000 | 38.439394 | 106 | 0.624664 | false | 4.793738 | false | false | false |
dzzh/elfstats-munin | setup.py | 1 | 5390 | from ez_setup import use_setuptools
use_setuptools()
import os
import pkgutil
import glob
import shutil
import errno
from setuptools import setup, find_packages
from setuptools.command.install import install as _install
import elfstatsm
import elfstatsm.plugins
ELFSTATSM_PLUGIN_DIR = u'/usr/share/munin/plugins'
if ... | gpl-3.0 | 7,947,058,555,668,999,000 | 40.145038 | 118 | 0.557328 | false | 4.095745 | false | false | false |
weso/CWR-DataApi | tests/parser/dictionary/encoder/record/test_publisher.py | 1 | 3294 | # -*- coding: utf-8 -*-
import unittest
from cwr.parser.encoder.dictionary import PublisherRecordDictionaryEncoder
from cwr.interested_party import PublisherRecord, Publisher
"""
Publisher to dictionary encoding tests.
The following cases are tested:
"""
__author__ = 'Bernardo Martínez Garrido'
__license__ = 'MIT'... | mit | 420,986,318,169,698,100 | 41.766234 | 74 | 0.548132 | false | 4.332895 | true | false | false |
brendandburns/tensorflow | tensorflow/python/training/training_util.py | 5 | 1502 | """Utility functions for training."""
import os.path
from tensorflow.python.platform import gfile
def global_step(sess, global_step_tensor):
"""Small helper to get the global step.
```python
# Creates a variable to hold the global_step.
global_step_tensor = tf.Variable(10, trainable=False, name='global_step... | apache-2.0 | -2,085,497,239,299,410,000 | 25.350877 | 78 | 0.678429 | false | 3.375281 | false | false | false |
cython-testbed/pandas | pandas/core/sparse/series.py | 1 | 24382 | """
Data structures for sparse float data. Life is made simpler by dealing only
with float64 data
"""
# pylint: disable=E1101,E1103,W0231
import numpy as np
import warnings
from pandas.core.dtypes.common import (
is_scalar,
)
from pandas.core.dtypes.missing import isna, notna, is_integer
from pandas import comp... | bsd-3-clause | -4,424,970,813,946,469,400 | 33.931232 | 79 | 0.545566 | false | 4.300935 | false | false | false |
PapaCharlie/SteamyReviews | app/models/review.py | 1 | 9511 | from __future__ import print_function, division, unicode_literals
import bs4
import decimal
import json
import requests
import re
import zlib
from app import s3
from app.dynamodb import db, utils
from app.utils import data_file
from bs4 import BeautifulSoup as BS
from botocore.exceptions import ClientError
from cStri... | mit | 5,610,028,454,668,066,000 | 36.007782 | 100 | 0.582694 | false | 3.562172 | false | false | false |
truebit/PyGetSubtitle | PyGetSubtitle.py | 1 | 5378 | #!/usr/bin/env python
#-*- coding: utf-8 -*-
"""
PyGetSubtitle: download subtitles according to a video file with right click
Copyright (C) 2014 SeganW(http://fclef.wordpress.com/about)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as... | gpl-3.0 | 4,277,842,253,850,340,400 | 34.676056 | 113 | 0.62308 | false | 3.35567 | false | false | false |
Hitatm/Concentrator | app/utils/gxn_topo_analyzer.py | 1 | 7141 | #coding:UTF-8
__author__ = 'dj'
import collections
#数据包大小统计
from gxn_get_sys_config import Config
#http/https协议统计
def topo_statistic(TOPODATA):
nodes_dict = dict()
for item in TOPODATA:
ID= item[1] #ID
if ID in nodes_dict:
nodes_dict[ID]+=1
else:
nodes_dict[ID]... | gpl-3.0 | 5,191,839,371,461,428,000 | 35.9 | 117 | 0.519612 | false | 3.406706 | true | false | false |
sgordon007/jcvi_062915 | apps/last.py | 1 | 3494 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
Wrapper for LAST program.
<http://last.cbrc.jp>
"""
import os.path as op
import sys
import logging
from itertools import islice
from multiprocessing import Lock
from Bio import SeqIO
from jcvi.utils.cbook import depends
from jcvi.apps.grid import Jobs
from jcvi.for... | bsd-2-clause | -5,529,654,348,841,522,000 | 25.876923 | 80 | 0.59273 | false | 3.18505 | false | false | false |
massimo-nocentini/master-thesis | sympy/riordan_group.py | 1 | 2504 |
class RiordanArray:
def __init__(
self, characterization, name=None, math_name=None,
additional_caption_text=None, inverse_of=None):
self.characterization = characterization
self.expansion = None
self.order = None
self.name = name
self.math_name = math_nam... | mit | -2,420,858,431,608,135,700 | 30.696203 | 86 | 0.602636 | false | 3.805471 | false | false | false |
YenCChien/sss | tensorflow/example1.py | 1 | 2143 | from __future__ import print_function
import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
def add_layer(inputs, in_size, out_size, activation_function=None):
Weights = tf.Variable(tf.random_normal([in_size, out_size]))
biases = tf.Variable(tf.zeros([1, out_size]) + 0.1)
Wx_pl... | mpl-2.0 | 6,517,575,174,578,850,000 | 31.484375 | 88 | 0.641624 | false | 3.052707 | false | false | false |
hendrycks/error-detection | ASR/CTC/CTC_eval.py | 1 | 9046 | from tensorflow.python.ops import ctc_ops as ctc
# from tensorflow.contrib.ctc import ctc_ops as ctc # depreciated in future
import tensorflow as tf
import numpy as np
from utils import load_batched_data, target_list_to_sparse_tensor
import pickle
import sklearn.metrics as sk
import gc
####Learning Parameters
nEpoch... | mit | -6,836,765,720,128,199,000 | 40.686636 | 125 | 0.65797 | false | 3.162937 | false | false | false |
vt-dev/sdk | python/sdk/data/CANResponsesIterator.py | 1 | 1719 | import sdk.util as util
from sdk.data.CANResponse import CANResponse
if util.P3:
from queue import Queue
else:
from Queue import Queue
class CANResponsesIterator(object):
__slots__ = ('queue', '__last')
__POISON_PILL = 'poison-pill'
def __init__(self):
self.queue = Queue()
self.... | apache-2.0 | -2,480,789,725,248,097,000 | 27.180328 | 82 | 0.521815 | false | 4.152174 | false | false | false |
magic0704/monitoring-for-openstack | oschecks/glance.py | 4 | 4849 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# Openstack Monitoring script for Sensu / Nagios
#
# Copyright © 2013-2014 eNovance <licensing@enovance.com>
#
# Author: Mehdi Abaakouk <mehdi.abaakouk@enovance.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in ... | apache-2.0 | -7,700,212,688,811,547,000 | 36.292308 | 78 | 0.590965 | false | 4.006612 | false | false | false |
mrbell/gfft | gfft.py | 1 | 42168 | """
GFFT
This package mainly consists of a single function, gfft, which is a generalized
Fourier transformation function that can transform between regularly- or
irregularly-spaced, N-D fields. Gridding and degridding is performed when
irregularly spaced fields are requested. Gridding is only supported for 1-, 2-,
or ... | gpl-3.0 | 292,973,357,076,360,600 | 32.951691 | 80 | 0.460065 | false | 3.565703 | false | false | false |
quom/google-cloud-python | docs/logging_snippets.py | 6 | 12290 | # Copyright 2016 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | 370,908,914,346,466,500 | 29.122549 | 79 | 0.663548 | false | 3.600938 | false | false | false |
openvsip/openvsip | python/src/signal/iir.py | 1 | 1237 | #
# Copyright (c) 2014 Stefan Seefeld
# All rights reserved.
#
# This file is part of OpenVSIP. It is made available under the
# license contained in the accompanying LICENSE.BSD file.
import numpy
from vsip import vector, matrix
def _import_module(dtype):
mod = None
if dtype == numpy.float32:
_temp =... | gpl-2.0 | -6,494,192,989,537,487,000 | 25.319149 | 80 | 0.582053 | false | 3.370572 | false | false | false |
friendofrobots/air-toolkit | air/toolkit/forms.py | 1 | 1142 | from django import forms
class CategoryCreateForm(forms.Form):
category_id = forms.IntegerField(min_value=1,
widget=forms.TextInput(attrs={'class':'idField'}))
startvalue = forms.FloatField(initial=.6,min_value=0.0,max_value=1.0,
widget=forms.... | mit | 5,422,388,698,015,370,000 | 66.176471 | 85 | 0.392294 | false | 5.464115 | false | false | false |
caw13/adventofcode | python/2020/day_seven_part2.py | 1 | 1081 | import re
def addBag(bagLine, bagDictionary):
#print("bagLine: "+bagLine+" bagDictionary: "+str(bagDictionary))
parts = bagLine.split("s contain ")
bagName = parts[0]
contents = re.findall("(no other bag|[0-9]+ [\w]+ [\w]+ bag)", parts[1])
#print("bag: '"+bagName+"' contents: "+str(contents))
bagDictionary[b... | mit | 4,117,618,416,780,842,500 | 29.027778 | 76 | 0.695652 | false | 2.852243 | false | false | false |
thammi/ucgf | flat.py | 1 | 5737 | #!/usr/bin/env python
###############################################################################
##
## Copyright (C) 2010 Thammi
##
## 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... | agpl-3.0 | -7,704,232,099,625,052,000 | 26.581731 | 102 | 0.507059 | false | 3.470659 | false | false | false |
chadspratt/AveryDB | filetypes/gdbdata.py | 1 | 8494 | """GDBData is used to provide a standardized interface to file geodatabases."""
##
# Copyright 2013 Chad Spratt
# 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.apac... | apache-2.0 | -3,589,183,631,997,178,400 | 40.842365 | 84 | 0.569932 | false | 4.626362 | false | false | false |
david-novak/orange3-text | orangecontrib/text/widgets/owgeomap.py | 1 | 7664 | # coding: utf-8
from urllib.parse import urljoin
from urllib.request import pathname2url
from collections import defaultdict, Counter
from os import path
from math import pi as PI
import re
import numpy as np
from PyQt4 import QtCore, QtGui
from Orange.widgets import widget, gui, settings
from Orange.data import Ta... | bsd-2-clause | -6,232,480,753,941,442,000 | 36.568627 | 118 | 0.553236 | false | 3.63395 | false | false | false |
mollyproject/mollyproject | molly/geolocation/migrations/0001_initial.py | 1 | 1752 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Geocode'
db.create_table('geolocation_geocode', (
('id', self.gf('django.db.mo... | apache-2.0 | 8,983,006,257,017,349,000 | 39.744186 | 89 | 0.571347 | false | 3.842105 | false | false | false |
kubeflow/fairing | tests/unit/preprocessors/test_base_preprocessor.py | 1 | 1146 | from kubeflow.fairing.preprocessors.base import BasePreProcessor
def test_checking_reqs_file_found_use_case_with_input_files():
input_files = ["foo", "bar", "/foo/bar", "requirements.txt"]
preprocessor = BasePreProcessor(input_files=input_files)
assert preprocessor.is_requirements_txt_file_present()
def... | apache-2.0 | 1,173,994,759,264,733,400 | 35.967742 | 69 | 0.69808 | false | 3.410714 | false | false | false |
Someguy123/steem-value | adapters/CacheAdapter.py | 1 | 1449 | import requests
import json
from decimal import Decimal, getcontext
from werkzeug.contrib.cache import SimpleCache
cache = SimpleCache()
class CacheAdapter(object):
""" Base class which wraps `_get_price` with a cache layer
Abstract class, not to be instantiated
example usage:
>>> class PoloniexA... | agpl-3.0 | 8,969,578,022,397,921,000 | 28.571429 | 81 | 0.573499 | false | 3.959016 | false | false | false |
gjbex/worker | tests/Reductor/counter.py | 1 | 1485 | #!/usr/bin/env python
from argparse import ArgumentParser
import pickle
import sys
if __name__ == '__main__':
arg_parser = ArgumentParser(description='count words in file, and '
'output dict as picle file')
arg_parser.add_argument('input', help='file to parse')
... | gpl-3.0 | 672,693,287,275,613,600 | 40.25 | 74 | 0.536027 | false | 4.21875 | false | false | false |
fabioz/PyDev.Debugger | _pydevd_bundle/pydevd_trace_dispatch.py | 2 | 3265 | # Defines which version of the trace_dispatch we'll use.
# Should give warning only here if cython is not available but supported.
import os
from _pydevd_bundle.pydevd_constants import USE_CYTHON_FLAG, ENV_TRUE_LOWER_VALUES, \
ENV_FALSE_LOWER_VALUES
from _pydev_bundle import pydev_log
dirname = os.path.dirname(os... | epl-1.0 | -5,147,051,628,344,375,000 | 51.66129 | 182 | 0.69709 | false | 3.583974 | false | false | false |
lcharleux/abapy | abapy/mesh.py | 1 | 95476 | '''
Mesh
====
'''
import copy
class Nodes(object):
'''
Manages nodes for finite element modeling pre/postprocessing and further graphical representations.
:param labels: list of node labels.
:type labels: list of int > 0
:param x: x coordinate of nodes.
:type x: list floats
:param y: y coordinate... | gpl-2.0 | 765,026,875,215,906,000 | 34.309172 | 383 | 0.559219 | false | 3.067699 | false | false | false |
loudnate/appengine-endpoints-auth-example | auth/models.py | 1 | 3195 | from datetime import datetime
from datetime import timedelta
import logging
from google.appengine.ext.ndb import model
from webapp2_extras import security
from webapp2_extras.appengine.auth.models import Unique
from webapp2_extras.appengine.auth.models import User as BaseUserExpando
from webapp2_extras.appengine.auth.... | apache-2.0 | -8,592,717,346,913,053,000 | 30.633663 | 89 | 0.589045 | false | 4.311741 | false | false | false |
NotAFakeRa/Front_end_CW_searches | processSingleJobs.py | 1 | 1497 | #!/usr/bin/python
#------------------------------------------------------------------------------
# Name: processSingleJobs.py
# Author: Ra Inta, 20150205
# Last Modified: 20150218
#This is a follow-up to the lookThresh.py script; it reads the top_jobs.txt list
# and analyses each candidate job for ... | mit | 8,324,810,129,140,298,000 | 29.55102 | 80 | 0.51837 | false | 3.992 | false | false | false |
bread-and-pepper/django-userena | userena/contrib/umessages/tests/test_models.py | 6 | 2051 | from django.contrib.auth import get_user_model
from django.test import TestCase
from userena.contrib.umessages.models import Message, MessageRecipient, MessageContact
from userena.utils import truncate_words
User = get_user_model()
class MessageContactTests(TestCase):
fixtures = ['users', 'messages']
def t... | bsd-3-clause | -3,080,947,137,276,087,300 | 32.622951 | 86 | 0.620673 | false | 4.237603 | true | false | false |
rogeliorv/asuna | asuna/settings.py | 1 | 3342 | """
Django settings for asuna project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
impo... | apache-2.0 | 5,201,953,155,491,514,000 | 28.043478 | 144 | 0.741317 | false | 3.363545 | false | false | false |
suziesparkle/wagtail | wagtail/wagtailcore/tests.py | 1 | 6203 | from django.test import TestCase, Client
from django.http import HttpRequest, Http404
from wagtail.wagtailcore.models import Page, Site
from wagtail.tests.models import EventPage
class TestRouting(TestCase):
fixtures = ['test.json']
def test_find_site_for_request(self):
default_site = Site.objects.... | bsd-3-clause | -5,953,633,876,956,021,000 | 43.307143 | 107 | 0.667419 | false | 3.848015 | true | false | false |
zigmondy/algorithms | Python/DynamicProgramming/SubsetSum.py | 1 | 1464 | import Common
referenceNumbers = [2, 3, 7, 8, 10]
desiredSum = 11
rows = len(referenceNumbers)
columns = desiredSum
m = [[False for _ in range(columns)] for _ in range(rows)]
backtrack = []
def computeMatrix():
for row in range(0, rows):
for column in range(0, columns):
currentRowNumber = ref... | mit | 1,041,736,083,314,662,500 | 33.069767 | 92 | 0.587432 | false | 3.96748 | false | false | false |
jakirkham/lazyflow | tests/testOpFormattedDataExport.py | 1 | 4389 | ###############################################################################
# lazyflow: data flow based lazy parallel computation framework
#
# Copyright (C) 2011-2014, the ilastik developers
# <team@ilastik.org>
#
# This program is free software; you can redistribute it and/o... | lgpl-3.0 | 3,387,190,056,035,600,400 | 40.018692 | 114 | 0.650034 | false | 3.975543 | false | false | false |
theno/ctutlz | ctutlz/tls/handshake.py | 1 | 10318 | import binascii
import socket
import struct
from functools import reduce
import certifi
import OpenSSL
import pyasn1_modules.rfc2560
import pyasn1_modules.rfc5280
from pyasn1.codec import ber
from pyasn1.codec.der.decoder import decode as der_decoder
from pyasn1.type.univ import ObjectIdentifier, OctetString, Sequence... | mit | -3,901,547,995,005,931,500 | 33.393333 | 80 | 0.583446 | false | 3.447377 | false | false | false |
gamernetwork/gn-django | tests/gn_django_tests/content/views.py | 1 | 1252 | from django.views.generic import TemplateView
from django.views.generic.base import View
from gn_django.utils import csv_download_response
class ArticleView(TemplateView):
template_name = "article.j2"
def get_context_data(self):
return {
'app': 'content',
}
class AboutView(Templa... | mit | -3,007,866,147,515,555,000 | 25.083333 | 100 | 0.486422 | false | 3.782477 | false | false | false |
danielfrg/jupyterhub-kubernetes_spawner | kubernetes_spawner/swagger_client/models/v1_resource_quota_spec.py | 1 | 3380 | # coding: utf-8
"""
Copyright 2015 SmartBear Software
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,616,792,259,411,533,000 | 28.649123 | 196 | 0.582544 | false | 4.441524 | false | false | false |
mjcuva/ConnectedWire | blog/views.py | 1 | 19716 | # views.py
# -----------
#
# Controls the majority of the site, including the index,
# new post, new page, pages, categories, archive, and editing.
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional in... | apache-2.0 | -8,239,237,743,014,587,000 | 33.410122 | 205 | 0.563045 | false | 4.573417 | false | false | false |
dvrhax/RobotODYSSpy | game/explorer.py | 1 | 3250 | import pyglet, math
from pyglet.window import key
from game import resources
from game.physicalobject import PhysicalObject
class Explorer(PhysicalObject):
def __init__(self, *args, **kwargs):
super(Explorer, self).__init__(img=resources.explorerImage[5,0], *args, **kwargs)
#self.thrust = 300.0
... | gpl-3.0 | -5,138,572,506,113,606,000 | 32.505155 | 101 | 0.577846 | false | 3.792299 | false | false | false |
OliverSJ/SENSEI-Panama | islandAndMovement/islandAndMovement2.py | 1 | 12711 | from omega import *
from cyclops import *
from pointCloud import *
#Directions
#Point Cloud should be the same size as the plane
#----------------------------------------------------------------------------
#Planeview code
imgResRatioX = 0.18/(float(10260)/32064)
imgResRatioY = 0.18/(float(9850)/30780)
pla... | lgpl-3.0 | -9,213,492,230,808,827,000 | 34.843478 | 127 | 0.687121 | false | 2.924758 | false | false | false |
xyuanmu/you-get | src/you_get/extractors/tumblr.py | 2 | 7048 | #!/usr/bin/env python
__all__ = ['tumblr_download']
from ..common import *
from .universal import *
from .dailymotion import dailymotion_download
from .vimeo import vimeo_download
from .vine import vine_download
def tumblr_download(url, output_dir='.', merge=True, info_only=False, **kwargs):
if re.match(r'https?... | mit | -4,020,370,435,394,852,400 | 45.675497 | 268 | 0.506952 | false | 3.313587 | false | false | false |
2Minutes/davos-dev | davos/tools/find_out_of_sync_files.py | 1 | 1955 |
import os
from davos.core.damproject import DamProject
from pytd.util.sysutils import timer, argToTuple
def _iterOutOfSyncFiles(proj, libraries=None, limit=0):
if libraries:
libraries = argToTuple(libraries)
pubLibs = tuple(l for l in proj.loadedLibraries.itervalues()
... | gpl-3.0 | -7,350,810,305,793,721,000 | 28.179104 | 77 | 0.586189 | false | 3.88668 | false | false | false |
miguelcb84/ewe-scrapers | ewescrapers/settings.py | 1 | 1401 | # Scrapy settings for ifttt project
#
# For simplicity, this file contains only the most important settings by
# default. All the other settings are documented here:
#
# http://doc.scrapy.org/en/latest/topics/settings.html
#
# BOT_NAME = 'ifttt'
#
SPIDER_MODULES = ['ewescrapers.spiders']
NEWSPIDER_MODULE = 'ewesc... | apache-2.0 | 4,444,456,149,217,170,400 | 35.868421 | 120 | 0.73162 | false | 3.012903 | false | false | false |
Bioto/Huuey-python | huuey/cli.py | 1 | 11170 | import time
import argparse
from random import randint
from cmd2 import Cmd
from hue import Schedule
class CommandLine(Cmd):
prompt = '=>'
huuey = None
def do_show(self, arg, opts):
pass
def do_bridges(self, line):
"""Get a list of bridges on the local network"""
print('List... | mit | -5,461,004,132,215,440,000 | 36.483221 | 180 | 0.570546 | false | 4.032491 | false | false | false |
ioO/nommer | nommer.py | 1 | 1321 | def get_combination_of_index(length):
"""
Create a combination of index
Parameters
----------
length - int
Size of the list of words
Returns
-------
generator
A generator of possible combination of index
"""
# list of index
indexes = list(range(length))
... | unlicense | 7,881,043,789,401,770,000 | 22.589286 | 70 | 0.52536 | false | 4.403333 | false | false | false |
faust/tcpextract | TcpExtract/Plugin.py | 2 | 1105 | """ tcpextract - pcap file extractor
Copyright (C) 2012 https://www.abnorm.org/contact/
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at yo... | gpl-3.0 | 330,040,929,302,998,100 | 30.6 | 73 | 0.716742 | false | 3.758503 | false | false | false |
levkar/odoo-addons | price_security/models/sale.py | 1 | 1927 | # -*- coding: utf-8 -*-
from openerp import fields, models, api
class sale_order(models.Model):
_inherit = 'sale.order'
@api.one
# Dummy depend so that it is updated on view load
@api.depends('partner_id')
def _get_user_restrict_prices(self):
self.user_restrict_prices = self.env['res.user... | agpl-3.0 | 6,401,936,421,470,147,000 | 35.358491 | 224 | 0.648158 | false | 3.510018 | false | false | false |
numaelis/pyqtrpt | package/example11.py | 1 | 1870 | #example11 QtRPT, Aleksey Osipov, E-mail: aliks-os@ukr.net
# to pyside2 Numael Garay, mantrixsoft@gmail.com
import sys
from PySide2.QtCore import *
from PySide2.QtGui import *
from PySide2.QtWidgets import *
from PySide2 import QtCore
from PyQtRPT import PyQtRPT
#Report with Barcode
table=[
{"bar1":"L... | lgpl-3.0 | -3,624,981,823,448,867,000 | 28.655738 | 86 | 0.637433 | false | 2.667618 | false | false | false |
rm-hull/yalix | python/src/yalix/test/utils_test.py | 1 | 1947 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import yalix.utils as utils
class UtilsTest(unittest.TestCase):
def test_log_progress_reports_FAILED(self):
with utils.capture() as out:
with self.assertRaises(KeyError):
with utils.log_progress("Testing log messag... | mit | -8,836,138,339,228,125,000 | 35.735849 | 104 | 0.614278 | false | 3.565934 | true | false | false |
ftCommunity/ftcommunity-apps | packages/USBList/usblist.py | 1 | 1635 | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
import sys
import subprocess
from TouchStyle import *
class FtcGuiApplication(TouchApplication):
def __init__(self, args):
TouchApplication.__init__(self, args)
# main window
win = TouchWindow("USBList")
widg = QWid... | gpl-3.0 | -2,426,780,649,946,435,000 | 23.402985 | 125 | 0.532722 | false | 4.224806 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.