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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
MalloyDelacroix/DownloaderForReddit | Tools/ui_converter.py | 1 | 5130 | #!/usr/bin/env python
import sys
import os
import subprocess
class Converter:
base_ui_path = os.path.relpath('Resources/ui_files')
base_out_path = os.path.relpath('DownloaderForReddit/guiresources')
def __init__(self, ui_file):
self.ui_file = ui_file
self.callable_methods = [
... | gpl-3.0 | 8,101,822,332,021,041,000 | 26.433155 | 116 | 0.571345 | false | 3.868778 | false | false | false |
duncan-r/SHIP | ship/utils/fileloaders/fileloader.py | 1 | 2254 | """
Summary:
Main file loader for the API. This offers convenience methods to make it
simple to load any type of file from one place.
Author:
Duncan Runnacles
Created:
01 Apr 2016
Copyright:
Duncan Runnacles 2016
TODO:
Updates:
"""
from __future__ import unicode_literals
fro... | mit | 366,836,191,615,290,940 | 26.82716 | 93 | 0.60071 | false | 4.285171 | false | false | false |
arrabito/DIRAC | ConfigurationSystem/Service/ConfigurationHandler.py | 1 | 3918 | """ The CS! (Configuration Service)
"""
__RCSID__ = "$Id$"
from DIRAC.Core.Utilities.ReturnValues import S_OK, S_ERROR
from DIRAC.ConfigurationSystem.private.ServiceInterface import ServiceInterface
from DIRAC.Core.DISET.RequestHandler import RequestHandler
from DIRAC.Core.Utilities import DErrno
gServiceInterface =... | gpl-3.0 | -4,709,197,104,656,305,000 | 33.368421 | 114 | 0.710822 | false | 4.085506 | true | false | false |
lunixbochs/nullstatic | gen.py | 1 | 2581 | #!/usr/bin/env python2
from collections import defaultdict
from datetime import date, datetime
from email.Utils import formatdate
import frontmatter
import jinja2
import markdown
import os
import sys
import time
import yaml
@jinja2.contextfilter
def _render(context, data):
return env.from_string(data['source']).re... | mit | -623,981,896,369,554,700 | 37.522388 | 127 | 0.586594 | false | 3.506793 | false | false | false |
owais/django-simple-activity | simple_activity/models.py | 1 | 1965 | from django.db import models
from django.utils.timezone import now
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from filtered_contenttypes.fields import FilteredGenericForeignKey
from django_pgjson.fields import JsonBField
from .managers import ActionManager
from . impor... | bsd-2-clause | 2,345,284,087,180,824,000 | 34.727273 | 80 | 0.672774 | false | 4.216738 | false | false | false |
EmanueleCannizzaro/scons | test/Clean/Option.py | 1 | 2620 | #!/usr/bin/env python
#
# Copyright (c) 2001 - 2016 The SCons Foundation
#
# 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 us... | mit | -4,647,620,131,027,711,000 | 29.465116 | 94 | 0.711832 | false | 3.308081 | true | false | false |
olhoneles/olhoneles | montanha/management/commands/collectors/algo.py | 1 | 12094 | # -*- coding: utf-8 -*-
#
# Copyright (©) 2010-2013 Estêvão Samuel Procópio
# Copyright (©) 2010-2013 Gustavo Noronha Silva
# Copyright (©) 2013 Marcelo Jorge Vieira
# Copyright (©) 2014 Wilson Pinto Júnior
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero... | agpl-3.0 | -3,635,771,197,065,837,000 | 34.532353 | 110 | 0.552934 | false | 3.617066 | false | false | false |
mupif/mupif | mupif/Field.py | 1 | 42683 | #
# MuPIF: Multi-Physics Integration Framework
# Copyright (C) 2010-2015 Borek Patzak
#
# Czech Technical University, Faculty of Civil Engineering,
# Department of Structural Mechanics, 166 29 Prague, Czech Republic
#
# This library is free software; you can redistribute it and/or
# modify i... | lgpl-3.0 | 7,138,186,339,437,092,000 | 43.094008 | 381 | 0.597896 | false | 4.202324 | false | false | false |
j4321/tkFileBrowser | docs/conf.py | 1 | 5256 | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------------------------------------------------------... | gpl-3.0 | 8,686,003,906,744,522,000 | 29.034286 | 79 | 0.649543 | false | 3.975794 | true | false | false |
unisport/thumblr | thumblr/tasks.py | 1 | 1681 |
from django.conf import settings
from celery import Celery, Task
from raven import Client
import usecases
client = Client(settings.SENTRY_DSN)
celery = Celery('tasks')
celery.conf.update(
AWS_ACCESS_KEY_ID=settings.AWS_ACCESS_KEY_ID,
AWS_SECRET_ACCESS_KEY=settings.AWS_SECRET_ACCESS_KEY,
CELERY_TASK_SE... | mit | -463,160,966,042,746,240 | 33.326531 | 100 | 0.558001 | false | 3.803167 | false | false | false |
guaka/trust-metrics | trustlet/pymmetry/file_certs.py | 1 | 9725 | #!/usr/bin/env python
""" file_certs.py: File-based Trust Metric Profiles (example code)
Copyright (C) 2001 Luke Kenneth Casson Leighton <lkcl@samba-tng.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 S... | gpl-2.0 | -2,231,080,821,749,822,500 | 27.943452 | 77 | 0.668072 | false | 2.744074 | false | false | false |
natduca/ndbg | util/vec2.py | 1 | 3522 | # Copyright 2011 Google 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 or agreed to in writing,... | apache-2.0 | 5,074,446,273,003,439,000 | 20.47561 | 121 | 0.561045 | false | 2.676292 | false | false | false |
KT26/PythonCourse | 8. Class/8.py | 1 | 1268 | # Created by PyCharm Pro Edition
# User: Kaushik Talukdar
# Date: 24-04-17
# Time: 12:29 AM
# INHERITANCE
# We can create a new class, but instead of writing it from scratch, we can base it on an existing class.
# Lets understand inheritance better with an exa... | mit | -6,550,018,117,725,046,000 | 31.368421 | 116 | 0.630126 | false | 3.612536 | false | false | false |
Faeriol/news-summarizer | summarizer.py | 1 | 3274 | import os
from goose3 import Goose
from selenium import webdriver
from selenium.common.exceptions import UnexpectedAlertPresentException, SessionNotCreatedException, WebDriverException
from sumy.parsers.plaintext import PlaintextParser
from sumy.nlp.tokenizers import Tokenizer
from sumy.summarizers.lsa import LsaSummar... | mit | -2,505,183,108,841,201,700 | 32.408163 | 118 | 0.626145 | false | 4.082294 | false | false | false |
corerd/PyDomo | powerman/pwrmonitor.py | 1 | 6768 | #!/usr/bin/env python
#
# The MIT License (MIT)
#
# Copyright (c) 2019 Corrado Ubezio
#
# 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 r... | mit | -1,850,814,616,450,463,200 | 30.18894 | 85 | 0.655585 | false | 3.644588 | true | false | false |
jolyonb/edx-platform | common/lib/chem/chem/miller.py | 1 | 9303 | """ Calculation of Miller indices """
from __future__ import absolute_import
import decimal
import fractions as fr
import json
import math
import numpy as np
from six.moves import map
from six.moves import range
from functools import reduce
def lcm(a, b):
"""
Returns least common multiple of a, b
Args:... | agpl-3.0 | 2,638,268,032,322,332,000 | 32.584838 | 122 | 0.5868 | false | 3.622664 | false | false | false |
maaaaz/fgpoliciestocsv | fgaddressestocsv.py | 1 | 6306 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# This file is part of fgpoliciestocsv.
#
# Copyright (C) 2014, 2020, Thomas Debize <tdebize at mail.com>
# All rights reserved.
#
# fgpoliciestocsv is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as pu... | gpl-3.0 | 7,071,415,867,654,911,000 | 35.04 | 165 | 0.595465 | false | 3.956085 | false | false | false |
s5brown/MLfeatures | assignment_1_Sebastian_Brown.py | 1 | 3964 | """Assignment 1."""
from assignment_1_eval import pairs
vowels = ['a', 'e', 'i', 'o', 'u']
es_sounds = ['ch', 's', 'z']
no_change = [
'economics', 'mathematics', 'statistics', 'luggage',
'baggage', 'furniture', 'information', 'gymnastics', 'news']
always_singular = ['fish', 'barracks', 'deer',... | gpl-3.0 | -5,668,059,858,905,396,000 | 31.760331 | 114 | 0.573411 | false | 3.222764 | false | false | false |
qtproject/pyside-pyside | tests/QtQml/registertype.py | 1 | 3725 | #############################################################################
##
## Copyright (C) 2016 The Qt Company Ltd.
## Contact: https://www.qt.io/licensing/
##
## This file is part of the test suite of PySide2.
##
## $QT_BEGIN_LICENSE:GPL-EXCEPT$
## Commercial License Usage
## Licensees holding valid commercial ... | lgpl-2.1 | 2,296,957,859,559,989,800 | 30.567797 | 96 | 0.651812 | false | 3.888309 | true | false | false |
googleapis/googleapis-gen | google/ads/googleads/v8/googleads-py/google/ads/googleads/v8/services/services/campaign_simulation_service/client.py | 1 | 19104 | # -*- 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 | -7,526,720,101,945,983,000 | 45.144928 | 280 | 0.63505 | false | 4.535613 | false | false | false |
bmd/twittrscrapr | twittrscrapr/scrapers/timelinescrapr.py | 1 | 1459 | import logging
from ..parsers import DictParser
from base_scraper import TwittrScrapr
log = logging.getLogger('scrapers.TimelineScrapr')
class TimelineScrapr(TwittrScrapr):
def __init__(self, api_keys, writer):
super(TimelineScrapr, self).__init__(api_keys, writer)
def _fetch_user_timeline(self, us... | mit | -2,145,231,821,339,842,000 | 33.738095 | 112 | 0.592872 | false | 3.741026 | false | false | false |
astroclark/BayesSpec | waveforms/waveforms2hdf5.py | 1 | 1186 | #!/usr/bin/env python
"""
waveforms2hdf5.py loops over the list of waveforms defined in this script and
dumps out an hdf5 file for the plus polarisation. The idea is to then compute
the Shannon entropy of the waveforms using Matlab's wentropy.m function.
"""
import h5py
import numpy as np
import pmns_utils
wfs='/Use... | gpl-2.0 | -5,496,950,762,767,886,000 | 29.410256 | 78 | 0.713322 | false | 2.653244 | false | false | false |
Ziqi-Li/bknqgis | pandas/pandas/core/reshape/reshape.py | 1 | 45812 | # pylint: disable=E1101,E1103
# pylint: disable=W0703,W0622,W0613,W0201
from pandas.compat import range, zip
from pandas import compat
import itertools
import re
import numpy as np
from pandas.core.dtypes.common import (
_ensure_platform_int,
is_list_like, is_bool_dtype,
needs_i8_conversion)
from pandas.c... | gpl-2.0 | 8,329,274,033,396,292,000 | 33.239163 | 79 | 0.56005 | false | 3.675546 | false | false | false |
zackw/pelican | pelican/readers.py | 1 | 25554 | # -*- coding: utf-8 -*-
from __future__ import print_function, unicode_literals
import logging
import os
import re
from collections import OrderedDict
import docutils
import docutils.core
import docutils.io
from docutils.writers.html4css1 import HTMLTranslator, Writer
import six
from six.moves.html_parser import HTM... | agpl-3.0 | 7,005,900,722,206,514,000 | 35.349929 | 79 | 0.559678 | false | 4.298402 | false | false | false |
Wikidata/StrepHit | strephit/commons/date_normalizer.py | 1 | 7746 | from __future__ import absolute_import
import yaml
import re
import os
import logging
logger = logging.getLogger(__name__)
class DateNormalizer(object):
"""
find matches in text strings using regular expressions and transforms them
according to a pattern transformation expression evaluated on the match
... | gpl-3.0 | 4,360,993,509,104,244,700 | 41.097826 | 98 | 0.590627 | false | 4.64946 | false | false | false |
FedericoRessi/networking-odl | networking_odl/ml2/network_topology.py | 1 | 12691 | # Copyright (c) 2015-2016 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... | apache-2.0 | 132,776,603,059,931,380 | 38.659375 | 79 | 0.588527 | false | 4.560187 | false | false | false |
tayebzaidi/PPLL_Spr_16 | chat/client3.py | 1 | 1260 | from multiprocessing.connection import Client
from random import random
from time import sleep
from multiprocessing.connection import Listener
from multiprocessing import Process
local_listener = (('127.0.0.1', 5003),'secret client 3 password')
def client_listener():
cl = Listener(address=local_listener[0], auth... | gpl-3.0 | 7,113,699,005,899,186,000 | 28.302326 | 80 | 0.605556 | false | 4.090909 | false | false | false |
laalaguer/gae-blog-module | gaesession/handlers.py | 1 | 7633 | import webapp2
from webapp2_extras import sessions
class MainHandler(webapp2.RequestHandler):
def get(self):
# Session is stored on both client browser and our database
session_1 = self.session_store.get_session(name='dbcookie',backend='datastore')
previous_value_1 = session_1.get("my_attr_... | apache-2.0 | -2,670,067,092,621,807,600 | 45.266667 | 120 | 0.617844 | false | 3.975521 | false | false | false |
fluxcapacitor/pipeline | libs/pipeline_model/tensorflow/core/framework/tensor_slice_pb2.py | 1 | 4870 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: tensorflow/core/framework/tensor_slice.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.proto... | apache-2.0 | 6,296,427,293,374,174,000 | 35.343284 | 406 | 0.742094 | false | 3.27505 | false | true | false |
nrz/ylikuutio | external/bullet3/examples/pybullet/gym/pybullet_envs/minitaur/envs_v2/sensors/sensor.py | 2 | 15551 | # Lint as: python3
"""A sensor prototype class.
The concept is explained in: go/minitaur-gym-redesign-1.1
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from typing import Any, Iterable, Optional, Sequence, Text, Tuple, Union
import gin
import gym
im... | agpl-3.0 | 3,822,107,709,921,278,000 | 33.481153 | 82 | 0.663301 | false | 3.854027 | false | false | false |
winklerand/pandas | asv_bench/benchmarks/replace.py | 1 | 2171 | from .pandas_vb_common import *
class replace_fillna(object):
goal_time = 0.2
def setup(self):
self.N = 1000000
try:
self.rng = date_range('1/1/2000', periods=self.N, freq='min')
except NameError:
self.rng = DatetimeIndex('1/1/2000', periods=self.N, offset=date... | bsd-3-clause | 1,624,599,673,181,421,300 | 30.014286 | 91 | 0.587748 | false | 3.132756 | false | false | false |
sebastiaangroot/kmaldetect | tools/build/gen_syscall_table.py | 1 | 1860 | """
A simple python script to generate a sh table that takes the name of a syscall as input and translates it to the number corrosponding with that syscall.
This function is used in the sig_gen.sh script, used to generate an application signature for detection in kmaldetect.
Keep in mind that the '\n' characters used h... | gpl-2.0 | 9,037,986,725,254,694,000 | 38.595745 | 152 | 0.634409 | false | 3.059211 | false | false | false |
lijoantony/django-oscar-api | oscarapi/basket/operations.py | 1 | 3871 | "This module contains operation on baskets and lines"
from django.conf import settings
from oscar.core.loading import get_model, get_class
from oscar.core.utils import get_default_currency
from oscar.core.prices import Price
__all__ = (
'apply_offers',
'assign_basket_strategy',
'prepare_basket',
'get_b... | bsd-3-clause | 7,321,325,571,453,484,000 | 27.463235 | 72 | 0.675794 | false | 3.722115 | false | false | false |
mtils/ems | ems/qt/graphics/scene_manager.py | 1 | 7140 |
from ems.typehint import accepts
from ems.qt.event_hook_proxy import SignalEventHookProxy
from ems.qt import QtWidgets, QtGui, QtCore, QtPrintSupport
from ems.qt.graphics.graphics_scene import GraphicsScene, BackgroundCorrector
from ems.qt.graphics.graphics_widget import GraphicsWidget
from ems.qt.graphics.storage.int... | mit | 2,377,236,452,932,278,300 | 32.683962 | 110 | 0.67605 | false | 4.170561 | false | false | false |
pgmillon/ansible | lib/ansible/modules/database/postgresql/postgresql_tablespace.py | 1 | 16280 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Flavien Chantelot (@Dorn-)
# Copyright: (c) 2018, Antoine Levy-Lambert (@antoinell)
# Copyright: (c) 2019, Andrew Klychkov (@Andersson007) <aaklychkov@mail.ru>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
... | gpl-3.0 | -1,845,519,248,354,585,000 | 31.047244 | 120 | 0.615602 | false | 3.92952 | false | false | false |
inspirehep/invenio-formatter | invenio_formatter/models.py | 1 | 1670 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2013, 2015 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 | -1,471,349,621,209,438,200 | 26.377049 | 74 | 0.651497 | false | 3.8041 | false | false | false |
Polytechnique-org/xorgauth | xorgauth/accounts/migrations/0012_make_user_names_blank.py | 1 | 1028 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.9 on 2018-01-04 13:41
from __future__ import unicode_literals
from django.db import migrations, models
import xorgauth.utils.fields
class Migration(migrations.Migration):
dependencies = [
('accounts', '0011_make_user_ids_blank'),
]
operations =... | agpl-3.0 | 2,887,847,014,832,465,000 | 31.125 | 110 | 0.577821 | false | 4.063241 | false | false | false |
Souloist/Audio-Effects | Effects/Amplitude_Modulation/AM_example.py | 1 | 1911 | # Play a wave file with amplitude modulation.
# Assumes wave file is mono.
# This implementation reads and plays a one frame (sample) at a time (no blocking)
"""
Read a signal from a wave file, do amplitude modulation, play to output
Original: pyrecplay_modulation.py by Gerald Schuller, Octtober 2013
Modified to read ... | mit | -6,821,632,004,709,263,000 | 26.695652 | 82 | 0.6719 | false | 3.255537 | false | false | false |
mattpitkin/GraWIToNStatisticsLectures | figures/scripts/pvalue.py | 1 | 1242 | #!/usr/bin/env python
"""
Make plots showing how to calculate the p-value
"""
import matplotlib.pyplot as pl
from scipy.stats import norm
from scipy.special import erf
import numpy as np
mu = 0. # the mean, mu
sigma = 1. # standard deviation
x = np.linspace(-4, 4, 1000) # x
# set plot to render labels using latex
... | mit | 2,189,113,514,410,378,800 | 22.884615 | 100 | 0.625604 | false | 2.425781 | false | false | false |
mozvip/Sick-Beard | sickbeard/logger.py | 1 | 6374 | # Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard 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 t... | gpl-3.0 | -7,407,349,847,844,336,000 | 32.464865 | 118 | 0.568089 | false | 4.067645 | false | false | false |
c2corg/v6_api | c2corg_api/search/mappings/image_mapping.py | 1 | 1144 | from c2corg_api.models.image import IMAGE_TYPE, Image
from c2corg_api.search.mapping import SearchDocument, BaseMeta
from c2corg_api.search.mapping_types import QueryableMixin, QEnumArray, \
QInteger, QDate
class SearchImage(SearchDocument):
class Meta(BaseMeta):
doc_type = IMAGE_TYPE
activities ... | agpl-3.0 | 6,425,518,314,371,161,000 | 29.105263 | 79 | 0.681818 | false | 3.726384 | false | false | false |
ar4s/django | django/forms/widgets.py | 1 | 32506 | """
HTML Widget classes
"""
from __future__ import unicode_literals
import copy
from itertools import chain
import warnings
from django.conf import settings
from django.forms.utils import flatatt, to_current_timezone
from django.utils.datastructures import MultiValueDict, MergeDict
from django.utils.html import cond... | bsd-3-clause | -8,474,089,965,727,551,000 | 35.813137 | 130 | 0.596628 | false | 4.139837 | false | false | false |
gift-surg/GIFT-Grab | src/tests/blackmagic/stereo_capture.py | 1 | 4325 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Example demonstrating how stereo video frames can be captured
using a frame grabber card that supports this feature.
"""
import time
import cv2
import numpy as np
from pygiftgrab import (IObserver, VideoSourceFactory,
ColourSpace, Device, Vide... | bsd-3-clause | -5,324,610,510,568,604,000 | 32.269231 | 71 | 0.52 | false | 4.080189 | false | false | false |
arcade-lab/tia-infrastructure | tools/simulator/system.py | 1 | 9352 | """
Top-level system wrapper.
"""
import re
import sys
import pandas as pd
from simulator.exception import SimulatorException
class System:
"""
A system class to wrap a collection of processing and memory elements as well as the channels through which they
communicate.
"""
def __init__(self):
... | mit | 3,835,425,596,161,252,000 | 34.558935 | 118 | 0.572391 | false | 4.752033 | false | false | false |
Mariaanisimova/pythonintask | IVTp/2014/Shcherbakov_R_A/task_12_22.py | 1 | 1719 | # Задача 12. Вариант 22.
# Разработайте игру "Крестики-нолики". (см. М.Доусон Программируем на Python
# гл. 6).
# Щербаков Р.А.
# 22.05.2016
print("""
Добро пожаловать на игру крестики нолики
чтобы сделать ход введите число от 0 до 8
0 | 1 | 2
---------
3 | 4 | 5
------... | apache-2.0 | 7,851,925,064,230,096,000 | 25.137931 | 76 | 0.446205 | false | 2.092541 | false | false | false |
muff1nman/duplicity | duplicity/manifest.py | 1 | 16791 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright 2002 Ben Escoto <ben@emerose.org>
# Copyright 2007 Kenneth Loafman <kenneth@loafman.com>
#
# This file is part of duplicity.
#
# Duplicity is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License... | gpl-2.0 | -1,987,972,922,932,362,800 | 32.183794 | 128 | 0.546602 | false | 4.071532 | false | false | false |
karpeev/libmesh | doc/statistics/libmesh_citations.py | 1 | 2340 | #!/usr/bin/env python
import matplotlib.pyplot as plt
import numpy as np
# Number of "papers using libmesh" by year.
#
# Note 1: this does not count citations "only," the authors must have actually
# used libmesh in part of their work. Therefore, these counts do not include
# things like Wolfgang citing us in his pap... | lgpl-2.1 | -5,032,296,851,778,894,000 | 26.529412 | 78 | 0.674359 | false | 2.962025 | false | false | false |
meisterluk/print-nonascii.py | printnonascii/char.py | 1 | 2308 | #!/usr/bin/env python3
class Character:
def __init__(self, c):
self.character = c
self.unicode_point = None
self.lineno = None
self.colno = None
self.category = None
self.description = None
self.line = None
def asciionly(self):
assert self.descri... | bsd-3-clause | -7,909,865,003,349,707,000 | 30.135135 | 75 | 0.503906 | false | 3.891892 | false | false | false |
building4theweb/soundem-api | soundem/views.py | 1 | 5875 | from flask import g, jsonify, request, abort
from flask_cors import cross_origin
from soundem import app
from .decorators import auth_token_required
from .models import Artist, Album, Song, User
@app.route('/api/v1/login', methods=['POST'])
@cross_origin(headers=['Content-Type', 'Authorization'])
def login():
d... | mit | 6,891,862,848,539,757,000 | 24.323276 | 65 | 0.584 | false | 3.459953 | false | false | false |
notkarol/banjin | experiment/python_word_matching_speed.py | 1 | 4650 | #!/usr/bin/python
# Takes in a dictionary of words
# Verifies that all functions return the same answers
# Generates random hands from the probability of getting tiles from the bunch
# Then prints out how long each function takes to find all matching words
# Generates various hand sizes to see if there's any scaling
... | mit | 6,223,729,968,353,600,000 | 29.794702 | 99 | 0.60043 | false | 3.144016 | false | false | false |
asweigart/pyganim | examples/sprite_sheet_demo.py | 1 | 1276 | # trex image from Wyverii on http://opengameart.org/content/unsealed-terrex
import sys
import os
sys.path.append(os.path.abspath('..'))
import pygame
from pygame.locals import *
import pyganim
pygame.init()
# set up the window
windowSurface = pygame.display.set_mode((320, 240), 0, 32)
pygame.display.set_caption('Spr... | bsd-3-clause | -1,025,960,563,565,159,800 | 27.377778 | 83 | 0.633229 | false | 3.097087 | false | false | false |
Xeralux/tensorflow | tensorflow/contrib/seq2seq/python/ops/attention_wrapper.py | 1 | 59833 | # 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 | -8,393,192,901,681,401,000 | 40.782821 | 94 | 0.670449 | false | 3.934828 | false | false | false |
Vladimir-Ivanov-Git/raw-packet | Scripts/DHCP/dhcp_rogue_server.py | 1 | 47873 | #!/usr/bin/env python
# region Import
from sys import path
from os.path import dirname, abspath
project_root_path = dirname(dirname(dirname(abspath(__file__))))
utils_path = project_root_path + "/Utils/"
path.append(utils_path)
from base import Base
from network import Ethernet_raw, ARP_raw, IP_raw, UDP_raw, DHCP_raw... | unlicense | 2,859,265,539,066,611,700 | 41.478261 | 131 | 0.544649 | false | 4.269039 | false | false | false |
jadhavhninad/-CSE_515_MWD_Analytics- | Phase 1/Project Code/phase1_code/differentiate_genre.py | 1 | 17298 | from mysqlConn import DbConnect
import argparse
import operator
from math import log,fabs
import pprint
#DB connector and curosor
db = DbConnect()
db_conn = db.get_connection()
cur2 = db_conn.cursor();
#Argument parser
parser = argparse.ArgumentParser()
parser.add_argument("GENRE1")
parser.add_argument("GENRE2")
par... | gpl-3.0 | 3,274,444,029,248,706,600 | 33.875 | 133 | 0.578737 | false | 3.541044 | false | false | false |
brettdh/rbtools | rbtools/commands/status.py | 1 | 2506 | import logging
from rbtools.commands import Command, Option
from rbtools.utils.repository import get_repository_id
from rbtools.utils.users import get_username
class Status(Command):
"""Display review requests for the current repository."""
name = "status"
author = "The Review Board Project"
descript... | mit | 7,896,034,050,389,022,000 | 33.805556 | 77 | 0.553472 | false | 4.523466 | false | false | false |
mennanov/django-blueprint | project_name/apps/navigation/models.py | 1 | 1661 | # -*- coding: utf-8 -*-
from django.db import models
from django.utils.translation import ugettext_lazy as _
from mptt.models import TreeForeignKey, TreeManyToManyField, MPTTModel
class Navigation(models.Model):
"""
Navigation menu
"""
key = models.CharField(_(u'key'), max_length=32, help_text=_(u'Thi... | gpl-2.0 | -8,933,735,953,260,462,000 | 30.358491 | 118 | 0.64118 | false | 3.862791 | false | false | false |
Hummer12007/pomu | pomu/repo/repo.py | 1 | 9456 | """Subroutines with repositories"""
from os import path, rmdir, makedirs
from shutil import copy2
from git import Repo
from patch import PatchSet
import portage
from pomu.package import Package, PatchList
from pomu.util.cache import cached
from pomu.util.fs import remove_file, strip_prefix
from pomu.util.result impo... | gpl-2.0 | 5,766,960,781,250,393,000 | 38.07438 | 167 | 0.579315 | false | 3.702428 | false | false | false |
Siosm/contextd-capture | piga-systrans/selaudit/selaudit.py | 2 | 25513 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
# Configuration
# Templates
basepolname = 'template/module'
base_transpol_name = 'template/temp_transition'
makefile_path = 'template/Makefile'
# Default value for the template variables
user_u_default = 'user_u'
user_r_default = 'user_r'
user_t_default = 'user_t'
module_d... | gpl-3.0 | -7,108,910,309,036,765,000 | 32.52431 | 267 | 0.65428 | false | 2.978286 | false | false | false |
rossella/neutron | quantum/openstack/common/rpc/impl_zmq.py | 1 | 25519 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2011 Cloudscaling Group, 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/LI... | apache-2.0 | -8,324,594,890,385,945,000 | 31.018821 | 78 | 0.568361 | false | 4.02064 | false | false | false |
anlutro/botologist | plugins/qlranks.py | 1 | 2116 | import logging
log = logging.getLogger(__name__)
import requests
import requests.exceptions
import botologist.plugin
def _get_qlr_data(nick):
url = "http://www.qlranks.com/api.aspx"
response = requests.get(url, {"nick": nick}, timeout=4)
return response.json()["players"][0]
def _get_qlr_elo(nick, mod... | mit | 1,812,270,986,986,135,800 | 28.388889 | 86 | 0.58034 | false | 3.538462 | false | false | false |
Aloomaio/googleads-python-lib | examples/ad_manager/v201808/reconciliation_report_row_service/get_reconciliation_report_rows_for_reconciliation_report.py | 1 | 2609 | #!/usr/bin/env python
#
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | apache-2.0 | 5,258,400,101,180,364,000 | 39.765625 | 78 | 0.706401 | false | 4.167732 | false | false | false |
minimalparts/Tutorials | RLcafe/caffe.py | 1 | 3150 | import numpy as np
import random
environment = {
0: [('buongiorno',[[1,0,1]]),('un caffè',[[7,0,1]])],
1: [('un caffè',[[2,0,0.8],[12,-2,0.2]])],
2: [('per favore',[[3,0,1]]),('EOS',[[5,-2,0.9],[6,-1,0.1]])],
3: [('EOS',[[4,-1,1]])],
7: [('per favore',[[8,0,1]]),('EOS',[[9,-3,1]])],
8: [('EOS',[[10,-2,0.9],[11,-... | mit | -4,122,450,842,618,977,300 | 30.148515 | 161 | 0.586459 | false | 2.902214 | false | false | false |
broadinstitute/cms | cms/power/power_func.py | 1 | 8625 | ## functions for analyzing empirical/simulated CMS output
## last updated 09.14.2017 vitti@broadinstitute.org
import matplotlib as mp
mp.use('agg')
import matplotlib.pyplot as plt
import numpy as np
import math
from scipy.stats import percentileofscore
###################
## DEFINE SCORES ##
###################
def... | bsd-2-clause | 7,845,082,051,252,510,000 | 34.9375 | 143 | 0.679072 | false | 2.7976 | false | false | false |
geosohh/AnimeTorr | animetorr/manager/log.py | 1 | 7132 | # -*- coding: utf-8 -*-
"""
Log window.
"""
__author__ = 'Sohhla'
import os
from PyQt4 import QtGui, QtCore
from qt.log import Ui_Dialog as Ui_Log
from shared import constant
# TODO: Works, but waaaaaay too slow to load
class LogUpdater(QtCore.QObject):
"""
Updates the [Log window].
"""
finish = Qt... | gpl-2.0 | -3,731,463,448,882,287,600 | 35.768041 | 122 | 0.514582 | false | 4.129705 | false | false | false |
metno/gridpp | tests/neighbourhood_quantile_fast_test.py | 1 | 5647 | from __future__ import print_function
import unittest
import gridpp
import numpy as np
lats = [60, 60, 60, 60, 60, 70]
lons = [10,10.1,10.2,10.3,10.4, 10]
"""Simple check
20 21 22 23 24
15 16 17 18 19
10 11 12 13 nan
5 6 7 nan 9
0 1 2 3 4
"""
values = np.reshape(range(25), [5, 5]).astype(float)
values[1, 3] ... | gpl-2.0 | 6,977,101,496,407,008,000 | 39.335714 | 132 | 0.606517 | false | 3.290793 | true | false | false |
Fenixin/yogom | tryengine/fontrenderer.py | 1 | 8186 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is part of TryEngine.
#
# 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 o... | gpl-3.0 | -3,237,735,693,081,282,000 | 32.137652 | 107 | 0.5719 | false | 3.688598 | false | false | false |
kgn/cssutils | src/cssutils/tokenize2.py | 1 | 9735 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""New CSS Tokenizer (a generator)
"""
__all__ = ['Tokenizer', 'CSSProductions']
__docformat__ = 'restructuredtext'
__version__ = '$Id$'
from cssproductions import *
from helper import normalize
import itertools
import re
_TOKENIZER_CACHE = {}
class Tokeni... | gpl-3.0 | -3,785,011,545,157,365,000 | 41.851351 | 101 | 0.451567 | false | 4.901813 | false | false | false |
startcode/apollo | modules/tools/prediction/mlp_train/merge_h5.py | 1 | 2643 | #!/usr/bin/env python
###############################################################################
# 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 ... | apache-2.0 | -8,108,443,370,418,419,000 | 32.455696 | 92 | 0.595157 | false | 3.875367 | false | false | false |
twitter/heron | integration_test/src/python/integration_test/topology/one_spout_multi_tasks/one_spout_multi_tasks.py | 2 | 1572 | #!/usr/bin/env python3
# -*- encoding: utf-8 -*-
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apach... | apache-2.0 | 4,743,227,587,584,489,000 | 40.368421 | 81 | 0.741094 | false | 3.787952 | true | false | false |
webbhorn/Arduino-Switch-Controller | arduino/arduino.py | 1 | 2214 | #!/usr/bin/env python
import serial, time
class Arduino(object):
__OUTPUT_PINS = -1
def __init__(self, port, baudrate=9600):
self.serial = serial.Serial(port, baudrate)
def __str__(self):
return "Arduino is on port %s at %d baudrate" %(self.serial.port, self.serial.baudrate)
def ou... | mit | 4,657,381,806,307,410,000 | 24.744186 | 95 | 0.555104 | false | 3.771721 | false | false | false |
clouserw/zamboni | mkt/websites/views.py | 1 | 1959 | from django.db.transaction import non_atomic_requests
from rest_framework.generics import ListAPIView
from rest_framework.permissions import AllowAny
from mkt.api.authentication import (RestOAuthAuthentication,
RestSharedSecretAuthentication)
from mkt.api.base import CORSMixin, Mar... | bsd-3-clause | -3,533,117,552,146,456,000 | 38.979592 | 79 | 0.720265 | false | 4.462415 | false | false | false |
rizumu/bootmachine | bootmachine/management/__init__.py | 1 | 3322 | # (c) 2008-2011 James Tauber and contributors; written for Pinax (http://pinaxproject.com)
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
import os
import sys
import bootmachine
BOOTMACHINE_COMMAND_DIR = os.path.join(
os.path.dirname(bootmachine.__file__), "management", "com... | mit | -1,116,202,746,595,356,300 | 30.339623 | 90 | 0.54124 | false | 4.353866 | false | false | false |
DiCarloLab-Delft/PycQED_py3 | pycqed/utilities/pulse_scheme.py | 1 | 5469 | import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches
def new_pulse_fig(figsize):
'''
Open a new figure and configure it to plot pulse schemes.
'''
fig, ax = plt.subplots(1, 1, figsize=figsize, frameon=False)
ax.axis('off')
fig.subplots_adjust(bottom=0, top=1, left=0, ri... | mit | -4,925,029,477,719,938,000 | 32.552147 | 89 | 0.585848 | false | 2.957815 | false | false | false |
TheWiseLion/pykhet | tests/game_tests.py | 1 | 5304 | import unittest
from pykhet.components.types import MoveType, Move, TeamColor, Orientation
from pykhet.components.types import Position
from pykhet.games.game_types import ClassicGame
class TestClassicGames(unittest.TestCase):
def setUp(self):
self.game = ClassicGame()
def tearDown(self):
s... | mit | 1,106,180,224,603,944,700 | 41.774194 | 89 | 0.643477 | false | 2.963128 | true | false | false |
takeshineshiro/heat | heat/common/timeutils.py | 1 | 2831 | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | apache-2.0 | -6,785,138,763,645,567,000 | 29.771739 | 78 | 0.655245 | false | 3.759628 | false | false | false |
bsilverthorn/qy | src/qy/test/test_language.py | 1 | 8791 | """
@author: Bryan Silverthorn <bcs@cargo-cult.org>
"""
import math
import numpy
import qy
from nose.tools import (
assert_true,
assert_false,
assert_equal,
assert_raises,
assert_almost_equal,
)
from qy import (
emit_and_execute,
Object,
)
def test_qy_python_no_arguments():
""... | mit | 2,407,731,293,992,260,000 | 18.449115 | 74 | 0.475145 | false | 3.366909 | true | false | false |
blstream/ut-arena | ut_arena_py_api/ut_arena/settings.py | 1 | 3193 | """
Django settings for ut_arena_py_api project.
Generated by 'django-admin startproject' using Django 1.9.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
impo... | apache-2.0 | 7,903,634,078,388,148,000 | 26.765217 | 91 | 0.68932 | false | 3.551724 | false | false | false |
brean/python-pathfinding | pathfinding/finder/finder.py | 1 | 6586 | # -*- coding: utf-8 -*-
import heapq # used for the so colled "open list" that stores known nodes
import time # for time limitation
from pathfinding.core.util import SQRT2
from pathfinding.core.diagonal_movement import DiagonalMovement
# max. amount of tries we iterate until we abort the search
MAX_RUNS = float('in... | mit | -7,266,928,208,447,150,000 | 35.588889 | 79 | 0.58928 | false | 4.23537 | false | false | false |
django-id/website | app_author/models.py | 1 | 2195 | from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
from django.db import models
from django.db.models.signals import post_save
from django.dispatch import receiver
# CUSTOM FILE SIZE VALIDATOR
def validate_image(fieldfile_obj):
"""
Limit image size upload
"""
... | mit | -1,107,724,903,978,328,600 | 21.397959 | 76 | 0.618223 | false | 3.933692 | false | false | false |
mhl/mysociety-cvs | sitestats/pylib/sitestats/backports/contrib/auth/middleware.py | 1 | 2933 | from django.contrib import auth
from django.core.exceptions import ImproperlyConfigured
class RemoteUserMiddleware(object):
"""
Middleware for utilizing web-server-provided authentication.
If request.user is not authenticated, then this middleware attempts to
authenticate the username passed in the ``... | agpl-3.0 | -5,813,389,405,922,956,000 | 42.776119 | 79 | 0.650869 | false | 5.030875 | false | false | false |
perfidia/seleshot | doc/gen_api.py | 1 | 3756 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
import os
import sys
import string
sys.path.append('../src')
import seleshot
TEMPLATE = """===
API
===
"""
OUTPUT = os.path.join("_static", "api.txt")
# from http://legacy.python.org/dev/peps/pep-0257/
def trim(docstring):
if not docstring:
re... | mit | 3,779,118,023,028,133,400 | 28.809524 | 183 | 0.536741 | false | 3.224034 | false | false | false |
nanshihui/PocCollect | component/JDWP/JDWPvul.py | 1 | 2106 | #!/usr/bin/env python
# encoding: utf-8
from t import T
import os
import platform
import subprocess
import signal
import time
import requests,urllib2,json,urlparse
class TimeoutError(Exception):
pass
def command(cmd, timeout=60):
"""Run command and return the output
cmd - the command to run
timeout - m... | mit | -8,082,791,348,985,507,000 | 31.4 | 135 | 0.57265 | false | 4.05 | false | false | false |
glmcdona/meddle | examples/example_deviceiocontrol/processes.py | 1 | 1377 | from process_base import *
from targets import *
import subprocess
import os
class ProcessDeviceIo(ProcessBase):
def __init__(self, Controller, crashdump_folder, breakpoint_handler, pid, ph, unique_identifier, verbose, logger):
# Specific options
self.path_to_exe = b"C:\\Windows\\System32\\notepad.exe"
self.c... | mit | 4,168,101,267,918,378,500 | 28.319149 | 149 | 0.713145 | false | 3.326087 | false | false | false |
building39/nebula2 | scripts/cdmi_explorer/CDMIMain/handlers.py | 1 | 2951 | '''
Created on Jun 9, 2013
@author: mmartin
'''
import sys
from gi.repository import Gtk
from CDMIAbout import CDMIAbout
from CDMIConnect import CDMIConnect
from CDMIHelp import CDMIHelp
class Handlers(object):
'''
classdocs
'''
def __init__(self, session):
self.session = session
de... | apache-2.0 | -8,973,868,036,584,532,000 | 27.375 | 85 | 0.54795 | false | 3.634236 | false | false | false |
cliburn/flow | src/plugins/statistics/summary.py | 1 | 1069 | """Provide summary statistics on data."""
from plugin import Statistics
from numpy import min, max, mean, median, std
class Summary(Statistics):
"""Plugin to display summary statistics"""
name = "Summary"
def Main(self, model):
"""Calculate summary statistics"""
self.model = model
f... | gpl-3.0 | -8,669,594,832,415,969,000 | 41.76 | 76 | 0.63985 | false | 3.636054 | false | false | false |
mementum/backtrader | backtrader/analyzers/logreturnsrolling.py | 1 | 5020 | #!/usr/bin/env python
# -*- coding: utf-8; py-indent-offset:4 -*-
###############################################################################
#
# Copyright (C) 2015-2020 Daniel Rodriguez
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License a... | gpl-3.0 | -3,908,883,812,775,189,000 | 34.857143 | 79 | 0.60996 | false | 4.27234 | false | false | false |
codilime/cloudify-agent | cloudify_agent/installer/config/decorators.py | 1 | 5377 | #########
# Copyright (c) 2015 GigaSpaces Technologies Ltd. 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... | apache-2.0 | -2,597,727,802,150,284,000 | 36.340278 | 77 | 0.53766 | false | 4.874887 | false | false | false |
liubenyuan/vispy-tutorial | examples/04-tetrahedron.py | 1 | 4445 | # pylint: disable=invalid-name, no-member, unused-argument
""" passing varyings to fragment """
import numpy as np
from vispy import app, gloo
from vispy.util.transforms import translate, perspective, rotate
# note the 'color' and 'v_color' in vertex
vertex = """
uniform mat4 u_model; // Model matrix
uniform... | apache-2.0 | 7,396,573,617,910,617,000 | 30.524823 | 74 | 0.525309 | false | 3.39313 | false | false | false |
seomoz/simhash-db-py | simhash_db/hbase_client.py | 1 | 3893 | #! /usr/bin/env python
'''Our code to connect to the HBase backend. It uses the happybase
package, which depends on the Thrift service that (for now) is
part of HBase.'''
from gevent import monkey
monkey.patch_all()
import struct
import happybase
import Hbase_thrift
from . import BaseClient
def column_name(integer... | mit | 7,742,667,128,239,649,000 | 31.714286 | 79 | 0.553301 | false | 3.936299 | false | false | false |
awes0menessInc/python-projects | Alien-Invasion/button.py | 1 | 1269 | import pygame.font
class Button():
""" A class to create a button. """
def __init__(self, screen, msg):
"""Initialize button attributes."""
self.screen = screen
self.screen_rect = screen.get_rect()
# Set the dimensions and properties of the button.
self.width, self.he... | mit | 4,828,632,466,260,825,000 | 35.257143 | 75 | 0.602049 | false | 3.754438 | false | false | false |
msfrank/mandelbrot | mandelbrot/registry.py | 1 | 3001 | # Copyright 2015 Michael Frank <msfrank@syntaxjockey.com>
#
# This file is part of Mandelbrot.
#
# Mandelbrot is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your opti... | gpl-3.0 | -5,360,309,663,945,176,000 | 39.013333 | 107 | 0.654782 | false | 4.088556 | false | false | false |
lunixbochs/actualvim | lib/neovim/api/buffer.py | 1 | 6063 | """API for working with a Nvim Buffer."""
from .common import Remote
from ..compat import IS_PYTHON3
__all__ = ('Buffer')
if IS_PYTHON3:
basestring = str
def adjust_index(idx, default=None):
"""Convert from python indexing convention to nvim indexing convention."""
if idx is None:
return defau... | mit | 3,638,414,735,793,391,600 | 30.414508 | 80 | 0.568036 | false | 3.937013 | false | false | false |
mikehankey/fireball_camera | ffmpeg_record.py | 1 | 2859 | #!/usr/bin/python3
import glob
import sys
import subprocess
import os
import time
video_dir = "/mnt/ams2"
def check_running(cam_num, type):
if type == "HD":
cmd = "ps -aux |grep \"ffmpeg\" | grep \"HD\" | grep \"cam" + cam_num + "\" | grep -v grep | wc -l"
else:
cmd = "ps -aux |grep \"ffmpeg\" | gr... | gpl-3.0 | 4,738,862,852,939,186,000 | 25.971698 | 239 | 0.564533 | false | 2.841948 | false | false | false |
release-engineering/fedmsg_meta_umb | fedmsg_meta_umb/rpmdiff.py | 1 | 2379 | # Copyright (C) 2017 Red Hat, Inc.
#
# fedmsg_meta_umb 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 2.1 of the License, or (at your option) any later version.
#
# fedmsg_meta_umb is ... | lgpl-2.1 | 5,623,728,822,967,871,000 | 40.736842 | 78 | 0.623792 | false | 3.800319 | false | false | false |
jesuscript/topo-mpi | param/external.py | 1 | 68357 | """
External code required for param/tkinter interface.
* odict: an ordered dictionary
* tilewrapper: a wrapper for Tile/ttk widgets
Note that an ordered dictionary and a wrapper for ttk widgets are both
available in Python 2.7.
"""
from __future__ import generators
# odict.py
# An Ordered Dictionary object
# Copyr... | bsd-3-clause | 419,085,562,894,774,600 | 34.977368 | 93 | 0.506839 | false | 4.092743 | false | false | false |
andrecunha/idd3 | examine.py | 1 | 2041 | # -*- coding: utf-8 -*-
# IDD3 - Propositional Idea Density from Dependency Trees
# Copyright (C) 2014-2015 Andre Luiz Verucci da Cunha
#
# 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 ... | gpl-3.0 | 3,371,991,498,734,300,700 | 30.890625 | 78 | 0.696227 | false | 3.751838 | false | false | false |
JMSwag/jms-utils | jms_utils/terminal.py | 1 | 8327 | # --------------------------------------------------------------------------
# The MIT License (MIT)
#
# Copyright (c) 2014-2016 Digital Sapphire
#
# 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 Soft... | mit | -2,106,631,287,010,268,000 | 28.217544 | 79 | 0.578119 | false | 3.9976 | false | false | false |
f5devcentral/f5-cccl | f5_cccl/resource/net/fdb/record.py | 1 | 1541 | """Provides a class for managing BIG-IP FDB tunnel record resources."""
# coding=utf-8
#
# Copyright (c) 2017-2021 F5 Networks, 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
#
# htt... | apache-2.0 | 8,939,869,457,900,549,000 | 32.5 | 74 | 0.69695 | false | 3.992228 | false | false | false |
emilkjer/django-model-utils | model_utils/managers.py | 1 | 8414 | from types import ClassType
import warnings
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.db.models.fields.related import OneToOneField
from django.db.models.manager import Manager
from django.db.models.query import QuerySet
import django
class InheritanceQuerySe... | bsd-3-clause | 8,724,807,216,674,744,000 | 36.395556 | 103 | 0.611719 | false | 4.114425 | false | false | false |
ace3df/ImageTweet | plugins/safebooru.py | 1 | 9578 | # -*- coding: utf-8 -*-
import random
import time
import sys
import os
import re
sys.path.append(
os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir)))
import utils
def delete_image(image):
import time
time.sleep(10)
os.remove(image)
def tag_clean(tag_html):
text = tag_html.t... | mit | 392,481,504,197,402,100 | 37.934959 | 79 | 0.448423 | false | 4.12667 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.