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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
lincolnloop/salt-stats | salt/_returners/influxdb_return.py | 1 | 2217 | # -*- coding: utf-8 -*-
'''
Salt returner that reports stats to InfluxDB. The returner will
inspect the payload coercing values into floats where possible.
Pillar needs something like::
influxdb_returner:
url: http://localhost:8086
user: root
password: root
database: salt
'''
import base6... | mit | 6,890,723,242,404,881,000 | 27.792208 | 76 | 0.603067 | false | 3.764007 | false | false | false |
rahulraj/web_projects | assignment2/src/photogallery/generator/gallerygenerator.py | 1 | 6537 | import os
import getopt
import sys
from ..utils.inject import assign_injectables
from ..utils.immutabledict import ImmutableDict
from manifestparser import ManifestParser
from galleryitemfactory import GalleryItemFactory
import exporter
import templatewriter
import copier
class GalleryGenerator(object):
"""
The to... | mit | 2,190,217,508,828,373,800 | 39.602484 | 80 | 0.690684 | false | 3.990842 | false | false | false |
mscuthbert/abjad | abjad/tools/schemetools/Scheme.py | 1 | 10697 | # -*- encoding: utf-8 -*-
from abjad.tools import stringtools
from abjad.tools.abctools import AbjadValueObject
class Scheme(AbjadValueObject):
r'''Abjad model of Scheme code.
.. container:: example
**Example 1.** A Scheme boolean value:
::
>>> scheme = schemetools.Scheme(True... | gpl-3.0 | 9,166,033,055,927,871,000 | 29.303116 | 128 | 0.536973 | false | 4.350142 | false | false | false |
calancha/DIRAC | DataManagementSystem/Agent/RequestOperations/ReplicateAndRegister.py | 1 | 19627 | ########################################################################
# $HeadURL $
# File: ReplicateAndRegister.py
# Author: Krzysztof.Ciba@NOSPAMgmail.com
# Date: 2013/03/13 18:49:12
########################################################################
""" :mod: ReplicateAndRegister
=========================... | gpl-3.0 | -1,011,045,608,343,982,200 | 40.060669 | 150 | 0.597493 | false | 3.861302 | false | false | false |
JorrandeWit/ithenticate-api-python | iThenticate/API/Object/data.py | 1 | 1868 | class Data(dict):
def __init__(self, xml, status=None, messages=None):
"""Process the xml instance into a friendly dictionary."""
content = {
'data': None,
'status': status or 200,
'messages': messages or []
}
struct_nodes = xml.findall('./')
... | bsd-2-clause | 3,485,251,996,502,977,000 | 37.122449 | 104 | 0.478051 | false | 4.717172 | false | false | false |
avaitla/Haskell-to-C---Bridge | pygccxml-1.0.0/pygccxml/parser/config.py | 1 | 7092 | # Copyright 2004-2008 Roman Yakovenko.
# Distributed under the Boost Software License, Version 1.0. (See
# accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
"""This module contains the implementation of the L{config_t} class.
"""
import os
import sys
import copy
class p... | bsd-3-clause | 3,308,842,870,037,335,000 | 35.13089 | 145 | 0.558376 | false | 4.488608 | true | false | false |
LookThisCode/DeveloperBus | Season 2013/Mexico/Projects/Equipo4_MES/website/MES/settings.py | 1 | 2949 | """
Django settings for MES project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import... | apache-2.0 | 1,220,421,934,049,439,200 | 22.6 | 71 | 0.71414 | false | 3.354949 | false | false | false |
AlericInglewood/3p-google-breakpad | src/tools/gyp/pylib/gyp/__init__.py | 1 | 20572 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import copy
import gyp.input
import optparse
import os.path
import re
import shlex
import sys
import traceback
# Default debug modes for GY... | bsd-3-clause | -573,254,012,917,891,500 | 38.791103 | 81 | 0.651031 | false | 4.030564 | false | false | false |
COSMOGRAIL/COSMOULINE | pipe/modules/asciidata/asciiheader.py | 1 | 10614 | """
Various header classes to be part of the asciidata class
@author: Martin Kuemmel, Jonas Haase
@organization: Space Telescope - European Coordinating Facility (ST-ECF)
@license: Gnu Public Licence
@contact: mkuemmel@eso.org
@since: 2005/09/13
$LastChangedBy: mkuemmel $
$LastChangedDate: 2008-01-08 18:13:38 +0100 (... | gpl-3.0 | 2,816,544,044,639,738,000 | 31.658462 | 166 | 0.543904 | false | 4.304136 | false | false | false |
ninapavlich/scout-and-rove | scoutandrove/apps/sr/views.py | 1 | 1246 | from django.contrib.auth.decorators import login_required
from django.utils.decorators import method_decorator
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from django.utils import timezone
from .models import *
class SiteProfileListView(ListView):
model = Sit... | mit | -6,453,812,661,262,494,000 | 32.675676 | 79 | 0.719101 | false | 3.943038 | false | false | false |
solaris765/PythonProjects | rps.py | 1 | 2268 | '''
A simple Rock Paper Scissors game
Algorithm:
1. Have the user input r, p, or s
2. Have the computer choose a random integer (1-3)
3. Tell the user the result of the game
Todo:
- Finish mode business
- Detect if a user is repeatedly throwing the same thing and counter that
- Sweet graphics(?)
- ???
- Profit?
'''
#... | unlicense | 4,312,985,369,166,982,700 | 22.381443 | 98 | 0.571429 | false | 3.176471 | false | false | false |
PersianWikipedia/pywikibot-core | tests/textlib_tests.py | 1 | 75779 | # -*- coding: utf-8 -*-
"""Test textlib module."""
#
# (C) Pywikibot team, 2011-2020
#
# Distributed under the terms of the MIT license.
#
from __future__ import absolute_import, division, unicode_literals
import codecs
from collections import OrderedDict
import functools
import os
import re
import pywikibot
import p... | mit | -4,886,598,638,372,700,000 | 41.743228 | 79 | 0.479054 | false | 4.052705 | true | false | false |
mwclient/mwclient | mwclient/errors.py | 1 | 2408 | class MwClientError(RuntimeError):
pass
class MediaWikiVersionError(MwClientError):
pass
class APIDisabledError(MwClientError):
pass
class MaximumRetriesExceeded(MwClientError):
pass
class APIError(MwClientError):
def __init__(self, code, info, kwargs):
self.code = code
self... | mit | 992,671,874,082,866,000 | 20.122807 | 78 | 0.634136 | false | 4.060708 | false | false | false |
demisto/content | Packs/Base/Scripts/CommonServerPython/CommonServerPython.py | 1 | 291007 | """Common functions script
This script will be appended to each server script before being executed.
Please notice that to add custom common code, add it to the CommonServerUserPython script.
Note that adding code to CommonServerUserPython can override functions in CommonServerPython
"""
from __future__ import print_fu... | mit | 4,435,624,354,605,948,000 | 36.151411 | 738 | 0.577134 | false | 4.137854 | false | false | false |
kkovaacs/zorp | pylib/Zorp/SockAddr.py | 1 | 9351 | ############################################################################
##
## Copyright (c) 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
## 2010, 2011 BalaBit IT Ltd, Budapest, Hungary
##
## This program is free software; you can redistribute it and/or modify
## it under the terms of the GNU General... | gpl-2.0 | 7,737,876,345,786,557,000 | 35.960474 | 171 | 0.556411 | false | 4.37576 | false | false | false |
voostar/hp_laserprinter_monitor | frontline/frontline/settings.py | 1 | 5540 | # Django settings for chifanbu project.
import os.path
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'... | unlicense | -5,563,714,469,655,122,000 | 33.409938 | 139 | 0.686643 | false | 3.685961 | false | false | false |
segfaulthunter/asynchia | asynchia/forthcoming.py | 1 | 7047 | # -*- coding: us-ascii -*-
# asynchia - asynchronous networking library
# Copyright (C) 2009 Florian Mayer <florian.mayer@bitsrc.org>
# This program 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, eit... | gpl-3.0 | -4,675,045,574,142,878,000 | 33.043478 | 78 | 0.618277 | false | 4.234976 | false | false | false |
patrickdw123/ParanoiDF | PDFUtils.py | 1 | 15029 | # ParanoiDF. A combination of several PDF analysis/manipulation tools to
# produce one of the most technically useful PDF analysis tools.
#
# Idea proposed by Julio Hernandez-Castro, University of Kent, UK.
# By Patrick Wragg
# University of Kent
# 21/07/2014
#
# With thanks to:
# Julio... | gpl-3.0 | -899,530,424,950,584,600 | 32.103524 | 166 | 0.623461 | false | 3.648701 | false | false | false |
ratschlab/ASP | examples/undocumented/python_modular/kernel_combined_modular.py | 1 | 1900 | from tools.load import LoadMatrix
from numpy import double
lm=LoadMatrix()
traindat = double(lm.load_numbers('../data/fm_train_real.dat'))
testdat = double(lm.load_numbers('../data/fm_test_real.dat'))
traindna = lm.load_dna('../data/fm_train_dna.dat')
testdna = lm.load_dna('../data/fm_test_dna.dat')
parameter_list =... | gpl-2.0 | -7,027,474,954,381,840,000 | 36.254902 | 116 | 0.787895 | false | 2.857143 | true | false | false |
1flow/1flow | oneflow/core/migrations/0129_auto__add_notificationpreferences.py | 1 | 79648 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as 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 'NotificationPreferences'
db.create_table(u'core_notificat... | agpl-3.0 | 161,011,278,336,962,400 | 99.949303 | 226 | 0.556649 | false | 3.579525 | false | false | false |
akelge/utils | mailIdManager/account.py | 1 | 2481 | #
# account.py
# mailVirtual
#
# Created by Andrea Mistrali on 25/09/09.
# Copyright akelge@gmail.com 2009. All rights reserved.
#
# $Id$
from Foundation import *
class Accounts(object):
pl=None
binary=False
modified=False
filename=''
def __new__(cls, filename):
try:
cls.p... | gpl-2.0 | -7,802,215,055,761,493,000 | 30.0125 | 115 | 0.597743 | false | 3.870515 | false | false | false |
spacedogXYZ/sms_checkin | events/models.py | 1 | 3806 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.urlresolvers import reverse
from django.db.models import Avg, Count
from django.db import models
from django.utils import timezone
from timezone_field import TimeZoneField
from phonenumber_field.modelfields import PhoneNumberField
from ... | agpl-3.0 | 2,791,979,001,343,510,500 | 38.247423 | 110 | 0.691277 | false | 3.76087 | false | false | false |
TomAugspurger/pandas | pandas/tests/series/test_arithmetic.py | 1 | 24034 | from datetime import timedelta
import operator
import numpy as np
import pytest
import pytz
from pandas._libs.tslibs import IncompatibleFrequency
import pandas as pd
from pandas import Categorical, Index, Series, bdate_range, date_range, isna
import pandas._testing as tm
from pandas.core import nanops, ops
def _pe... | bsd-3-clause | 4,321,271,863,813,454,300 | 33.882438 | 88 | 0.544562 | false | 3.534932 | true | false | false |
simkuring/simkuring_telegram_bot | bot.py | 1 | 2433 | import requests
from time import sleep
import json
import ConfigParser
import modules
# config
config = ConfigParser.ConfigParser()
config.read("config.ini")
key = config.get("setting","key")
limit = config.getint("setting","limit")
sleepTime = config.getint("setting","sleep")
queryLimit = config.getint("setting","que... | gpl-3.0 | 7,329,419,161,624,676,000 | 26.659091 | 119 | 0.572544 | false | 3.615156 | true | false | false |
ElricleNecro/CalculServer | setup.py | 1 | 1267 | #! /usr/bin/env python3
# -*- coding:Utf8 -*-
#--------------------------------------------------------------------------------------------------------------
# All necessary import:
#--------------------------------------------------------------------------------------------------------------
import os, sys, glob
#fr... | lgpl-3.0 | 3,314,974,385,399,036,000 | 35.2 | 145 | 0.444357 | false | 4.675277 | false | false | false |
lukasmonk/lucaschess | Code/GestorOpeningLines.py | 1 | 37899 | import time
import random
from Code import Gestor
from Code import Jugada
from Code import Books
from Code import ControlPosicion
from Code import TrListas
from Code.QT import QTUtil2
from Code.QT import Iconos
from Code.QT import QTVarios
from Code import Util
from Code import OpeningLines
from Code import XMotorResp... | gpl-2.0 | 7,077,392,566,974,328,000 | 33.737855 | 154 | 0.555107 | false | 3.215595 | true | false | false |
Null01/detect-polygons-from-image | src/plot_edge_filter.py | 1 | 2379 | """
==============
Edge operators
==============
Edge operators are used in image processing within edge detection algorithms.
They are discrete differentiation operators, computing an approximation of the
gradient of the image intensity function.
"""
import numpy as np
import matplotlib.pyplot as plt
from skimage.d... | gpl-3.0 | 8,243,494,613,554,497,000 | 31.589041 | 78 | 0.720891 | false | 3.45283 | false | false | false |
seecr/weightless-core | weightless/core/__init__.py | 1 | 3794 | ## begin license ##
#
# "Weightless" is a High Performance Asynchronous Networking Library. See http://weightless.io
#
# Copyright (C) 2006-2011 Seek You Too (CQ2) http://www.cq2.nl
# Copyright (C) 2011-2012, 2015, 2020-2021 Seecr (Seek You Too B.V.) https://seecr.nl
#
# This file is part of "Weightless"
#
# "Weightles... | gpl-2.0 | -8,486,436,413,945,769,000 | 43.116279 | 105 | 0.644439 | false | 3.887295 | false | false | false |
networkjanitor/faeriawikibot | gamepedia_rw_pages.py | 1 | 13081 | import configparser
import os
import sys
import gamepedia_client
class GamepediaPagesRW:
gc = None
'''
Create new instance of GamepediaClient (required for name attribution)
'''
def create_gamepedia_client(self, username=None, password=None):
global cfg_file
if username is None:
... | mit | -1,266,205,476,075,803,100 | 50.290196 | 106 | 0.666641 | false | 3.1776 | false | false | false |
Southpaw-TACTIC/Team | src/python/Lib/site-packages/pythonwin/pywin/idle/AutoExpand.py | 1 | 2763 | import string
import re
###$ event <<expand-word>>
###$ win <Alt-slash>
###$ unix <Alt-slash>
class AutoExpand:
keydefs = {
'<<expand-word>>': ['<Alt-slash>'],
}
unix_keydefs = {
'<<expand-word>>': ['<Meta-slash>'],
}
menudefs = [
('edit', [
... | epl-1.0 | 187,856,678,564,993,900 | 28.032609 | 69 | 0.488961 | false | 3.919149 | false | false | false |
effigies/mne-python | examples/time_frequency/plot_source_power_spectrum.py | 2 | 1929 | """
=========================================================
Compute power spectrum densities of the sources with dSPM
=========================================================
Returns an STC file containing the PSD (in dB) of each of the sources.
"""
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-pariste... | bsd-3-clause | -6,288,450,017,476,853,000 | 34.072727 | 79 | 0.589943 | false | 3.269492 | false | false | false |
acysos/odoo-addons | edicom/models/edicom_albaran.py | 1 | 4074 | # -*- coding: utf-8 -*-
# Copyright 2020 Ignacio Ibeas <ignacio@acysos.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import UserError, ValidationError
import time
import logging
_logger = logging.getLogger(__name__)
class EdicomAlbar... | agpl-3.0 | -6,508,898,318,081,650,000 | 36.685185 | 79 | 0.578133 | false | 3.209779 | false | false | false |
raymak/contextualfeaturerecommender | phase1/analysis/user_to_aggregates.py | 1 | 8181 | #!/usr/bin/python
# input: csv-formatted stream, with each line corresponding to the data for a user
# output:
# assumes the input messages from a specific user are contiguous
import fileinput
import json
rev_inds = {}
FEATURE_NAMES = [
'closetabshortcut',
'newbookmark',
'newtabshortcut',
'newbookmarkshor... | mpl-2.0 | 6,887,455,980,894,750,000 | 32.666667 | 154 | 0.577802 | false | 3.828264 | false | false | false |
lizbew/code-practice | 03-weibo/base62.py | 1 | 1460 | ALPHABET = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
def rsplit(s, count):
f = lambda x: x > 0 and x or 0
return [s[f(i - count):i] for i in range(len(s), 0, -count)]
def id2mid(id):
result = ''
for i in rsplit(id, 7):
str62 = base62_encode(int(i))
result = str62... | apache-2.0 | -2,043,530,695,683,512,600 | 25.071429 | 75 | 0.586986 | false | 3.387471 | false | false | false |
LudditeLabs/query-reform | reform/utils/scrap.py | 1 | 1277 | import re
class Scrap(object):
"""
Scraps method names from the Java doc
"""
def __init__(self, file_path, out_name):
self.file_path = file_path
self.out_name = out_name
self.java_method_re = re.compile('^([a-z]+.+)\(')
self.js_method_re = re.compile('^([a-z]+): ')
... | apache-2.0 | -8,040,165,848,016,772,000 | 27.377778 | 73 | 0.530932 | false | 3.184539 | false | false | false |
varmarakesh/devops-toolbox | devops-toolbox/ftp/install.py | 1 | 1910 | __author__ = 'rakesh.varma'
from fabric.api import *
import os
import time
class install:
fuse_git_repo = 'https://github.com/s3fs-fuse/s3fs-fuse.git'
def __init__(self, host_ip, host_user, host_key_file):
env.host_string = host_ip
env.user = host_user
env.key_filename = host_key_file
... | isc | -6,202,998,654,796,628,000 | 39.659574 | 136 | 0.604188 | false | 3.07074 | false | false | false |
qedsoftware/commcare-hq | custom/world_vision/sqldata/child_sqldata.py | 1 | 33675 | import calendar
from sqlagg import CountUniqueColumn
from sqlagg.columns import SimpleColumn
from sqlagg.filters import LT, LTE, AND, GTE, GT, EQ, NOTEQ, OR, IN
from corehq.apps.reports.datatables import DataTablesHeader, DataTablesColumn
from corehq.apps.reports.sqlreport import DatabaseColumn
from corehq.apps.reports... | bsd-3-clause | -8,137,775,323,974,969,000 | 46.163866 | 164 | 0.529681 | false | 4.07984 | true | false | false |
OnroerendErfgoed/pyramid_urireferencer | pyramid_urireferencer/models.py | 1 | 4161 | # -*- coding: utf-8 -*-
import json
class RegistryResponse:
"""
Represents what the registry will send back to a client when asked if
a certain uri is used somewhere.
:param string query_uri: Uri of the resource unser survey.
:param boolean success: Were all the queries successful?
:param bo... | mit | -6,828,652,018,221,024,000 | 31.76378 | 100 | 0.596972 | false | 4.267692 | false | false | false |
googleads/google-ads-python | google/ads/googleads/v6/resources/types/currency_constant.py | 1 | 1954 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 | -3,993,784,063,970,901,500 | 32.118644 | 76 | 0.660184 | false | 4.028866 | false | false | false |
santoshghimire/IL-Jobcrawl | jobcrawl/dump_client_changes.py | 1 | 4316 | import warnings
warnings.filterwarnings("ignore")
DATE_FMT = "%d/%m/%Y"
def parse_dates(sd, ed):
if not ed:
ed = datetime.today().strftime(DATE_FMT)
return datetime.strptime(sd, DATE_FMT), datetime.strptime(ed, DATE_FMT)
def main(site, start_date, end_date):
start_date, end_date = parse_dates(... | mit | -7,969,661,471,214,422,000 | 38.236364 | 87 | 0.593605 | false | 3.575808 | false | false | false |
tchakravarty/PythonExamples | Code/Miscellaneous/FileReadWithNA.py | 1 | 1710 | __author__ = 'tirthankar'
import pandas as pd
import xlrd as xl
import numpy as np
# straight read
pdata = pd.read_csv(
"Code/Miscellaneous/Data/pwt71_11302012version/pwt71_wo_country_names_wo_g_vars.csv")
# passing a string
pdata2 = pd.read_csv("Code/Miscellaneous/Data/pwt71_11302012version/pwt71_wo_country_nam... | apache-2.0 | -7,479,459,970,993,196,000 | 24.147059 | 106 | 0.645614 | false | 2.676056 | false | false | false |
CarterBain/AlephNull | alephnull/sources/data_frame_source.py | 1 | 4637 |
#
# Copyright 2013 Quantopian, 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 w... | apache-2.0 | 4,802,013,538,821,213,000 | 29.11039 | 74 | 0.574941 | false | 4.110816 | false | false | false |
CMUSV-VisTrails/WorkflowRecommendation | vistrails/gui/modules/query_configuration.py | 1 | 6088 | ###############################################################################
##
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: vistrails@sci.utah.edu
##
## This file is part of VisTrails.
##
## "Redistribution and use in source and binary forms, with or without
## modification,... | bsd-3-clause | -6,465,648,025,933,796,000 | 40.69863 | 79 | 0.621058 | false | 4.398844 | false | false | false |
NicoVarg99/daf-recipes | ckan/ckan/ckan/ckan/tests/legacy/functional/api/model/test_ratings.py | 2 | 4089 | # encoding: utf-8
from nose.tools import assert_equal
from nose.plugins.skip import SkipTest
from ckan import model
from ckan.lib.create_test_data import CreateTestData
from ckan.tests.legacy.functional.api.base import BaseModelApiTestCase
from ckan.tests.legacy.functional.api.base import Api1TestCase as Version1Te... | gpl-3.0 | 3,643,774,490,865,021,400 | 38.317308 | 83 | 0.60944 | false | 3.73766 | true | false | false |
snufiks/nmap2db | nmap2db/database.py | 1 | 27070 | #!/usr/bin/env python
#
# Copyright (c) 2014 Rafael Martinez Guerrero (PostgreSQL-es)
# rafael@postgresql.org.es / http://www.postgresql.org.es/
#
# This file is part of Nmap2db
# https://github.com/rafaelma/nmap2db
#
# Nmap2db is free software: you can redistribute it and/or modify
# it under the terms of the GNU Gene... | gpl-3.0 | -4,005,357,262,043,700,700 | 32.669154 | 305 | 0.412893 | false | 4.848648 | false | false | false |
TunnelBlanket/Spirit | Spirit/Data/User.py | 1 | 1753 | # coding: utf-8
from sqlalchemy import Column, Integer, String, Boolean, Text, text
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
metadata = Base.metadata
class User(Base):
__tablename__ = 'users'
Id = Column(Integer, primary_key=True)
Username = Column(String(12, u'ut... | gpl-3.0 | 4,836,467,860,719,150,000 | 55.548387 | 113 | 0.705077 | false | 3.38417 | false | false | false |
qguv/config | weechat/plugins/python/imap_status.py | 1 | 5857 | # -*- coding: utf-8 -*-
# Copyright (c) 2009-2015 by xt <xt@bash.no>
# (this script requires WeeChat 0.4.2 or newer)
#
# History:
# 2019-01-26, nils_2@freenode
# version 0.9: make script python3 compatible
# : remove option "message_color" and "separator_color"
# 2016-05-07, Sebastien Helleu <flashcode@f... | gpl-3.0 | 1,555,020,943,178,162,000 | 30.320856 | 79 | 0.616869 | false | 3.435191 | true | false | false |
google/deepvariant | third_party/nucleus/util/sequence_utils.py | 1 | 4197 | # Copyright 2018 Google LLC.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
#... | bsd-3-clause | -3,947,212,933,746,330,000 | 33.68595 | 80 | 0.635692 | false | 3.235929 | false | false | false |
faircloth-lab/sh_t | sh_t/core.py | 1 | 3611 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
(c) 2014 Brant Faircloth || http://faircloth-lab.org/
All rights reserved.
This code is distributed under a 3-clause BSD license. Please see
LICENSE.txt for more information.
Created on 21 April 2014 20:54 PDT (-0700)
"""
import os
import sys
import glob
import shu... | bsd-3-clause | -438,796,830,149,700,200 | 26.356061 | 86 | 0.626696 | false | 3.73423 | false | false | false |
ciudadanointeligente/votainteligente-portal-electoral | proposal_subscriptions/migrations/0001_initial.py | 1 | 1395 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.7 on 2017-06-27 21:20
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import picklefield.fields
class Migration(migrations.Migration):
initial = True
depende... | gpl-3.0 | -2,690,039,399,188,640,000 | 38.857143 | 118 | 0.62724 | false | 4.201807 | false | false | false |
JoshData/django-annotator-store | annotator/views.py | 1 | 4909 | from django.core.exceptions import PermissionDenied, ObjectDoesNotExist
from django.core.urlresolvers import reverse
from django.http import HttpResponse, HttpResponseServerError, HttpResponseBadRequest, HttpResponseNotFound, HttpResponseForbidden
from django.views.generic import View
from django.views.generic.base imp... | unlicense | -49,917,196,215,574,370 | 34.316547 | 130 | 0.727032 | false | 3.622878 | false | false | false |
bbxyard/bbxyard | yard/skills/36-spider/spider-so/stackoverflow/spiders/stackoverflow_spider.py | 1 | 2417 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import logging
import scrapy
from stackoverflow.spiders.items import StackoverflowItem
formatter = logging.Formatter(
'%(asctime)s - %(name)s - %(levelname)s - %(message)s')
logger = logging.getLogger('monitor')
logger.setLevel(logging.INFO)
fh = logging.FileHandle... | apache-2.0 | 7,355,543,177,940,404,000 | 36.184615 | 135 | 0.570542 | false | 3.477698 | false | false | false |
iJebus/CITS4406-Assignment2 | data.py | 1 | 8727 | """Reads CSV file for information, provides basic cleaning of data and then
runs analysis on said data."""
import csv
import re
from collections import Counter
from statistics import mean, mode, median_low, median, median_high, \
StatisticsError, Decimal
# Config
threshold = 0.9
invalid_values = ['-', '*', '_']... | mit | -7,077,307,649,676,576,000 | 34.620408 | 81 | 0.595623 | false | 4.273751 | false | false | false |
septag/termite | scripts/texture-tools/etc2pack.py | 1 | 9820 | import os
import sys
import subprocess
import shutil
import optparse
import lz4.block
import json
import hashlib
import traceback
import timeit
import tempfile
from PIL import Image
ARG_InputFile = ''
ARG_ListFile = ''
ARG_OutputDir = '.'
ARG_Encoder = 'etc2_alpha'
ARG_Quality = 'normal'
ARG_FixImageSizeModulo = 4
C_... | bsd-2-clause | -2,274,651,020,613,943,800 | 34.839416 | 104 | 0.626782 | false | 3.561843 | false | false | false |
igraph/python-igraph | tests/test_edgeseq.py | 1 | 16063 | # vim:ts=4 sw=4 sts=4:
import unittest
from igraph import *
from .utils import is_pypy
try:
import numpy as np
except ImportError:
np = None
class EdgeTests(unittest.TestCase):
def setUp(self):
self.g = Graph.Full(10)
def testHash(self):
data = {}
n = self.g.ecount()
... | gpl-2.0 | -759,501,945,597,758,200 | 36.355814 | 92 | 0.560481 | false | 3.190268 | true | false | false |
DailyActie/Surrogate-Model | surrogate/crossover/tests/test_cxUniform.py | 1 | 1730 | # MIT License
#
# Copyright (c) 2016 Daily Actie
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, ... | mit | -7,992,576,133,490,520,000 | 43.358974 | 80 | 0.731792 | false | 3.418972 | false | false | false |
atomman/nmrglue | examples/jbnmr_examples/s7-s9_s3e_processing/convert.py | 4 | 1126 | import nmrglue as ng
# read in the sum data set
dic, data = ng.varian.read('.', fid_file='fid_sum', as_2d=True)
# set the spectral parameters
udic = ng.varian.guess_udic(dic, data)
udic[1]['size'] = 1500 ; udic[0]['size'] = 256
udic[1]['complex'] = True ; udic[0]['complex'] = True
ud... | bsd-3-clause | 718,106,159,891,570,200 | 37.827586 | 79 | 0.581705 | false | 2.600462 | false | false | false |
YannThorimbert/ThePhantomRacer | levelgen.py | 1 | 1323 | import random
import parameters
import track
import obstacle
class LevelGenerator:
def __init__(self, zfinish, nx, ny):
self.zfinish = zfinish
self.nx = nx
self.ny = ny
self.track = track.Track(zfinish,nx,ny)
parameters.scene.track = self.track
def add_static_obstacle... | mit | -7,094,742,456,078,290,000 | 30.5 | 77 | 0.530612 | false | 3.509284 | false | false | false |
boldprogressives/trac-GitolitePlugin | trac_gitolite/repo_manager.py | 1 | 2805 | import getpass
import pkg_resources
from trac.admin import IAdminPanelProvider
from trac.core import *
from trac.config import Option, BoolOption
from trac.perm import IPermissionRequestor
from trac.util.translation import _
from trac.web.chrome import ITemplateProvider
from trac.web.chrome import add_notice, add_warn... | bsd-3-clause | 6,899,371,258,026,229,000 | 39.652174 | 174 | 0.62139 | false | 3.934081 | false | false | false |
DaveBackus/Data_Bootcamp | Code/Lab/SPF_forecasts.py | 1 | 1126 | """
Survey of Professional Forecasters
The Philly Fed has been polling forecasters for years and posting both
summary statistics (mean forecasts, for example) and individual numbers
(suitably anonymized). We take a look at the recent data, see what's there.
Link
* https://www.philadelphiafed.org/research-and-data/rea... | mit | 8,940,016,088,585,971,000 | 24.590909 | 104 | 0.737123 | false | 2.994681 | false | false | false |
parksandwildlife/wastd | wastd/observations/migrations/0021_auto_20200622_1218.py | 1 | 1991 | # Generated by Django 2.2.10 on 2020-06-22 04:18
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('observations', '0020_auto_20200622_1045'),
]
operations = [
migrations.AddField(
model_name='encounter',
name='loca... | mit | -4,406,606,444,078,129,700 | 51.394737 | 338 | 0.637368 | false | 4.23617 | false | false | false |
maartenbreddels/vaex | packages/vaex-jupyter/vaex/jupyter/ipyleaflet.py | 1 | 1541 | import ipyleaflet as ll
import traitlets
import ipywidgets as widgets
import vaex.image
class IpyleafletImage(traitlets.HasTraits):
x_min = traitlets.CFloat()
x_max = traitlets.CFloat()
y_min = traitlets.CFloat(None, allow_none=True)
y_max = traitlets.CFloat(None, allow_none=True)
x_label = trait... | mit | 3,515,014,371,890,492,400 | 34.837209 | 103 | 0.598313 | false | 3.125761 | false | false | false |
jokajak/itweb | data/env/lib/python2.6/site-packages/transaction-1.1.1-py2.6.egg/transaction/tests/test_register_compat.py | 1 | 4007 | ##############################################################################
#
# Copyright (c) 2004 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SOF... | gpl-3.0 | 2,778,489,074,686,703,000 | 24.685897 | 78 | 0.670826 | false | 4.031187 | true | false | false |
intuition-io/insights | insights/plugins/hipchat.py | 1 | 2386 | # -*- coding: utf-8 -*-
# vim:fenc=utf-8
'''
hipchat Bot
-----------
:copyright (c) 2014 Xavier Bruhiere.
:license: Apache 2.0, see LICENSE for more details.
'''
import os
import requests
import dna.logging
log = dna.logging.logger(__name__)
class Bot(object):
'''
Hipchat api client that sends no... | apache-2.0 | -3,800,319,069,206,980,000 | 28.825 | 74 | 0.532272 | false | 3.787302 | false | false | false |
Valeureux/wezer-exchange | __unreviewed__/community_project/community_project.py | 1 | 2428 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Yannick Buron and Valeureux Copyright Valeureux.org
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# ... | agpl-3.0 | 9,197,470,633,125,033,000 | 36.353846 | 79 | 0.583196 | false | 4.504638 | false | false | false |
tensorflow/federated | tensorflow_federated/experimental/python/learning/jax_components.py | 1 | 5080 | # Copyright 2021, The TensorFlow Federated 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 law o... | apache-2.0 | 357,904,846,135,631,740 | 46.037037 | 103 | 0.745276 | false | 3.73255 | false | false | false |
kcl-ddh/chopin-online | ocve/imagetools.py | 1 | 5457 | import re
import urllib
from ocve.models import PageLegacy, SourceLegacy
from ocve.models import PageImage
from django.conf import settings
from django.utils.html import escape
import logging
__author__ = 'Elliot'
logger = logging.getLogger(__name__)
def buildOldPath(pi):
p = pi.page
pl = PageL... | gpl-3.0 | -8,405,203,046,656,316,000 | 40.302326 | 163 | 0.550852 | false | 3.309278 | false | false | false |
bhupennewalkar1337/erpnext | erpnext/utilities/transaction_base.py | 1 | 5809 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
import frappe.share
from frappe import _
from frappe.utils import cstr, now_datetime, cint, flt
from erpnext.controllers.status_updater im... | gpl-3.0 | -7,810,579,147,257,779,000 | 34.638037 | 110 | 0.667413 | false | 2.968319 | false | false | false |
Patola/patolascripts | cam.py | 1 | 7929 | #!/usr/bin/python
from gi.repository import Gtk
import sys,re,os,time
import urllib2
import subprocess,signal
bitRates={
"QVGA":(1,[128,256,384,512]),
"VGA":(0,[128,256,384,512,640,768,896,1024]),
"720P":(3,[128,256,384,512,640,768,896,1024,1280,1536,1792,2048,2560,3072,3584,4096])
}
frameRates=range(1,31)
# ... | apache-2.0 | 4,252,622,409,302,086,000 | 29.496154 | 154 | 0.599319 | false | 3.197177 | false | false | false |
JackDanger/sentry | src/sentry/models/project.py | 1 | 10877 | """
sentry.models.project
~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import, print_function
import logging
import six
import warnings
from bitfield import BitField
from django.conf ... | bsd-3-clause | -3,192,964,341,637,174,300 | 31.861027 | 114 | 0.583249 | false | 4.188294 | false | false | false |
tovrstra/sympy | sympy/matrices/matrices.py | 1 | 67422 | import warnings
from sympy import Basic, Symbol, Integer
from sympy.core import sympify
from sympy.core.basic import S
from sympy.polys import Poly, roots, cancel
from sympy.simplify import simplify
from sympy.utilities import any
# from sympy.printing import StrPrinter /cyclic/
import random
class NonSquareMatrixE... | bsd-3-clause | -3,508,994,818,285,606,000 | 30.698166 | 100 | 0.484604 | false | 3.632847 | false | false | false |
rgkirch/check-for-duplicates | walk-and-hash.py | 1 | 2040 | import os
import sys
import hashlib
# os.makedirs(dir) to make a dir
# hashfile source
# http://www.pythoncentral.io/finding-duplicate-files-with-python/
def hashfile(path, blocksize = 65536):
infile = open(path, 'rb')
hasher = hashlib.md5()
buf = infile.read(blocksize)
while len(buf) > 0:
has... | gpl-2.0 | 629,394,333,001,483,300 | 28.142857 | 82 | 0.567647 | false | 3.968872 | false | false | false |
felipedau/blueberrywsn | blueberrywsn/pi.py | 1 | 1992 | from copy import deepcopy
from threading import Event, Lock, Thread
import bluetooth as bt
from constants import UUID
from receiver import Receiver
class Pi(Thread):
def __init__(self):
Thread.__init__(self)
self._devices = {}
self._lock_devices = Lock()
self.server_sock = bt.B... | gpl-3.0 | 8,016,502,288,322,077,000 | 25.56 | 74 | 0.562249 | false | 4.081967 | false | false | false |
lexdene/pavel | pavel/grammar/parser.py | 1 | 11358 | from ply import yacc
from . import lexer
class Parser:
def __init__(self):
self._debug = False
import os
if os.environ.get('PARSER_DEBUG') == 'on':
self._debug = True
def _create_lexer(self):
return lexer.Lexer()
def parse(self, source):
if self._deb... | gpl-3.0 | -1,472,556,201,478,067,700 | 22.911579 | 101 | 0.36318 | false | 4.378566 | false | false | false |
rwl/PyCIM | CIM15/IEC61970/Meas/AccumulatorLimit.py | 1 | 2420 | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | mit | 4,569,718,613,417,140,700 | 36.8125 | 89 | 0.681818 | false | 4.165232 | false | false | false |
ResolveWang/algrithm_qa | 分类代表题目/字符串/数字翻译成字符串(动态规划).py | 1 | 1178 | """
给定一个数字,我们按照下面规则将其翻译成字符串:
0翻译成"a",1翻译成"b",...25翻译成"z",一个数字可能有多种翻译,比如
12258有5种不同的翻译,分别是"bccfi","bwfi","bczi","mcfi"和"mzfi",
求给定一个数字它的翻译方法有多少种?
思路:
套路就是求以每个位置结尾的情况有多少种翻译方式,可以通过动态规划求解
dp[i] = dp[i-1] + tmp(tmp=dp[i-2]当num_str[index-1:index+1]可以
被翻译成合法的字符,否则tmp为0)
"""
class Num2Str:
def get_total_res(self, num):
... | mit | -2,510,281,898,307,719,700 | 21.414634 | 60 | 0.502179 | false | 1.881148 | false | false | false |
marcocamma/trx | trx/cell.py | 1 | 3337 | # -*- coding: utf-8 -*-
from __future__ import print_function,division,absolute_import
import collections
import itertools
import numpy as np
from numpy import sin,cos
class Triclinic(object):
def __init__(self,a=1,b=1,c=1,alpha=90,beta=90,gamma=90):
self.a = a
self.b = b
self.c = c
alpha = alpha*np... | mit | 8,474,517,120,379,409,000 | 30.481132 | 115 | 0.594246 | false | 2.43399 | false | false | false |
ada-x/respect_mah_authoritay | movies_project.py | 1 | 2198 | import movies # my file with the class definition
import fresh_tomatoes # renders site
pi_movie = movies.Movie('Pi',
'https://www.youtube.com/watch?v=jo18VIoR2xU',
'a mathematician makes an incredible discovery',
'http://images.moviepostershop.c... | unlicense | 8,596,849,178,169,684,000 | 51.333333 | 140 | 0.572793 | false | 3.148997 | false | false | false |
garrettr/onionshare | onionshare_gui/onionshare_gui.py | 1 | 5020 | import os, sys, subprocess, inspect, platform, argparse
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.QtWebKit import *
if platform.system() == 'Darwin':
onionshare_gui_dir = os.path.dirname(__file__)
else:
onionshare_gui_dir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentfr... | gpl-3.0 | 1,164,837,602,835,972,400 | 30.572327 | 141 | 0.65996 | false | 3.608914 | false | false | false |
openweave/openweave-core | src/tools/simnet/lib/simnet/layouts/two-hans-shared-host-gateway.py | 1 | 3105 | #
# Simnet Network Layout: Two HANs with shared gateways implemented on host
#
# This simnet configuration defines two HANs, each with its own WiFi and Thread networks.
# Both HANs contain a single Weave device connected to the respective WiFi/Thread networks.
# The HANs also contain separate Gateway nodes that are imp... | apache-2.0 | -7,368,057,710,601,936,000 | 31.010309 | 91 | 0.629308 | false | 3.696429 | false | false | false |
ps-jay/temper-python | temperusb/snmp.py | 1 | 3612 | # encoding: utf-8
#
# Run snmp_temper.py as a pass-persist module for NetSNMP.
# See README.md for instructions.
#
# Copyright 2012-2014 Philipp Adelt <info@philipp.adelt.net>
#
# This code is licensed under the GNU public license (GPL). See LICENSE.md for details.
import os
import sys
import syslog
import threading
... | gpl-3.0 | -4,935,427,862,383,892,000 | 37.425532 | 127 | 0.580288 | false | 3.375701 | true | false | false |
rs2/bokeh | sphinx/source/docs/user_guide/examples/extensions_example_tool.py | 1 | 1483 | from bokeh.core.properties import Instance
from bokeh.io import output_file, show
from bokeh.models import ColumnDataSource, Tool
from bokeh.plotting import figure
output_file('tool.html')
JS_CODE = """
import * as p from "core/properties"
import {GestureTool, GestureToolView} from "models/tools/gestures/gesture_tool... | bsd-3-clause | -8,073,249,730,603,915,000 | 24.568966 | 79 | 0.685772 | false | 3.155319 | false | false | false |
amitay/samba | buildtools/wafsamba/irixcc.py | 1 | 1943 |
# compiler definition for irix/MIPSpro cc compiler
# based on suncc.py from waf
import os, optparse
import Utils, Options, Configure
import ccroot, ar
from Configure import conftest
from compiler_cc import c_compiler
c_compiler['irix'] = ['gcc', 'irixcc']
@conftest
def find_irixcc(conf):
v = conf.env
cc = ... | gpl-3.0 | 6,208,172,338,209,144,000 | 24.233766 | 73 | 0.529593 | false | 2.908683 | false | false | false |
mhl/mysociety-cvs | sitestats/pylib/sitestats/newsletters/tests/hfymp.py | 1 | 1131 | import unittest
from sitestats.newsletters.models.hfymp import HFYMPNewsletter
from tests import example_dir
from newsletter import MockPiwik, MockGoogle, newsletter_date
class HFYMPNewsletterTests(unittest.TestCase):
def setUp(self):
self.sources = {'piwik' : MockPiwik(), 'google' : MockGoog... | agpl-3.0 | 3,400,418,588,539,802,600 | 50.454545 | 104 | 0.691424 | false | 3.660194 | true | false | false |
melinath/django-graph-api | django_graph_api/tests/conftest.py | 1 | 1399 | import pytest
from test_app.models import (
Droid,
Episode,
Human,
)
@pytest.fixture
def starwars_data(transactional_db):
luke, _ = Human.objects.get_or_create(
id=1000,
name='Luke Skywalker',
)
darth_vader, _ = Human.objects.get_or_create(
id=1001,
name='Darth... | mit | -1,655,201,041,344,370,000 | 21.934426 | 64 | 0.567548 | false | 2.803607 | false | false | false |
cherepaha/PyDLV | pydlv/dl_plotter.py | 1 | 2699 | import numpy as np
import matplotlib.pyplot as plt
import matplotlib as mpl
from matplotlib import cm
from matplotlib.ticker import MaxNLocator
from mpl_toolkits.mplot3d import Axes3D
class DLPlotter:
'''
This class is responsible for plotting decision landscapes. Matplotlib is used as a background.
'''
... | gpl-3.0 | 8,262,736,209,481,907,000 | 41.857143 | 113 | 0.607262 | false | 3.190307 | false | false | false |
rsignell-usgs/notebook | pyugrid/pyugrid/test_examples.py | 1 | 2559 | #!/usr/bin/env python
"""
Some example UGRIDs to test, etc with
"""
from __future__ import (absolute_import, division, print_function)
from pyugrid import ugrid
def two_triangles():
"""
returns about the simplest triangle grid possible
4 nodes, two triangles, five edges
"""
nodes = [(0.1, 0.1... | mit | 651,994,480,699,171,300 | 21.447368 | 72 | 0.313794 | false | 3.458108 | false | false | false |
at15/ts-parallel | bin/agraph.py | 1 | 2982 | #!/usr/bin/env python3
import glob
import re
import csv
import matplotlib.pyplot as plt
def main():
data = {}
operations = ["sort", "reduce"]
types = ["int", "float", "double"]
for op in operations:
for tp in types:
# i.e. sort int
data[op + "_" + tp] = {}
r... | mit | 5,607,377,259,063,584,000 | 37.230769 | 217 | 0.450704 | false | 3.928854 | false | false | false |
cyphactor/lifecyclemanager | testenv/trac-0.10.4/trac/versioncontrol/web_ui/log.py | 1 | 9917 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2003-2006 Edgewall Software
# Copyright (C) 2003-2005 Jonas Borgström <jonas@edgewall.com>
# Copyright (C) 2005-2006 Christian Boos <cboos@neuf.fr>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of... | gpl-3.0 | -4,291,927,195,399,466,500 | 38.66 | 82 | 0.543217 | false | 3.771396 | false | false | false |
googleinterns/hw-fuzzing | experiment_scripts/plots/exp006_plot_coverage_noseeds.py | 1 | 13291 | #!/usr/bin/env python3
# Copyright 2020 Timothy Trippel
#
# 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 l... | apache-2.0 | 8,622,760,688,873,013,000 | 35.614325 | 80 | 0.587841 | false | 3.292296 | true | false | false |
alatiera/YEAP | src/rssinfo.py | 1 | 2735 | import feedparser as fp
from . import parse_feeds
def feedinfo(feed: parse_feeds.FEEDTUP) -> None:
"""Print the contents of the FeedTup of the Rss feed."""
# Based on RSS 2.0 Spec
# https://cyber.harvard.edu/rss/rss.html
print('\n----- Feed Info -----')
# Common elements
print(f'Feed Title: ... | gpl-3.0 | -6,923,101,523,011,745,000 | 28.408602 | 79 | 0.623766 | false | 3.484076 | false | false | false |
democratech/LaPrimaire | tools/simulation/simulation_lots.py | 1 | 2675 | import numpy as np
import mj
import matplotlib.pyplot as plt
from matplotlib import cm
import sys, os
# ---------------------------------------------------------------------------------------------------
# montrer que l'algorithme de construction des lots est fiable
#
Ncandidats = 100
electeurs = np.arange(10000,1... | agpl-3.0 | 1,603,931,362,166,058,000 | 28.406593 | 101 | 0.582804 | false | 2.780665 | false | false | false |
aerler/WRF-Projects | src/archive/plotInnerPrecip.py | 1 | 6163 | '''
Created on 2012-09-29
A simple script that reads a WRF netcdf-4 file and displays a 2D field in a proper geographic projection;
application here is plotting precipitation in the inner WRF domain.
@author: Andre R. Erler
'''
## includes
# matplotlib config: size etc.
import numpy as np
import matplotlib.pylab as ... | gpl-3.0 | 8,309,401,785,416,781,000 | 41.212329 | 122 | 0.651631 | false | 2.753798 | false | false | false |
ralucagoja/pentagram | practica/practica/settings.py | 1 | 2699 | """
Django settings for practica 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, ...)
imp... | gpl-3.0 | -5,448,509,871,541,174,000 | 23.324324 | 71 | 0.712116 | false | 3.251807 | false | false | false |
belokop/indico_bare | indico_zodbimport/modules/event_categories.py | 1 | 3197 | # This file is part of Indico.
# Copyright (C) 2002 - 2016 European Organization for Nuclear Research (CERN).
#
# Indico 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 | 1,307,890,533,711,365,600 | 42.202703 | 106 | 0.649984 | false | 4.026448 | false | false | false |
blancha/abcngspipelines | bischipseq/convert1StartTo0Start_batch.py | 1 | 2156 | #!/usr/bin/env python3
# Version 1.0
# Author Alexis Blanchet-Cohen
# Date: 15/06/2014
import argparse
import glob
import os
import subprocess
import util
# Read the command line arguments.
parser = argparse.ArgumentParser(description='Generate scripts to convert bedgraph files from one-based start to zero-based sta... | gpl-3.0 | -3,264,305,320,030,537,000 | 40.461538 | 157 | 0.728664 | false | 3.551895 | false | false | false |
CyberLabs-BR/face_detect | pyimagesearch/nn/conv/minivggnet.py | 1 | 1990 | # import the necessary packages
from keras.models import Sequential
from keras.layers.normalization import BatchNormalization
from keras.layers.convolutional import Conv2D
from keras.layers.convolutional import MaxPooling2D
from keras.layers.core import Activation
from keras.layers.core import Flatten
from keras.layers... | mit | 1,556,194,539,473,619,200 | 32.183333 | 60 | 0.724623 | false | 3.199357 | false | false | false |
dl1ksv/gr-display | docs/doxygen/doxyxml/text.py | 1 | 1297 | #
# Copyright 2010 Free Software Foundation, Inc.
#
# This file was generated by gr_modtool, a tool from the GNU Radio framework
# This file is a part of gr-display
#
# SPDX-License-Identifier: GPL-3.0-or-later
#
#
"""
Utilities for extracting text from generated classes.
"""
from __future__ import unicode_literals
de... | gpl-3.0 | 8,988,638,054,465,679,000 | 27.195652 | 100 | 0.643022 | false | 3.918429 | false | false | false |
bmun/huxley | huxley/core/admin/committee_feedback.py | 1 | 4452 | # Copyright (c) 2011-2021 Berkeley Model United Nations. All rights reserved.
# Use of this source code is governed by a BSD License (see LICENSE).
import csv
from django.conf import settings
from django.conf.urls import url
from django.contrib import admin
from django.urls import reverse
from django.http import Http... | bsd-3-clause | -1,210,776,847,596,304,000 | 39.472727 | 77 | 0.590296 | false | 3.964381 | false | false | false |
hankcs/udacity-deep-learning | 2_fullyconnected.py | 1 | 12463 | # coding: utf-8
# Deep Learning
# =============
#
# Assignment 2
# ------------
#
# Previously in `1_notmnist.ipynb`, we created a pickle with formatted datasets for training, development and testing on the [notMNIST dataset](http://yaroslavvb.blogspot.com/2011/09/notmnist-dataset.html).
#
# The goal of this assignm... | gpl-3.0 | 6,008,777,394,889,813,000 | 40.405316 | 243 | 0.672872 | false | 3.665588 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.