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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
pacnos/SwimTeamManager | AdminBackend/forms/forms.py | 1 | 1261 | from django import forms
from django.forms.fields import CharField
from django.forms.widgets import PasswordInput
from AdminBackend.models import TMUser, MailSettings, GeneralSettings
class BasicUserForm(forms.Form):
"""
Class which represents a form for a given user
"""
username = forms.CharField()... | gpl-3.0 | -9,211,434,831,638,739,000 | 21.927273 | 92 | 0.681205 | false | 4.175497 | false | false | false |
team23/django_mc | django_mc/link/text_filters.py | 1 | 1352 | """
Support for django_textfomat.
"""
import re
from bs4 import BeautifulSoup
from django_textformat.registry import registry
from .registry import ResolveError
from .pattern import get_object_reference_regex
@registry.register
def convert_link(value):
"""
Replaces ``page/123`` object links in ``<a href="pa... | bsd-3-clause | -8,278,542,031,773,036,000 | 30.44186 | 111 | 0.565828 | false | 4.333333 | false | false | false |
mitsei/dlkit | dlkit/abstract_osid/mapping/search_orders.py | 1 | 2988 | """Implementations of mapping abstract base class search_orders."""
# pylint: disable=invalid-name
# Method names comply with OSID specification.
# pylint: disable=no-init
# Abstract classes do not define __init__.
# pylint: disable=too-few-public-methods
# Some interfaces are specified as 'markers' and inc... | mit | 8,157,454,669,948,516,000 | 37.805195 | 101 | 0.674364 | false | 4.280802 | false | false | false |
Rhoana/butterfly | bfly/CoreLayer/Core.py | 1 | 13485 | from AccessLayer.QueryLayer import TileQuery
from AccessLayer.QueryLayer import DataQuery
from Cache import Cache
import numpy as np
import tifffile
import StringIO
import zlib
import cv2
class Core(object):
""" Starts the :class:`Cache`
Arguments
-----------
db : :data:`bfly.Butterfly._db_type`
... | mit | -5,482,470,857,884,471,000 | 30.215278 | 71 | 0.557657 | false | 4.038634 | false | false | false |
sofmonk/aima-python | agents.py | 1 | 33633 | """Implement Agents and Environments (Chapters 1-2).
The class hierarchies are as follows:
Thing ## A physical object that can exist in an environment
Agent
Wumpus
Dirt
Wall
...
Environment ## An environment holds objects, runs simulations
XYEnvironment
VacuumEnvironment
W... | mit | 3,272,948,040,308,305,000 | 33.81677 | 100 | 0.570719 | false | 4.001071 | false | false | false |
thor-kill/thor | src/fact_parse.py | 1 | 1878 | #The following fuction will take the following parameters:
#A HTML page with the island info
#And it will produce:
#A timestamp of when the fuction was executed in Local Time in a form of struct_time
#The type of data produced by the function in a form of a string "fact"
#The yoweb location of the page in a form of a ... | gpl-3.0 | -5,271,305,026,788,944,000 | 38.957447 | 115 | 0.64803 | false | 2.733624 | false | false | false |
kingsamchen/Eureka | crack-data-structures-and-algorithms/leetcode/remove_zero_sum_consecutive_nodes_from_linked_list_q1171.py | 1 | 1417 | # Definition for singly-linked list.
class ListNode(object):
def __init__(self, x):
self.val = x
self.next = None
# 核心点:
# 如果结点i和节点j**之间**存在和为0的连续节点,即 acc(list[i:j]) == 0,那么acc[:i+1] == acc[:j]
# 举例:
# 结点值 1, 2, 3, -5, 4
# 累计和 1, 3, 6, 1, 5
# 连续结点 2, 3, -5 和为0,所以第一个节点和第四个结点的累积和一样,都是1
# 因此只需要用一个字... | mit | -4,954,675,743,078,419,000 | 26.068182 | 90 | 0.525609 | false | 2.396378 | false | false | false |
ros2/rcl_interfaces | test_msgs/src/test_msgs/service_fixtures.py | 1 | 5160 | # Copyright 2016 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 | -8,966,299,819,705,156,000 | 31.866242 | 91 | 0.641279 | false | 3.046045 | true | false | false |
sjuxax/raggregate | raggregate/views/epistle.py | 1 | 4254 | import sqlalchemy
from raggregate.queries import users
from raggregate.queries import submission
from raggregate.queries import epistle as epistle_queries
from raggregate.queries import general
from pyramid.response import Response
from pyramid.view import view_config
from raggregate.models import DBSession
from ragg... | apache-2.0 | -4,199,419,178,896,490,000 | 35.050847 | 128 | 0.570052 | false | 3.53616 | false | false | false |
alexwlchan/pygmentizr | pygmentizr/renderer.py | 1 | 1591 | # -*- encoding: utf-8 -*-
import pygments
from pygments.formatters import HtmlFormatter
from pygmentizr import app
STYLE_OPTIONS = [
'Use CSS classes',
'Apply inline CSS styles',
'For Metacom',
]
def metacom_code(hilite_str):
"""
Apply special styling for rendering code on Metacom.
"""
... | mit | -2,605,692,941,238,897,000 | 26.929825 | 75 | 0.644249 | false | 3.399573 | false | false | false |
kd0aij/matrixpilot_old | Tools/MAVLink/MAVProxy/modules/CUAV/nmea.py | 1 | 5122 | #!/usr/bin/env python
'''
nmea serial output module
Matthew Ridley
August 2012
UAV outback challenge search and rescue rules
5.15 Situational Awareness Requirement
It is highly desirable that teams provide:
- an NMEA 0183 serial output with GPRMC and GPGGA sentences for
aircraft current location
'''... | gpl-3.0 | -8,940,093,020,231,977,000 | 28.670659 | 131 | 0.568333 | false | 2.874299 | false | false | false |
fzimmermann89/pyload | module/plugins/hoster/UptoboxCom.py | 1 | 1065 | # -*- coding: utf-8 -*-
from module.plugins.internal.XFSHoster import XFSHoster, create_getInfo
class UptoboxCom(XFSHoster):
__name__ = "UptoboxCom"
__type__ = "hoster"
__version__ = "0.24"
__status__ = "testing"
__pattern__ = r'https?://(?:www\.)?(uptobox|uptostream)\.com/\w{12}'
__c... | gpl-3.0 | 308,675,472,724,647,000 | 27.783784 | 86 | 0.566197 | false | 2.983193 | false | false | false |
deafhhs/adapt | exports/views.py | 1 | 11220 | import csv
from decimal import Decimal, ROUND_DOWN
from datetime import datetime
from django.http import HttpResponse
from django.contrib.auth.decorators import login_required
from django.views.generic import TemplateView
from django.db.models import Q
from clients.models import Settings as AdaptSettings
from clients... | mit | 4,204,827,722,601,969,000 | 36.275748 | 101 | 0.521658 | false | 3.552882 | false | false | false |
msiedlarek/wiring | example/guestbook/application.py | 1 | 2661 | import threading
from werkzeug.exceptions import HTTPException
from werkzeug.routing import Map, MapAdapter
from werkzeug.wrappers import Request
from wiring import (
Factory,
Graph,
IScope,
Module,
implements,
inject,
provides,
scope
)
from guestbook.response import LazyResponse
cla... | apache-2.0 | -2,544,507,654,549,745,000 | 25.878788 | 66 | 0.612176 | false | 4.580034 | false | false | false |
tnaganawa/execjson | web/mysite/batch/do.py | 1 | 7718 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
import subprocess
import sys
import json
import glob
import threading
import time
import os
###
#dryrun=True
dryrun=False
#
generic_parse_list=["mkdir", "execshell", "editcron", "editat", "deletefile",
"modifyuseros", "passwdresetos", "setpublickey"
]
###
finallyjobidlis... | apache-2.0 | -8,014,278,943,398,472,000 | 25.808362 | 149 | 0.671172 | false | 3.117504 | false | false | false |
leetking/configures | vim/vim/ycm_common_conf.py | 1 | 3419 | import os
import re
import subprocess
from operator import add
from functools import reduce
import ycm_core
def pkg_config(pkg):
return subprocess.check_output(['pkg-config', '--cflags', pkg], universal_newlines=True).split()
PKGS = ('sdl2', 'SDL2_image', 'SDL2_mixer', 'gtk+-3.0', 'gtkmm-3.0')
kernel_version = ... | gpl-2.0 | 8,765,949,917,624,255,000 | 26.796748 | 100 | 0.643171 | false | 3.532025 | false | false | false |
youkaisteve/NvWa | WX/WaterMilitary/Scout.py | 1 | 1712 | """
侦查员:负责分析数据,确定目标帖子
"""
from urllib import request, parse
import urllib
import random
import logging
from lxml import etree
import re
from HeadQuarters import *
class Scout:
userAgent = [
'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11',
'M... | mit | -956,660,646,653,349,200 | 33.791667 | 131 | 0.613772 | false | 2.820946 | false | false | false |
ActiveState/code | recipes/Python/578010_Simple_Morse_Code_Practice/recipe-578010.py | 1 | 3174 | # MPO2x.py
#
# A DEMO, very crude, Morse Code Practice Oscillator...
# Tested on Debian 6.0.0 using Python 2.6.6 and 2.7.2 and PCLinuxOS 2009 using Python 2.5.2.
# It may well work on earlier Python versions but is untested.
#
# (C)2011-2012, B.Walker, G0LCU. Now issued as Public Domain...
#
# The device, "/dev/audio" ... | mit | 7,723,819,785,416,796,000 | 33.5 | 109 | 0.691871 | false | 2.928044 | false | false | false |
alanconway/qpid-proton | python/proton/__init__.py | 1 | 3564 | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache-2.0 | -2,307,890,942,646,522,000 | 26.206107 | 110 | 0.693883 | false | 3.815846 | false | false | false |
felixmol/PRO3600 | src/v2/initialisation.py | 1 | 7220 | # -*- coding: utf-8 -*-
"""
(c) COPYRIGHT GNU-GPL V3
@author: Félix Molina
@version: 1.0
"""
import pygtk
import controller
pygtk.require('2.0')
import gtk as Gtk
class InitialisationMenu:
"""
This class constructs a window containing a menu to choose type of initialization.
This code results of modi... | gpl-3.0 | 4,989,733,643,777,011,000 | 38.021622 | 113 | 0.651011 | false | 3.618045 | false | false | false |
lovepopcards/tap-mailchimp | src/tap_mailchimp/streams.py | 1 | 11922 | import datetime
import itertools
from abc import abstractmethod
from singer import record_counter, Counter, Schema, write_schema, write_record
from singer.metrics import Metric, Tag
import tap_mailchimp.logger as logger
from .client import Status
from .utils import clean_links, fix_blank_date_time_format, tap_start_dat... | mit | 7,530,409,766,948,393,000 | 35.910217 | 82 | 0.522983 | false | 4.071721 | true | false | false |
TJKessler/ECNet | ecnet/tasks/tuning.py | 1 | 4978 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# ecnet/tasks/tuning.py
# v.3.3.2
# Developed in 2020 by Travis Kessler <travis.j.kessler@gmail.com>
#
# Contains functions/fitness functions for tuning hyperparameters
#
# stdlib. imports
from multiprocessing import set_start_method
from os import name
# 3rd party impo... | mit | -5,610,476,986,022,409,000 | 34.81295 | 79 | 0.589795 | false | 3.466574 | false | false | false |
paultcochrane/pyvisi | pyvisi/renderers/gnuplot/mesh_plot.py | 1 | 4998 | # Copyright (C) 2004-2008 Paul Cochrane
#
# 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 distribut... | gpl-2.0 | -7,867,313,678,840,481,000 | 30.2375 | 77 | 0.609444 | false | 4.050243 | false | false | false |
sviete/AIS-EXT | mopidy_ais_ext/backend/speaker_backend.py | 1 | 1915 | from __future__ import absolute_import, unicode_literals
import logging
import pykka
from mopidy import backend
from ..utils import Utils
import pickle
from .ais import AisClient
from mopidy_ais_ext.stt import server
logger = logging.getLogger(__name__)
class SpeakerBackend(pykka.ThreadingActor, backend.Backend):
... | apache-2.0 | -7,509,869,395,855,914,000 | 34.462963 | 79 | 0.600522 | false | 3.572761 | false | false | false |
htem/CATMAID | django/projects/mysite/pipelinefiles.py | 1 | 3595 | # In this module all the static files are specified that are required by the
# CATMAID front-end. The configuration is separated in libraries and CATMAID's
# own files:
#
# Libraries: To add a new library, add a new entry into the libraries_js
# dictionary and, if needed, add the libraries CSS files to sourcefiles
# tu... | agpl-3.0 | -1,035,503,597,028,127,000 | 31.981651 | 84 | 0.57886 | false | 3.139738 | false | false | false |
tonnrueter/pymca_devel | PyMca/QHDF5StackWizard.py | 1 | 13864 | #/*##########################################################################
# Copyright (C) 2004-2012 European Synchrotron Radiation Facility
#
# This file is part of the PyMca X-ray Fluorescence Toolkit developed at
# the ESRF by the Software group.
#
# This toolkit is free software; you can redistribute it and/or m... | gpl-2.0 | -9,032,879,031,912,109,000 | 36.673913 | 93 | 0.564339 | false | 4.17968 | false | false | false |
agconti/njode | env/lib/python2.7/site-packages/allauth/socialaccount/providers/vk/provider.py | 1 | 1239 | from allauth.socialaccount import providers
from allauth.socialaccount.providers.base import ProviderAccount
from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider
class VKAccount(ProviderAccount):
def get_profile_url(self):
return self.account.extra_data.get('link')
def get_avata... | bsd-3-clause | 6,459,502,181,046,145,000 | 29.219512 | 74 | 0.647296 | false | 3.731928 | false | false | false |
fryntiz/python | Mini-Scripts/Palabra_Mas_Repetida_en_Archivo.py | 1 | 1389 | #!/usr/bin/python
# -*- encoding: utf-8 -*-
#######################################
# ### Raúl Caro Pastorino ### #
## ## ## ##
### # https://github.com/fryntiz/ # ###
## ## ## ##
# ### www.fryntiz.es ### #
###################################... | gpl-3.0 | 3,904,441,873,572,257,000 | 27.265306 | 78 | 0.537906 | false | 3.091518 | false | false | false |
hanteng/pyCountryGroup | pyCountryGroup/data_src/1X0A36I0.py | 1 | 2949 | # -*- coding: utf-8 -*-
#歧視無邊,回頭是岸。鍵起鍵落,情真情幻。
URL_source = u'http://china-trade-research.hktdc.com/business-news/article/One-Belt-One-Road/The-Belt-and-Road-Initiative-Country-Profiles/obor/en/1/1X000000/1X0A36I0.htm'
encoding_source = "utf-8"
import os
URL_path, downloaded_source = os.path.split(URL_source)
file_outp... | gpl-3.0 | 5,716,837,244,566,504,000 | 27.242718 | 171 | 0.647989 | false | 2.995881 | false | false | false |
wpoely86/easybuild-framework | easybuild/tools/version.py | 1 | 3283 | ##
# Copyright 2009-2016 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (F... | gpl-2.0 | -1,974,339,974,265,691,600 | 35.88764 | 110 | 0.720682 | false | 3.289579 | false | false | false |
JoshuaKirby/Projects | Simple_Insert/Window.py | 1 | 1184 | '''
Created on Feb 24, 2016
@author: jokirby
'''
import csv
import tkinter as tk
import time
class Window(tk.Frame):
def __init__(self, master=None):
tk.Frame.__init__(self, master)
self.pack()
self.createWidgets()
def createWidgets(self):
self.inString = t... | gpl-3.0 | 6,379,389,522,037,318,000 | 24.954545 | 73 | 0.530405 | false | 3.794872 | false | false | false |
barbarahui/nuxeo-calisphere | utils/diff_nx_couch.py | 1 | 1686 | #!/usr/bin/env python
# -*- coding: utf8 -*-
import sys
import argparse
import couchdb
import ssl
import s3stash.s3tools
from deepharvest.deepharvest_nuxeo import DeepHarvestNuxeo
def main(argv=None):
parser = argparse.ArgumentParser(
description='print differences between Nuxeo and CouchDB for a '
... | bsd-3-clause | 6,225,450,410,431,811,000 | 30.811321 | 104 | 0.651839 | false | 3.28655 | false | false | false |
LinDA-tools/LindaWorkbench | linda/linda_app/management/commands/update_datasources.py | 1 | 1077 | __author__ = 'dimitris'
import time
from datetime import datetime
from django.db.models import Q
from django.core.management import BaseCommand
from linda_app.models import DatasourceDescription
class Command(BaseCommand):
help = 'Update existing datasources'
def handle(self, *args, **options):
whil... | mit | 272,534,954,458,373,500 | 37.5 | 107 | 0.597029 | false | 4.378049 | false | false | false |
olimastro/DeepMonster | deepmonster/machinery/architecture.py | 1 | 3587 | from dicttypes import onlynewkeysdict
from core import LinkingCore
from linkers import ModelParametersLink
from deepmonster.nnet.network import Feedforward
from deepmonster.utils import flatten
def build_group(group):
"""Architecture decorator a build method. It is usually very handy to be able
to access a who... | mit | 6,173,608,391,816,336,000 | 32.212963 | 81 | 0.63535 | false | 4.09008 | false | false | false |
HerlanAssis/Django-AulaOsvandoSantana | gerenciador/gerenciador/urls.py | 1 | 1184 | """gerenciador URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.8/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class... | mit | -5,588,760,196,079,182,000 | 38.5 | 92 | 0.705236 | false | 3.421965 | false | false | false |
wenli810620/twitter-photos | twphotos/parallel.py | 1 | 1622 | import os
import Queue
import threading
import sys
import urllib3
from .settings import PROGRESS_FORMATTER, NUM_THREADS
pool_manager = urllib3.PoolManager()
photo_queue = Queue.Queue()
lock = threading.Lock()
downloaded = 0
def parallel_download(photos, user, size, outdir):
threads = []
# Put photos into `p... | bsd-2-clause | 7,996,047,715,989,306,000 | 24.34375 | 73 | 0.567818 | false | 3.816471 | false | false | false |
L0mion/ORMTANKAR | Game.py | 1 | 10065 | import random
import Train
import Tile
import pygame
import threading
import Mindmap
from random import *
from Train import *
from Tile import *
from pygame import *
from threading import *
from Mindmap import *
numPlayers = 2
trainStartLength = 3
tileDimX = 32
tileDimY = 22
offsetHUD = 90
tileImageWidth = 25
tileIma... | mit | -4,539,419,486,206,212,000 | 35.205036 | 128 | 0.583209 | false | 3.644098 | false | false | false |
3dfxsoftware/cbss-addons | hr_expense_replenishment/wizard/attach_invoice_to_expense_wizard.py | 1 | 2684 | #!/usr/bin/python
# -*- encoding: utf-8 -*-
###############################################################################
# Module Writen to OpenERP, Open Source Management Solution
# Copyright (C) OpenERP Venezuela (<http://openerp.com.ve>).
# All Rights Reserved
############# Credits ######################... | gpl-2.0 | 5,525,930,440,627,538,000 | 48.703704 | 79 | 0.561848 | false | 4.174184 | false | false | false |
mppmu/secdec | nodist_examples/Zbb_vertex_correction_finite/F1diminc2_21.py | 1 | 1809 | #! /usr/bin/env python
from pySecDec.loop_integral import loop_package
import pySecDec as psd
li = psd.loop_integral.LoopIntegralFromPropagators(
propagators = ['k1^2', '(k1-k2)^2', '(k1-k2+p1)^2-mZ^2', '(k2)^2', '(k2+p2)^2', '(k1+p1+p2)^2', '(k2+p1)^2'],
loop_momenta = ['k1','k2'],
external_momenta = ['p1','p2','p3... | gpl-3.0 | 1,484,679,419,649,431,000 | 28.655738 | 118 | 0.595357 | false | 3.071307 | false | false | false |
afunTW/moth-graphcut | src/support/test_tool.py | 1 | 1392 | import logging
from functools import wraps
LOGGER = logging.getLogger(__name__)
def print_stack(func):
@wraps(func)
def tmp(*args, **kwargs):
print(func.__name__)
return func(*args, **kwargs)
return tmp
def print_caller_name(stack_size=3):
def wrapper(fn):
def inner(*args, **k... | mit | -1,565,824,654,904,213,800 | 32.166667 | 85 | 0.45977 | false | 4.578947 | false | false | false |
lebauce/artub | builder/Installer/buildtests/runtests.py | 1 | 2169 | import os, sys, glob, string
try:
here=os.path.dirname(__file__)
except NameError:
here=os.path.dirname(sys.argv[0])
PYTHON = sys.executable
if sys.platform[:3] == 'win':
if string.find(PYTHON, ' ') > -1:
PYTHON='"%s"' % PYTHON
def empty(dir):
for fnm in os.listdir(dir):
pat... | gpl-2.0 | 4,644,193,847,828,193,000 | 26.539474 | 86 | 0.491932 | false | 3.663851 | true | false | false |
brix4dayz/TRiCAM2.0 | frame_grabber.py | 1 | 2011 | """
frame_grabber.py
>>> python frame_grabber.py [from dir] [to dir] [frame capture rate]
"""
import hpidol as hp
import cv2, sys, shutil
import numpy as np
import scipy.misc, os
import pandas as pd
from collections import Counter
from PIL import Image
def post_img(image):
return hp.recognize_logos(image)
def get... | mit | 2,488,921,055,702,336,000 | 25.116883 | 71 | 0.635007 | false | 2.628758 | false | false | false |
pallets/werkzeug | src/werkzeug/sansio/multipart.py | 1 | 8751 | import re
from dataclasses import dataclass
from enum import auto
from enum import Enum
from typing import cast
from typing import List
from typing import Optional
from typing import Tuple
from .._internal import _to_bytes
from .._internal import _to_str
from ..datastructures import Headers
from ..exceptions import Re... | bsd-3-clause | 137,302,185,878,178,610 | 32.657692 | 88 | 0.556051 | false | 4.0439 | false | false | false |
koraysaritas/slack-db-tracker | helpers/resource_helper.py | 1 | 6488 | import collections
import datetime
from copy import copy
from numpy import logspace, log10, where
from psutil import virtual_memory, cpu_percent, disk_partitions, disk_usage
from helpers import slack_helper
from helpers import utils
def mem_percents_logspaced(start_percent=None, end_percent=90, bins_count=30):
... | mit | -5,442,640,301,885,686,000 | 40.063291 | 119 | 0.57799 | false | 3.932121 | false | false | false |
realsobek/freeipa | ipapython/setup.py | 1 | 1701 | #!/usr/bin/python2
# Copyright (C) 2007 Red Hat
# see file 'COPYING' for use and warranty information
#
# 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... | gpl-3.0 | -5,007,972,680,354,007,000 | 29.375 | 71 | 0.601411 | false | 4.088942 | false | false | false |
jstooks9/mpp | mesytec_process_2.py | 1 | 3805 | # Convert a list of hex values into decimal values
# Update from labview_parse_1
# - now includes the option to keep only the first n columns of the original data file,
# where n is the second user input
# Arguments:
# 1 - unparsed input file name
# 2 - number of columns to keep from the original data file
impor... | apache-2.0 | -6,810,710,433,948,125,000 | 24.039474 | 89 | 0.642576 | false | 2.826895 | false | false | false |
akeating14/data-viz | zeno/zeno/api/views.py | 1 | 7654 | import os
from mainsite.models import Dashboard, Query, Database
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from sqlalchemy import create_engine
class RunQueryViewSet(APIView):
"""
Queries your database
"""
def post(self, re... | mit | 7,034,387,949,738,040,000 | 41.765363 | 117 | 0.586621 | false | 4.398851 | false | false | false |
smyrman/kikrit | qt_client/utils/threads.py | 1 | 1890 | # -*- coding: utf-8 -*-
# Copyright (C) 2010: Sindre Røkenes Myren, Andreas Hopland Sperre
# This file is part of KiKrit wich is distrebuted under GPLv3. See the file
# COPYING.txt for more details.
import serial
from PyQt4 import QtCore
class RFIDThread(QtCore.QThread):
"""A thread to check for bibed RFIDCards.... | gpl-3.0 | 6,121,027,842,649,518,000 | 21.759036 | 75 | 0.663843 | false | 2.928682 | false | false | false |
MediffRobotics/DeepRobotics | DeepLearnMaterials/tutorials/Reinforcement_learning_TUT/7_Policy_gradient/run_MountainCar.py | 1 | 1212 | """
Deep Q network,
The mountain car example
"""
import gym
from RL_brain import DeepQNetwork
env = gym.make('MountainCar-v0')
print(env.action_space)
print(env.observation_space)
print(env.observation_space.high)
print(env.observation_space.low)
RL = DeepQNetwork(n_actions=3, n_features=2, learning_rate=0.0005, e... | gpl-3.0 | -6,166,482,180,616,374,000 | 21.444444 | 82 | 0.59736 | false | 3.452991 | false | false | false |
SystemsGenetics/KINC | scripts/kinc-similarity.py | 1 | 6515 | import argparse
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import pprint
import scipy.stats
import seaborn as sns
import sklearn.cluster
import sklearn.mixture
def create_gmm(n_clusters):
return sklearn.mixture.GaussianMixture(n_components=n_clusters)
def create_kmeans(n_clusters):
r... | mit | 1,326,046,801,331,794,000 | 27.574561 | 134 | 0.651113 | false | 2.793739 | false | false | false |
jithinbp/SEELablet-apps | seel_res/GUI/B_ELECTRONICS/A_BJT_AND_FET/D_transistorCEbackup.py | 1 | 6537 | #!/usr/bin/python
'''
Study Common Emitter Characteristics of NPN transistors.
Saturation currents, and their dependence on base current
can be easily visualized.
'''
from __future__ import print_function
import time,sys,os
from SEEL_Apps.utilitiesClass import utilitiesClass
from templates import ui_transistor as t... | gpl-3.0 | -1,666,274,895,670,679,800 | 32.523077 | 281 | 0.695273 | false | 2.670343 | false | false | false |
yunify/qingcloud-cli | qingcloud/cli/iaas_client/actions/router/delete_router_statics.py | 1 | 1658 | # =========================================================================
# Copyright 2012-present Yunify, Inc.
# -------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this work except in compliance with the Licens... | apache-2.0 | 5,536,000,856,106,808,000 | 40.45 | 86 | 0.598311 | false | 4.397878 | false | false | false |
jpmeijers/scripts | clementine.py | 1 | 3604 | __module_name__ = "xchat-clementine"
__module_version__ = "1.0"
__module_description__ = "Get NP information from Clementine"
from dbus import Bus, DBusException
import xchat
import os
import sys
import re
import string
bus = Bus(Bus.TYPE_SESSION)
global nowplaying
global time
global chan
global cnc
nowplaying = " "
de... | gpl-2.0 | 8,350,849,997,120,218,000 | 28.785124 | 134 | 0.631521 | false | 2.949264 | false | false | false |
CN-UPB/OpenBarista | components/decaf-cli/docs/sphinx/source/conf.py | 1 | 11459 | # -*- coding: utf-8 -*-
#
# DECaF CLI documentation build configuration file, created by
# sphinx-quickstart on Wed Feb 3 16:24:56 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
#... | mpl-2.0 | -7,809,164,063,558,782,000 | 30.654696 | 79 | 0.706955 | false | 3.652853 | true | false | false |
becomejapan/yahooads-python-lib | examples/CampaignCriterionService/CampaignCriterionService_mutate_ADD.py | 1 | 3055 | # Copyright 2017 Become Corp. 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... | apache-2.0 | -6,406,971,968,121,156,000 | 29.858586 | 153 | 0.648118 | false | 3.698547 | false | false | false |
YaguangZhang/EarsMeasurementCampaignCode | Trials/RefCode/Trial_TTCI_Test_Receiver_Mod.py | 1 | 6259 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
##################################################
# GNU Radio Python Flow Graph
# Title: Top Block
# Generated: Thu Jun 15 11:48:26 2017
##################################################
if __name__ == '__main__':
import ctypes
import sys
if sys.platform.sta... | mit | -2,243,467,417,598,548,500 | 32.470588 | 123 | 0.566704 | false | 3.241326 | false | false | false |
racker/python-raxcli | raxcli/apps/registry/commands/services/list.py | 1 | 2330 | # Copyright 2013 Rackspace
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the... | apache-2.0 | -1,686,981,790,521,945,300 | 37.196721 | 76 | 0.65794 | false | 4.371482 | false | false | false |
naoliv/osmose-backend | plugins/Name_Dictionary.py | 1 | 10779 | #-*- coding: utf-8 -*-
###########################################################################
## ##
## Copyrights Etienne Chové <chove@crans.org> 2009 ##
## ... | gpl-3.0 | -1,406,915,346,730,571,000 | 44.164557 | 204 | 0.503643 | false | 3.265406 | true | false | false |
mitsuhiko/celery | celery/backends/cache.py | 1 | 2484 | from datetime import timedelta
from carrot.utils import partition
from celery import conf
from celery.backends.base import KeyValueStoreBackend
from celery.exceptions import ImproperlyConfigured
from celery.utils import timeutils
from celery.datastructures import LocalCache
def get_best_memcache(*args, **kwargs):
... | bsd-3-clause | -6,252,512,206,562,528,000 | 31.25974 | 77 | 0.611111 | false | 4.327526 | false | false | false |
CoderDuan/mantaflow | scenes/guiding_3d02_high.py | 1 | 2539 | #
# Simulation of a 3D buoyant smoke density plume
# guided by a low res sim
#
# parameterss:
# W = guiding weight (constant value of wScalar)
# beta = blur radius
#
from manta import *
# params from original simulation
# res1 = before interp, res2 = after interp
timestep = 0.65
res1 = 40
numFrames = 200
factor ... | gpl-3.0 | -1,262,894,596,321,131 | 24.39 | 105 | 0.717999 | false | 2.465049 | false | false | false |
autosportlabs/podium-api | podium_api/types/racestat.py | 1 | 3550 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
class Racestat(object):
"""
Object that represents a race statistic snapshot
**Attributes:**
**racestat_id** (str): Unique id for this racestat
**comp_number** (str): Competitor number assigned for the race
**comp_class*... | mit | 3,397,433,037,389,805,600 | 37.444444 | 92 | 0.562817 | false | 3.829558 | false | false | false |
hsolbrig/shexypy | shexypy/utils/manifest.py | 1 | 4607 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Mayo Clinic
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# Redistributions of source code must retain the above copyright notice, this
# list... | mit | -8,299,411,975,679,905,000 | 34.992188 | 106 | 0.653571 | false | 3.845576 | false | false | false |
puneetgkaur/sugar | src/jarabe/journal/misc.py | 1 | 14648 | # Copyright (C) 2007, One Laptop Per Child
# Copyright (C) 2014, Ignacio Rodriguez
#
# 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 la... | gpl-2.0 | -4,223,105,896,574,441,000 | 33.54717 | 79 | 0.651761 | false | 4.006565 | false | false | false |
phageghost/pg_tools | pgtools/pileups.py | 1 | 198251 | import sys
#sys.path.append('/home/dskola/workspace/expression_modeling/')
import matplotlib
#matplotlib.use('Agg')
import collections
import contextlib
import csv
import datetime
import math
import multiprocessing
import os
import re
import shutil
import subprocess
import gzip
import numpy
import scipy.ndimage
import ... | mit | 5,687,496,542,842,366,000 | 48.32844 | 210 | 0.54599 | false | 4.133071 | false | false | false |
googleads/google-ads-python | google/ads/googleads/v7/services/services/keyword_plan_ad_group_keyword_service/transports/base.py | 1 | 4427 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -1,597,615,567,776,775,000 | 35.286885 | 89 | 0.655523 | false | 4.20019 | false | false | false |
ericleong/slickr | compare.py | 1 | 1667 | #!/usr/bin/env python
from __future__ import print_function
from collections import defaultdict
import os
import sys
import math
import fileinput
import matplotlib.pyplot as plt
totals = defaultdict(list)
for line in fileinput.input():
try:
values = map(float, line.split("\t"))
totals[os.path.bas... | mit | 7,707,274,769,786,644,000 | 29.327273 | 170 | 0.641272 | false | 3.430041 | false | false | false |
RaitoBezarius/crossbar | crossbar/adapter/rest/subscriber.py | 1 | 3686 | #####################################################################################
#
# Copyright (C) Tavendo GmbH
#
# Unless a separate license agreement exists between you and Tavendo GmbH (e.g. you
# have purchased a commercial license), the license terms below apply.
#
# Should you enter into a separate licen... | agpl-3.0 | -1,758,012,883,252,746,000 | 35.49505 | 98 | 0.616658 | false | 4.500611 | false | false | false |
duncanwp/iris | lib/iris/plot.py | 1 | 45798 | # (C) British Crown Copyright 2010 - 2018, Met Office
#
# This file is part of Iris.
#
# Iris is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the
# Free Software Foundation, either version 3 of the License, or
# (at your option) any l... | lgpl-3.0 | 2,761,913,923,087,383,600 | 35.521531 | 79 | 0.603105 | false | 3.897039 | false | false | false |
cym13/pytichess | piece.py | 1 | 2635 |
class Piece:
def __init__(self, color,name):
self.color = color
self.name = name
def is_move_valid(self, origine,destination):
print("This piece has no move, please report")
def is_ennemy(self,destination):
if Game.at(destination) != self.color:
return True
... | gpl-3.0 | 4,124,090,706,553,393,700 | 25.35 | 85 | 0.509677 | false | 3.974359 | false | false | false |
soylentdeen/Graffity | src/SkyRotation/RecnOptimiserTester.py | 1 | 2601 | import pyfits
import numpy
STAT_HOIM = []
STAT_ANGSENS = []
STAT_XSENS = []
STAT_YSENS = []
STAT_ANGLE_TABLE = []
for derotAngle in numpy.arange(180.0):
IM = numpy.ones(8160)*(-1.0*derotAngle)
STAT_HOIM.append(IM)
ANGSENS = (numpy.ones(8160)*derotAngle+0.1)*(-1.0)
STAT_ANGSENS.append(ANGSENS)
XSENS... | mit | 1,141,247,121,988,924,400 | 35.125 | 69 | 0.719339 | false | 2.297703 | false | false | false |
dbarrosop/sir_apps | fib_optimizer/fib_optimizer.py | 1 | 7711 | #!/usr/bin/env python
from pySIR.pySIR import pySIR
import argparse
import datetime
import json
import os
import shlex
import subprocess
import sys
import time
import logging
logger = logging.getLogger('fib_optimizer')
log_format = '%(asctime)s - %(name)s - %(levelname)s - %(message)s'
logging.basicConfig(level=log... | apache-2.0 | -6,588,865,288,308,793,000 | 29.967871 | 117 | 0.576968 | false | 3.390941 | false | false | false |
OpenHumans/open-humans | common/tasks.py | 1 | 2121 | from django.core.mail.message import EmailMultiAlternatives
from django.template import engines
from django.template.loader import render_to_string
from django.urls import reverse
from celery import shared_task
from celery.utils.log import get_task_logger
from common.utils import full_url
from private_sharing.models ... | mit | -3,445,745,483,803,665,000 | 35.568966 | 82 | 0.63272 | false | 4.267606 | false | false | false |
home-assistant/home-assistant | homeassistant/components/kodi/__init__.py | 1 | 2103 | """The kodi component."""
import logging
from pykodi import CannotConnectError, InvalidAuthError, Kodi, get_kodi_connection
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import (
CONF_HOST,
CONF_PASSWORD,
CONF_PORT,
CONF_SSL,
CONF_USERNAME,
EVENT_HOMEASSISTANT_... | apache-2.0 | -897,387,266,215,051,500 | 24.646341 | 87 | 0.655254 | false | 3.625862 | true | false | false |
bowen0701/algorithms_data_structures | lc0295_find_median_from_data_stream.py | 1 | 2865 | """Leetcode 295. Find Median from Data Stream
Hard
URL: https://leetcode.com/problems/find-median-from-data-stream/
Median is the middle value in an ordered integer list.
If the size of the list is even, there is no middle value.
So the median is the mean of the two middle value.
For example,
[2,3,4], the median i... | bsd-2-clause | -1,964,964,752,135,696,000 | 29.806452 | 81 | 0.627574 | false | 3.350877 | false | false | false |
emi420/APIzza | file.api/file/views.py | 1 | 3568 | import string
import os.path
import copy
import requests
import mimetypes
from file import settings
from django.http import HttpResponseRedirect, HttpResponse
from decorators import HttpOptionsDecorator, VoolksAPIAuthRequired
from django.views.decorators.csrf import csrf_exempt
def get_api_credentials(request):
'... | gpl-3.0 | 3,918,435,223,595,827,000 | 27.094488 | 102 | 0.612108 | false | 3.803838 | false | false | false |
zultron/virt-manager | virtinst/network.py | 1 | 5922 | #
# Copyright 2013 Red Hat, Inc.
# Cole Robinson <crobinso@redhat.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
# (at your option) any later version.... | gpl-2.0 | 8,328,423,249,230,888,000 | 28.029412 | 75 | 0.567882 | false | 4.045082 | false | false | false |
mkeller0815/py65 | py65/tests/utils/test_hexdump.py | 1 | 4203 | import unittest
import sys
from py65.utils.hexdump import load, Loader
class TopLevelHexdumpTests(unittest.TestCase):
def test_load(self):
text = 'c000: aa bb'
start, data = load(text)
self.assertEqual(0xC000, start)
self.assertEqual([0xAA, 0xBB], data)
class HexdumpLoaderTests(u... | bsd-3-clause | 72,136,466,022,860,510 | 31.581395 | 67 | 0.587675 | false | 3.570943 | true | false | false |
HybridF5/jacket | jacket/storage/scheduler/filters/availability_zone_filter.py | 1 | 1247 | # Copyright (c) 2011-2012 OpenStack Foundation.
# 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
#
# U... | apache-2.0 | 8,204,716,274,871,525,000 | 37.96875 | 79 | 0.708901 | false | 4.227119 | false | false | false |
wangqi/facebookads | python/facebookads/exceptions.py | 1 | 3844 | # Copyright 2014 Facebook, Inc.
# You are hereby granted a non-exclusive, worldwide, royalty-free license to
# use, copy, modify, and distribute this software in source code or binary
# form for use in connection with the web services and APIs provided by
# Facebook.
# As with any software that integrates with the Fa... | apache-2.0 | -5,564,575,198,717,724,000 | 31.854701 | 80 | 0.634755 | false | 4.23348 | false | false | false |
cisco-pxgrid/pxgrid-rest-ws | python/session_subscribe.py | 1 | 2400 | import asyncio
import json
import signal
import sys
import time
from asyncio.tasks import FIRST_COMPLETED
from config import Config
from pxgrid import PxgridControl
from websockets import ConnectionClosed
from ws_stomp import WebSocketStomp
async def future_read_message(ws, future):
try:
message = await ... | apache-2.0 | -6,965,972,693,243,685,000 | 32.802817 | 89 | 0.68 | false | 3.877221 | true | false | false |
clxcommunications/sdk-xms-python | clx/xms/client.py | 1 | 24270 | # -*- coding: utf-8 -*-
"""
XMS Client module
"""
from __future__ import absolute_import, division, print_function
try:
from urllib.parse import quote_plus, urlencode
except ImportError:
from urllib import quote_plus, urlencode
import logging
import requests
import clx.xms.__about__
from clx.xms import des... | apache-2.0 | 4,760,730,334,245,453,000 | 30.684073 | 78 | 0.596869 | false | 4.291777 | false | false | false |
GoogleCloudPlatform/PerfKitBenchmarker | perfkitbenchmarker/linux_packages/mofed.py | 1 | 2989 | # Copyright 2020 PerfKitBenchmarker 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 appli... | apache-2.0 | 3,336,229,875,305,581,600 | 39.391892 | 80 | 0.680161 | false | 3.231351 | false | false | false |
amosonn/distributed | distributed/bokeh/status/server_lifecycle.py | 1 | 4358 | #!/usr/bin/env python
from __future__ import print_function, division, absolute_import
from collections import deque
import json
import logging
import os
from time import time
from tornado import gen
from tornado.httpclient import AsyncHTTPClient, HTTPError
from tornado.iostream import StreamClosedError
from tornado.... | bsd-3-clause | -8,978,006,323,970,372,000 | 32.015152 | 80 | 0.578706 | false | 4.178332 | false | false | false |
eoss-cloud/madxxx_catalog_api | catalog/harvest/sns_harvester.py | 1 | 6040 | #-*- coding: utf-8 -*-
""" EOSS catalog system
extract metadata from SQS messages and generate Catalog_dataset objects
"""
__author__ = "Thilo Wehrmann, Steffen Gebhardt"
__copyright__ = "Copyright 2016, EOSS GmbH"
__credits__ = ["Thilo Wehrmann", "Steffen Gebhardt"]
__license__ = "GPL"
__version__ = "1.0.0"
__mainta... | mit | -2,319,427,802,855,230,500 | 37.227848 | 127 | 0.636589 | false | 3.271939 | false | false | false |
bmyerz/log2sqlite | grappa_parser.py | 1 | 1238 | import itertools
from parser import Parser
from log2sqlite import cli
from parameters import JSONParamsParser, PARAMS_TAG
__author__ = 'brandon'
class GrappaLogParser(Parser):
def __init__(self, includes_params=True):
self.includes_params = includes_params
def recorditer(self, inputstr):
jpa... | mit | 2,809,653,753,049,268,700 | 29.95 | 72 | 0.577544 | false | 4.225256 | false | false | false |
neilvallon/pyMap | app.py | 1 | 2337 | from bottle import *
import random, math
from datetime import datetime
from MapGenerator import *
from Tessellation import *
def buildHTMLMap(seed, width, height):
tstart = datetime.now()
m = MapGenerator(int(width), int(height), str(seed))
#m.makeRandom().smooth().smooth().smooth().removeIslands().findSpawns()
... | mit | 3,235,469,175,852,183,000 | 20.638889 | 78 | 0.621309 | false | 2.611173 | false | false | false |
bwesterb/dsmrp1 | src/dsmrp1.py | 1 | 5452 | import serial
import crcmod.predefined
import logging
# Reads DSMR4.0 P1 port
class InvalidTelegram(Exception):
pass
class BadChecksum(InvalidTelegram):
pass
_tst = lambda x: (2000+int(x[0:2]),
int(x[2:4]),
int(x[4:6]),
int(x[6:... | agpl-3.0 | -5,465,052,942,956,251,000 | 28.630435 | 80 | 0.486794 | false | 2.947027 | false | false | false |
pbryzek/Freedom | property_parser.py | 1 | 5479 | from api_engine import APIEngine
from objects.obj_address import AddressObj
import consts.paths as paths
import consts.switches as switches
import time
from common.globals import handle_err_msg
class PropertyParser(object):
address_index = -1
city_index = -1
state_index = -1
zip_index = -1
price_... | mit | 5,724,025,660,331,238,000 | 37.314685 | 133 | 0.544442 | false | 4.085757 | false | false | false |
GeoscienceAustralia/PyRate | pyrate/core/ref_phs_est.py | 1 | 9796 | # This Python module is part of the PyRate software package.
#
# Copyright 2020 Geoscience Australia
#
# 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/... | apache-2.0 | -6,824,001,355,696,937,000 | 36.389313 | 114 | 0.636586 | false | 3.329708 | true | false | false |
saullocastro/pyNastran | pyNastran/f06/parse_flutter.py | 1 | 33532 | """
SOL 145 plotter
"""
from __future__ import print_function
from itertools import count
from six import iteritems
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
from pyNastran.utils.atmosphere import get_alt_for_density
from pyNastran.utils.log import get_logger2
from pyNa... | lgpl-3.0 | -344,234,158,298,845,250 | 34.596603 | 122 | 0.493081 | false | 3.835736 | false | false | false |
sony/nnabla | python/src/nnabla/utils/converter/tensorflow/common.py | 1 | 4206 | # Copyright 2020,2021 Sony 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://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | apache-2.0 | 6,312,327,750,134,665,000 | 33.195122 | 95 | 0.613172 | false | 3.758713 | false | false | false |
j-bennet/wharfee | wharfee/toolbar.py | 1 | 1083 | # -*- coding: utf-8
from __future__ import unicode_literals
from __future__ import print_function
from pygments.token import Token
def create_toolbar_handler(is_long_option, is_fuzzy):
assert callable(is_long_option)
assert callable(is_fuzzy)
def get_toolbar_items(_):
"""
Return bottom ... | bsd-3-clause | -7,411,075,609,268,742,000 | 25.414634 | 75 | 0.538319 | false | 3.854093 | false | false | false |
jnurmine/jnnn | jnnn.py | 1 | 9330 | #!/bin/env python
# -*- coding: iso-8859-15 -*-
# (C) 2014 J. Nurminen <slinky@iki.fi>
#
# This is just for my own neural network investigations, I wanted to finally
# learn backpropagation and play around with a simple implementation where I know
# the location of each single thing.
#
# Basic backpropagation with mom... | mit | -1,430,765,938,196,916,000 | 30.734694 | 92 | 0.554877 | false | 3.702381 | false | false | false |
spanezz/staticsite | staticsite/features/taxonomy.py | 1 | 10893 | from __future__ import annotations
from typing import TYPE_CHECKING, List, Dict, Iterable, Optional
from staticsite import Page
from staticsite.feature import Feature
from staticsite.metadata import Metadata
from collections import defaultdict
import heapq
import functools
import os
import logging
if TYPE_CHECKING:
... | gpl-3.0 | 5,848,347,050,275,925,000 | 32.829193 | 101 | 0.586248 | false | 4.061521 | false | false | false |
viniciuschiele/simplebus | setup.py | 1 | 1215 | from setuptools import setup
setup(
name='simplebus',
version='1.0.1',
packages=[
'simplebus',
'simplebus.transports'],
url='https://github.com/viniciuschiele/simplebus',
license='Apache 2.0',
author='Vinicius Chiele',
author_email='vinicius.chiele@gmail.com',
descriptio... | apache-2.0 | -8,649,642,994,271,343,000 | 36.96875 | 71 | 0.593416 | false | 4.308511 | false | false | false |
qisanstudio/qsapp-suibe | src/suibe/models/article.py | 1 | 2838 | #! -*- coding: utf-8 -*-
from __future__ import unicode_literals
from flask import url_for
from jinja2 import Markup
from sqlalchemy import sql
from studio.core.engines import db
from sqlalchemy.ext.hybrid import hybrid_property
__all__ = [
'SlideModel',
'ArticleModel',
'ArticleContentModel',
]
class ... | mit | 4,711,364,207,169,635,000 | 33.204819 | 78 | 0.619803 | false | 3.909091 | false | false | false |
kdart/pycopia3 | core/pycopia/OS/Linux/sequencer.py | 1 | 4306 | #!/usr/bin/python3.4
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
# 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 | -9,032,168,051,230,042,000 | 28.902778 | 104 | 0.603809 | false | 3.670929 | false | false | false |
googleapis/googleapis-gen | google/apps/alertcenter/v1beta1/apps-alertcenter-v1beta1-py/google/apps/alertcenter_v1beta1/services/alert_center_service/client.py | 1 | 36376 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -7,505,960,856,111,694,000 | 40.859609 | 106 | 0.619529 | false | 4.688837 | false | false | false |
googleapis/googleapis-gen | google/ads/googleads/v6/googleads-py/google/ads/googleads/v6/resources/types/campaign_criterion_simulation.py | 1 | 3823 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -7,376,280,910,605,241,000 | 33.441441 | 150 | 0.665969 | false | 4.058386 | false | false | false |
HelloLily/hellolily | lily/users/registration/mixins.py | 1 | 3306 | from django.conf import settings
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.views.generic import FormView
from lily.users.models import UserInfo
class RegistrationMixin(FormView):
"""
Mixin that saves the current step in the session or redirects to the smart redi... | agpl-3.0 | -1,196,591,636,113,069,000 | 47.617647 | 112 | 0.64761 | false | 4.541209 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.