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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
shoopio/shoop | shuup/gdpr/anonymizer.py | 2 | 5257 | # This file is part of Shuup.
#
# Copyright (c) 2012-2019, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import six
from django.utils.crypto import get_random_string
from shuup.core.models impor... | agpl-3.0 | 226,617,609,329,438,500 | 29.04 | 77 | 0.603957 | false | 3.837226 | false | false | false |
idmillington/layout | layout/managers/directional.py | 1 | 13338 | from layout import datatypes
from . import root
class VerticalLM(root.GroupLayoutManager):
"""
Keeps a set of elements above one another. We can control
how they are distributed vertically, as well as their horizontal
alignment.
"""
#: Align the elements so they are bunched at the top of the
... | mit | 8,867,902,011,834,166,000 | 34.007874 | 79 | 0.579847 | false | 4.076406 | false | false | false |
aristoteles-nunez/Item-Catalog | appForms.py | 1 | 1131 | from flask_wtf import Form
from wtforms import SubmitField, StringField, TextAreaField, IntegerField
from wtforms.validators import DataRequired, Length
from flask_wtf.file import FileAllowed, FileField
class ItemForm(Form):
"""It defines the fields to render in WTForms for each item
"""
name = StringFiel... | mit | 1,898,934,541,999,501,800 | 36.7 | 83 | 0.650752 | false | 4.560484 | false | false | false |
idlesign/django-etc | etc/sites.py | 1 | 1581 | from functools import partial
from os import environ
from typing import Optional
from django.conf import settings
from django.contrib.sites.shortcuts import get_current_site
from django.http import HttpRequest
class DomainGetter:
__slots__ = ['domain']
def __init__(self, domain: Optional[str]):
sel... | bsd-3-clause | -1,249,204,702,061,401,900 | 22.25 | 64 | 0.621758 | false | 4.022901 | false | false | false |
mitsuhiko/sentry | src/sentry/management/commands/collectstatic.py | 1 | 1485 | """
sentry.management.commands.collectstatic
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2015 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import os
from itertools import chain, izip
from operator import itemgett... | bsd-3-clause | 6,557,096,910,819,429,000 | 28.117647 | 95 | 0.63165 | false | 3.907895 | false | false | false |
ActiveState/code | recipes/Python/502221_Extracting_datchm_Microsoft_compiled/recipe-502221.py | 1 | 4876 | #!/usr/bin/env python
from chm.chm import CHMFile
from os.path import basename, exists, abspath
from HTMLParser import HTMLParser
from sys import argv, exit, stderr
import re
class LinksLocator(HTMLParser):
"""
LinksLocator is a class for retrieve name and path (Name and Local)
from TopicsTree in chm (com... | mit | -6,445,330,383,158,739,000 | 31.506667 | 79 | 0.534865 | false | 3.821317 | false | false | false |
koschr/ldaforyelpchallenge | ldayelpchallenge/LDAsetup.py | 1 | 4718 | """
This module holds the complete process that is necessary to execute Latent Dirichlet Allocation as implemented in the gensim package.
"""
import json
from gensim import corpora, models
import time
from nltk.tokenize import RegexpTokenizer
from stop_words import get_stop_words
import anticontract
import pickle
cla... | mit | 251,829,012,632,285,300 | 28.310559 | 133 | 0.70496 | false | 3.358007 | false | false | false |
hydna/hydna-python | hydna/push.py | 1 | 4880 | import httplib
import os
import socket
import ssl
import urllib
from hydna import core
from hydna import exceptions
def send(uri, data, origin=None, ua=core.DEFAULT_UA, priority=None):
"""Send `data` to `uri` and return `True` on successful request. Optional
arguments:
`origin` - origin of the reques... | bsd-3-clause | -3,264,906,744,345,640,000 | 32.197279 | 78 | 0.58668 | false | 4.142615 | false | false | false |
madgik/exareme | Exareme-Docker/src/exareme/exareme-tools/madis/src/functionslocal/vtable/modelformulaeflat.py | 1 | 7028 | import setpath
import functions
import json
import re
registered=True
'''
Example
drop table if exists mydata;
create table mydata as select 1 as adnicategory_AD, 0 as adnicategory_CN, 0 as adnicategory_MCI , 1 as gender_F ,0 as gender_M, 0.1 as x;
insert into mydata select 1 , 0 , 0 , 0 ,1 , 0.6;
insert into mydata... | mit | 4,868,848,112,841,294,000 | 38.268156 | 193 | 0.524189 | false | 4.046056 | false | false | false |
agingrasc/StrategyIA | tests/test_infoManager.py | 1 | 6759 | # Under MIT License, see LICENSE.txt
import unittest
from ai.InfoManager import InfoManager
from RULEngine.Game import Ball, Field, Team, Player
from RULEngine.Util.Position import Position
from RULEngine.Framework import GameState
__author__ = 'RoboCupULaval'
class TestInfoManager(unittest.TestCase):
def setUp... | mit | 4,941,471,099,333,459,000 | 39.220238 | 84 | 0.65902 | false | 3.414351 | true | false | false |
interlegis/sapl | sapl/sessao/migrations/0046_auto_20191001_1115.py | 1 | 2629 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2019-10-01 14:15
from __future__ import unicode_literals
from django.db import migrations, models
import sapl.sessao.models
import sapl.utils
class Migration(migrations.Migration):
dependencies = [
('sessao', '0045_auto_20190816_1337'),
]
... | gpl-3.0 | 8,936,751,130,462,044,000 | 49.5 | 249 | 0.660701 | false | 3.286608 | true | false | false |
immo/pyTOM | chordlet_editor.py | 1 | 9035 | # coding: utf-8
#
# Copyright (C) 2010 C.D. Immanuel Albrecht
#
# 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 Li... | gpl-3.0 | 2,088,363,393,791,312,000 | 37.759657 | 100 | 0.507142 | false | 3.547133 | false | false | false |
dora40323106/2014cpa_final_project | std/a40323119.py | 1 | 8890 | #@+leo-ver=5-thin
#@+node:lee.20141224110313.61: * @file example2.py
#@@language python
#@@tabwidth -4
import cherrypy
import random
from std.asciisymbol import asciiImage
#@+others
#@+node:lee.20141223114246.41: ** class Application
class Application(object):
#@+others
#@+node:lee.20141223114246.42: *3* def i... | gpl-3.0 | 6,607,107,575,952,673,000 | 31.336066 | 236 | 0.496198 | false | 2.639679 | false | false | false |
myarjunar/QGIS | python/plugins/processing/algs/qgis/SelectByLocation.py | 1 | 6080 | # -*- coding: utf-8 -*-
"""
***************************************************************************
SelectByLocation.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
**********************... | gpl-2.0 | 7,651,049,963,410,510,000 | 40.643836 | 93 | 0.535855 | false | 4.879615 | false | false | false |
msbeta/apollo | cyber/python/examples/record_trans.py | 1 | 1887 | # ****************************************************************************
# Copyright 2018 The Apollo 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
#
# ht... | apache-2.0 | -6,280,969,413,569,212,000 | 32.696429 | 78 | 0.631161 | false | 4.006369 | false | false | false |
hhirsch/dnt_rpg | utils/cal3d_scripts/cal3d_mesh_merge.py | 1 | 1556 | #!/usr/bin/python2
# DNT: a satirical post-apocalyptical RPG.
# Copyright (C) 2005-2013 DNTeam <dnt@dnteam.org>
#
# This file is part of DNT.
#
# DNT 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, ei... | gpl-3.0 | -3,363,838,926,362,057,000 | 30.755102 | 73 | 0.636247 | false | 3.520362 | false | false | false |
MicroPyramid/MicroSite | micro_admin/views.py | 1 | 10358 | import json
import string
import random
from django.shortcuts import render
from django.http import HttpResponseRedirect, HttpResponse, Http404
from django.contrib.auth import login, authenticate, logout
from django.contrib.auth.decorators import login_required
from django.db.models.aggregates import Max
from django.co... | gpl-2.0 | 2,354,594,594,845,728,300 | 41.805785 | 146 | 0.586889 | false | 3.907205 | false | false | false |
bcl/anaconda | pyanaconda/packaging/dnfpayload.py | 1 | 30966 | # dnfpayload.py
# DNF/rpm software payload management.
#
# Copyright (C) 2013 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# ... | gpl-2.0 | -3,236,054,497,740,982,000 | 35.733096 | 108 | 0.586837 | false | 4.096032 | false | false | false |
ehoule/jenkins-job-builder | jenkins_jobs/modules/wrappers.py | 1 | 37025 | # Copyright 2012 Hewlett-Packard Development Company, L.P.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 | 8,923,922,954,282,698,000 | 36.136409 | 182 | 0.610506 | false | 3.961164 | false | false | false |
msabramo/kallithea | kallithea/lib/dbmigrate/versions/013_version_1_7_0.py | 2 | 1188 | import logging
from sqlalchemy import *
from kallithea.lib.dbmigrate.migrate import *
from kallithea.lib.dbmigrate.migrate.changeset import *
from kallithea.lib.dbmigrate.versions import _reset_base
log = logging.getLogger(__name__)
def upgrade(migrate_engine):
"""
Upgrade operations go here.
Don't cr... | gpl-3.0 | 2,724,138,164,314,336,000 | 28.7 | 79 | 0.517677 | false | 4.351648 | false | false | false |
Elandril/SickRage | lib/unrar2/unix.py | 1 | 9886 | # Copyright (c) 2003-2005 Jimmy Retzlaff, 2008 Konstantin Yegupov
#
# 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... | gpl-3.0 | 8,716,149,433,150,645,000 | 37.169884 | 127 | 0.546632 | false | 4.445144 | false | false | false |
spectralDNS/shenfun | demo/unitdisc_helmholtz.py | 1 | 5046 | """
Solve Helmholtz equation on the unit disc
Using polar coordinates and numerical method from:
"Efficient spectral-Galerkin methods III: Polar and cylindrical geometries",
J Shen, SIAM J. Sci Comput. 18, 6, 1583-1604
Using shenfun to map coordinates instead of
directly applying r = (t+1)/2, as in the SIAM paper.
... | bsd-2-clause | 8,631,311,797,642,829,000 | 31.346154 | 105 | 0.646849 | false | 2.648819 | false | false | false |
arrabito/DIRAC | tests/Jenkins/dirac-cfg-update-server.py | 1 | 8700 | #!/usr/bin/env python
""" update local cfg
"""
import os
from DIRAC.Core.Base import Script
Script.setUsageMessage('\n'.join([__doc__.split('\n')[1],
'Usage:',
' %s [option|cfgFile] ... DB ...' % Script.scriptName]))
Script.parseCommandLine()
arg... | gpl-3.0 | 1,841,999,879,094,103,600 | 28.391892 | 118 | 0.654253 | false | 3.263316 | false | false | false |
arbel03/Kahoot | Common/khtdirsrvlib.py | 1 | 2466 | import httplib
import json
def update(name='local', ip=None, port=None, host='planq.ddns.net', host_port=17011):
'''
Update your kahoot server information on the directory server.
Parameters:
name : str
Your name. Used to identify your server in the database.
ip : str
Your server... | gpl-3.0 | -3,383,188,884,820,342,000 | 29.8375 | 85 | 0.599351 | false | 4.009756 | false | false | false |
pculture/mirocommunity | localtv/migrations/0065_add_newsletter_settings.py | 1 | 23053 | # 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 'NewsletterSettings'
db.create_table('localtv_newslettersettings', (
('id', se... | agpl-3.0 | -4,414,039,527,597,613,600 | 88.007722 | 195 | 0.56292 | false | 3.66095 | false | false | false |
openpli-arm/enigma2-arm | lib/python/Screens/ChannelSelection.py | 1 | 57564 | from Tools.Profile import profile
from Screen import Screen
from Components.Button import Button
from Components.ServiceList import ServiceList
from Components.ActionMap import NumberActionMap, ActionMap, HelpableActionMap
from Components.MenuList import MenuList
from Components.ServiceEventTracker import ServiceEvent... | gpl-2.0 | 2,947,305,369,600,087,600 | 32.941038 | 284 | 0.711191 | false | 3.165292 | true | false | false |
baoboa/Crystal-Space | scripts/blender/io_scene_cs/ui/data.py | 1 | 2734 | import bpy
from io_scene_cs.utilities import rnaType, rnaOperator, B2CS, BoolProperty
from io_scene_cs.utilities import HasSetProperty, RemoveSetPropertySet
from io_scene_cs.utilities import RemovePanels, RestorePanels
class csFactoryPanel():
bl_space_type = "PROPERTIES"
bl_region_type = "WINDOW"
bl_contex... | lgpl-2.1 | 546,827,367,689,535,900 | 26.069307 | 125 | 0.658742 | false | 3.375309 | false | false | false |
StructuralNeurobiologyLab/SyConn | syconn/analysis/j0251_syn_analysis.py | 1 | 18265 | # SyConn
# Copyright (c) 2016 Philipp J. Schubert
# All rights reserved
from typing import Optional
import pandas as pd
import tqdm
import os
from collections import defaultdict
import seaborn as sns
from scipy.special import softmax
import numpy as np
import matplotlib.pyplot as plt
from syconn.handler.prediction im... | gpl-2.0 | -4,877,082,595,793,193,000 | 47.432361 | 127 | 0.602771 | false | 3.015524 | false | false | false |
malkoto1/just_cook | SQLAlchemy-1.0.4/test/dialect/mssql/test_types.py | 1 | 28323 | # -*- encoding: utf-8
from sqlalchemy.testing import eq_, engines, pickleable
import datetime
import os
from sqlalchemy import Table, Column, MetaData, Float, \
Integer, String, Boolean, TIMESTAMP, Sequence, Numeric, select, \
Date, Time, DateTime, DefaultClause, PickleType, text, Text, \
UnicodeText, Large... | gpl-2.0 | 3,954,153,714,809,661,400 | 33.752147 | 78 | 0.488366 | false | 3.975716 | true | false | false |
userzimmermann/robotframework-python3 | src/robot/model/tags.py | 1 | 4157 | # Copyright 2008-2014 Nokia Solutions and Networks
#
# 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 l... | apache-2.0 | -7,991,242,821,851,306,000 | 25.477707 | 75 | 0.611018 | false | 3.78253 | false | false | false |
shawncaojob/LC | PY/69_sqrtx.py | 1 | 1180 | # 69. Sqrt(x) QuestionEditorial Solution My Submissions
# Total Accepted: 111505
# Total Submissions: 424137
# Difficulty: Medium
# Implement int sqrt(int x).
# 2018.02.26 Newton's method to find out result.
#11.27.2016 Newton's
class Solution(object):
def mySqrt(self, x):
"""
:type x: int
... | gpl-3.0 | 1,552,211,378,021,148,200 | 22.137255 | 59 | 0.480508 | false | 3.430233 | false | false | false |
marcardioid/DailyProgrammer | solutions/233_Easy/solution.py | 1 | 2129 | import random
def print_house(blueprint):
# Set up the walls / boundaries.
walls = set()
for y, l in enumerate(blueprint):
for x, c in enumerate(l):
if c == '*':
for i in range(5):
for j in range(3):
walls.add((4 * x + i, 2 * y... | mit | -5,523,174,703,100,751,000 | 39.188679 | 165 | 0.456083 | false | 2.736504 | false | false | false |
hgqislub/hybird-orchard | code/cloudmanager/install/vcloud/vcloud_proxy_install.py | 1 | 3342 | # -*- coding:utf-8 -*-
import sys
sys.path.append("..")
import os
from heat.openstack.common import log as logging
import json
import vcloud_proxy_data_handler
from pyvcloud import vcloudair
LOG=logging.getLogger(__name__)
_vcloud_proxy_install_conf = os.path.join("/home/hybrid_cloud/conf",
... | apache-2.0 | 220,901,978,823,430,340 | 30.828571 | 113 | 0.612208 | false | 3.117537 | false | false | false |
attakei/ananta | ananta/scripts/upload.py | 1 | 1483 | # -*- coding:utf8 -*-
"""Upload build package
"""
from __future__ import unicode_literals
import zipfile
import json
import logging
__author__ = 'attakei'
def upload_functions(registry, config, args):
import boto3
client = boto3.client('lambda')
functions_list = []
with zipfile.ZipFile(args.path) a... | mit | 1,560,401,449,725,172,700 | 29.895833 | 78 | 0.627782 | false | 4.063014 | false | false | false |
makinacorpus/geonode | src/GeoNodePy/geonode/urls.py | 1 | 2665 | from django.conf.urls.defaults import *
from django.conf import settings
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from geonode.sitemap import LayerSitemap, MapSitemap
from geonode.proxy.urls import urlpatterns as proxy_urlpatterns
# Uncomment the next two lines to enable the admin:
from djan... | gpl-3.0 | 8,958,160,613,814,499,000 | 44.948276 | 107 | 0.664165 | false | 3.290123 | false | false | false |
Azure/azure-sdk-for-python | sdk/keyvault/azure-keyvault-keys/azure/keyvault/keys/crypto/_internal/_internal.py | 1 | 3219 | # ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
import codecs
from base64 import b64encode, b64decode
from cryptography.hazmat.primitives.asymmetric import utils
def _bytes_to_int(b):
if not b or not isinstance... | mit | -5,116,849,055,890,451,000 | 29.367925 | 116 | 0.632495 | false | 3.384858 | false | false | false |
joedougherty/sentential | sentential/grammar.py | 1 | 2086 | # -*- coding: utf-8 -*-
from collections import namedtuple
try:
from string import lowercase
except:
from string import ascii_lowercase as lowercase
grammar_rule = namedtuple('grammar_rule', ['pattern', 'valid_following_patterns'])
OPENPAREN = ['(']
CLOSEPAREN = [')']
VAR = [letter for letter in lowercase.r... | mit | 4,410,437,448,515,393,000 | 31.578125 | 100 | 0.636451 | false | 3.480801 | false | false | false |
inclement/python-for-android | pythonforandroid/logger.py | 1 | 8332 |
import logging
import os
import re
import sh
from sys import stdout, stderr
from math import log10
from collections import defaultdict
from colorama import Style as Colo_Style, Fore as Colo_Fore
import six
# This codecs change fixes a bug with log output, but crashes under python3
if not six.PY3:
import codecs
... | mit | -2,819,479,059,647,829,500 | 34.759657 | 84 | 0.539006 | false | 3.776972 | false | false | false |
jackwluo/py-quantmod | quantmod/core.py | 1 | 3626 | """Core Quantmod functions
Contains some wrappers over 'chart.py' for those used to R's Quantmod style,
along with other tools for financial data acquisition.
"""
from __future__ import absolute_import
import six
import datetime as dt
import pandas_datareader.data as web
from .chart import Chart
def get_symbol(ti... | mit | -1,094,224,619,556,919,800 | 28.721311 | 78 | 0.607832 | false | 4.280992 | false | false | false |
donyu/nonprofit_game | mysql_service.py | 1 | 3545 | #!/usr/bin/python
import MySQLdb #MySQL interfacing library
#Init connection to DB on Heroku server
connection = MySQLdb.connect(host="us-cdbr-east-04.cleardb.com",
user="b2699bab0d03bc",
passwd="92c968bb",
db="heroku_62b297a4786cfb1")
cursor = connection.cursor()
# Function: get_user
# Input: User object containing... | mit | 5,365,240,423,126,910,000 | 29.299145 | 109 | 0.725529 | false | 3.445092 | false | false | false |
ekristen/mythboxee | mysql/connector/constants.py | 1 | 23402 | # MySQL Connector/Python - MySQL driver written in Python.
# Copyright (c) 2009,2010, Oracle and/or its affiliates. All rights reserved.
# Use is subject to license terms. (See COPYING)
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publ... | mit | -436,693,346,536,558,200 | 31.684358 | 89 | 0.49406 | false | 3.44451 | false | false | false |
adobe-type-tools/python-modules | BezChar.py | 1 | 18992 | #FLM: Library routine - bez format conversion
######################################################################
__copyright__ = """
Copyright 2016 Adobe Systems Incorporated (http://www.adobe.com/). All Rights Reserved.
This software is licensed as OpenSource, under the Apache License, Version 2.0. This license ... | mit | -5,819,413,368,750,801,000 | 29.931596 | 155 | 0.649168 | false | 2.829137 | false | false | false |
johhorn/gwas-clustering | Tools/BinaryClusteringTool.py | 1 | 11990 | from numpy import nonzero
from quick.multitrack.MultiTrackCommon import getGSuiteFromGalaxyTN
from gold.application.HBAPI import Track, doAnalysis, AnalysisSpec, GlobalBinSource
from quick.statistic.DistanceMetricsFoundationStat import DistanceMetricsFoundationStat
from quick.statistic.PointCountPerMicroBinV2Stat impor... | gpl-3.0 | -4,962,037,583,830,811,000 | 43.906367 | 120 | 0.591493 | false | 4.412955 | false | false | false |
mrachinskiy/jewelcraft | op_cutter/cutter_ui.py | 1 | 4697 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# JewelCraft jewelry design toolkit for Blender.
# Copyright (C) 2015-2021 Mikhail Rachinskiy
#
# 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, eith... | gpl-3.0 | 1,522,480,018,854,793,500 | 26.30814 | 79 | 0.561635 | false | 3.466421 | false | false | false |
Suninus/NewsBlur | apps/profile/middleware.py | 1 | 18030 | import datetime
import re
import random
import time
import redis
from utils import log as logging
from django.http import HttpResponse
from django.conf import settings
from django.db import connection
from django.template import Template, Context
from apps.profile.tasks import CleanupUser
from apps.statistics.rstats im... | mit | 5,963,642,810,320,053,000 | 68.883721 | 402 | 0.642928 | false | 3.451378 | false | false | false |
ekager/focus-android | tools/taskcluster/schedule-screenshots.py | 1 | 3290 | # 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/.
# This script is executed on taskcluster as a "decision task". It will schedule
# individual tasks for taking screenshot... | mpl-2.0 | 6,358,383,629,396,537,000 | 31.574257 | 107 | 0.645593 | false | 3.477801 | false | false | false |
m0r13/derpbot | derpbot/plugins/irc_bot.py | 1 | 4430 | from derpbot import plugin
import irc.client, irc.buffer
import threading
class MyBuffer(irc.client.DecodingLineBuffer):
errors = "ignore"
irc.client.ServerConnection.buffer_class = MyBuffer
class IRCThread(threading.Thread):
def __init__(self, plugin):
super(IRCThread, self).__init__()
self._plugin = plugin... | mit | 1,048,435,751,752,999,600 | 24.028249 | 82 | 0.643792 | false | 2.744734 | true | false | false |
jagleeso/calm | src/python/cmdproc/pidgin.py | 1 | 13556 | #!/usr/bin/env python
import cmdproc
import mydbus
# https://developer.pidgin.im/wiki/DbusHowto
# provide asynchronous
import dbus
import re
import gobject
import argparse
from dbus.mainloop.glib import DBusGMainLoop
import logging
import subprocess
import notify
from multiprocessing import Process, Lock, Array, Val... | gpl-2.0 | -1,853,985,787,629,315,800 | 38.521866 | 182 | 0.636914 | false | 3.507374 | false | false | false |
merry-bits/Owl | src/owl/response_wrapper.py | 1 | 1684 | # -*- coding: utf-8 -*-
from logging import getLogger
_LOG = getLogger(__name__)
class IterableWrapper():
""" Wrap iterator to catch the StopIteration exception and mark the current
call as done (makes it possible to calculate the total time of a request).
"""
def __init__(self, iterable, end_cb):
... | gpl-2.0 | -6,648,036,055,744,183,000 | 32.68 | 79 | 0.565914 | false | 4.770538 | false | false | false |
CityOfNewYork/NYCOpenRecords | app/lib/jinja_filters.py | 1 | 2954 | from app.constants import (
response_type,
response_privacy,
event_type,
)
def format_response_privacy(privacy):
return {
response_privacy.RELEASE_AND_PUBLIC: "Release and Public",
response_privacy.RELEASE_AND_PRIVATE: "Release and Private",
response_privacy.PRIVATE: "Private"
... | apache-2.0 | -7,134,061,075,768,336,000 | 41.2 | 95 | 0.657075 | false | 3.615667 | false | false | false |
jjscarafia/odoo | addons/purchase/purchase.py | 1 | 82054 | # -*- 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 | -6,857,568,594,297,663,000 | 53.995979 | 333 | 0.592025 | false | 3.949841 | false | false | false |
amboycharlie/Child-Friendly-LCMS | leonardo/module/web/management/commands/sync_widget_themes.py | 1 | 4324 |
from django.utils import six
from django.conf import settings
import os
from optparse import make_option
from django.core.management.base import NoArgsCommand
from leonardo.module.web.models import Widget, WidgetContentTheme, WidgetBaseTheme
from ._utils import get_or_create_template
"widget.verbose_name - template... | apache-2.0 | 902,823,091,999,076,500 | 40.180952 | 86 | 0.518964 | false | 4.947368 | false | false | false |
SophieBartmann/Faust-Bot | FaustBot/Model/HanDatabaseProvider.py | 1 | 1955 | import sqlite3
class HanDatabaseProvider(object):
_CREATE_HANDB_TABLE = 'CREATE TABLE IF NOT EXISTS handb (id INTEGER PRIMARY KEY, \
hanword TEXT)'
_GET_RANDOM_WORD = 'SELECT hanword FROM handb ORDER BY RANDOM() LIMIT 1'
_INSERT_WORD = 'REPLACE INTO handb(id, hanword) VALUE... | gpl-3.0 | -8,398,642,467,184,333,000 | 33.298246 | 86 | 0.616368 | false | 3.840864 | false | false | false |
bburan/psiexperiment | psi/application/psi_launcher.py | 1 | 1189 | import argparse
from psi.application import (add_default_options, launch_experiment,
parse_args)
from psi.application.experiment_description import experiments
def main():
class ControllerAction(argparse.Action):
def __call__(self, parser, namespace, value, option_string=None... | mit | -8,212,985,661,555,086,000 | 40 | 76 | 0.649285 | false | 4.626459 | false | false | false |
glasslion/django-qiniu-storage | tests/utils.py | 1 | 1606 | from __future__ import print_function
import time
from functools import wraps
def retry(ExceptionToCheck, tries=4, delay=3, backoff=2, logger=None):
"""Retry calling the decorated function using an exponential backoff.
http://www.saltycrane.com/blog/2009/11/trying-out-retry-decorator-python/
original fro... | mit | -464,507,779,436,920,640 | 33.913043 | 77 | 0.584682 | false | 4.317204 | false | false | false |
fghso/instagram-crawler | json2mysql/users.py | 1 | 1785 | #!/usr/bin/python
# -*- coding: iso-8859-1 -*-
import json
import glob
import xmltodict
import mysql.connector
# Load configurations file
configFile = open("config.xml", "r")
configDict = xmltodict.parse(configFile.read())
config = configDict["config"]["client"]["crawler"]
# Open database connection
config["connarg... | mit | 5,679,181,652,483,172,000 | 32.055556 | 244 | 0.686835 | false | 3.426104 | true | false | false |
smallyear/linuxLearn | salt/salt/states/boto_ec2.py | 1 | 4977 | # -*- coding: utf-8 -*-
'''
Manage EC2
.. versionadded:: 2015.8.0
This module provides an interface to the Elastic Compute Cloud (EC2) service
from AWS.
The below code creates a key pair:
.. code-block:: yaml
create-key-pair:
boto_ec2.key_present:
- name: mykeypair
- save_private: /root/
... | apache-2.0 | 2,288,295,817,974,654,200 | 30.903846 | 83 | 0.519992 | false | 3.739294 | false | false | false |
abelectronicsuk/ABElectronics_Python_Libraries | IOPi/tests/IOPi_init.py | 1 | 2580 | #!/usr/bin/env python
"""
================================================
ABElectronics IO Pi Tests | __init__
Requires python smbus to be installed
For Python 2 install with: sudo apt-get install python-smbus
For Python 3 install with: sudo apt-get install python3-smbus
run with: python3 IOPi_init.py
=============... | gpl-2.0 | -3,445,181,718,191,659,500 | 20.864407 | 68 | 0.599225 | false | 3.827893 | false | false | false |
yeleman/snisi | snisi_epidemiology/migrations/0004_auto_20150415_0945.py | 1 | 1184 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('snisi_epidemiology', '0003_epidemiologyalertr'),
]
operations = [
migrations.AlterField(
model_name='aggepidemio... | mit | 356,970,930,187,111,740 | 39.827586 | 197 | 0.660473 | false | 3.534328 | false | false | false |
oblique-labs/pyVM | rpython/jit/backend/arm/test/support.py | 1 | 2944 | import os
import py
import pytest
from rpython.rtyper.lltypesystem import lltype, rffi
from rpython.jit.backend.detect_cpu import getcpuclass
from rpython.jit.metainterp.test import support
from rpython.rlib.jit import JitDriver
class JitARMMixin(support.LLJitMixin):
CPUClass = getcpuclass()
# we have to disa... | mit | -1,334,157,185,145,279,700 | 28.737374 | 107 | 0.600204 | false | 3.095689 | true | false | false |
smurfix/HomEvenT | irrigation/rainman/migrations/0004_auto__del_evaporation__add_environment__add_history__del_field_level_i.py | 1 | 14361 | # 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):
# Deleting model 'Evaporation'
db.delete_table('rainman_evaporation')
# Adding model 'Environment... | gpl-3.0 | -1,994,425,389,549,652,700 | 55.53937 | 161 | 0.563888 | false | 3.67383 | false | false | false |
jackylee0424/Physioboard | sc-phonegap-tornado-websocket/Server/tornado/test/httputil_test.py | 1 | 1754 | #!/usr/bin/env python
from tornado.httputil import url_concat
import unittest
class TestUrlConcat(unittest.TestCase):
def test_url_concat_no_query_params(self):
url = url_concat(
"https://localhost/path",
{'y':'y', 'z':'z'},
)
self.assertEqual(url,... | mit | 848,651,670,223,571,800 | 30.321429 | 71 | 0.483466 | false | 3.405825 | true | false | false |
smallfz/flask-ws | flaskws/client.py | 1 | 8349 | #-*- coding: utf-8 -*-
import os
import time
import socket
import urllib, urlparse
import hashlib
import threading
import Queue
from cStringIO import StringIO
import base64
from defs import *
from protocol import parse_frame, make_frame
from utils import r_select
class Client(object):
def __in... | mit | 3,173,885,731,706,044,400 | 32.217213 | 86 | 0.455623 | false | 4.078652 | false | false | false |
zhuhuifeng/PyML | mla/rl/dqn.py | 1 | 4569 | import logging
import random
import gym
import numpy as np
from gym import wrappers
from six.moves import range
np.random.seed(9999)
logger = logging.getLogger()
logger.setLevel(logging.INFO)
"""
References:
Sutton, Barto (2017). Reinforcement Learning: An Introduction. MIT Press, Cambridge, MA.
"""
class DQN... | apache-2.0 | 8,002,247,753,900,619,000 | 30.944056 | 107 | 0.510727 | false | 4.104223 | false | false | false |
bartsidee/bartsidee-boxee | repo/rtl/rtl.py | 1 | 3695 | from default import *
from library import *
import tools
sys.path.append(os.path.join(CWD, 'external'))
if 'linux' in sys.platform:
sys.path.append(os.path.join(CWD, 'system', 'linux'))
elif 'win32' in sys.platform:
sys.path.append(os.path.join(CWD, 'system', 'win32'))
elif 'darwin' in sys.platform:
sys.p... | gpl-3.0 | 3,914,185,108,580,258,000 | 35.95 | 107 | 0.539107 | false | 3.939232 | false | false | false |
DBeath/flask-feedrsub | tests/ingestion/json_item_parser_test.py | 1 | 6590 | from datetime import datetime
from feedrsub.ingestion.parsers.json_activitystream.json_item_parser import (
JsonItemParser,
)
from feedrsub.models.entry import Entry
from tests.conftest import valid_uuid, assert_datetime_almost_equal
def test_item_guid():
item = dict(id="abcde")
parser = JsonItemParser(i... | mit | -2,087,478,480,091,694,800 | 23.498141 | 90 | 0.66783 | false | 3.45569 | true | false | false |
bluesurfer/AuthTokens | detect_tokens.py | 1 | 9307 | #!/usr/bin/env python
"""
Authentication tokens detection script.
"""
# -*- coding: utf-8 -*-
import signal
import argparse
import logging
from argparse import RawTextHelpFormatter
from selenium.common.exceptions import TimeoutException
from httplib import BadStatusLine, CannotSendRequest
from urllib2 import URLError... | mit | 8,961,859,822,677,329,000 | 30.549153 | 111 | 0.507682 | false | 4.804853 | false | false | false |
WarrenWeckesser/eyediagram | eyediagram/mpl.py | 1 | 1707 | # Copyright (c) 2015, Warren Weckesser. All rights reserved.
# This software is licensed according to the "BSD 2-clause" license.
from __future__ import division as _division, print_function as _print_function
import numpy as _np
from .core import grid_count as _grid_count
import matplotlib.pyplot as _plt
from ._c... | bsd-2-clause | -1,629,751,546,426,944,500 | 27.45 | 79 | 0.585823 | false | 3.360236 | false | false | false |
hacklabr/timtec | activities/serializers.py | 1 | 1777 | from discussion.models import Topic
from discussion.serializers import TopicSerializer
from .models import Activity, Answer
from rest_framework import serializers
class ActivitySerializer(serializers.ModelSerializer):
data = serializers.JSONField()
expected = serializers.JSONField(required=False)
image_u... | agpl-3.0 | 8,868,795,146,077,046,000 | 26.765625 | 83 | 0.669668 | false | 4.55641 | false | false | false |
alirizakeles/tendenci | tendenci/apps/corporate_memberships/views.py | 1 | 76884 | import os
import math
from datetime import datetime, date, time
import csv
import operator
from hashlib import md5
from sets import Set
import subprocess
import mimetypes
from django.contrib.admin.views.decorators import staff_member_required
from django.template import RequestContext
from django.shortcuts import get_... | gpl-3.0 | -834,013,819,330,861,000 | 40.357719 | 153 | 0.555096 | false | 4.296156 | false | false | false |
ajurcevic/calibre-web | cps/db.py | 1 | 11910 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from sqlalchemy import *
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import *
import os
import re
import ast
from ub import config
import ub
session = None
cc_exceptions = ['datetime', 'int', 'comments', 'float', 'composite', 'series']
cc_c... | gpl-3.0 | 545,094,209,893,005,300 | 32.934473 | 121 | 0.565659 | false | 3.93719 | true | false | false |
benglard/Rhetorical-Analysis | DashFinder.py | 1 | 1212 | class DashFinder:
def __init__(self):
self.f = ""
self.counter = 0
#Path is inputted from AIPController
#Returns dash counter
def sendFile(self, path):
self.f = open(path)
for line in self.f:
try:
self.counter += self.get_all_dashes(... | mit | 1,556,730,942,056,285,000 | 25.347826 | 67 | 0.507426 | false | 3.859873 | false | false | false |
summer-liu/events_cache_scripts | cache25.py | 1 | 8044 | from pymongo import MongoClient
import multiprocessing
import datetime
import math
import time
db25 = MongoClient(host='10.8.8.111', port=27017, connect=False)['miner-prod25']
cache = MongoClient(host='10.8.8.111', port=27017, connect=False)['cache25']
cache2 = MongoClient(host='10.8.8.111', port=27017, connect=False... | mit | 4,773,258,494,757,214,000 | 27.424028 | 141 | 0.45276 | false | 4.028042 | false | false | false |
TomBaxter/osf.io | admin/base/settings/defaults.py | 1 | 7188 | """
Django settings for the admin project.
"""
import os
from urlparse import urlparse
from website import settings as osf_settings
from django.contrib import messages
from api.base.settings import * # noqa
# TODO ALL SETTINGS FROM API WILL BE IMPORTED AND WILL NEED TO BE OVERRRIDEN
# TODO THIS IS A STEP TOWARD INTEG... | apache-2.0 | -5,513,784,812,299,633,000 | 27.86747 | 101 | 0.684196 | false | 3.427754 | false | false | false |
ACM-CSUSB/Website | service/controllers/manage.py | 1 | 4502 | from flask import Blueprint, redirect, render_template, session, flash, url_for
from sqlalchemy import asc
from datetime import datetime
from ..forms.members import MemberForm
from ..forms.pages import DelPageForm, PageForm
from ..models.content import Content
from ..models.members import Members, Groups
from ..auth im... | bsd-2-clause | 5,159,605,183,499,564,000 | 28.424837 | 109 | 0.638161 | false | 3.742311 | false | false | false |
magenta-aps/mox | python_agents/mox_advis.py | 1 | 5516 | # Copyright (C) 2015-2019 Magenta ApS, https://magenta.dk.
# Contact: info@magenta.dk.
#
# 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/.
#!/usr/bin/env python
import s... | mpl-2.0 | -4,268,219,678,568,365,600 | 33.26087 | 79 | 0.593365 | false | 4.049927 | false | false | false |
NiJeLorg/follow-the-money | CashCity/models.py | 1 | 16591 | from django.db import models
# import User model
from django.contrib.auth.models import User
# importing django-taggit
from taggit.managers import TaggableManager
# importing django image cropping
from image_cropping import ImageRatioField
#taggit autocomplete
from taggit_autocomplete.managers import TaggableManager
... | mit | 2,882,569,084,859,974,700 | 39.967901 | 113 | 0.658248 | false | 3.918517 | false | false | false |
dchaplinsky/open-declaration | bin/merge.py | 1 | 3106 | """Merges results of manual processing into a single CSV. Requires 3 CSVs: original, "movables" and positions."""
import sys
import csv
from itertools import groupby
POSITION_COLS = ('Регіон', 'Структура', 'Посада') # Copy only these columns from the positions doc
GROUP_NUM_NAME = 'Номер групи'
def read_file(filen... | mit | 4,830,359,272,289,232,000 | 38.597403 | 117 | 0.653329 | false | 3.561916 | false | false | false |
exhuma/puresnmp | puresnmp/snmp.py | 1 | 2353 | """
This module contains data-types and helpers which are proper to the SNMP
protocol and independent of X.690
"""
from typing import Any, Iterator, Union
from x690.types import ObjectIdentifier, Type # type: ignore
from puresnmp.typevars import PyType
# Error messages as defined in https://tools.ietf.org/html/rfc3... | mit | -1,246,376,906,567,919,400 | 28.78481 | 78 | 0.58606 | false | 3.659409 | false | false | false |
tigrus/dadata-python | tests/test_address.py | 1 | 3565 | # coding: utf-8
"""
Здесь будем проверять запросы к ресурсу типа адрес
"""
import json
import requests_mock
from .common import CommonTestCase
from dadata import DaDataClient
ADDRESS_REQUEST = "мск сухонска 11/-89"
ADDRESS_RESPONSE = """[
{
"source": "мск сухонска 11/-89",
"result": "г Москва, ул Сухонс... | mit | -652,685,932,187,238,500 | 28.9375 | 97 | 0.584849 | false | 2.55564 | false | false | false |
sebastien-forestier/IROS2016 | src/environment.py | 1 | 27387 | import numpy as np
import matplotlib
import matplotlib.image as image
import matplotlib.pyplot as plt
from matplotlib.cbook import get_sample_data
from matplotlib.offsetbox import TextArea, DrawingArea, OffsetImage, AnnotationBbox
#matplotlib.use('QT4Agg')
from combined_env import CombinedEnvironment, HierarchicallyC... | gpl-3.0 | -1,745,671,282,748,186,000 | 40.876147 | 219 | 0.442911 | false | 3.312009 | false | false | false |
gyepisam/kedpm | kedpm/frontends/cli.py | 1 | 32456 | # Copyright (C) 2003-2005 Andrey Lebedev <andrey@micro.lt>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This p... | gpl-2.0 | 603,016,947,405,821,000 | 32.017294 | 235 | 0.56991 | false | 4.234864 | false | false | false |
leonhardbrenner/buckysoap | AtomAndElement.py | 1 | 3897 | # -*- coding: utf-8 -*-
# <nbformat>3.0</nbformat>
# <headingcell level=3>
# Meet the Atom.
# <markdowncell>
# First let's create a few and prove that they are Atoms.
# <codecell>
import buckysoap as bs
print bs.zeros(10, int)
print bs.ones(10, int)
print bs.arange(10)
print type(bs.zeros(10, int))
# <markdownce... | mit | 8,543,522,389,507,073,000 | 16.32 | 217 | 0.654349 | false | 2.736657 | false | false | false |
ntt-sic/heat | heat/engine/watchrule.py | 1 | 13646 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# 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 | 4,521,657,506,958,093,300 | 33.811224 | 78 | 0.526601 | false | 4.1782 | false | false | false |
i5o/sugar | src/jarabe/desktop/homewindow.py | 1 | 10131 | # Copyright (C) 2006-2007 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distribute... | gpl-2.0 | -4,323,146,822,110,387,700 | 34.055363 | 76 | 0.603494 | false | 3.66534 | false | false | false |
cycleuser/GeoPython | geopytool/Clastic.py | 1 | 9484 | from geopytool.ImportDependence import *
from geopytool.CustomClass import *
class Clastic(AppForm, Tool):
_df = pd.DataFrame()
_changed = False
xlabel = r''
ylabel = r''
Tags = []
Label = [u'Clay', u'Sand', u'Silt']
LabelPosition = [(45, 50 * np.sqrt(3) + 2),
(-1... | gpl-3.0 | -6,101,974,155,105,765,000 | 29.616393 | 118 | 0.405654 | false | 3.398108 | false | false | false |
51reboot/actual_09_homework | 11/xq/users/modules.py | 1 | 16552 | # -*- coding: utf-8 -*-
# @Author: liuli
# @Date: 2016-07-03 16:42:59
# @Last Modified by: XUEQUN
# @Last Modified time: 2016-07-15 21:09:41
from dbutils import MySQLConnection
import hashlib
import codecs
import os
import utils
import time
import paramiko
import pika
import sys
class User(object):
def __ini... | mit | 1,055,614,460,618,619,300 | 35.29108 | 178 | 0.563389 | false | 3.042708 | false | false | false |
barrazamiguel/pydrez | escenas/menuDesafios.py | 1 | 1281 | # -*- encoding: utf-8 -*-
from .menu import EscenaMenu
from os import listdir
class MenuDesafios(EscenaMenu):
def configuracion(self):
self.menu_y = 190
self.colorResaltado = self.pilas.colores.Color(0, 0, 0)
self.colorNormal = self.pilas.colores.Color(255, 255, 255)
self.distancia... | gpl-3.0 | 8,365,125,264,887,601,000 | 36.647059 | 202 | 0.662236 | false | 2.756466 | false | false | false |
johnson1228/pymatgen | pymatgen/analysis/local_env.py | 1 | 80989 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from __future__ import division, unicode_literals
import six
import ruamel.yaml as yaml
import os
import json
"""
This module provides classes to perform analyses of
the local environments (e.g., finding near... | mit | -8,361,120,696,012,719,000 | 40.703913 | 144 | 0.477336 | false | 3.856068 | false | false | false |
django-erp/django-erp | djangoerp/wsgi.py | 1 | 2177 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""This file is part of the django ERP project.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND ... | mit | -6,511,271,403,936,924,000 | 42.54 | 79 | 0.778594 | false | 4.061567 | false | false | false |
Comunitea/CMNT_00098_2017_JIM_addons | jim_doc_credit/reports/number_to_letter.py | 1 | 7554 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
from itertools import ifilter
UNIDADES = (
'',
'UN ',
'DOS ',
'TRES ',
'CUATRO ',
'CINCO ',
'SEIS ',
'SIETE ',
'OCHO ',
'NUEVE ',
'DIEZ ',
'ONCE ',
'DOCE ',
'TRECE ',
'CATORCE ',
'QUINCE ',
'DIECISEIS ',
... | agpl-3.0 | 4,080,822,901,343,591,400 | 31.196581 | 121 | 0.562649 | false | 2.99801 | false | false | false |
leandrotoledo/python-telegram-bot | telegram/ext/chatmemberhandler.py | 2 | 7034 | #!/usr/bin/env python
#
# A library that provides a Python interface to the Telegram Bot API
# Copyright (C) 2019-2021
# Leandro Toledo de Souza <devs@python-telegram-bot.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
#... | lgpl-3.0 | 7,042,684,374,898,576,000 | 47.510345 | 99 | 0.653256 | false | 4.127934 | false | false | false |
feureau/Small-Scripts | Blender/Blender config/2.91/scripts/addons/bricker_v2-2-1/functions/customize_utils.py | 1 | 15684 | # Copyright (C) 2020 Christopher Gearhart
# chris@bblanimation.com
# http://bblanimation.com/
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your opt... | gpl-3.0 | -2,003,318,547,077,999,600 | 42.325967 | 421 | 0.607179 | false | 3.249896 | false | false | false |
okuta/PaintsChainer | cgi-bin/paint_x2_unet/img2imgDataset.py | 1 | 12185 | #!/usr/bin/env python
import numpy as np
import chainer
import chainer.functions as F
import chainer.links as L
import chainer.datasets.image_dataset as ImageDataset
import six
import os
from PIL import Image
from chainer import cuda, optimizers, serializers, Variable
import cv2
class ImageAndRefDataset(chainer.dat... | mit | 3,214,778,083,499,874,300 | 37.560127 | 126 | 0.49364 | false | 3.240691 | false | false | false |
fjorba/invenio | modules/weblinkback/lib/weblinkback.py | 1 | 13485 | # -*- coding: utf-8 -*-
## This file is part of Invenio.
## Copyright (C) 2011 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your option) any... | gpl-2.0 | -7,522,924,028,540,520,000 | 42.083067 | 247 | 0.604746 | false | 3.904169 | true | false | false |
FRBs/FRB | frb/scripts/build.py | 1 | 1757 | #!/usr/bin/env python
"""
Build FRB bits and pieces
"""
from __future__ import (print_function, absolute_import, division, unicode_literals)
def parser(options=None):
import argparse
# Parse
parser = argparse.ArgumentParser(description='Build parts of the CASBAH database; Output_dir = $CASBAH_GALAXIES [v1.... | bsd-3-clause | -1,109,692,127,321,514,400 | 32.788462 | 124 | 0.638019 | false | 3.346667 | false | false | false |
nferruzzi/giudice-server | ui/credits.py | 1 | 2066 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'credits.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
class Ui_DialogCredits(object):
def setupUi(self, DialogCredits):
Dialo... | gpl-3.0 | -4,707,162,568,782,170,000 | 44.911111 | 111 | 0.732817 | false | 4.148594 | false | false | false |
JulyKikuAkita/PythonPrac | cs15211/CoinChange.py | 1 | 6871 | __source__ = 'https://leetcode.com/problems/coin-change/description/'
# https://github.com/kamyu104/LeetCode/blob/master/Python/create-maximum-number.py
# Time: O(n * k), n is the number of coins, k is the amount of money
# Space: O(k)
#
# Description: Leetcode # 322. Coin Change
#
# Note:
# Good to note that the name... | apache-2.0 | 1,493,507,232,592,823,800 | 33.878173 | 123 | 0.57095 | false | 3.311325 | true | false | false |
freundTech/deepl-cli | deepl/translator.py | 1 | 4649 | import requests
import json
import sys
import re
request_id = 0
def translate(text, source="auto", target=None, preferred_langs=[]):
paragraphs = _split_paragraphs(text)
sentences = _request_split_sentences(paragraphs, source, preferred_langs)
result = _request_translate(sentences, source, target, prefer... | mit | -736,799,255,828,961,700 | 29.585526 | 102 | 0.599269 | false | 4.143494 | false | false | false |
rectory-school/rectory-apps | detention_notifier/email.py | 1 | 7448 | import email
import email.utils
from django.template.loader import get_template
from django.template import Context
from django.core.mail import EmailMessage, send_mail
from detention_notifier.models import Detention, DetentionMailer, DetentionCC, DetentionTo
from academics.models import AcademicYear, Enrollment, Stu... | mit | 2,957,078,396,559,228,000 | 34.636364 | 124 | 0.630908 | false | 3.944915 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.