repo_name stringlengths 5 100 | path stringlengths 4 299 | copies stringclasses 990
values | size stringlengths 4 7 | content stringlengths 666 1.03M | license stringclasses 15
values | hash int64 -9,223,351,895,964,839,000 9,223,297,778B | line_mean float64 3.17 100 | line_max int64 7 1k | alpha_frac float64 0.25 0.98 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
chirilo/remo | remo/profiles/helpers.py | 3 | 2078 | import urlparse
from datetime import timedelta
from django.utils import timezone
from django.conf import settings
from funfactory.helpers import urlparams
from jingo import register
from libravatar import libravatar_url
from remo.profiles.models import FunctionalArea, UserAvatar
from remo.reports.utils import get_... | bsd-3-clause | 4,446,051,624,484,907,500 | 26.706667 | 77 | 0.671319 | false |
na-ka-na/object-query | src/example/common_test.py | 1 | 4538 | import sys
import subprocess
TEST_SQL_QUERIES = [
# 1
"SELECT financial.quarterly_profits,financial.quarterly_revenues,all_employees.id,\
all_employees.name,all_employees.active,all_employees.active_direct_reports,\
all_employees.enumx, all_employees.enumy,founded,board_of_directors\
... | apache-2.0 | -3,920,341,204,342,473,700 | 38.807018 | 116 | 0.641692 | false |
mdeemer/XlsxWriter | xlsxwriter/test/worksheet/test_write_row.py | 8 | 2661 | ###############################################################################
#
# Tests for XlsxWriter.
#
# Copyright (c), 2013-2015, John McNamara, jmcnamara@cpan.org
#
import unittest
from ...compatibility import StringIO
from ...worksheet import Worksheet
from ...format import Format
class TestWriteRow(unittest... | bsd-2-clause | 6,492,686,246,478,060,000 | 24.342857 | 79 | 0.527245 | false |
hdinsight/hue | apps/sqoop/src/sqoop/client/submission.py | 33 | 3758 | # Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file ex... | apache-2.0 | -7,805,499,011,752,448,000 | 32.265487 | 89 | 0.691325 | false |
rnicoll/dogecoin | contrib/devtools/circular-dependencies.py | 14 | 3135 | #!/usr/bin/env python3
# Copyright (c) 2018-2019 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import sys
import re
MAPPING = {
'core_read.cpp': 'core_io.cpp',
'core_write.cpp': 'core_io.cpp'... | mit | -2,165,279,856,597,644,000 | 33.450549 | 109 | 0.622967 | false |
lancezlin/ml_template_py | lib/python2.7/site-packages/pandas/io/tests/parser/skiprows.py | 7 | 7257 | # -*- coding: utf-8 -*-
"""
Tests that skipped rows are properly handled during
parsing for all of the parsers defined in parsers.py
"""
from datetime import datetime
import numpy as np
import pandas.util.testing as tm
from pandas import DataFrame
from pandas.compat import StringIO, range, lrange
class SkipRowsT... | mit | 2,992,246,385,916,498,000 | 35.285 | 79 | 0.492352 | false |
DemocracyClub/EveryElection | every_election/apps/election_snooper/snoopers/aldc.py | 1 | 1511 | from datetime import datetime
from .base import BaseSnooper
from election_snooper.models import SnoopedElection
class ALDCScraper(BaseSnooper):
snooper_name = "ALDC"
base_url = "https://www.aldc.org/"
def get_all(self):
url = "{}category/forthcoming-by-elections/".format(self.base_url)
p... | bsd-3-clause | -653,901,966,267,699,000 | 34.139535 | 84 | 0.513567 | false |
romain-dartigues/ansible-modules-core | files/ini_file.py | 5 | 9129 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Jan-Piet Mens <jpmens () gmail.com>
# (c) 2015, Ales Nosek <anosek.nosek () gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the ... | gpl-3.0 | -6,194,531,008,285,917,000 | 34.247104 | 135 | 0.569394 | false |
VitalPet/bank-statement-import | account_bank_statement_import_ofx/tests/test_import_bank_statement.py | 8 | 1451 | # -*- coding: utf-8 -*-
from openerp.tests.common import TransactionCase
from openerp.modules.module import get_module_resource
class TestOfxFile(TransactionCase):
"""Tests for import bank statement ofx file format
(account.bank.statement.import)
"""
def setUp(self):
super(TestOfxFile, self).... | agpl-3.0 | -5,732,413,137,133,032,000 | 40.457143 | 79 | 0.645072 | false |
pyrolysis/kinetic_schemes | agu-2019/agu_2019.py | 1 | 1956 | """
Cantera batch reactor example where kinetic scheme based on Agu 2019 paper for
biomass fast pyrolysis.
Reference
---------
Cornelius E. Agu, Christoph Pfeifer, Marianne Eikeland, Lars-Andre Tokheim,
and Britt M.E. Moldestad. Detailed One-Dimensional Model for Steam-Biomass
Gasification in a Bubbling Fluidized Bed.... | mit | -3,213,541,442,199,642,600 | 27.764706 | 78 | 0.566973 | false |
mganeva/mantid | scripts/LargeScaleStructures/ReflectometerCors.py | 1 | 3182 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source
# & Institut Laue - Langevin
# SPDX - License - Identifier: GPL - 3.0 +
#pylint: disable=invalid-name
from __future__... | gpl-3.0 | 4,819,791,908,584,293,000 | 42 | 136 | 0.631678 | false |
lrosengreen/cloudberry | old/timelapse.py | 1 | 3423 | #!/usr/bin/env python
from __future__ import division, print_function
# cloudberryCam v0 copyright (c) 2013-2015 Lars Rosengreen
# 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 ... | gpl-3.0 | 4,989,787,037,272,037,000 | 37.460674 | 129 | 0.618755 | false |
Mhynlo/SickRage | sickbeard/notifiers/pushalot.py | 7 | 4268 | # coding=utf-8
# Author: Maciej Olesinski (https://github.com/molesinski/)
# Based on prowl.py by Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of SickRage.
#
# SickRage is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public... | gpl-3.0 | 8,081,017,744,685,623,000 | 35.169492 | 106 | 0.633786 | false |
rjschwei/azure-sdk-for-python | examples/AzureResourceViewer/AzureResourceViewer/storage_extensions.py | 11 | 2755 | #-------------------------------------------------------------------------
# Copyright (c) Microsoft. 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.apa... | mit | -4,219,986,029,349,866,500 | 27.677083 | 83 | 0.567744 | false |
cbrunet/ouf | src/ouf/filemodel/proxymodel.py | 1 | 2098 |
import os.path
from PyQt5 import QtCore
from ouf.filemodel import SortRole
# TODO: show/hide backups files (end with ~)
# TODO: dir first
class FileProxyModel(QtCore.QSortFilterProxyModel):
def __init__(self, parent=None):
super().__init__(parent)
self._current_path = ""
self.setDyn... | gpl-3.0 | 1,528,479,035,053,375,000 | 23.97619 | 72 | 0.595806 | false |
jendap/tensorflow | tensorflow/python/data/experimental/kernel_tests/restructured_dataset_test.py | 3 | 3111 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 673,297,888,761,146,900 | 41.040541 | 80 | 0.650916 | false |
Mj258/weiboapi | srapyDemo/envs/Lib/site-packages/scrapy/utils/python.py | 19 | 9040 | """
This module contains essential stuff that should've come with Python itself ;)
It also contains functions (or functionality) which is in Python versions
higher than 2.5 which used to be the lowest version supported by Scrapy.
"""
import os
import re
import inspect
import weakref
import errno
import six
from funct... | mit | -597,779,735,852,445,600 | 31.753623 | 108 | 0.614712 | false |
vanyh/handkeinzungen-app | places/serializers.py | 1 | 1167 | import json
from rest_framework import serializers
from .models import Place, AlternativeName
class GeoJsonSerializer(serializers.BaseSerializer):
def to_representation(self, obj):
if obj.lng:
geojson = {
"type": "Feature",
"geometry": {
"ty... | mit | 3,882,192,932,309,661,700 | 24.369565 | 72 | 0.568123 | false |
Azulinho/ansible | lib/ansible/modules/cloud/amazon/ec2_ami.py | 26 | 27146 | #!/usr/bin/python
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['stableinterfa... | gpl-3.0 | 2,086,553,310,748,921,000 | 37.724679 | 159 | 0.639063 | false |
mathemage/h2o-3 | h2o-py/tests/testdir_munging/binop/pyunit_intdiv.py | 6 | 1252 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
import h2o
from h2o.exceptions import H2OTypeError, H2OValueError
from tests import pyunit_utils
def test_intdiv():
"""Test H2OFrame.__intdiv__()."""
iris = h2o.import_file(path=pyunit_utils.locate("smalldata/iris/iris_wheader.csv"))
iris = iris[:, 0:4]
... | apache-2.0 | 8,387,729,442,365,387,000 | 19.52459 | 87 | 0.548722 | false |
jonhadfield/ansible-modules-core | cloud/azure/azure_rm_virtualnetwork.py | 25 | 13788 | #!/usr/bin/python
#
# Copyright (c) 2016 Matt Davis, <mdavis@ansible.com>
# Chris Houseknecht, <house@redhat.com>
#
# This file is part of Ansible
#
# Ansible 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 Soft... | gpl-3.0 | -3,761,450,506,219,953,700 | 36.467391 | 148 | 0.566435 | false |
maddox/home-assistant | homeassistant/components/sensor/arduino.py | 10 | 2227 | """
homeassistant.components.sensor.arduino
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Support for getting information from Arduino pins. Only analog pins are
supported.
Configuration:
To use the arduino sensor you will need to add something like the following
to your configuration.yaml file.
sensor:
platform: arduin... | mit | -2,095,269,760,577,800,000 | 23.744444 | 77 | 0.62775 | false |
archesproject/arches | arches/app/models/migrations/5407_remove_tileserver_configs.py | 1 | 1529 | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('models', '5407_remove_tileserver'),
]
operations = [
migrations.RunSQL(
"""
update nodes
set config = config - 'cacheTiles'
where datatype =... | agpl-3.0 | 5,050,901,485,235,383,000 | 31.531915 | 86 | 0.564421 | false |
ryanlelek/SMORESGaitRecorder | proto/publish_pb2.py | 1 | 2603 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: publish.proto
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _reflection
from google.protobuf import descriptor_pb2
# @@protoc_insertion_point(imports)
... | gpl-3.0 | 7,932,751,850,522,120,000 | 32.371795 | 210 | 0.696888 | false |
satdav/mozillians | vendor-local/lib/python/djcelery/schedulers.py | 10 | 7860 | from __future__ import absolute_import
import logging
from warnings import warn
from anyjson import deserialize, serialize
from celery import schedules
from celery.beat import Scheduler, ScheduleEntry
from celery.utils.encoding import safe_str, safe_repr
from kombu.utils.finalize import Finalize
from django.db impo... | bsd-3-clause | -2,644,339,543,803,860,000 | 36.428571 | 78 | 0.554707 | false |
js850/PyGMIN | scripts/compute_cv.py | 1 | 3067 | """
a script to calculate Cv from the Harmonic Superposition Approximation
"""
import argparse
import numpy as np
from pygmin.thermodynamics import minima_to_cv
from pygmin.storage import Database
from pygmin.utils.optim_compatibility import read_min_data
import matplotlib as mpl
mpl.use("Agg") # so we can use it wit... | gpl-3.0 | 9,004,998,507,819,682,000 | 42.814286 | 138 | 0.621128 | false |
osuripple/pep.py | objects/streamList.py | 1 | 2168 | from objects import stream
from objects import glob
# TODO: use *args and **kwargs
class streamList:
def __init__(self):
self.streams = {}
def add(self, name):
"""
Create a new stream list if it doesn't already exist
:param name: stream name
:return:
"""
if name not in self.streams:
self.streams[n... | agpl-3.0 | -8,497,456,927,264,516,000 | 22.074468 | 73 | 0.693266 | false |
nephomaniac/eutester | testcases/cloud_admin/get_debug.py | 6 | 5886 | #!/usr/bin/python
from eucaops import Eucaops
from eutester.eutestcase import EutesterTestCase
class GatherDebug(EutesterTestCase):
basic_commands = ['df -B M',
'ps aux',
'free',
'uptime']
network_commands = ['iptables -L',
... | bsd-2-clause | 8,746,002,617,961,746,000 | 41.963504 | 114 | 0.54825 | false |
OpenInkpot-archive/iplinux-python-redis | redis/client.py | 5 | 51204 | import datetime
import errno
import socket
import threading
import time
import warnings
from itertools import chain
from redis.exceptions import ConnectionError, ResponseError, InvalidResponse
from redis.exceptions import RedisError, AuthenticationError
class ConnectionPool(threading.local):
"Manages a list of co... | mit | -3,229,847,986,337,731,600 | 35.470085 | 86 | 0.585716 | false |
SPlanzer/QGIS-AIMS-Plugin | AimsUI/AimsClient/Gui/Ui_QueueEditorWidget.py | 2 | 32692 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'AimsUI/AimsClient/Gui/Ui_QueueEditorWidget.ui'
#
# Created: Fri Sep 16 08:58:25 2016
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = Qt... | bsd-3-clause | 467,091,103,275,577,150 | 63.227898 | 102 | 0.726172 | false |
Qalthos/ansible | lib/ansible/modules/cloud/azure/azure_rm_resource_facts.py | 14 | 7926 | #!/usr/bin/python
#
# Copyright (c) 2018 Zim Kalinowski, <zikalino@microsoft.com>
#
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 | -113,347,264,151,722,940 | 32.584746 | 142 | 0.556901 | false |
huntxu/neutron | neutron/agent/metadata/driver.py | 1 | 12383 | # Copyright 2014 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
#
# Unless req... | apache-2.0 | -837,369,826,572,829,700 | 36.524242 | 79 | 0.579827 | false |
sbidoul/pip | src/pip/_internal/utils/packaging.py | 6 | 2900 | import logging
from email.message import Message
from email.parser import FeedParser
from typing import Optional, Tuple
from pip._vendor import pkg_resources
from pip._vendor.packaging import specifiers, version
from pip._vendor.pkg_resources import Distribution
from pip._internal.exceptions import NoneMetadataError
... | mit | 3,338,843,209,966,200,000 | 31.58427 | 82 | 0.682414 | false |
ydkhatri/mac_apt | plugins/helpers/ccl_bplist.py | 1 | 20731 | """
Copyright (c) 2012-2014, CCL Forensics
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 of conditions and t... | mit | 692,396,399,724,710,300 | 39.023166 | 141 | 0.623607 | false |
p1c2u/k2 | profiles/migrations/0001_initial.py | 2 | 6853 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'UserProfile'
db.create_table('profiles_userprofile', (
('id', self.gf('django.... | gpl-2.0 | 709,852,805,476,221,700 | 72.688172 | 208 | 0.573471 | false |
OpenSourcePolicyCenter/webapp-public | webapp/apps/register/forms.py | 2 | 1891 | from django import forms
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm, AuthenticationForm
from django.core.mail import send_mail
from .models import Subscriber
class SubscribeForm(forms.ModelForm):
class Meta:
model = Subscriber
fields = ('em... | mit | -1,846,669,447,826,067,700 | 29.5 | 78 | 0.60973 | false |
rajathkumarmp/BinPy | BinPy/examples/source/ic/Series_7400/IC7425.py | 5 | 1310 | # -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <headingcell level=2>
# Usage of IC 7425
# <codecell>
from __future__ import print_function
from BinPy import *
# <codecell>
# Usage of IC 7425:
ic = IC_7425()
print(ic.__doc__)
# <codecell>
# The Pin configuration is:
inp = {
1: 0,
2: 0,
3: 0,... | bsd-3-clause | 4,339,075,906,525,357,000 | 12.789474 | 71 | 0.622137 | false |
OBIGOGIT/etch | binding-python/runtime/src/main/python/etch/binding/support/Validator_RuntimeException.py | 2 | 1676 | """
# 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 | 2,989,908,079,206,309,400 | 36.244444 | 65 | 0.628878 | false |
aocks/ox_herd | ox_herd/ui/flask_web_ui/ox_herd/web_tasks.py | 1 | 10743 | """Classes to help automate web tasks.
"""
import re
import logging
import urllib.parse
import requests
from ox_herd.core.plugins import base
from ox_herd.core import ox_tasks
class SimpleTaskResult:
"""Class to hold task result.
Clairfying the expected return values for a task makes it easier to display
and ... | bsd-2-clause | -2,642,499,308,341,380,000 | 33.654839 | 79 | 0.542958 | false |
cdrage/kedge | vendor/k8s.io/kubernetes/examples/selenium/selenium-test.py | 7 | 1088 | #!/usr/bin/env python
# Copyright 2015 The Kubernetes 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 appli... | apache-2.0 | 6,258,468,533,772,548,000 | 33 | 78 | 0.758272 | false |
Goldmund-Wyldebeast-Wunderliebe/django-diazo | django_diazo/views/generic.py | 1 | 2786 | from django.http import HttpResponse
from django.views.generic import View, RedirectView
#from django.views.generic.base import ContextMixin # Django 1.5 only
from django_diazo.utils.dict2xml import dict2xml
class DiazoEnableThemeView(View):
def dispatch(self, request, *args, **kwargs):
if 'django_diazo_... | gpl-2.0 | -617,850,640,237,872,900 | 33.825 | 101 | 0.64178 | false |
kylewray/nova | tests/grid_world/grid_world.py | 1 | 5960 | """ The MIT License (MIT)
Copyright (c) 2016 Kyle Hollins Wray, University of Massachusetts
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 ... | mit | 7,687,294,150,454,753,000 | 52.693694 | 167 | 0.601846 | false |
BackupTheBerlios/kimchi | src/ui/util.py | 1 | 2258 | # coding: utf-8
'''
Copyright (c) 2010, Alexandru Dancu
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of condit... | bsd-3-clause | -5,801,539,120,365,157,000 | 38.631579 | 77 | 0.771036 | false |
daveinnyc/various | utilities/rename-random-number.py | 1 | 1044 | #! python3
''' rename files in local directory with random integer names.
windows screen saver isn't very good at randomizing fotos shown.
Change file names regularly to provide more variety
'''
import os
import re
import random
import time
random.seed()
new_names = set()
original_files = []
for entry in os.lis... | mit | -621,701,033,835,631,900 | 22.727273 | 65 | 0.6341 | false |
peterfpeterson/mantid | Framework/PythonInterface/plugins/algorithms/ExportGeometry.py | 3 | 5753 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
#pyl... | gpl-3.0 | -6,400,896,658,613,094,000 | 37.099338 | 96 | 0.56527 | false |
claudelee/git-cola | cola/settings.py | 9 | 4835 | # Copyright (c) 2008 David Aguilar
"""This handles saving complex settings such as bookmarks, etc.
"""
from __future__ import division, absolute_import, unicode_literals
import os
import sys
from cola import core
from cola import git
from cola import resources
import json
def mkdict(obj):
if type(obj) is dict:
... | gpl-2.0 | -7,268,508,707,475,079,000 | 26.011173 | 71 | 0.55636 | false |
aosprey/rose | lib/python/rose/config_editor/valuewidget/intspin.py | 1 | 4131 | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2012-8 Met Office.
#
# This file is part of Rose, a framework for meteorological suites.
#
# Rose is free software: you can redistribute it and/or modify
# it under the terms of the GNU ... | gpl-3.0 | -1,833,023,984,379,527,700 | 34.307692 | 79 | 0.542484 | false |
15Dkatz/pants | tests/python/pants_test/option/test_quiet_option_integration.py | 4 | 1718 | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import json
from pa... | apache-2.0 | 5,521,126,413,603,720,000 | 37.177778 | 93 | 0.704889 | false |
cryptobanana/ansible | test/runner/lib/config.py | 12 | 7856 | """Configuration classes."""
from __future__ import absolute_import, print_function
import os
import sys
from lib.util import (
CommonConfig,
is_shippable,
docker_qualify_image,
)
from lib.metadata import (
Metadata,
)
class EnvironmentConfig(CommonConfig):
"""Configuration common to all comma... | gpl-3.0 | -4,211,226,779,298,906,600 | 31.870293 | 124 | 0.602851 | false |
andmos/ansible | lib/ansible/playbook/attribute.py | 14 | 4395 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible 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) an... | gpl-3.0 | 5,660,113,194,690,378,000 | 36.564103 | 112 | 0.656655 | false |
jmcarp/marshmallow-sqlalchemy | marshmallow_sqlalchemy/convert.py | 1 | 9093 | # -*- coding: utf-8 -*-
import inspect
import marshmallow as ma
from marshmallow import validate, fields
from marshmallow.compat import text_type
from sqlalchemy.dialects import postgresql, mysql
from sqlalchemy.orm.util import identity_key
import sqlalchemy as sa
from .exceptions import ModelConversionError
def get... | mit | 2,606,464,342,441,194,000 | 36.419753 | 99 | 0.646431 | false |
WillisXChen/django-oscar | oscar/lib/python2.7/site-packages/django/template/backends/django.py | 44 | 3018 | # Since this package contains a "django" module, this is required on Python 2.
from __future__ import absolute_import
import warnings
from django.conf import settings
from django.template.context import Context, RequestContext, make_context
from django.template.engine import Engine, _dirs_undefined
from django.utils.... | bsd-3-clause | -5,517,403,807,810,914,000 | 39.783784 | 78 | 0.656064 | false |
letsencrypt/letsencrypt | certbot-postfix/certbot_postfix/tests/util_test.py | 1 | 8459 | """Tests for certbot_postfix.util."""
import subprocess
import unittest
import mock
from certbot import errors
class PostfixUtilBaseTest(unittest.TestCase):
"""Tests for certbot_postfix.util.PostfixUtilBase."""
@classmethod
def _create_object(cls, *args, **kwargs):
from certbot_postfix.util im... | apache-2.0 | 6,808,568,070,437,608,000 | 40.263415 | 83 | 0.650313 | false |
vitchyr/rlkit | rlkit/samplers/data_collector/joint_path_collector.py | 1 | 1496 | from collections import OrderedDict
from typing import Dict
from rlkit.core.logging import add_prefix
from rlkit.samplers.data_collector import PathCollector
class JointPathCollector(PathCollector):
def __init__(self, path_collectors: Dict[str, PathCollector]):
self.path_collectors = path_collectors
... | mit | 7,327,262,835,724,147,000 | 31.521739 | 75 | 0.614305 | false |
lyudmildrx/lymph | lymph/core/messages.py | 9 | 3538 | from lymph.serializers import msgpack_serializer
from lymph.utils import make_id
class Message(object):
ACK = b'ACK'
REP = b'REP'
REQ = b'REQ'
NACK = b'NACK'
ERROR = b'ERROR'
def __init__(self, msg_type, subject, packed_body=None, headers=None, packed_headers=None, msg_id=None, source=None, l... | apache-2.0 | 3,347,379,366,710,842,400 | 29.239316 | 143 | 0.559073 | false |
itkovian/sqlalchemy | test/sql/test_quote.py | 28 | 30468 | from sqlalchemy import *
from sqlalchemy import sql, schema
from sqlalchemy.sql import compiler
from sqlalchemy.testing import fixtures, AssertsCompiledSQL, eq_
from sqlalchemy import testing
from sqlalchemy.sql.elements import quoted_name, _truncated_label, _anonymous_label
from sqlalchemy.testing.util import picklers... | mit | -6,763,621,555,474,009,000 | 35.886199 | 83 | 0.476401 | false |
leonsio/YAHM | share/tools/ubi_reader/ubifs_extract_files.py | 2 | 3501 | #!/usr/bin/env python
#############################################################
# ubi_reader
# (c) 2013 Jason Pruitt (jrspruitt@gmail.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, e... | cc0-1.0 | -603,511,571,833,712,600 | 32.663462 | 99 | 0.622394 | false |
cmdunkers/DeeperMind | PythonEnv/lib/python2.7/site-packages/scipy/sparse/linalg/interface.py | 26 | 20931 | """Abstract linear algebra library.
This module defines a class hierarchy that implements a kind of "lazy"
matrix representation, called the ``LinearOperator``. It can be used to do
linear algebra with extremely large sparse or structured matrices, without
representing those explicitly in memory. Such matrices can be ... | bsd-3-clause | -4,016,377,749,391,690,000 | 29.690616 | 80 | 0.576083 | false |
chirilo/kuma | vendor/packages/translate/tools/test_pretranslate.py | 25 | 14223 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import warnings
from pytest import mark
from translate.convert import test_convert
from translate.misc import wStringIO
from translate.storage import po, xliff
from translate.tools import pretranslate
class TestPretranslate:
xliff_skeleton = '''<?xml version="1.0" ... | mpl-2.0 | 6,862,671,191,136,994,000 | 44.149206 | 161 | 0.632471 | false |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_04_01/operations/_network_profiles_operations.py | 1 | 24143 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit | 6,266,978,053,235,399,000 | 47.47992 | 190 | 0.638446 | false |
Moguri/bgui | bgui/label.py | 6 | 3457 | from .gl_utils import *
from .widget import Widget, BGUI_DEFAULT, BGUI_NO_NORMALIZE
class Label(Widget):
"""Widget for displaying text"""
theme_section = 'Label'
theme_options = {
'Font': '',
'Color': (1, 1, 1, 1),
'OutlineColor': (0, 0, 0, 1),
'OutlineSize': 0,
'OutlineSmoothing': False,
'... | mit | -1,271,201,399,395,384,000 | 27.105691 | 118 | 0.666185 | false |
tensorflow/tensorflow | tensorflow/compiler/tests/conv2d_test.py | 9 | 31148 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -2,187,161,919,965,512,700 | 34.355278 | 80 | 0.588738 | false |
Fat-Zer/FreeCAD_sf_master | src/Mod/Draft/draftfunctions/upgrade.py | 12 | 22633 | # ***************************************************************************
# * Copyright (c) 2009, 2010 Yorik van Havre <yorik@uncreated.net> *
# * Copyright (c) 2009, 2010 Ken Cline <cline@frii.com> *
# * Copyright (c) 2020 Eliud Cabrera Castillo <e.cabrera-castillo@tum.de> *
# * ... | lgpl-2.1 | -5,231,678,830,968,058,000 | 39.633752 | 104 | 0.525207 | false |
h3biomed/ansible | lib/ansible/playbook/role/metadata.py | 18 | 4366 | # (c) 2014 Michael DeHaan, <michael@ansible.com>
#
# This file is part of Ansible
#
# Ansible 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 ve... | gpl-3.0 | -6,526,209,749,022,717,000 | 37.637168 | 146 | 0.650481 | false |
angryrancor/kivy | kivy/core/text/__init__.py | 6 | 27224 | '''
Text
====
An abstraction of text creation. Depending of the selected backend, the
accuracy of text rendering may vary.
.. versionchanged:: 1.5.0
:attr:`LabelBase.line_height` added.
.. versionchanged:: 1.0.7
The :class:`LabelBase` does not generate any texture if the text has a
width <= 1.
This is t... | mit | 6,648,953,332,499,671,000 | 35.444444 | 79 | 0.523545 | false |
SmileyChris/easy-thumbnails | setup.py | 1 | 2432 | #!/usr/bin/env python
import codecs
import os
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
import easy_thumbnails
class DjangoTests(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self... | bsd-3-clause | -3,170,840,693,045,934,000 | 30.179487 | 79 | 0.60773 | false |
HuimingCheng/AutoGrading | learning/web_Haotian/venv/Lib/site-packages/jinja2/nodes.py | 89 | 30853 | # -*- coding: utf-8 -*-
"""
jinja2.nodes
~~~~~~~~~~~~
This module implements additional nodes derived from the ast base node.
It also provides some node tree helper functions like `in_lineno` and
`get_nodes` used by the parser and translator in order to normalize
python and jinja nodes.
:... | mit | 2,318,251,839,521,424,000 | 29.883884 | 81 | 0.59683 | false |
sshnaidm/ru | plugin.video.turbofilm.tv/default.py | 2 | 19750 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# *
# *
# * This Program is free software; you can redistribute it and/or modify
# * it under the terms of the GNU General Public License as published by
# * the Free Software Foundation; either version 2, or (at your option)
# * any later version.
# *
# * This Program is ... | gpl-2.0 | 7,923,008,056,527,638,000 | 31.097561 | 145 | 0.600284 | false |
open-synergy/opnsynid-hr | hr_employee_training_allowance_job_family_modelling/models/hr_job_grade.py | 1 | 1584 | # -*- coding: utf-8 -*-
# © 2016 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, fields, api
class HrJobGrade(models.Model):
_inherit = "hr.job_grade"
training_allowance_pricelist_ids = fields.One2many(
string="Training Allowance... | agpl-3.0 | 4,471,841,648,557,866,500 | 30.66 | 77 | 0.637397 | false |
Batterfii/zulip | zerver/test_hooks.py | 13 | 42649 | # -*- coding: utf-8 -*-
from zerver.lib.test_helpers import AuthedTestCase
from zerver.lib.test_runner import slow
from zerver.models import Message
import ujson
class JiraHookTests(AuthedTestCase):
def send_jira_message(self, action):
email = "hamlet@zulip.com"
api_key = self.get_api_key(email)
... | apache-2.0 | -7,605,699,080,188,207,000 | 50.003589 | 587 | 0.638688 | false |
stepos01/ns3-lr-wpan-mlme | src/dsr/bindings/modulegen__gcc_ILP32.py | 2 | 752869 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... | gpl-2.0 | -228,024,999,261,269,300 | 63.701702 | 998 | 0.602285 | false |
swayf/pyLoad | module/plugins/hoster/YoupornCom.py | 2 | 1680 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
from module.plugins.Hoster import Hoster
class YoupornCom(Hoster):
__name__ = "YoupornCom"
__type__ = "hoster"
__pattern__ = r"http://(www\.)?youporn\.com/watch/.+"
__version__ = "0.2"
__description__ = """Youporn.com Video Download Hoster"""... | agpl-3.0 | 2,752,229,234,266,981,000 | 29 | 110 | 0.550595 | false |
18padx08/PPTex | PPTexEnv_x86_64/lib/python2.7/site-packages/sympy/core/tests/test_args.py | 7 | 109968 | """Test whether all elements of cls.args are instances of Basic. """
# NOTE: keep tests sorted by (module, class name) key. If a class can't
# be instantiated, add it here anyway with @SKIP("abstract class) (see
# e.g. Function).
import os
import re
import warnings
import io
from sympy import Basic, S, symbols, sqrt... | mit | -1,594,203,192,293,846,500 | 30.663691 | 135 | 0.719591 | false |
Bismarrck/tensorflow | tensorflow/contrib/factorization/python/kernel_tests/clustering_ops_test.py | 25 | 7475 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
# use this file except in compliance with the License. You may obtain a copy of
# the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | apache-2.0 | -4,176,005,034,119,026,700 | 35.463415 | 80 | 0.570569 | false |
robbiet480/python-social-auth | examples/flask_me_example/settings.py | 51 | 2283 | from flask_me_example import app
app.debug = True
SECRET_KEY = 'random-secret-key'
SESSION_COOKIE_NAME = 'psa_session'
DEBUG = False
MONGODB_SETTINGS = {'DB': 'psa_db'}
DEBUG_TB_INTERCEPT_REDIRECTS = False
SESSION_PROTECTION = 'strong'
SOCIAL_AUTH_LOGIN_URL = '/'
SOCIAL_AUTH_LOGIN_REDIRECT_URL = '/done/'
SOCIAL_A... | bsd-3-clause | 6,287,968,014,095,256,000 | 36.42623 | 60 | 0.7477 | false |
futurecolors/suds | tests/jasper.py | 65 | 1659 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) 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 in the hope that it will ... | lgpl-3.0 | -2,370,564,939,218,539,500 | 29.722222 | 81 | 0.691983 | false |
vaas-krish/openthread | tools/harness-automation/cases/router_9_2_10.py | 16 | 1877 | #!/usr/bin/env python
#
# Copyright (c) 2016, The OpenThread Authors.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright
# notic... | bsd-3-clause | -1,919,293,728,224,491,000 | 42.651163 | 77 | 0.76292 | false |
ActiveState/code | recipes/Python/578272_Topological_Sort/recipe-578272.py | 1 | 1311 | def toposort2(data):
"""Dependencies are expressed as a dictionary whose keys are items
and whose values are a set of dependent items. Output is a list of
sets in topological order. The first set consists of items with no
dependences, each subsequent set consists of items that depend upon
items in the preceeding se... | mit | -4,232,482,206,019,321,000 | 33.5 | 118 | 0.613272 | false |
hubert667/AIR | build/kombu/build/lib.linux-i686-2.7/kombu/utils/limits.py | 7 | 1848 | """
kombu.utils.limits
==================
Token bucket implementation for rate limiting.
"""
from __future__ import absolute_import
from kombu.five import monotonic
__all__ = ['TokenBucket']
class TokenBucket(object):
"""Token Bucket Algorithm.
See http://en.wikipedia.org/wiki/Token_Bucket
Most of th... | gpl-3.0 | 4,406,822,282,728,687,600 | 26.176471 | 75 | 0.610931 | false |
hamishmb/ddrescue-gui | Tools/DDRescueTools/allversions.py | 1 | 1543 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# DDRescue Tools for all versions in the Tools Package for DDRescue-GUI Version 2.0.0
# This file is part of DDRescue-GUI.
# Copyright (C) 2013-2018 Hamish McIntyre-Bhatty
# DDRescue-GUI is free software: you can redistribute it and/or modify it
# under the terms of the GNU... | gpl-3.0 | -1,624,647,275,907,555,800 | 34.068182 | 85 | 0.736876 | false |
caorong/livestreamer | tests/plugins/testplugin.py | 25 | 1547 | from livestreamer.plugins import Plugin
from livestreamer.options import Options
from livestreamer.stream import *
from livestreamer.plugin.api.support_plugin import testplugin_support
class TestPlugin(Plugin):
options = Options({
"a_option": "default"
})
@classmethod
def can_handle_url(self,... | bsd-2-clause | -3,315,691,411,885,909,500 | 38.666667 | 83 | 0.64318 | false |
dvliman/jaikuengine | .google_appengine/lib/django-1.5/django/utils/encoding.py | 4 | 9165 | from __future__ import unicode_literals
import codecs
import datetime
from decimal import Decimal
import locale
try:
from urllib.parse import quote
except ImportError: # Python 2
from urllib import quote
import warnings
from django.utils.functional import Promise
from django.utils import six
class Django... | apache-2.0 | -1,548,998,234,296,606,500 | 36.561475 | 80 | 0.619313 | false |
TheTimmy/spack | var/spack/repos/builtin/packages/libszip/package.py | 3 | 2068 | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | -3,492,386,258,225,179,600 | 38.769231 | 95 | 0.658124 | false |
chickonice/AutonomousFlight | apm_ws/build/catkin_generated/generate_cached_setup.py | 1 | 1486 | # -*- coding: utf-8 -*-
from __future__ import print_function
import argparse
import os
import stat
import sys
# find the import for catkin's python package - either from source space or from an installed underlay
if os.path.exists(os.path.join('/opt/ros/indigo/share/catkin/cmake', 'catkinConfig.cmake.in')):
sys.p... | gpl-3.0 | 8,973,257,408,228,105,000 | 48.533333 | 217 | 0.734859 | false |
derrowap/DNC-TensorFlow | src/dnc/external_memory.py | 1 | 11075 | """External Memory used in a DNC for read and writes.
This External Memory is implemented as defined in the DNC architecture
in DeepMind's Nature paper:
http://www.nature.com/nature/journal/vaop/ncurrent/full/nature20101.html
Author: Austin Derrow-Pinion
"""
import collections
import tensorflow as tf
import sonnet a... | mit | 5,558,887,863,217,535,000 | 46.943723 | 79 | 0.614537 | false |
abpoms/google-api-cpp-client | prepare_dependencies.py | 1 | 42463 | #!/usr/bin/python
# Copyright 2013 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 a... | apache-2.0 | 4,336,298,736,616,382,500 | 34.297589 | 80 | 0.621129 | false |
coreyfarrell/testsuite | lib/python/asterisk/voicemail.py | 1 | 28506 | #!/usr/bin/env python
# vim: sw=3 et:
"""Module used for testing app_voicemail
Note that this module has been superceded by the pluggable
framework and the apptest module.
Copyright (C) 2011, Digium, Inc.
Matt Jordan <mjordan@digium.com>
This program is free software, distributed under the terms of
the GNU General P... | gpl-2.0 | -3,408,383,965,109,269,000 | 37.314516 | 88 | 0.53943 | false |
jianhuashao/WebDownloadJobsManage | post-process/post_appid_to_asin.py | 1 | 1495 | from bs4 import BeautifulSoup, Comment
import post_process_base as my_process
import sqlite3
import myutil
#######
job_target = 'appid_to_asin'
sql_init = '''
CREATE TABLE IF NOT EXISTS post_appid_to_asin (
app_id TEXT NOT NULL UNIQUE,
asin TEXT NOT NULL UNIQUE,
asin_url TEXT,
UNIQUE (app_id, asin)
);
'''
sql_ins... | apache-2.0 | -175,063,746,277,168,670 | 24.793103 | 161 | 0.630769 | false |
GehirnInc/python-oidc | oidc/userinfo.py | 1 | 1539 | # -*- coding: utf-8 -*-
from py3oauth2.message import (
Message,
Parameter,
)
class UserInfo(Message):
__scopes__ = {
'openid': {'sub'},
'profile': {'name', 'given_name', 'family_name', 'middle_name',
'nickname', 'preferred_username', 'profile', 'picture',
... | mit | 8,365,824,870,575,421,000 | 25.084746 | 75 | 0.573099 | false |
riccardoklinger/qgis2web | qgis2web/qgis2webProvider.py | 2 | 3211 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
Process2Web
A QGIS plugin
Processing plugin for qgis2web
-------------------
begin : 2017-04-03
copyright :... | gpl-2.0 | -8,803,471,639,096,117,000 | 34.285714 | 77 | 0.519776 | false |
kvarq/kvarq | analyse/convert.py | 1 | 1485 |
import argparse
import json
import sys
import time
parser = argparse.ArgumentParser(description='converts .json from one version to another')
parser.add_argument('-v', '--verbose', action='store_true',
help='print some information to stderr')
parser.add_argument('json',type=file,
help='name of .json... | gpl-3.0 | 8,435,191,959,356,598,000 | 23.344262 | 92 | 0.558249 | false |
vjmac15/Lyilis | lib/youtube_dl/extractor/vier (VJ Washington's conflicted copy 2017-08-29).py | 46 | 10008 | # coding: utf-8
from __future__ import unicode_literals
import re
import itertools
from .common import InfoExtractor
from ..utils import (
urlencode_postdata,
int_or_none,
unified_strdate,
)
class VierIE(InfoExtractor):
IE_NAME = 'vier'
IE_DESC = 'vier.be and vijf.be'
_VALID_URL = r'''(?x)
... | gpl-3.0 | -1,312,040,345,676,478,700 | 36.909091 | 145 | 0.495803 | false |
probablytom/behaviour-modelling | software_engineering_atoms.py | 1 | 6208 | import random, environment, dag, time
from logger import Logger
from decorators import atom # Will need renaming
# For keeping a log / printing to the console
# filepath-----\/ Logging--\/ printing--\/
log = Logger( "event.log", False, False)
# -----------------------------------------... | artistic-2.0 | 1,352,275,259,262,162,400 | 28.561905 | 104 | 0.615818 | false |
PacktPublishing/OpenCV-Computer-Vision-Projects-with-Python | Module 3/07_code/chapter7.py | 1 | 11356 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""OpenCV with Python Blueprints
Chapter 7: Learning to Recognize Emotion in Faces
An app that combines both face detection and face recognition, with a
focus on recognizing emotional expressions in the detected faces.
The process flow is as follows:
... | mit | -2,689,338,171,623,602,000 | 38.430556 | 78 | 0.57714 | false |
js0701/chromium-crosswalk | third_party/WebKit/Tools/Scripts/webkitpy/common/checkout/scm/scm_mock.py | 11 | 4081 | # Copyright (C) 2011 Google Inc. 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 of conditions and the f... | bsd-3-clause | 2,878,566,153,286,109,000 | 35.4375 | 121 | 0.694683 | false |
MridulS/BinPy | BinPy/examples/source/ic/Series_4000/IC4072.py | 5 | 1255 | # -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <headingcell level=2>
# Usage of IC 4072
# <codecell>
from __future__ import print_function
from BinPy import *
# <codecell>
# Usage of IC 4072:
ic = IC_4072()
print(ic.__doc__)
# <codecell>
# The Pin configuration is:
inp = {2: 0, 3: 1, 4: 0, 5: 1, 7: 0, ... | bsd-3-clause | 6,033,693,259,011,766,000 | 14.120482 | 71 | 0.647012 | false |
ncollins/lis.py | test_eval.py | 1 | 2737 |
from lex import tokenize
from parse import parse_tokens
from evaluate import eval_in_env, Environment
def test_eval_add_const():
exp = ['+', 3, 4]
res = eval_in_env(exp, Environment([]))
assert res == 7
def test_eval_if():
exp = ['if', True, 3, 4]
assert eval_in_env(exp, Environment([])) == 3
... | bsd-3-clause | -8,867,205,229,933,264,000 | 27.810526 | 101 | 0.480453 | false |
moonrisewarrior/line-memebot | SDK/linebot/models/error.py | 4 | 1976 | # -*- coding: utf-8 -*-
# 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | apache-2.0 | 2,348,168,993,860,958,700 | 28.058824 | 78 | 0.62753 | false |
ghtdak/txtorcon | test/test_torcontrolprotocol.py | 1 | 34121 | from __future__ import with_statement
from os.path import exists
from twisted.python import log, failure
from twisted.trial import unittest
from twisted.test import proto_helpers
from twisted.internet import defer, error
from txtorcon import TorControlProtocol, TorProtocolFactory, TorState
from txtorcon import ITorC... | mit | 6,601,869,624,420,765,000 | 35.493048 | 245 | 0.634741 | false |
mlperf/training_results_v0.7 | Fujitsu/benchmarks/resnet/implementations/implementation_open/mxnet/3rdparty/tvm/tutorials/language/reduction.py | 2 | 7668 | # 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 u... | apache-2.0 | 2,992,811,413,625,208,000 | 38.323077 | 87 | 0.604851 | false |
Subsets and Splits
Gradio Code Samples
Limits the results to entries containing the word 'gradio' in the repo_name, content, or path, providing a filtered subset of the dataset.