repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
juxor/dhcpcanon_debian | dhcpcanon/dhcpcap.py | 3 | 12940 | # -*- coding: utf-8 -*-
# vim:ts=4:sw=4:expandtab 2
# Copyright 2016, 2017 juga (juga at riseup dot net), MIT license.
"""Client class for the DHCP client implementation of the Anonymity Profile
([:rfc:`7844`])."""
from __future__ import absolute_import
# from __future__ import unicode_literals
import logging
import ... | mit | -3,516,423,384,256,936,400 | 32.264781 | 79 | 0.55711 | false | 3.911729 | false | false | false |
MikeDT/CNN_2_BBN | ML_Comparison.py | 1 | 21528 | # -*- coding: utf-8 -*-
"""
Created on Thu Sep 14 10:10:41 2017
@author: Mike
"""
#General
import numpy as np
import pandas as pd
import random
from itertools import islice, chain
from random import randint
from time import strftime
import time
import pickle
from os import makedirs,path
import warnings
#PGMs
import ... | apache-2.0 | -3,806,419,230,233,058,300 | 44.132075 | 113 | 0.542131 | false | 3.844972 | true | false | false |
ndezelak/SelectionProcess | Frontend/start_page_create_new_project.py | 1 | 3014 | from PyQt5.QtWidgets import QWidget, QPushButton, QGridLayout, QLineEdit, QLabel, QSpinBox
from PyQt5.QtCore import *
import Data.globals as globals
from Data.data_structures import Session, Settings
from Backend.output_utils import save_project
import pickle
class newProjectWindow(QWidget):
def __init__(self,pare... | gpl-3.0 | -5,885,606,999,690,965,000 | 35.743902 | 126 | 0.592765 | false | 3.752179 | false | false | false |
zvezdan/pip | tests/unit/test_vcs.py | 1 | 6475 | import pytest
from mock import Mock
from pip._vendor.packaging.version import parse as parse_version
from pip._internal.vcs import RevOptions, VersionControl
from pip._internal.vcs.bazaar import Bazaar
from pip._internal.vcs.git import Git, looks_like_hash
from pip._internal.vcs.mercurial import Mercurial
from pip._in... | mit | 842,703,481,586,083,000 | 30.740196 | 75 | 0.644788 | false | 3.111485 | true | false | false |
ruediger/gcc-python-plugin | libcpychecker/compat.py | 3 | 3363 | # Copyright 2012 David Malcolm <dmalcolm@redhat.com>
# Copyright 2012 Red Hat, Inc.
#
# This 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) a... | gpl-3.0 | 5,991,261,211,808,398,000 | 35.554348 | 76 | 0.691347 | false | 3.554968 | false | false | false |
zerothi/sisl | sisl/io/gulp/fc.py | 1 | 2167 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
"""
Sile object for reading the force constant matrix written by GULP
"""
import numpy as np
from numpy import abs as n... | lgpl-3.0 | 1,996,881,407,035,932,400 | 27.513158 | 96 | 0.563913 | false | 3.570016 | false | false | false |
Slocan/timerecord | timerecord.py | 1 | 9190 | import socket
import struct
import asyncore
#import serial
import yaml
import os.path
import sys
import sqlite3
import urllib.request
class Sender:
def __init__(self, serial_name):
try:
self.ser = serial.Serial(
serial_name,
115200,
writeTimeout... | mit | 9,027,691,816,301,602,000 | 37.13278 | 143 | 0.523613 | false | 3.716134 | true | false | false |
Team3574/2013VisionCode | src/Main.py | 1 | 3392 | # This file is part of the project High Tekerz 2013 Vision Code.
#
# the project High Tekerz 2013 Vision Code 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 opti... | gpl-3.0 | 6,739,374,402,741,383,000 | 35.085106 | 99 | 0.645637 | false | 3.743929 | false | false | false |
fredrikaverpil/pyVFX-viewer | pyVFXViewer.py | 1 | 23260 | ''' Run mode '''
''' ------------- '''
runMode = 'standalone'
try:
import maya.cmds as cmds
import maya.OpenMayaUI as omui
import shiboken
runMode = 'maya'
except:
pass
try:
import nuke
from nukescripts import panels
runMode = 'nuke'
except:
pass
''' Imports regardless of Qt type '''
''' -------------------... | gpl-2.0 | -3,602,977,938,732,555,000 | 27.680641 | 185 | 0.706922 | false | 3.206949 | false | false | false |
andrewyoung1991/supriya | supriya/tools/ugentools/NRand.py | 1 | 2966 | # -*- encoding: utf-8 -*-
from supriya.tools.ugentools.UGen import UGen
class NRand(UGen):
r'''A sum of `n` uniform distributions.
::
>>> n_rand = ugentools.NRand.ir(
... minimum=-1,
... maximum=1,
... n=1,
... )
>>> n_rand
NRand.ir()
... | mit | -3,549,213,889,024,126,500 | 20.035461 | 70 | 0.419083 | false | 3.928477 | false | false | false |
cseed/hail | scorecard/scorecard/scorecard.py | 1 | 13160 | import collections
import datetime
import os
import asyncio
import aiohttp
from aiohttp import web, ClientSession
import gidgethub.aiohttp
import random
import humanize
import logging
from collections import defaultdict
from hailtop.config import get_deploy_config
from hailtop.tls import get_in_cluster_server_ssl_cont... | mit | 5,340,062,227,442,083,000 | 28.84127 | 98 | 0.57766 | false | 3.551957 | false | false | false |
rjschwei/azure-sdk-for-python | azure-mgmt-eventhub/azure/mgmt/eventhub/models/sku.py | 1 | 1403 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | 1,680,053,308,090,639,600 | 33.219512 | 76 | 0.570207 | false | 4.008571 | false | false | false |
T-R0D/JustForFun | aoc2016/aoc2016/day16/solution.py | 1 | 1933 | # This file is part of aoc2016.
#
# aoc2016 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.
#
# aoc2016 is distributed in the hope th... | gpl-2.0 | -2,170,949,529,000,705,000 | 30.177419 | 89 | 0.65701 | false | 3.674905 | false | false | false |
yaukwankiu/armor | tests/modifiedMexicanHatTest15d.py | 1 | 9476 | """
2014-05-16
from modifiedMexicanHatTest11d.py
"""
# step 1 #######################################################################
import numpy as np
import matplotlib.pyplot as plt
from scipy import ndimage
from scipy import interpolate
sigmasWRF = [1, 2, 4, 5, 8, 10, 16, 20, 32, 40, 64, 80, 128, 160, 256... | cc0-1.0 | 7,814,882,400,895,852,000 | 38.648536 | 321 | 0.713592 | false | 2.509534 | false | false | false |
rldotai/rlbench | rlbench/policy.py | 1 | 2848 | """
Policies for selecting actions.
TODO: Composing policies
TODO: Options
TODO: More generally parameterizable policies.
"""
import numpy as np
from collections import defaultdict
class Policy:
def __init__(self, *args, **kwargs):
pass
def choose(self, s, actions):
""" Select an action from... | gpl-3.0 | 607,044,779,404,235,800 | 28.061224 | 79 | 0.614817 | false | 4.535032 | false | false | false |
yunfeiz/py_learnt | tensorflow/stock_predict/stock_predict.py | 1 | 5131 | #-*-coding:utf-8-*-
'''
Created on 2017年2月19日
@author: Lu.yipiao
'''
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
#——————————————————导入数据——————————————————————
f=open('.\dataset\dataset_1.csv')
df=pd.read_csv(f) #读入股票数据
data=np.array(df['high']) #获取最高价序列
data... | apache-2.0 | -5,194,585,311,721,428,000 | 30.807692 | 159 | 0.593954 | false | 2.301057 | false | false | false |
usernamealreadyis/commands | ___init__.py | 1 | 2904 | """Extensions to the 'distutils' for large or complex distributions"""
from setuptools.extension import Extension, Library
from setuptools.dist import Distribution, Feature, _get_unpatched
import distutils.core, setuptools.command
from setuptools.depends import Require
from distutils.core import Command as _Command
fro... | epl-1.0 | 5,393,927,177,090,511,000 | 34.851852 | 89 | 0.636019 | false | 3.761658 | false | false | false |
isaaclino/wattsup | wattsup_USB3.py | 1 | 8091 | #!/usr/bin/env python
"""record data from WattsUp power meter
Reads data from a Watts Up PRO or compatible power meter (http://www.wattsupmeters.com).
Plots in real time, can run in simulation mode, reading from a file rather than
a physical power meter.
Output format will be space sperated containing:
YYYY-MM-DD HH:... | gpl-3.0 | 7,660,472,017,862,402,000 | 37.899038 | 185 | 0.534297 | false | 3.875 | false | false | false |
KirarinSnow/Google-Code-Jam | Practice Problems/C1.py | 1 | 1903 | #!/usr/bin/python
#
# Problem: Egg Drop
# Language: Python
# Author: KirarinSnow
# Usage: python thisfile.py <input.in >output.out
t = []
s = 575
bs = s
for i in range(s+1):
t.append([])
for j in range(bs+1):
t[i].append(0)
for d in range(1, s+1):
for b in range(1, d+1):
if b == 1:
... | gpl-3.0 | -9,175,749,634,453,190,000 | 14.858333 | 80 | 0.451393 | false | 2.292771 | false | false | false |
sbackus/sambackus | sambackus.py | 1 | 7026 |
import sys
from collections import deque
class LoopError(Exception):
pass
class SambackusParser(object):
def __init__(self):
self.BEGIN = ('sambackus!', 'sambackus?')
self.END = ('sambackus?', 'sambackus!')
self.primitives = {('sambackus.', 'sambackus.'): 'inc',
... | mit | -7,946,970,648,652,999,000 | 33.106796 | 133 | 0.512383 | false | 3.951631 | false | false | false |
seibert/numba | numba/tests/test_lists.py | 1 | 50990 | from collections import namedtuple
import contextlib
import itertools
import math
import sys
import ctypes as ct
import numpy as np
from numba.core.compiler import compile_isolated, Flags
from numba import jit, typeof, njit, literal_unroll, literally
import unittest
from numba import testing
from numba.core import typ... | bsd-2-clause | 5,605,719,087,266,671,000 | 27.078194 | 80 | 0.526103 | false | 3.471069 | true | false | false |
gbiggs/rtshell | rtshell/rtexit.py | 2 | 2730 | #!/usr/bin/env python2
# -*- Python -*-
# -*- coding: utf-8 -*-
'''rtshell
Copyright (C) 2009-2015
Geoffrey Biggs
RT-Synthesis Research Group
Intelligent Systems Research Institute,
National Institute of Advanced Industrial Science and Technology (AIST),
Japan
All rights reserved.
Licensed und... | lgpl-3.0 | -4,001,965,066,198,582,300 | 24.754717 | 77 | 0.646154 | false | 3.554688 | false | false | false |
jordotech/satchmofork | satchmo/apps/l10n/validators/ukpostcode.py | 16 | 3849 | """From http://code.activestate.com/recipes/279004/"""
import re
# Build up the regex patterns piece by piece
POSTAL_ZONES = ['AB', 'AL', 'B' , 'BA', 'BB', 'BD', 'BH', 'BL', 'BN', 'BR',
'BS', 'BT', 'CA', 'CB', 'CF', 'CH', 'CM', 'CO', 'CR', 'CT',
'CV', 'CW', 'DA', 'DD', 'DE', 'DG', 'DH',... | bsd-3-clause | -9,118,664,378,764,975,000 | 39.515789 | 75 | 0.421408 | false | 3.099034 | false | false | false |
automl/HPOlib2 | examples/local/xgboost_local.py | 1 | 2605 | """
Example with XGBoost (local)
============================
This example executes the xgboost benchmark locally with random configurations on the CC18 openml tasks.
To run this example please install the necessary dependencies via:
``pip3 install .[xgboost_example]``
"""
import argparse
from time import time
from ... | gpl-3.0 | 8,514,367,168,636,458,000 | 41.016129 | 119 | 0.560077 | false | 3.94697 | true | false | false |
maas/maas | src/maasserver/api/discoveries.py | 1 | 19964 | # Copyright 2016 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""API handlers: `Discovery`."""
from textwrap import dedent
from django.http.response import HttpResponseBadRequest, HttpResponseForbidden
from formencode.validators import CID... | agpl-3.0 | 4,882,977,061,150,996,000 | 39.742857 | 85 | 0.642757 | false | 4.314675 | false | false | false |
balihoo/blambda | blambda/utils/iam.py | 1 | 6430 | import json
import time
from copy import deepcopy
from difflib import unified_diff
from pprint import pprint
import boto3
from botocore.exceptions import ClientError
from termcolor import cprint
def make_assume_role_policy(services):
policy = {
"Version": "2012-10-17",
"Statement": [
... | mit | -1,933,052,014,638,118,000 | 28.768519 | 105 | 0.560809 | false | 4.001245 | false | false | false |
yuq-1s/JiaoEle | cracker/test.py | 1 | 3473 | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
class Test(object):
def __init__(self):
self.user = 'zxdewr'
self.passwd = 'ca1l6ack'
self.sess = login(self.user, self.passwd)
url = ELECT_URL+'electwarning.aspx?xklc=1'
init_param = {'CheckBox1': 'on', 'btnContinue': '继续'}
... | mit | -7,989,926,512,585,280,000 | 39.317647 | 109 | 0.546834 | false | 3.273161 | false | false | false |
tensorflow/data-validation | tensorflow_data_validation/statistics/generators/sklearn_mutual_information.py | 1 | 18227 | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | 3,478,418,436,910,934,500 | 41.290023 | 94 | 0.684644 | false | 3.995397 | false | false | false |
TeamSpen210/srctools | srctools/_class_resources/__init__.py | 1 | 13877 | """For each entity class, specify hardcoded resources.
Those are ones that don't simply appear in keyvalues.
The only public values are CLASS_RESOURCES and ALT_NAMES, but those
should be imported from packlist instead.
"""
from typing import Callable, Tuple, Union, List, Dict, Iterable
from srctools.packlist import F... | unlicense | 2,799,933,818,834,866,000 | 31.197216 | 103 | 0.671399 | false | 3.036543 | false | false | false |
duydb2/thriftpy | tests/test_tracking.py | 7 | 8893 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import contextlib
import os
import multiprocessing
import time
import tempfile
import pickle
import thriftpy
try:
import dbm
except ImportError:
import dbm.ndbm as dbm
import pytest
from thriftpy.contrib.tracking import TTrackedProcessor, TTrac... | mit | -2,745,078,998,023,505,400 | 24.121469 | 78 | 0.604296 | false | 3.567188 | true | false | false |
GelaniNijraj/PyMaterial | MAnimations/MScale.py | 2 | 4786 | __author__ = 'MaitreyaBuddha'
import time
from PySide.QtGui import QApplication
from PySide.QtCore import QPoint, QPointF
from MAnimations.MAnimate import MAnimate
class MScale(MAnimate):
"""
Can be used to scale an MShape object to desired size.
(Does not handle children).
Requires target to be a ... | mit | -460,441,881,794,536,700 | 38.883333 | 82 | 0.469912 | false | 4.824597 | false | false | false |
zaneb/heat-convergence-prototype | converge/framework/scenario.py | 1 | 1054 | import os
import logging
logger = logging.getLogger('scenario')
def list_all(directory):
if not os.path.isdir(directory):
logger.error('Scenario directory "%s" not found', directory)
return
for root, dirs, files in os.walk(directory):
for filename in files:
name, ext = o... | apache-2.0 | -8,672,416,017,336,600,000 | 24.707317 | 68 | 0.574953 | false | 3.875 | false | false | false |
mozilla/relman-auto-nag | auto_nag/round_robin.py | 2 | 6925 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
import json
from random import randint
from dateutil.relativedelta import relativedelta
from libmozdata import utils as... | bsd-3-clause | 6,921,480,445,484,708,000 | 34.152284 | 88 | 0.563177 | false | 3.860089 | false | false | false |
googleinterns/acuiti | modules/icon_finder_shape_context.py | 1 | 10271 | """This module has an IconFinderShapeContext class for finding bounding boxes.
"""
import logging
import multiprocessing # pytype: disable=pyi-error
from typing import List, Optional, Tuple
import cv2
from modules import algorithms
from modules import clustering_algorithms
from modules.bounding_box import BoundingBo... | apache-2.0 | 5,036,417,796,865,509,000 | 45.058296 | 92 | 0.649985 | false | 4.123244 | false | false | false |
franck-talbart/codelet_tuning_infrastructure | ctr-common/plugins/e31a6e93-4d41-43a9-b943-60d1a2cc26c8/main.py | 1 | 17295 | #************************************************************************
# Codelet Tuning Infrastructure
# Copyright (C) 2010-2015 Intel Corporation, CEA, GENCI, and UVSQ
#
# 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
# th... | gpl-3.0 | -2,111,843,963,015,066,000 | 42.895939 | 121 | 0.54935 | false | 4.199854 | false | false | false |
bkahlert/seqan-research | raw/workshop11/seqan-trunk/misc/seqan_instrumentation/py2exe/dist/classes/diff.py | 4 | 2475 | import os
import subprocess
import glob
from datetime import datetime
from ftplib import FTP
import socket
class Diff(object):
MAX_REVISION_LENGTH = 8
def __init__(self, bin_dir, results_dir, root_dir, from_dir_local, to_dir_local, id, excluded_resources):
self.results_dir = results_dir
self... | mit | 5,031,754,936,903,241,000 | 34.397059 | 251 | 0.646465 | false | 2.935943 | false | false | false |
RedHatInsights/insights-core | insights/parsers/crypto_policies.py | 1 | 4542 | """
crypto-policies - files in ``/etc/crypto-policies/back-ends/``
==============================================================
This is a collection of parsers that all deal with the generated configuration
files under the ``/etc/crypto-policies/back-ends/`` folder. Parsers included
in this module are:
CryptoPolic... | apache-2.0 | 6,487,253,175,822,994,000 | 31.212766 | 103 | 0.572875 | false | 4.077199 | true | false | false |
markstev/nebree8 | drinks/manual_db.py | 1 | 3485 | #!/usr/bin/env python
from recipe import Recipe, Ingredient, Oz, Parts, Drops
db = [
Recipe(
name = 'Margarita',
total_oz = 2.75,
ingredients = [
Ingredient(Parts(2), 'Tequila'),
Ingredient(Parts(1), 'Lime Juice'),
Ingredient(Parts(1), 'Agave Syrup')]),
... | gpl-2.0 | -813,568,683,488,062,800 | 31.570093 | 56 | 0.497561 | false | 3.145307 | false | false | false |
corpnewt/CorpBot.py | Cogs/Heart.py | 1 | 1245 | import asyncio
import discord
import re
from discord.ext import commands
from Cogs import DisplayName
def setup(bot):
# Add the bot
bot.add_cog(Heart(bot))
class Heart(commands.Cog):
# Init with the bot reference, and a reference to the settings var
def __init__(self, bot):
self.bot = bot
# compile regex... | mit | 139,804,773,338,559,090 | 29.243902 | 90 | 0.654839 | false | 2.863741 | false | false | false |
BioDynaMo/biodynamo | cli/print_command.py | 1 | 1263 | # -----------------------------------------------------------------------------
#
# Copyright (C) 2021 CERN & Newcastle University for the benefit of the
# BioDynaMo collaboration. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance w... | apache-2.0 | 7,135,754,713,507,197,000 | 29.071429 | 79 | 0.566904 | false | 3.770149 | false | false | false |
honmaple/flask-maple | flask_maple/auth/models.py | 1 | 3643 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# **************************************************************************
# Copyright © 2016 jianglin
# File Name: models.py
# Author: jianglin
# Email: mail@honmaple.com
# Created: 2016-12-07 13:12:42 (CST)
# Last Update: Wednesday 2018-09-26 10:52:50 (CST)
# B... | bsd-3-clause | 8,062,562,769,154,146,000 | 27.015385 | 77 | 0.599671 | false | 3.797706 | false | false | false |
iandees/all-the-places | locations/spiders/club_milanesa.py | 1 | 3356 | # -*- coding: utf-8 -*-
import scrapy
import re
from locations.items import GeojsonPointItem
base_url = 'https://www.elclubdelamilanesa.com/'
class MilanesaSpider(scrapy.Spider):
name = 'milanesa'
allowed_domains =['www.elclubdelamilanesa.com']
start_urls = ['https://www.elclubdelamilanesa.com/c... | mit | -7,155,820,067,134,015,000 | 30.843137 | 75 | 0.499403 | false | 3.504184 | false | false | false |
bsmr-ansible/ansible-modules-core | network/nxos/nxos_ip_interface.py | 15 | 18328 | #!/usr/bin/python
#
# 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 version.
#
# Ansible is distribut... | gpl-3.0 | -790,669,584,707,410,200 | 33.712121 | 119 | 0.58206 | false | 4.197893 | true | false | false |
kolanos/vaporize | vaporize/loadbalancers.py | 1 | 60681 | # -*- coding: utf-8 -*-
import datetime
import json
from vaporize.core import convert_datetime, get_url, handle_request, query
from vaporize.utils import DotDict
class AccessRule(DotDict):
"""A CloudLoadBalancer Access List Rule.
The access list management feature allows fine-grained network access
con... | mit | -1,960,107,179,152,737,300 | 40.307692 | 151 | 0.600073 | false | 4.557341 | false | false | false |
mattjj/pyhsmm | examples/concentration-resampling.py | 5 | 1680 | from __future__ import division
import numpy as np
np.seterr(divide='ignore') # these warnings are usually harmless for this code
from matplotlib import pyplot as plt
import os
import scipy.stats as stats
import pyhsmm
from pyhsmm.util.text import progprint_xrange
###############
# load data #
###############
T = ... | mit | -8,154,306,094,732,319,000 | 29 | 101 | 0.645833 | false | 3.10536 | false | false | false |
Cal-CS-61A-Staff/ok | manage.py | 1 | 3261 | #!/usr/bin/env python3
import os
import binascii
import unittest
from flask_assets import ManageAssets
from flask_rq import get_worker
from flask_script import Manager, Server, Command
from flask_script.commands import ShowUrls, Clean
from flask_migrate import Migrate, MigrateCommand
from server import create_app, g... | apache-2.0 | -7,602,491,522,252,343,000 | 25.512195 | 81 | 0.662987 | false | 3.603315 | true | false | false |
franklingu/leetcode-solutions | questions/kth-smallest-element-in-a-bst/Solution.py | 1 | 1788 | """
Given a binary search tree, write a function kthSmallest to find the kth smallest element in it.
Note:
You may assume k is always valid, 1 ≤ k ≤ BST's total elements.
Example 1:
Input: root = [3,1,4,null,2], k = 1
3
/ \
1 4
\
2
Output: 1
Example 2:
Input: root = [5,3,6,2,4,null,null,1], k = 3
... | mit | -1,042,442,088,391,056,300 | 23.108108 | 158 | 0.519058 | false | 3.633401 | false | false | false |
pyfa-org/Pyfa | gui/viewColumn.py | 2 | 2340 | # =============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of pyfa.
#
# pyfa 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 ... | gpl-3.0 | 5,713,191,255,334,100,000 | 24.714286 | 79 | 0.626496 | false | 4.293578 | false | false | false |
kdart/pycopia | net/pycopia/clientservers/clients/pyclient.py | 1 | 1263 | #!/usr/bin/python2.7
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
... | apache-2.0 | 5,191,645,129,585,827,000 | 27.704545 | 78 | 0.689628 | false | 3.404313 | false | false | false |
yeyanchao/calibre | setup/installer/windows/__init__.py | 1 | 2061 | #!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import with_statement
__license__ = 'GPL v3'
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import os, shutil, subprocess, re
from setup import Command, __appname__, __version_... | gpl-3.0 | 403,445,594,541,097,540 | 30.227273 | 82 | 0.593401 | false | 3.318841 | false | false | false |
RuddockHouse/RuddockWebsite | ruddock/modules/auth/routes.py | 1 | 3723 | import flask
from ruddock import auth_utils
from ruddock.modules.auth import blueprint, helpers
@blueprint.route('/login')
def login():
"""Displays the login page."""
return flask.render_template('login.html')
@blueprint.route('/login/submit', methods=['POST'])
def login_submit():
"""Handles authentication."""... | mit | 2,815,838,785,167,534,600 | 42.8 | 167 | 0.716626 | false | 3.787386 | false | false | false |
badaix/snapcast | control/setVolume.py | 1 | 1267 | #!/usr/bin/env python
import sys
import telnetlib
import json
telnet = telnetlib.Telnet(sys.argv[1], 1705)
requestId = 1
def doRequest( j, requestId ):
print("send: " + j)
telnet.write(j + "\r\n")
while (True):
response = telnet.read_until("\r\n", 2)
jResponse = json.loads(response)
if 'id' in jResponse:
... | gpl-3.0 | 5,283,320,886,730,388,000 | 33.243243 | 187 | 0.630624 | false | 3.009501 | false | false | false |
aspuru-guzik-group/mission_control | examples/queued_flows/entrypoint.py | 1 | 2347 | from mc.utils.mc_sandbox import McSandbox
def main():
sandbox = McSandbox()
mc_db = sandbox.mc_db
flow_engine = sandbox.flow_engine
create_flows(mc_db=mc_db, flow_engine=flow_engine, n=3)
queue_record = mc_db.create_item(
item_type='queue',
item_kwargs={'queue_spec': {'item_type':... | apache-2.0 | 3,771,095,546,504,465,000 | 30.716216 | 79 | 0.538134 | false | 3.338549 | false | false | false |
42cc/mass_post_office | mass_post_office/templatetags/subscription.py | 1 | 1086 | from django.contrib.sites.models import Site
from django import template
from django.core.urlresolvers import reverse
from ..utils import encode_data
register = template.Library()
@register.tag
def unsubscribe_link(parser, token):
try:
tag_name, obj = token.split_contents()
except ValueError:
... | bsd-3-clause | 1,338,204,504,528,034,800 | 29.166667 | 76 | 0.638122 | false | 4.067416 | false | false | false |
bbc/ebu-tt-live-toolkit | ebu_tt_live/node/element_remover.py | 1 | 4767 | from .base import AbstractCombinedNode
from ebu_tt_live.documents.ebutt3 import EBUTT3Document
from ebu_tt_live.errors import UnexpectedSequenceIdentifierError
from pyxb.binding.basis import ElementContent, \
complexTypeDefinition, simpleTypeDefinition
import logging
log = logging.getLogger(__name__)
class Eleme... | bsd-3-clause | -2,247,142,261,496,011,000 | 35.389313 | 97 | 0.597021 | false | 4.991623 | false | false | false |
seiferteric/bmaptools | tests/oldcodebase/BmapCopy1_0.py | 1 | 29514 | # pylint: disable-all
""" This module implements copying of images with bmap and provides the
following API.
1. BmapCopy class - implements copying to any kind of file, be that a block
device or a regular file.
2. BmapBdevCopy class - based on BmapCopy and specializes on copying to block
devices. It does... | gpl-2.0 | -5,104,328,652,204,423,000 | 40.627645 | 80 | 0.579894 | false | 4.124371 | false | false | false |
oubiwann/txjsonrpc | examples/ssl/client.py | 2 | 1418 | from __future__ import print_function
import logging
from twisted.internet import reactor, ssl
from txjsonrpc.web.jsonrpc import Proxy
from OpenSSL import SSL
from twisted.python import log
def printValue(value):
print("Result: %s" % str(value))
def printError(error):
print('error', error)
def shutDown(dat... | mit | 4,333,572,072,510,159,400 | 27.938776 | 87 | 0.691114 | false | 3.328638 | false | false | false |
Jannis/gitpercs | gitpercs/repository.py | 1 | 1309 | #!/usr/bin/env python
#
# Copyright (C) 2012 Jannis Pohlmann <jannis.pohlmann@codethink.co.uk>
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import pygit2
import ... | mpl-2.0 | 7,284,804,333,969,415,000 | 30.166667 | 72 | 0.652406 | false | 4.065217 | false | false | false |
carletes/libcloud | libcloud/test/dns/test_pointdns.py | 2 | 9005 | # 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 use ... | apache-2.0 | 6,654,906,965,033,213,000 | 41.880952 | 78 | 0.639534 | false | 3.631048 | true | false | false |
mogoweb/chromium-crosswalk | tools/perf/metrics/discrepancy_unittest.py | 1 | 4959 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
import random
from metrics import discrepancy
def Relax(samples, iterations=10):
''' Lloyd relaxation in 1D. Keeps the position of the fir... | bsd-3-clause | -2,430,231,086,898,739,700 | 37.742188 | 79 | 0.637629 | false | 3.325956 | true | false | false |
seanyeh/SimpleFF | src/qtRangeSlider.py | 1 | 23878 | #!/usr/bin/python
#
## @file
#
# Qt Widget Range slider widget. This is a slider with two bars, one of
# which is used to set the maximum and the other of which is used to
# set the minimum.
#
# Qt Double Spin Box slider widget. This is the range slider grouped
# with two spin boxes to make the range editable.... | gpl-3.0 | 4,682,936,748,960,983,000 | 31.583685 | 127 | 0.592428 | false | 3.752632 | false | false | false |
supriyantomaftuh/python_api | python_api/marklogic/models/certificate/template.py | 1 | 16466 | # -*- coding: utf-8 -*-
#
# Copyright 2015 MarkLogic Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0#
#
# Unless required by appli... | apache-2.0 | -4,478,885,141,084,306,000 | 29.324125 | 94 | 0.57725 | false | 4.71265 | true | false | false |
sushi-irc/tekka | tekka/helper/history.py | 1 | 2634 | """ provide functions for history handling.
note that history stuff is only possible
if maki is not running remote.
"""
import re
import os
from ..com import sushi
from ..typecheck import types
FILEPATTERN= re.compile(r'([0-9]+)-([0-9]+)\.txt')
DATEPATTERN= re.compile(r'^([0-9]+)-([0-9]+)-([0-9]+) ([0-9]+):([0-9]+):... | bsd-2-clause | -3,817,311,702,279,210,000 | 23.388889 | 82 | 0.664389 | false | 2.913717 | false | false | false |
sysdream/gadget-client | gadget/mapping.py | 1 | 14472 | """
Type mapping management
Java types are mapped to Python types in a single common repository.
New type mappings may be declared using a simple class decorator on the
declared mapped class. The most specific mapping is always picked when
the mapping definitions are ambiguous.
Types ordering when performing mapping ... | gpl-3.0 | 1,076,960,035,233,059,700 | 32.971831 | 90 | 0.584646 | false | 4.917431 | false | false | false |
ltn100/prompty | prompty/status.py | 1 | 2704 | #!/usr/bin/env python
# vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import os
import subprocess
from prompty import userdir
from prompty import vcs
from prom... | mit | -7,307,635,305,198,118,000 | 27.463158 | 60 | 0.550666 | false | 4.205288 | false | false | false |
yugangw-msft/azure-cli | src/azure-cli/azure/cli/command_modules/monitor/grammar/autoscale/AutoscaleConditionValidator.py | 3 | 3981 | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | mit | -3,965,342,029,435,636,000 | 43.730337 | 116 | 0.66742 | false | 4.478065 | false | false | false |
jason-ellis/tickettweets | app/views.py | 1 | 1778 | from datetime import datetime
from app import app
from stream import debug, users, get_tweets
from flask import render_template, request
@app.route("/")
def index():
tweets = get_tweets(limit=20)
if debug:
print('Sent {0} tweets to DOM'.format(len(tweets)))
return render_template('index.html',
... | mit | 6,012,759,254,654,622,000 | 33.882353 | 74 | 0.579865 | false | 3.584677 | false | false | false |
chiamingyen/PythonCAD_py3 | Generic/Kernel/Command/rotatecommand.py | 1 | 2740 | #!/usr/bin/env python
#
# Copyright (c) 2010 Matteo Boscolo
#
# This file is part of PythonCAD.
#
# PythonCAD is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your opti... | gpl-2.0 | 5,548,489,127,947,849,000 | 35.052632 | 80 | 0.59927 | false | 4.261275 | false | false | false |
Alkemic/webpage | module/portfolio/models.py | 1 | 4000 | # -*- coding:utf-8 -*-
"""Models related to portfolio"""
from datetime import datetime
from django.db import models
from django.utils.translation import ugettext_lazy as _
from taggit.managers import TaggableManager
from uuslug import uuslug as slugify
from .managers import PublicManager
__author__ = 'Daniel Alkemic... | mit | 1,072,421,950,209,279,500 | 25.315789 | 79 | 0.59075 | false | 3.917728 | false | false | false |
tbabej/skyscraper | skyscraper.py | 1 | 4316 | from bs4 import BeautifulSoup
from selenium import webdriver
from datetime import datetime
def removeNonAscii(string):
return "".join(i for i in string if ord(i) < 128)
months = {
1: 'leden',
2: 'unor',
3: 'brezen',
4: 'duben',
5: 'kveten',
... | mit | -4,262,953,377,838,659,000 | 31.451128 | 76 | 0.465014 | false | 4.239686 | false | false | false |
charlievieth/GoSubl | gosubl/mg9.py | 1 | 22047 | from gosubl import about
from gosubl import ev
from gosubl import gs
from gosubl import gsq
from gosubl import sh
import atexit
import base64
import hashlib
import json
import os
import re
import sublime
import subprocess
import threading
import time
import uuid
DOMAIN = "MarGo"
REQUEST_PREFIX = "%s.rqst." % DOMAIN
PR... | mit | 9,059,130,629,298,423,000 | 26.490025 | 102 | 0.453531 | false | 3.722898 | false | false | false |
grimmjow8/ansible | lib/ansible/plugins/callback/__init__.py | 10 | 13953 | # (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 | 7,620,497,579,462,804,000 | 36.710811 | 147 | 0.568767 | false | 4.050218 | false | false | false |
OpusVL/odoo-account-extras | account_invoice_sale_link/models/account.py | 1 | 1245 | # -*- coding: utf-8 -*-
##############################################################################
#
# Link to sales order from invoice
# Copyright (C) 2017 OpusVL (<http://opusvl.com/>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public L... | agpl-3.0 | 5,377,997,082,093,167,000 | 35.617647 | 78 | 0.634538 | false | 4.353147 | false | false | false |
SUSE/azure-sdk-for-python | azure-mgmt-web/azure/mgmt/web/models/virtual_application.py | 3 | 1678 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | 5,623,423,099,854,982,000 | 39.926829 | 110 | 0.626341 | false | 4.39267 | false | false | false |
themattinthehatt/vid-viz | vidviz/utils.py | 1 | 2758 | """Contains general utility functions"""
from __future__ import division
import numpy as np
import cv2
class SmoothNoise(object):
def __init__(self, num_samples=10, num_channels=1):
"""
Returns values from a Gaussian noise process that is smoothed by
averaging over previous random value... | mit | 2,930,905,189,894,829,000 | 29.318681 | 77 | 0.602248 | false | 3.923186 | false | false | false |
rtkasodariya/interview | python/graph/graph.py | 2 | 2564 | #Graph class
# Java code https://github.com/mission-peace/interview/blob/master/src/com/interview/graph/Graph.java
class Graph(object):
def __init__(self, is_directed):
self.all_edges = []
self.all_vertex = {}
self.is_directed = is_directed
def add_edge(self, id1, id2, weight=0):
... | apache-2.0 | -975,728,134,954,606,800 | 25.708333 | 101 | 0.555382 | false | 3.364829 | false | false | false |
mhorn71/StarinetPythonLogger | actions/getClockTime.py | 1 | 1395 | # StarinetPython3Logger a data logger for the Beaglebone Black.
# Copyright (C) 2015 Mark Horn
#
# This file is part of StarinetPython3Logger.
#
# StarinetPython3Logger 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 Fou... | gpl-2.0 | -1,571,296,682,340,559,400 | 29.326087 | 80 | 0.722581 | false | 3.929577 | false | false | false |
rahulraj/web_projects | assignment2/src/photogallery/tests/immutable_dict_test.py | 1 | 1756 | import unittest
from ..utils.immutabledict import ImmutableDict
from ..utils.disallowedmodification import DisallowedModification
class ImmutableDictNamedConstructorTest(unittest.TestCase):
def test_construct_immutable_dict(self):
my_dict = ImmutableDict.of(foo='bar', baz='quux')
self.assertEquals('bar', my_... | mit | 7,667,217,272,290,331,000 | 32.132075 | 79 | 0.704442 | false | 3.628099 | true | false | false |
waterwoodwind/QA_web | main/migrations/0002_auto_20160406_0922.py | 1 | 5775 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-04-06 01:22
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('main', '0001_initial'),
]
operations = [
mi... | mit | -5,388,679,080,839,183,000 | 35.550633 | 160 | 0.555671 | false | 4.035639 | false | false | false |
adaptive-learning/matmat-web | matmat/prediction.py | 1 | 8492 | import math
from collections import defaultdict
from proso.django.cache import cache_pure
from proso.models.prediction import PredictiveModel, predict_simple
DEFAULT_MEAN_TIME = 7 * 1000
def enrich_mean_time(request, json_list, nested):
from proso_models import models
items = [question["payload"]["item_id"... | mit | -3,038,601,790,700,908,000 | 46.441341 | 140 | 0.605158 | false | 3.695387 | false | false | false |
tensorflow/addons | tensorflow_addons/text/parse_time_op.py | 1 | 3437 | # Copyright 2019 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 | 304,561,155,975,691,260 | 38.965116 | 86 | 0.690137 | false | 3.955121 | false | false | false |
ianburrell/mock | py/mockbuild/backend.py | 1 | 20396 | # -*- coding: utf-8 -*-
# vim:expandtab:autoindent:tabstop=4:shiftwidth=4:filetype=python:textwidth=0:
# License: GPL2 or later see COPYING
# Originally written by Seth Vidal
# Sections taken from Mach by Thomas Vander Stichele
# Major reorganization and adaptation by Michael Brown
# Copyright (C) 2007 Michael E Brown ... | gpl-2.0 | 4,429,176,846,035,750,400 | 41.491667 | 120 | 0.567856 | false | 3.939733 | true | false | false |
povellesto/blobygames | Blob Rage App/random/NumbersCatapult.py | 1 | 1356 | from Tkinter import*
root = Tk()
canvas = Canvas(root, width = 600, height= 500)
root.resizable(width=0, height=0)
root.canvas = canvas.canvas = canvas
#angle = input("Please Input an angle. ")
#for i in range():
angles = [0,10,20,30,40,45,50,60,70,80,90]
powers = [1,2,3,4,5]
distances = [[33,43,44,49,53,46,40,2... | unlicense | -2,588,081,866,324,033,500 | 25.096154 | 120 | 0.530973 | false | 2.819127 | false | false | false |
spacether/pycalculix | pycalculix/loads.py | 1 | 6496 | """This module stores load classes.
"""
from math import pi
class ConstLoad(object):
"""Makes a load. Many types are supported.
Possible load types:
- forces
- displacements
- thickness (on nodes)
- matl (on elements)
- pressure (or stress on faces)
- gravity (o... | apache-2.0 | -1,662,954,416,789,279,200 | 34.304348 | 75 | 0.520012 | false | 3.697211 | false | false | false |
nusnlp/corelm | dlm/models/mlp.py | 1 | 4896 | from dlm.models.components.lookuptable import LookupTable
from dlm.models.components.linear import Linear
from dlm.models.components.activation import Activation
from dlm.models import classifier
import dlm.utils as U
import dlm.io.logging as L
import theano.tensor as T
import theano
import numpy
import math
class MLP... | mit | -2,028,287,315,693,271,300 | 28.672727 | 127 | 0.588644 | false | 3.003681 | false | false | false |
sgiavasis/C-PAC | CPAC/GUI/interface/pages/settings.py | 1 | 10835 | import wx
import wx.html
from ..utils.generic_class import GenericClass
from ..utils.constants import control, dtype
from ..utils.validator import CharValidator
import os
import pkg_resources as p
class Settings(wx.html.HtmlWindow):
def __init__(self, parent, counter=0):
from urllib2 import urlopen
... | bsd-3-clause | -5,343,238,579,824,720,000 | 42.167331 | 306 | 0.547946 | false | 4.712919 | false | false | false |
tiagoantao/mega-analysis | support/python/MEGA/sql.py | 1 | 3995 | import os
import MEGA
if MEGA.dbType == "pg":
import psycopg2
error = psycopg2.Error
prep = "%s"
elif MEGA.dbType == "sqlite":
import sqlite3
error = sqlite3.OperationalError
prep = "?"
def getHash(id):
c = conn.cursor()
c.execute("SELECT hash FROM hash_id WHERE id=%s" % prep, (id,))... | agpl-3.0 | -5,684,318,582,463,910,000 | 22.362573 | 112 | 0.574969 | false | 3.188348 | false | false | false |
momentum/canteen | canteen/logic/realtime.py | 2 | 10282 | # -*- coding: utf-8 -*-
"""
realtime logic
~~~~~~~~~~~~~~
:author: Sam Gammon <sg@samgammon.com>
:copyright: (c) Sam Gammon, 2014
:license: This software makes use of the MIT Open Source License.
A copy of this license is included as ``LICENSE.md`` in
the root of the project.
"""
... | mit | -7,214,361,736,053,890,000 | 31.537975 | 80 | 0.649679 | false | 4.282382 | false | false | false |
trolldbois/python-haystack-reverse | haystack/reverse/heuristics/signature.py | 1 | 30937 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import itertools
import ctypes
import logging
import struct
import os
import re
import Levenshtein # seqmatcher ?
import networkx
import numpy
from haystack.reverse import config
import haystack.reverse.matchers
from haystack.utils ... | gpl-3.0 | 4,892,631,730,324,057,000 | 39.073834 | 550 | 0.565763 | false | 3.396684 | true | false | false |
digitalfox/MAGE | scm/install.py | 1 | 4166 | # coding: utf-8
'''
@license: Apache License, Version 2.0
@copyright: 2007-2013 Marc-Antoine Gouillart
@author: Marc-Antoine Gouillart
'''
## Python imports
from datetime import timedelta
## Django imports
from django.utils.timezone import now
## MAGE imports
from scm.exceptions import MageScmError, Mage... | apache-2.0 | 8,727,895,904,349,528,000 | 39.852941 | 221 | 0.655065 | false | 3.857407 | false | false | false |
ActiveState/code | recipes/Python/498229_Weighted_choice/recipe-498229.py | 1 | 3593 | """
wchoice.py -- by bearophile, V.1.0 Oct 30 2006
Weighted choice: like the random.choice() when the probabilities of
the single elements aren't the same.
"""
from random import random
from bisect import bisect
from itertools import izip
def wchoice(objects, frequences, filter=True, normalize=True):
"""wchoice(... | mit | 4,438,142,574,130,470,000 | 32.268519 | 84 | 0.611745 | false | 3.625631 | false | false | false |
onlabsorg/olopy | test/containers_test.py | 1 | 5225 |
import env
import pytest
from olopy.deep import serialize, deserialize
from olopy.containers import *
class TestObservableMapping:
def test_constructor (self):
om = ObservableMapping()
assert isinstance(om, MutableMapping)
assert isinstance(om, ObservableMapping)
om = Observabl... | mit | 2,628,035,957,633,561,000 | 26.072539 | 83 | 0.487464 | false | 3.549592 | true | false | false |
grafeas/client-python | grafeas/models/package_manager_installation_details.py | 1 | 4412 | # coding: utf-8
"""
An API to insert and retrieve metadata on cloud artifacts.
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: v1alpha1
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
... | apache-2.0 | 6,676,690,696,389,232,000 | 29.427586 | 119 | 0.587489 | false | 4.461072 | false | false | false |
santhoshtr/silpa | src/silpa/modules/anagram/anagram.py | 3 | 3923 | """
Anagram Maker
Copyright 2010 Santhosh Thottingal <santhosh.thottingal@gmail.com>
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 ... | agpl-3.0 | -5,739,141,334,273,996,000 | 29.889764 | 78 | 0.652562 | false | 2.796151 | false | false | false |
FlowFX/unkenmathe.de | src/um/exercises/forms.py | 1 | 3754 | """Form definitions."""
from braces.forms import UserKwargModelFormMixin
from crispy_forms.helper import FormHelper, Layout
from crispy_forms.layout import Div, Field, Fieldset, Submit
from django import forms
from django.utils.translation import gettext_lazy as _
from um.core.constants import LICENCE_CHOICES_LONG
f... | agpl-3.0 | -247,728,797,342,119,800 | 31.362069 | 86 | 0.543154 | false | 4.512019 | false | false | false |
cysuncn/python | spark/crm/PROC_A_MANAGER_PERFORMANCE.py | 1 | 106414 | #coding=UTF-8
from pyspark import SparkContext, SparkConf, SQLContext, Row, HiveContext
from pyspark.sql.types import *
from datetime import date, datetime, timedelta
import sys, re, os
st = datetime.now()
conf = SparkConf().setAppName('PROC_A_MANAGER_PERFORMANCE').setMaster(sys.argv[2])
sc = SparkContext(conf = conf)... | gpl-3.0 | -8,153,478,989,587,101,000 | 54.60568 | 211 | 0.532874 | false | 2.648509 | false | true | false |
palmtree5/Red-DiscordBot | redbot/cogs/audio/errors.py | 4 | 3026 | from pathlib import Path
import aiohttp
from redbot.core.i18n import Translator
_ = Translator("Audio", Path(__file__))
class AudioError(Exception):
"""Base exception for errors in the Audio cog."""
class LavalinkDownloadFailed(AudioError, RuntimeError):
"""Downloading the Lavalink jar failed.
Attri... | gpl-3.0 | -4,449,789,142,146,035,700 | 23.803279 | 92 | 0.669861 | false | 4.111413 | false | false | false |
lezizi/A-Framework | python/base/action.py | 1 | 2908 | #!/usr/bin/env python
#
# Copyright (C) 2012 LeZiZi Studio
#
# 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 r... | apache-2.0 | 5,790,928,269,183,047,000 | 35.282051 | 141 | 0.59216 | false | 4.190202 | false | false | false |
simonla/cyxbs_bot | utils.py | 1 | 1973 | from datetime import datetime, timedelta
import pytz as pytz
def is_number(s):
try:
float(s)
return True
except ValueError:
pass
try:
import unicodedata
unicodedata.numeric(s)
return True
except (TypeError, ValueError):
pass
... | apache-2.0 | -1,746,541,877,251,961,900 | 28.904762 | 117 | 0.624551 | false | 3.3 | false | false | false |
olduvaihand/ProjectEuler | src/python/problem426.py | 1 | 1784 | # -*- coding: utf-8 -*-
# ProjectEuler/src/python/problem426.py
#
# Box-ball system
# ===============
# Published on Saturday, 4th May 2013, 07:00 pm
#
# Consider an infinite row of boxes. Some of the boxes contain a ball. For
# example, an initial configuration of 2 consecutive occupied boxes followed by
# 2 empty bo... | mit | 6,657,222,326,819,302,000 | 48.388889 | 79 | 0.695163 | false | 3.386667 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.