hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 248 | max_stars_repo_name stringlengths 5 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 248 | max_issues_repo_name stringlengths 5 125 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringdate 2015-01-01 00:00:47 2022-03-31 23:42:18 ⌀ | max_issues_repo_issues_event_max_datetime stringdate 2015-01-01 17:43:30 2022-03-31 23:59:58 ⌀ | max_forks_repo_path stringlengths 3 248 | max_forks_repo_name stringlengths 5 125 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 5 2.06M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
5f27a02869b20dee1a16b8900aaf7b0000709f7f | 105 | py | Python | discobot/utils.py | pythonology/disco | 82cc0434e584a1053075b51f487a3ac9b03f6f7d | [
"MIT"
] | 7 | 2016-04-13T23:03:36.000Z | 2016-04-19T22:25:28.000Z | discobot/utils.py | pythonology/disco | 82cc0434e584a1053075b51f487a3ac9b03f6f7d | [
"MIT"
] | 2 | 2016-06-03T16:12:00.000Z | 2021-03-25T21:40:27.000Z | discobot/utils.py | pythonology/disco | 82cc0434e584a1053075b51f487a3ac9b03f6f7d | [
"MIT"
] | 1 | 2016-04-13T18:43:19.000Z | 2016-04-13T18:43:19.000Z | def make_attachment_uri(discriminator, filename):
return 'disco://%s/%s' % (discriminator, filename)
| 35 | 54 | 0.733333 |
5f289aaa4dfd07380db23d1700f9b70a80d10934 | 5,266 | py | Python | oaipmh/__init__.py | scieloorg/oai-pmh | 9d3044921d2d5cafb18e54f04070e8783f49c06d | [
"BSD-2-Clause"
] | 2 | 2019-03-16T04:40:29.000Z | 2022-03-10T14:50:21.000Z | oaipmh/__init__.py | DalavanCloud/oai-pmh | 9d3044921d2d5cafb18e54f04070e8783f49c06d | [
"BSD-2-Clause"
] | 27 | 2017-08-23T17:11:57.000Z | 2021-06-01T21:57:31.000Z | oaipmh/__init__.py | DalavanCloud/oai-pmh | 9d3044921d2d5cafb18e54f04070e8783f49c06d | [
"BSD-2-Clause"
] | 2 | 2017-06-12T16:18:35.000Z | 2019-03-16T04:40:12.000Z | import os
import re
from pyramid.config import Configurator
from pyramid.events import NewRequest
from oaipmh import (
repository,
datastores,
sets,
utils,
articlemeta,
entities,
)
from oaipmh.formatters import (
oai_dc,
oai_dc_openaire,
... | 33.329114 | 80 | 0.657615 |
5f2a79411bbedc2b8b017ecceddbf86f3d9843cc | 1,613 | py | Python | create_training_data.py | nasi-famnit/HOur-flight | 96a9aeb1cf0f3fa588c587db08ba0b8fa980eac9 | [
"MIT"
] | 1 | 2016-04-24T10:49:52.000Z | 2016-04-24T10:49:52.000Z | create_training_data.py | nasi-famnit/HOur-flight | 96a9aeb1cf0f3fa588c587db08ba0b8fa980eac9 | [
"MIT"
] | null | null | null | create_training_data.py | nasi-famnit/HOur-flight | 96a9aeb1cf0f3fa588c587db08ba0b8fa980eac9 | [
"MIT"
] | null | null | null | import flightdata
import weatherparser
import airportdata
import pandas as pd
from datetime import datetime
from pathlib import Path
flights = flightdata.read_csv('data/unpacked/flights/On_Time_On_Time_Performance_2016_1.csv')
fname = 'data/processed/training/training{:04}_v1.csv'
prev_time = datetime.now()
df = pd... | 37.511628 | 276 | 0.675139 |
5f2bba8707cde7a8ee1262b60500da6ac69cd76b | 5,618 | py | Python | study/python/pyqt/app/signup.py | cheenwe/blog | a866b3ab98aa58e3ed4a7624fbb72c8fd8dee790 | [
"MIT"
] | 10 | 2016-09-28T03:22:41.000Z | 2020-06-16T08:42:25.000Z | study/python/pyqt/app/signup.py | cheenwe/blog | a866b3ab98aa58e3ed4a7624fbb72c8fd8dee790 | [
"MIT"
] | 12 | 2017-04-18T08:41:04.000Z | 2020-06-10T02:54:58.000Z | study/python/pyqt/app/signup.py | cheenwe/blog | a866b3ab98aa58e3ed4a7624fbb72c8fd8dee790 | [
"MIT"
] | 8 | 2016-09-28T03:03:32.000Z | 2019-09-16T04:22:01.000Z | from PyQt5 import QtCore, QtGui, QtWidgets
from db import Db
class Ui_Signup(object):
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.setFixedSize(638, 441)
# self.label = QtWidgets.QLabel(Dialog)
# self.label.setGeometry(QtCore.QRect(110, 190, 151, 31))
#... | 41.925373 | 73 | 0.619794 |
5f2c618b2d6e7fe4b895b468c576b02558bec6fb | 70 | py | Python | gym_android_wechat_jump/env/__init__.py | gooooloo/gym-android-wechat-jump | f7c576316ae07d9701cc467ef271f838418d8695 | [
"MIT"
] | null | null | null | gym_android_wechat_jump/env/__init__.py | gooooloo/gym-android-wechat-jump | f7c576316ae07d9701cc467ef271f838418d8695 | [
"MIT"
] | null | null | null | gym_android_wechat_jump/env/__init__.py | gooooloo/gym-android-wechat-jump | f7c576316ae07d9701cc467ef271f838418d8695 | [
"MIT"
] | null | null | null | from gym_android_wechat_jump.env.wechat_jump_env import WechatJumpEnv
| 35 | 69 | 0.914286 |
5f2c8d2aea105ec6207836197f28f050f9bd7157 | 318 | py | Python | bot/__init__.py | sudomice/crypto-bot | 51dcf66d79612f2ba8bdf5645005b143fbeda343 | [
"MIT"
] | null | null | null | bot/__init__.py | sudomice/crypto-bot | 51dcf66d79612f2ba8bdf5645005b143fbeda343 | [
"MIT"
] | null | null | null | bot/__init__.py | sudomice/crypto-bot | 51dcf66d79612f2ba8bdf5645005b143fbeda343 | [
"MIT"
] | null | null | null | import requests
from bot.constants import BASE_ENDPOINT
import cli.app
@cli.app.CommandLineApp
def bot(app):
ping_response = requests.get(BASE_ENDPOINT+'api/v3/ping')
print(f'{ping_response}:{ping_response.json()}')
# bot.add_param("-h", "--help", help="HELP me")
if __name__ == '__main__':
bot.run()
| 19.875 | 61 | 0.701258 |
5f2e54facc35f3d3aca215fe2e3b9ff2dc7350a5 | 4,374 | py | Python | metadrive/config.py | wefindx/metadrive | 576d240065b61b0187afc249819b705c06308d05 | [
"Apache-2.0"
] | 7 | 2019-02-04T18:31:06.000Z | 2021-12-22T17:08:55.000Z | metadrive/config.py | wefindx/metadrive | 576d240065b61b0187afc249819b705c06308d05 | [
"Apache-2.0"
] | 11 | 2019-04-30T18:19:33.000Z | 2019-08-15T19:56:37.000Z | metadrive/config.py | wefindx/metadrive | 576d240065b61b0187afc249819b705c06308d05 | [
"Apache-2.0"
] | 2 | 2019-01-26T03:17:25.000Z | 2019-04-15T18:35:56.000Z | import os
import imp
from pathlib import Path
import configparser
import requests
import gpgrecord
config = configparser.ConfigParser()
INSTALLED = imp.find_module('metadrive')[1]
HOME = str(Path.home())
DEFAULT_LOCATION = os.path.join(HOME,'.metadrive')
CONFIG_LOCATION = os.path.join(DEFAULT_LOCATION, 'config')
CRED... | 29.355705 | 131 | 0.645405 |
5f2efcc18abcce7bbf0e01ac810dce1793930f16 | 1,272 | py | Python | project/matching/migrations/0001_initial.py | Project-EPIC/emergencypetmatcher | 72c9eec228e33c9592243266e048dc02824d778d | [
"MIT"
] | null | null | null | project/matching/migrations/0001_initial.py | Project-EPIC/emergencypetmatcher | 72c9eec228e33c9592243266e048dc02824d778d | [
"MIT"
] | null | null | null | project/matching/migrations/0001_initial.py | Project-EPIC/emergencypetmatcher | 72c9eec228e33c9592243266e048dc02824d778d | [
"MIT"
] | 1 | 2021-06-24T01:50:06.000Z | 2021-06-24T01:50:06.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('reporting', '0002_remove_petreport_revision_number'),
('socializing', '__first__'),
]
operations = [
migrations.Crea... | 43.862069 | 123 | 0.644654 |
5f30dced4b52419281f10b8f50593c7065a03df1 | 3,273 | py | Python | sdk/python/pulumi_aws/get_ip_ranges.py | Charliekenney23/pulumi-aws | 55bd0390160d27350b297834026fee52114a2d41 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/get_ip_ranges.py | Charliekenney23/pulumi-aws | 55bd0390160d27350b297834026fee52114a2d41 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_aws/get_ip_ranges.py | Charliekenney23/pulumi-aws | 55bd0390160d27350b297834026fee52114a2d41 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import json
import warnings
import pulumi
import pulumi.runtime
from . import utilities, tables
class GetIpRangesResult:
"""
A... | 42.506494 | 245 | 0.65689 |
5f31588bc153ffcf5b70c1b521bc861fcd11b513 | 5,123 | py | Python | lithops/localhost/local_handler.py | GEizaguirre/lithops | 296451ea3ebf630a5dca2f17248387e6bb1ee5b6 | [
"Apache-2.0"
] | null | null | null | lithops/localhost/local_handler.py | GEizaguirre/lithops | 296451ea3ebf630a5dca2f17248387e6bb1ee5b6 | [
"Apache-2.0"
] | null | null | null | lithops/localhost/local_handler.py | GEizaguirre/lithops | 296451ea3ebf630a5dca2f17248387e6bb1ee5b6 | [
"Apache-2.0"
] | null | null | null | import os
import sys
import json
import pkgutil
import logging
import uuid
import time
import multiprocessing
from pathlib import Path
from threading import Thread
from types import SimpleNamespace
from multiprocessing import Process, Queue
from lithops.utils import version_str, is_unix_system
from lithops.worker impor... | 33.927152 | 104 | 0.610189 |
a024addbdbfe31b4c073485e18f6d69dfd1ced29 | 17,878 | py | Python | app/FileViewer/FileServer/misc/mmpython/video/riffinfo.py | benyaboy/sage-graphics | 090640167329ace4b6ad266d47db5bb2b0394232 | [
"Unlicense"
] | null | null | null | app/FileViewer/FileServer/misc/mmpython/video/riffinfo.py | benyaboy/sage-graphics | 090640167329ace4b6ad266d47db5bb2b0394232 | [
"Unlicense"
] | null | null | null | app/FileViewer/FileServer/misc/mmpython/video/riffinfo.py | benyaboy/sage-graphics | 090640167329ace4b6ad266d47db5bb2b0394232 | [
"Unlicense"
] | 1 | 2021-07-02T10:31:03.000Z | 2021-07-02T10:31:03.000Z | #if 0
# $Id: riffinfo.py,v 1.33 2005/03/15 17:50:45 dischi Exp $
# $Log: riffinfo.py,v $
# Revision 1.33 2005/03/15 17:50:45 dischi
# check for corrupt avi
#
# Revision 1.32 2005/03/04 17:41:29 dischi
# handle broken avi files
#
# Revision 1.31 2004/12/13 10:19:07 dischi
# more debug, support LIST > 20000 (new ma... | 33.107407 | 85 | 0.507663 |
a0282750f46f0e414d25e4e4d34acff48c249677 | 843 | py | Python | h1st_contrib/cli/__init__.py | h1st-ai/h1st-contrib | 38fbb1fff4513bb3433bc12f2b436836e5e51c80 | [
"Apache-2.0"
] | 1 | 2022-02-19T18:55:43.000Z | 2022-02-19T18:55:43.000Z | h1st_contrib/cli/__init__.py | h1st-ai/h1st-contrib | 38fbb1fff4513bb3433bc12f2b436836e5e51c80 | [
"Apache-2.0"
] | null | null | null | h1st_contrib/cli/__init__.py | h1st-ai/h1st-contrib | 38fbb1fff4513bb3433bc12f2b436836e5e51c80 | [
"Apache-2.0"
] | null | null | null | """H1st CLI."""
import click
from .pred_maint import h1st_pmfp_cli
@click.group(name='h1st',
cls=click.Group,
commands={
'pmfp': h1st_pmfp_cli,
},
# Command kwargs
context_settings=None,
# callback=None,
# ... | 24.085714 | 51 | 0.498221 |
a0294cc7bc1ae9063a289d36fbf581ccd346caba | 1,008 | py | Python | SC_projects/recursion/dice_rolls_sum.py | hsiaohan416/stancode | 8920f2e99e184d165fa04551f24a2da8b0975219 | [
"MIT"
] | null | null | null | SC_projects/recursion/dice_rolls_sum.py | hsiaohan416/stancode | 8920f2e99e184d165fa04551f24a2da8b0975219 | [
"MIT"
] | null | null | null | SC_projects/recursion/dice_rolls_sum.py | hsiaohan416/stancode | 8920f2e99e184d165fa04551f24a2da8b0975219 | [
"MIT"
] | null | null | null | """
File: dice_rolls_sum.py
Name: Sharon
-----------------------------
This program finds all the dice rolls permutations
that sum up to a constant TOTAL. Students will find
early stopping a good strategy of decreasing the number
of recursive calls
"""
# This constant controls the sum of dice of our interest
TOTAL = 8... | 21 | 56 | 0.545635 |
a02a39862663da51e8f5219d5dd8ae0de6edd96f | 909 | py | Python | valid_parentheses.py | KevinLuo41/LeetCodeInPython | 051e1aab9bab17b0d63b4ca73473a7a00899a16a | [
"Apache-2.0"
] | 19 | 2015-01-19T19:36:09.000Z | 2020-03-18T03:10:12.000Z | valid_parentheses.py | CodingVault/LeetCodeInPython | 051e1aab9bab17b0d63b4ca73473a7a00899a16a | [
"Apache-2.0"
] | null | null | null | valid_parentheses.py | CodingVault/LeetCodeInPython | 051e1aab9bab17b0d63b4ca73473a7a00899a16a | [
"Apache-2.0"
] | 12 | 2015-04-25T14:20:38.000Z | 2020-09-27T04:59:59.000Z | #!/usr/bin/env python
# encoding: utf-8
"""
valid_parentheses.py
Created by Shengwei on 2014-07-24.
"""
# https://oj.leetcode.com/problems/valid-parentheses/
# tags: easy, array, parentheses, stack
"""
Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is val... | 26.735294 | 118 | 0.540154 |
a0302470addb803e75aa2587a1202d6ec072bcdf | 3,104 | py | Python | doc/terms.py | RaenonX/Jelly-Bot-API | c7da1e91783dce3a2b71b955b3a22b68db9056cf | [
"MIT"
] | 5 | 2020-08-26T20:12:00.000Z | 2020-12-11T16:39:22.000Z | doc/terms.py | RaenonX/Jelly-Bot | c7da1e91783dce3a2b71b955b3a22b68db9056cf | [
"MIT"
] | 234 | 2019-12-14T03:45:19.000Z | 2020-08-26T18:55:19.000Z | doc/terms.py | RaenonX/Jelly-Bot-API | c7da1e91783dce3a2b71b955b3a22b68db9056cf | [
"MIT"
] | 2 | 2019-10-23T15:21:15.000Z | 2020-05-22T09:35:55.000Z | """Terms used in the bot."""
from collections import OrderedDict
from dataclasses import dataclass
from typing import List
from django.utils.translation import gettext_lazy as _
from JellyBot.systemconfig import Database
@dataclass
class TermExplanation:
"""An entry for a term and its explanation."""
term:... | 47.030303 | 119 | 0.61018 |
a03080839b2f11f2ef3a1cda34e010ada93f1947 | 2,619 | py | Python | tofnet/training/losses.py | victorjoos/tof2net | 068f5f08a241dbfb950251bea52fd9379466bf2f | [
"MIT"
] | null | null | null | tofnet/training/losses.py | victorjoos/tof2net | 068f5f08a241dbfb950251bea52fd9379466bf2f | [
"MIT"
] | 8 | 2021-02-02T23:07:37.000Z | 2022-03-12T00:51:26.000Z | tofnet/training/losses.py | victorjoos/tof2net | 068f5f08a241dbfb950251bea52fd9379466bf2f | [
"MIT"
] | 2 | 2020-10-01T08:23:24.000Z | 2020-11-09T22:01:47.000Z | import numpy as np
import operator
from itertools import cycle
from torch import nn
import torch.nn.functional as F
import torch
from torch.nn.modules.loss import *
from kornia.losses import *
class Loss:
def compute(self, output, target):
raise NotImplementedError()
def __call__(self, *args, **kwargs... | 30.811765 | 124 | 0.655594 |
a030c83c63bfd7833e9eefaa8a970b32e999331c | 5,111 | py | Python | tests/cli/test_database.py | julienc91/dbtrigger | d06916a019641377bf3d45b2e8e38399643450db | [
"MIT"
] | null | null | null | tests/cli/test_database.py | julienc91/dbtrigger | d06916a019641377bf3d45b2e8e38399643450db | [
"MIT"
] | null | null | null | tests/cli/test_database.py | julienc91/dbtrigger | d06916a019641377bf3d45b2e8e38399643450db | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import uuid
import pytest
from dbtrigger.cli import DatabaseCli, QueryCli, ServerCli
from dbtrigger.config import settings
from dbtrigger.models import Database
@pytest.fixture(autouse=True)
def add_server(server):
ServerCli.add(server.identifier, server.hostname, server.dialect)
def ... | 38.428571 | 116 | 0.772256 |
a0316cb627ebde16bd1be493b5901c78bcdf8ad7 | 1,557 | py | Python | reqtest.py | jbreams/nagmq | 3fee4209898c717a02c5a07ba4c335428b9403eb | [
"Apache-2.0"
] | 21 | 2015-02-17T07:45:40.000Z | 2021-03-19T13:12:48.000Z | reqtest.py | jbreams/nagmq | 3fee4209898c717a02c5a07ba4c335428b9403eb | [
"Apache-2.0"
] | 7 | 2015-04-29T22:12:44.000Z | 2018-05-09T15:46:35.000Z | reqtest.py | jbreams/nagmq | 3fee4209898c717a02c5a07ba4c335428b9403eb | [
"Apache-2.0"
] | 9 | 2015-08-01T01:22:28.000Z | 2021-02-24T11:12:41.000Z | import zmq, time, json
context = zmq.Context()
pub = context.socket(zmq.REQ)
# These are random useless keys for testing Curve auth
pubkey = u"7d0:tz+tGVT&*ViD/SzU)dz(3=yIE]aT2TRNrG2$"
privkey = u"FCFo%:3pZTbiQq?MARHYk(<Kp*B-<RpRG7QMUlXr"
serverkey = u"mN>y$-+17hxa6F>r@}sxmL-uX}IM=:wIq}G4y*f["
pub.setsockopt_string(... | 31.14 | 109 | 0.666667 |
a032b7d1d6d08d471ad93367224c6b5463ad7672 | 392 | py | Python | extract_emails/email_filters/email_filter_interface.py | trisongz/extract-emails | 22485fd25edac993d448bf8e8af51c551694e5cd | [
"MIT"
] | 1 | 2020-11-22T01:29:41.000Z | 2020-11-22T01:29:41.000Z | extract_emails/email_filters/email_filter_interface.py | chiaminchuang/extract-emails | d7549186549a0776cfa28bc946550fd79b04043e | [
"MIT"
] | null | null | null | extract_emails/email_filters/email_filter_interface.py | chiaminchuang/extract-emails | d7549186549a0776cfa28bc946550fd79b04043e | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from typing import List
class EmailFilterInterface(ABC):
"""
Interface for email filters
"""
@abstractmethod
def filter(self, emails: List[str]) -> List[str]:
"""
Filter emails by params
:param: list(str) emails: list of emails for filt... | 20.631579 | 62 | 0.614796 |
a032fe94d351a63b7d04128ecd927fbb6c87a879 | 6,144 | py | Python | service/azservice/tooling1.py | cnective-inc/vscode-azurecli | 0ac34e2214078270b63cf6716423d40a60423834 | [
"MIT"
] | 38 | 2019-06-21T00:26:15.000Z | 2022-03-19T05:23:55.000Z | service/azservice/tooling1.py | cnective-inc/vscode-azurecli | 0ac34e2214078270b63cf6716423d40a60423834 | [
"MIT"
] | 46 | 2017-05-17T09:00:51.000Z | 2019-04-24T10:18:19.000Z | service/azservice/tooling1.py | cnective-inc/vscode-azurecli | 0ac34e2214078270b63cf6716423d40a60423834 | [
"MIT"
] | 27 | 2019-05-19T18:42:42.000Z | 2022-01-18T09:14:26.000Z | """tooling integration"""
# --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# ------------------------------------------... | 29.681159 | 108 | 0.662598 |
a03374010f5d746041d0825cf88d30f7bf187cff | 57 | py | Python | copy_topic_files.py | FoamyGuy/CircuitPython_Repo_Topics | 9a606e9549bcd663d6290c0648466022c1b964db | [
"MIT"
] | null | null | null | copy_topic_files.py | FoamyGuy/CircuitPython_Repo_Topics | 9a606e9549bcd663d6290c0648466022c1b964db | [
"MIT"
] | null | null | null | copy_topic_files.py | FoamyGuy/CircuitPython_Repo_Topics | 9a606e9549bcd663d6290c0648466022c1b964db | [
"MIT"
] | null | null | null | import os
os.system("cp -r ../../../topic_scripts/* ./") | 19 | 46 | 0.561404 |
a0355bef2d29e903faa1a547fedc8fc74c627d30 | 537 | py | Python | metaopt/concurrent/worker/worker.py | cigroup-ol/metaopt | 6dfd5105d3c6eaf00f96670175cae16021069514 | [
"BSD-3-Clause"
] | 8 | 2015-02-02T21:42:23.000Z | 2019-06-30T18:12:43.000Z | metaopt/concurrent/worker/worker.py | cigroup-ol/metaopt | 6dfd5105d3c6eaf00f96670175cae16021069514 | [
"BSD-3-Clause"
] | 4 | 2015-09-24T14:12:38.000Z | 2021-12-08T22:42:52.000Z | metaopt/concurrent/worker/worker.py | cigroup-ol/metaopt | 6dfd5105d3c6eaf00f96670175cae16021069514 | [
"BSD-3-Clause"
] | 6 | 2015-02-27T12:35:33.000Z | 2020-10-15T21:04:02.000Z | # -*- coding: utf-8 -*-
"""
Minimal worker implementation.
"""
# Future
from __future__ import absolute_import, division, print_function, \
unicode_literals, with_statement
# First Party
from metaopt.concurrent.worker.base import BaseWorker
class Worker(BaseWorker):
"""Minimal worker implementation."""
... | 20.653846 | 67 | 0.687151 |
a036a26ddca3cff8f085b18091bc763c3dc73fd2 | 261 | py | Python | Fundamentos/test-constantes.py | ijchavez/python | bccd94a9bee90125e2be27b0355bdaedb0ae9d19 | [
"Unlicense"
] | null | null | null | Fundamentos/test-constantes.py | ijchavez/python | bccd94a9bee90125e2be27b0355bdaedb0ae9d19 | [
"Unlicense"
] | null | null | null | Fundamentos/test-constantes.py | ijchavez/python | bccd94a9bee90125e2be27b0355bdaedb0ae9d19 | [
"Unlicense"
] | null | null | null | # para importar todo from constantes import *
from constantes import MI_CONSTANTE
from constantes import Matematicas as Mate
print(MI_CONSTANTE)
print(Mate.PI)
MI_CONSTANTE = "nuevo valor"
Mate.PI = "3.14"
print(">>>",MI_CONSTANTE)
print(">>>",Mate.PI)
| 18.642857 | 45 | 0.735632 |
a03a7becb2df6dd7e3600ceabbb203ca1e648d2d | 10,131 | py | Python | venv/lib/python3.8/site-packages/hgext/remotefilelog/shallowbundle.py | JesseDavids/mqtta | 389eb4f06242d4473fe1bcff7fc6a22290e0d99c | [
"Apache-2.0"
] | 4 | 2021-02-05T10:57:39.000Z | 2022-02-25T04:43:23.000Z | venv/lib/python3.8/site-packages/hgext/remotefilelog/shallowbundle.py | JesseDavids/mqtta | 389eb4f06242d4473fe1bcff7fc6a22290e0d99c | [
"Apache-2.0"
] | null | null | null | venv/lib/python3.8/site-packages/hgext/remotefilelog/shallowbundle.py | JesseDavids/mqtta | 389eb4f06242d4473fe1bcff7fc6a22290e0d99c | [
"Apache-2.0"
] | null | null | null | # shallowbundle.py - bundle10 implementation for use with shallow repositories
#
# Copyright 2013 Facebook, Inc.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from __future__ import absolute_import
from mercurial.i18n import _
f... | 33.325658 | 80 | 0.583062 |
a03aa51d99ddd848b1a155bf6b547a0503967011 | 10,507 | py | Python | tests/test_main.py | FixItDad/vault-pwmgr | 8c9edec3786eefbf72f0c13c24f3d4e331ab1562 | [
"MIT"
] | 1 | 2018-01-26T12:45:44.000Z | 2018-01-26T12:45:44.000Z | tests/test_main.py | FixItDad/vault-pwmgr | 8c9edec3786eefbf72f0c13c24f3d4e331ab1562 | [
"MIT"
] | null | null | null | tests/test_main.py | FixItDad/vault-pwmgr | 8c9edec3786eefbf72f0c13c24f3d4e331ab1562 | [
"MIT"
] | null | null | null | #!/usr/bin/python
# Functional tests for the main password manager page
# Currently targeting Firefox
# Depends on the vault configuration provided by the startdev.sh script.
# Depends on pytest-sourceorder to force test case execution order.
# TODO: configure vault data from pretest fixture.
import datetime
import ... | 31.743202 | 101 | 0.596745 |
a03c291ae4978fabfb123a70eed6e3604690f22e | 319 | py | Python | python/cowSum.py | TenType/competition | 1715c79c88992e4603b327f962f44eb5bffcb801 | [
"MIT"
] | 1 | 2022-02-05T02:11:37.000Z | 2022-02-05T02:11:37.000Z | python/cowSum.py | TenType/competition | 1715c79c88992e4603b327f962f44eb5bffcb801 | [
"MIT"
] | null | null | null | python/cowSum.py | TenType/competition | 1715c79c88992e4603b327f962f44eb5bffcb801 | [
"MIT"
] | null | null | null | n, t = map(int, input().split())
f = []
results = [-1, -1, -1, -1]
for i in range(0, n):
f.append(list(map(int, input().split())))
# print(f)
for j in range(0, n):
if t in range(f[j][4], f[j][5]):
for k in range(0, 4):
if f[j][k] > results[k]:
results[k] = f[j][k]
for m in range(0, 4):
print(results[m])
| 19.9375 | 42 | 0.526646 |
a03d0e1506063ae02913fe583bcbdc21759f23a9 | 2,031 | py | Python | reacticket/extensions/usersettings.py | i-am-zaidali/Toxic-Cogs | 088cb364f9920c20879751da6b7333118ba1bf41 | [
"MIT"
] | 56 | 2019-03-21T21:03:26.000Z | 2022-03-14T08:26:55.000Z | reacticket/extensions/usersettings.py | i-am-zaidali/Toxic-Cogs | 088cb364f9920c20879751da6b7333118ba1bf41 | [
"MIT"
] | 38 | 2019-08-20T02:18:27.000Z | 2022-02-22T11:19:05.000Z | reacticket/extensions/usersettings.py | i-am-zaidali/Toxic-Cogs | 088cb364f9920c20879751da6b7333118ba1bf41 | [
"MIT"
] | 44 | 2019-07-04T06:17:54.000Z | 2022-03-25T19:18:31.000Z | from typing import Optional
from reacticket.extensions.abc import MixinMeta
from reacticket.extensions.mixin import settings
class ReacTicketUserSettingsMixin(MixinMeta):
@settings.group()
async def userpermissions(self, ctx):
"""Control the permissions that users have with their own tickets"""
... | 42.3125 | 97 | 0.678484 |
a040b6c0982b77309717ef74a52f2c7e1c8af890 | 1,276 | py | Python | tests/test_command_line.py | cwithmichael/breakzip | 3c81bd2a081b47f2e57d1b72f2b0fe6b76e613b3 | [
"MIT"
] | 5 | 2020-08-15T11:40:17.000Z | 2021-03-22T15:15:37.000Z | tests/test_command_line.py | cwithmichael/breakzip | 3c81bd2a081b47f2e57d1b72f2b0fe6b76e613b3 | [
"MIT"
] | null | null | null | tests/test_command_line.py | cwithmichael/breakzip | 3c81bd2a081b47f2e57d1b72f2b0fe6b76e613b3 | [
"MIT"
] | null | null | null | from breakzip import command_line
import pytest
import os
@pytest.fixture
def enc_zip(rootdir):
"""Returns an EncryptedZipFile instance with a test zip"""
test_zip = os.path.join(rootdir, "cats.zip")
return test_zip
def test_reading_file(enc_zip, mocker):
mocker.patch.object(command_line.sys, "argv"... | 29.674419 | 63 | 0.71395 |
a04150678757a161b57d09c46ef15266722ed6e3 | 643 | py | Python | tourney/commands/stats_command.py | netromdk/tourney | 192d9dec935ac087969a810870b784e3d626b9d5 | [
"MIT"
] | 1 | 2022-01-11T07:29:49.000Z | 2022-01-11T07:29:49.000Z | tourney/commands/stats_command.py | netromdk/tourney | 192d9dec935ac087969a810870b784e3d626b9d5 | [
"MIT"
] | 7 | 2018-10-26T08:10:23.000Z | 2021-08-17T06:13:27.000Z | tourney/commands/stats_command.py | netromdk/tourney | 192d9dec935ac087969a810870b784e3d626b9d5 | [
"MIT"
] | 2 | 2018-08-24T13:43:02.000Z | 2019-02-20T09:09:19.000Z | from .command import Command
from datetime import datetime
import calendar
from tourney.util import this_season_filter
from tourney.stats import Stats
class StatsCommand(Command):
def __init__(self):
super(StatsCommand, self).__init__("stats")
self.set_ephemeral(False)
def execute(self, lookup=None):
... | 26.791667 | 91 | 0.748056 |
a041cf9593ba00ff0663499073797bf96dd8b200 | 300 | py | Python | agnocomplete/urls.py | mike-perdide/django-agnocomplete | 1ef67a0a808cfe61c6d1ac5ec449ee1a0f0246e8 | [
"MIT"
] | null | null | null | agnocomplete/urls.py | mike-perdide/django-agnocomplete | 1ef67a0a808cfe61c6d1ac5ec449ee1a0f0246e8 | [
"MIT"
] | null | null | null | agnocomplete/urls.py | mike-perdide/django-agnocomplete | 1ef67a0a808cfe61c6d1ac5ec449ee1a0f0246e8 | [
"MIT"
] | 1 | 2022-01-03T16:18:00.000Z | 2022-01-03T16:18:00.000Z | """
Agnostic Autocomplete URLS
"""
from django.conf.urls import url
from .views import AgnocompleteView, CatalogView
urlpatterns = [
url(
r'^(?P<klass>[-_\w]+)/$',
AgnocompleteView.as_view(),
name='agnocomplete'),
url(r'^$', CatalogView.as_view(), name='catalog'),
]
| 21.428571 | 54 | 0.626667 |
a044f460600112720a002859c5451c1e4332abe6 | 10,037 | py | Python | tem/repo.py | tem-cli/tem | 6974734a000604fe201fcba573b05e8fe50eda72 | [
"MIT"
] | null | null | null | tem/repo.py | tem-cli/tem | 6974734a000604fe201fcba573b05e8fe50eda72 | [
"MIT"
] | null | null | null | tem/repo.py | tem-cli/tem | 6974734a000604fe201fcba573b05e8fe50eda72 | [
"MIT"
] | null | null | null | """Repository operations"""
import os
from tem import config, util
class Repo:
"""A python representation of a repository."""
def __init__(self, *args):
if not args:
self.path = ""
if isinstance(args[0], str):
self.path = args[0]
elif isinstance(args[0], Repo)... | 31.170807 | 104 | 0.586629 |
a04797fdee39fb437fee089feeeacafda35a132b | 2,064 | py | Python | experiments/cntJson.py | MadhuNimmo/jalangi2 | bbe8350b8ede5d978c1b3923780f277aacb1d074 | [
"Apache-2.0"
] | null | null | null | experiments/cntJson.py | MadhuNimmo/jalangi2 | bbe8350b8ede5d978c1b3923780f277aacb1d074 | [
"Apache-2.0"
] | null | null | null | experiments/cntJson.py | MadhuNimmo/jalangi2 | bbe8350b8ede5d978c1b3923780f277aacb1d074 | [
"Apache-2.0"
] | null | null | null | import json
import sys
#filename='/home/anon/js-acg-examples-master/Knockout_test_results/StatWala.json'
cnt=0
cnt2=0
#item_dict = json.loads(filename)
#import json
filename1 = sys.argv[1]
#filename2 = sys.argv[2]
#out_key = filename2.read().split('\n')
'''out_key = [line.rstrip('\n') for line in open(filename2)]'''
... | 34.983051 | 157 | 0.562984 |
a047d0ac5a16d636bbec804560bb56282540b1b2 | 13,172 | py | Python | remit/settings.py | naamara/blink | 326c035b2f0ef0feae4cd7aa2d4e73fa4a40171a | [
"Unlicense",
"MIT"
] | null | null | null | remit/settings.py | naamara/blink | 326c035b2f0ef0feae4cd7aa2d4e73fa4a40171a | [
"Unlicense",
"MIT"
] | 10 | 2019-12-26T17:31:31.000Z | 2022-03-21T22:17:33.000Z | remit/settings.py | naamara/blink | 326c035b2f0ef0feae4cd7aa2d4e73fa4a40171a | [
"Unlicense",
"MIT"
] | null | null | null | ''' settings for Django '''
import os
import django.conf.global_settings as DEFAULT_SETTINGS
LOCALHOST = False
DEBUG = False
TEMPLATE_DEBUG = DEBUG
DEBUG_PAYMENTS = DEBUG
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.abspath(
os.path.join(os.path.dirname(__file__), os.... | 24.994307 | 109 | 0.719708 |
a04c74859e147b481962d7389a2144e8a4b8236e | 1,151 | py | Python | tests/integration/test_issue_1447.py | alexey-tereshenkov-oxb/pex | 2e2d1e50e604fdee48b0d51aea482ca255521ff0 | [
"Apache-2.0"
] | 2,160 | 2015-01-06T17:57:39.000Z | 2022-03-30T19:59:01.000Z | tests/integration/test_issue_1447.py | alexey-tereshenkov-oxb/pex | 2e2d1e50e604fdee48b0d51aea482ca255521ff0 | [
"Apache-2.0"
] | 1,242 | 2015-01-22T14:56:46.000Z | 2022-03-31T18:02:38.000Z | tests/integration/test_issue_1447.py | Satertek/pex | 64de1c4cf031118ef446ac98a8c164c91c23bb9b | [
"Apache-2.0"
] | 248 | 2015-01-15T13:34:50.000Z | 2022-03-26T01:24:18.000Z | # Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import os
import shutil
import subprocess
import sys
from pex.pex_info import PexInfo
from pex.testing import run_pex_command
from pex.typing import TYPE_CHECKING
from pex.variables import... | 29.512821 | 85 | 0.730669 |
a04cf7b68b006d07caae20b361bd4e847b1b78eb | 13,900 | py | Python | tests/gfp.py | mcepl/git-packaging-tools | de705a9ac2efd1752754e4feb093fe85821f9224 | [
"MIT"
] | 8 | 2017-08-15T12:51:34.000Z | 2020-10-07T09:58:34.000Z | tests/gfp.py | mcepl/git-packaging-tools | de705a9ac2efd1752754e4feb093fe85821f9224 | [
"MIT"
] | 5 | 2017-02-04T12:32:16.000Z | 2020-07-01T14:13:19.000Z | tests/gfp.py | mcepl/git-packaging-tools | de705a9ac2efd1752754e4feb093fe85821f9224 | [
"MIT"
] | 6 | 2017-02-07T13:31:21.000Z | 2021-02-10T23:14:03.000Z | #!/usr/bin/python3
#
# Copyright (c) 2017-2020, SUSE LLC
#
# 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 ... | 36.197917 | 129 | 0.606475 |
a04efbad847960e56a6c9a8e43d4465164fb4801 | 5,455 | py | Python | modules/dispatch.py | kex5n/Vehicles-Dispatch-Simulator | d0cca03fbf56e4b0ceeef8dafc59de105c1d4507 | [
"MIT"
] | null | null | null | modules/dispatch.py | kex5n/Vehicles-Dispatch-Simulator | d0cca03fbf56e4b0ceeef8dafc59de105c1d4507 | [
"MIT"
] | null | null | null | modules/dispatch.py | kex5n/Vehicles-Dispatch-Simulator | d0cca03fbf56e4b0ceeef8dafc59de105c1d4507 | [
"MIT"
] | null | null | null | from dataclasses import dataclass
import random
from typing import List
import numpy as np
import torch
from config import Config
from domain import DispatchMode
from models import DQN
from modules.state import FeatureManager
from objects import Area, Vehicle
from objects.area import AreaManager
from objects.vehicle ... | 40.110294 | 148 | 0.700642 |
a04f7f2d5934d5148efee6d0cd9e612d55de51c8 | 4,716 | py | Python | dice_vtk/geometries/geometry_base.py | dicehub/dice_vtk | ab8d9f34ae359461db5687d05bf38548bbaca6ea | [
"MIT"
] | null | null | null | dice_vtk/geometries/geometry_base.py | dicehub/dice_vtk | ab8d9f34ae359461db5687d05bf38548bbaca6ea | [
"MIT"
] | null | null | null | dice_vtk/geometries/geometry_base.py | dicehub/dice_vtk | ab8d9f34ae359461db5687d05bf38548bbaca6ea | [
"MIT"
] | null | null | null | # Standard Python modules
# =======================
import weakref
from abc import ABCMeta, abstractmethod, abstractproperty
# External modules
# ================
from vtk import vtkActor
from vtk import vtkMapper
from vtk import vtkPolyDataAlgorithm
from vtk import vtkBoundingBox
# DICE modules
# ============
from d... | 23.117647 | 71 | 0.601569 |
a05379809d542906a1e8b3ecab8d346bf1a2d752 | 2,272 | py | Python | tests/integration/sts/replayer_integration_test.py | jhall11/sts | b484f184824c9fe59864103f24fdfa24ff8bcdcd | [
"Apache-2.0"
] | 5 | 2016-03-18T15:12:04.000Z | 2019-01-28T20:18:24.000Z | tests/integration/sts/replayer_integration_test.py | jhall11/sts | b484f184824c9fe59864103f24fdfa24ff8bcdcd | [
"Apache-2.0"
] | null | null | null | tests/integration/sts/replayer_integration_test.py | jhall11/sts | b484f184824c9fe59864103f24fdfa24ff8bcdcd | [
"Apache-2.0"
] | 1 | 2019-11-02T22:04:48.000Z | 2019-11-02T22:04:48.000Z | #!/usr/bin/env python
#
# Copyright 2011-2013 Colin Scott
#
# 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... | 33.910448 | 116 | 0.677377 |
a054dcd6697f8d246a99e2b87deb291ef103d4ce | 101 | py | Python | add.py | Harshillab/python | 877d5fa6769ce7bcc28ca75c247df42ed7375e55 | [
"MIT"
] | null | null | null | add.py | Harshillab/python | 877d5fa6769ce7bcc28ca75c247df42ed7375e55 | [
"MIT"
] | null | null | null | add.py | Harshillab/python | 877d5fa6769ce7bcc28ca75c247df42ed7375e55 | [
"MIT"
] | null | null | null | import os
a=input("enter username:")
if a.isalpha():
os.system("useradd "+a)
os.system("passwd a")
| 16.833333 | 26 | 0.673267 |
a055c0b6a8a397cfaf7bde8f028637510c8a76bc | 3,733 | py | Python | responsive_dashboard/views.py | rhooper/django-responsive-dashboard | 039d634cbefb87be610334c01bda1a790cf5cd71 | [
"BSD-3-Clause"
] | 28 | 2015-07-08T01:03:17.000Z | 2022-03-11T13:30:49.000Z | responsive_dashboard/views.py | burke-software/django-responsive-dashboard | e08d7a12155d87d78cb3928bcc58f2701d326b69 | [
"BSD-3-Clause"
] | 4 | 2018-09-03T14:15:42.000Z | 2021-06-10T17:24:09.000Z | responsive_dashboard/views.py | rhooper/django-responsive-dashboard | 039d634cbefb87be610334c01bda1a790cf5cd71 | [
"BSD-3-Clause"
] | 13 | 2015-01-15T14:33:30.000Z | 2021-08-23T02:39:38.000Z | """Views."""
from django.conf import settings
from django.contrib.auth.decorators import login_required
from django.http import HttpResponse, Http404
from django.shortcuts import render, redirect
from responsive_dashboard.dashboard import dashboards
from responsive_dashboard.models import UserDashboard, UserDashlet
... | 34.88785 | 114 | 0.698902 |
a05679a1770f12c767a08a09a8c1456749cc03d4 | 769 | py | Python | app/config.py | tomakado/markovscope-api | 3dd60439d980e3b77429850f1b43cb37ffd02f99 | [
"BSD-3-Clause"
] | 1 | 2021-03-06T06:36:25.000Z | 2021-03-06T06:36:25.000Z | app/config.py | tomakado/markovscope-api | 3dd60439d980e3b77429850f1b43cb37ffd02f99 | [
"BSD-3-Clause"
] | null | null | null | app/config.py | tomakado/markovscope-api | 3dd60439d980e3b77429850f1b43cb37ffd02f99 | [
"BSD-3-Clause"
] | null | null | null | import os
from dataclasses import dataclass
@dataclass(frozen=True)
class Config:
listen_host: str
listen_port: int
yc_oauth_token: str
yc_folder_id: str
data_path: str
debug_enabled: bool
@staticmethod
def create_from_env() -> 'Config':
return Config(
listen_host=... | 25.633333 | 80 | 0.595579 |
a0578bb9313ba5a000fe92b2495ddd4a94b1be7e | 15,486 | py | Python | atlas/atlas.py | pythseq/atlas | 6fd8d9e8ad05d234fc408aef8e0989da199f3b48 | [
"BSD-3-Clause"
] | 1 | 2020-12-31T14:54:49.000Z | 2020-12-31T14:54:49.000Z | atlas/atlas.py | pythseq/atlas | 6fd8d9e8ad05d234fc408aef8e0989da199f3b48 | [
"BSD-3-Clause"
] | null | null | null | atlas/atlas.py | pythseq/atlas | 6fd8d9e8ad05d234fc408aef8e0989da199f3b48 | [
"BSD-3-Clause"
] | null | null | null | import click
import logging
import multiprocessing
import os
import sys
from atlas import __version__
from atlas.conf import make_config
from atlas.parsers import refseq_parser
from atlas.tables import merge_tables
from atlas.workflows import download, run_workflow
logging.basicConfig(level=logging.INFO, datefmt="%Y-... | 54.336842 | 323 | 0.694692 |
a0590b43efec682503f6e281362973bb8f85de85 | 1,101 | py | Python | tests/unit/core/types/test_relationships.py | jeffsawatzky/python-jsonapi | 8f181d6764b525f58d06517c65b1f0d24f3c2282 | [
"MIT"
] | null | null | null | tests/unit/core/types/test_relationships.py | jeffsawatzky/python-jsonapi | 8f181d6764b525f58d06517c65b1f0d24f3c2282 | [
"MIT"
] | 237 | 2020-07-23T05:53:22.000Z | 2022-03-30T23:02:35.000Z | tests/unit/core/types/test_relationships.py | jeffsawatzky/python-jsonapi | 8f181d6764b525f58d06517c65b1f0d24f3c2282 | [
"MIT"
] | null | null | null | """Test cases for the python_jsonapi.core.types.relationships module."""
from python_jsonapi.core.types.relationships import Relationship
from python_jsonapi.core.types.relationships import RelationshipsMixin
def test_relationship_init() -> None:
"""Can init a new relationships."""
sut = Relationship()
as... | 34.40625 | 74 | 0.735695 |
a0595a142eaf248d183d94e735f0ba479dc117a7 | 48 | py | Python | needlestack/indices/__init__.py | needlehaystack/needlestack | e00529a2a7c2d85059936a85f54dfb55e515b6ef | [
"Apache-2.0"
] | 3 | 2019-10-03T22:15:21.000Z | 2022-02-08T09:05:41.000Z | needlestack/indices/__init__.py | cungtv/needlestack | e00529a2a7c2d85059936a85f54dfb55e515b6ef | [
"Apache-2.0"
] | 1 | 2021-04-30T21:08:47.000Z | 2021-04-30T21:08:47.000Z | needlestack/indices/__init__.py | cungtv/needlestack | e00529a2a7c2d85059936a85f54dfb55e515b6ef | [
"Apache-2.0"
] | 2 | 2019-08-02T19:13:09.000Z | 2019-10-25T01:47:17.000Z | from needlestack.indices.index import BaseIndex
| 24 | 47 | 0.875 |
a05a419a9ddf5084b706e695f35bb68b2e11e8f7 | 698 | py | Python | app/accounts/utilities.py | porowns/Krypted-Auth | ed171bfbd1c98a4c171ddf6a20b18691330b1646 | [
"MIT"
] | 6 | 2017-12-13T21:53:05.000Z | 2018-10-04T02:47:05.000Z | app/accounts/utilities.py | porowns/Krypted-Auth | ed171bfbd1c98a4c171ddf6a20b18691330b1646 | [
"MIT"
] | 106 | 2019-08-11T23:00:39.000Z | 2021-06-10T19:45:54.000Z | app/accounts/utilities.py | KryptedGaming/kryptedauth | ed171bfbd1c98a4c171ddf6a20b18691330b1646 | [
"MIT"
] | 10 | 2020-01-18T11:28:44.000Z | 2022-02-21T06:08:39.000Z | from django.conf import settings
from django.contrib.auth.models import User
from django.core.mail import send_mail
def username_or_email_resolver(username):
if User.objects.filter(email=username).exists():
return User.objects.get(email=username).username
else:
return username
de... | 33.238095 | 123 | 0.684814 |
a05b0d63377d071367b35f0034a3b68acdab2c2d | 245 | py | Python | run/lemmatize.py | osmanbaskaya/mapping-impact | 8024dd3b916ac2dfc336221dd32faba4c0a98442 | [
"MIT"
] | 1 | 2016-03-14T15:28:22.000Z | 2016-03-14T15:28:22.000Z | run/lemmatize.py | osmanbaskaya/mapping-impact | 8024dd3b916ac2dfc336221dd32faba4c0a98442 | [
"MIT"
] | null | null | null | run/lemmatize.py | osmanbaskaya/mapping-impact | 8024dd3b916ac2dfc336221dd32faba4c0a98442 | [
"MIT"
] | null | null | null | #! /usr/bin/python
# -*- coding: utf-8 -*-
__author__ = "Osman Baskaya"
from nltk.stem.wordnet import WordNetLemmatizer
import sys
lmtzr = WordNetLemmatizer()
for line in sys.stdin:
print ' '.join(map(lmtzr.lemmatize, line.split()))
| 14.411765 | 54 | 0.689796 |
a05cc4dfec88f66003f8b833c676b2a3c02c79c3 | 4,066 | py | Python | markov.py | garybake/markov_lyrics | 816043acd849b77097aa5bd504b123c6b306b801 | [
"MIT"
] | null | null | null | markov.py | garybake/markov_lyrics | 816043acd849b77097aa5bd504b123c6b306b801 | [
"MIT"
] | null | null | null | markov.py | garybake/markov_lyrics | 816043acd849b77097aa5bd504b123c6b306b801 | [
"MIT"
] | null | null | null | # https://realpython.com/blog/python/lyricize-a-flask-app-to-create-lyrics-using-markov-chains/
from random import choice
import sys
def generateModel(text, order):
model = {}
for i in range(0, len(text) - order):
fragment = text[i:i+order]
next_letter = text[i+order]
if fragment not i... | 30.571429 | 175 | 0.734629 |
a05d8bd7f43816678e051cbb74ff64ee556b6710 | 1,545 | py | Python | curriculum_tools/curriculum_tools/NamedEnv.py | darpa-l2m/meta-arcade | 9c9539c1feef89e9d1d55507bf4f75c965a25038 | [
"MIT"
] | 2 | 2021-12-17T19:54:41.000Z | 2021-12-20T06:08:31.000Z | curriculum_tools/curriculum_tools/NamedEnv.py | darpa-l2m/meta-arcade | 9c9539c1feef89e9d1d55507bf4f75c965a25038 | [
"MIT"
] | 1 | 2021-12-17T20:45:07.000Z | 2021-12-21T16:30:24.000Z | curriculum_tools/curriculum_tools/NamedEnv.py | darpa-l2m/meta-arcade | 9c9539c1feef89e9d1d55507bf4f75c965a25038 | [
"MIT"
] | null | null | null | """
Copyright © 2021 The Johns Hopkins University Applied Physics Laboratory LLC
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... | 33.586957 | 82 | 0.741748 |
a05f0813319812f0e9d30a1ddfef3dd56345c333 | 9,265 | py | Python | scirex/metrics/paired_bootstrap.py | viswavi/SciREX | 8e4b402e95d438c92eeecee315d389903a963b8d | [
"Apache-2.0"
] | null | null | null | scirex/metrics/paired_bootstrap.py | viswavi/SciREX | 8e4b402e95d438c92eeecee315d389903a963b8d | [
"Apache-2.0"
] | null | null | null | scirex/metrics/paired_bootstrap.py | viswavi/SciREX | 8e4b402e95d438c92eeecee315d389903a963b8d | [
"Apache-2.0"
] | null | null | null | # Adapted from Graham Neubig's Paired Bootstrap script
# https://github.com/neubig/util-scripts/blob/master/paired-bootstrap.py
import numpy as np
from sklearn.metrics import f1_score, precision_score, recall_score
from tqdm import tqdm
EVAL_TYPE_ACC = "acc"
EVAL_TYPE_BLEU = "bleu"
EVAL_TYPE_BLEU_DETOK = "bleu_detok"... | 40.814978 | 135 | 0.681705 |
a05f5a0fc89824667b995e5851cdb833729517df | 970 | py | Python | mypage/paginator.py | kirill-ivanov-a/mypage-flask | b803dfdf3d38d32879d81b8682d51e387c8f709f | [
"MIT"
] | null | null | null | mypage/paginator.py | kirill-ivanov-a/mypage-flask | b803dfdf3d38d32879d81b8682d51e387c8f709f | [
"MIT"
] | null | null | null | mypage/paginator.py | kirill-ivanov-a/mypage-flask | b803dfdf3d38d32879d81b8682d51e387c8f709f | [
"MIT"
] | null | null | null | from paginate_sqlalchemy import SqlalchemyOrmPage
class Paginator(SqlalchemyOrmPage):
def __init__(self, *args, radius=3, **kwargs):
super().__init__(*args, **kwargs)
self.radius = radius
self.page_range = self._make_page_range()
def _make_page_range(self):
if self.page_count... | 34.642857 | 88 | 0.609278 |
a060c7c4400126644e1d48eb927d2de5fe556729 | 4,915 | py | Python | models/deeplab_v2.py | iamsofancyyoualreadyknow/IHC-based-labels-generation-and-semantic-segmentation-for-lung-cancer | 57904544c6d6b43dcd5937afeb474c0a47456d98 | [
"MIT"
] | null | null | null | models/deeplab_v2.py | iamsofancyyoualreadyknow/IHC-based-labels-generation-and-semantic-segmentation-for-lung-cancer | 57904544c6d6b43dcd5937afeb474c0a47456d98 | [
"MIT"
] | null | null | null | models/deeplab_v2.py | iamsofancyyoualreadyknow/IHC-based-labels-generation-and-semantic-segmentation-for-lung-cancer | 57904544c6d6b43dcd5937afeb474c0a47456d98 | [
"MIT"
] | null | null | null | import tensorflow as tf
# import slim
# conv layers
layers = tf.contrib.layers
arg_scope = tf.contrib.framework.arg_scope
def vgg_conv_dilation(inputs, weight_decay=0.0005):
with arg_scope([layers.convolution2d, layers.max_pool2d], padding='SAME'):
with arg_scope([layers.convolution2d], rate=1,
... | 56.494253 | 99 | 0.585554 |
a06437850e2dae1448abd64b704f6b42218ef386 | 968 | py | Python | Python/logging.py | saurabhcommand/Hello-world | 647bad9da901a52d455f05ecc37c6823c22dc77e | [
"MIT"
] | 1,428 | 2018-10-03T15:15:17.000Z | 2019-03-31T18:38:36.000Z | Python/logging.py | saurabhcommand/Hello-world | 647bad9da901a52d455f05ecc37c6823c22dc77e | [
"MIT"
] | 1,162 | 2018-10-03T15:05:49.000Z | 2018-10-18T14:17:52.000Z | Python/logging.py | saurabhcommand/Hello-world | 647bad9da901a52d455f05ecc37c6823c22dc77e | [
"MIT"
] | 3,909 | 2018-10-03T15:07:19.000Z | 2019-03-31T18:39:08.000Z | import datetime
# Log parm(File_name)
class logging_class:
def __init__(self, log_file_name, verbose):
self.log_file_name = log_file_name
self.stream = open(log_file_name, "a")
self.verbose = verbose
# Write a line in the log file
def create_log(self, to_add):
if (to_add !=... | 31.225806 | 86 | 0.572314 |
a064737d7eb5496d755ad0d39ca50e2c9279c4d9 | 10,541 | py | Python | tfep/utils/cli/tool.py | andrrizzi/tfep | a98ec870007a2ceb72cab147d9e0dfffb7dc8849 | [
"MIT"
] | 5 | 2021-07-30T16:01:46.000Z | 2021-12-14T15:24:29.000Z | tfep/utils/cli/tool.py | andrrizzi/tfep | a98ec870007a2ceb72cab147d9e0dfffb7dc8849 | [
"MIT"
] | 2 | 2021-08-13T12:19:13.000Z | 2021-10-06T08:04:18.000Z | tfep/utils/cli/tool.py | andrrizzi/tfep | a98ec870007a2ceb72cab147d9e0dfffb7dc8849 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# =============================================================================
# MODULE DOCSTRING
# =============================================================================
"""
Utility classes to wrap command line tools.
The module provides a class :class:`.CLITool` that provides boilerp... | 36.223368 | 103 | 0.626411 |
a06853a9eca27d640f292fe2b2ffaac04fbafad7 | 1,128 | py | Python | invite2app/lib/facebook_auth.py | andresgz/invite2app | 3531db131c4f0646ae01b511971d6642128361e0 | [
"BSD-3-Clause"
] | null | null | null | invite2app/lib/facebook_auth.py | andresgz/invite2app | 3531db131c4f0646ae01b511971d6642128361e0 | [
"BSD-3-Clause"
] | null | null | null | invite2app/lib/facebook_auth.py | andresgz/invite2app | 3531db131c4f0646ae01b511971d6642128361e0 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import facebook
from allauth.socialaccount.models import SocialToken
from django.core.exceptions import ObjectDoesNotExist
class FacebookAuth(object):
"""
Interface bettween Django AllAuth and Facebook SDK
"""
def __init__(self, user_id):
super(FacebookAuth, self).__ini... | 27.512195 | 71 | 0.638298 |
a068b901b478d011dc44a977f7e4cc0f17632eaf | 11,386 | py | Python | visualize_high_LOO/visualize_high_LOO_cifar_norb.py | mkuchnik/Efficient_Augmentation | a82190c02509682c34f2df782fb58f8ffd3b11da | [
"MIT"
] | 11 | 2019-05-09T22:43:29.000Z | 2021-01-13T22:26:48.000Z | visualize_high_LOO/visualize_high_LOO_cifar_norb.py | mkuchnik/Efficient_Augmentation | a82190c02509682c34f2df782fb58f8ffd3b11da | [
"MIT"
] | 1 | 2020-10-07T14:03:47.000Z | 2020-10-07T14:03:47.000Z | visualize_high_LOO/visualize_high_LOO_cifar_norb.py | mkuchnik/Efficient_Augmentation | a82190c02509682c34f2df782fb58f8ffd3b11da | [
"MIT"
] | 6 | 2019-03-05T02:26:01.000Z | 2021-05-11T14:35:41.000Z | import pprint
import time
import keras
import numpy as np
import joblib
import dataset_loaders
import selection_policy
import augmentations
import experiments
import experiments_util
import featurized_classifiers
import visualization_util
import matplotlib.pyplot as plt
mem = joblib.Memory(cachedir="./cache", verbo... | 36.031646 | 84 | 0.584138 |
a06ffffb39b0434296021e5eee8841761190d6b0 | 370 | py | Python | backend/main_app/serializers.py | RTUITLab/Avia-Hack-2021-RealityX | ca700492d314a28e23fa837cd2dfa04dd67c167c | [
"Apache-2.0"
] | null | null | null | backend/main_app/serializers.py | RTUITLab/Avia-Hack-2021-RealityX | ca700492d314a28e23fa837cd2dfa04dd67c167c | [
"Apache-2.0"
] | null | null | null | backend/main_app/serializers.py | RTUITLab/Avia-Hack-2021-RealityX | ca700492d314a28e23fa837cd2dfa04dd67c167c | [
"Apache-2.0"
] | null | null | null | from rest_framework import serializers
from .models import *
class MessageSerializer(serializers.ModelSerializer):
created_at = serializers.DateTimeField(format="%d.%m.%Y %H:%M")
class Meta:
depth = 2
model = Message
fields = ('id', 'description', 'created_at', 'answer', 'correct', 'i... | 30.833333 | 125 | 0.672973 |
a0732a0c9e8673154fd43815d09dd9d39d2b3b7d | 96 | py | Python | batchout/core/util.py | ilia-khaustov/batchout | e916a1b0bfac771e6c96d0ff2478dc3f44804a94 | [
"MIT"
] | 8 | 2019-11-05T06:54:30.000Z | 2021-12-14T14:52:24.000Z | batchout/core/util.py | ilia-khaustov/batchout | e916a1b0bfac771e6c96d0ff2478dc3f44804a94 | [
"MIT"
] | null | null | null | batchout/core/util.py | ilia-khaustov/batchout | e916a1b0bfac771e6c96d0ff2478dc3f44804a94 | [
"MIT"
] | 1 | 2020-05-05T09:31:14.000Z | 2020-05-05T09:31:14.000Z |
def to_iter(obj):
try:
return iter(obj)
except TypeError:
return obj,
| 12 | 24 | 0.552083 |
a0767541c421c26c6de084316db254c59c03c5d0 | 17,875 | py | Python | web_site/wx/lib.py | Fixdq/dj-deep | 6712a722c7f620b76f21b1ebf0b618f42eb4a58a | [
"MIT"
] | null | null | null | web_site/wx/lib.py | Fixdq/dj-deep | 6712a722c7f620b76f21b1ebf0b618f42eb4a58a | [
"MIT"
] | null | null | null | web_site/wx/lib.py | Fixdq/dj-deep | 6712a722c7f620b76f21b1ebf0b618f42eb4a58a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on 2014-5-13
@author: skycrab
"""
import json
import time
import random
import string
import urllib
import hashlib
import threading
import traceback
import xml.etree.ElementTree as ET
import logging
from urllib import request as urllib2
from functools import wraps
from .config imp... | 38.690476 | 190 | 0.658238 |
a076da17c1234915c44f55110c45dfe832f020a4 | 4,723 | py | Python | argo_dsl/tasks.py | zen-xu/argo-dsl | 76b18073c8dd850b212ccaee2a0c95f718c67db6 | [
"Apache-2.0"
] | null | null | null | argo_dsl/tasks.py | zen-xu/argo-dsl | 76b18073c8dd850b212ccaee2a0c95f718c67db6 | [
"Apache-2.0"
] | null | null | null | argo_dsl/tasks.py | zen-xu/argo-dsl | 76b18073c8dd850b212ccaee2a0c95f718c67db6 | [
"Apache-2.0"
] | null | null | null | from __future__ import annotations
from contextlib import contextmanager
from typing import TYPE_CHECKING
from typing import Any
from typing import Callable
from typing import Dict
from typing import List
from typing import Optional
from typing import Union
from argo_dsl.api.io.argoproj.workflow import v1alpha1
if ... | 28.79878 | 106 | 0.645988 |
a07710f0bb90f929f1fc7e78cba178a4fc0fa117 | 1,007 | py | Python | tests/article_test.py | Kabu1/flashnews | 30852077c465ce828452125ec5e2b21115609c38 | [
"Unlicense"
] | null | null | null | tests/article_test.py | Kabu1/flashnews | 30852077c465ce828452125ec5e2b21115609c38 | [
"Unlicense"
] | null | null | null | tests/article_test.py | Kabu1/flashnews | 30852077c465ce828452125ec5e2b21115609c38 | [
"Unlicense"
] | null | null | null | import unittest
from app.models import Article
class ArticleTest(unittest.TestCase):
'''
Test Class to test the behaviour of the Article class
'''
def setUp(self):
'''
Set up method that will run before every Test
'''
self.new_article = Article('Jack Healy, Jack Nicas ... | 45.772727 | 569 | 0.715988 |
a0779d0acb5d0ce28e46508caa76d16adb915bd8 | 474 | py | Python | intern/conv_java_import.py | zaqwes8811/smart-vocabulary-cards | abeab5c86b1c6f68d8796475cba80c4f2c6055ff | [
"Apache-2.0"
] | null | null | null | intern/conv_java_import.py | zaqwes8811/smart-vocabulary-cards | abeab5c86b1c6f68d8796475cba80c4f2c6055ff | [
"Apache-2.0"
] | 11 | 2015-01-25T14:22:52.000Z | 2015-09-08T09:59:38.000Z | intern/conv_java_import.py | zaqwes8811/vocabulary-cards | abeab5c86b1c6f68d8796475cba80c4f2c6055ff | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
'''
Created on 18.04.2013
@author: кей
'''
import dals.os_io.io_wrapper as dal
def convert_one_line(msg):
copy_line = msg.split(';')[0]
if copy_line:
name = copy_line.split('.')[-1]
print copy_line+' as '+name
if __name__=='__main__':
sets = dal.get_utf8_t... | 19.75 | 43 | 0.594937 |
a078916cfe94a2866d1c06904964969d62a237ec | 25 | py | Python | relatives/__init__.py | treyhunner/django-relatives | a578ab135f865df2835957cedfd00476c4b65e18 | [
"MIT"
] | 10 | 2015-08-14T00:22:52.000Z | 2021-09-16T08:15:14.000Z | relatives/__init__.py | treyhunner/django-relatives | a578ab135f865df2835957cedfd00476c4b65e18 | [
"MIT"
] | 12 | 2015-03-09T20:17:16.000Z | 2021-09-30T18:46:11.000Z | relatives/__init__.py | treyhunner/django-relatives | a578ab135f865df2835957cedfd00476c4b65e18 | [
"MIT"
] | 3 | 2016-01-05T15:20:10.000Z | 2018-08-03T10:51:23.000Z | __version__ = '1.3.0.a3'
| 12.5 | 24 | 0.64 |
a07a7419dbe104e7dbe0af27f725918587fdc9f2 | 4,596 | py | Python | handlers/class_handler.py | Hargre/faltometro-bot | 271772dc52c9d0454d96ef3c43e3a0da32075743 | [
"MIT"
] | null | null | null | handlers/class_handler.py | Hargre/faltometro-bot | 271772dc52c9d0454d96ef3c43e3a0da32075743 | [
"MIT"
] | 2 | 2019-04-02T13:18:23.000Z | 2019-04-11T14:00:06.000Z | handlers/class_handler.py | Hargre/faltometro-bot | 271772dc52c9d0454d96ef3c43e3a0da32075743 | [
"MIT"
] | null | null | null | import logging
import math
from emoji import emojize
from peewee import DoesNotExist
from telegram import ParseMode
from telegram.ext import CommandHandler
from telegram.ext import ConversationHandler
from telegram.ext import Filters
from telegram.ext import MessageHandler
from telegram.ext import RegexHandler
from... | 27.035294 | 110 | 0.647302 |
a07ca3f53342a4c5c568050fc58fa24424a4bf96 | 1,137 | py | Python | jupyter/aBasic/a_datatype_class/Ex01_valuable.py | WoolinChoi/test | a0f9c8ecc63443acaae61d744eecec6c943d3a26 | [
"MIT"
] | null | null | null | jupyter/aBasic/a_datatype_class/Ex01_valuable.py | WoolinChoi/test | a0f9c8ecc63443acaae61d744eecec6c943d3a26 | [
"MIT"
] | 1 | 2021-03-30T09:01:47.000Z | 2021-03-30T09:01:47.000Z | jupyter/aBasic/a_datatype_class/Ex01_valuable.py | WoolinChoi/test | a0f9c8ecc63443acaae61d744eecec6c943d3a26 | [
"MIT"
] | 1 | 2019-12-06T18:21:10.000Z | 2019-12-06T18:21:10.000Z | """
파이션 - 무료이지만 강력하다
` 만들고자 하는 대부분의 프로그램 가능
` 물론, 하드웨어 제어같은 복잡하고 반복 연산이 많은 프로그램은 부적절
` 그러나, 다른언어 프로그램을 파이썬에 포함 가능
[주의] 줄을 맞추지 않으면 실행 안됨
[실행] Run 메뉴를 클릭하거나 단축키로 shift + alt + F10
[도움말] ctrl + q
"""
""" 여러줄 주석 """
# 한줄 주석
# print("헬로우")
# print('hello')
# print("""안... | 15.364865 | 50 | 0.504837 |
a07d57857f23110458e28cf9b4145b1716e6f940 | 2,502 | py | Python | convert.py | povle/SP-SR2-converter | 7a675204e15b340deac2b98634805cdf75e6fd4a | [
"MIT"
] | 3 | 2021-01-09T20:11:31.000Z | 2022-03-31T02:05:52.000Z | convert.py | povle/SP-SR2-converter | 7a675204e15b340deac2b98634805cdf75e6fd4a | [
"MIT"
] | null | null | null | convert.py | povle/SP-SR2-converter | 7a675204e15b340deac2b98634805cdf75e6fd4a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import sys
import io
import os.path
import shutil
import requests
from convert_file import convert_file
from gooey import Gooey, GooeyParser
if len(sys.argv) >= 2:
if '--ignore-gooey' not in sys.argv:
sys.argv.append('--ignore-gooey')
@Gooey(program_name='SP to SR2 ... | 43.137931 | 133 | 0.688649 |
a07db8162c85985e5fa4859871927e9c03a5f877 | 5,289 | py | Python | bsd2/vagrant-ansible/ansible/lib/ansible/runner/action_plugins/fetch.py | dlab-berkeley/collaboratool-archive | fa474e05737f78e628d6b9398c58cf7c966a7bba | [
"Apache-2.0"
] | 1 | 2016-01-20T14:36:02.000Z | 2016-01-20T14:36:02.000Z | bsd2/vagrant-ansible/ansible/lib/ansible/runner/action_plugins/fetch.py | dlab-berkeley/collaboratool-archive | fa474e05737f78e628d6b9398c58cf7c966a7bba | [
"Apache-2.0"
] | null | null | null | bsd2/vagrant-ansible/ansible/lib/ansible/runner/action_plugins/fetch.py | dlab-berkeley/collaboratool-archive | fa474e05737f78e628d6b9398c58cf7c966a7bba | [
"Apache-2.0"
] | null | null | null | # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any lat... | 42.653226 | 135 | 0.626962 |
a07ebd61f61d120e3815b7fb4a6cf2eeafd36431 | 4,563 | py | Python | src/plot_by_genome.py | MaaT-Pharma/AMBER | 76aa10e2295265b16337b7bfab769d67d3bea66a | [
"Apache-2.0"
] | null | null | null | src/plot_by_genome.py | MaaT-Pharma/AMBER | 76aa10e2295265b16337b7bfab769d67d3bea66a | [
"Apache-2.0"
] | null | null | null | src/plot_by_genome.py | MaaT-Pharma/AMBER | 76aa10e2295265b16337b7bfab769d67d3bea66a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import argparse
import os
import sys
import matplotlib
import numpy as np
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import os, sys, inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
sys.path.insert(... | 38.669492 | 153 | 0.67368 |
a080d1b200263a36cd31a3e857bf790cbd1e3259 | 16,548 | py | Python | tests/test_references.py | isprojects/djangorestframework-inclusions | c6669f404a8a80f2c524a8adfb6548b2eef235c7 | [
"MIT"
] | null | null | null | tests/test_references.py | isprojects/djangorestframework-inclusions | c6669f404a8a80f2c524a8adfb6548b2eef235c7 | [
"MIT"
] | 4 | 2019-11-15T10:21:20.000Z | 2021-04-22T13:37:32.000Z | tests/test_references.py | isprojects/djangorestframework-inclusions | c6669f404a8a80f2c524a8adfb6548b2eef235c7 | [
"MIT"
] | null | null | null | from django.urls import reverse
from rest_framework.test import APITestCase
from testapp.models import (
A,
B,
C,
Child,
ChildProps,
Container,
Entry,
MainObject,
Parent,
Tag,
)
from .mixins import InclusionsMixin
class ReferenceTests(InclusionsMixin, APITestCase):
maxD... | 32.383562 | 87 | 0.435098 |
a08113f70d1b07cff7761da1bc92b7750832a572 | 1,508 | py | Python | q2_fondue/get_all.py | misialq/q2-fondue | a7a541ee017381b34d38ef766de39d5d62588465 | [
"BSD-3-Clause"
] | 10 | 2022-03-21T16:07:22.000Z | 2022-03-31T09:33:48.000Z | q2_fondue/get_all.py | misialq/q2-fondue | a7a541ee017381b34d38ef766de39d5d62588465 | [
"BSD-3-Clause"
] | null | null | null | q2_fondue/get_all.py | misialq/q2-fondue | a7a541ee017381b34d38ef766de39d5d62588465 | [
"BSD-3-Clause"
] | 4 | 2022-03-21T06:51:44.000Z | 2022-03-29T15:56:14.000Z | # ----------------------------------------------------------------------------
# Copyright (c) 2022, Bokulich Laboratories.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# --------------------------------------------------------... | 32.085106 | 78 | 0.657825 |
a08175a3e80e168fe04fe33684d0de9087ed3e33 | 2,652 | py | Python | markups/restructuredtext.py | LukeC8/pymarkups | eec6edbc870fc6fe50c56d30f3caa8b8ee4e239a | [
"BSD-3-Clause"
] | null | null | null | markups/restructuredtext.py | LukeC8/pymarkups | eec6edbc870fc6fe50c56d30f3caa8b8ee4e239a | [
"BSD-3-Clause"
] | null | null | null | markups/restructuredtext.py | LukeC8/pymarkups | eec6edbc870fc6fe50c56d30f3caa8b8ee4e239a | [
"BSD-3-Clause"
] | null | null | null | # vim: ts=8:sts=8:sw=8:noexpandtab
# This file is part of python-markups module
# License: 3-clause BSD, see LICENSE file
# Copyright: (C) Dmitry Shachnev, 2012-2018
import markups.common as common
from markups.abstract import AbstractMarkup, ConvertedMarkup
class ReStructuredTextMarkup(AbstractMarkup):
"""Markup ... | 30.837209 | 99 | 0.735294 |
a0827c33ad3c6db021a834ac073ebf6c9ba882a7 | 8,025 | py | Python | Intelligent Systems and Decision Support Systems/pm-test1.py | johnpras/Uni_work | 1edd8fd56e4d54cdcc0058f0a21799ef6015e3f6 | [
"MIT"
] | null | null | null | Intelligent Systems and Decision Support Systems/pm-test1.py | johnpras/Uni_work | 1edd8fd56e4d54cdcc0058f0a21799ef6015e3f6 | [
"MIT"
] | null | null | null | Intelligent Systems and Decision Support Systems/pm-test1.py | johnpras/Uni_work | 1edd8fd56e4d54cdcc0058f0a21799ef6015e3f6 | [
"MIT"
] | null | null | null | import pandas as pd
from pm4py.objects.log.importer.xes import importer as xes_import
from pm4py.objects.log.util import log as utils
from pm4py.statistics.start_activities.log.get import get_start_activities
from pm4py.statistics.end_activities.log.get import get_end_activities
from pm4py.algo.filtering.log.end_a... | 42.68617 | 102 | 0.761994 |
a083ee0517e616b51836bbd85b01482cd453d3cf | 9,480 | py | Python | utils/job_placement/nonuniformRandom/routers.py | scalability-llnl/damselfly | 394e39b3165388e262a90da415dc3338d0f44734 | [
"BSD-Source-Code",
"BSD-3-Clause-LBNL",
"FSFAP"
] | 5 | 2016-02-25T04:50:00.000Z | 2020-06-11T03:00:45.000Z | utils/job_placement/nonuniformRandom/routers.py | scalability-llnl/damselfly | 394e39b3165388e262a90da415dc3338d0f44734 | [
"BSD-Source-Code",
"BSD-3-Clause-LBNL",
"FSFAP"
] | null | null | null | utils/job_placement/nonuniformRandom/routers.py | scalability-llnl/damselfly | 394e39b3165388e262a90da415dc3338d0f44734 | [
"BSD-Source-Code",
"BSD-3-Clause-LBNL",
"FSFAP"
] | 1 | 2017-02-07T05:43:53.000Z | 2017-02-07T05:43:53.000Z | #!/usr/bin/env python
##############################################################################
# Copyright (c) 2014, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# Written by:
# Nikhil Jain <nikhil.jain@acm.org>
# Abhinav Bhatele <bhatele@llnl.gov... | 28.902439 | 175 | 0.59673 |
a0853c6f068e5b0ba0007116f943ea7455d91729 | 46,894 | py | Python | src/scml_vis/presenter.py | yasserfarouk/scml-vis | a8daff36bb29867a67c9a36bcdca9ceef9350e53 | [
"Apache-2.0"
] | null | null | null | src/scml_vis/presenter.py | yasserfarouk/scml-vis | a8daff36bb29867a67c9a36bcdca9ceef9350e53 | [
"Apache-2.0"
] | 2 | 2021-05-07T22:45:42.000Z | 2021-09-22T04:35:15.000Z | src/scml_vis/presenter.py | yasserfarouk/scml-vis | a8daff36bb29867a67c9a36bcdca9ceef9350e53 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import shutil
import itertools
import random
import sys
import traceback
from pathlib import Path
import altair as alt
import pandas as pd
import plotly as plotly
import plotly.express as px
import plotly.graph_objects as go
import streamlit as st
from pandas.api.types import is_numeric_dtype
fro... | 35.338357 | 233 | 0.565403 |
a08b15176907fc58ba9177ee950b34ee8cb64ffe | 691 | py | Python | cd4ml/problems/houses/features/feature_functions/feature_functions.py | camila-contreras/CD4ML-Scenarios | 806f812990c7cf33b5f78456f0065012b5b4cd35 | [
"MIT"
] | 113 | 2020-03-31T20:36:39.000Z | 2022-01-11T15:06:58.000Z | cd4ml/problems/houses/features/feature_functions/feature_functions.py | camila-contreras/CD4ML-Scenarios | 806f812990c7cf33b5f78456f0065012b5b4cd35 | [
"MIT"
] | 7 | 2020-06-10T05:11:35.000Z | 2022-01-06T02:55:21.000Z | cd4ml/problems/houses/features/feature_functions/feature_functions.py | camila-contreras/CD4ML-Scenarios | 806f812990c7cf33b5f78456f0065012b5b4cd35 | [
"MIT"
] | 260 | 2020-03-21T19:42:26.000Z | 2022-01-25T22:08:36.000Z | def zipcode_to_feature(zipcode, lookup, feature):
results = lookup.get(zipcode)
if results is None:
return None
else:
return results[feature]
def zipcode_to_state(zipcode, lookup):
return zipcode_to_feature(zipcode, lookup, 'state')
def avg_price_by_zipcode(zipcode, lookup):
retu... | 25.592593 | 68 | 0.751085 |
a08cb54701ee8d7129f53895ca2daa2a379bad89 | 4,431 | py | Python | QFA/MO_1QFA.py | gustawlippa/QFA | 7f1f8bd0d2c9cb9aeeeb924b2f002c9e849523be | [
"MIT"
] | 2 | 2021-01-30T23:14:36.000Z | 2021-02-17T01:41:56.000Z | QFA/MO_1QFA.py | gustawlippa/QFA | 7f1f8bd0d2c9cb9aeeeb924b2f002c9e849523be | [
"MIT"
] | null | null | null | QFA/MO_1QFA.py | gustawlippa/QFA | 7f1f8bd0d2c9cb9aeeeb924b2f002c9e849523be | [
"MIT"
] | null | null | null | import numpy as np
from typing import List
from math import sqrt
from QFA.Automaton import Automaton
from math import cos, sin, pi
class MO_1QFA(Automaton):
def __init__(self, alphabet: str,
initial_state: np.ndarray,
transition_matrices: List[np.ndarray],
proj... | 31.425532 | 120 | 0.643421 |
a08cc063efc183d6784f567bb7e999cbddbf1bbf | 2,292 | py | Python | whats_in_the_cupboard/search/views.py | brandonholderman/whats_in_the_cupboard | 8f8b0abe8b94547fa488db689261a4f475a24779 | [
"MIT"
] | null | null | null | whats_in_the_cupboard/search/views.py | brandonholderman/whats_in_the_cupboard | 8f8b0abe8b94547fa488db689261a4f475a24779 | [
"MIT"
] | 10 | 2020-02-11T23:36:20.000Z | 2022-03-11T23:57:52.000Z | whats_in_the_cupboard/search/views.py | brandonholderman/whats_in_the_cupboard | 8f8b0abe8b94547fa488db689261a4f475a24779 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.views.generic import TemplateView, ListView
from django.shortcuts import render
from rest_framework.authentication import TokenAuthentication
from rest_framework import viewsets, mixins
from rest_framework.response import Response
from rest_fra... | 27.614458 | 67 | 0.654887 |
a08ec5f751e5c0ed745a1196c05685644187a34f | 591 | py | Python | scripts/freq_shecker.py | Fumiya-K/ros_myo | dac160aae5d0cd75211c60261bd1232ef089e530 | [
"MIT"
] | null | null | null | scripts/freq_shecker.py | Fumiya-K/ros_myo | dac160aae5d0cd75211c60261bd1232ef089e530 | [
"MIT"
] | null | null | null | scripts/freq_shecker.py | Fumiya-K/ros_myo | dac160aae5d0cd75211c60261bd1232ef089e530 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
from geometry_msgs.msg import Vector3
from sensor_msgs.msg import Imu
import numpy as np
c_imu, c_angle = 0, 0
def cb_imu(msg):
global c_imu
c_imu += 1
def cb_angle(msg):
global c_angle
c_angle += 1
if c_angle == 400:
print("count of received data of angle = {}".format(c_a... | 21.107143 | 66 | 0.717428 |
a0921c92865225de5297219ccf69a9133b387063 | 2,431 | py | Python | dist/snippets/woosmap_http_zones_collection_request/woosmap_http_zones_collection_request.py | woosmap/openapi-specification | 7f934628a75695884db2fa29dd1d04efd1fb20de | [
"MIT"
] | null | null | null | dist/snippets/woosmap_http_zones_collection_request/woosmap_http_zones_collection_request.py | woosmap/openapi-specification | 7f934628a75695884db2fa29dd1d04efd1fb20de | [
"MIT"
] | 3 | 2021-12-20T16:15:13.000Z | 2022-02-15T00:44:19.000Z | dist/snippets/woosmap_http_zones_collection_request/woosmap_http_zones_collection_request.py | woosmap/openapi-specification | 7f934628a75695884db2fa29dd1d04efd1fb20de | [
"MIT"
] | null | null | null | # [START woosmap_http_zones_collection_request]
import requests
import json
url = "https://api.woosmap.com/zones?private_key=YOUR_PRIVATE_API_KEY"
payload = json.dumps({
"zones": [
{
"zone_id": "ZoneA",
"description": "Delivery Zone for Store A",
"store_id": "STORE_ID_1... | 52.847826 | 562 | 0.65035 |
a0963df40f1df1fa608416915de9bf22beecf414 | 1,692 | py | Python | src/CyPhyMasterInterpreter/run_master_interpreter_sample.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | null | null | null | src/CyPhyMasterInterpreter/run_master_interpreter_sample.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | null | null | null | src/CyPhyMasterInterpreter/run_master_interpreter_sample.py | lefevre-fraser/openmeta-mms | 08f3115e76498df1f8d70641d71f5c52cab4ce5f | [
"MIT"
] | null | null | null | import win32com.client
# Disable early binding: full of race conditions writing the cache files,
# and changes the semantics since inheritance isn't handled correctly
import win32com.client.gencache
_savedGetClassForCLSID = win32com.client.gencache.GetClassForCLSID
win32com.client.gencache.GetClassForCLSID = lam... | 38.454545 | 115 | 0.785461 |
a097f2e9cca87b9c4ab3fbfbe7eb9b74f83ce331 | 4,051 | py | Python | image_utils.py | datascisteven/Flictionary-Flask | 9437f0b6377b11cecfa37c8a94eb68cc4e7018f8 | [
"MIT"
] | null | null | null | image_utils.py | datascisteven/Flictionary-Flask | 9437f0b6377b11cecfa37c8a94eb68cc4e7018f8 | [
"MIT"
] | null | null | null | image_utils.py | datascisteven/Flictionary-Flask | 9437f0b6377b11cecfa37c8a94eb68cc4e7018f8 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
from PIL import Image
from PIL import ImageOps
def view_image(img, filename = 'image'):
fig, ax = plt.subplots(figsize=(6, 9))
ax.imshow(img.reshape(96, 96).squeeze())
ax.axis('off')
plt.savefig(filename + '.png')
def convert_to_PIL(img):
img_r... | 28.935714 | 132 | 0.621328 |
a098e971e8b1b7172d8860ca8ed8514362a25eea | 360 | py | Python | src/lqc/generate/web_page/ui_tools/create.py | tysmith/layout-quickcheck | c5ba9431a40f650a594140541e32af7c8ff21695 | [
"MIT"
] | null | null | null | src/lqc/generate/web_page/ui_tools/create.py | tysmith/layout-quickcheck | c5ba9431a40f650a594140541e32af7c8ff21695 | [
"MIT"
] | null | null | null | src/lqc/generate/web_page/ui_tools/create.py | tysmith/layout-quickcheck | c5ba9431a40f650a594140541e32af7c8ff21695 | [
"MIT"
] | null | null | null | import os
def ui_tools_js():
js_string = ""
with open(os.path.join(os.path.dirname(__file__), 'template.js'), 'r') as f:
js_string = f.read()
return js_string
def ui_tools_html():
html_string = ""
with open(os.path.join(os.path.dirname(__file__), 'template.html'), 'r') as f:
html_... | 25.714286 | 82 | 0.633333 |
a09ac1675173bac590c8d099736901eb4fe0b015 | 886 | py | Python | students/K33422/laboratory_works/Moruga_Elina/lr_2/simple_django_web_projects(1)/django_project_Moruga/project_first_app/views.py | Elyavor/ITMO_ICT_WebDevelopment_2021-2022 | 63fad07bcdc0a9a6b85d46eacf97182162262181 | [
"MIT"
] | null | null | null | students/K33422/laboratory_works/Moruga_Elina/lr_2/simple_django_web_projects(1)/django_project_Moruga/project_first_app/views.py | Elyavor/ITMO_ICT_WebDevelopment_2021-2022 | 63fad07bcdc0a9a6b85d46eacf97182162262181 | [
"MIT"
] | null | null | null | students/K33422/laboratory_works/Moruga_Elina/lr_2/simple_django_web_projects(1)/django_project_Moruga/project_first_app/views.py | Elyavor/ITMO_ICT_WebDevelopment_2021-2022 | 63fad07bcdc0a9a6b85d46eacf97182162262181 | [
"MIT"
] | null | null | null | from django.shortcuts import render
from django.http import Http404
from .models import CarOwner
def detail(request, owner_id):
try: #метод try-except - обработчик исключений
p = CarOwner.objects.get(pk=owner_id) #pk - автоматически создается в джанго для любой таблицы в моделе (оно есть у любого объекта... | 59.066667 | 192 | 0.767494 |
a09b9af2b847bf39b063ead0a72aab28cd93427e | 126 | py | Python | wtpy/apps/__init__.py | Huijun-Cui/wtpy | 9a8243a20b944fbb37aa33d81215b7b36ac7b1e2 | [
"MIT"
] | null | null | null | wtpy/apps/__init__.py | Huijun-Cui/wtpy | 9a8243a20b944fbb37aa33d81215b7b36ac7b1e2 | [
"MIT"
] | null | null | null | wtpy/apps/__init__.py | Huijun-Cui/wtpy | 9a8243a20b944fbb37aa33d81215b7b36ac7b1e2 | [
"MIT"
] | null | null | null | from .WtBtAnalyst import WtBtAnalyst
from .WtCtaOptimizer import WtCtaOptimizer
__all__ = ["WtBtAnalyst","WtCtaOptimizer"] | 31.5 | 43 | 0.809524 |
a09c1cbcccf7a63039a5587fbbf109f0b5dc595c | 608 | py | Python | grove_potentiometer.py | cpmpercussion/empi_controller | 178d3952994d7e13067674cbcd261d945e6b4799 | [
"MIT"
] | null | null | null | grove_potentiometer.py | cpmpercussion/empi_controller | 178d3952994d7e13067674cbcd261d945e6b4799 | [
"MIT"
] | null | null | null | grove_potentiometer.py | cpmpercussion/empi_controller | 178d3952994d7e13067674cbcd261d945e6b4799 | [
"MIT"
] | null | null | null | import math
import sys
import time
from grove.adc import ADC
class GroveRotaryAngleSensor(ADC):
def __init__(self, channel):
self.channel = channel
self.adc = ADC()
@property
def value(self):
return self.adc.read(self.channel)
Grove = GroveRotaryAngleSensor
def main():
if ... | 17.882353 | 58 | 0.626645 |
a09c77edcb165aec8e2b0d92f741bba565b1c3ad | 627 | py | Python | ad2web/api/forms.py | billfor/alarmdecoder-webapp | 43c3ebb2b44c7291cd89a2a7a31bbdfdb3ec06dc | [
"BSD-3-Clause",
"MIT"
] | 46 | 2015-06-14T02:19:16.000Z | 2022-03-24T03:11:19.000Z | ad2web/api/forms.py | billfor/alarmdecoder-webapp | 43c3ebb2b44c7291cd89a2a7a31bbdfdb3ec06dc | [
"BSD-3-Clause",
"MIT"
] | 66 | 2015-03-14T16:30:43.000Z | 2021-08-28T22:20:01.000Z | ad2web/api/forms.py | billfor/alarmdecoder-webapp | 43c3ebb2b44c7291cd89a2a7a31bbdfdb3ec06dc | [
"BSD-3-Clause",
"MIT"
] | 44 | 2015-02-13T19:23:37.000Z | 2021-12-30T04:17:21.000Z | # -*- coding: utf-8 -*-
import string
from flask_wtf import FlaskForm as Form
from wtforms.fields.html5 import URLField, EmailField, TelField
from wtforms import (ValidationError, HiddenField, TextField, HiddenField,
PasswordField, SubmitField, TextAreaField, IntegerField, RadioField,
FileField, Decima... | 34.833333 | 81 | 0.773525 |
a09e18ee423836b7c3ce0e61bbbd9d1885bd9f19 | 73 | py | Python | modelator_py/util/tla/__init__.py | informalsystems/modelator-py | d66464096c022799e680e6201590a2ead69be32d | [
"Apache-2.0"
] | null | null | null | modelator_py/util/tla/__init__.py | informalsystems/modelator-py | d66464096c022799e680e6201590a2ead69be32d | [
"Apache-2.0"
] | 3 | 2022-03-30T16:01:49.000Z | 2022-03-31T13:40:03.000Z | modelator_py/util/tla/__init__.py | informalsystems/modelator-py | d66464096c022799e680e6201590a2ead69be32d | [
"Apache-2.0"
] | null | null | null | """TLA+ parser and syntax tree."""
from .parser import parse, parse_expr
| 24.333333 | 37 | 0.726027 |
a0a2f155643acffd9a5b5d44e3b912311ab75ced | 2,084 | py | Python | runai/mp/keras/layers/core.py | bamps53/runai | 0c868160f64e1e063c6eb6f660d42917322d40c5 | [
"MIT"
] | 86 | 2020-01-23T18:56:41.000Z | 2022-02-14T22:32:08.000Z | runai/mp/keras/layers/core.py | bamps53/runai | 0c868160f64e1e063c6eb6f660d42917322d40c5 | [
"MIT"
] | 18 | 2020-01-24T17:55:18.000Z | 2021-12-01T01:01:32.000Z | runai/mp/keras/layers/core.py | bamps53/runai | 0c868160f64e1e063c6eb6f660d42917322d40c5 | [
"MIT"
] | 12 | 2020-02-03T14:30:44.000Z | 2022-01-08T16:06:59.000Z | import keras.backend as K
import keras.layers
import runai.mp
from .keep import Keep
from .parallelised import Parallelised
Activation = Keep.create('Activation')
class Dense(Parallelised, keras.layers.Dense):
def build(self, input_shape):
assert len(input_shape) == 2 # TODO(levosos): support more than ... | 31.575758 | 151 | 0.600768 |
a0a7abf53aec9f31e9e5488c61a3e3d5fb017c5d | 461 | py | Python | graphics.py | Nemo20k/lactose_multistability_model | e50d68bb508e243d0a775d1d562bd8e8b88b3b30 | [
"MIT"
] | null | null | null | graphics.py | Nemo20k/lactose_multistability_model | e50d68bb508e243d0a775d1d562bd8e8b88b3b30 | [
"MIT"
] | null | null | null | graphics.py | Nemo20k/lactose_multistability_model | e50d68bb508e243d0a775d1d562bd8e8b88b3b30 | [
"MIT"
] | null | null | null | from matplotlib import pyplot as plt
import numpy as np
def plot_bacteria(bacteria_ndarray: np.ndarray, dimensions: tuple, save_path: str = None, cmap: str='prism'):
im = bacteria_ndarray.reshape(dimensions)
fig = plt.imshow(im, cmap=cmap, vmin=0, vmax=1)
plt.title('Red/Green graphic distribution')
if ... | 27.117647 | 109 | 0.724512 |
a0a9d841059677b45b6f09a062af0ebdbc1dceea | 5,394 | py | Python | webapp/element43/apps/common/util.py | Ososope/eve_online | b368f77aaff403e5f1523a1a0e01d105fed0ada9 | [
"BSD-3-Clause"
] | null | null | null | webapp/element43/apps/common/util.py | Ososope/eve_online | b368f77aaff403e5f1523a1a0e01d105fed0ada9 | [
"BSD-3-Clause"
] | null | null | null | webapp/element43/apps/common/util.py | Ososope/eve_online | b368f77aaff403e5f1523a1a0e01d105fed0ada9 | [
"BSD-3-Clause"
] | null | null | null | # utility functions
import ast
import urllib
import datetime
import pytz
import pylibmc
# Import settings
from django.conf import settings
# API Models
from apps.api.models import APIKey, Character, APITimer
# Eve_DB Models
from eve_db.models import MapSolarSystem
# API Access Masks
CHARACTER_API_ACCESS_MASKS = {'A... | 31 | 134 | 0.561735 |
a0ade23395d3069649385af2893a0f1454cfd97f | 349 | py | Python | forms/views/field.py | alphagov/submit-forms | 6339b40debbab668263246162ab33c68391ef744 | [
"MIT"
] | 3 | 2017-11-20T18:17:47.000Z | 2019-08-09T14:59:36.000Z | forms/views/field.py | alphagov/submit-forms | 6339b40debbab668263246162ab33c68391ef744 | [
"MIT"
] | null | null | null | forms/views/field.py | alphagov/submit-forms | 6339b40debbab668263246162ab33c68391ef744 | [
"MIT"
] | 3 | 2019-08-29T11:55:16.000Z | 2021-04-10T19:52:14.000Z | from django.shortcuts import render
from ..models import Field
def fields(request):
fields = Field.objects.all()
return render(request, 'fields.html', {'fields': fields})
def field(request, key=None, template='field.html'):
field = Field.objects.get(field=key)
return render(request, template, {
... | 20.529412 | 61 | 0.670487 |
a0af5afc99a71406be5ffead3cb66d5a5fbdf490 | 2,608 | py | Python | crafting/CraftingHandler.py | uuk0/mcpython-4 | 1ece49257b3067027cc43b452a2fc44908d3514c | [
"MIT"
] | 2 | 2019-08-21T08:23:45.000Z | 2019-09-25T13:20:28.000Z | crafting/CraftingHandler.py | uuk0/mcpython-4 | 1ece49257b3067027cc43b452a2fc44908d3514c | [
"MIT"
] | 11 | 2019-08-21T08:46:01.000Z | 2021-09-08T01:18:04.000Z | crafting/CraftingHandler.py | uuk0/mcpython-4 | 1ece49257b3067027cc43b452a2fc44908d3514c | [
"MIT"
] | 5 | 2019-08-30T08:19:57.000Z | 2019-10-26T03:31:16.000Z | """mcpython - a minecraft clone written in python licenced under MIT-licence
authors: uuk, xkcdjerry
original game by forgleman licenced under MIT-licence
minecraft by Mojang
blocks based on 1.14.4.jar of minecraft, downloaded on 20th of July, 2019"""
import globals as G
import crafting.IRecipeType
import json
import... | 35.243243 | 113 | 0.657209 |
a0b0788c0fdd53bb74359f134c5cbbe7dd53cb63 | 1,625 | py | Python | xcache.py | ATLAS-Analytics/AlarmAndAlertService | a167439b0c3f3c9594af52bd21fe8713b5f47bf1 | [
"MIT"
] | null | null | null | xcache.py | ATLAS-Analytics/AlarmAndAlertService | a167439b0c3f3c9594af52bd21fe8713b5f47bf1 | [
"MIT"
] | 1 | 2021-05-26T02:21:42.000Z | 2021-05-26T02:21:42.000Z | xcache.py | ATLAS-Analytics/AlarmAndAlertService | a167439b0c3f3c9594af52bd21fe8713b5f47bf1 | [
"MIT"
] | null | null | null | # Checks number of concurrent connections from XCaches to MWT2 dCache.
# Creates alarm if more than 200 from any server.
# ====
# It is run every 30 min from a cron job.
import json
from datetime import datetime
import requests
from alerts import alarms
config_path = '/config/config.json'
with open(con... | 30.092593 | 88 | 0.619692 |
a0b0d03bf62e28fff9360da39608230424f15bea | 769 | py | Python | Question3_Competetive_Programming/solution.py | Robotrek-TechTatva/big-pp | 5790075638aa7f39d787dfc390f43da1cdb4ed56 | [
"MIT"
] | null | null | null | Question3_Competetive_Programming/solution.py | Robotrek-TechTatva/big-pp | 5790075638aa7f39d787dfc390f43da1cdb4ed56 | [
"MIT"
] | null | null | null | Question3_Competetive_Programming/solution.py | Robotrek-TechTatva/big-pp | 5790075638aa7f39d787dfc390f43da1cdb4ed56 | [
"MIT"
] | null | null | null | import csv
def area(x1, y1, x2, y2, x3, y3):
return abs((x1 * (y2 - y3) + x2 * (y3 - y1)
+ x3 * (y1 - y2)) / 2.0)
def isInside(lis):
x, y = 0, 0
x1, y1, x2, y2, x3, y3 = lis[1:]
x1 = int(x1)
x2 = int(x2)
x3 = int(x3)
y1 = int(y1)
y2 = int(y2)
y3 = int(y3)
... | 21.361111 | 49 | 0.470741 |
a0b1f6e65ee6e7176da940ac100c95bce2eaea30 | 238 | py | Python | tutorials/W0D4_Calculus/solutions/W0D4_Tutorial2_Solution_359be293.py | vasudev-sharma/course-content | 46fb9be49da52acb5df252dda43f11b6d1fe827f | [
"CC-BY-4.0",
"BSD-3-Clause"
] | 1 | 2021-06-09T09:56:21.000Z | 2021-06-09T09:56:21.000Z | tutorials/W0D4_Calculus/solutions/W0D4_Tutorial2_Solution_359be293.py | macasal/course-content | 0fc5e1a0d736c6b0391eeab587012ed0ab01e462 | [
"CC-BY-4.0",
"BSD-3-Clause"
] | 1 | 2021-06-16T05:41:08.000Z | 2021-06-16T05:41:08.000Z | tutorials/W0D4_Calculus/solutions/W0D4_Tutorial2_Solution_359be293.py | macasal/course-content | 0fc5e1a0d736c6b0391eeab587012ed0ab01e462 | [
"CC-BY-4.0",
"BSD-3-Clause"
] | null | null | null | t = np.arange(0, 10, 0.1) # Time from 0 to 10 years in 0.1 steps
with plt.xkcd():
p = np.exp(0.3 * t)
fig = plt.figure(figsize=(6, 4))
plt.plot(t, p)
plt.ylabel('Population (millions)')
plt.xlabel('time (years)')
plt.show() | 21.636364 | 64 | 0.60084 |
a0b4e94b3b4a3e4439a5b84940a160611b866816 | 1,063 | py | Python | test/python/squarepants_test/plugins/test_link_resources_jars.py | ericzundel/mvn2pants | 59776864939515bc0cae28e1b89944ce55b98b21 | [
"Apache-2.0"
] | 8 | 2015-04-14T22:37:56.000Z | 2021-01-20T19:46:40.000Z | test/python/squarepants_test/plugins/test_link_resources_jars.py | ericzundel/mvn2pants | 59776864939515bc0cae28e1b89944ce55b98b21 | [
"Apache-2.0"
] | 1 | 2016-01-13T23:19:14.000Z | 2016-01-22T22:47:48.000Z | test/python/squarepants_test/plugins/test_link_resources_jars.py | ericzundel/mvn2pants | 59776864939515bc0cae28e1b89944ce55b98b21 | [
"Apache-2.0"
] | 3 | 2015-12-13T08:35:34.000Z | 2018-08-01T17:44:59.000Z | # Tests for code in squarepants/src/main/python/squarepants/plugins/copy_resources/tasks/copy_resource_jars
#
# Run with:
# ./pants test squarepants/src/test/python/squarepants_test/plugins:copy_resources
from pants.backend.jvm.targets.jar_dependency import JarDependency
from pants.backend.jvm.targets.jar_library impo... | 40.884615 | 107 | 0.804327 |
a0b646cbb8b05a36f6c66a8ee0acf369718630ee | 2,339 | py | Python | src/binwalk/__main__.py | puppywang/binwalk | fa0c0bd59b8588814756942fe4cb5452e76c1dcd | [
"MIT"
] | 5,504 | 2017-11-30T21:25:07.000Z | 2022-03-31T17:00:58.000Z | src/binwalk/__main__.py | puppywang/binwalk | fa0c0bd59b8588814756942fe4cb5452e76c1dcd | [
"MIT"
] | 247 | 2017-12-07T06:09:56.000Z | 2022-03-23T05:34:47.000Z | src/binwalk/__main__.py | puppywang/binwalk | fa0c0bd59b8588814756942fe4cb5452e76c1dcd | [
"MIT"
] | 953 | 2017-12-01T17:05:17.000Z | 2022-03-26T13:15:33.000Z | import os
import sys
# If installed to a custom prefix directory, binwalk may not be in
# the default module search path(s). Try to resolve the prefix module
# path and make it the first entry in sys.path.
# Ensure that 'src/binwalk' becomes '.' instead of an empty string
_parent_dir = os.path.dirname(os.path.dirname(... | 35.984615 | 97 | 0.595554 |
a0b73f136f5ae88a402fa6be43272da9242cdedc | 642 | py | Python | MINI_WEB/mini_web/framework/mini_frame_4.py | GalphaXie/LaoX | b7e8f9744292dc052c870e4d873052e9bfec19ee | [
"MIT"
] | null | null | null | MINI_WEB/mini_web/framework/mini_frame_4.py | GalphaXie/LaoX | b7e8f9744292dc052c870e4d873052e9bfec19ee | [
"MIT"
] | 12 | 2020-03-24T17:39:25.000Z | 2022-03-12T00:01:24.000Z | MINI_WEB/mini_web/framework/mini_frame_4.py | GalphaXie/LaoX | b7e8f9744292dc052c870e4d873052e9bfec19ee | [
"MIT"
] | null | null | null | #!/usr/bin/python3
# file: mini_frame.py
# Created by Guang at 19-7-19
# description:
# *-* coding:utf8 *-*
import time
def login():
return "Welcome xxx login website! %s" % time.ctime()
def register():
return "Welcome xxx register on our website! %s" % time.ctime()
def profile():
return "你来到了一片荒原之... | 21.4 | 106 | 0.619938 |
a0b7ca82a2ce39606a44ac65893f26c1b02da5d3 | 3,174 | py | Python | server.py | AndrewB330/BinanceTerminal | 3699a295d2b2af810d30ff692bab4e106ec44392 | [
"MIT"
] | 14 | 2020-03-09T04:08:03.000Z | 2021-12-29T14:53:32.000Z | server.py | AndrewB330/BinanceTerminal | 3699a295d2b2af810d30ff692bab4e106ec44392 | [
"MIT"
] | null | null | null | server.py | AndrewB330/BinanceTerminal | 3699a295d2b2af810d30ff692bab4e106ec44392 | [
"MIT"
] | null | null | null | import time
import pymongo
import schedule
from order import *
from utils import *
# MONGODB
db = pymongo.MongoClient("mongodb://localhost:27017/")["ShaurmaBinanceTerminal"]
order_db = db["orders"]
JOB_INTERVAL = 10.0 # interval of updating
jobs_pool = {}
def worker(symbol):
try:
time_start = time.ti... | 31.74 | 116 | 0.598614 |
a0b8186276c361f655fc43a3b80aba5c60bd0210 | 4,979 | py | Python | sarenka/backend/api_searcher/searcher_full.py | adolabsnet/sarenka | 2032aa6ddebfc69b0db551b7793080d17282ced2 | [
"MIT"
] | 380 | 2019-12-05T09:37:47.000Z | 2022-03-31T09:37:27.000Z | sarenka/backend/api_searcher/searcher_full.py | watchmen-coder/sarenka | d7fc0928e4992de3dbb1546137ca6a158e930ba8 | [
"MIT"
] | 14 | 2020-09-26T17:49:42.000Z | 2022-02-04T18:16:16.000Z | sarenka/backend/api_searcher/searcher_full.py | watchmen-coder/sarenka | d7fc0928e4992de3dbb1546137ca6a158e930ba8 | [
"MIT"
] | 60 | 2021-01-01T16:25:30.000Z | 2022-03-26T18:48:03.000Z | """
Moduł spiający wszystkie wyszukiwania w jedną klasę - wszystkei dane dla adresu ip/domeny.
Klasa bezpośrednio używana w widoku Django.
"""
from rest_framework.reverse import reverse
from typing import List, Dict
import whois
import socket
from connectors.credential import CredentialsNotFoundError
from api_searcher... | 40.811475 | 126 | 0.589677 |
a0ba9ed937616e6ee4572b155cab4164464097a6 | 75 | py | Python | Codewars/8kyu/get-the-mean-of-an-array/Python/solution1.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | 7 | 2017-09-20T16:40:39.000Z | 2021-08-31T18:15:08.000Z | Codewars/8kyu/get-the-mean-of-an-array/Python/solution1.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | null | null | null | Codewars/8kyu/get-the-mean-of-an-array/Python/solution1.py | RevansChen/online-judge | ad1b07fee7bd3c49418becccda904e17505f3018 | [
"MIT"
] | null | null | null | # Python - 3.6.0
get_average = lambda marks: int(sum(marks) / len(marks))
| 18.75 | 56 | 0.666667 |