repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
quadrismegistus/litlab-poetry | prosodic/treegrid/pytxt.py | 1 | 10492 | import re,os
def yank(text,tag,none=None):
if type(tag)==type(''):
tag=tagname2tagtup(tag)
try:
return text.split(tag[0])[1].split(tag[1])[0]
except IndexError:
return none
def yanks(text,tag):
if type(tag)==type(''):
tag=tagname2tagtup(tag)
return [ x.split(tag[1])[0] for x in text.split(tag[0])[1:]... | mit | -8,339,637,571,409,473,000 | 19.737154 | 130 | 0.596454 | false | 2.567792 | false | false | false |
geopm/geopm | scripts/geopmpy/error.py | 1 | 3896 | #!/usr/bin/env python3
#
# Copyright (c) 2015 - 2021, Intel Corporation
#
# 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, th... | bsd-3-clause | 1,610,141,121,753,856,000 | 35.754717 | 106 | 0.717659 | false | 3.379011 | false | false | false |
blueboxgroup/cinder | cinder/image/image_utils.py | 1 | 16990 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright (c) 2010 Citrix Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in complianc... | apache-2.0 | 4,822,887,739,440,777,000 | 38.696262 | 79 | 0.588994 | false | 3.763846 | false | false | false |
AnotherBobSmith/CLUZ | cluz_mpmain.py | 1 | 12019 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
A QGIS plugin
CLUZ for QGIS
-------------------
begin : 2016-23-02
copyright : (C) 2016 by Bob Smith, D... | gpl-2.0 | 6,864,057,697,020,695,000 | 45.133333 | 189 | 0.672685 | false | 4.10906 | false | false | false |
meisamhe/GPLshared | Programming/MPI — AMath 483 583, Spring 2013 1.0 documentation_files/sort_k_increasing_decreasing_array.py | 1 | 2421 | import sys
import random
import itertools
from merge_sorted_arrays import merge_sorted_arrays
# @include
def sort_k_increasing_decreasing_array(A):
# Decomposes A into a set of sorted arrays.
sorted_subarrays = []
INCREASING, DECREASING = range(2)
subarray_type = INCREASING
start_idx = 0
for i... | gpl-3.0 | -7,189,984,414,671,217,000 | 32.164384 | 80 | 0.576621 | false | 3.210875 | false | false | false |
jackylee0424/Physioboard | sc-phonegap-tornado-websocket/Server/tornado/stack_context.py | 1 | 8142 | #!/usr/bin/env python
#
# Copyright 2010 Facebook
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | mit | 6,455,677,149,505,853,000 | 35.675676 | 80 | 0.646893 | false | 4.393956 | false | false | false |
simmol/battletech-character-creator | load_data.py | 1 | 1267 | import yaml
# Get base stats and values
def get_base_attributes():
with open( 'data/base_stats.yaml', 'r' ) as ff:
attributes = yaml.load( ff )
return attributes
# Get Affiliations data
def get_affiliations():
with open( 'data/affiliations.yaml', 'r' ) as f:
affiliations_data = yaml.loa... | gpl-2.0 | -817,951,340,370,376,100 | 21.22807 | 58 | 0.649566 | false | 3.159601 | false | false | false |
ningmo/pynote | MySqlHelper.py | 1 | 1150 | #-*- coding:utf-8 -*-
import MySQLdb
class MySqlHelper:
@staticmethod
def FetchSql(host, user, password, database, sql, port=3306):
try:
conn = MySQLdb.connect (host=host,
user=user,
passwd=password,
... | agpl-3.0 | -5,288,608,114,324,368,000 | 33.878788 | 103 | 0.482609 | false | 4.852321 | false | false | false |
kei10in/dotfav | features/steps/symlink_step.py | 1 | 1342 | # -*- coding: utf-8 -*-
from hamcrest import *
from utils import *
@given('dotfiles home directory contains a file named "{filename}"')
def step_impl(context, filename):
(dotfiles_home / filename).touch()
@given('dotfiles home directory contains a directory named "{dirname}"')
def step_impl(context, dirname)... | mit | -7,677,806,799,897,577,000 | 26.387755 | 74 | 0.669896 | false | 3.406091 | false | false | false |
jimsize/PySolFC | pysollib/games/picturegallery.py | 1 | 20413 | #!/usr/bin/env python
# -*- mode: python; coding: utf-8; -*-
# ---------------------------------------------------------------------------##
#
# Copyright (C) 1998-2003 Markus Franz Xaver Johannes Oberhumer
# Copyright (C) 2003 Mt. Hood Playing Card Co.
# Copyright (C) 2005-2009 Skomoroh
#
# This program is free softwa... | gpl-3.0 | 1,956,107,269,263,925,200 | 33.953767 | 79 | 0.529662 | false | 3.51524 | false | false | false |
pepsipepsi/nodebox_opengl_python3 | examples/09-layer/01-drag.py | 1 | 3947 | import os, sys
sys.path.insert(0, os.path.join("..",".."))
from nodebox.graphics.context import *
from nodebox.graphics import *
# In the previous examples, drawing occurs directly to the canvas.
# It is also possible to draw into different layers,
# and then transform / animate the layers individually.
# The Layer ... | bsd-3-clause | 297,551,862,422,727,740 | 41.913043 | 96 | 0.695212 | false | 3.278239 | false | false | false |
uranusjr/django-buysafe | buysafe/views.py | 1 | 4538 | # -*- coding: utf8
from django.http import HttpResponseBadRequest, HttpResponse
from django.views.decorators.csrf import csrf_exempt
from django.views.decorators.http import require_POST
from django.shortcuts import render
from buysafe.models import PaymentMethod
from buysafe.forms import SunTechReceiveForm, BuySafeSe... | bsd-3-clause | 1,343,312,534,143,397,400 | 32.614815 | 77 | 0.667254 | false | 3.778518 | false | false | false |
rndusr/stig | tests/client_test/aiotransmission_test/api_freespace_test.py | 1 | 1115 | from types import SimpleNamespace
import asynctest
from asynctest import CoroutineMock, Mock, call
from stig.client.aiotransmission.api_freespace import FreeSpaceAPI
class TestFreeSpaceAPI(asynctest.ClockedTestCase):
async def setUp(self):
self.rpc = SimpleNamespace(free_space=CoroutineMock())
s... | gpl-3.0 | 8,247,601,294,170,028,000 | 45.458333 | 96 | 0.698655 | false | 3.506289 | true | false | false |
lavotap/pylib | pylib/vector.py | 1 | 6075 | #!/usr/bin/env python
#-*-coding:utf-8-*-
import math
from number import Number
class Vector(object):
# 验证是否为向量
@classmethod
def is_vector(cls,vector):
if hasattr(vector,'get_value'):
return True
else:
return False
def __init__(self,x=0,y=0,z=0):
if has... | gpl-2.0 | 1,054,030,773,827,123,800 | 27.533654 | 112 | 0.505307 | false | 3.33802 | false | false | false |
allenlavoie/tensorflow | tensorflow/contrib/optimizer_v2/checkpointable_utils_test.py | 1 | 32824 | # 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 | -1,022,322,882,351,399,800 | 43.902873 | 82 | 0.668962 | false | 3.870755 | true | false | false |
tosh1ki/pyogi | pyogi/warscrawler.py | 1 | 9953 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import re
import yaml
import sys
import time
import sqlite3
import requests
import datetime as dt
import pandas as pd
gtype_dict = {'10m': '', '3m': 'sb', '10s': 's1'}
WCSA_PATTERN = re.compile(r'(?<=receiveMove\(\").+?(?=\"\);)')
GAME_HEADER_PATTERN = re.com... | mit | -3,913,733,935,031,709,000 | 26.858934 | 78 | 0.488241 | false | 2.736988 | false | false | false |
mcolyer/nearby | plugins/chat-0.1/main.py | 1 | 3343 | #!/usr/bin/env python
"""
Nearby - A general message passing framework.
Copyright (C) 2005 Matthew Colyer <linuxcoder@colyer.org>
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of t... | gpl-2.0 | 4,740,466,048,686,461,000 | 31.77451 | 99 | 0.685313 | false | 3.81621 | false | false | false |
RobotnikAutomation/robotnik_trajectory_control | src/robotnik_trajectory_control/interfaces/device_command_interface.py | 1 | 5944 | #!/usr/bin/env python
import rospy
from threading import Thread
from sensor_msgs.msg import JointState
from rospy.exceptions import ROSException
from robotnik_msgs.msg import State
from std_srvs.srv import Empty
import time
#
# STANDARD INTERFACE
#
class DeviceCommandInterface():
'''
Class intended to communicat... | bsd-3-clause | -7,979,857,014,212,805,000 | 25.774775 | 142 | 0.666386 | false | 3.087792 | false | false | false |
PixelStereo/viscam | src/viscam.py | 1 | 3820 | #! /usr/bin/python
# -*- coding: utf-8 -*-
import os
import sys
from time import sleep
from PySide2.QtGui import QStandardItemModel, QStandardItem
from PySide2.QtCore import Slot, QDir, QAbstractListModel, Qt, QFile
from PySide2.QtWidgets import QWidget, QApplication, QHBoxLayout, QDialog, QListView, QListWidget, QPu... | lgpl-3.0 | 7,299,021,264,485,589,000 | 36.087379 | 119 | 0.604188 | false | 3.520737 | false | false | false |
chatzipap/CIE2016 | traffic_lights_04_Light controled by time & day.py | 1 | 1526 | '''
Σηματοδότης ρυθμιζόμενος ανά ώρα και ημέρα
'''
from gpiozero import LED
from time import sleep
from datetime import datetime
# Αντιστοίχιση στοιχείων και ακίδων GPIO
red = LED(27)
orange = LED(19)
green=LED(5)
buzzer = LED(10)
# Αρχικοποίηση καταστάσεων στοιχείων
red.off()
orange.off()
green.off()
sleep(1)
# Συν... | mit | 8,030,386,594,343,667,000 | 20.535714 | 86 | 0.616086 | false | 1.713068 | false | false | false |
anthonylife/ReviewBasedRatingPrediction | script/cntBasicStatics.py | 1 | 3154 | #!/usr/bin/env python
#encoding=utf8
#Copyright [2014] [Wei Zhang]
#Licensed under the Apache License, Version 2.0 (the "License");
#you may not use this file except in compliance with the License.
#You may obtain a copy of the License at
#http://www.apache.org/licenses/LICENSE-2.0
#Unless required by applicable law ... | apache-2.0 | 6,009,492,705,088,222,000 | 37 | 88 | 0.600507 | false | 3.38412 | false | false | false |
QualiSystems/Azure-Shell | package/cloudshell/cp/azure/domain/vm_management/operations/refresh_ip_operation.py | 1 | 4048 | class RefreshIPOperation(object):
def __init__(self, vm_service, resource_id_parser):
"""
:param vm_service: cloudshell.cp.azure.domain.services.virtual_machine_service.VirtualMachineService
:param resource_id_parser: cloudshell.cp.azure.common.parsers.azure_model_parser.AzureModelsParser
... | apache-2.0 | 3,281,980,548,673,135,000 | 56.014085 | 133 | 0.673666 | false | 3.826087 | false | false | false |
ipselium/cpyvke | cpyvke/cpyvke.py | 1 | 5093 | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright © 2016-2018 Cyril Desjouy <ipselium@free.fr>
#
# This file is part of cpyvke
#
# cpyvke 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 vers... | gpl-3.0 | 5,880,846,585,467,750,000 | 26.978022 | 91 | 0.629222 | false | 3.565826 | false | false | false |
johnmgregoire/JCAPRamanDataProcess | PlateAlignViaEdge_v1.py | 1 | 12112 | import sys,os, pickle, numpy, pylab, operator
import cv2
from shutil import copy as copyfile
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import matplotlib.pyplot as plt
from DataParseApp import dataparseDialog
from sklearn.decomposition import NMF
projectpath=os.path.split(os.path.abspath(__file__))[0]
sys.pa... | bsd-3-clause | 5,611,586,650,156,254,000 | 39.10596 | 363 | 0.693692 | false | 2.714478 | false | false | false |
PaloAltoNetworks-BD/SplunkforPaloAltoNetworks | Splunk_TA_paloalto/bin/lib/pandevice/docs/configtree.py | 2 | 5431 | #!/usr/bin/env python
# Copyright (c) 2016, Palo Alto Networks
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" A... | isc | -6,384,867,889,624,848,000 | 32.732919 | 101 | 0.579635 | false | 3.816585 | false | false | false |
pashadude/TensorflowReinforcementLearning | hw1/imitation_learning.py | 1 | 2947 | import gym
import matplotlib.pyplot as plt
import pandas as pd
import numpy as np
import pickle
import tensorflow as tf
import tf_util
import argparse
import tqdm
def main():
parser = argparse.ArgumentParser()
parser.add_argument('env', type=str)
args = parser.parse_args()
inputs, outputs, evaluations... | mit | 6,587,941,237,247,342,000 | 33.267442 | 100 | 0.587377 | false | 3.83225 | false | false | false |
screwgoth/JugheadBot | hotels/zomat.py | 1 | 6039 | import os
import logging
import requests
import json
class Zomat(object):
"""
Fetch data using the Zomato API
"""
def __init__(self):
logging.basicConfig(level=logging.INFO)
self.logger = logging.getLogger("Zomat")
self.userKey = os.environ.get("USER_KEY")
self.headers... | mit | -1,231,327,285,772,152,800 | 46.179688 | 206 | 0.580229 | false | 3.355 | false | false | false |
mimischi/django-clock | clock/contact/forms.py | 1 | 1685 | # -*- coding: utf-8 -*-
from captcha.fields import ReCaptchaField
from crispy_forms.bootstrap import FormActions
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
from django import forms
from django.conf import settings
from django.core.mail import send_mail
from django.http import Http... | mit | 1,497,578,063,128,168,000 | 35.630435 | 85 | 0.667656 | false | 3.936916 | false | false | false |
xxd3vin/spp-sdk | tools/script/python/check_png_alpha.py | 1 | 2741 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#*************************************************************************
#
# This file is part of the UGE(Uniform Game Engine).
# Copyright (C) by SanPolo Co.Ltd.
# All rights reserved.
#
# See http://uge.spolo.org/ for more information.
#
# SanPolo Co.Ltd
# http://ug... | mit | 599,075,209,702,383,100 | 24.378947 | 82 | 0.605558 | false | 2.401394 | false | false | false |
nitely/Spirit | spirit/topic/moderate/views.py | 1 | 3059 | # -*- coding: utf-8 -*-
from django.utils import timezone
from django.shortcuts import render, redirect, get_object_or_404
from django.contrib import messages
from django.utils.translation import gettext as _
from spirit.core.utils.views import is_post
from spirit.core.utils.decorators import moderator_required
from ... | mit | 8,956,407,924,800,457,000 | 24.491667 | 76 | 0.592677 | false | 3.842965 | false | false | false |
theiviaxx/python-perforce | perforce/models.py | 1 | 35586 | # -*- coding: utf-8 -*-
"""
perforce.models
~~~~~~~~~~~~~~~
This module implements the main data models used by perforce
:copyright: (c) 2015 by Brett Dixon
:license: MIT, see LICENSE for more details
"""
import subprocess
import datetime
import traceback
import os
import marshal
import logging
import re
from colle... | mit | -9,058,517,573,385,367,000 | 28.361386 | 154 | 0.563199 | false | 4.241478 | false | false | false |
Kostanos/domg | app.py | 1 | 9634 | #!/usr/bin/env python
# coding=utf-8
"""
The manager
"""
import json
import os
import re
from time import strptime, mktime
import bottle
from datetime import datetime
from docker import Client
from docker.errors import APIError
from hostmanager import HOSTS_PATH
from lib import FlashMsgPlugin, Hosts, group_container... | mit | -496,082,090,395,185,600 | 37.38247 | 115 | 0.618642 | false | 3.691188 | false | false | false |
johnnoone/json-spec | src/jsonspec/validators/draft04.py | 1 | 26115 | """
jsonspec.validators.draft04
~~~~~~~~~~~~~~~~~~~~~~~~~~~
Implements JSON Schema draft04.
"""
from __future__ import absolute_import
import logging
import re
from copy import deepcopy
from decimal import Decimal
from six import integer_types, string_types
from six.moves.urllib.parse import urljoin
from... | bsd-3-clause | -2,568,410,251,468,870,000 | 37.348018 | 115 | 0.562474 | false | 4.425521 | false | false | false |
cklb/PyMoskito | pymoskito/metaprocessing/eval_L1NormITAE_poles_linePlot.py | 1 | 3126 | # -*- coding: utf-8 -*-
from tools import getSubValue
# mpl.rcParams['text.usetex']=True
# mpl.rcParams['text.latex.unicode']=True
from matplotlib.backends.backend_qt5agg import FigureCanvasQTAgg as FigureCanvas
from matplotlib.figure import Figure
from processing_gui import MetaProcessingModule
from tools import sor... | bsd-3-clause | 3,792,409,148,593,499,000 | 39.597403 | 117 | 0.564939 | false | 3.854501 | false | false | false |
googleads/google-ads-python | google/ads/googleads/v6/enums/types/search_term_match_type.py | 1 | 1277 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 | 571,851,014,140,160,960 | 26.76087 | 74 | 0.676586 | false | 3.881459 | false | false | false |
github-borat/cinder | cinder/api/contrib/services.py | 1 | 7120 | # Copyright 2012 IBM Corp.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | apache-2.0 | 4,511,568,825,888,255,000 | 34.247525 | 79 | 0.597051 | false | 4.338818 | false | false | false |
EUDAT-B2STAGE/http-api-base | old_stuff/rapydo/services/celery/worker.py | 1 | 1165 | # -*- coding: utf-8 -*-
"""
Celery pattern. Some interesting read here:
http://blog.miguelgrinberg.com/post/celery-and-the-flask-application-factory-pattern
Of course that discussion is not enough for
a flask templating framework like ours.
So we made some improvement along the code.
"""
from rapydo.server import ... | mit | 2,851,370,823,037,356,000 | 28.125 | 84 | 0.693562 | false | 3.57362 | false | false | false |
jakobzhao/ashcrawler | core/wechat.py | 1 | 5809 | # !/usr/bin/python
# -*- coding: utf-8 -*-
#
# Created on April 12, 2016
# @author: Bo Zhao
# @email: bo_zhao@hks.harvard.edu
# @website: http://yenching.org
# @organization: Harvard Kennedy School
import time
import platform
from pymongo import MongoClient, errors
from selenium import webdriver
from... | lgpl-3.0 | 1,400,240,208,662,310,000 | 34.048485 | 157 | 0.616635 | false | 3.550031 | false | false | false |
mhri/mhri | motion_renderer/src/fake_renderer.py | 1 | 5896 | #!/usr/bin/env python
#-*- encoding: utf8 -*-
import json
import rospy
import actionlib
import random
import re
from mhri_msgs.msg import RenderItemAction, RenderItemResult, RenderItemFeedback
from mhri_msgs.srv import GetInstalledGestures, GetInstalledGesturesResponse
class FakeMotionRender:
def __init__(self)... | apache-2.0 | -2,385,697,753,688,501,000 | 40.230769 | 127 | 0.501696 | false | 4.030075 | false | false | false |
google/tf-quant-finance | tf_quant_finance/experimental/local_volatility/local_volatility_model.py | 1 | 18620 | # Lint as: python3
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agr... | apache-2.0 | 8,897,452,932,536,462,000 | 41.804598 | 99 | 0.65247 | false | 3.750252 | false | false | false |
jgroszko/django-albums | albums/models.py | 1 | 8578 | import os.path
import datetime
from django.conf import settings
from django.db import models
from django.db.models import signals
from djangoratings.fields import RatingField
from appearances.models import Appearance
from favorites.models import Favorite
from django.contrib.auth.models import User
from django.contrib.c... | gpl-3.0 | 8,582,124,832,705,695,000 | 31.24812 | 134 | 0.619025 | false | 3.870939 | false | false | false |
googleads/google-ads-python | google/ads/googleads/v8/services/types/customer_user_access_invitation_service.py | 1 | 3729 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -2,776,112,629,645,454,000 | 30.601695 | 97 | 0.698847 | false | 4.306005 | false | false | false |
google-research/google-research | cold_posterior_flax/cifar10/models/conv_layers.py | 1 | 17044 | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | apache-2.0 | -6,611,590,661,728,791,000 | 36.624724 | 83 | 0.648791 | false | 3.953607 | false | false | false |
iandees/all-the-places | locations/spiders/whitecastle.py | 1 | 3336 | # -*- coding: utf-8 -*-
import scrapy
import json
import re
from locations.items import GeojsonPointItem
class WhiteCastleSpider(scrapy.Spider):
name = "whitecastle"
allowed_domains = ["www.whitecastle.com"]
timeregex = re.compile('^([0-9:]+)(AM|PM)$')
start_urls = (
'https://www.whitecastle.c... | mit | -8,006,970,155,435,999,000 | 33.391753 | 235 | 0.4994 | false | 3.657895 | false | false | false |
alicexpp/stock_algorithm_merge | driver.py | 1 | 11179 | #coding=utf-8
from __future__ import with_statement
import sys
from pyke import knowledge_engine
from pyke import krb_compiler
from pyke import krb_traceback
from pyke import goal
import ibm_db
import ibm_db_dbi
import datetime
import time
import recommend_area
import BaseClass
import random
import area_coordinate_tra... | gpl-3.0 | -3,430,614,603,294,191,000 | 41.311203 | 158 | 0.620967 | false | 2.698333 | true | false | false |
sammyshj/stem | test/integ/version.py | 1 | 2009 | """
Tests that the stem.version functions can handle the tor instance we're
running with.
"""
import unittest
import stem.prereq
import stem.version
import test.runner
from test.runner import require_controller
class TestVersion(unittest.TestCase):
def test_get_system_tor_version(self):
"""
Basic verific... | lgpl-3.0 | 171,768,461,828,418,270 | 29.439394 | 86 | 0.699353 | false | 3.699816 | true | false | false |
anomen-s/programming-challenges | rmo/programming/captcha/solve.py | 1 | 2050 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# break simple CAPTCHA
import re
import base64
import urllib.request, urllib.error, urllib.parse
import os.path
import http.cookiejar
import subprocess
from PIL import Image
from PIL import ImageDraw
URL1 = 'http://challenge01.root-me.org/programmation/ch8/'
def main():
... | gpl-2.0 | 2,905,215,987,433,998,000 | 19.5 | 78 | 0.634634 | false | 3.22327 | false | false | false |
dims/neutron | neutron/services/qos/qos_plugin.py | 1 | 7479 | # Copyright (c) 2015 Red Hat Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | apache-2.0 | -729,154,042,581,872,900 | 45.166667 | 78 | 0.64407 | false | 4.125207 | false | false | false |
Yelp/synapse-tools | src/synapse_tools/haproxy/qdisc_tool.py | 1 | 4938 | # -*- coding: utf-8 -*-
""" Command line interface for working with qdiscs """
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import logging
import os
import subprocess
import sys
import argparse
from synapse_tools.haproxy.qdisc_util import check_setup
fr... | apache-2.0 | -6,004,412,169,259,848,000 | 26.281768 | 73 | 0.654516 | false | 3.60438 | false | false | false |
hreeder/r2bot-eve-plugins | Reddit.py | 1 | 2752 | import praw
from collections import deque
from requests.exceptions import HTTPError
from errbot import BotPlugin, botcmd
class Reddit(BotPlugin):
def activate(self):
super(Reddit, self).activate()
self.reddit = praw.Reddit(user_agent='example')
if not self.config:
self.config... | mit | -6,187,730,865,565,259,000 | 31.761905 | 125 | 0.574855 | false | 3.94835 | false | false | false |
gsnbng/erpnext | erpnext/hr/doctype/leave_application/test_leave_application.py | 1 | 19635 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
import unittest
from erpnext.hr.doctype.leave_application.leave_application import LeaveDayBlockedError, OverlapError, NotAnOptionalHolid... | agpl-3.0 | -2,843,470,968,118,408,000 | 30.317384 | 145 | 0.695493 | false | 3.103367 | true | false | false |
mardiros/creds | creds/views/user.py | 1 | 3471 | import asyncio
import logging
import colander
from pyramid.httpexceptions import HTTPNoContent, HTTPNotFound, HTTPBadRequest
from pyramid_aiorest import resource_config, ioschema
from aiorm import orm
from ..models import User, UserGroup, Group
log = logging.getLogger(__name__)
class PostUserParams(colander.Mappi... | bsd-3-clause | -6,032,499,691,041,492,000 | 38 | 79 | 0.624604 | false | 4.404822 | false | false | false |
klausman/lib_users | fd_users.py | 1 | 4464 | #!/usr/bin/python -tt
"""
Libusers - a script that finds users of files that have been deleted/replaced
"""
# Released under the GPL-2
# -*- coding: utf8 -*-
import argparse
import sys
import glob
import fnmatch
import os
from collections import defaultdict
from lib_users_util import common
DELSUFFIX = " (deleted)"
P... | gpl-2.0 | -1,691,117,874,858,462,500 | 32.818182 | 77 | 0.578629 | false | 4.247383 | false | false | false |
dreamlayers/st220x | libst2205/st2205.py | 1 | 2242 | from ctypes import *
from PIL import Image
# Handle definition for the st2205_* routines
class st2205_handle(Structure):
_fields_ = [("fd", c_int),
("width", c_uint),
("height", c_uint),
("bpp", c_int),
("proto", c_int),
("buff", POINT... | gpl-3.0 | 3,926,800,652,122,235,400 | 31.970588 | 79 | 0.501338 | false | 3.297059 | false | false | false |
eroicaleo/LearningPython | mitx6001/Pset4/ProblemSet4/ps4b/ps4b.py | 1 | 5917 | #!/usr/bin/env python
from ps4a import *
import time
#
#
# Problem #6: Computer chooses a word
#
#
def compChooseWord(hand, wordList, n):
"""
Given a hand and a wordList, find the word that gives
the maximum value score, and return it.
This word should be calculated by considering all the words
... | mit | 5,405,827,712,816,336,000 | 31.690608 | 169 | 0.584249 | false | 3.747308 | false | false | false |
ryfeus/lambda-packs | pytorch/source/torch/backends/cudnn/rnn.py | 1 | 1683 | import torch.cuda
import torch.backends.cudnn as cudnn
def get_cudnn_mode(mode):
if mode == 'RNN_RELU':
return cudnn.CUDNN_RNN_RELU
elif mode == 'RNN_TANH':
return cudnn.CUDNN_RNN_TANH
elif mode == 'LSTM':
return cudnn.CUDNN_LSTM
elif mode == 'GRU':
return cudnn.CUDNN_G... | mit | 2,364,469,853,383,140,400 | 31.365385 | 100 | 0.621509 | false | 3.756696 | false | false | false |
ProjectQ-Framework/ProjectQ | projectq/setups/decompositions/crz2cxandrz.py | 1 | 1546 | # -*- coding: utf-8 -*-
# Copyright 2017 ProjectQ-Framework (www.projectq.ch)
#
# 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 | 1,042,759,315,601,558,500 | 33.355556 | 89 | 0.707633 | false | 3.36087 | false | false | false |
igor-rangel7l/igorrangelteste.repository | script.module.urlresolver/lib/urlresolver/plugins/nowvideo.py | 1 | 2485 | """
urlresolver XBMC Addon
Copyright (C) 2011 t0mm0
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
... | gpl-2.0 | 7,151,518,445,339,459,000 | 33.513889 | 105 | 0.624547 | false | 3.63836 | false | false | false |
lukaskubis/forepycast | test/__init__.py | 1 | 1819 | import os
import pickle
import unittest
import darksky
import requests
class TestPickle(unittest.TestCase):
""" Forecast pickling """
@classmethod
def setUpClass(cls):
def mock_request_get(*args, **kwargs):
response = type('Response', (object,), {})
response.headers = {}
... | mit | 4,226,306,309,789,645,300 | 28.819672 | 79 | 0.615723 | false | 4.269953 | true | false | false |
pculture/unisubs | task_settings.py | 1 | 1696 | # Amara, universalsubtitles.org
#
# Copyright (C) 2014 Participatory Culture Foundation
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your ... | agpl-3.0 | 4,040,941,370,891,340,300 | 29.836364 | 74 | 0.648585 | false | 3.555556 | false | false | false |
Debatrix/cycas | ui.py | 1 | 6547 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'untitled.ui'
#
# Created by: PyQt5 UI code generator 5.6
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
from PyQt5.QtCore import *
import sys
class Ui_MainWindow(object):
def setupUi(... | apache-2.0 | 5,716,910,754,664,739,000 | 48.434109 | 92 | 0.671005 | false | 3.456369 | false | false | false |
avanzosc/avanzosc6.1 | avanzosc_invoice_duplicate/invoice.py | 1 | 1506 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Avanzosc - Avanced Open Source Consulting
# Copyright (C) 2011 - 2012 Avanzosc <http://www.avanzosc.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... | agpl-3.0 | -959,162,032,762,465,700 | 40.861111 | 83 | 0.608898 | false | 4.137363 | false | false | false |
mozilla/django-tidings | tidings/utils.py | 1 | 4656 | from zlib import crc32
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.mail import EmailMessage
from django.template import Context, loader
from django.urls import reverse as django_reverse
from django.utils.module_loading import import_string
from .compat imp... | bsd-3-clause | 8,167,331,132,899,926,000 | 34.541985 | 79 | 0.664519 | false | 4.18705 | false | false | false |
aureooms/checkio | home/04-count-neighbours.py | 1 | 1235 | def count_neighbours( grid , row , col ) :
left = max( 0 , row - 1 )
right = min( row + 2 , len( grid ) )
top = max( 0 , col - 1 )
bottom = min( col + 2 , len( grid[0] ) )
return sum( grid[i][j] for i in range( left , right ) for j in range( top , bottom ) if i != row or j != col )
if __... | agpl-3.0 | 2,556,771,150,453,167,000 | 43.107143 | 114 | 0.351417 | false | 3.319892 | false | false | false |
ttfseiko/openerp-trunk | openerp/addons/account/report/report_vat.py | 1 | 11569 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -3,585,930,821,350,867,000 | 41.690037 | 139 | 0.522604 | false | 3.96063 | false | false | false |
prometheanfire/portage | pym/portage/versions.py | 1 | 16223 | # versions.py -- core Portage functionality
# Copyright 1998-2014 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from __future__ import unicode_literals
__all__ = [
'best', 'catpkgsplit', 'catsplit',
'cpv_getkey', 'cpv_getversion', 'cpv_sort_key', 'pkgcmp', 'pkgsplit',
'verve... | gpl-2.0 | -8,129,053,868,656,408,000 | 27.815275 | 152 | 0.636812 | false | 2.651684 | true | false | false |
ddico/odoo | addons/base_address_city/models/res_partner.py | 3 | 3521 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from lxml import etree
from odoo import api, models, fields
from odoo.tools.translate import _
class Partner(models.Model):
_inherit = 'res.partner'
country_enforce_cities = fields.Boolean(related='country_id... | agpl-3.0 | 1,858,012,566,167,103,000 | 39.471264 | 138 | 0.510934 | false | 4.314951 | false | false | false |
Neurosim-lab/netpyne | doc/build.py | 1 | 4489 | """
This is a script to build the NetPyNE html documentation
All steps should be executed from netpyne/doc
The following are required:
1) Sphinx documentation generator: https://www.sphinx-doc.org/en/master/
2) Sphinx RTD Theme
3) Autodoc summary table: https://autodocsumm.readthedocs.io/en/latest/index.html
4) Wheel... | mit | 3,677,396,400,044,773,400 | 41.638095 | 151 | 0.722359 | false | 3.351048 | true | false | false |
h-mayorquin/g_node_data_analysis_205 | 4_day/parameter_search.py | 1 | 1085 | import numpy as np
from load_data import X, Y, Xtest
from sklearn.linear_model import LogisticRegression
from sklearn.grid_search import GridSearchCV
from scipy.io import savemat
from sklearn.cross_validation import StratifiedKFold
def return_best_model(X, Y, N, C, penalties):
"""
Returns the best model for X... | bsd-2-clause | 7,063,958,237,785,864,000 | 22.586957 | 71 | 0.685714 | false | 2.980769 | false | false | false |
onexeno/plow | lib/python/plow/gui/panels/nodes.py | 1 | 8167 | import os
import logging
from datetime import datetime
from functools import partial
import plow.client
from plow.gui import constants
from plow.gui.manifest import QtCore, QtGui
from plow.gui.panels import Panel
from plow.gui.event import EventManager
from plow.gui.common import models
from plow.gui.common.widgets... | apache-2.0 | -7,333,923,241,697,357,000 | 29.588015 | 98 | 0.566548 | false | 3.993643 | false | false | false |
Azure/azure-sdk-for-python | sdk/storagepool/azure-mgmt-storagepool/azure/mgmt/storagepool/operations/_operations.py | 1 | 4855 | # 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 | 8,943,583,677,242,620,000 | 43.136364 | 133 | 0.644284 | false | 4.659309 | false | false | false |
CARocha/estudiocafe | estudiocafe/settings.py | 1 | 4877 | # Django settings for estudiocafe project.
from local_settings import *
SITE_ID = 1
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
# If you set this to False, Django will not format dates, numbers and
# calendars according to th... | mit | 4,594,011,873,983,549,000 | 33.104895 | 88 | 0.697765 | false | 3.612593 | false | false | false |
spuddybuddy/dotfiles | bin/chrome.py | 1 | 1414 | #!/usr/bin/python3
import getopt
import os
import sys
import chrome_common
# Where the Chrome binary lives
CHROME_PATHS = {
"stable": "/opt/google/chrome",
"beta": "/opt/google/chrome-beta",
"dev": "/opt/google/chrome-unstable"
}
# Where Chrome profile data lives, relative to $HOME
CHROME_USER_DIR... | gpl-3.0 | 6,546,616,115,252,384,000 | 24.25 | 72 | 0.582744 | false | 3.5 | false | false | false |
freaxmind/miage-m1 | csi/FreeMAP/utilisateurs/views.py | 1 | 1863 | # -*- coding: utf-8 -*-
from django.shortcuts import render_to_response, redirect
from django.template.context import RequestContext
def index(request):
from gestion.models import Constitution, TypeProduit
from datetime import datetime
week_number = datetime.today().isocalendar()[1]
constitutions = Co... | gpl-3.0 | 8,481,809,654,422,840,000 | 33.5 | 71 | 0.640365 | false | 3.548571 | false | false | false |
blechta/fenapack | fenapack/_field_split_utils.py | 1 | 2709 | # Copyright (C) 2015-2017 Jan Blechta
#
# This file is part of FENaPack.
#
# FENaPack is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later ver... | lgpl-3.0 | 1,074,199,007,870,595,700 | 29.1 | 80 | 0.688077 | false | 2.99337 | false | false | false |
andarms/pyweek24 | src/bootstrap.py | 1 | 1850 | import os
import pygame as pg
SCREEN_SIZE = (1024, 640)
ORIGINAL_CAPTION = "Game"
# init pygame and create the window
pg.init()
pg.font.init()
os.environ['SDL_VIDEO_CENTERED'] = "TRUE"
pg.display.set_caption(ORIGINAL_CAPTION)
SCREEN = pg.display.set_mode(SCREEN_SIZE)
SCREEN_RECT = SCREEN.get_rect()
# load all the a... | mit | -2,816,071,308,563,415,600 | 30.372881 | 75 | 0.634595 | false | 3.564547 | false | false | false |
nyu-devops/lab-flask-tdd | tests/factories.py | 1 | 1157 | # Copyright 2016, 2019 John J. Rofrano. 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | apache-2.0 | 4,718,903,675,179,706,000 | 34.060606 | 78 | 0.731201 | false | 3.869565 | false | false | false |
z411/weabot | markdown.py | 1 | 83700 | #!/usr/bin/env python
# Copyright (c) 2007-2008 ActiveState Corp.
# License: MIT (http://www.opensource.org/licenses/mit-license.php)
r"""A fast and complete Python implementation of Markdown.
[from http://daringfireball.net/projects/markdown/]
> Markdown is a text-to-HTML filter; it translates an easy-to-read... | agpl-3.0 | -4,520,632,514,260,235,000 | 38.949119 | 121 | 0.482796 | false | 3.990655 | false | false | false |
jamesabel/osnap | launchers/launch.py | 1 | 6079 |
# This file exists under 2 names. The 'real' one is launch.py.
# launch.pyw is a hard link to launch.py
# (launch.pyw - a .pyw since we're launching without a console window)
import appdirs
import glob
import logging
import logging.config
import os
import platform
import sys
import subprocess
# Just for the launche... | mit | 6,852,532,226,349,078,000 | 35.184524 | 120 | 0.566376 | false | 3.743227 | false | false | false |
schnapptack/gskompetenzen | features/gsaudit/migrations/0001_initial.py | 1 | 24302 | # 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 'School'
db.create_table('gsaudit_school', (
('id', self.gf('django.db.models.f... | agpl-3.0 | -7,491,058,684,858,263,000 | 63.291005 | 182 | 0.571393 | false | 3.688828 | false | false | false |
cwells/franz | lib/prompt_repl.py | 1 | 2968 | import os
import time
from pprint import pprint
from pathlib import Path
from prompt_toolkit import prompt, AbortAction
from prompt_toolkit.contrib.completers import WordCompleter
from prompt_toolkit.history import FileHistory
from prompt_toolkit.auto_suggest import AutoSuggestFromHistory
from prompt_toolkit.styles im... | mit | 8,384,828,813,928,798,000 | 33.114943 | 120 | 0.622305 | false | 4.027137 | false | false | false |
NonWhite/IA_EP2 | code/utils.py | 1 | 1261 | # -*- coding: utf-8 -*-
import json
URL_HOME = 'http://bulbapedia.bulbagarden.net'
URL_LIST = '/wiki/List_of_Pokémon_by_Kanto_Pokédex_number'
HIDDEN_STYLE = [ 'display:none;' , 'display: none;' ]
SLEEP_TIME = 15 # seconds
MAX_CHUNK = 10
DATA_DIR = '../data/'
DESC_FILE = '%sdata.json' % DATA_DIR
RULES_FILE = '%sgene... | gpl-2.0 | -2,954,058,766,783,967,000 | 25.787234 | 105 | 0.602065 | false | 2.502982 | false | false | false |
google-research/google-research | model_pruning/python/strip_pruning_vars.py | 1 | 3973 | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | apache-2.0 | 6,870,038,317,081,666,000 | 33.25 | 80 | 0.700982 | false | 3.831244 | false | false | false |
somic/paasta | paasta_tools/monitoring/check_capacity.py | 1 | 5804 | #!/usr/bin/env python
# Copyright 2015-2016 Yelp Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | apache-2.0 | -2,668,023,415,934,533,000 | 32.549133 | 102 | 0.614232 | false | 3.744516 | false | false | false |
sunithamisra/dimac | dimac/old/imgaccess.py | 1 | 1674 | #!/usr/bin/python
# coding=UTF-8
#
# DIMAC (Disk Image Access for the Web)
# Copyright (C) 2014
# All rights reserved.
#
# This code is distributed under the terms of the GNU General Public
# License, Version 3. See the text file "COPYING" for further details
# about the terms of this license.
#
# This is the main disk... | gpl-3.0 | -5,312,183,724,516,702,000 | 29.436364 | 111 | 0.633214 | false | 3.321429 | false | false | false |
NewpTone/hotzenplotz | hotzenplotz/openstack/common/exception.py | 1 | 3305 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 OpenStack LLC.
# 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/... | apache-2.0 | 748,899,593,439,119,600 | 23.124088 | 78 | 0.649622 | false | 4.090347 | false | false | false |
CPekko/memorizer | main.py | 1 | 2026 | #!/usr/bin/env python3
from flask import Flask
from flask.ext.assets import Environment, Bundle
from logging.handlers import SMTPHandler
from models import db
from werkzeug.contrib.fixers import ProxyFix
from views.admin import admin
from views.api import api
from views.quiz import quiz
import logging
app = Flask(__na... | gpl-3.0 | 7,748,160,861,605,990,000 | 28.794118 | 127 | 0.621422 | false | 3.337727 | false | false | false |
atomman/nmrglue | nmrglue/analysis/analysisbase.py | 4 | 10487 | """
analysisbase provides general purpose analysis functions and classes used by
several nmrglue.analysis modules
"""
import numpy as np
pi = np.pi
# helper functions
def neighbors(pt, shape, structure):
"""
Generate a list of all neighbors to a point.
Parameters
----------
pt : tuple of ints
... | bsd-3-clause | 5,625,475,794,048,658,000 | 26.098191 | 78 | 0.574425 | false | 3.74402 | false | false | false |
fastinetserver/portage-idfetch | pym/_emerge/PackageUninstall.py | 1 | 1544 | # Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import codecs
import logging
import portage
from portage import os
from portage import _encodings
from portage import _unicode_encode
from _emerge.AsynchronousTask import AsynchronousTask
from _emerge.unmerge imp... | gpl-2.0 | 9,214,868,639,829,030,000 | 26.571429 | 66 | 0.716969 | false | 3.138211 | false | false | false |
alex/remoteobjects | tests/utils.py | 1 | 3271 | # Copyright (c) 2009 Six Apart Ltd.
# 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... | bsd-3-clause | -8,400,358,860,056,375,000 | 34.172043 | 111 | 0.660654 | false | 4.438263 | false | false | false |
tobecontinued/onedrive-e | onedrivee/workers/tasks/down_task.py | 1 | 2530 | import os
import traceback
from onedrivee.common.utils import OS_USER_ID, OS_USER_GID
from onedrivee.drives import errors
from onedrivee.common import hasher
from onedrivee.common.dateparser import datetime_to_timestamp
from onedrivee.workers.tasks.task_base import TaskBase
from onedrivee.store.items_db import ItemRec... | gpl-3.0 | 7,274,206,629,668,221,000 | 47.653846 | 125 | 0.636759 | false | 3.538462 | false | false | false |
dchirikov/luna | luna/utils/ip.py | 1 | 5972 | '''
Written by Dmitry Chirikov <dmitry@chirikov.ru>
This file is part of Luna, cluster provisioning tool
https://github.com/dchirikov/luna
This file is part of Luna.
Luna 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 Foun... | gpl-3.0 | 5,930,492,766,799,348,000 | 24.305085 | 72 | 0.586236 | false | 3.470076 | false | false | false |
HaraldWeber/client | src/fa/__init__.py | 1 | 1570 | #-------------------------------------------------------------------------------
# Copyright (c) 2012 Gael Honorez.
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the GNU Public License v3.0
# which accompanies this distribution, and is available at
# http://w... | gpl-3.0 | 607,499,954,161,489,500 | 32.425532 | 156 | 0.705732 | false | 4.361111 | false | false | false |
olitheolix/ogre_v21_example | python/setup.py | 1 | 3770 | # MIT License
#
# Copyright (c) 2016 Oliver Nagy
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, ... | mit | -1,013,155,397,636,995,500 | 30.949153 | 81 | 0.607427 | false | 3.931178 | false | false | false |
ppizarror/Ned-For-Spod | bin/external/pil/XVThumbImagePlugin.py | 1 | 1759 | #
# The Python Imaging Library.
# $Id$
#
# XV Thumbnail file handler by Charles E. "Gene" Cash
# (gcash@magicnet.net)
#
# see xvcolor.c and xvbrowse.c in the sources to John Bradley's XV,
# available from ftp://ftp.cis.upenn.edu/pub/xv/
#
# history:
# 98-08-15 cec created (b/w only)
# 98-12-09 cec added color palette... | gpl-2.0 | -8,625,809,419,998,483,000 | 23.09589 | 78 | 0.553724 | false | 3.269517 | false | false | false |
gopaycommunity/gopay-python-api | gopay/http.py | 1 | 1078 | import requests
class Browser:
def __init__(self, logger, timeout):
self.logger = logger
self.timeout = timeout
def browse(self, request):
try:
r = requests.request(request.method, request.url, headers=request.headers, data=request.body, timeout=self.timeout)
r... | mit | 8,063,709,450,911,829,000 | 24.069767 | 127 | 0.58256 | false | 3.905797 | false | false | false |
ssundarraj/music_genre_classifier | models/ingestor.py | 1 | 1159 | import csv
import numpy as np
from sklearn import preprocessing
from sklearn.svm import LinearSVC
from sklearn.feature_selection import SelectKBest
from sklearn.feature_selection import chi2
from sklearn.decomposition import PCA
def absHelper(data):
for i in range(len(data)):
for j in range(len(data[0])):... | mit | -3,011,801,378,734,631,000 | 25.340909 | 67 | 0.638481 | false | 3.555215 | false | false | false |
hasgeek/funnel | funnel/forms/auth_client.py | 1 | 6205 | from __future__ import annotations
from urllib.parse import urlparse
from baseframe import _, __
from coaster.utils import getbool
import baseframe.forms as forms
from ..models import (
AuthClient,
AuthClientCredential,
AuthClientTeamPermissions,
AuthClientUserPermissions,
valid_name,
)
__all__ ... | agpl-3.0 | -2,272,297,041,695,459,600 | 30.467005 | 99 | 0.596548 | false | 4.475812 | false | false | false |
rkk09c/Flask_Boilerplate | app/views.py | 1 | 2279 | #FLASK
from flask import abort, render_template, Response, flash, redirect, session, url_for, g, request, send_from_directory
#FLASK EXTENSIONS
from flask.ext.login import login_user, logout_user, current_user, login_required
from flask.ext.sqlalchemy import get_debug_queries
from flask.ext.mail import Mail
#LOCAL
from... | mit | 8,549,711,656,679,542,000 | 27.135802 | 154 | 0.726634 | false | 3.134801 | false | false | false |
ThePavolC/PivotGame | pivot.py | 1 | 8737 | from kivy.app import App
from kivy.uix.widget import Widget
from kivy.properties import NumericProperty, ReferenceListProperty, ObjectProperty, BooleanProperty, OptionProperty
from kivy.vector import Vector
from kivy.clock import Clock
from kivy.core.window import Window
from kivy.graphics import Color, Ellipse, Rectan... | gpl-2.0 | -7,291,038,411,737,012,000 | 33.128906 | 115 | 0.563008 | false | 3.783889 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.