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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
flacjacket/sympy | sympy/core/tests/test_expr.py | 1 | 48018 | from __future__ import division
from sympy import (Add, Basic, S, Symbol, Wild, Float, Integer, Rational, I,
sin, cos, tan, exp, log, nan, oo, sqrt, symbols, Integral, sympify,
WildFunction, Poly, Function, Derivative, Number, pi, NumberSymbol, zoo,
Piecewise, Mul, Pow, nsimplify, ratsimp, trigsimp, rads... | bsd-3-clause | 625,356,421,304,624,600 | 33.645022 | 114 | 0.54313 | false | 2.594586 | true | false | false |
praekelt/vumi-go | go/apps/tests/view_helpers.py | 1 | 2691 | from django.core.urlresolvers import reverse
from zope.interface import implements
from vumi.tests.helpers import generate_proxies, IHelper
from go.base import utils as base_utils
from go.base.tests.helpers import DjangoVumiApiHelper
from go.vumitools.tests.helpers import GoMessageHelper
from .helpers import Applica... | bsd-3-clause | -5,930,899,879,608,765,000 | 33.5 | 70 | 0.687105 | false | 3.666213 | false | false | false |
palominodb/tableizer | tableizer/ttt_gui/rrd.py | 1 | 5968 | # rrd.py
# Copyright (C) 2009-2013 PalominoDB, Inc.
#
# You may contact the maintainers at eng@palominodb.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... | gpl-2.0 | -9,085,685,221,464,438,000 | 42.562044 | 127 | 0.525637 | false | 3.435809 | false | false | false |
florian-wagner/gimli | python/pygimli/gui/vtk/wxVTKRenderWindowInteractor.py | 1 | 24830 | # -*- coding: utf-8 -*-
"""
A VTK RenderWindowInteractor widget for wxPython.
Find wxPython info at http://wxPython.org
Created by Prabhu Ramachandran, April 2002
Based on wxVTKRenderWindow.py
Fixes and updates by Charl P. Botha 2003-2008
Updated to new wx namespace and some cleaning up by Andrea Gavana,
December 2... | gpl-3.0 | -454,796,966,052,879,700 | 34.573066 | 102 | 0.57499 | false | 4.141094 | false | false | false |
spencerlyon2/pygments | pygments/lexers/_clbuiltins.py | 2 | 14050 | # -*- coding: utf-8 -*-
"""
pygments.lexers._clbuiltins
~~~~~~~~~~~~~~~~~~~~~~~~~~~
ANSI Common Lisp builtins.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
BUILTIN_FUNCTIONS = set(( # 638 functions
'<', '<=', '=', '>', '>=', '-... | bsd-2-clause | 8,959,820,288,131,650,000 | 59.560345 | 80 | 0.629751 | false | 2.994459 | false | false | false |
mmerce/python | bigml/tests/create_forecast_steps.py | 1 | 1792 | # -*- coding: utf-8 -*-
#
# Copyright 2017-2020 BigML
#
# 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 | 7,671,300,440,271,742,000 | 34.137255 | 75 | 0.704241 | false | 3.820896 | false | false | false |
terrycojones/dark-matter | dark/mutations.py | 1 | 16454 | import os
from collections import defaultdict
import numpy as np
try:
import matplotlib
if not os.environ.get('DISPLAY'):
# Use non-interactive Agg backend
matplotlib.use('Agg')
import matplotlib.pyplot as plt
except ImportError:
import platform
if platform.python_implementation() =... | mit | -974,948,910,823,843,200 | 35.64588 | 79 | 0.544427 | false | 3.942967 | false | false | false |
nati/fun | cube.py | 1 | 4119 | import copy
import math
import re
import subprocess
import sys
import time
ret = subprocess.check_output(["resize"])
m = re.match("COLUMNS=(\d+);\nLINES=(\d+);", ret)
WIDTH = int(m.group(1))
HEIGHT = int(m.group(2))
SCALE = 7
X = 0
Y = 1
Z = 2
POINTS = [
[-1, -1, 1],
[-1, 1, 1],
[1, 1, 1],
[1, -1, 1... | apache-2.0 | -4,906,687,155,164,076,000 | 20.793651 | 73 | 0.453265 | false | 2.525445 | false | false | false |
chemiron/aiopool | aiopool/fork.py | 1 | 6082 | import asyncio
import logging
import os
import signal
from struct import Struct
import time
from .base import (WorkerProcess, ChildProcess,
IDLE_CHECK, IDLE_TIME)
MSG_HEAD = 0x0
MSG_PING = 0x1
MSG_PONG = 0x2
MSG_CLOSE = 0x3
PACK_MSG = Struct('!BB').pack
UNPACK_MSG = Struct('!BB').unpack
logger =... | mit | 982,928,408,585,555,200 | 24.447699 | 77 | 0.57366 | false | 4.017173 | false | false | false |
hypebeast/etapi | etapi/utils.py | 1 | 1765 | # -*- coding: utf-8 -*-
'''Helper utilities and decorators.'''
import time
from flask import flash
def flash_errors(form, category="warning"):
'''Flash all errors for a form.'''
for field, errors in form.errors.items():
for error in errors:
flash("{0} - {1}"
.format(get... | bsd-3-clause | -7,001,446,943,259,879,000 | 24.955882 | 78 | 0.549575 | false | 3.374761 | false | false | false |
DBeath/flask-feedrsub | tests/period_test.py | 1 | 1488 | from datetime import datetime
from dateutil.relativedelta import relativedelta
from feedrsub.database import db
from feedrsub.models.period import PERIOD, Period
from feedrsub.models.populate_db import populate_periods
def test_populate_periods(session):
populate_periods()
daily = Period.query.filter_by(na... | mit | 7,589,990,972,609,637,000 | 27.615385 | 69 | 0.715054 | false | 3.43649 | false | false | false |
nigelb/Static-UPnP | examples/Chromecast/StaticUPnP_StaticServices.py | 1 | 3345 | # static_upnp responds to upnp search requests with statically configures responses.
# Copyright (C) 2016 NigelB
#
# 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 | 871,185,580,901,961,200 | 31.794118 | 161 | 0.676233 | false | 3.117428 | false | false | false |
ponty/MyElectronicProjects | pavement.py | 1 | 1718 | from easyprocess import Proc
from paver.easy import *
import paver.doctools
import paver.virtual
import paver.misctasks
from paved import *
from paved.dist import *
from paved.util import *
from paved.docs import *
from paved.pycheck import *
from paved.pkg import *
options(
sphinx=Bunch(
docroot='docs',
... | bsd-2-clause | 2,015,404,359,761,255,000 | 25.430769 | 65 | 0.360885 | false | 4.569149 | false | false | false |
GoogleCloudPlatform/python-docs-samples | appengine/standard/endpoints-frameworks-v2/quickstart/main_test.py | 1 | 1894 | # Copyright 2016 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 | -4,486,417,427,585,140,700 | 34.074074 | 74 | 0.712777 | false | 3.663443 | true | false | false |
OSU-CS-325/Project_Two_Coin_Change | run-files/analysisQ7.py | 1 | 2957 | import sys
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import random
import datetime
# Import the three change making algorithms
sys.path.insert(0, "../divide-conquer/")
sys.path.insert(0, "../dynamic-programming")
sys.path.insert(0, "../greedy")
from changeslow import changeslow
from chan... | mit | 992,061,664,401,384,600 | 26.37963 | 89 | 0.631721 | false | 2.882066 | false | false | false |
mikedh/trimesh | trimesh/creation.py | 1 | 40606 | """
creation.py
--------------
Create meshes from primitives, or with operations.
"""
from .base import Trimesh
from .constants import log, tol
from .geometry import faces_to_edges, align_vectors, plane_transform
from . import util
from . import grouping
from . import triangles
from . import transformations as tf
i... | mit | 7,771,530,752,950,177,000 | 30.973228 | 86 | 0.580727 | false | 3.824261 | false | false | false |
stormvirux/vturra-cli | vturra/asys.py | 1 | 1936 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
# from scipy import stats
# import statsmodels.api as sm
# from numpy.random import randn
import matplotlib as mpl
# import seaborn as sns
# sns.set_color_palette("deep", desat=.6)
mpl.rc("figure", fig... | mit | 5,560,022,484,515,166,000 | 29.730159 | 131 | 0.66064 | false | 2.564238 | false | false | false |
hall1467/wikidata_usage_tracking | wbc_usage/utilities/determine_wikis.py | 1 | 2123 | """
Prints all wikis to stdout.
Usage:
determine_wikis (-h|--help)
determine_wikis [--debug]
[--verbose]
Options:
-h, --help This help message is printed
--debug Print debug logging to stderr
--verbose Print dots ... | mit | 7,319,689,185,539,322,000 | 25.5375 | 121 | 0.563354 | false | 4.179134 | false | false | false |
nboley/grit | grit/simulator/reads_simulator.py | 1 | 21238 | """
Copyright (c) 2011-2015 Nathan Boley
This file is part of GRIT.
GRIT 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.
GRIT is distribut... | gpl-3.0 | -4,307,114,510,354,580,500 | 37.33574 | 88 | 0.584377 | false | 3.781695 | false | false | false |
Netflix-Skunkworks/iep-apps | atlas-slotting/src/scripts/lift-data.py | 1 | 4221 | #!/usr/bin/env python3
# Copyright 2014-2019 Netflix, 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 applicabl... | apache-2.0 | -9,102,378,163,587,709,000 | 34.175 | 106 | 0.637764 | false | 3.758682 | false | false | false |
nemonik/CoCreateLite | ccl-cookbook/files/default/cocreatelite/cocreate/views/playgrounds.py | 1 | 5229 | from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render, get_object_or_404
from django.core.urlresolvers import reverse
from ..models import VMPlayground
from ..forms import VMPlaygroundForm, VMPlaygroundDescriptionForm, VMPlaygroundUserAccessForm, VMPlaygroundGroupAccessForm
fr... | bsd-3-clause | 5,452,664,651,074,782,000 | 32.954545 | 199 | 0.643526 | false | 3.991603 | false | false | false |
roscopecoltran/scraper | .staging/meta-engines/xlinkBook/update/spider.py | 1 | 7851 | #!/usr/bin/env python
#author: wowdd1
#mail: developergf@gmail.com
#data: 2014.12.09
import requests
import json
from bs4 import BeautifulSoup;
import os,sys
import time
import re
from all_subject import subject_dict, need_update_subject_list
reload(sys)
sys.setdefaultencoding("utf-8")
sys.path.append(".... | mit | -5,365,539,054,781,821,000 | 34.524887 | 162 | 0.515858 | false | 3.560544 | false | false | false |
codeforamerica/westsac-urban-land-locator | farmsList/public/views.py | 1 | 5434 | # -*- coding: utf-8 -*-
'''Public section, including homepage and signup.'''
from flask import (Blueprint, request, render_template, flash, url_for,
redirect, session)
from flask_mail import Message
from flask.ext.login import login_user, login_required, logout_user
from farmsList.extensions import... | bsd-3-clause | -4,999,825,131,017,609,000 | 42.822581 | 169 | 0.573979 | false | 3.923466 | false | false | false |
basicthinker/Sexain-MemController | gem5-stable/src/mem/SimpleMemory.py | 1 | 3222 | # Copyright (c) 2012-2013 ARM Limited
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implementation of the functiona... | apache-2.0 | 5,142,405,133,285,989,000 | 50.967742 | 78 | 0.753569 | false | 4.245059 | false | false | false |
ubc/compair | alembic/versions/316f3b73962c_modified_criteria_tables.py | 1 | 2136 | """modified criteria tables
Revision ID: 316f3b73962c
Revises: 2fe3d8183c34
Create Date: 2014-09-10 15:42:55.963855
"""
# revision identifiers, used by Alembic.
revision = '316f3b73962c'
down_revision = '2fe3d8183c34'
import logging
from alembic import op
import sqlalchemy as sa
from sqlalchemy import UniqueConstra... | gpl-3.0 | -3,058,094,704,712,623,600 | 40.882353 | 113 | 0.684925 | false | 3.589916 | false | false | false |
BT-jmichaud/l10n-switzerland | l10n_ch_payment_slip/tests/test_payment_slip.py | 1 | 9506 | # -*- coding: utf-8 -*-
# © 2014-2016 Camptocamp SA
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import time
import re
import odoo.tests.common as test_common
from odoo.report import render_report
class TestPaymentSlip(test_common.TransactionCase):
_compile_get_ref = re.compile(r'[^0-9]')
... | agpl-3.0 | 7,121,606,143,357,714,000 | 35.417625 | 79 | 0.523935 | false | 3.664225 | true | false | false |
ncphillips/django_rpg | rpg_base/models/encounter.py | 1 | 1907 | from django.db import models
class EncounterManager(models.Manager):
def enemy_npcs(self):
pass
def friendly_npcs(self):
pass
def players(self):
return super(EncounterManager, self).get_queryset().filter(character__player_owned=True)
class Encounter(models.Model):
name = mo... | mit | -1,455,354,487,229,714,200 | 27.477612 | 96 | 0.598846 | false | 4.476526 | false | false | false |
SymbiFlow/edalize | edalize/trellis.py | 1 | 3499 | # Copyright edalize contributors
# Licensed under the 2-Clause BSD License, see LICENSE for details.
# SPDX-License-Identifier: BSD-2-Clause
import os.path
from edalize.edatool import Edatool
from edalize.yosys import Yosys
from importlib import import_module
class Trellis(Edatool):
argtypes = ['vlogdefine', 'v... | bsd-2-clause | 4,870,784,944,533,456,000 | 40.164706 | 168 | 0.497285 | false | 3.790899 | false | false | false |
dietrichc/streamline-ppc-reports | examples/dfp/v201405/creative_service/get_creatives_by_statement.py | 1 | 2307 | #!/usr/bin/python
#
# Copyright 2014 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 b... | apache-2.0 | 8,719,420,815,159,008,000 | 31.041667 | 77 | 0.691374 | false | 3.903553 | false | false | false |
sssundar/Drone | rotation/viz.py | 1 | 5332 | # Python script to visualize rotation about a non-body axis.
# Let the lab frame be the inertial frame S.
# Let the origin of the rigid body be O, in the inertial frame S'.
# Let r_ss' be the vector from S to S'.
# Let the body frame relative to O be S''.
# Consider a fixed point on the body, r_s' in S', and r_s'' in... | gpl-3.0 | 8,605,246,386,922,294,000 | 29.295455 | 126 | 0.597524 | false | 2.332458 | false | false | false |
mozilla/normandy | normandy/recipes/tests/test_checks.py | 1 | 4355 | from datetime import timedelta
from django.db.utils import ProgrammingError
import pytest
import requests.exceptions
from normandy.recipes import checks, signing
from normandy.recipes.tests import ActionFactory, RecipeFactory, SignatureFactory, UserFactory
@pytest.mark.django_db
class TestSignaturesUseGoodCertific... | mpl-2.0 | -1,509,006,960,226,237,200 | 44.842105 | 94 | 0.7031 | false | 3.662742 | true | false | false |
Dwii/Master-Thesis | implementation/Palabos/cavity_benchmark/plot_benchmark.py | 1 | 1854 | # Display a list of *.dat files in a bar chart.
# Based on an example from https://chrisalbon.com/python/matplotlib_grouped_bar_plot.html
import sys
import os
import matplotlib.pyplot as plt
import numpy as np
if len(sys.argv) > 3 and (len(sys.argv)-3) % 2 :
print("usage: python3 {0} <benchmark> <image path> (<da... | mit | -7,959,568,732,201,215,000 | 26.279412 | 156 | 0.641855 | false | 2.714495 | false | false | false |
AxelTLarsson/robot-localisation | robot_localisation/main.py | 1 | 6009 | """
This module contains the logic to run the simulation.
"""
import sys
import os
import argparse
import numpy as np
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from robot_localisation.grid import Grid, build_transition_matrix
from robot_localisation.robot import Robot, Sensor
from robot_localisatio... | mit | 1,122,709,431,503,210,400 | 33.337143 | 82 | 0.564487 | false | 3.786389 | false | false | false |
confpack/confpacker | libconfpacker/packagers/base/__init__.py | 1 | 4696 | from __future__ import absolute_import
from datetime import datetime
import logging
import os
import os.path
import subprocess
import yaml
from cpcommon import cd
from .task import Task
class Package(object):
def src_path(self, *path):
return os.path.join(self.src_directory, *path)
def __init__(self, nam... | apache-2.0 | -5,239,246,716,933,589,000 | 30.945578 | 120 | 0.672487 | false | 3.48368 | false | false | false |
chromium/chromium | third_party/android_deps/libs/com_google_errorprone_error_prone_annotation/3pp/fetch.py | 5 | 1396 | #!/usr/bin/env python
# Copyright 2021 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.
# This is generated, do not edit. Update BuildConfigGenerator.groovy and
# 3ppFetch.template instead.
from __future__ import print_fun... | bsd-3-clause | 6,280,813,716,697,671,000 | 23.928571 | 134 | 0.648997 | false | 3.21659 | false | false | false |
mclaughlin6464/pearce | bin/optimization/sloppy_joes_optimization_indiv_bins.py | 1 | 1573 | from pearce.emulator import OriginalRecipe, ExtraCrispy, SpicyBuffalo, LemonPepperWet
from pearce.mocks import cat_dict
import numpy as np
from os import path
from SloppyJoes import lazy_wrapper
training_file = '/scratch/users/swmclau2/xi_zheng07_cosmo_lowmsat/PearceRedMagicXiCosmoFixedNd.hdf5'
em_method = 'gp'
fixed_... | mit | 905,506,763,249,726,100 | 33.195652 | 100 | 0.664336 | false | 2.6 | false | false | false |
Alexanderkorn/Automatisation | oude scripts/Self/IFScraper.py | 1 | 2199 | __author__ = 'alexander'
import urllib2
import os
from lib import pyperclip
def PageScrape(pageurl):
hdr= {'Accept':'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'User-Agent':'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.110 Safari/537.3... | gpl-3.0 | -8,366,557,063,171,999,000 | 36.271186 | 135 | 0.554343 | false | 3.367534 | false | false | false |
jdumas/autobib | pdftitle.py | 1 | 14035 | #!/usr/bin/env python2.7
# https://gist.github.com/nevesnunes/84b2eb7a2cf63cdecd170c139327f0d6
"""
Extract title from PDF file.
Dependencies:
pip install --user unidecode pyPDF PDFMiner
Usage:
find . -name "*.pdf" | xargs -I{} pdftitle -d tmp --rename {}
Limitations:
- No processing of CID keyed fonts. ... | gpl-3.0 | 4,369,930,326,702,331,000 | 34.441919 | 231 | 0.591307 | false | 3.603338 | false | false | false |
yaybu/touchdown | touchdown/provisioner/fuselage.py | 1 | 4827 | # Copyright 2015 Isotoma Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | apache-2.0 | -1,469,942,013,499,236,900 | 30.966887 | 83 | 0.645743 | false | 3.982673 | false | false | false |
yukisakurai/hhana | mva/plotting/utils.py | 1 | 4190 | import ROOT
from itertools import izip
from matplotlib import cm
from rootpy.plotting.style.atlas.labels import ATLAS_label
from rootpy.memory.keepalive import keepalive
from .. import ATLAS_LABEL
def set_colors(hists, colors='jet'):
if isinstance(colors, basestring):
colors = cm.get_cmap(colors, len(hist... | gpl-3.0 | 7,927,911,205,312,527,000 | 30.742424 | 74 | 0.548449 | false | 3.512154 | false | false | false |
O-T-L/PyOptimization | parameters/optimizer/epsilon_moea.py | 1 | 4120 | """
Copyright (C) 2014, 申瑞珉 (Ruimin Shen)
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed i... | lgpl-3.0 | -8,347,849,438,186,841,000 | 29.932331 | 76 | 0.495139 | false | 3.643933 | false | false | false |
tulsawebdevs/django-multi-gtfs | multigtfs/models/trip.py | 1 | 4025 | #
# Copyright 2012-2014 John Whitlock
#
# 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 writ... | apache-2.0 | -85,679,634,461,076,020 | 36.268519 | 74 | 0.623354 | false | 3.790019 | false | false | false |
taotaocoule/stock | spider/data/bond.py | 1 | 1159 | # 国债指数:id=0000121;http://pdfm2.eastmoney.com/EM_UBG_PDTI_Fast/api/js?id=0000121&TYPE=k&js=(x)&rtntype=5&isCR=false&fsData1518154947301=fsData1518154947301
# 沪市企业: id=0000131;http://pdfm2.eastmoney.com/EM_UBG_PDTI_Fast/api/js?id=0000131&TYPE=k&js=(x)&rtntype=5&isCR=false&fsData1518156740923=fsData1518156740923
# 深圳企业:... | mit | -7,352,327,051,511,593,000 | 46.5 | 155 | 0.707981 | false | 2.020873 | false | false | false |
skatsuta/aerospike-training | book/exercise/Key-valueOperations/Python/Program.py | 1 | 8944 | #!/usr/bin/env python
#
# * Copyright 2012-2014 by Aerospike.
# *
# * Permission is hereby granted, free of charge, to any person obtaining a copy
# * of this software and associated documentation files (the "Software"), to
# * deal in the Software without restriction, including without limitation the
# * rights... | mit | -1,456,257,365,734,570,800 | 42.629268 | 172 | 0.55814 | false | 4.224846 | true | false | false |
xianian/qt-creator | share/qtcreator/debugger/gdbbridge.py | 1 | 64687 |
try:
import __builtin__
except:
import builtins
try:
import gdb
except:
pass
import os
import os.path
import sys
import struct
import types
def warn(message):
print("XXX: %s\n" % message.encode("latin1"))
from dumper import *
####################################################################... | lgpl-2.1 | 4,238,433,531,481,384,400 | 34.328782 | 105 | 0.519471 | false | 4.142885 | false | false | false |
ClearCorp/server-tools | external_file_location/models/task.py | 1 | 8567 | # coding: utf-8
# @ 2015 Valentin CHEMIERE @ Akretion
# © @author Mourad EL HADJ MIMOUNE <mourad.elhadj.mimoune@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, fields, api
import openerp
from openerp import tools
from base64 import b64encode
import os
imp... | agpl-3.0 | 3,746,848,047,542,242,000 | 39.40566 | 79 | 0.494747 | false | 4.573412 | false | false | false |
eldstal/cardcinogen | card.py | 1 | 2572 | #!/bin/env python3
import unittest
import os
import sys
import util
import log
from PIL import Image
from layout import SimpleLayout, ComplexLayout
class CardTemplate:
""" Parsed version of a JSON card template """
def __init__(self, json, rootdir="."):
self.front_name = util.get_default(json, "front-im... | mit | 445,096,269,937,110,460 | 26.073684 | 91 | 0.630638 | false | 3.475676 | true | false | false |
dpaiton/OpenPV | pv-core/python/pvtools/writepvpfile.py | 1 | 10534 | import numpy as np
import scipy.sparse as sp
import pdb
from readpvpheader import headerPattern, extendedHeaderPattern
def checkData(data):
#Check if dictionary
if not isinstance(data, dict):
raise ValueError("Input data structure must be a dictionary with the keys \"values\" and \"time\"")
#Check... | epl-1.0 | 6,473,318,771,748,574,000 | 43.447257 | 150 | 0.57566 | false | 3.675506 | false | false | false |
thinkAmi-sandbox/Bottle-sample | e.g._bbs_app/bbs.py | 1 | 1890 | import datetime
import pickle
from pathlib import Path
from bottle import Bottle, run, get, post, redirect, request, response, jinja2_template
class Message(object):
def __init__(self, title, handle, message):
self.title = title
self.handle = handle
self.message = message
self.crea... | unlicense | -4,043,259,285,766,576,000 | 27.8 | 87 | 0.653735 | false | 2.972461 | false | false | false |
capitalone/cloud-custodian | tools/c7n_azure/c7n_azure/provisioning/deployment_unit.py | 1 | 1645 | import logging
from abc import ABCMeta, abstractmethod
from c7n.utils import local_session
from c7n_azure.session import Session
class DeploymentUnit(metaclass=ABCMeta):
log = logging.getLogger('custodian.azure.deployment_unit.DeploymentUnit')
def __init__(self, client):
self.type = ""
... | apache-2.0 | -3,710,982,216,230,997,000 | 30.254902 | 89 | 0.579331 | false | 4.09204 | false | false | false |
iYgnohZ/crack-geetest | geetest/geetest.py | 1 | 4035 | # -*- coding: utf-8 -*-
import time
import uuid
import StringIO
from PIL import Image
from selenium.webdriver.common.action_chains import ActionChains
class BaseGeetestCrack(object):
"""验证码破解基础类"""
def __init__(self, driver):
self.driver = driver
self.driver.maximize_window()
def inpu... | mit | 1,481,177,789,686,042,400 | 25.435714 | 105 | 0.543367 | false | 2.816591 | false | false | false |
j5shi/Thruster | pylibs/idlelib/IdleHistory.py | 1 | 4239 | "Implement Idle Shell history mechanism with History class"
from idlelib.configHandler import idleConf
class History:
''' Implement Idle Shell history mechanism.
store - Store source statement (called from PyShell.resetoutput).
fetch - Fetch stored statement matching prefix already entered.
... | gpl-2.0 | 6,686,773,657,945,853,000 | 37.990566 | 80 | 0.548714 | false | 4.424843 | false | false | false |
Youwotma/splash | splash/kernel/kernel.py | 1 | 9476 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import os
import six
import sys
import lupa
from ipykernel.kernelapp import IPKernelApp
from ipykernel.eventloops import loop_qt5
from jupyter_client.kernelspec import install_kernel_spec
from twisted.internet import defer
import splash
from splash.lua im... | bsd-3-clause | 2,472,990,847,262,979,600 | 32.249123 | 109 | 0.577353 | false | 3.801043 | false | false | false |
smARTLab-liv/smartlabatwork-release | slaw_smach/src/slaw_smach/slaw_smach.py | 1 | 11996 | #!/usr/bin/env python
import rospy
from ArmStates import *
from MoveStates import *
from ObjectDetectState import *
from DecisionStates import *
from std_srvs.srv import Empty, EmptyResponse
from std_msgs.msg import Bool
## TODO after Eindhoven: Add failsafe if hole not detected
## add states if object too far or too... | mit | -3,893,603,533,906,580,000 | 68.744186 | 321 | 0.635128 | false | 3.580896 | false | false | false |
mtrdesign/pylogwatch | pylogwatch/logwlib.py | 1 | 5917 | # Python 2.5 compatibility
from __future__ import with_statement
# Python version
import sys
if sys.version_info < (2, 5):
raise "Required python 2.5 or greater"
import os, sqlite3, itertools, time
from datetime import datetime
PROJECT_DIR = os.path.abspath(os.path.dirname(__file__))
proj_path = lambda x: os.pat... | gpl-3.0 | -7,848,765,276,239,736,000 | 36.449367 | 132 | 0.564982 | false | 4.066667 | false | false | false |
googlemaps/google-maps-services-python | googlemaps/convert.py | 1 | 10197 | #
# Copyright 2014 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 ... | apache-2.0 | 7,628,449,255,522,140,000 | 25.417098 | 109 | 0.5939 | false | 3.619808 | false | false | false |
mo-ki/pypgpwords | pypgpwords.py | 1 | 13257 | #!/usr/bin/python3
"""Define a PGPWords object inherited from bytearray.
Adding initialization via hex-, or pgp-word-string,
adding .hex() method and
overriding __str__
Mainline code:
Convert pgp words to hex strings and vice versa.
Example:
$ pypgpwords.py DEAD 1337
tactics perceptive Aztec consensus
or
$ ... | mit | -7,093,815,584,150,289,000 | 19.746479 | 78 | 0.45063 | false | 3.529553 | false | false | false |
petezybrick/iote2e | iote2e-pyclient/src/iote2epyclient/test/testhatsensors.py | 1 | 3137 | # Copyright 2016, 2017 Peter Zybrick and others.
#
# 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 ag... | apache-2.0 | 3,881,030,705,390,971,000 | 27.008929 | 101 | 0.620019 | false | 3.115194 | false | false | false |
Goyatuzo/Challenges | HackerRank/Algorithms/Sorting/Insertion Sort Part 1/insertion_sort_p1.py | 1 | 1113 | def insertion_sort(lst):
"""Instead of just inserting the value where it should be at,
it shifts the entire array until the location is found. It prints
out all the intermediate steps, but the final step is actually just
returned, so the output must be manually printed.
:param lst: The list of value... | mit | 3,846,452,538,363,552,000 | 29.916667 | 71 | 0.562444 | false | 3.673267 | false | false | false |
ict-felix/stack | vt_manager_kvm/src/python/vt_manager_kvm/controller/dispatchers/ui/GUIdispatcher.py | 1 | 17272 | from django.core.urlresolvers import reverse
from django.forms.models import modelformset_factory
from django.shortcuts import get_object_or_404
from django.http import HttpResponseRedirect, HttpResponse
from django.views.generic import simple
from django.views.generic import list_detail, simple
from django.views.gener... | apache-2.0 | -5,939,845,024,590,403,000 | 29.898032 | 189 | 0.721688 | false | 3.373438 | false | false | false |
edx-solutions/discussion-edx-platform-extensions | social_engagement/engagement.py | 1 | 14753 | """
Business logic tier regarding social engagement scores
"""
import logging
import sys
from collections import defaultdict
from datetime import datetime
import pytz
from django.conf import settings
from django.db.models.signals import post_save, pre_save
from django.dispatch import receiver
from django.http import ... | agpl-3.0 | -3,449,035,946,806,721,000 | 35.790524 | 122 | 0.638582 | false | 4.156946 | false | false | false |
arkanister/minitickets | lib/utils/html/templatetags/icons.py | 1 | 2009 | # -*- coding: utf-8 -*-
from django import template
from django.template import TemplateSyntaxError, Node
from ..icons.base import Icon
from ..tags import token_kwargs, resolve_kwargs
register = template.Library()
class IconNode(Node):
def __init__(self, _icon, kwargs=None):
super(IconNode, self).__in... | apache-2.0 | 8,514,085,994,507,164,000 | 29.923077 | 110 | 0.610254 | false | 3.626354 | false | false | false |
isaacbernat/awis | setup.py | 1 | 1887 | from setuptools import setup, find_packages
# from codecs import open
# from os import path
# here = path.abspath(path.dirname(__file__))
# # Get the long description from the README file
# with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
# long_description = f.read()
setup(
# Application nam... | gpl-3.0 | -1,147,754,553,041,353,200 | 27.590909 | 77 | 0.608903 | false | 3.997881 | false | true | false |
google-research/google-research | kws_streaming/models/lstm.py | 1 | 3941 | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | apache-2.0 | 9,010,055,643,208,554,000 | 30.031496 | 78 | 0.678508 | false | 3.693533 | false | false | false |
fake-name/ReadableWebProxy | WebMirror/management/GravityTalesManage.py | 1 | 1202 |
import calendar
import datetime
import json
import os
import os.path
import shutil
import traceback
from concurrent.futures import ThreadPoolExecutor
import urllib.error
import urllib.parse
from sqlalchemy import and_
from sqlalchemy import or_
import sqlalchemy.exc
from sqlalchemy_continuum_vendored.utils import ve... | bsd-3-clause | 2,929,935,509,704,662,000 | 21.259259 | 82 | 0.75624 | false | 3.414773 | false | false | false |
McIntyre-Lab/papers | newman_t1d_cases_2017/scripts/bwa_sam_parse.py | 1 | 2304 | #!/usr/bin/env python
import argparse
## This script parses a sam file from BWA-MEM and outputs a log of alignment counts and percentages.
# Parse command line arguments
parser = argparse.ArgumentParser(description='Parse sam file to get alignment counts.')
parser.add_argument('-sam','--sam_file',dest='sam', action='... | lgpl-3.0 | -7,280,314,419,809,801,000 | 52.581395 | 338 | 0.680122 | false | 3.191136 | false | false | false |
sbg/sevenbridges-python | sevenbridges/meta/collection.py | 1 | 4097 | from sevenbridges.errors import PaginationError, SbgError
from sevenbridges.models.compound.volumes.volume_object import VolumeObject
from sevenbridges.models.compound.volumes.volume_prefix import VolumePrefix
from sevenbridges.models.link import Link, VolumeLink
class Collection(list):
"""
Wrapper for SevenB... | apache-2.0 | -4,023,204,058,258,332,700 | 30.037879 | 77 | 0.547962 | false | 4.46783 | false | false | false |
RNAcentral/rnacentral-webcode | rnacentral/portal/management/commands/update_example_locations.py | 1 | 4551 | """
Copyright [2009-2017] EMBL-European Bioinformatics Institute
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 | -2,314,792,031,606,948,400 | 27.622642 | 105 | 0.5735 | false | 3.416667 | false | false | false |
mikelum/pyspeckit | pyspeckit/spectrum/readers/read_class.py | 1 | 67070 | """
------------------------
GILDAS CLASS file reader
------------------------
Read a CLASS file into an :class:`pyspeckit.spectrum.ObsBlock`
"""
from __future__ import print_function
from astropy.extern.six.moves import xrange
from astropy.extern.six import iteritems
try:
import astropy.io.fits as pyfits
except I... | mit | -4,625,620,523,675,145,000 | 41.584127 | 220 | 0.516267 | false | 3.424385 | false | false | false |
xbuf/blender_io_xbuf | protocol.py | 1 | 4603 | # This file is part of blender_io_xbuf. blender_io_xbuf 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, version 2.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANT... | gpl-3.0 | -6,606,697,315,505,430,000 | 30.101351 | 120 | 0.669781 | false | 3.412157 | false | false | false |
ModulousSmash/Modulous | KerbalStuff/blueprints/mods.py | 1 | 19423 | from flask import Blueprint, render_template, request, g, Response, redirect, session, abort, send_file, make_response, url_for
from flask.ext.login import current_user
from sqlalchemy import desc
from KerbalStuff.objects import User, Mod, ModVersion, DownloadEvent, FollowEvent, ReferralEvent, Featured, Media, GameVers... | mit | -6,892,305,928,326,822,000 | 35.855787 | 155 | 0.615713 | false | 3.514839 | false | false | false |
ratschlab/RNA-geeq | SAFT/find_optimal_param_set.py | 1 | 11493 | """
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.
Written (W) 2095-2010 Andre Kahles
Copyright (C) 2009-2010 by... | mit | 5,016,354,970,529,404,000 | 37.69697 | 225 | 0.560515 | false | 3.484839 | false | false | false |
intel-ctrlsys/actsys | datastore/datastore/database_schema/schema_migration/versions/d43655797899_changing_table_name_from_group_to_.py | 1 | 2060 | """Changing table name from 'group' to 'device_group'
Revision ID: d43655797899
Revises: 38f3c80e9932
Create Date: 2017-08-24 15:17:10.671537
"""
import textwrap
from alembic import op
# revision identifiers, used by Alembic.
revision = 'd43655797899'
down_revision = '38f3c80e9932'
branch_labels = None
depends_on =... | apache-2.0 | -1,239,599,158,944,896,800 | 33.333333 | 123 | 0.571845 | false | 3.814815 | false | false | false |
jorik041/stackprinter | app/lib/deliciousapi.py | 2 | 50450 | """
Unofficial Python API for retrieving data from Delicious.com.
This module provides the following features plus some more:
* retrieving a URL's full public bookmarking history including
* users who bookmarked the URL including tags used for such bookmarks
and the creation time of the ... | bsd-3-clause | 3,970,781,760,770,663,400 | 39.263368 | 225 | 0.565451 | false | 4.53198 | false | false | false |
hugobranquinho/ines | ines/__init__.py | 1 | 1198 | # -*- coding: utf-8 -*-
import datetime
import errno
from os import getpid, linesep, uname
from os.path import join as os_join
import sys
from tempfile import gettempdir
from time import time as _now_time
APPLICATIONS = {}
CAMELCASE_UPPER_WORDS = {'CSV'}
MARKER = object()
API_CONFIGURATION_EXTENSIONS = {}
DEFAULT_R... | mit | 6,989,389,053,462,082,000 | 23.958333 | 75 | 0.69616 | false | 3.152632 | false | false | false |
Dwolla/arbalest | examples/s3_json_object_to_redshift.py | 1 | 2379 | #!/usr/bin/env python
import psycopg2
from arbalest.configuration import env
from arbalest.redshift import S3CopyPipeline
from arbalest.redshift.schema import JsonObject, Property
"""
**Example: Bulk copy JSON objects from S3 bucket to Redshift table**
Arbalest orchestrates data loading using pipelines. Each `Pipelin... | mit | 2,963,051,004,563,553,000 | 38.65 | 82 | 0.599412 | false | 4.12305 | false | false | false |
hlmnrmr/superdesk-core | superdesk/tests/steps.py | 1 | 91099 | # -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
import os
i... | agpl-3.0 | -117,397,680,062,153,810 | 38.317652 | 120 | 0.64768 | false | 3.620787 | true | false | false |
ESS-LLP/erpnext-healthcare | erpnext/hr/doctype/payroll_entry/payroll_entry.py | 1 | 20575 | # -*- coding: utf-8 -*-
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from dateutil.relativedelta import relativedelta
from frappe.utils import cint,... | gpl-3.0 | 4,264,990,217,364,493,000 | 35.675579 | 154 | 0.693026 | false | 2.978 | false | false | false |
alvin777/excelsior | sort/benchmark.py | 1 | 2909 | #!/usr/bin/python
import time
from simple_sorts import *
from shell_sort import *
from quick_sort import *
from external_merge_sort import *
from radix_sort import *
from merge_sort import *
from heap_sort import *
from intro_sort import *
from timsort import *
from list_generators import *
result = {}
def run_un... | gpl-2.0 | -2,014,888,064,060,402,700 | 34.487805 | 111 | 0.584393 | false | 3.691624 | false | false | false |
amitdhiman000/MyOffers | myadmin/views.py | 1 | 7396 | from myadmin.backenddb import (insert_default_areas, insert_custom_areas, insert_default_categories)
from offer.models import CategoryModel
from locus.models import (CountryModel ,StateModel, CityModel, AreaModel)
from mail.models import (PublicMessageModel)
from myadmin.preload_data import (gCountries, gCategories)
f... | apache-2.0 | -4,578,698,669,415,442,000 | 32.165919 | 111 | 0.636966 | false | 3.44 | false | false | false |
uqyge/combustionML | FPV_ANN_pureResNet/data_reader_2.py | 1 | 5981 | import numpy as np
import pandas as pd
from sklearn.preprocessing import MinMaxScaler, StandardScaler
class data_scaler(object):
def __init__(self):
self.norm = None
self.norm_1 = None
self.std = None
self.case = None
self.scale = 1
self.bias = 1e-20
# ... | mit | 5,411,136,813,735,696,000 | 33.578035 | 75 | 0.546397 | false | 3.381006 | false | false | false |
UITools/saleor | saleor/shipping/migrations/0013_auto_20180822_0721.py | 1 | 4293 | # Generated by Django 2.0.3 on 2018-08-22 12:20
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django_countries.fields
import django_measurement.models
import django_prices.models
import saleor.core.weight
class Migration(migrations.Migration):
... | bsd-3-clause | 1,969,370,652,778,655,500 | 39.885714 | 156 | 0.603075 | false | 4.444099 | false | false | false |
jakerockland/find-s | find-s.py | 1 | 3211 | # This program is an machine learning experiment with the FindS concept learning algorithm
# Based on an excercise from Machine Learning by Thomas Mitchell (1997)
# By: Jacob Rockland
#
# The attribute EnjoySport indicates whether or not Aldo enjoys his favorite
# water sport on this day
#
# For all possible days with ... | mit | 5,064,658,467,091,919,000 | 37.22619 | 90 | 0.629088 | false | 4.095663 | false | false | false |
souzabrizolara/py-home-shell | src/dao/appliancedao.py | 1 | 1109 | __author__ = 'alisonbento'
import basedao
from src.entities.hsappliance import HomeShellAppliance
import datetime
import configs
class ApplianceDAO(basedao.BaseDAO):
def __init__(self, connection):
basedao.BaseDAO.__init__(self, connection, 'hs_appliances', 'appliance_id')
def convert_row_to_object(... | apache-2.0 | 3,405,373,118,082,334,000 | 33.65625 | 114 | 0.66817 | false | 4.018116 | false | false | false |
Flutras/techstitution | app/mod_main/views.py | 1 | 15521 | from flask import Blueprint, render_template, request, redirect, url_for, Response, jsonify, flash
from flask_wtf import FlaskForm
from wtforms import StringField, IntegerField, DateTimeField, TextField, SubmitField, TextAreaField, RadioField
from wtforms import validators, ValidationError
from wtforms.validators impor... | cc0-1.0 | -1,095,109,134,127,927,400 | 42.844633 | 136 | 0.644611 | false | 3.768148 | false | false | false |
theDarkForce/websearch | webseach_book.py | 1 | 2428 | # -*- coding: UTF-8 -*-
# webseach
# create at 2015/10/30
# autor: qianqians
import sys
reload(sys)
sys.setdefaultencoding('utf8')
sys.path.append('../')
from webget import gethtml
import pymongo
from doclex import doclex
import time
collection_key = None
def seach(urllist):
def process_keyurl(keyurl):
... | bsd-2-clause | 5,170,723,839,560,860,000 | 21.700935 | 96 | 0.543657 | false | 3.68997 | false | false | false |
mmw125/MuDimA | server/database_reader.py | 1 | 7747 | """Functions for reading from the database."""
import constants
import database_utils
import models
def get_urls():
"""Get all of the urls in articles in the database."""
with database_utils.DatabaseConnection() as (connection, cursor):
cursor.execute("SELECT link FROM article;")
urls = set(i... | gpl-3.0 | 4,023,521,665,624,149,500 | 51.70068 | 120 | 0.61469 | false | 4.136145 | false | false | false |
andrew-rogers/DSP | GPS/file_reader.py | 1 | 1929 | #!/usr/bin/env python3
"""Global Position System (GPS) file reader for captured IQ signal
The Standard Positioning Service (SPS) spec can be found at
https://www.navcen.uscg.gov/pubs/gps/sigspec/gpssps1.pdf
"""
# Copyright (c) 2021 Andrew Rogers
#
# Permission is hereby granted, free of charge, to any person obt... | gpl-3.0 | -1,833,778,985,490,122,800 | 39.1875 | 115 | 0.733022 | false | 3.827381 | false | false | false |
renzon/pypratico | setup.py | 1 | 4933 | import codecs
import os
import sys
from distutils.util import convert_path
from fnmatch import fnmatchcase
from setuptools import setup, find_packages
def read(fname):
return codecs.open(os.path.join(os.path.dirname(__file__), fname)).read()
# Provided as an attribute, so you can append to these instead
# of r... | agpl-3.0 | 6,054,291,991,308,348,000 | 33.739437 | 77 | 0.550578 | false | 4.267301 | false | false | false |
gurneyalex/odoo | addons/auth_signup/models/res_partner.py | 4 | 7625 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import random
import werkzeug.urls
from collections import defaultdict
from datetime import datetime, timedelta
from odoo import api, exceptions, fields, models, _
class SignupError(Exception):
pass
def random_to... | agpl-3.0 | 5,222,862,158,435,340,000 | 42.323864 | 119 | 0.590557 | false | 4.205736 | false | false | false |
importre/kotlin-unwrap | utils/gen.py | 1 | 1264 | #! /usr/bin/env python3
import os
impl = '''
class Unwrap(private var valid: Boolean) {
infix fun <R> nah(f: () -> R) {
if (!valid) f()
}
}
'''
template = '''
inline fun <{0}, R> unwrap(
{1},
block: ({0}) -> R): Unwrap {{
val valid = null !in arrayOf{4}({2})
if (valid) block({... | apache-2.0 | 3,446,911,921,353,584,000 | 29.095238 | 78 | 0.508703 | false | 2.939535 | false | false | false |
josiah-wolf-oberholtzer/supriya | supriya/ugens/dynamics.py | 1 | 3847 | import collections
from supriya import CalculationRate
from supriya.synthdefs import PseudoUGen, UGen
from .delay import DelayN
class Amplitude(UGen):
"""
An amplitude follower.
::
>>> source = supriya.ugens.In.ar(0)
>>> amplitude = supriya.ugens.Amplitude.kr(
... attack_ti... | mit | 7,030,170,808,679,921,000 | 24.476821 | 92 | 0.494671 | false | 3.778978 | false | false | false |
CDE-UNIBE/qcat | apps/search/search.py | 1 | 8779 | from functools import lru_cache
from django.conf import settings
from elasticsearch import TransportError
from questionnaire.models import Questionnaire
from .index import get_elasticsearch
from .utils import get_alias, ElasticsearchAlias
es = get_elasticsearch()
def get_es_query(
filter_params: list=None,... | apache-2.0 | 638,632,226,290,109,800 | 30.579137 | 96 | 0.552569 | false | 4.331031 | true | false | false |
Lindy21/CSE498-LRS | oauth_provider/views.py | 1 | 8387 | from oauth.oauth import OAuthError
from django.conf import settings
from django.http import (
HttpResponse, HttpResponseBadRequest, HttpResponseRedirect, HttpResponseForbidden)
from django.utils.translation import ugettext as _
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers... | apache-2.0 | 868,409,682,363,586,200 | 41.573604 | 120 | 0.595088 | false | 4.585566 | false | false | false |
joshuaunderwood7/HaskeLinGeom | pysrc/LG/Board.py | 1 | 2993 | def indexToLocation(x):
return ( (8-(x%8)) , (int(x/8)+1) )
class Location:
def __init__(self, x=1, y=1, z=1):
self.x = x
self.y = y
self.z = z
def parseStr(self, inStr):
inStr = inStr[1:-1]
inStr = inStr.split(',')
self.x = int(inStr[0])
self.y = in... | gpl-3.0 | -2,676,868,010,432,471,000 | 26.712963 | 117 | 0.539926 | false | 3.289011 | false | false | false |
i19870503/i19870503 | Python/eggnog2go_anno.py | 1 | 2591 | import os
import re
import pandas as pd
import string
import itertools
import numpy as np
import sys
import argparse
from collections import OrderedDict
if __name__ == '__main__':
parser = argparse.ArgumentParser(description='Create GO annotation and enrichment file')
parser.add_argument('-i',type=str,dest='i... | gpl-2.0 | -6,269,192,895,930,068,000 | 37.102941 | 157 | 0.580085 | false | 2.914511 | false | false | false |
rcwoolley/device-cloud-python | device_cloud/osal.py | 1 | 3073 | '''
Copyright (c) 2016-2017 Wind River Systems, 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 a... | apache-2.0 | 6,464,276,360,981,115,000 | 25.491379 | 84 | 0.633257 | false | 3.909669 | false | false | false |
dnarvaez/virtualenv-bootstrap | bootstrap.py | 1 | 4429 | #!/usr/bin/env python3
# Copyright 2013 Daniel Narvaez
#
# 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 la... | apache-2.0 | 4,880,690,577,747,265,000 | 24.601156 | 76 | 0.621585 | false | 3.592052 | false | false | false |
CCI-Tools/cate-core | cate/ops/index.py | 1 | 8641 |
# The MIT License (MIT)
# Copyright (c) 2016, 2017 by the ESA CCI Toolbox development team and contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including w... | mit | 3,199,853,828,415,307,300 | 43.312821 | 110 | 0.671566 | false | 3.967401 | false | false | false |
los-cocos/etc_code | cocos#248--RectMapCollider, player sometimes stuck/start.py | 1 | 6979 | """
A script to demo a defect in RectMapCollider, initial report by Netanel at
https://groups.google.com/forum/#!topic/cocos-discuss/a494vcH-u3I
The defect is that the player gets stuck at some positions, and it was confirmed
for cocos master Aug 1, 2015 (292ae676) and cocos-0.6.3-release, see cocos #248
The package ... | mit | 2,921,396,511,402,230,300 | 29.609649 | 91 | 0.640923 | false | 3.638686 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.