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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
evereux/flicket | application/flicket/forms/form_login.py | 1 | 3293 | #! usr/bin/python3
# -*- coding: utf-8 -*-
#
# Flicket - copyright Paul Bourne: evereux@gmail.com
import bcrypt
from flask_wtf import FlaskForm
from flask_babel import lazy_gettext
from sqlalchemy import func, or_
from wtforms import BooleanField
from wtforms import PasswordField
from wtforms import StringField
from w... | mit | -8,384,880,243,895,783,000 | 33.302083 | 117 | 0.686608 | false | 4.025672 | false | false | false |
openstack/python-openstackclient | openstackclient/tests/unit/compute/v2/test_service.py | 1 | 17877 | # Copyright 2015 Mirantis, 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... | apache-2.0 | 3,324,645,135,320,139,300 | 33.780156 | 79 | 0.578788 | false | 4.026351 | true | false | false |
stevejarvis/scrawl-recognition | NetworkTraining/postprocess.py | 1 | 3723 | #!/opt/local/bin/python2
'''
The goal here is to unpreprocess the data from the MNIST database. It's too
consistent with the piece of frame the digit takes in the middle of the image.
I want to messy it up a bit to improve accuracy in the application.
The training application assumes 28x28 size, so this and the tests ... | mit | -1,910,448,682,131,775,700 | 36.616162 | 80 | 0.609992 | false | 3.689792 | false | false | false |
BackupTheBerlios/espressopp | src/VerletList.py | 1 | 3261 | # Copyright (C) 2012,2013
# Max Planck Institute for Polymer Research
# Copyright (C) 2008,2009,2010,2011
# Max-Planck-Institute for Polymer Research & Fraunhofer SCAI
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of t... | gpl-3.0 | -2,282,079,519,401,899,500 | 33.691489 | 87 | 0.601963 | false | 3.943168 | false | false | false |
anovak10/plots | DDTmethod/WJETcut.py | 1 | 4933 | import sys
from optparse import OptionParser
import ROOT
from ROOT import *
ROOT.gROOT.SetBatch(ROOT.kTRUE)
from Plotting_Header import *
import numpy as np
import timeit
parser = OptionParser()
parser.add_option("-d", "--dir", action="store", dest="pwd", default="/home/storage/andrzejnovak/80Trees/", help="directory ... | mit | 5,725,356,878,484,570,000 | 32.107383 | 159 | 0.640989 | false | 2.409868 | false | false | false |
djo938/adafruit_lcd_menu | emulator.py | 1 | 2269 | #Embedded file name: /Volumes/Home/development/goprodumper/emulator.py
import threading
import curses
class emulator(threading.Thread):
LEFT = 0
UP = 1
DOWN = 2
RIGHT = 3
SELECT = 4
ON = 5
OFF = 6
def __init__(self):
threading.Thread.__init__(self)
self.alive = threadin... | gpl-3.0 | 1,218,634,211,670,061,300 | 29.253333 | 70 | 0.527104 | false | 4.088288 | false | false | false |
lczub/TestLink-API-Python-client | test/utest-offline/testlinkapigeneric_offline_test.py | 1 | 44470 | #! /usr/bin/python
# -*- coding: UTF-8 -*-
# Copyright 2013-2019 Luiko Czub, TestLink-API-Python-client developers
#
# 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... | apache-2.0 | -4,669,246,654,804,798,000 | 54.580153 | 454 | 0.557859 | false | 3.852218 | true | false | false |
druska/shorturls | app.py | 1 | 1912 | from urlparse import urlparse
from lib.numbers import base36encode
from models import db, Url
from flask import Flask, Response, json, request, redirect
app = Flask(__name__)
# db.create_all()
@app.route("/create", methods=["GET", "POST"])
def create():
"""Create a short URL and return a JSON response."""
f... | mit | 330,336,135,200,007,900 | 30.866667 | 85 | 0.577406 | false | 3.91002 | false | false | false |
yhalk/vw_challenge_ECR | src/jetson/communication.py | 1 | 1903 | from Vision.vision_commands import addVisionDevices
from functools import partial
import paho.mqtt.client as mqtt
import config as config
import json
import ev3control.slave as slave
import time
def get_behaviours_and_params(behaviour_json, params_json):
#Get {behaviour name: behavior function name} dictionary
... | apache-2.0 | 3,807,647,506,207,860,700 | 32.982143 | 111 | 0.679979 | false | 3.557009 | false | false | false |
mikehulluk/morphforge | src/morphforgecontrib/data_library/contrib_channel_examples/chls_neuroml_via_neurounits.py | 1 | 2523 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------
# Copyright (c) 2012 Michael Hull.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are... | bsd-2-clause | -881,420,258,761,876,600 | 48.470588 | 144 | 0.718589 | false | 3.672489 | false | false | false |
rickyschools/JARVIS | core/data_management.py | 1 | 4275 | import os
import string
import pathlib
import pandas as pd
import sqlalchemy
from sqlalchemy.engine.url import URL
from sqlalchemy.pool import QueuePool
from sqlalchemy_utils.functions import create_database, database_exists
from sqlalchemy.orm import sessionmaker, scoped_session
database_name = 'JARVIS_DB'
database_... | mit | -3,539,973,668,470,575,600 | 30.902985 | 105 | 0.60655 | false | 3.45315 | false | false | false |
openlilylib/lily-fonts | util/fonts.py | 1 | 8934 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# This file is part of the lily-fonts project
# https://github.com/openlilylib/lily-fonts
#
# Copyright (c) 2015 by Urs Liska (ul@openlilylib.org)
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License... | gpl-3.0 | 7,273,009,343,646,204,000 | 31.487273 | 106 | 0.549922 | false | 4.236131 | false | false | false |
jn-gautier/exercices_moodle | chimie/exe_masse_molaire.py | 1 | 8896 | #! /usr/bin/python3
# -*- coding: utf-8 -*-
import random
def convert_sci(nombre):
nombre_sci='%.4E' %(nombre)
nombre_sci=nombre_sci.split('E')
base=nombre_sci[0]
exposant=nombre_sci[1]
nombre=float(base)*(10**int(exposant)) #on reformate le nombre pour ne conserver que 4 chifres signi... | gpl-3.0 | -728,381,057,046,369,800 | 33.944882 | 141 | 0.515718 | false | 2.937769 | false | false | false |
abigailc/feast-etc | FISH.py | 1 | 28451 | #!/usr/bin/python
#this is a conglomerate of fasta-fixing scripts, now called FISH (FASTA ID SWAPPING HELPER) because lol i can acronym.
##
#last edit abigailc@Actaeon Sept 7 2016
#things this doesn't do: play super nice with accession numbers instead of GI numbers. probably easy to convert, (see that one script that ... | mit | 78,416,985,553,172,740 | 32.910608 | 256 | 0.632245 | false | 2.92766 | false | false | false |
onegambler/home-assistant-config | custom_components/switch/foscam_motion_detection.py | 1 | 3011 | """
Demo platform that has two fake switches.
For more details about this platform, please refer to the documentation
https://home-assistant.io/components/demo/
"""
import logging
from time import sleep
import voluptuous as vol
from homeassistant.components.switch import (SwitchDevice, PLATFORM_SCHEMA)
from homeassis... | unlicense | 7,683,409,979,017,872,000 | 29.72449 | 95 | 0.672534 | false | 3.671951 | true | false | false |
dis-xcom/reclass_tools | reclass_tools/cli.py | 1 | 13195 | # Copyright 2013 - 2017 Mirantis, 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 ... | apache-2.0 | 52,236,786,645,343,280 | 41.702265 | 84 | 0.524365 | false | 4.662544 | false | false | false |
harikishen/addons-server | src/olympia/stats/management/commands/theme_update_counts_from_file.py | 1 | 5206 | import codecs
from datetime import datetime, timedelta
from optparse import make_option
from os import path, unlink
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
import olympia.core.logger
from olympia import amo
from olympia.addons.models import Addon, Persona
fro... | bsd-3-clause | -3,044,037,007,326,587,400 | 39.046154 | 79 | 0.567998 | false | 4.17482 | false | false | false |
gambettinha/hello-world-django | hello_world/hello_world/settings.py | 1 | 2221 | """
Django settings for hello_world project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...... | apache-2.0 | 6,174,207,258,913,423,000 | 23.955056 | 88 | 0.719045 | false | 3.256598 | false | false | false |
koehlma/uv | tests/test_pipe.py | 1 | 3350 | # -*- coding: utf-8 -*-
# Copyright (C) 2016, Maximilian Köhl <mail@koehlma.de>
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License version 3 as published by
# the Free Software Foundation.
#
# This program is distributed in the hope th... | lgpl-3.0 | -6,117,798,021,373,451,000 | 35.402174 | 88 | 0.667065 | false | 3.597207 | true | false | false |
jasonbot/arcrest | arcrest/__init__.py | 1 | 2924 | # coding: utf-8
"""Arcrest is a Python binding to the ArcGIS REST Server API, similar to the
JavaScript or Flex API in program structure as well as in the way it
interfaces with ArcGIS servers.
Getting Started with Arcrest
============================
A simple example of connecting to a server:
... | apache-2.0 | 769,865,157,122,799,900 | 42.641791 | 228 | 0.683653 | false | 3.368664 | false | false | false |
albireox/marvin | python/marvin/utils/datamodel/__init__.py | 1 | 8385 | # !usr/bin/env python
# -*- coding: utf-8 -*-
#
# Licensed under a 3-clause BSD license.
#
# @Author: Brian Cherinka
# @Date: 2017-09-20 10:31:11
# @Last modified by: José Sánchez-Gallego (gallegoj@uw.edu)
# @Last modified time: 2018-08-04 13:22:38
from __future__ import absolute_import, division, print_function
im... | bsd-3-clause | 1,864,685,528,801,085,700 | 35.290043 | 97 | 0.566623 | false | 4.045849 | false | false | false |
rwgdrummer/maskgen | plugins/DonorlessOperation/__init__.py | 1 | 2669 | import logging
from maskgen import video_tools
import random
import maskgen.video_tools
import os
import maskgen
import json
plugin = "DonorPicker"
def transform(img, source, target, **kwargs):
valid = []
possible = []
data = {}
logging.getLogger('maskgen').info(str(kwargs))
for f in os.listdir(kwa... | bsd-3-clause | -7,486,791,668,105,619,000 | 37.142857 | 124 | 0.552267 | false | 3.885007 | false | false | false |
thearrow9/pychess | test/test_legal_moves.py | 1 | 1328 | import unittest
import sys
sys.path.append('pychess')
import game
class LegalMovesTest(unittest.TestCase):
def setUp(self):
self.game = game.Game(
'8/8/8/3Kq3/5k2/8/8/8 w - - 0 1')
self.white_king = self.game.first_piece(['K'], 0)
def test_queen_attacks(self):
self.assertI... | mit | -8,625,871,366,935,353,000 | 28.511111 | 62 | 0.600904 | false | 2.862069 | true | false | false |
audaciouscode/SMSBot | smsbot_django/twisted_sms/api.py | 1 | 3277 | import datetime
import json
import urllib
import urllib2
import uuid
from django.template import loader, Context
class Endpoint:
def __init__(self, configuration):
self.configuration = configuration
def _get_url_payload(self):
url = self.configuration['endpoint']
payload = {}
... | gpl-3.0 | 3,745,225,402,062,564,400 | 28.531532 | 75 | 0.538602 | false | 4.812041 | false | false | false |
jedp/python-redis-log | redislog/handlers.py | 1 | 2903 | import logging
import redis
import simplejson as json
class RedisFormatter(logging.Formatter):
def format(self, record):
"""
JSON-encode a record for serializing through redis.
Convert date to iso format, and stringify any exceptions.
"""
data = record._raw.copy()
... | mit | -5,915,411,091,208,280,000 | 30.215054 | 97 | 0.612125 | false | 4.170977 | false | false | false |
CroissanceCommune/autonomie | autonomie/models/training/trainer.py | 1 | 6390 | # -*- coding: utf-8 -*-
# * Authors:
# * TJEBBES Gaston <g.t@majerti.fr>
# * Arezki Feth <f.a@majerti.fr>;
# * Miotte Julien <j.m@majerti.fr>;
"""
Fiche formateur
Extension du module User qui vient rajouter la possibilité de stocker des
informations sur les formateurs
"""
from sqlalchemy import (
... | gpl-3.0 | 4,392,174,940,988,416,000 | 27.070796 | 80 | 0.501892 | false | 3.654378 | false | false | false |
dietrichc/streamline-ppc-reports | examples/dfp/v201403/publisher_query_language_service/fetch_match_tables.py | 1 | 1939 | #!/usr/bin/python
#
# Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 | -4,074,148,779,056,361,500 | 33.017544 | 79 | 0.708613 | false | 3.651601 | false | false | false |
sigproc/robotic_surgery | src/ros/crustcrawler_smart_arm/smart_arm_controller/nodes/dynamixel_joint_state_publisher.py | 1 | 3511 | #!/usr/bin/env python
"""
dynamixel_joint_state_publisher.py - Version 1.0 2010-12-28
Publish the dynamixel_controller joint states on the /joint_states topic
Created for the Pi Robot Project: http://www.pirobot.org
Copyright (c) 2010 Patrick Goebel. All rights reserved.
This program is... | mit | 7,835,371,739,350,356,000 | 35.572917 | 118 | 0.620336 | false | 4.125734 | false | false | false |
jspam/temci | temci/misc/game.py | 1 | 89954 | """
Benchmarks game inspired comparison of different implementations for a given language.
It doesn't really belong directly to the temci tool, but uses big parts of it.
It's currently in a pre alpha state as it's a part of the evaluation for my bachelor thesis
that I'm currently doing,
"""
import temci.utils.util as... | gpl-3.0 | 4,495,151,863,252,054,500 | 43.82013 | 212 | 0.564411 | false | 3.564935 | true | false | false |
andrewdarmawan/tncontract | tncontract/tensor.py | 1 | 45735 | from __future__ import (absolute_import, division,
print_function, unicode_literals)
__all__ = ['Tensor', 'contract', 'distance', 'matrix_to_tensor',
'tensor_to_matrix', 'random_tensor', 'tensor_product', 'tensor_svd',
'truncated_svd', 'zeros_tensor']
import copy
import w... | mit | 6,470,958,451,871,055,000 | 37.432773 | 142 | 0.587515 | false | 3.886057 | false | false | false |
pzdeb/SimpleCommander | src/simple_commander/game/hero.py | 1 | 3022 | """ This module describes behaviour of Hero objects. """
import asyncio
import logging
import math
from datetime import datetime
from random import randint
from simple_commander.game.unit import Unit
from simple_commander.utils.constants import UNITS
class Hero(Unit):
def __init__(self, x, y, angle, hits=0, sp... | mit | -6,105,778,803,335,388,000 | 33.747126 | 117 | 0.569821 | false | 3.606205 | false | false | false |
jingriver/stocktracker | pytoolkit/python_features/testGenerator.py | 1 | 4803 | from __future__ import nested_scopes
#Coroutines are more generic than subroutines. The lifespan of subroutines is dictated by last in, first out (the last subroutine called is the first to return); in contrast, the lifespan of coroutines is dictated entirely by their use and need.
#
#The start of a subroutine is th... | mit | -2,301,791,376,851,616,500 | 43.761905 | 556 | 0.678118 | false | 4.14409 | false | false | false |
Ursidae44/pygamegeek | travis_pypi_setup.py | 1 | 3758 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Update encrypted deploy password in Travis config file
"""
from __future__ import print_function
import base64
import json
import os
from getpass import getpass
import yaml
from cryptography.hazmat.primitives.serialization import load_pem_public_key
from cryptography.h... | mit | 3,649,924,327,704,482,000 | 29.803279 | 79 | 0.679617 | false | 3.706114 | true | false | false |
trevor/calendarserver | contrib/performance/loadtest/sim.py | 1 | 22197 | # -*- test-case-name: contrib.performance.loadtest.test_sim -*-
##
# Copyright (c) 2011-2014 Apple 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.apa... | apache-2.0 | 5,998,998,797,205,297,000 | 30.52983 | 136 | 0.595125 | false | 4.545771 | true | false | false |
leonkoens/utop | utop/lib/cpu.py | 1 | 1132 | import subprocess
from utop.lib.dataobject import DataObject
class CPU:
def __init__(self, line):
"""
Create a new CPU object which parses the data from the output of /proc/stat.
"""
labels = [
'user', 'nice', 'system', 'idle', 'iowait', 'irq', 'softirq', 'steal', 'g... | bsd-3-clause | 5,476,429,127,472,338,000 | 17.557377 | 91 | 0.483216 | false | 3.916955 | false | false | false |
GluuFederation/community-edition-setup | schema/detect_data_types.py | 1 | 1493 | import os
import re
import json
dataTypes = {'string':[],'integer':[],'boolean':[]}
def collectDataTypes(jdir):
for root, dirs, files in os.walk(jdir):
path = root.split(os.sep)
for f in files:
fn=os.path.join(root, f)
if fn.endswith('.java'):
ff = open(fn).... | mit | 5,704,356,660,453,886,000 | 35.414634 | 72 | 0.394508 | false | 4.816129 | false | false | false |
altaurog/django-caspy | caspy/closure.py | 1 | 5343 | from django.db import models, connection
def pathstr(self):
return ' '.join(map(str, (self.upper_id, self.lower_id, self.length)))
def path_model(model):
name = model.__name__ + 'Path'
uniqueness = {'unique_together': [('upper', 'lower')]}
attrs = {
'upper': models.ForeignKey(model, rela... | bsd-3-clause | -7,171,023,177,584,541,000 | 31.186747 | 75 | 0.536964 | false | 3.863341 | false | false | false |
tectronics/open-ihm | src/openihm/outputs/routines/export_food_crop_kcal.py | 1 | 3649 | #!/usr/bin/env python
"""
This file is part of open-ihm.
open-ihm is free software: you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
Free Software Foundation, either version 3 of the License, or (at your
option) any later version.
open-ihm is di... | lgpl-3.0 | -851,524,730,713,278,800 | 36.010417 | 152 | 0.638531 | false | 3.801042 | false | false | false |
kimjinyong/i2nsf-framework | Hackathon-104/SecurityController/testserver.py | 1 | 1854 | #!/usr/bin/python
#-*- coding:utf-8 -*-
import API.DFAAPI as DFA
import API.CFGAPI as CFG
import API.converter as converter
import API.socketAPI as socketAPI
import threading
# construct DFA based Data Extractor
consumer = DFA.dfa_construction('DataModel/cfi_dm.txt')
consumer_dfa = consumer[0]
consumer_extractedinfo ... | apache-2.0 | -887,996,210,819,563,500 | 32.107143 | 134 | 0.778857 | false | 3.408088 | false | false | false |
batermj/algorithm-challenger | code-analysis/programming_anguage/python/source_codes/Python3.8.0/Python-3.8.0/Lib/email/_header_value_parser.py | 1 | 106086 | """Header value parser implementing various email-related RFC parsing rules.
The parsing methods defined in this module implement various email related
parsing rules. Principal among them is RFC 5322, which is the followon
to RFC 2822 and primarily a clarification of the former. It also implements
RFC 2047 encoded w... | apache-2.0 | 1,475,934,885,495,649,000 | 34.587387 | 91 | 0.595536 | false | 3.974598 | false | false | false |
mcfrank/dmww | sampling_helper.py | 1 | 1979 | import numpy as np
from random import *
from scipy.special import gammaln
from scipy import stats
########################################################################
## PROPOSAL DISTRIBUTIONS FOR HYPERPARAMETER INFERENCE
# proposal function for variables that can't go below zero
def alter_0inf_var(ob):
nb = ... | mit | 8,763,888,851,038,097,000 | 22.855422 | 72 | 0.531076 | false | 3.238953 | false | false | false |
rhyswat/udacity | robotics_ai/stochastic_dp.py | 1 | 3894 | # --------------
# USER INSTRUCTIONS
#
# Write a function called stochastic_value that
# takes no input and RETURNS two grids. The
# first grid, value, should contain the computed
# value of each cell as shown in the video. The
# second grid, policy, should contain the optimum
# policy for each cell.
#
# Stay tuned fo... | gpl-2.0 | 6,079,012,329,934,649,000 | 29.904762 | 106 | 0.559322 | false | 3.495512 | false | false | false |
metabolite-atlas/metatlas | metatlas/metatlas_objects.py | 1 | 25714 | import getpass
import uuid
import time
import os
import pprint
from pwd import getpwuid
from tabulate import tabulate
import pandas as pd
from .object_helpers import (
set_docstring, Workspace, format_timestamp, MetList,
MetUnicode, MetFloat, MetInstance, MetInt, MetEnum, MetBool, HasTraits,
Stub
)
#Makin... | bsd-3-clause | -7,420,930,351,928,871,000 | 35.734286 | 264 | 0.631757 | false | 3.847673 | false | false | false |
Karl-Marka/data-mining | business-intelligence/get_PI_names.py | 1 | 1731 | from pandas import read_csv, concat, DataFrame
print('Reading database...')
tp = read_csv('merged_2014-2016.txt', header=0, sep='\t', iterator=True, chunksize=10000, encoding='cp1252', error_bad_lines=False)
print('Concatenating database...')
db = concat(tp, ignore_index=True)
print("Number of grant entries in the da... | gpl-3.0 | 3,536,434,171,583,739,400 | 24.086957 | 131 | 0.574812 | false | 3.303435 | false | false | false |
kaiw/meld | meld/misc.py | 1 | 11579 | ### Copyright (C) 2002-2006 Stephen Kennedy <stevek@gnome.org>
### Copyright (C) 2009 Vincent Legoll <vincent.legoll@gmail.com>
### Copyright (C) 2012 Kai Willadsen <kai.willadsen@gmail.com>
### This program is free software; you can redistribute it and/or modify
### it under the terms of the GNU General Public Licens... | gpl-2.0 | -9,057,583,098,606,684,000 | 30.81044 | 113 | 0.545988 | false | 3.849402 | false | false | false |
tapilab/twnews | twnews/tweet_stats.py | 1 | 1730 | """
Print statistics about the tweets collected by search_url_tweets.py
"""
import codecs
from collections import Counter, defaultdict
import json
import numpy as np
from . import __data__
def print_all(fname=__data__ + '/tweets.json'):
url2mentions = defaultdict(lambda: Counter())
url2score = defaultdict(l... | bsd-3-clause | -3,006,417,976,763,949,000 | 44.526316 | 125 | 0.606358 | false | 3.197782 | false | false | false |
googleapis/python-aiplatform | google/cloud/aiplatform_v1beta1/types/pipeline_service.py | 1 | 11106 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 2,802,230,838,880,935,000 | 36.02 | 138 | 0.678102 | false | 4.101182 | false | false | false |
mapclient-plugins/fieldworkgait2392geomstep | mapclientplugins/fieldworkgait2392geomstep/landmarktablewidget.py | 1 | 8055 | '''
MAP Client, a program to generate detailed musculoskeletal models for OpenSim.
Copyright (C) 2012 University of Auckland
This file is part of MAP Client. (http://launchpad.net/mapclient)
MAP Client is free software: you can redistribute it and/or modify
it under the terms of the GNU General Publi... | apache-2.0 | 4,158,938,943,842,155,500 | 34.333333 | 92 | 0.627436 | false | 4.076417 | false | false | false |
birdland/dlkit-doc | dlkit/grading/objects.py | 1 | 54903 |
from ..osid import objects as osid_objects
from ..osid import markers as osid_markers
from ..osid import sessions as osid_sessions
class Grade(osid_objects.OsidObject, osid_markers.Subjugateable):
"""A ``Grade``.
Grades represent qualified performance levels defined within some
grading system.
"""
... | mit | -4,852,175,577,383,640,000 | 32.682822 | 181 | 0.632479 | false | 4.097545 | false | false | false |
MokaCreativeLLC/XNATImageViewer | utility-scripts/python/convertDemo.py | 1 | 5614 | import sys
import os
import shutil
import re
from time import gmtime, strftime
#
# vmHeader
#
vmHeader = '#* @vtlvariable name="content" type="org.apache.turbine.services.pull.tools.ContentTool" *#\n'
vmHeader += '#* @vtlvariable name="displayManager" type="org.nrg.xdat.display.DisplayManager" *#\n'
vmHead... | bsd-3-clause | -4,105,578,803,528,204,300 | 22.294606 | 111 | 0.501959 | false | 3.909471 | false | false | false |
exaile/exaile | xlgui/widgets/playlist_columns.py | 1 | 24380 | # Copyright (C) 2008-2010 Adam Olsen
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that... | gpl-2.0 | -581,852,521,183,092,600 | 27.348837 | 87 | 0.611362 | false | 4.02709 | false | false | false |
radzhome/python-emailage | setup.py | 1 | 1065 | from setuptools import setup # , find_packages
import emailage
LONG_DESCRIPTION = open('README.rst').read()
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Intended Audience :: Developers',
'License :: OSI Approved :: BSD License',
'Natural Language :: English',
'Operating System ... | bsd-2-clause | -9,195,418,030,522,440,000 | 28.583333 | 66 | 0.670423 | false | 4.034091 | false | true | false |
suzj801/RBDSR | bins/ceph_plugin.py | 1 | 7907 | #!/usr/bin/python
#
# Copyright (C) Roman V. Posudnevskiy (ramzes_r@yahoo.com)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published
# by the Free Software Foundation; version 2.1 only.
#
# This program is distributed in the h... | lgpl-2.1 | 7,428,138,407,902,356,000 | 38.338308 | 205 | 0.565069 | false | 2.924186 | false | false | false |
wodore/wodore-ng | main/tests/test_model_collection.py | 1 | 9548 | import sys, os
#import logging
import unittest
from google.appengine.ext import ndb #, testbed
from google.appengine.api import datastore_errors
class TestCollection(unittest.TestCase):
# enable the datastore stub
nosegae_datastore_v3 = True
nosegae_memcache = True
#import model # does not work yet
def se... | mit | -6,396,852,610,961,711,000 | 36.73913 | 85 | 0.658986 | false | 3.193311 | true | false | false |
tkzeng/molecular-design-toolkit | moldesign/viewer/viewer3d.py | 1 | 14936 | # Copyright 2016 Autodesk 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 | -4,266,390,350,312,451,600 | 38.305263 | 101 | 0.579539 | false | 3.926393 | false | false | false |
mbohlool/client-python | kubernetes/client/models/v1beta1_network_policy_list.py | 1 | 6669 | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.8.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... | apache-2.0 | -6,629,209,758,912,542,000 | 30.606635 | 281 | 0.603689 | false | 4.234286 | false | false | false |
ulikoehler/ODBPy | ODBPy/Attributes.py | 1 | 1239 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
ODB++ attribute parser
"""
__all__ = ["parse_attributes_from_line",
"parse_attributes"]
def parse_attributes_from_line(line):
"""
Given a pre-stripped line from a line record file,
parse the attribute section.
Returns a dict of numeric attr... | apache-2.0 | 4,673,344,580,665,495,000 | 29.243902 | 89 | 0.614205 | false | 3.529915 | false | false | false |
toobaz/pandas | pandas/core/indexes/base.py | 1 | 185572 | from datetime import datetime, timedelta
import operator
from textwrap import dedent
from typing import Union
import warnings
import numpy as np
from pandas._libs import algos as libalgos, index as libindex, lib
import pandas._libs.join as libjoin
from pandas._libs.lib import is_datetime_array
from pandas._libs.tslib... | bsd-3-clause | -6,184,519,601,574,200,000 | 31.346523 | 88 | 0.534569 | false | 4.387979 | false | false | false |
openmotics/gateway | src/gateway/migrations/orm/001_init_tables.py | 1 | 5124 | # Copyright (C) 2020 OpenMotics BV
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distribu... | agpl-3.0 | 281,128,619,937,507,170 | 34.583333 | 114 | 0.666276 | false | 4.047393 | false | false | false |
rwl/traitsbackendpyjamas | enthought/traits/ui/pyjd/view_application.py | 1 | 5860 | #------------------------------------------------------------------------------
# Copyright (c) 2005, Enthought, Inc.
# Copyright (c) 2009, Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# d... | mit | -7,610,922,905,681,622,000 | 39.413793 | 80 | 0.484983 | false | 5.327273 | false | false | false |
googleapis/python-securitycenter | google/cloud/securitycenter_v1p1beta1/types/asset.py | 1 | 7765 | # -*- 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 | 8,791,488,215,356,010,000 | 45.220238 | 114 | 0.659627 | false | 4.602845 | false | false | false |
LCOGT/valhalla | valhalla/userrequests/signals/handlers.py | 1 | 1324 | from django.dispatch import receiver
from django.db.models.signals import pre_save, post_save
from valhalla.userrequests.models import UserRequest, Request
from valhalla.userrequests.state_changes import on_request_state_change, on_userrequest_state_change
from valhalla.proposals.notifications import userrequest_notif... | gpl-3.0 | 9,214,135,997,758,199,000 | 41.709677 | 100 | 0.752266 | false | 3.804598 | false | false | false |
pombredanne/nTLP | tests/jtlvint_test.py | 1 | 5178 | #!/usr/bin/env python
"""
Based on test code moved here from bottom of tulip/jtlvint.py
SCL; 31 Dec 2011.
"""
import os
from tulip.jtlvint import *
from tulip.polytope import Region
from tulip.prop2part import PropPreservingPartition
class jtlvint_test:
def setUp(self):
self.tmpdir = "tmpspec"
... | bsd-3-clause | -862,722,740,389,257,500 | 42.512605 | 81 | 0.429123 | false | 3.643913 | true | false | false |
kg-bot/SupyBot | plugins/Yow/plugin.py | 1 | 2924 | ###
# Copyright (c) 2013, Frumious Bandersnatch
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice,
# this list of co... | gpl-3.0 | 1,989,878,594,361,566,200 | 37.986667 | 79 | 0.687756 | false | 4.147518 | false | false | false |
devincachu/devincachu-2014 | devincachu/inscricao/management/commands/gerar_cobranca.py | 1 | 2400 | # -*- coding: utf-8 -*-
# Copyright 2014 Dev in Cachu authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
import copy
import sys
import requests
from django.conf import settings
from django.core.management import base
from django.templa... | bsd-2-clause | -1,813,555,328,163,193,000 | 37.047619 | 79 | 0.606174 | false | 3.704791 | false | false | false |
mbohlool/client-python | kubernetes/client/models/v1_volume_projection.py | 1 | 4942 | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.8.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... | apache-2.0 | 1,415,357,739,002,722,000 | 26.153846 | 105 | 0.569 | false | 4.338894 | true | false | false |
a115/reguser | setup.py | 1 | 1171 | import os
from setuptools import setup, find_packages
README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name = 'reguser',
version = '0.0.2',
packages = f... | unlicense | -19,416,042,987,882,770 | 32.457143 | 88 | 0.608027 | false | 3.68239 | false | false | false |
miic-sw/miic | miic.core/src/miic/core/pxcorr_func.py | 1 | 46437 | #!/usr/bin/python
import numpy as np
import scipy.signal as signal
from mpi4py import MPI
from copy import deepcopy
from obspy.core import UTCDateTime, stream, trace
import obspy.signal as osignal
from miic.core.corr_fun import combine_stats
from miic.core.miic_utils import convert_to_matlab
from numpy import (expa... | gpl-3.0 | -7,103,503,286,129,268,000 | 35.942721 | 140 | 0.55669 | false | 3.762518 | false | false | false |
cyrpaut/sailingbot | test_parts/test_bournes_encoder.py | 1 | 2196 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import RPi.GPIO as GPIO
import smbus
import time
class Ace128:
"""Class supporting the ACE-128 I2C Backpack"""
if GPIO.RPI_REVISION == 1:
_bus = smbus.SMBus(0)
else:
_bus = smbus.SMBus(1)
def __init__(self, i2caddr, pinOrder=(8,7,6,5,4,3,2,1)... | gpl-3.0 | 1,528,383,832,788,521,500 | 36.220339 | 135 | 0.600182 | false | 3.317221 | false | false | false |
dangorlov/UnitedPulsarLib | AuthLib.py | 1 | 2578 | # coding: utf8
# Auntefication Library
from ColorAndSayLib import PrintWC, SayPrint
# Variables of userdata
logpass = {"hacker": "12345678"}
######################
PostLoginTrue = False
######################
# def SayPrint(text,speech = None,color= None,ttsd = "plyer"):
# if color == None:
# color =... | unlicense | -3,358,372,848,909,670,000 | 26.074468 | 82 | 0.52613 | false | 3.693759 | false | false | false |
dnarvaez/osbuild | osbuild/shell.py | 1 | 1148 | # Copyright 2013 Daniel Narvaez
#
# 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 writi... | apache-2.0 | -7,932,898,086,916,595,000 | 24.511111 | 74 | 0.640244 | false | 3.656051 | false | false | false |
sympsi/sympsi | sympsi/represent.py | 1 | 17595 | """Logic for representing operators in state in various bases.
TODO:
* Get represent working with continuous hilbert spaces.
* Document default basis functionality.
"""
from __future__ import print_function, division
from sympy import Add, Expr, I, integrate, Mul, Pow
from sympy.physics.quantum.matrixutils import f... | bsd-3-clause | 1,199,772,112,826,021,600 | 30.645683 | 79 | 0.623188 | false | 3.994325 | false | false | false |
speranskydanil/book_scanner | gphoto2_test.py | 1 | 1171 | #!/usr/bin/env python3
import subprocess
import time
import random
def devices():
return Device.all()
class Device:
@staticmethod
def _exec(cmd):
return subprocess.Popen(
cmd,
shell=True,
stdout=subprocess.PIPE).communicate()[0].decode('utf-8')
@classm... | mit | 792,242,013,633,562,100 | 20.685185 | 68 | 0.542272 | false | 3.647975 | false | false | false |
ezietsman/msc-thesis | spectroscopy/lightcurves/makeplots.py | 1 | 1557 | # Script to plot equivalent width time-series curves.
import pylab as pl
import astronomy as ast
Lines = {}
Lines[r'$H_{\alpha}$'] = 'EW_Ha.dat'
Lines[r'$H_{\beta}$'] = 'EW_Hb.dat'
Lines[r'$He_{II}$ '] = 'EW_He.dat'
pl.figure(figsize=(8,6))
pl.subplots_adjust(wspace=0.001,hspace=0.4)
# ephemeris
T0 = 2453964.330709... | mit | 5,477,360,082,720,118,000 | 22.969231 | 115 | 0.585742 | false | 2.366261 | false | false | false |
NikolaYolov/invenio_backup | modules/bibsched/lib/bibtask.py | 1 | 39745 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2007, 2008, 2009, 2010, 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
## Licens... | gpl-2.0 | -270,200,903,937,755,870 | 41.236982 | 220 | 0.594163 | false | 3.759459 | false | false | false |
edx/edx-enterprise | enterprise/migrations/0130_lms_customer_lp_search_help_text.py | 1 | 1171 | # Generated by Django 2.2.20 on 2021-05-03 18:30
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('enterprise', '0129_enterprisecatalogquery_uuid_unique'),
]
operations = [
migrations.AlterField(
model_name='enterprisecustomer... | agpl-3.0 | -2,864,365,060,514,463,000 | 49.913043 | 297 | 0.70538 | false | 4.289377 | false | false | false |
nixargh/dnswatch | dnswatch/dhclient.py | 1 | 6327 | import psutil
import re
import os
import time
import logging
from subprocess import check_call, STDOUT
from shutil import copyfile
from misc import Misc
class DHClient:
def __init__(self):
self.logger = logging.getLogger("DNSWatch.DHClient")
self.misc = Misc(self.logger)
self.args = self... | gpl-3.0 | 4,149,151,289,325,899,300 | 36.660714 | 92 | 0.543702 | false | 4.02225 | true | false | false |
badele/mksensors | mksensors/templates/sensor/network/isup/__init__.py | 1 | 2891 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
hostnames:
- 8.8.8.8
- 8.8.4.4
"""
__authors__ = 'Bruno Adelé <bruno@adele.im>'
__copyright__ = 'Copyright (C) 2016 Bruno Adelé'
__description__ = """Tool for easily create sensors daemons"""
__license__ = 'GPL'
__commitnumber__ = "$id$"
import time
import loggin... | gpl-3.0 | -399,913,106,312,276,350 | 27.60396 | 82 | 0.577362 | false | 4.029289 | false | false | false |
WaveBlocks/WaveBlocksND | WaveBlocksND/GradientHAWP.py | 1 | 2696 | """The WaveBlocks Project
Compute the action of the gradient operator applied to a Hagedorn wavepacket.
@author: R. Bourquin
@copyright: Copyright (C) 2012, 2013, 2014, 2016 R. Bourquin
@license: Modified BSD License
"""
from numpy import zeros, complexfloating, conjugate, squeeze
from scipy import sqrt
from WaveBl... | bsd-3-clause | -6,243,357,607,568,891,000 | 39.848485 | 104 | 0.617953 | false | 3.465296 | false | false | false |
uclouvain/osis_louvain | base/tasks.py | 1 | 1067 | from celery.schedules import crontab
from backoffice.celery import app as celery_app
from base.business.education_groups.automatic_postponement import EducationGroupAutomaticPostponement
from base.business.learning_units.automatic_postponement import LearningUnitAutomaticPostponement
celery_app.conf.beat_schedule.upd... | agpl-3.0 | 5,939,566,352,545,148,000 | 30.382353 | 101 | 0.740394 | false | 3.355346 | false | false | false |
wegostudio/wego | wego/buttons.py | 1 | 2694 | # -*- coding: utf-8 -*-
from wego.exceptions import WeChatButtonError
'''
class BaseBtn(object):
pass
'''
class MenuBtn(object):
def __init__(self, name, *args):
self.json = {
'name': name,
'sub_button': [i.json for i in args]
}
class ClickBtn(object):
def __... | apache-2.0 | -5,789,080,419,384,226,000 | 21.016949 | 107 | 0.531178 | false | 3.172161 | false | false | false |
fdibaldassarre/tag-search | src/Interface/TagEditor.py | 1 | 8316 | #!/usr/bin/env python3
import os
from gi.repository import Gtk
from src.Constants import MAIN_FOLDER
from src.Constants import UI_FOLDER
from src.Common import createTag
from src.Common import createCategory
from src.Interface.Utils import BasicInterface
from src.Interface.Utils import acceptInterfaceSignals
from ... | gpl-3.0 | 2,423,620,090,093,351,000 | 30.263158 | 72 | 0.696008 | false | 3.757795 | false | false | false |
xxd3vin/spp-sdk | tools/script/python/opencv_similarity.py | 1 | 3642 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import cv2.cv as cv
import os
import sys
import Image
import argparse
import time
def encodeChinese(msg):
type = sys.getfilesystemencoding()
return msg.decode('UTF-8').encode(type)
parser = argparse.ArgumentParser(description = encodeChinese('进行贴图相似度判断'))
parser.add_argume... | mit | -918,658,133,723,802,100 | 27.782609 | 94 | 0.654985 | false | 2.342534 | false | false | false |
robocomp/learnbot | learnbot_dsl/Clients/Client.py | 1 | 15167 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, absolute_import
from threading import Thread, Lock, Event
import numpy as np, copy, sys, time, os, subprocess, json
from learnbot_dsl.Clients.Devices import *
from learnbot_dsl import PATHINTERFACES
from datetime import timedelta
from ... | gpl-3.0 | 2,115,013,910,153,085,400 | 35.026128 | 164 | 0.574603 | false | 3.765392 | false | false | false |
CommunicationsSecurityEstablishment/spartacus | ToolChain/Assembler/Assembler.py | 1 | 8108 | #!/usr/bin/env python
# -*- coding: <utf-8> -*-
"""
This file is part of Spartacus project
Copyright (C) 2018 CSE
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... | gpl-2.0 | 3,878,562,950,444,079,600 | 46.976331 | 119 | 0.613345 | false | 4.724942 | false | false | false |
marcogiusti/nvd3_py | setup.py | 1 | 1350 | #!/usr/bin/env python
# Copyright (c) 2016 Marco Giusti
# See LICENSE for details.
from setuptools import setup
def get_version(filename="nvd3.py", varname="__version__"):
glb = {}
with open(filename) as fp:
for line in fp:
if varname in line:
exec(line, glb)
... | mit | 3,870,023,196,430,260,700 | 27.125 | 66 | 0.580741 | false | 3.729282 | false | false | false |
kenkov/chartype | test.py | 1 | 1085 | #! /usr/bin/env python
# coding:utf-8
from __future__ import division
from chartype import *
from nose.tools import raises
def hiragana2katakana_test():
ch = Chartype()
for i, j in [("あ", "ア"), ("い", "イ"), ("う", "ウ")]:
assert ch.hiragana2katakana(i) == j
def katakana2hiragana_test():
ch = Chart... | mit | -7,648,321,626,844,090,000 | 21.282609 | 53 | 0.539512 | false | 2.648579 | true | false | false |
tulikavijay/vms | vms/pom/pages/authenticationPage.py | 1 | 1091 | # local Django
from basePage import *
from pom.locators.authenticationPageLocators import *
from pom.locators.homePageLocators import *
from pom.pageUrls import PageUrls
class AuthenticationPage(BasePage):
url = PageUrls.authentication_page
homepage = PageUrls.homepage
server_url = ''
def __init__(s... | gpl-2.0 | -9,206,506,572,736,581,000 | 33.09375 | 91 | 0.709441 | false | 3.60066 | false | false | false |
analogbyte/saltobserver | setup.py | 1 | 1256 | # -*- coding: utf-8 -*-
import codecs
from os import path
from setuptools import setup
with open('README.rst', 'rt') as f:
long_description = f.read()
setup(
name='saltobserver',
version='0.9.4',
description='A simple webapp for presenting data as offered by SaltStack\'s Redis Returner',
long_des... | mit | -5,715,104,772,744,916,000 | 30.375 | 99 | 0.616733 | false | 3.83792 | false | false | false |
l11x0m7/Paper | Modulation/code/xls_parser.py | 1 | 1223 | #!/usr/bin/env python
# coding=utf-8
import xlrd
import sys
def parser(filepath, savepath, direction='row'):
sheets = xlrd.open_workbook(filepath)
sheet = sheets.sheet_by_index(0)
with open(savepath, 'wb') as fw:
if direction == 'row':
total_len = sheet.nrows
for i, row in ... | apache-2.0 | 3,924,712,702,330,261,000 | 37.21875 | 78 | 0.529845 | false | 3.201571 | false | false | false |
kyoren/https-github.com-h2oai-h2o-3 | h2o-py/tests/testdir_misc/pyunit_upload_file.py | 1 | 1772 | import sys
sys.path.insert(1, "../../")
import h2o, tests
def upload_file():
a = h2o.upload_file(tests.locate("smalldata/logreg/prostate.csv"))
print a.describe()
from h2o import H2OFrame
# using lists []
py_list_to_h2o = H2OFrame(python_obj=[0, 1, 2, 3, 4])
print py_list_to_h2o.desc... | apache-2.0 | 141,329,938,505,278,660 | 22.945946 | 92 | 0.581828 | false | 2.613569 | false | false | false |
dwalton76/ev3dev-lang-python | ev3dev2/button.py | 1 | 15633 | # -----------------------------------------------------------------------------
# Copyright (c) 2015 Ralph Hempel <rhempel@hempeldesigngroup.com>
# Copyright (c) 2015 Anton Vanhoucke <antonvh@gmail.com>
# Copyright (c) 2015 Denis Demidov <dennis.demidov@gmail.com>
# Copyright (c) 2015 Eric Pascual <eric@pobot.org>
#
# ... | mit | -6,692,946,221,780,597,000 | 31.23299 | 100 | 0.549799 | false | 4.301871 | false | false | false |
janek-warchol/lilypond | scripts/build/output-distance.py | 1 | 38915 | #!@PYTHON@
import sys
import optparse
import os
import math
import re
import cgi
## so we can call directly as scripts/build/output-distance.py
me_path = os.path.abspath (os.path.split (sys.argv[0])[0])
sys.path.insert (0, me_path + '/../python/')
sys.path.insert (0, me_path + '/../python/out/')
X_AXIS = 0
Y_AXIS =... | gpl-3.0 | -3,924,069,741,745,729,000 | 27.825926 | 157 | 0.513478 | false | 3.472074 | true | false | false |
enlighter/algorithms | utils/linkedlist.py | 1 | 4853 | class Element(object):
def __init__(self, value):
self.value = value
self.next = None
class LinkedList(object):
def __init__(self, head=None):
self.head = head
def append(self, new_element):
current = self.head
if self.head:
while current.next:
... | mit | 5,989,871,024,193,672,000 | 29.33125 | 76 | 0.5102 | false | 4.344673 | false | false | false |
stephanpoetschner/django-live-context | live_context/ctx.py | 1 | 2402 | # coding: utf-8
from django.template.context import BaseContext, ContextPopException
class LiveContext(BaseContext):
"""
Inner-Class, storing context-dictionary and making usage with
"with"-statement possible.
depends on django.template.context.BaseContext
"""
def __init__(self, instance, dict... | unlicense | -5,485,900,607,152,728,000 | 27.595238 | 79 | 0.631557 | false | 4.120069 | false | false | false |
veblush/PyPhabricatorDb | pyphabricatordb/conduit.py | 1 | 2142 | # coding: utf-8
from sqlalchemy import BigInteger, Column, Index, Integer, String, VARBINARY
from sqlalchemy import String, Unicode, ForeignKey
from sqlalchemy.orm import relationship, backref
from dbdatetime import dbdatetime
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
metadata ... | mit | 7,997,841,903,385,762,000 | 33.015873 | 76 | 0.71662 | false | 3.744755 | false | false | false |
jackliusr/scrapy-crawlers | crawlers/crawlers/spiders/zjlottery.py | 1 | 2243 | import scrapy
from scrapy.http import JsonRequest, Request
from scrapy import Selector
import time
import re
import w3lib.html
import pprint
class ZjlotterySpider(scrapy.Spider):
name = "zjlottery"
custom_settings = {
'DATABASEPIPELINE_ENABLED': True,
}
def start_requests(self):
... | apache-2.0 | -2,635,648,414,615,856,000 | 33.507692 | 128 | 0.537227 | false | 3.880623 | false | false | false |
mwolff44/yawd-admin | example_project/demo_application/admin.py | 1 | 8387 | from django import forms
from django.contrib import admin
# from django.contrib.contenttypes import generic
from django.utils.text import mark_safe
from yawdadmin.resources import admin_site
from yawdadmin.admin import SortableModelAdmin, PopupModelAdmin, PopupInline, \
OneToOneInline
from yawdadmin.sites import Ya... | bsd-3-clause | 2,677,150,388,246,257,000 | 33.80083 | 107 | 0.658519 | false | 4.133563 | false | false | false |
googleapis/googleapis-gen | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/services/campaign_extension_setting_service/transports/base.py | 1 | 4396 | # -*- 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 | -9,156,459,300,092,552,000 | 37.902655 | 88 | 0.66242 | false | 4.396 | false | false | false |
mcbor/adventofcode | 2017/10b.py | 1 | 5890 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
10b.py
~~~~~~
Advent of Code 2017 - Day 10: Knoth Hash
Part Two
The logic you've constructed forms a single round of the Knot Hash
algorithm; running the full thing requires many of these rounds. Some input
and output processing is also req... | mit | -8,934,004,675,371,653,000 | 37 | 79 | 0.682683 | false | 3.638048 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.