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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
flynx/pli | pli/persistance/sql/shelve.py | 1 | 2359 | #=======================================================================
__version__ = '''0.0.01'''
__sub_version__ = '''20070108034250'''
__copyright__ = '''(c) Alex A. Naanou 2003'''
#-----------------------------------------------------------------------
import pli.pattern.mixin.mapping as mapping
#-----------... | bsd-3-clause | -5,785,789,768,299,703,000 | 25.505618 | 76 | 0.52607 | false | 3.438776 | false | false | false |
nextgis/osm_adm | ru_classifier/oktmo/mosclassific.py | 1 | 4088 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from urllib2 import Request, urlopen, HTTPError
import re
from BeautifulSoup import BeautifulSoup
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
from sys import stderr
import time
UA = 'Mozilla/5.0 (compatible; MSIE 5.5; Windows NT)'
def _fetch_page(url):
... | gpl-2.0 | 3,388,627,038,287,686,700 | 29.864407 | 100 | 0.599945 | false | 2.402375 | false | false | false |
chemelnucfin/tensorflow | tensorflow/python/training/optimizer.py | 1 | 49527 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -3,893,526,302,688,658,000 | 38.84473 | 112 | 0.671714 | false | 4.111489 | false | false | false |
isc-projects/forge | tests/protosupport/v6/srv_msg.py | 1 | 45127 | # Copyright (C) 2012-2020 Internet Systems Consortium.
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET ... | isc | 2,961,182,497,636,292,000 | 36.543261 | 141 | 0.570878 | false | 3.677832 | false | false | false |
pinkeshbadjatiya/listenbrainz-server | listenstore/listenstore/listen.py | 1 | 2104 | # coding=utf-8
from __future__ import division, absolute_import, print_function, unicode_literals
import ujson
from datetime import datetime
import calendar
class Listen(object):
""" Represents a listen object """
def __init__(self, user_id=None, timestamp=None, artist_msid=None, album_msid=None,
... | gpl-2.0 | 8,986,556,442,015,055,000 | 37.962963 | 106 | 0.592205 | false | 3.704225 | false | false | false |
mozilla/kitsune | kitsune/kpi/management/commands/update_l10n_metric.py | 1 | 2630 | from datetime import date, timedelta
from django.conf import settings
from django.core.management.base import BaseCommand
from kitsune.kpi.management import utils
from kitsune.kpi.models import L10N_METRIC_CODE, Metric, MetricKind
from kitsune.sumo import googleanalytics
class Command(BaseCommand):
help = "Calc... | bsd-3-clause | -4,162,794,303,850,482,700 | 38.253731 | 96 | 0.620152 | false | 3.861968 | false | false | false |
mikeireland/pynrm | go.py | 1 | 3044 | # -*- coding: utf-8 -*-
"""
Created on Fri May 2 13:49:11 2014
@author: mireland
A script for testing... Change this to try out your own analysis.
"""
import astropy.io.fits as pyfits
import numpy as np
import matplotlib.pyplot as plt
from azimuthalAverage import *
# This includes an AO Instrument called "aoinst"
... | mit | 485,956,035,243,356,400 | 32.450549 | 112 | 0.669185 | false | 2.423567 | false | false | false |
liveaverage/baruwa | src/baruwa/messages/management/commands/updatesarules.py | 1 | 2104 | #
# Baruwa - Web 2.0 MailScanner front-end.
# Copyright (C) 2010-2012 Andrew Colin Kissa <andrew@topdog.za.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License... | gpl-2.0 | -2,498,919,949,420,552,000 | 35.912281 | 73 | 0.620722 | false | 4.069632 | false | false | false |
unicef/un-partner-portal | backend/unpp_api/apps/project/exports/pdf/cfei.py | 1 | 10729 | import hashlib
import os
import tempfile
from urllib.parse import quote
from collections import defaultdict
from babel.dates import get_timezone, format_datetime, format_date
from django.http import HttpResponse
from django.utils import timezone
from reportlab.lib import colors
from reportlab.lib.enums import TA_CENTE... | apache-2.0 | -6,228,119,588,589,943,000 | 35.003356 | 117 | 0.530338 | false | 4.076368 | false | false | false |
myarjunar/QGIS | python/plugins/processing/gui/ScriptEdit.py | 1 | 7614 | # -*- coding: utf-8 -*-
"""
***************************************************************************
ScriptEdit.py
---------------------
Date : April 2013
Copyright : (C) 2013 by Alexander Bruy
Email : alexander dot bruy at gmail dot com
****************... | gpl-2.0 | 8,183,763,172,976,205,000 | 34.746479 | 79 | 0.5855 | false | 4.007368 | false | false | false |
rockfruit/bika.lims | bika/lims/browser/viewlets.py | 1 | 5596 | # This file is part of Bika LIMS
#
# Copyright 2011-2016 by it's authors.
# Some rights reserved. See LICENSE.txt, AUTHORS.txt.
import json
import urllib
import time
from Products.CMFCore.utils import getToolByName
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from plone import api
from plon... | agpl-3.0 | 2,753,649,612,882,502,000 | 34.417722 | 79 | 0.629378 | false | 4.07278 | false | false | false |
jgerschler/ESL-Games | Kinect/Adjective Adverb/Adverb or Adjective (Deprecated)/AdverbOrAdjectiveFullScreen.py | 1 | 12778 | # for python 3
# You'll need to customize this according to your needs. Proper orientation of
# the kinect is vital; if participants are able to maintain their head or wrists
# continuously inside the word rects, they will repeatedly trigger the collision
# detection
from pykinect2 import PyKinectV2
from pykinect2.PyKi... | mit | -6,398,711,910,049,684,000 | 48.527132 | 140 | 0.529191 | false | 3.742824 | false | false | false |
1kastner/analyse_weather_data | gather_weather_data/wunderground/summarize_raw_airport_data.py | 1 | 8898 | """
Summarize all downloaded airport weather station data files.
Uses UTC time zone.
Use
-m gather_weather_data.wunderground.summarize_raw_airport_data
to run the demo
"""
import os
import json
import datetime
import logging
import numpy
import pandas
import metar.Metar # needs https://github.com/tomp/python-meta... | agpl-3.0 | 770,557,623,363,537,300 | 36.70339 | 119 | 0.647786 | false | 3.447501 | false | false | false |
uber/ludwig | ludwig/encoders/sequence_encoders.py | 1 | 102959 | #! /usr/bin/env python
# coding=utf-8
# Copyright (c) 2019 Uber Technologies, 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
#
# Unles... | apache-2.0 | -4,513,123,417,475,683,300 | 47.519793 | 88 | 0.562719 | false | 4.949 | false | false | false |
husman/WoTrack | apps/wordtrack/levenshtein_reduce.py | 1 | 1308 | from nltk import metrics
class LevenshteinReduce(object):
def __init__(self, phrase, tracks):
"""
:param phrase: (str) phrase or ngram
:param tracks: (list) tacks to perform best string matching with
:return: Returns the track from the list of tracks best matching the given phrase... | mit | 3,303,247,753,938,505,700 | 30.926829 | 89 | 0.541284 | false | 4.374582 | false | false | false |
samuelclay/NewsBlur | apps/monitor/views/newsblur_app_times.py | 1 | 1188 | from django.views import View
from django.shortcuts import render
import datetime
from django.conf import settings
class AppTimes(View):
def get(self, request):
servers = dict((("%s" % s['_id'], s['page_load']) for s in self.stats))
data = servers
chart_name = "app_times"
chart_typ... | mit | 787,922,604,095,509,000 | 28.7 | 98 | 0.496633 | false | 3.986577 | false | false | false |
AustP/Gitso | ArgsParser.py | 1 | 6563 | #! /usr/bin/env python
"""
Gisto - Gitso is to support others
Gitso is a utility to facilitate the connection of VNC
@author: Aaron Gerber ('gerberad') <gerberad@gmail.com>
@author: Derek Buranen ('burner') <derek@buranen.info>
@author: AustP
@copyright: 2008 - 2014
Gitso is free software: you can redistribute it a... | gpl-3.0 | 8,648,307,074,989,359,000 | 31.171569 | 134 | 0.612525 | false | 2.919484 | false | false | false |
googleapis/python-bigquery | tests/unit/helpers.py | 1 | 2391 | # Copyright 2018 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 or agreed to in writing, s... | apache-2.0 | -3,217,451,600,862,831,600 | 28.158537 | 88 | 0.726474 | false | 3.678462 | false | false | false |
marios-zindilis/musicbrainz-django-models | musicbrainz_django_models/models/l_release_group_url.py | 1 | 2149 | """
.. module:: l_release_group_url
The **L Release Group Url** Model.
PostgreSQL Definition
---------------------
The :code:`l_release_group_url` table is defined in the MusicBrainz Server as:
.. code-block:: sql
CREATE TABLE l_release_group_url ( -- replicate
id SERIAL,
link ... | gpl-2.0 | 6,486,950,495,496,527,000 | 35.423729 | 82 | 0.652862 | false | 4.172816 | false | false | false |
VerstandInvictus/PatternsEmerge | backend/mdcore.py | 1 | 2290 | import codecs
import config
import unidecode
from pyvirtualdisplay import Display
from time import sleep
from selenium import webdriver, common
user_agent = 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36' \
' (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36'
class mdLogger:
def __init... | mit | 7,318,596,778,538,684,000 | 34.230769 | 77 | 0.625328 | false | 3.658147 | false | false | false |
dpapathanasiou/cmdline-news | cmdlinenews.py | 1 | 10334 | #!/usr/bin/env python
"""
This module uses feedparser to get item titles and links from any rss
feed, and presents the results as simple command-line output.
It's great for browsing your favorite sites unobtrusively, without having
to open a browser window.
Feeds are memoized for feed_memoize_interval seconds after ... | mit | -3,972,210,597,351,385,000 | 33.677852 | 103 | 0.566093 | false | 4.108946 | false | false | false |
mwalter416/mse | mse.py | 1 | 3866 | import json
import urllib2
mseServers=[
'1.2.3.4',
'5.6.7.8',
'9.10.11.12'
]
def getClients(server, user, password):
passwordManager = urllib2.HTTPPasswordMgrWithDefaultRealm()
passwordManager.add_password(None,"https://"+server+"/",user,password)
authHandler = urlli... | gpl-3.0 | -870,076,906,316,883,200 | 41.955556 | 210 | 0.605277 | false | 4.073762 | false | false | false |
tjcsl/ion | intranet/apps/groups/views.py | 1 | 1335 | import logging
from django.contrib.auth import get_user_model
from django.contrib.auth.decorators import login_required
from django.shortcuts import render
from ..auth.decorators import admin_required, deny_restricted
from .forms import GroupForm
from .models import Group
logger = logging.getLogger(__name__)
# thi... | gpl-2.0 | -4,160,988,958,609,916,400 | 30.785714 | 127 | 0.698876 | false | 3.825215 | false | false | false |
305120262/ArcGISServerManageTools | GetServerLog.py | 1 | 3475 | #coding=utf-8
"""
-------------------------------------------------------------------------------
Name: getsvrlog.py
Purpose: Collect ArcGIS Server Site Logs
Author: Sean.L (luwl@esrichina.com.cn)
Created: 8/25/16
Copyright: (c) Sean.L 2016
---------------------------------------------------------... | apache-2.0 | -3,539,942,323,636,875,000 | 31.783019 | 98 | 0.573237 | false | 3.781284 | false | false | false |
apporc/neutron | neutron/db/address_scope_db.py | 1 | 5406 | # Copyright (c) 2015 Huawei Technologies Co.,LTD.
#
# 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 app... | apache-2.0 | 7,848,985,610,826,370,000 | 42.596774 | 78 | 0.617462 | false | 4.133028 | false | false | false |
michaldaniel/Ebook-Viewer | src/main.py | 1 | 3097 | #!/usr/bin/env python3
# Easy eBook Viewer by Michal Daniel
# Easy eBook Viewer is free software; you can redistribute it and/or modify it under the terms
# of the GNU General Public Licence as published by the Free Software Foundation.
# Easy eBook Viewer is distributed in the hope that it will be useful, but WITHO... | gpl-3.0 | 7,647,124,034,847,273,000 | 36.768293 | 94 | 0.649338 | false | 3.772229 | false | false | false |
gersteinlab/AlleleDB | alleledb_pipeline/fasta.py | 1 | 1219 |
import sys
class fastaReader:
def __init__(self, fn):
self.done=False
self.ifile=open(fn)
self.hdr=self.ifile.readline().rstrip()
def __iter__(self):
return self
def next(self):
if self.done:
raise StopIteration
body=''
while True:
... | cc0-1.0 | -6,581,678,336,333,099,000 | 24.93617 | 56 | 0.496308 | false | 3.553936 | false | false | false |
mishravikas/geonode-cas | geonode/api/api.py | 1 | 6609 | from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from django.contrib.contenttypes.models import ContentType
from geonode.base.models import TopicCategory
from geonode.layers.models import Layer
from geonode.maps.models import Map
from geonode.documents.models import Document
fro... | gpl-3.0 | -4,784,719,522,403,801,000 | 30.626794 | 104 | 0.64397 | false | 4.032337 | false | false | false |
thezbyg/gpick | tools/gpick.py | 1 | 5990 | import os, time, re, string, glob, subprocess
from .gettext import *
from .resource_template import *
from .ragel import *
from .template import *
from SCons.Script import Chmod, Flatten
from SCons.Util import NodeList
from SCons.Script.SConscript import SConsEnvironment
def MatchFiles (files, path, repath, dir_exclud... | bsd-3-clause | -5,433,451,065,571,015,000 | 28.95 | 162 | 0.674624 | false | 2.975658 | false | false | false |
wangyao1052/PyLitMath | LitMath/Quaternion.py | 1 | 7864 | import math
import Util
class Quaternion(object):
__slots__ = ['x', 'y', 'z', 'w']
__hash__ = None
def __init__(self, x=0.0, y=0.0, z=0.0, w=1.0):
self.x = float(x)
self.y = float(y)
self.z = float(z)
self.w = float(w)
def set(self, x, y, z, w):
sel... | mit | 6,612,314,253,307,068,000 | 30.71371 | 86 | 0.47177 | false | 3.11816 | false | false | false |
avaitla/Haskell-to-C---Bridge | pygccxml-1.0.0/unittests/has_binary_operator_traits_tester.py | 1 | 1826 | # 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)
import unittest
import autoconfig
import parser_test_case
from pygccxml import utils
from pygccxml import parser
fr... | bsd-3-clause | -7,846,514,007,162,185,000 | 35.306122 | 101 | 0.609529 | false | 3.681452 | true | false | false |
blkFinch/hutch-val-pair-project | AdventureGameMain.py | 1 | 6122 | '''
This is our main file
'''
import random
from Player import Player
def intro(): #intro to the GAME
print('Good morning')
input('What a weird dream you woke from, huh? PRESS ENTER')
input('Maybe once you open your eyes ... PRESS ENTER')
input('You will see something IS a little off ... PRESS ENTER')... | mit | -6,399,877,454,721,388,000 | 26.701357 | 88 | 0.526299 | false | 3.5063 | false | false | false |
anthonybishopric/pyboxfs | setup.py | 1 | 2401 | #!/usr/bin/env python
#from distribute_setup import use_setuptools
#use_setuptools()
from setuptools import setup
import sys
PY3 = sys.version_info >= (3,)
VERSION = "0.4.1"
COMMANDS = ['fscat',
'fscp',
'fsinfo',
'fsls',
'fsmv',
'fscp',
'fsrm',... | bsd-3-clause | 3,206,000,054,005,804,000 | 30.592105 | 251 | 0.572262 | false | 4.035294 | false | false | false |
jkyeung/XlsxWriter | xlsxwriter/test/comparison/test_autofilter07.py | 1 | 2715 | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2016, John McNamara, jmcnamara@cpan.org
#
from ..excel_comparsion_test import ExcelComparisonTest
from ...workbook import Workbook
class TestCompareXLSXFiles(ExcelComparisonTest):
"""... | bsd-2-clause | -4,847,764,919,581,915,000 | 28.51087 | 79 | 0.556169 | false | 4.330144 | true | false | false |
Xarenn/Clint | check_exercise.py | 1 | 1492 | from sys import platform
import subprocess
from web_utils import get_text
import psutil
application_code = get_text()
ClintC = ["system" , "cmd" , "fstream"]
ClintJava = ["cmd" , "Runtime" , "Process" , "InputStream" ]
ClintPython = ["popen" , "getopt" , "sys" , "cmd"]
def kill(pid):
process = psutil.Process(pi... | gpl-3.0 | 853,967,924,178,594,600 | 29.44898 | 81 | 0.644772 | false | 3.337808 | false | false | false |
upconsulting/IsisCB | isiscb/isisdata/migrations/0024_auto_20160623_2302.py | 1 | 2305 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-06-23 23:02
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('isisdata', '0023_auto_20160621_1726'),
]
operations... | mit | -2,416,223,021,765,066,000 | 58.102564 | 568 | 0.598698 | false | 3.399705 | false | false | false |
stuckj/dupeguru | cocoa/base/ui/main_menu.py | 1 | 4535 | ownerclass = 'AppDelegateBase'
ownerimport = 'AppDelegateBase.h'
edition = args.get('edition', 'se')
result = Menu("")
appMenu = result.addMenu("dupeGuru")
fileMenu = result.addMenu("File")
editMenu = result.addMenu("Edit")
actionMenu = result.addMenu("Actions")
owner.columnsMenu = result.addMenu("Columns")
modeMenu =... | gpl-3.0 | 4,438,039,141,243,665,400 | 54.304878 | 104 | 0.74333 | false | 3.267291 | false | false | false |
alex/changes | changes/jobs/sync_build.py | 1 | 3768 | from datetime import datetime
from flask import current_app
from sqlalchemy.sql import func
from changes.config import db, queue
from changes.constants import Result, Status
from changes.db.utils import try_create
from changes.jobs.signals import fire_signal
from changes.models import Build, ItemStat, Job
from changes... | apache-2.0 | 3,599,841,873,223,517,700 | 29.634146 | 96 | 0.649151 | false | 3.715976 | false | false | false |
xiafan68/socialtsquery | script/transform/mergetransform.py | 1 | 6150 | # encoding:utf8
import sys
import os
import json
from optparse import OptionParser
class Transformer(object):
def __init__(self, idir, prefixs, start):
self.idir = idir.decode("utf8")
self.prefixs = prefixs
self.start = start
def loadRecs(self, xaxis, yaxis):
self.xaxis = xaxis... | apache-2.0 | 178,341,992,861,829,660 | 38.921569 | 273 | 0.54224 | false | 3.443067 | false | false | false |
EdDev/vdsm | tests/throttledlog_test.py | 1 | 3208 | #
# Copyright 2016 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in th... | gpl-2.0 | 3,209,195,312,421,084,700 | 33.494624 | 79 | 0.642145 | false | 3.783019 | true | false | false |
chisimba/modules | geonames/resources/loadgeodata.py | 1 | 8244 |
import fileinput
import time
import base64
import xmlrpclib
import os
import random
import sys
import zipfile
import os.path
#Define some variables (Change these to suit your circumstances!)
SERV = 'http://127.0.0.1/'
UNAME = 'admin'
PWORD = 'a'
APIENDPOINT = '/app/index.php?module=api'
# -- END EDITABLE REGION -- Pl... | gpl-2.0 | 6,628,066,400,187,882,000 | 29.761194 | 221 | 0.635978 | false | 3.678715 | false | false | false |
elthariel/dff | api/gui/widget/nodetree.py | 1 | 4524 | # DFF -- An Open Source Digital Forensics Framework
# Copyright (C) 2009-2010 ArxSys
# This program is free software, distributed under the terms of
# the GNU General Public License Version 2. See the LICENSE file
# at the top of the source tree.
#
# See http://www.digital-forensic.org for more information about this... | gpl-2.0 | 1,806,217,078,347,832,600 | 38.33913 | 155 | 0.630195 | false | 4.173432 | false | false | false |
developerworks/horizon | horizon/templatetags/horizon.py | 1 | 4694 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | apache-2.0 | -6,105,045,522,224,733,000 | 33.014493 | 79 | 0.655731 | false | 4.039587 | false | false | false |
rishubhjain/monitoring-integration | setup.py | 1 | 3872 | import re
from setuptools import Command
from setuptools import find_packages
from setuptools import setup
import subprocess
try:
# Python 2 backwards compat
from __builtin__ import raw_input as input
except ImportError:
pass
def read_module_contents():
with open('version.py') as app_init:
ret... | lgpl-2.1 | 833,820,315,377,622,100 | 29.015504 | 89 | 0.57593 | false | 3.84127 | false | false | false |
amadeusproject/amadeuslms | log/search.py | 1 | 20242 | from elasticsearch_dsl.connections import connections
from elasticsearch_dsl import (
Q,
DocType,
Text,
Date,
Integer,
Long,
Object,
Search,
MultiSearch,
A
)
from elasticsearch.helpers import bulk
from elasticsearch import Elasticsearch
from datetime import datetime, timedelta
fr... | gpl-2.0 | -6,597,723,901,138,538,000 | 24.984596 | 101 | 0.421105 | false | 4.025855 | false | false | false |
kubeflow/tf-operator | sdk/python/kubeflow/tfjob/models/v1_tf_job_list.py | 1 | 7083 | # Copyright 2019 kubeflow.org.
#
# 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 | -8,458,928,608,242,113,000 | 31.342466 | 295 | 0.605817 | false | 3.937187 | false | false | false |
teriyakichild/python-zcli | zcli/ClsDict.py | 1 | 6115 |
# Why cls_state... cls_state is a portable attrdict
class ClsDict(dict):
"""This is an attrdict implementation that provides:
* property access for dict elements
* overrides for properties
*
* Override getitem, setitem, getattr, and setattr to provide the following behaviors:
@property deco... | apache-2.0 | 5,009,992,875,838,406,000 | 42.06338 | 90 | 0.502371 | false | 4.466764 | false | false | false |
peteboyd/lammps_interface | lammps_interface/lammps_potentials.py | 1 | 45269 | #!/usr/bin/env python
"""
Lammps potentital types.
"""
class BondPotential(object):
"""
Class to hold bond styles that are implemented in lammps
Purpose is to store info that the user wants to use to overwrite standard UFF output of lammps_interface
"""
class Class2(object):
"""Potential ... | mit | -365,919,329,613,635,260 | 32.833333 | 154 | 0.368354 | false | 4.022124 | false | false | false |
docusign/docusign-python-client | docusign_esign/models/form_data_item.py | 1 | 6485 | # coding: utf-8
"""
DocuSign REST API
The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501
OpenAPI spec version: v2.1
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.gi... | mit | 5,604,492,730,149,338,000 | 27.568282 | 140 | 0.568851 | false | 4.078616 | false | false | false |
dragondjf/musicplayer | objbrowser/__init__.py | 1 | 2196 | """ objbrowser package
"""
__all__ = ['browse', 'execute', 'create_object_browser', 'logging_basic_config']
import sys, os, logging, pprint, inspect
from PyQt5 import QtCore
from PyQt5 import QtGui
from PyQt5 import QtWidgets
from objbrowser.objectbrowser import ObjectBrowser
from objbrowser.version import PROGRAM_NA... | gpl-2.0 | 9,170,331,517,159,916,000 | 29.5 | 92 | 0.656648 | false | 3.985481 | false | false | false |
kapily/dropcast | tal_scraper.py | 1 | 4679 | import urllib2
from bs4 import BeautifulSoup
import json
episode_page = 'https://www.thisamericanlife.org/radio-archives/episode/%i'
DOWNLOAD_URL = 'http://audio.thisamericanlife.org/jomamashouse/ismymamashouse/%i.mp3'
import re
def get_episode_info(episode_id):
req = urllib2.Request(episode_page % episode_id, he... | mit | -5,505,101,537,983,017,000 | 38.652542 | 135 | 0.566574 | false | 3.306714 | false | false | false |
IceCubeDev/hackerschool | WebServer/1.0/JUNK/simple/LogAnalyse.py | 1 | 1674 | __author__ = 'Ivan Dortulov'
class Client(object):
def __init__(self, id):
self.history = ["connect"]
self.name = id
import xml.etree.ElementTree as ET
tree = ET.parse('/home/ivan/Documents/Python/SubTasking/log.xml')
root = tree.getroot()
clients = []
def find_client(id):
for client in cl... | gpl-2.0 | 2,940,849,170,953,890,300 | 26.016129 | 76 | 0.568698 | false | 3.778781 | false | false | false |
TaliesinSkye/evennia | src/typeclasses/models.py | 1 | 52630 | """
This is the *abstract* django models for many of the database objects
in Evennia. A django abstract (obs, not the same as a Python metaclass!) is
a model which is not actually created in the database, but which only exists
for other models to inherit from, to avoid code duplication. Any model can
import and inherit... | bsd-3-clause | 1,408,945,110,943,835,400 | 39.144928 | 354 | 0.601463 | false | 4.244697 | false | false | false |
maloep/romcollectionbrowser | resources/lib/xbmc.py | 1 | 35342 | ## @package xbmc
# Various classes and functions to interact with XBMC.
#
"""
Various classes and functions to interact with Kodi.
"""
from builtins import str
from builtins import object
import os
import xbmcgui as _xbmcgui
_loglevel = 1
_settings = {'external_filemanaging': 'true'}
_filename = 'dummy.l... | gpl-2.0 | -1,056,369,458,410,369,400 | 23.316619 | 115 | 0.573029 | false | 4.307374 | false | false | false |
tactcomplabs/gc64-hmcsim | test/sst/6.0.0/goblin_singlestream2.py | 1 | 2128 | import sst
# Define SST core options
sst.setProgramOption("timebase", "1ps")
sst.setProgramOption("stopAtCycle", "0 ns")
# Define the simulation components
comp_cpu = sst.Component("cpu", "miranda.BaseCPU")
comp_cpu.addParams({
"verbose" : 0,
"generator" : "miranda.SingleStreamGenerator",
"generatorParams.verbose"... | bsd-2-clause | -6,510,001,266,288,083,000 | 30.761194 | 109 | 0.653665 | false | 2.852547 | false | true | false |
rhcarvalho/kombu | kombu/transport/django/__init__.py | 1 | 1865 | """Kombu transport using the Django database as a message store."""
from __future__ import absolute_import
from django.conf import settings
from django.core import exceptions as errors
from kombu.five import Empty
from kombu.transport import virtual
from kombu.utils.encoding import bytes_to_str
from kombu.utils.json ... | bsd-3-clause | -3,546,270,812,444,046,300 | 26.426471 | 78 | 0.64933 | false | 3.775304 | false | false | false |
robwarm/gpaw-symm | gpaw/test/td_na2.py | 1 | 2589 | from ase import Atoms
from ase.units import Bohr
from gpaw import GPAW
from gpaw.tddft import TDDFT, photoabsorption_spectrum, \
LinearAbsorbingBoundary, P4AbsorbingBoundary, PML
from gpaw.test import equal
import os
# Sodium dimer, Na2
d = 1.5
atoms = Atoms(symbols='Na2',
positions=[( 0, 0, d),
... | gpl-3.0 | -2,869,614,445,619,258,000 | 27.766667 | 76 | 0.693704 | false | 2.324057 | false | false | false |
omaciel/robottelo | tests/upgrades/test_remoteexecution.py | 1 | 11012 | """Test for Remote Execution related Upgrade Scenario's
:Requirement: Upgraded Satellite
:CaseAutomation: Automated
:CaseLevel: Acceptance
:CaseComponent: API
:TestType: Functional
:CaseImportance: High
:Upstream: No
"""
from nailgun import entities
from robottelo.constants import DEFAULT_LOC, DEFAULT_ORG, DISTR... | gpl-3.0 | 1,559,263,921,155,933,400 | 39.189781 | 96 | 0.589266 | false | 4.128984 | true | false | false |
zhangyake/python-itchat | test/songCloudImage.py | 1 | 2058 | '''
通过用户id 获取网易云音乐用户听歌历史
歌曲云图
'''
import time
from os import path
from selenium import webdriver
import numpy as np
from bs4 import BeautifulSoup
from PIL import Image
from wordcloud import WordCloud
class SongCloudImage(object):
baseUrl = 'http://music.163.com/#/user/songs/rank?id={}'
def __init__(self, ... | mit | -7,244,206,359,720,226,000 | 32.724138 | 202 | 0.588957 | false | 2.954683 | false | false | false |
Paulius-Maruska/python-isign | src/isign/connection.py | 1 | 1919 | from typing import Dict, Union
import requests
from .environment import (
get_default_environment,
ISignEnvironment,
)
from .error import ISignError
class ISignConnection:
def __init__(self,
access_token: str,
user_agent: str = "Python iSign",
environme... | mit | -2,141,897,105,286,535,700 | 35.903846 | 102 | 0.606045 | false | 4.091684 | false | false | false |
USCDataScience/polar.usc.edu | html/team3-a3/app.py | 1 | 3694 | from flask import Flask, jsonify, send_from_directory, redirect, request
import requests
import os
url = 'http://54.183.25.174:9200/polar.usc.edu/_search?q=*:*&size=10000&fields='
#res = requests.get()
#result = res.json()['hits']['hits']
#print len(result)
data = []
with open('datasize.json', 'rb') as f:
data = e... | apache-2.0 | -6,820,167,529,576,510,000 | 28.31746 | 84 | 0.546291 | false | 3.60039 | false | false | false |
aliyun/aliyun-oss-python-sdk | tests/test_server_side_encryotion.py | 1 | 19249 | # -*- coding: utf-8 -*-
from .common import *
from oss2.models import ServerSideEncryptionRule, PartInfo
from oss2 import (SERVER_SIDE_ENCRYPTION_KMS, SERVER_SIDE_ENCRYPTION_AES256,
SERVER_SIDE_ENCRYPTION_SM4, KMS_DATA_ENCRYPTION_SM4)
from oss2.headers import (OSS_SERVER_SIDE_ENCRYPTION, OSS_SERVER_S... | mit | 1,040,213,598,630,709,200 | 46.528395 | 158 | 0.664814 | false | 3.354069 | true | false | false |
pythonprobr/pypratico | gui/rc4.py | 1 | 1556 | #!/usr/bin/env python3
def rc4(chave, entrada, loops=1):
''' Algoritmo compatível com o RC4 '''
kbox = list(range(256)) # criar caixa para chave
for i, car in enumerate(chave): # copiar chave e vetor
kbox[i] = car
j = len(chave)
for i in range(j, 256): # repetir ate preencher
... | gpl-2.0 | 966,880,750,209,758,700 | 26.272727 | 71 | 0.524759 | false | 2.699653 | false | false | false |
kaspermunch/MultiPurpose | MultiPurpose/NWAlign/DPMatrix.py | 1 | 1966 | """DPMatrix.py
This class models a dynamic progamming matrix for use in sequence
alignment models. The design of this class is based on the description of
dynamic programming matrices in:
Durbin et al. 1998. Biological Sequence Analysis. Cambridge University
Press.
Classes:
* DPMatrix
* DPMatrixCell
"... | gpl-2.0 | -4,016,408,432,478,683,600 | 26.690141 | 75 | 0.596134 | false | 4.174098 | false | false | false |
apanda/modeling | mcnet/components/aclfirewall.py | 1 | 2245 | from . import NetworkObject
import z3
class AclFirewall (NetworkObject):
def _init(self, node, network, context):
super(AclFirewall, self).init_fail(node)
self.fw = node.z3Node
self.ctx = context
self.constraints = list ()
self.acls = list ()
network.SaneSend (self)
... | bsd-3-clause | 5,685,815,839,039,126,000 | 37.706897 | 111 | 0.531849 | false | 2.950066 | false | false | false |
utarsuno/urbtek | code_manager/miscellaneous_scripts/formatting.py | 1 | 2795 | # coding=utf-8
"""
This module, formatting.py, is just utility functions to format source code text.
"""
# This is needed for the custom compiler.
KEYWORDS = []
def sort_by_deliminator(deliminator, code_text, lines_to_ignore=None):
"""This method will take a chunk of code and format it so that it is sorted by colu... | apache-2.0 | 5,322,014,180,477,122,000 | 37.819444 | 107 | 0.706261 | false | 2.979744 | false | false | false |
mahim97/zulip | zerver/management/commands/convert_bot_to_outgoing_webhook.py | 3 | 2259 |
from argparse import ArgumentParser
from typing import Any
from zerver.lib.management import ZulipBaseCommand
from zerver.models import Service, UserProfile
class Command(ZulipBaseCommand):
help = """Given an existing bot, converts it into an outgoing webhook bot."""
def add_arguments(self, parser: Argument... | apache-2.0 | -501,458,603,563,518,340 | 37.288136 | 86 | 0.579017 | false | 4.386408 | false | false | false |
DarioGT/Zim-QDA | zim/plugins/spell.py | 1 | 4224 | # -*- coding: utf-8 -*-
# Copyright 2008 Jaap Karssenberg <jaap.karssenberg@gmail.com>
'''Spell check plugin based on gtkspell'''
import os
import gobject
from zim.config import get_environ
from zim.plugins import PluginClass
from zim.gui.widgets import ErrorDialog
from zim.signals import SIGNAL_AFTER
try:
imp... | gpl-2.0 | 7,307,459,120,267,643,000 | 32.52381 | 116 | 0.569129 | false | 4.065448 | false | false | false |
zsjohny/jumpserver | apps/terminal/backends/command/models.py | 1 | 1763 | # -*- coding: utf-8 -*-
#
import uuid
from django.db import models
from django.utils.translation import ugettext_lazy as _
from orgs.mixins.models import OrgModelMixin
class AbstractSessionCommand(OrgModelMixin):
RISK_LEVEL_ORDINARY = 0
RISK_LEVEL_DANGEROUS = 5
RISK_LEVEL_CHOICES = (
(RISK_LEVEL_... | gpl-2.0 | 1,010,516,030,425,513,000 | 32.903846 | 143 | 0.636982 | false | 3.533066 | false | false | false |
irwinsnet/DesPy | despy/fel/event.py | 1 | 9768 | # Despy: A discrete event simulation framework for Python
# Version 0.1
# Released under the MIT License (MIT)
# Copyright (c) 2015, Stacy Irwin
"""
****************
despy.model.event
****************
.. autosummary::
Event
.. todo
Refactor event so it no longer inherits from Component.
... | mit | 5,991,695,657,016,548,000 | 33.397887 | 78 | 0.576372 | false | 4.792934 | false | false | false |
ollitapa/VTT-Raytracer | python_source/pyraytracer/spectrumTools.py | 1 | 1572 | #
# Copyright 2015 VTT Technical Research Center of Finland
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | apache-2.0 | -2,404,852,283,381,364,700 | 28.660377 | 80 | 0.697837 | false | 3.725118 | false | false | false |
logan169/pyGeno | pyGeno/importation/SNPs.py | 1 | 7001 | import urllib, shutil
from ConfigParser import SafeConfigParser
import pyGeno.configuration as conf
from pyGeno.SNP import *
from pyGeno.tools.ProgressBar import ProgressBar
from pyGeno.tools.io import printf
from Genomes import _decompressPackage, _getFile
from pyGeno.tools.parsers.CasavaTools import SNPsTxtFile
fro... | apache-2.0 | -4,346,369,277,220,279,300 | 31.412037 | 148 | 0.710756 | false | 2.946549 | false | false | false |
olegpshenichniy/truechat | server/api/thread/views.py | 1 | 2146 | from rest_framework import generics
from rest_framework.exceptions import PermissionDenied
from .models import PrivateThread, GroupThread
from .serializers import PrivateThreadListCreateSerializer, PrivateThreadRetrieveDestroySerializer
from .serializers import GroupThreadListCreateSerializer, GroupThreadRetrieveUpdat... | mit | 4,422,282,854,011,121,700 | 33.612903 | 100 | 0.72973 | false | 4.844244 | false | false | false |
pexip/meson | mesonbuild/modules/rpm.py | 2 | 8284 | # Copyright 2015 The Meson development team
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to ... | apache-2.0 | -8,432,540,976,851,068,000 | 44.767956 | 97 | 0.547682 | false | 4.001932 | false | false | false |
m-rakowski/html-to-csv | app/extract.py | 1 | 2373 | # -*- coding: utf-8 -*-
from bs4 import BeautifulSoup
import requests
import csv
import re
class Extraction():
def has_class(self,tag):
return tag.has_attr('class')
def get_info_dict(self,url):
r = requests.get(url)
r.encoding = 'utf-8'
data = r.text
soup =... | bsd-3-clause | -5,575,228,197,144,984,000 | 27.590361 | 85 | 0.485883 | false | 4.2375 | false | false | false |
qedsoftware/commcare-hq | corehq/util/doc_processor/interface.py | 1 | 11487 | import weakref
from abc import ABCMeta, abstractmethod
from datetime import datetime
import six
from corehq.util.pagination import PaginationEventHandler, TooManyRetries
class BulkProcessingFailed(Exception):
pass
DOCS_SKIPPED_WARNING = """
WARNING {} documents were not processed due to concurrent mod... | bsd-3-clause | -6,447,132,111,041,313,000 | 35.582803 | 114 | 0.640289 | false | 4.481857 | false | false | false |
hanul93/kicomav | Engine/plugins/dde.py | 1 | 8396 | # -*- coding:utf-8 -*-
# Author: Kei Choi(hanul93@gmail.com)
import os
import re
import zipfile
import kernel
# -------------------------------------------------------------------------
# zip 파일의 특별한 파일명을 압축 해제하여 데이터를 리턴한다.
# -------------------------------------------------------------------------
def get_zip_data... | gpl-2.0 | 3,509,038,780,561,625,000 | 31.513274 | 91 | 0.384867 | false | 2.48916 | false | false | false |
Tepira/binwalk | src/binwalk/modules/disasm.py | 1 | 7773 | import capstone
import binwalk.core.common
import binwalk.core.compat
from binwalk.core.module import Module, Option, Kwarg
class ArchResult(object):
def __init__(self, **kwargs):
for (k,v) in kwargs.iteritems():
setattr(self, k, v)
class Architecture(object):
def __init__(self, **kwargs):... | mit | 5,751,563,290,571,580,000 | 47.58125 | 139 | 0.47755 | false | 4.640597 | false | false | false |
drepetto/chiplotle | chiplotle/tools/mathtools/rotate_2d.py | 1 | 1793 | from chiplotle.geometry.core.coordinate import Coordinate
from chiplotle.geometry.core.coordinatearray import CoordinateArray
import math
## TODO: refactor, this is nasty. Take one type only!
def rotate_2d(xy, angle, pivot=(0, 0)):
'''2D rotation.
- `xy` is an (x, y) coordinate pair or a list of coordinate p... | gpl-3.0 | 1,062,780,138,223,611,800 | 28.883333 | 70 | 0.640268 | false | 3.508806 | false | false | false |
noironetworks/group-based-policy | gbpservice/neutron/services/grouppolicy/config.py | 1 | 1327 | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | apache-2.0 | 2,835,571,922,289,177,000 | 38.029412 | 78 | 0.617935 | false | 4.423333 | false | false | false |
kcorring/ds4100-music-analytics | muslytics/ITunesUtils.py | 1 | 12418 | #!/usr/bin/python
'''itunes utility classes'''
from __future__ import absolute_import, print_function
import logging
import re
from muslytics.Utils import strip_featured_artists, AbstractTrack, MULT_ARTIST_PATTERN, UNKNOWN_GENRE
logger = logging.getLogger(__name__)
FEAT_GROUP_PATTERN = re.compile('.*\(feat\.(?P<art... | mit | -7,176,035,233,404,229,000 | 33.590529 | 101 | 0.551216 | false | 4.101057 | false | false | false |
cryvate/project-euler | project_euler/solutions/problem_51.py | 1 | 1244 | from collections import Counter
from itertools import combinations
from ..library.number_theory.primes import is_prime, prime_sieve
from ..library.base import list_to_number, number_to_list
def solve() -> int:
primes = prime_sieve(1_000_000)
for prime in primes:
if prime < 100_000:
conti... | mit | -7,224,696,637,784,530,000 | 26.043478 | 67 | 0.534566 | false | 4.641791 | false | false | false |
caterinaurban/Typpete | typpete/src/stubs/str_methods.py | 1 | 3955 | """Stub file for methods invoked on strings
TODO make some arguments optional
"""
from typing import List
def capitalize(s: str) -> str:
"""Return a new string with the first letter capitalized"""
pass
def center(s: str, width: int, fillchar: str) -> str:
"""Returns a space-padded string with the origi... | mpl-2.0 | 1,939,009,342,000,427,000 | 26.089041 | 120 | 0.650063 | false | 3.885069 | false | false | false |
memsharded/conan | conans/test/unittests/search/disk_search_test.py | 1 | 3782 | import os
import unittest
from conans.client.cache.cache import ClientCache
from conans.client.tools import chdir
from conans.model.info import ConanInfo
from conans.model.ref import ConanFileReference
from conans.paths import (BUILD_FOLDER, CONANINFO, EXPORT_FOLDER, PACKAGES_FOLDER)
from conans.search.search import s... | mit | 2,705,337,590,404,923,000 | 44.02381 | 90 | 0.56716 | false | 3.715128 | true | false | false |
ssundaresan/sculpte-simulator | flow.py | 1 | 5360 | import sys
import os
import random as rnd
import numpy as np
from numpy import random as rv
import route
import gen
import heapq
class flowgen(object):
'''
Flow generator class. Instantiates objects inside
- for flow arrival, size of flow and throughput assignment.
'''
def __init__(self,fptr,tm):
self.... | gpl-2.0 | 733,251,263,083,629,700 | 27.062827 | 101 | 0.613246 | false | 2.979433 | false | false | false |
zakdoek/django-simple-resizer | simple_resizer/_version.py | 1 | 7478 |
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains t... | mit | 5,310,793,679,333,728,000 | 38.151832 | 77 | 0.600294 | false | 3.925459 | false | false | false |
davidwilson-85/easymap | graphic_output/Pillow-4.2.1/Tests/test_file_sgi.py | 1 | 1819 | from helper import unittest, PillowTestCase, hopper
from PIL import Image, SgiImagePlugin
class TestFileSgi(PillowTestCase):
def test_rgb(self):
# Created with ImageMagick then renamed:
# convert hopper.ppm -compress None sgi:hopper.rgb
test_file = "Tests/images/hopper.rgb"
im =... | gpl-3.0 | 5,612,795,171,406,577,000 | 29.316667 | 75 | 0.606377 | false | 3.727459 | true | false | false |
ruler501/acrTestingScripts | autorun.py | 1 | 2366 | import sys
import threading
import psutil
if sys.platform.startswith('win32'):
from winpexpect import EOF, TIMEOUT
from winpexpect import winspawn as spawn
else:
from pexpect import EOF, TIMEOUT
from pexpect import spawn
class PlatformError(Exception):
def __init__(self, platform):
self.platform =... | lgpl-3.0 | 8,905,766,464,803,754,000 | 21.445545 | 77 | 0.633559 | false | 3.09281 | false | false | false |
tradel/AppDynamicsREST | docs/conf.py | 1 | 8506 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# AppDynamicsREST documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 2013.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in th... | apache-2.0 | 7,371,730,204,130,473,000 | 29.930909 | 76 | 0.70656 | false | 3.719283 | true | false | false |
kikusu/chainer | chainer/training/trainer.py | 1 | 12389 | import collections
import os
import six
from chainer import reporter as reporter_module
from chainer.training import extension as extension_module
from chainer.training import trigger as trigger_module
class _ExtensionEntry(object):
def __init__(self, extension, priority, trigger, invoke_before_training):
... | mit | -1,369,714,694,533,946,600 | 41.868512 | 79 | 0.650658 | false | 4.989529 | false | false | false |
lmazuel/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/virtual_network_gateway_connection_list_entity.py | 1 | 7733 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -2,750,844,050,204,453,400 | 49.875 | 133 | 0.669856 | false | 4.050812 | false | false | false |
electrumalt/electrum-ixc | gui/qt/seed_dialog.py | 1 | 3876 | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2013 ecdsa@github
#
# 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... | gpl-3.0 | -2,751,131,014,483,622,400 | 32.128205 | 160 | 0.646027 | false | 3.51087 | false | false | false |
danic85/time-capsule | src/file-browser.py | 1 | 1530 | import os, time, datetime, sys
from PIL import Image
path = '../test_files'
def get_minimum_creation_time(exif_data):
mtime = '?'
if 306 in exif_data and exif_data[306] < mtime: # 306 = DateTime
mtime = exif_data[306]
if 36867 in exif_data and exif_data[36867] < mtime: # 36867 = DateTimeOriginal
... | gpl-3.0 | 6,660,376,120,331,384,000 | 39.263158 | 111 | 0.554902 | false | 3.574766 | false | false | false |
mharnold/spiderosm | spiderosm/cannames.py | 1 | 14317 | '''
Canonical street names!
(To allow name matching between OSM and Portland City DB.)
'''
import re
import string
import pylev
# ratio of edit distance between strings to string length (= max number of edits possible)
def levenshtein_ratio(s1, s2):
assert len(s1) > 0 and len(s2) > 0
return pylev.levenshtein(... | mit | 799,062,922,037,463,200 | 24.611807 | 104 | 0.450444 | false | 2.924224 | true | false | false |
WildflowerSchools/sensei | app/models/radio_observation.py | 1 | 1982 | import dateutil.parser
from shared import *
from sqlalchemy.dialects.postgresql import insert
import pytz
# Raw radio observation
class RadioObservation(db.Model):
classroom_id = db.Column(db.Integer, nullable=False, primary_key=True)
observed_at = db.Column(db.DateTime, nullable=False, primary_key=True)
r... | mit | 8,456,761,787,901,686,000 | 37.862745 | 119 | 0.671039 | false | 3.571171 | false | false | false |
davy39/eric | UI/Previewer.py | 1 | 6911 | # -*- coding: utf-8 -*-
# Copyright (c) 2013 - 2014 Detlev Offenbach <detlev@die-offenbachs.de>
#
"""
Module implementing a previewer widget for HTML, Markdown and ReST files.
"""
from __future__ import unicode_literals
import os
from PyQt5.QtCore import QTimer
from PyQt5.QtWidgets import QStackedWidget
import Pr... | gpl-3.0 | 5,330,980,444,563,860,000 | 33.044335 | 79 | 0.561134 | false | 4.870331 | false | false | false |
iuyte/VEX-709S-2018 | .ycm_extra_conf.py | 1 | 6322 | # This file is NOT licensed under the GPLv3, which is the license for the rest
# of YouCompleteMe.
#
# Here's the license text for this file:
#
# This is free and unencumbered software released into the public domain.
#
# Anyone is free to copy, modify, publish, use, compile, sell, or
# distribute this software, either... | lgpl-3.0 | -1,320,671,473,060,579,300 | 33.358696 | 80 | 0.704524 | false | 3.602279 | true | false | false |
luciddg/auth-tool | lib/plugin/token.py | 1 | 2084 | # -*- coding: utf-8 -*-
import hmac
import hashlib
import math
import time
from cherrypy.process import plugins
__all__ = ['TokenEnginePlugin']
class TokenEnginePlugin(plugins.SimplePlugin):
"""
Generates and verifies RFC-6238-compliant time-based one-time passwords.
Uses the SHA256 digest algorithm an... | mit | -6,591,820,149,578,088,000 | 33.163934 | 88 | 0.605086 | false | 4.054475 | false | false | false |
yoosw/printrun_etri | printrun/gui/__init__.py | 1 | 23864 | # This file is part of the Printrun suite.
#
# Printrun is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Printrun is distributed in ... | gpl-3.0 | 7,687,569,514,560,247,000 | 45.428016 | 105 | 0.616661 | false | 3.636696 | false | false | false |
mdovgialo/steam-vr-wheel | steam_vr_wheel/pyvjoy/vjoydevice.py | 1 | 1698 |
from .constants import *
from .exceptions import *
import steam_vr_wheel.pyvjoy._sdk as _sdk
class VJoyDevice(object):
"""Object-oriented API for a vJoy Device"""
def __init__(self,rID=None, data=None):
"""Constructor"""
self.rID=rID
self._sdk= _sdk
self._vj=self._sdk._vj
if data:
... | mit | 6,191,126,794,867,331,000 | 21.915493 | 86 | 0.651355 | false | 2.958188 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.