repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
linux-podcasting-hacks/wiimote-recording-control | wiimidi.py | 1 | 5672 | #!/usr/bin/python
import cwiid
import sys
import time
import pypm
from txosc import osc as OSC
from txosc import sync as SYNC
btn_A = 0x0008
btn_one = 0x0002
btn_two = 0x0001
btn_left = 0x0100
btn_right = 0x0200
btn_up = 0x0800
btn_down = 0x0400
btn_minus = 0x0010
btn_plus = 0x1000
btn_home = 0x0080
b... | bsd-2-clause | 2,697,744,012,294,002,000 | 26.269231 | 81 | 0.565585 | false | 3.25043 | false | false | false |
nojhan/weboob-devel | modules/jcvelaux/module.py | 7 | 5806 | # -*- coding: utf-8 -*-
# Copyright(C) 2013 dud
#
# This file is part of weboob.
#
# weboob is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) a... | agpl-3.0 | 2,546,773,381,831,487,500 | 32.755814 | 96 | 0.603514 | false | 3.75307 | false | false | false |
ktosiek/spanel | main.py | 1 | 3260 | #!/usr/bin/env python
# Copyright 2012 Tomasz Kontusz
#
# This file is part of Spanel.
#
# Spanel 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 late... | gpl-3.0 | 4,020,006,616,475,242,000 | 30.650485 | 73 | 0.645092 | false | 3.821805 | false | false | false |
jasonzou/MyPapers | libs/citepro/citeproc/formatter/html.py | 1 | 1474 |
from cgi import escape
def preformat(text):
return escape(str(text))
class TagWrapper(str):
tag = None
attributes = None
@classmethod
def _wrap(cls, text):
if cls.attributes:
attrib = ' ' + ' '.join(['{}="{}"'.format(key, value)
for key, ... | mit | -1,419,586,216,385,512,400 | 19.760563 | 79 | 0.539349 | false | 3.534772 | false | false | false |
pculture/unisubs | apps/search/templatetags/search_tags.py | 7 | 1935 | # Amara, universalsubtitles.org
#
# Copyright (C) 2013 Participatory Culture Foundation
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your ... | agpl-3.0 | 4,795,282,936,675,541,000 | 30.209677 | 115 | 0.685788 | false | 3.924949 | false | false | false |
ddy88958620/lib | Python/scrapy/sagemcom/cometcouk.py | 2 | 4261 | __author__ = 'juraseg'
from scrapy.spider import BaseSpider
from scrapy.selector import HtmlXPathSelector
from scrapy.http import Request
from product_spiders.items import Product, ProductLoader
import logging
class ComeCoUkSpider(BaseSpider):
name = 'comet.co.uk'
allowed_domains = ['comet.co.uk']
star... | apache-2.0 | 2,599,687,918,353,932,000 | 41.188119 | 144 | 0.615349 | false | 3.126192 | false | false | false |
atodorov/anaconda | pyanaconda/modules/payloads/source/factory.py | 1 | 1945 | #
# Factory class to create sources.
#
# Copyright (C) 2020 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program is dis... | gpl-2.0 | -9,087,149,336,753,001,000 | 41.282609 | 93 | 0.720823 | false | 4.182796 | false | false | false |
gdementen/PyTables | bench/optimal-chunksize.py | 13 | 3822 | """Small benchmark on the effect of chunksizes and compression on HDF5 files.
Francesc Alted
2007-11-25
"""
from __future__ import print_function
import os
import math
import subprocess
import tempfile
from time import time
import numpy
import tables
# Size of dataset
# N, M = 512, 2**16 # 256 MB
# N, M = 512, ... | bsd-3-clause | -8,520,421,271,985,768,000 | 29.333333 | 79 | 0.591575 | false | 3.300518 | false | false | false |
platinummonkey/Vizwall-Website | vizwall/events/forms.py | 1 | 5287 | from django.forms import *
from django.forms.widgets import *
from django.forms.extras.widgets import *
from vizwall.events.models import Event, COMPONENT_CHOICES, dTimeFieldInputs
import datetime
from vizwall.accounts.models import UserProfile
from captcha.fields import CaptchaField
class EventForm(ModelForm):
'''E... | gpl-3.0 | -4,722,789,321,356,158,000 | 40.960317 | 232 | 0.687535 | false | 3.861943 | false | false | false |
idaholab/raven | framework/CodeInterfaces/Generic/GenericParser.py | 2 | 10797 | # Copyright 2017 Battelle Energy Alliance, 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 t... | apache-2.0 | -5,199,687,621,181,177,000 | 48.527523 | 175 | 0.630638 | false | 3.853319 | false | false | false |
firstlookmedia/gpgsync | gpgsync/cli.py | 1 | 4731 | # -*- coding: utf-8 -*-
"""
GPG Sync
Helps users have up-to-date public keys for everyone in their organization
https://github.com/firstlookmedia/gpgsync
Copyright (C) 2016 First Look Media
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as publ... | gpl-3.0 | 9,160,136,683,872,163,000 | 33.786765 | 117 | 0.581484 | false | 4.002538 | false | false | false |
MarkusHackspacher/PythonFarmGame | pygameui/button.py | 1 | 3351 | from __future__ import absolute_import
import os
import pygame
from pygameui.widget import Widget
buttonbgpath = os.path.join("images", "gui", "buttonbg.png")
class Button(Widget):
"""Button Widget
"""
def __init__(self, label, position, bgimage=None, labelsize=12,
color=(255, 255, 0... | gpl-3.0 | -1,803,105,317,518,656,000 | 26.694215 | 79 | 0.547299 | false | 3.803632 | false | false | false |
Ubuntu-Solutions-Engineering/conjure | conjureup/utils.py | 1 | 23501 | import asyncio
import codecs
import errno
import json
import logging
import os
import pty
import re
import shutil
import socket
import subprocess
import sys
import uuid
from collections import Mapping
from contextlib import contextmanager
from functools import partial
from itertools import chain
from pathlib import Pat... | mit | 4,256,687,583,847,943,000 | 28.785805 | 79 | 0.562274 | false | 4.192864 | false | false | false |
jlaine/node-jpickle | test/genclass_test.py | 1 | 4122 | #!/usr/bin/python
from __future__ import print_function
import pickle
import binascii
class MyClass:
def __init__(self):
self.data = "test"
class MyOtherClass:
def __init__(self):
self.myclass = MyClass()
self.myclasses = [ MyClass(), MyClass() ]
self.myclasses[0].data = "new t... | mit | 8,166,288,575,835,632,000 | 43.815217 | 111 | 0.600194 | false | 3.359413 | true | false | false |
PuloV/sofiatraffic-api | st_parser.py | 1 | 9580 | import requests
import re
import time
from html.parser import HTMLParser
import json
import os
import datetime
from multiprocessing.dummy import Pool as ThreadPool
class PageParsing:
"""Parsing class with static methods"""
MAIN_PAGE = "http://schedules.sofiatraffic.bg/"
TRANSPORT_RE = '(tramway|trolleyb... | gpl-2.0 | -1,020,988,815,074,494,200 | 35.872587 | 153 | 0.533717 | false | 4.005872 | false | false | false |
TresysTechnology/setools | setoolsgui/genfsconmodel.py | 2 | 1842 | # Copyright 2016, Tresys Technology, LLC
#
# This file is part of SETools.
#
# SETools is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, either version 2.1 of
# the License, or (at your option) any later ... | lgpl-2.1 | -7,367,100,566,871,772,000 | 30.220339 | 66 | 0.606949 | false | 3.927505 | false | false | false |
alexandershuping/cabbage-bot | cabbage.py | 1 | 2905 | import cabbagerc
import discord
from discord.ext import commands
from phrasebook.Phrasebook import Phrasebook
from datetime import datetime
cabbageNumber = 2
cabbageStealer = 0
cabbageTheftTime = 0
description = '''Bot That Performs Cabbage-Related Functions'''
bot = commands.Bot(command_prefix=cabbagerc.PREF, descri... | mit | 4,933,143,436,424,292,000 | 23.82906 | 109 | 0.689845 | false | 2.714953 | false | false | false |
DigitalSlideArchive/large_image | girder/girder_large_image/loadmodelcache.py | 1 | 3260 | #############################################################################
# Copyright Kitware 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/licen... | apache-2.0 | 1,900,438,198,414,110,700 | 38.277108 | 77 | 0.645092 | false | 4.272608 | false | false | false |
TrondKjeldas/knxmonitor | knxmonitor/Knx/KnxLogViewer.py | 1 | 7940 | from time import time, mktime, strptime
import hashlib
import sys
from knxmonitor.Knx.KnxParseException import KnxParseException
from knxmonitor.Knx.KnxParser import KnxParser
class KnxLogViewer(object):
def _readLinesFromFileOrCache(self, infile):
try:
inf = infile
except IOError:
... | gpl-2.0 | 8,517,884,473,717,793,000 | 34.288889 | 136 | 0.496348 | false | 4.271114 | false | false | false |
glasslion/SPF | spf/core/mydb.py | 6 | 3569 | #!/usr/bin/env python
import sqlite3
import sys
from utils import Utils
class MyDB():
def __init__(self, sqlite_file):
self.sqlite_file = sqlite_file + "spf.sqlite"
#print self.sqlite_file
self.conn = None
if (not self.checkDB()):
self.initDB()
def getCursor(self):... | bsd-3-clause | -3,159,035,181,884,819,500 | 30.584071 | 100 | 0.581676 | false | 4.213695 | false | false | false |
ZombieNinjaPirate/pypkg | System/Output.py | 1 | 1714 | """
Copyright (c) 2014, Are Hansen - Honeypot Development.
All rights reserved.
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 conditi... | gpl-3.0 | 2,196,115,010,699,529,200 | 42.974359 | 100 | 0.755543 | false | 4.211302 | false | false | false |
bayesimpact/bob-emploi | data_analysis/importer/departements.py | 1 | 1293 | """Importer of French Département data in MongoDB."""
import typing
from typing import Any, Dict, List
from bob_emploi.data_analysis.lib import cleaned_data
from bob_emploi.data_analysis.lib import mongo
def make_dicts(
french_departements_tsv: str, french_oversea_departements_tsv: str, prefix_tsv: str) \
... | gpl-3.0 | 1,295,578,880,730,163,200 | 34.805556 | 94 | 0.6827 | false | 3.465054 | false | false | false |
erickeller/edi | edi/lib/versionhelpers.py | 1 | 2219 | # -*- coding: utf-8 -*-
# Copyright (C) 2017 Matthias Luescher
#
# Authors:
# Matthias Luescher
#
# This file is part of edi.
#
# edi is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of... | lgpl-3.0 | -3,946,882,244,747,981,000 | 33.671875 | 95 | 0.695358 | false | 3.927434 | false | false | false |
clebergnu/arc | arc/cli/app.py | 1 | 6728 | """
This is the main entry point for the ARC cli application
"""
import sys
import types
import logging
import importlib
import functools
import arc.config
import arc.connection
import arc.defaults
import arc.cli.args.parser
__all__ = ['App']
class App(object):
"""
Base class for CLI application
"""
... | gpl-2.0 | 164,241,412,835,319,800 | 36.586592 | 80 | 0.584275 | false | 4.833333 | true | false | false |
JGoutin/compilertools | compilertools/_config_build.py | 1 | 1889 | """Extra configuration for build"""
class ConfigBuild:
"""Build configuration"""
#: Disable compilertools's optimization while building
disabled = False
#: Compiles optimized for current machine only (If not compile for a cluster of
#: possibles machines)
#: True or False for manually set va... | bsd-2-clause | 1,016,721,752,809,517,000 | 31.568966 | 88 | 0.582319 | false | 4.019149 | false | false | false |
City-of-Helsinki/linkedevents | events/importer/harrastushaku.py | 1 | 23355 | import logging
import traceback
from collections import namedtuple
from copy import deepcopy
from datetime import datetime, timedelta
from functools import lru_cache, partial
import pytz
import requests
from django.db import transaction
from django.utils.dateparse import parse_time
from django.utils.timezone import no... | mit | 8,116,336,283,692,511,000 | 40.117958 | 119 | 0.619739 | false | 3.798796 | false | false | false |
sitian/wing | services/wroute/wrouted.py | 1 | 1264 | # wrouted.py
#
# Copyright (C) 2013 Yi-Wei Ci <ciyiwei@hotmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# ... | gpl-2.0 | 6,322,507,919,008,522,000 | 34.111111 | 75 | 0.651108 | false | 3.830303 | false | false | false |
VincentVW/OIPA | OIPA/indicator_unesco/admin.py | 3 | 6035 | import xml.etree.cElementTree as etree
from django.contrib import admin
from django.shortcuts import get_object_or_404
from multiupload.admin import MultiUploadAdmin
from indicator.upload_indicators_helper import find_country, find_city, get_countries, get_cities, get_value, save_log, save_city_data, save_country_data... | agpl-3.0 | 3,671,623,313,713,921,500 | 38.444444 | 159 | 0.613422 | false | 4.18516 | false | false | false |
jpk0727/growApp | apps/base/forms.py | 1 | 2289 | import time
import json
import moment
from datetime import datetime
from django import forms
from base.models import sensors, controller_setpoints
from django.utils.translation import ugettext_lazy as _
from bootstrap3_datetime.widgets import DateTimePicker
# class DateForm(forms.Form):
# start_date = forms.Dat... | mit | 7,060,045,979,482,628,000 | 34.215385 | 105 | 0.571865 | false | 3.939759 | false | false | false |
regebro/hovercraft | tests/test_position.py | 1 | 30682 | import os
import unittest
from pkg_resources import resource_string
from lxml import etree
from hovercraft.parse import rst2xml, SlideMaker
from hovercraft.position import gather_positions, calculate_positions, position_slides
TEST_DATA = os.path.join(os.path.split(__file__)[0], "test_data")
def make_tree(file_name... | mit | -3,711,826,740,963,475,500 | 32.642544 | 91 | 0.287595 | false | 4.167051 | true | false | false |
Cydrobolt/spegill | spegill/__init__.py | 1 | 4011 | from . import config
from flask import Flask, request, render_template
import indicoio, requests
import ujson as json
from RedisLib import rds, R_SPEGILL_USER
import base64, hashlib
indicoio.config.api_key = config.indico_api_key
app = Flask('spegill')
app.secret_key = config.password
current_talking_user = ""
def a... | gpl-2.0 | 6,634,910,512,847,834,000 | 30.093023 | 117 | 0.659686 | false | 3.094907 | true | false | false |
Bitcoinsulting/dark-test-v2 | libjl777/mxe/tools/copydlldeps.py | 3 | 7082 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# DLL dependency resolution and copying script.
# Copyright (C) 2010 John Stumpo
# Copyright (C) 2014 Martin Müllenhaupt
#
# 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 Fre... | mit | -8,668,788,728,360,593,000 | 39.00565 | 79 | 0.573365 | false | 3.792716 | false | false | false |
laurentb/weboob | modules/orange/pages/bills.py | 1 | 9949 | # -*- coding: utf-8 -*-
# Copyright(C) 2010-2011 Vincent Paredes
#
# This file is part of a weboob module.
#
# This weboob module is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the... | lgpl-3.0 | 2,442,179,936,831,297,500 | 38.007843 | 170 | 0.587614 | false | 3.959793 | false | false | false |
derrowap/MA490-MachineLearning-FinalProject | adderNN.py | 1 | 2934 | # start a session which transfers data to a C++ envirnment where it is optimized for perfomance
import tensorflow as tf
import random as rn
import trainingFunctions as funcs
sess = tf.InteractiveSession()
# two functions to initialize weight and bias
# weight is initiated with slight noise for symmetry breaking
def we... | mit | 866,288,182,168,310,800 | 36.151899 | 126 | 0.68439 | false | 3.220637 | false | false | false |
tpainter/df_everywhere | df_everywhere/util/SendKeys.py | 1 | 12620 | """
SendKeys.py - Sends one or more keystroke or keystroke combinations
to the active window.
Copyright (C) 2003 Ollie Rutherfurd <oliver@rutherfurd.net>
Python License
Version 0.3 (2003-06-14)
$Id$
"""
#From: https://code.google.com/p/sendkeys-ctypes/
import sys
import time
from _sendkeys import char2keycode, ke... | gpl-2.0 | -2,442,694,706,506,478,000 | 27.552036 | 85 | 0.467829 | false | 3.827722 | false | false | false |
beenje/addon-pr | addonpr/command.py | 1 | 2291 | # -*- coding: utf-8 -*-
"""
addonpr command module
Copyright (C) 2012-2013 Team XBMC
http://www.xbmc.org
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, or (... | gpl-2.0 | -608,732,368,011,238,900 | 26.27381 | 71 | 0.659537 | false | 3.719156 | false | false | false |
mikejs/name_tools | name_tools/affixes.py | 1 | 6416 | import re
# I realize *fixes may not be the proper linguistic terms for these.
# No attempt was made to be exhaustive, but some sources used:
# http://en.wikipedia.org/wiki/List_of_post-nominal_letters
# http://en.wikipedia.org/wiki/Pre-nominal_letters
# http://en.wikipedia.org/wiki/Forms_of_address_in_the_United_Kin... | bsd-3-clause | 8,380,350,305,892,751,000 | 34.843575 | 77 | 0.572943 | false | 3.022138 | false | false | false |
CrazyNPC/django-ios-notifications | test/testapp/testapp/settings.py | 1 | 4765 | # Django settings for testapp project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'test.db',
# The following settings are not used with sqlite... | bsd-3-clause | -726,734,642,830,568,700 | 33.280576 | 127 | 0.714586 | false | 3.673863 | false | false | false |
shelawang/food-picker | main.py | 1 | 2433 | import os
from flask import Flask, request
import argparse
import json
import pprint
import sys
import urllib
import urllib2
import oauth2
import math
app = Flask(__name__)
CONSUMER_KEY = 'H85zQotPvyaafxY-wFjJOg'
CONSUMER_SECRET = 'LRROlUpL-TLVMA25NztXm6gVnHE'
TOKEN = 'Awp8bAxSd7p_dntg10i9jQEYGqIB1gdo'
TOKEN_SECR... | mit | -7,069,045,472,730,618,000 | 26.977011 | 122 | 0.614879 | false | 2.917266 | false | false | false |
leighpauls/k2cro4 | tools/telemetry/telemetry/browser_unittest.py | 1 | 2018 | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
from telemetry import browser_finder
from telemetry import options_for_unittests
class BrowserTest(unittest.TestCase):
def testBrowser... | bsd-3-clause | -3,250,190,862,858,584,600 | 38.568627 | 80 | 0.707136 | false | 3.695971 | true | false | false |
PatrickOReilly/scikit-learn | sklearn/tree/tree.py | 1 | 44306 | """
This module gathers tree-based methods, including decision, regression and
randomized trees. Single and multi-output problems are both handled.
"""
# Authors: Gilles Louppe <g.louppe@gmail.com>
# Peter Prettenhofer <peter.prettenhofer@gmail.com>
# Brian Holt <bdholt1@gmail.com>
# Noel Da... | bsd-3-clause | -5,421,390,063,791,651,000 | 38.879388 | 143 | 0.572722 | false | 4.31622 | false | false | false |
byt3bl33d3r/CrackMapExec | cme/protocols/ldap.py | 1 | 35043 | # from https://github.com/SecureAuthCorp/impacket/blob/master/examples/GetNPUsers.py
# https://troopers.de/downloads/troopers19/TROOPERS19_AD_Fun_With_LDAP.pdf
import requests
import logging
import configparser
from cme.connection import *
from cme.helpers.logger import highlight
from cme.logger import CMEAdapter
from... | bsd-2-clause | -7,680,955,245,509,472,000 | 46.227763 | 171 | 0.515652 | false | 4.383114 | false | false | false |
napsternxg/nltk-drt | nltk-drt/src/wntemporaldrt.py | 1 | 5538 | """
Extension of temporaldrt using WordNet ontology
"""
__author__ = " Emma Li, Peter Makarov, Alex Kislev"
__version__ = "1.0"
__date__ = "Tue, 24 Aug 2010"
import nltk
from nltk.corpus.reader.wordnet import WordNetCorpusReader
import temporaldrt as drt
from temporaldrt import DrtTokens, DrtFeatureConstantExpression... | apache-2.0 | -8,525,457,456,032,012,000 | 41.937984 | 129 | 0.615565 | false | 3.699399 | false | false | false |
vitalti/sapl | sapl/legacy/scripts/street_sweeper.py | 1 | 5080 | #!/usr/bin/python
# requisito: pip install PyMySQL
import pymysql.cursors
HOST = 'localhost'
USER = 'root'
PASSWORD = ''
DB = ''
SELECT_EXCLUIDOS = "SELECT %s FROM %s WHERE ind_excluido = 1 ORDER BY %s"
REGISTROS_INCONSISTENTES = "DELETE FROM %s WHERE %s "
"in (%s) AND ind_excluido = 0 "
EXCLUI_REGISTRO = "DELET... | gpl-3.0 | -3,535,301,259,724,776,000 | 32.866667 | 86 | 0.610039 | false | 3.00414 | false | false | false |
CentralLabFacilities/m3meka | python/m3/nanokontrol.py | 2 | 2897 | # -*- coding: utf-8 -*-
#M3 -- Meka Robotics Robot Components
#Copyright (c) 2010 Meka Robotics
#Author: edsinger@mekabot.com (Aaron Edsinger)
#M3 is free software: you can redistribute it and/or modify
#it under the terms of the GNU Lesser General Public License as published by
#the Free Software Foundation, either v... | mit | 736,258,013,835,585,500 | 30.846154 | 111 | 0.63514 | false | 3.532927 | false | false | false |
TheKingInYellow/PySeidon | pyseidon/stationClass/functionsStationThreeD.py | 2 | 10617 | #!/usr/bin/python2.7
# encoding: utf-8
from __future__ import division
import numpy as np
import numexpr as ne
from pyseidon.utilities.miscellaneous import *
from pyseidon.utilities.BP_tools import *
import time
# Custom error
from pyseidon_error import PyseidonError
class FunctionsStationThreeD:
"""
**'Uti... | agpl-3.0 | -3,323,359,679,726,499,300 | 33.470779 | 96 | 0.509466 | false | 3.817691 | false | false | false |
ksze/sanitize | filename_sanitizer/__init__.py | 1 | 10364 | from __future__ import unicode_literals
import sys
import unicodedata
import warnings
class ReplacementLengthWarning(UserWarning):
pass
warnings.filterwarnings("always", category=ReplacementLengthWarning)
def _are_unicode(unicode_args=[]):
if sys.version_info[0] == 2:
return all((type(arg) == un... | bsd-2-clause | 5,655,083,877,428,334,000 | 48.118483 | 144 | 0.531648 | false | 4.135674 | false | false | false |
EdDev/vdsm | lib/vdsm/gluster/cli.py | 1 | 60687 | #
# Copyright 2012-2017 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 ... | gpl-2.0 | -3,423,247,115,054,638,000 | 36.208461 | 79 | 0.540643 | false | 4.196308 | true | false | false |
Krolov18/Languages | Nombres/Nombres.py | 1 | 3821 | # coding: utf-8
def fonction(lex_name, number_name):
import codecs
import pickle
numbers = pickle.load(open(number_name+'.pickle', 'rb')).get('français')
with codecs.open(lex_name, 'r', 'utf-8') as f:
f.readline()
# yield tuple([x.split('_')[1] for x in f.readline().strip(... | apache-2.0 | -6,603,716,984,891,004,000 | 37.371134 | 107 | 0.323383 | false | 5.238683 | false | false | false |
hbussell/pinax-tracker | apps/pyvcal/subversion/revisiondiff.py | 1 | 1037 | import os
from difflib import Differ
from pprint import pprint
from subvertpy import repos, ra, NODE_DIR, NODE_FILE
class RevisionDiff(object):
""" The set of changes needed to transform one revision into another """
def __init__(self, revision1=None, revision2=None):
super(RevisionDiff, self).__ini... | mit | -2,076,341,176,303,375,000 | 28.4 | 80 | 0.621022 | false | 3.898496 | false | false | false |
googleapis/gapic-generator-python | tests/unit/samplegen/common_types.py | 1 | 3695 | # Copyright (C) 2019 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 writi... | apache-2.0 | -2,398,762,450,916,771,300 | 33.858491 | 110 | 0.628958 | false | 4.07387 | false | false | false |
craigcitro/pydatalab | solutionbox/image_classification/mltoolbox/image/classification/_util.py | 6 | 9918 | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | -7,569,009,637,302,798,000 | 36.007463 | 96 | 0.683807 | false | 3.497179 | true | false | false |
Balannen/LSMASOMM | atom3/Kernel/GraphicEditor/InsertHandlers.py | 1 | 13905 | # InsertHandlers.py
# Francois Plamondon
# Summer 2003
import Tkinter
import tkFileDialog
import tkMessageBox
import Graphics
import AbstractHandler as EventHandler
#the insert() method is implemented by the RectangleInsertHandler and OvalInsertHandler classes.
class GeneralBoxInsertHandler(EventHandler.EventHandler... | gpl-3.0 | 4,496,965,744,688,791,000 | 31.039171 | 109 | 0.581589 | false | 3.986525 | false | false | false |
davebridges/Lab-Website | communication/tests.py | 2 | 14526 | """
This file contains the unit tests for the :mod:`communication` app.
Since this app has no models there is model and view tests:
* :class:`~communication.tests.CommunicationModelTests`
* :class:`~communication.tests.CommunicationViewTests`
"""
from lab_website.tests import BasicTests
from communication.models ... | mit | 4,207,600,598,767,648,300 | 47.748322 | 135 | 0.6403 | false | 4.336119 | true | false | false |
Micronaet/micronaet-mx8 | note_manage_sale/note.py | 1 | 3165 | # -*- coding: utf-8 -*-
###############################################################################
#
# Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License a... | agpl-3.0 | -2,294,202,357,215,178,500 | 34.561798 | 79 | 0.600632 | false | 3.936567 | false | false | false |
deepsrijit1105/edx-platform | lms/djangoapps/course_blocks/transformers/visibility.py | 15 | 2329 | """
Visibility Transformer implementation.
"""
from openedx.core.lib.block_structure.transformer import BlockStructureTransformer, FilteringTransformerMixin
from .utils import collect_merged_boolean_field
class VisibilityTransformer(FilteringTransformerMixin, BlockStructureTransformer):
"""
A transformer that... | agpl-3.0 | -5,523,226,499,395,695,000 | 34.287879 | 109 | 0.669815 | false | 4.427757 | false | false | false |
Stunkymonkey/face2movie | face2movie.py | 1 | 8450 | #!/usr/bin/env python3
import sys
import os.path
from math import atan, pi
import argparse
try:
import numpy as np
except:
sys.exit("Please install numpy")
try:
import cv2
except:
sys.exit("Please install OpenCV")
# Parser
parser = argparse.ArgumentParser()
parser.add_argument("-i", "--imagefolder", ... | mit | 5,641,609,435,180,680,000 | 30.64794 | 92 | 0.564734 | false | 3.463115 | false | false | false |
worldofchris/hover-client | hover/test/test_hover.py | 1 | 4699 | # -*- coding: utf-8 -*-
import unittest
from mock import patch, PropertyMock, Mock
import requests
from hover.client import HoverClient
class TestHover(unittest.TestCase):
def setUp(self):
self.DNS_ID = 12345
with patch('requests.post') as patched_post, patch('requests.request') as patched_r... | bsd-2-clause | -7,305,272,005,122,384,000 | 40.219298 | 98 | 0.423707 | false | 5.203765 | true | false | false |
tiborsimko/invenio-search | invenio_search/api.py | 1 | 6164 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2015-2018 CERN.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Search engine API."""
import hashlib
from functools import partial
from elastics... | mit | 5,341,746,374,392,759,000 | 33.435754 | 78 | 0.611778 | false | 4.236426 | false | false | false |
tlake/advent-of-code | 2016/day04_security_through_obscurity/python/src/part1.py | 1 | 1245 | #!/usr/bin/env python
"""Docstring."""
from collections import Counter
from functools import reduce
from common import (
get_input,
)
class RoomAnalyzer:
"""."""
def __init__(self, input_list=[]):
"""."""
self.input_list = input_list
def process_room_string(self, room_string):
... | mit | 4,726,723,384,833,023,000 | 27.295455 | 110 | 0.578313 | false | 3.536932 | false | false | false |
Lotame/api-examples | py/update_behavior_aliases.py | 1 | 1702 | '''
Please note that this file is an example, not an official Lotame-supported
tool. The Support team at Lotame does not provide support for this script,
as it's only meant to serve as a guide to help you use the Services API.
Filename: update_behavior_aliases.py
Author: Brett Coker
Python Vers... | mit | -7,778,892,717,763,026,000 | 27.366667 | 78 | 0.615159 | false | 3.621277 | false | false | false |
Mocha2007/mochalib | hangman_solver_nadeko.py | 1 | 1481 | from json import load
from re import match, search
from typing import Set
alphabet = 'abcdefghijklmnopqrstuvwxyz'
hangman_data = load(open('hangman.json', 'r'))
all_words = [[i['Word'] for i in word] for word in [category for category in hangman_data.values()]]
all_words = {j.lower() for i in all_words for j in i} # ... | gpl-3.0 | 8,181,521,549,108,761,000 | 34.261905 | 100 | 0.681972 | false | 3.157783 | false | false | false |
OmeGak/indico | indico/modules/rb/tasks_test.py | 2 | 7957 | # This file is part of Indico.
# Copyright (C) 2002 - 2019 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from collections import defaultdict
from datetime import datetime
from itertools import chain
import date... | mit | 5,526,023,487,916,892,000 | 32.57384 | 115 | 0.576851 | false | 3.390285 | false | false | false |
davivcgarcia/wttd-15 | eventex/core/migrations/0002_auto__add_talk.py | 1 | 2973 | # -*- 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 'Talk'
db.create_table(u'core_talk', (
(u'id',... | gpl-3.0 | 1,897,258,236,742,869,000 | 45.46875 | 136 | 0.562395 | false | 3.543504 | false | false | false |
daniellawrence/aws-map | explorer.py | 1 | 1721 | #!/usr/bin/env python
import boto.ec2
import boto.vpc
from local_settings import AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY
import pprint
def region_connect(region_name):
vpc_conn = boto.vpc.connect_to_region(region_name,
aws_access_key_id=AWS_ACCESS_KEY_ID,
... | mit | -6,424,525,554,819,934,000 | 32.745098 | 85 | 0.574666 | false | 3.442 | false | false | false |
eptmp3/Sick-Beard | sickbeard/webserveInit.py | 43 | 6433 | # Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard 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 t... | gpl-3.0 | 3,527,258,859,284,974,600 | 38.459119 | 119 | 0.494948 | false | 4.436552 | false | false | false |
stackforge/watcher | watcher/api/controllers/v1/audit_template.py | 2 | 27944 | # -*- encoding: utf-8 -*-
# Copyright 2013 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless re... | apache-2.0 | 1,051,578,209,060,174,100 | 38.357746 | 79 | 0.596228 | false | 4.289179 | false | false | false |
alope107/nbgrader | nbgrader/api.py | 4 | 81499 | from __future__ import division
from nbgrader import utils
from sqlalchemy import (create_engine, ForeignKey, Column, String, Text,
DateTime, Interval, Float, Enum, UniqueConstraint, Boolean)
from sqlalchemy.orm import sessionmaker, scoped_session, relationship, column_property
from sqlalchemy.orm.exc import NoRe... | bsd-3-clause | -7,452,875,962,685,538,000 | 33.431348 | 109 | 0.607026 | false | 4.415136 | false | false | false |
allefilmskijken/afk | script.module.image_cache/lib/local_lib/db_utils.py | 1 | 3832 | """
Image Cache Module
Copyright (C) 2016 tknorris
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
... | gpl-2.0 | 8,710,367,638,605,920,000 | 35.150943 | 173 | 0.595251 | false | 3.628788 | false | false | false |
Sendinel/Sendinel | sendinel/settings.py | 1 | 5769 | import logging
from datetime import timedelta
from os.path import abspath, dirname
# Django settings for sendinel project.
DEBUG = True #for scheduling set to false
TEMPLATE_DEBUG = DEBUG
PROJECT_PATH = dirname(abspath(__file__))
LOGGING_LEVEL = logging.INFO
LOGGING_LEVEL_TEST = logging.CRITICAL
ADMINS = (
)... | mit | -7,652,383,964,260,054,000 | 30.697802 | 108 | 0.704802 | false | 3.363848 | false | false | false |
pughlab/cbioportal | core/src/test/scripts/system_tests_validate_studies.py | 3 | 7336 | #!/usr/bin/env python3
"""
Copyright (c) 2018 The Hyve B.V.
This code is licensed under the GNU Affero General Public License (AGPL),
version 3, or (at your option) any later version.
"""
import unittest
import sys
import os
import glob
from contextlib import contextmanager
from io import StringIO
import logging.hand... | agpl-3.0 | 3,534,768,252,649,040,400 | 36.050505 | 109 | 0.615867 | false | 3.99782 | true | false | false |
trogdorsey/olivia | olivia/olivia.py | 1 | 57346 | '''
Fork of pdf.py from jsunpack
'''
import binascii
import cStringIO
import Crypto.Cipher.ARC4 as ARC4
import Crypto.Cipher.AES as AES
import hashlib
import lzw
import re
import string
import struct
import xml.dom.minidom
import zlib
class pdfobj(object):
#this class parses single "1 0 obj" up till "endobj" elem... | gpl-2.0 | -9,150,533,911,025,023,000 | 45.813061 | 175 | 0.458253 | false | 4.278914 | false | false | false |
ShadowApex/pygame-sdl2 | pygame2/transform/__init__.py | 1 | 2142 | #!/usr/bin/python
import sdl2
import sdl2.sdlgfx
from sdl2 import surface
import pygame2
def scale(surface, size, dest_sprite=None, resample=0):
"""Scale an image using python's imaging library."""
if not pygame2.display.window:
raise Exception("Error: Window has not yet been created.")
sprit... | gpl-2.0 | -6,444,661,151,184,808,000 | 28.75 | 95 | 0.697012 | false | 3.79115 | false | false | false |
ZeitOnline/zeit.today | src/zeit/today/interfaces.py | 1 | 1088 |
import zope.interface
import zope.schema
from zeit.cms.i18n import MessageFactory as _
class ICountStorage(zope.interface.Interface):
"""Central access to click counting.
This utility takes care of refreshing and caching today.xml.
"""
def get_count(unique_id):
"""Return access count for ... | bsd-3-clause | -7,988,097,960,612,468,000 | 23.727273 | 74 | 0.651654 | false | 4.04461 | false | false | false |
MingdaMingda/TO050001-TinySuggestion | server/bin/tiny_sugg.py | 1 | 3843 | #coding=utf-8
"""
@Brief build index of suggestion
@Author wmd
@Create 2015.11.05
"""
import sugg_conf
import sys
from pypinyin import lazy_pinyin
class SuggServer:
_h_tid2item = {}
_h_key2item = {}
_h_prefix2tids = {}
def is_chinese_char(uchar):
'''
check if chinese character
'''
if ... | mit | -174,198,553,257,588,670 | 19.550802 | 84 | 0.590684 | false | 2.54672 | false | false | false |
mdg/pygrate | pygration/db.py | 1 | 2877 | import sqlalchemy
from sqlalchemy import Column, Integer, String
from sqlalchemy.orm import mapper, sessionmaker
import subprocess
class PygrationState(object):
'''Python object representing the state table'''
def __init__(self, migration=None, step_id=None, step_name=None):
self.migration = migration
... | apache-2.0 | 1,958,043,424,474,704,400 | 34.518519 | 92 | 0.57838 | false | 4.37234 | false | false | false |
balachia/pandoc-filters | pandoc-postprocess.py | 1 | 3430 | # post-process tex files, looking for
# "%% @..." directives
import sys
import codecs
import re
debug = 0
verbose=True
# define processors
class PostProcessor:
def process_line(self, line):
return (line, False)
class ReplaceNextEnvironment(PostProcessor):
def __init__(self, args):
self.open... | gpl-3.0 | -8,395,575,494,031,921,000 | 24.597015 | 74 | 0.523615 | false | 3.832402 | false | false | false |
jdber1/opendrop | opendrop/vendor/aioglib/_policy.py | 2 | 1951 | import asyncio
from gi.repository import GLib
import threading
from typing import MutableMapping
import sys
import weakref
from ._loop import GLibEventLoop
__all__ = [
'GLibEventLoopPolicy',
]
class GLibEventLoopPolicy(asyncio.AbstractEventLoopPolicy):
class _ThreadLocalVariable(threading.local):
va... | gpl-3.0 | -1,136,327,726,012,550,800 | 29.015385 | 112 | 0.643772 | false | 4.064583 | false | false | false |
lepture/june | june/views/topic.py | 1 | 6490 | # coding: utf-8
from flask import Blueprint, g, request, flash
from flask import render_template, redirect, abort, jsonify
from flask import url_for
from flask.ext.babel import gettext as _
from ..helpers import require_user, force_int, limit_request
from ..models import Node, Topic, Reply, Account
from ..models impor... | bsd-3-clause | -4,477,287,090,108,057,000 | 28.634703 | 73 | 0.616949 | false | 3.517615 | false | false | false |
levitte/postrfs | src/util.py | 1 | 4121 | # Postr, a Flickr Uploader
#
# Copyright (C) 2006-2008 Ross Burton <ross@burtonini.com>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; either version 2, or (at your option) any later version.... | gpl-2.0 | 7,361,009,867,287,362,000 | 33.923729 | 135 | 0.648386 | false | 3.510221 | false | false | false |
caffeinate/test-pylot | pi_fly/web_view.py | 1 | 5556 | '''
Created on 15 Apr 2018
@author: si
'''
from datetime import datetime
from flask import Flask, render_template, current_app, abort, request, make_response, redirect
from flask_sqlalchemy import SQLAlchemy
from pi_fly.actional.abstract import CommsMessage
from pi_fly.devices.abstract import AbstractSensor
from pi_... | mit | -6,800,688,278,438,457,000 | 39.26087 | 97 | 0.568754 | false | 4.196375 | true | false | false |
imscs21/myuniv | 1학기/programming/basic/파이썬/파이썬 과제/12/beerclub.py | 1 | 3253 | from tkinter import *
class App(Frame):
def __init__(self, master):
super().__init__(master)
self.pack(padx=20, pady=20)
self.create_widgets()
def create_widgets(self):
Label(self, text="Name").grid(row=0, column=0, sticky=E)
self.name = Entry(self, width=10)
... | apache-2.0 | 7,817,469,158,976,137,000 | 40.177215 | 80 | 0.536121 | false | 3.370984 | false | false | false |
pelme/pyspresso | src/pyspresso/lcd_buttons.py | 1 | 2997 | from itertools import zip_longest
import threading
import time
from ._vendor.Adafruit_CharLCD import Adafruit_CharLCDPlate, SELECT, RIGHT, DOWN, UP, LEFT
def noop():
pass
class LCDButtons:
_lcd = Adafruit_CharLCDPlate()
_io_lock = threading.Lock()
def __init__(self, *, on_up=noop, on_down=noop, o... | gpl-3.0 | 5,132,360,423,351,799,000 | 28.98 | 118 | 0.533867 | false | 3.681818 | false | false | false |
18F/regulations-site | fr_notices/navigation.py | 2 | 8241 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from collections import namedtuple
import logging
import re
from django.core.urlresolvers import reverse
from regulations.generator.toc import fetch_toc
from regulations.views import utils
logger = logging.getLogger(__name__)
class Title(namedtuple(... | cc0-1.0 | -783,655,856,690,520,600 | 38.052133 | 78 | 0.57949 | false | 3.886792 | false | false | false |
tuffy/python-audio-tools | audiotools/vorbis.py | 1 | 20653 | # Audio Tools, a module and set of tools for manipulating audio data
# Copyright (C) 2007-2016 Brian Langenberger
# 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 Licens... | gpl-2.0 | -6,530,508,446,178,070,000 | 35.946333 | 81 | 0.566697 | false | 4.173166 | false | false | false |
SylvainDe/morse-talk | morse_talk/decoding.py | 1 | 1432 | """
Functions to decode messages
"""
# Copyright (C) 2015 by
# Himanshu Mishra <himanshu2014iit@gmail.com>
# All rights reserved.
# GNU license.
from . import encoding
__all__ = ['decode']
def decode(code, encoding_type='default'):
"""Converts a string of morse code into English message
The enc... | gpl-2.0 | -3,792,566,459,160,271,400 | 29.468085 | 79 | 0.521648 | false | 4.056657 | false | false | false |
demdxx/django-cors-atomregister | corsatomregister/patching.py | 1 | 2886 | import sys
from django.db import models
from django.core.signals import request_started
from django.db.models import signals
from django.utils.importlib import import_module
from .utils import register, unregister, isregister, countregister, get_users
def import_class(module, class_name):
return getattr(import_... | mit | -7,094,024,707,691,127,000 | 37.48 | 153 | 0.623008 | false | 3.802372 | false | false | false |
pyannote/pyannote-banyan | banyan/_common_base.py | 2 | 1906 | from functools import wraps
import inspect
import collections
import warnings
import types
import sys
from ._dummy_key import _CmpDummyKey as _CmpDummyKey
RED_BLACK_TREE = 0
"""
Red-black tree algorithm indicator; good for general use.
"""
SPLAY_TREE = 1
"""
Splay tree algorithm indicator; good for temporal loca... | bsd-3-clause | -5,718,820,225,957,598,000 | 25.109589 | 112 | 0.593914 | false | 3.729941 | false | false | false |
neumark/unimodel | unimodel/ast.py | 1 | 2938 | """ Schema for unimodel objects.
This allow us to do several things:
- Encode the schema of the message along with the message itself
- Build ASTs from generators which take eg. jsonschema as input
- Create classes at runtime based on a schema (jsonschema or thrift)
etc.
"""
from unimodel.model imp... | apache-2.0 | -2,165,810,892,055,699,000 | 30.255319 | 77 | 0.707624 | false | 3.548309 | false | false | false |
ericzundel/mvn2pants | src/python/squarepants/pom_properties.py | 1 | 1966 | #!/usr/bin/env python2.7
#
# Print properties from the pom.xml file as BASH variable settings.
# Note that the '.' characters in property names are re-written as '_'
#
import os
import re
import sys
from pom_handlers import DependencyInfo
from pom_utils import PomUtils
class PomProperties(object):
def safe_prop... | apache-2.0 | -266,190,076,049,275,940 | 27.085714 | 94 | 0.667854 | false | 3.315346 | false | false | false |
jianhuashao/WebDownloadJobsManage | server/db_insert_jobs_base.py | 1 | 1293 | from pymongo import MongoClient
import pymongo
from datetime import datetime
mongodb_url = 'mongodb://192.168.0.30:27017/'
mongodb_url = 'mongodb://127.0.0.1:27017/'
client = MongoClient(mongodb_url)
db = client['web_jobs_server']
db = client['test_web_jobs_server']
print "** DB Collections: ", db.collection_names()
... | apache-2.0 | 1,375,580,046,111,213,800 | 28.386364 | 107 | 0.703016 | false | 2.931973 | false | false | false |
eracknaphobia/plugin.video.mlbtv | resources/lib/utils.py | 1 | 2470 | import os, re, sys
from kodi_six import xbmc, xbmcvfs, xbmcaddon
if sys.version_info[0] > 2:
import http
cookielib = http.cookiejar
else:
import cookielib
try:
xbmc.translatePath = xbmcvfs.translatePath
except AttributeError:
pass
class Util:
addon_path = xbmc.translatePath(xbmcaddon.Addon().... | gpl-2.0 | -3,549,970,746,934,953,500 | 30.666667 | 86 | 0.57166 | false | 3.627019 | false | false | false |
MarouenMechtri/CNG-Manager | pyocni/adapters/cnv_toHTTP.py | 3 | 9363 | # Copyright 2010-2012 Institut Mines-Telecom
#
# 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 agre... | apache-2.0 | 8,804,081,542,698,351,000 | 24.793388 | 110 | 0.550785 | false | 4.030564 | false | false | false |
AsherYang/ThreeLine | server/shserver/GetToken.py | 1 | 4145 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Author: AsherYang
Email: 1181830457@qq.com
Date: 2017/7/24
Desc: get weidian token
@see https://wiki.open.weidian.com/guide#145
https://oauth.open.weidian.com/token?grant_type=client_credential&appkey=xxx&secret=xxx
必须为get 请求
"""
import json
import time
import DbUti... | apache-2.0 | 7,821,242,104,657,829,000 | 32.641667 | 152 | 0.642061 | false | 3.098235 | false | false | false |
davidko/evolspyse | core/agents/tkagent.py | 2 | 1603 | """Spyse Tkinter UI agent module"""
from spyse.core.agents.ui import UIAgent
from spyse.core.content.content import ACLMessage
from Tkinter import *
class TkinterAgent(UIAgent):
"""A Tkinter UI agent"""
# http://www.python.org/topics/tkinter/
# the next two lines of code need to be commented out for ep... | lgpl-2.1 | -5,265,511,297,091,729,000 | 28.685185 | 76 | 0.588272 | false | 3.61036 | false | false | false |
TUBAME/migration-tool | src/tubame.portability/resources/tubame-search-modules/src/migration/jbmst_search_java.py | 2 | 11779 | # -*- coding: utf-8 -*-
"""
jbmst_search_java.py
Created on 2013/06/28
Copyright (C) 2011-2013 Nippon Telegraph and Telephone Corporation
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:... | apache-2.0 | 923,077,001,037,912,300 | 34.650307 | 173 | 0.610188 | false | 3.607886 | false | false | false |
dbmi-pitt/DIKB-Micropublication | scripts/mp-scripts/Bio/MaxEntropy.py | 1 | 9062 | # Copyright 2001 by Jeffrey Chang. All rights reserved.
# This code is part of the Biopython distribution and governed by its
# license. Please see the LICENSE file that should have been included
# as part of this package.
"""
Maximum Entropy code.
Uses Improved Iterative Scaling:
XXX ref
# XXX need to define term... | apache-2.0 | -3,662,323,723,767,325,700 | 33.067669 | 82 | 0.614875 | false | 3.420914 | false | false | false |
michaelbratsch/bwb | staff/forms.py | 2 | 8911 | from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit, Layout, Field, Div
from django import forms
from django.core.exceptions import ValidationError
from django.shortcuts import get_object_or_404
from django.utils.formats import date_format
from django.utils.translation import ugettext_lazy... | gpl-3.0 | -8,928,223,286,084,313,000 | 37.244635 | 79 | 0.574683 | false | 3.847582 | false | false | false |
endlessm/chromium-browser | third_party/chromite/lib/paygen/gspaths_unittest.py | 1 | 24292 | # -*- coding: utf-8 -*-
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Test gspaths library."""
from __future__ import print_function
from chromite.lib import cros_test_lib
from chromite.lib.p... | bsd-3-clause | 1,389,626,597,013,450,800 | 39.895623 | 80 | 0.591223 | false | 3.659536 | true | false | false |
rasata/pypes | core/pypes/scheduler.py | 4 | 2416 | """Provides scheduling routines for stackless tasklets.
The scheduler itself runs as a tasklet. It blocks waiting
for input on the channel passed in. When new data is sent
on this channel, the scheduler wakes and begins processing
of the data.
"""
import stackless
from pype import Pype
from graph import get_pairlist... | apache-2.0 | 6,316,725,766,573,957,000 | 29.2 | 83 | 0.580298 | false | 4.144082 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.