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 stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | 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 | count_classes int64 0 1.6M | score_classes float64 0 1 | count_generators int64 0 651k | score_generators float64 0 1 | count_decorators int64 0 990k | score_decorators float64 0 1 | count_async_functions int64 0 235k | score_async_functions float64 0 1 | count_documentation int64 0 1.04M | score_documentation float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9699da91536be3b5f7938a488f2471ecc9d269c7 | 1,318 | py | Python | app/web/obtain_url.py | gpp0725/EchoProxy | 0273f47397b76fa0292db267d99eeb9dccc4e869 | [
"Apache-2.0"
] | null | null | null | app/web/obtain_url.py | gpp0725/EchoProxy | 0273f47397b76fa0292db267d99eeb9dccc4e869 | [
"Apache-2.0"
] | null | null | null | app/web/obtain_url.py | gpp0725/EchoProxy | 0273f47397b76fa0292db267d99eeb9dccc4e869 | [
"Apache-2.0"
] | null | null | null | # !/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 2020/3/4 0004 2:09
# @Author : Gpp
# @File : obtain_url.py
from app.web import api
from flask_restful import Resource
from flask import make_response, send_from_directory, jsonify
from app.helper.encrypt import two_encrypting
from app.crud.proxy_crud i... | 33.794872 | 113 | 0.707132 | 594 | 0.431686 | 0 | 0 | 641 | 0.465843 | 0 | 0 | 637 | 0.462936 |
969a1ae2aa1e6f093f672d0dc08a8182fddc7227 | 920 | py | Python | oshino/run.py | CodersOfTheNight/oshino | 08e35d004aa16a378d87d5e548649a1bc1f5dc17 | [
"MIT"
] | 6 | 2016-11-06T17:47:57.000Z | 2020-04-08T12:20:59.000Z | oshino/run.py | CodersOfTheNight/oshino | 08e35d004aa16a378d87d5e548649a1bc1f5dc17 | [
"MIT"
] | 24 | 2016-11-15T06:20:50.000Z | 2019-02-08T18:54:57.000Z | oshino/run.py | CodersOfTheNight/oshino | 08e35d004aa16a378d87d5e548649a1bc1f5dc17 | [
"MIT"
] | null | null | null | import logging
from argparse import ArgumentParser
from dotenv import load_dotenv, find_dotenv
from .config import load
from .core.heart import start_loop
logger = logging.getLogger(__name__)
try:
load_dotenv(find_dotenv())
except Exception as ex:
logger.error("Error while loading .env: '{}'. Ignoring.".fo... | 27.058824 | 127 | 0.71413 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 193 | 0.209783 |
969aa0f8463c5dac76a29b27b5b12bf01e79a4cf | 4,113 | py | Python | sendmail_win_cs.py | Fatman13/gta_swarm | 1c4603f39cd7831f5907fd619594452b3320f75f | [
"MIT"
] | null | null | null | sendmail_win_cs.py | Fatman13/gta_swarm | 1c4603f39cd7831f5907fd619594452b3320f75f | [
"MIT"
] | null | null | null | sendmail_win_cs.py | Fatman13/gta_swarm | 1c4603f39cd7831f5907fd619594452b3320f75f | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# coding=utf-8
import glob
import click
import os
import json
import datetime
import re
import csv
from requests.exceptions import ConnectionError
from exchangelib import DELEGATE, IMPERSONATION, Account, Credentials, ServiceAccount, \
EWSDateTime, EWSTimeZone, Configuration, NT... | 34.855932 | 102 | 0.706054 | 0 | 0 | 0 | 0 | 2,899 | 0.704838 | 0 | 0 | 1,448 | 0.352054 |
969ab9ef2de1a8573dbf6d90268f74dbc9e16fef | 29,479 | py | Python | utilities/access_concatenate_daily.py | pizzathief/PyFluxPro | c075c0040b4a9d6c9ab75ca1cef158f1307f8396 | [
"BSD-3-Clause"
] | 1 | 2021-01-17T20:53:39.000Z | 2021-01-17T20:53:39.000Z | utilities/access_concatenate_daily.py | pizzathief/PyFluxPro | c075c0040b4a9d6c9ab75ca1cef158f1307f8396 | [
"BSD-3-Clause"
] | null | null | null | utilities/access_concatenate_daily.py | pizzathief/PyFluxPro | c075c0040b4a9d6c9ab75ca1cef158f1307f8396 | [
"BSD-3-Clause"
] | null | null | null | """
Purpose:
Reads the hourly ACCESS files pulled from the BoM OPeNDAP site
and concatenates them into a single file.
This script file takes a control file name on the command line.
The control file lists the sites to be processed and the variables
to be processed.
Normal usage is to process all files in a monthl... | 47.546774 | 132 | 0.641915 | 174 | 0.005903 | 111 | 0.003765 | 0 | 0 | 0 | 0 | 8,246 | 0.279725 |
969bb241fcdc0d7ab1f0ae016a66c74578107f98 | 639 | py | Python | AMAO/apps/Avaliacao/views/exibir.py | arruda/amao | 83648aa2c408b1450d721b3072dc9db4b53edbb8 | [
"MIT"
] | 2 | 2017-04-26T14:08:02.000Z | 2017-09-01T13:10:17.000Z | AMAO/apps/Avaliacao/views/exibir.py | arruda/amao | 83648aa2c408b1450d721b3072dc9db4b53edbb8 | [
"MIT"
] | null | null | null | AMAO/apps/Avaliacao/views/exibir.py | arruda/amao | 83648aa2c408b1450d721b3072dc9db4b53edbb8 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from django.http import HttpResponse
from django.contrib.auth import login
from django.shortcuts import redirect, get_object_or_404
from django.contrib.auth.decorators import login_required
from Aluno.views.utils import aluno_exist
from annoying.decorators import render_to
from django.contrib... | 27.782609 | 57 | 0.791862 | 0 | 0 | 0 | 0 | 233 | 0.364632 | 0 | 0 | 46 | 0.071987 |
969bbfec8ddf57f2a21ea2c8536548a16473aafe | 2,771 | py | Python | avem_theme/functions/sanitize.py | mverleg/django-boots-plain-theme | 2355270293ddb3db4762470a43c72311bf11be07 | [
"BSD-3-Clause"
] | null | null | null | avem_theme/functions/sanitize.py | mverleg/django-boots-plain-theme | 2355270293ddb3db4762470a43c72311bf11be07 | [
"BSD-3-Clause"
] | null | null | null | avem_theme/functions/sanitize.py | mverleg/django-boots-plain-theme | 2355270293ddb3db4762470a43c72311bf11be07 | [
"BSD-3-Clause"
] | null | null | null |
try:
from urllib.parse import urlparse
except ImportError:
from urlparse import urlparse
from django.conf import settings
DEFAULT_NOSCR_ALLOWED_TAGS = 'strong:title b i em:title p:title h1:title h2:title h3:title h4:title h5:title ' + \
'div:title span:title ol ul li:title a:href:title:rel img:src:alt:title dl td... | 37.958904 | 114 | 0.714904 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,646 | 0.594009 |
969bdd00695dbe7a914d09d8df086240e345cdbb | 15,054 | py | Python | plotDiff_log.py | kmoskovtsev/Electrons-on-Helium-Scripts | b7325c64a62def9b963b66bfb078ee82553c2ed4 | [
"Unlicense"
] | null | null | null | plotDiff_log.py | kmoskovtsev/Electrons-on-Helium-Scripts | b7325c64a62def9b963b66bfb078ee82553c2ed4 | [
"Unlicense"
] | null | null | null | plotDiff_log.py | kmoskovtsev/Electrons-on-Helium-Scripts | b7325c64a62def9b963b66bfb078ee82553c2ed4 | [
"Unlicense"
] | null | null | null | from __future__ import division
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
import matplotlib.ticker as mticker
import gsd
import gsd.fl
import numpy as np
import os
import sys
import datetime
import time
import pickle
from shutil import copyfile
import inspect
import md_tools... | 43.634783 | 167 | 0.561778 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,518 | 0.366547 |
969c409f7ce05c9902d3127ae8558f487796543d | 1,609 | py | Python | backuppy/cli/put.py | drmorr0/backuppy | ed6c60b049aaeb6107a073af2d81ccbe0a9abc59 | [
"Apache-2.0"
] | 4 | 2021-08-20T02:51:59.000Z | 2022-01-06T18:18:53.000Z | backuppy/cli/put.py | drmorr0/backuppy | ed6c60b049aaeb6107a073af2d81ccbe0a9abc59 | [
"Apache-2.0"
] | 26 | 2019-06-06T02:23:29.000Z | 2021-07-29T06:43:04.000Z | backuppy/cli/put.py | drmorr0/backuppy | ed6c60b049aaeb6107a073af2d81ccbe0a9abc59 | [
"Apache-2.0"
] | null | null | null | import argparse
import staticconf
from backuppy.args import add_name_arg
from backuppy.args import subparser
from backuppy.manifest import lock_manifest
from backuppy.manifest import Manifest
from backuppy.stores import get_backup_store
def main(args: argparse.Namespace) -> None:
staticconf.YamlConfiguration(ar... | 30.942308 | 100 | 0.705407 | 0 | 0 | 0 | 0 | 409 | 0.254195 | 0 | 0 | 416 | 0.258546 |
969caf4ae896145b97abded195e8a8ae66368a89 | 6,349 | py | Python | OnePy/feeds/feedbase.py | sibuzu/OnePy | 464fca1c68a10f90ad128da3bfb03f05d2fc24bc | [
"MIT"
] | null | null | null | OnePy/feeds/feedbase.py | sibuzu/OnePy | 464fca1c68a10f90ad128da3bfb03f05d2fc24bc | [
"MIT"
] | null | null | null | OnePy/feeds/feedbase.py | sibuzu/OnePy | 464fca1c68a10f90ad128da3bfb03f05d2fc24bc | [
"MIT"
] | null | null | null | from abc import abstractmethod, ABCMeta
import csv
from datetime import datetime
import funcy as fy
from OnePy.barbase import Current_bar, Bar
from OnePy.event import events, MarketEvent
class FeedMetabase(metaclass=ABCMeta):
dtformat = "%Y-%m-%d %H:%M:%S"
tmformat = "%H:%M:%S"
timeindex = None
de... | 26.902542 | 83 | 0.575839 | 6,431 | 0.970424 | 0 | 0 | 968 | 0.146069 | 0 | 0 | 1,001 | 0.151049 |
969ce91c3c9eb7731f2a4d716dfbab07efce7259 | 4,912 | py | Python | conanfile.py | hsdk123/corrade | 0d624d1f980f0376b2227356759f1d6e8761e6a3 | [
"MIT",
"Unlicense"
] | null | null | null | conanfile.py | hsdk123/corrade | 0d624d1f980f0376b2227356759f1d6e8761e6a3 | [
"MIT",
"Unlicense"
] | null | null | null | conanfile.py | hsdk123/corrade | 0d624d1f980f0376b2227356759f1d6e8761e6a3 | [
"MIT",
"Unlicense"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from conans import ConanFile, CMake, tools
from conans.errors import ConanException
import os
import shutil
def sort_libs(correct_order, libs, lib_suffix='', reverse_result=False):
# Add suffix for correct string matching
correct_order[:] = [s.__add__(lib_suffix)... | 36.932331 | 125 | 0.631311 | 4,302 | 0.875814 | 0 | 0 | 0 | 0 | 0 | 0 | 1,964 | 0.399837 |
969d12ed4be6b78b744d2cdccc1f9a2142ee0a79 | 416 | py | Python | tests/test_null.py | StephenNneji/python-fastjsonschema | e7441c2efa40f5ac099a7788b8dafe6942146cf0 | [
"BSD-3-Clause"
] | null | null | null | tests/test_null.py | StephenNneji/python-fastjsonschema | e7441c2efa40f5ac099a7788b8dafe6942146cf0 | [
"BSD-3-Clause"
] | null | null | null | tests/test_null.py | StephenNneji/python-fastjsonschema | e7441c2efa40f5ac099a7788b8dafe6942146cf0 | [
"BSD-3-Clause"
] | null | null | null | import pytest
from fastjsonschema import JsonSchemaException
exc = JsonSchemaException('data must be null', value='{data}', name='data', definition='{definition}', rule='type')
@pytest.mark.parametrize('value, expected', [
(0, exc),
(None, None),
(True, exc),
('abc', exc),
([], exc),
({}, exc... | 24.470588 | 115 | 0.632212 | 0 | 0 | 0 | 0 | 235 | 0.564904 | 0 | 0 | 87 | 0.209135 |
969d7989d597d987141a08864cd0542293d4eb73 | 644 | py | Python | server/api/python/comprehension.py | DigitalCompanion/trustometer | acd7a2ab4927195ee5455d3274efff9f76e1395f | [
"MIT"
] | 8 | 2018-10-27T14:47:09.000Z | 2019-06-13T15:11:04.000Z | server/api/python/comprehension.py | DigitalCompanion/trustometer | acd7a2ab4927195ee5455d3274efff9f76e1395f | [
"MIT"
] | 3 | 2020-08-18T12:17:05.000Z | 2020-08-18T12:17:46.000Z | server/api/python/comprehension.py | futurityab/trustometer | acd7a2ab4927195ee5455d3274efff9f76e1395f | [
"MIT"
] | 3 | 2019-06-13T15:06:09.000Z | 2020-05-09T08:23:49.000Z | import boto3
import json
def init(ACCESS_KEY, SECRET_KEY):
return boto3.client(service_name='comprehend', region_name="us-west-2", aws_access_key_id=ACCESS_KEY, aws_secret_access_key=SECRET_KEY)
def get_entities(client, title):
return client.detect_entities(Text=title, LanguageCode='en').get('Entitie... | 35.777778 | 140 | 0.751553 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 84 | 0.130435 |
969d8f8281712317dc2a93dac04a3282f946abb9 | 394 | py | Python | checkrightrotate.py | parasshaha/Python- | 6c0bdae04cf74aa2742585ebcedb2274075fa644 | [
"Unlicense"
] | null | null | null | checkrightrotate.py | parasshaha/Python- | 6c0bdae04cf74aa2742585ebcedb2274075fa644 | [
"Unlicense"
] | null | null | null | checkrightrotate.py | parasshaha/Python- | 6c0bdae04cf74aa2742585ebcedb2274075fa644 | [
"Unlicense"
] | null | null | null |
def checkrot(str1,str2):
if len(str1)==len(str2):
str3=str1+str1
ad=str3.__contains__(str2)
if ad==True:
print("it is right rotate")
else:
print("It is not right rotate ")
else:
print("It is invalid string.Out of range")
def main():
str1=input(" Enter the first String : ")
str2=input("Enter the s... | 19.7 | 45 | 0.664975 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 145 | 0.36802 |
969e155793ce7396e91744cc2b8d9f9238771262 | 6,781 | py | Python | bot.py | Fido2603/WatchDog | 4607b374fdd29d2c82ea9a2a4a8de10f2ed3a94f | [
"MIT"
] | null | null | null | bot.py | Fido2603/WatchDog | 4607b374fdd29d2c82ea9a2a4a8de10f2ed3a94f | [
"MIT"
] | null | null | null | bot.py | Fido2603/WatchDog | 4607b374fdd29d2c82ea9a2a4a8de10f2ed3a94f | [
"MIT"
] | 3 | 2018-11-12T14:02:57.000Z | 2020-04-13T21:48:02.000Z | import discord
from discord.ext import commands
from discord import Embed, Permissions
from Util import logger
import os
import database
# Import the config
try:
import config
except ImportError:
print("Couldn't import config.py! Exiting!")
exit()
# Import a monkey patch, if that exists
try:
import mo... | 38.748571 | 120 | 0.627636 | 0 | 0 | 0 | 0 | 3,424 | 0.504791 | 5,574 | 0.82176 | 1,897 | 0.27967 |
969e2f3ff112021f4be66464e152ec69c802c02b | 320 | py | Python | connect/eaas/exceptions.py | bdjilka/connect-extension-runner | 7930b34dae92addb3807984fd553debc2b78ac23 | [
"Apache-2.0"
] | null | null | null | connect/eaas/exceptions.py | bdjilka/connect-extension-runner | 7930b34dae92addb3807984fd553debc2b78ac23 | [
"Apache-2.0"
] | null | null | null | connect/eaas/exceptions.py | bdjilka/connect-extension-runner | 7930b34dae92addb3807984fd553debc2b78ac23 | [
"Apache-2.0"
] | null | null | null | #
# This file is part of the Ingram Micro CloudBlue Connect EaaS Extension Runner.
#
# Copyright (c) 2021 Ingram Micro. All Rights Reserved.
#
class EaaSError(Exception):
pass
class MaintenanceError(EaaSError):
pass
class CommunicationError(EaaSError):
pass
class StopBackoffError(EaaSError):
pass
| 16 | 80 | 0.74375 | 167 | 0.521875 | 0 | 0 | 0 | 0 | 0 | 0 | 138 | 0.43125 |
969ea553ff4cdd6978d9da12725a1d04afc89e38 | 354 | py | Python | tests/i18n/patterns/urls/wrong_namespace.py | Yoann-Vie/esgi-hearthstone | 115d03426c7e8e80d89883b78ac72114c29bed12 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | tests/i18n/patterns/urls/wrong_namespace.py | Yoann-Vie/esgi-hearthstone | 115d03426c7e8e80d89883b78ac72114c29bed12 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | tests/i18n/patterns/urls/wrong_namespace.py | Yoann-Vie/esgi-hearthstone | 115d03426c7e8e80d89883b78ac72114c29bed12 | [
"PSF-2.0",
"BSD-3-Clause"
] | null | null | null | from django.conf.urls import url
from django.conf.urls.i18n import i18n_patterns
from django.utils.translation import gettext_lazy as _
from django.views.generic import TemplateView
view = TemplateView.as_view(template_name='dummy.html')
app_name = 'account'
urlpatterns = i18n_patterns(
url(_(r'^register... | 29.5 | 56 | 0.757062 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 0.127119 |
969ea9cfc35b7e706cf517d502bb8ce349a6ac08 | 2,004 | py | Python | gsheetsdb/url.py | JagritiG/gsheet-db-api-plus | 620247bb7ce36b327fc91feab8b48fc70e8c158f | [
"MIT"
] | null | null | null | gsheetsdb/url.py | JagritiG/gsheet-db-api-plus | 620247bb7ce36b327fc91feab8b48fc70e8c158f | [
"MIT"
] | null | null | null | gsheetsdb/url.py | JagritiG/gsheet-db-api-plus | 620247bb7ce36b327fc91feab8b48fc70e8c158f | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from collections import OrderedDict
from moz_sql_parser import parse as parse_sql
import pyparsing
import re
from six.moves.urllib import parse
FROM_REGEX = re.compile... | 21.782609 | 63 | 0.597804 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 338 | 0.168663 |
969f792ffed604b2cbdb6448c4f912247a60d7f2 | 5,676 | py | Python | weechat/.weechat/python/autoload/weechat_bot2human.py | CoelacanthusHex/dotfiles | e9cc372ba1c5d90e29fdcb1a81c8eb06b6f83bc5 | [
"Unlicense"
] | 10 | 2021-01-22T08:40:51.000Z | 2022-01-01T12:14:37.000Z | weechat/.weechat/python/autoload/weechat_bot2human.py | CoelacanthusHex/dotfiles | e9cc372ba1c5d90e29fdcb1a81c8eb06b6f83bc5 | [
"Unlicense"
] | 1 | 2020-04-18T16:47:51.000Z | 2020-05-20T20:46:30.000Z | weechat/.weechat/python/autoload/weechat_bot2human.py | ayalhw/dotfiles | c43d0d8543e62a7196c3eddadf66df045bdbbdeb | [
"Unlicense"
] | 1 | 2021-10-02T12:02:01.000Z | 2021-10-02T12:02:01.000Z | # -*- coding:utf-8 -*-
# Bot2Human
#
# Replaces messages from bots to humans
# typically used in channels that are connected with other IMs using bots
#
# For example, if a bot send messages from XMPP is like `[nick] content`,
# weechat would show `bot | [nick] content` which looks bad; this script
# make weecaht displ... | 33.988024 | 102 | 0.604651 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,928 | 0.515856 |
96a3b55fdb3ad0865f22a54baf973a421e94d7be | 10,713 | py | Python | MS-thesis/excel-format/sir/Updated/New folder/test.py | iffishells/Pushto-TTS-FYP | 7ed3a180ba4c1e609ae5aa5e76bfd093a3d3d140 | [
"Apache-2.0"
] | 2 | 2021-12-06T04:28:18.000Z | 2021-12-20T03:33:00.000Z | MS-thesis/excel-format/sir/Updated/New folder/test.py | iffishells/Pushto-TTS-FYP | 7ed3a180ba4c1e609ae5aa5e76bfd093a3d3d140 | [
"Apache-2.0"
] | null | null | null | MS-thesis/excel-format/sir/Updated/New folder/test.py | iffishells/Pushto-TTS-FYP | 7ed3a180ba4c1e609ae5aa5e76bfd093a3d3d140 | [
"Apache-2.0"
] | 1 | 2021-12-29T16:44:59.000Z | 2021-12-29T16:44:59.000Z | import xlrd
import pandas as pd
from openpyxl import load_workbook
from xlrd import open_workbook
import nltk
from nltk.tree import Tree
from nltk.parse.generate import generate
from nltk.tree import *
import os
from nltk.tokenize import word_tokenize
from nltk.tokenize import sent_tokenize
import xml.etree.... | 31.508824 | 576 | 0.477364 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9,812 | 0.903666 |
96a3d255da97bc30ed9f93ea22fbcadc0ebc221e | 1,013 | py | Python | RFEM/SpecialObjects/intersection.py | Dlubal-Software/RFEM_Python_Client | 9e29c598dadf380d49677c463931f0be659ccc40 | [
"MIT"
] | 16 | 2021-10-13T21:00:11.000Z | 2022-03-21T11:12:09.000Z | RFEM/SpecialObjects/intersection.py | Dlubal-Software/RFEM_Python_Client | 9e29c598dadf380d49677c463931f0be659ccc40 | [
"MIT"
] | 49 | 2021-10-19T13:18:51.000Z | 2022-03-30T08:20:17.000Z | RFEM/SpecialObjects/intersection.py | Dlubal-Software/RFEM_Python_Client | 9e29c598dadf380d49677c463931f0be659ccc40 | [
"MIT"
] | 7 | 2021-10-13T06:06:24.000Z | 2022-03-29T17:48:39.000Z | from RFEM.initModel import Model, clearAtributes
class Instersection():
def __init__(self,
no: int = 1,
surface_1: int = 1,
surface_2: int = 2,
comment: str = '',
params: dict = None,
model = Model):
# Cl... | 28.942857 | 75 | 0.582428 | 962 | 0.949654 | 0 | 0 | 0 | 0 | 0 | 0 | 226 | 0.2231 |
96a494380c4f8173563744e5544c96b9515e8e78 | 6,760 | py | Python | tests/test_storage.py | HumanCellAtlas/data-store | 6b27d0f7e0110c62b3079151708689ab5145f15b | [
"MIT"
] | 46 | 2017-03-24T15:56:09.000Z | 2021-03-15T19:49:07.000Z | tests/test_storage.py | HumanCellAtlas/DCC | 6b27d0f7e0110c62b3079151708689ab5145f15b | [
"MIT"
] | 1,799 | 2017-04-04T17:54:28.000Z | 2020-11-19T12:30:13.000Z | tests/test_storage.py | HumanCellAtlas/DCC | 6b27d0f7e0110c62b3079151708689ab5145f15b | [
"MIT"
] | 13 | 2017-03-27T23:49:35.000Z | 2021-01-18T07:39:49.000Z | #!/usr/bin/env python
# coding: utf-8
import os
import sys
import string
import unittest
from uuid import uuid4
from unittest import mock
from random import random, randint
from datetime import datetime, timedelta
pkg_root = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) # noqa
sys.path.insert(0, pkg... | 45.066667 | 117 | 0.660059 | 5,934 | 0.877811 | 83 | 0.012278 | 5,778 | 0.854734 | 0 | 0 | 1,017 | 0.150444 |
96a6810cf017f549b181521c6cc7573fff263c40 | 11,035 | py | Python | headless/ches_prod_test_titles_headless.py | sherrli/Testing-Automation | d5a59ed10613b782cd4a8dc29d084c78ee883300 | [
"MIT"
] | 1 | 2019-04-05T15:51:30.000Z | 2019-04-05T15:51:30.000Z | headless/ches_prod_test_titles_headless.py | shli17/Testing-Automation | d5a59ed10613b782cd4a8dc29d084c78ee883300 | [
"MIT"
] | null | null | null | headless/ches_prod_test_titles_headless.py | shli17/Testing-Automation | d5a59ed10613b782cd4a8dc29d084c78ee883300 | [
"MIT"
] | null | null | null | #!/usr/local/bin/python
# coding=utf-8
# Headless firefox title test for jenkins build.
intro="""
----------------------------------------------------------------
File : ches_prod_test_titles_headless.py
Description : Headless firefox title test for ches prod sites.
Author : Sherri Li
--------------------... | 41.175373 | 181 | 0.553512 | 6,607 | 0.598731 | 0 | 0 | 0 | 0 | 0 | 0 | 6,523 | 0.591119 |
96a69bc47e9c073ff2335f4ac224effa211b40aa | 4,579 | py | Python | pyteiser/matchmaker.py | goodarzilab/pyteiser | 3ac78604c768957022cc7751ccdd337960a816f2 | [
"MIT"
] | 6 | 2020-12-01T08:10:07.000Z | 2022-01-17T02:09:13.000Z | pyteiser/matchmaker.py | goodarzilab/pyteiser | 3ac78604c768957022cc7751ccdd337960a816f2 | [
"MIT"
] | 4 | 2021-05-19T06:24:30.000Z | 2022-01-27T20:18:44.000Z | pyteiser/matchmaker.py | goodarzilab/pyteiser | 3ac78604c768957022cc7751ccdd337960a816f2 | [
"MIT"
] | 5 | 2020-07-04T02:05:30.000Z | 2021-06-26T10:24:16.000Z | import numba
import time
from . import glob_var
from . import structures
# for some reason, caching of this function fails the run on Columbia HPC and it doesn't really affect the speed
# since it only needs to compile once but it's getting called so many times
@numba.jit(cache=False, nopython=True, nogil=True)
def... | 42.794393 | 143 | 0.70736 | 0 | 0 | 0 | 0 | 2,163 | 0.472374 | 0 | 0 | 1,963 | 0.428696 |
96a6c1aaacc3e456bbd64b90f5f744423a7befea | 4,574 | py | Python | clean.py | stephtdouglas/k2spin | 9a73e35e99b925015a91e37b5fd785440adf78f9 | [
"MIT"
] | null | null | null | clean.py | stephtdouglas/k2spin | 9a73e35e99b925015a91e37b5fd785440adf78f9 | [
"MIT"
] | null | null | null | clean.py | stephtdouglas/k2spin | 9a73e35e99b925015a91e37b5fd785440adf78f9 | [
"MIT"
] | null | null | null | """Basic cleanup on lightcurves (trimming, sigma-clipping)."""
import logging
import numpy as np
import matplotlib.pyplot as plt
import k2spin.utils as utils
from k2spin import detrend
def trim(time, flux, unc_flux):
"""Remove infs, NaNs, and negative flux values.
Inputs
------
time, flux, unc_flux... | 29.895425 | 79 | 0.630302 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,784 | 0.390031 |
96a6e69d914f940d6ce83071f9858c2504a877e2 | 140 | py | Python | nested ternary.py | ps2809/Python-Examples | 0574f53787af28bf5bd011c139d340091454a4f9 | [
"MIT"
] | 1 | 2021-07-30T06:15:18.000Z | 2021-07-30T06:15:18.000Z | nested ternary.py | ps2809/Python-Examples | 0574f53787af28bf5bd011c139d340091454a4f9 | [
"MIT"
] | null | null | null | nested ternary.py | ps2809/Python-Examples | 0574f53787af28bf5bd011c139d340091454a4f9 | [
"MIT"
] | null | null | null | a=int(input('enter a:'))
b=int(input('enter b:'))
c=int(input('enter c:'))
min_value= a if a<b and a<c else b if b<c else c
print(min_value) | 28 | 48 | 0.657143 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 30 | 0.214286 |
96a81b3b0875d5b95d7dd34bd4be73ffcfb6fd0c | 758 | py | Python | pylinsql/timing.py | hunyadi/pylinsql | bba0017322edbda25a5a2c87f5b46407eea9a00a | [
"MIT"
] | null | null | null | pylinsql/timing.py | hunyadi/pylinsql | bba0017322edbda25a5a2c87f5b46407eea9a00a | [
"MIT"
] | null | null | null | pylinsql/timing.py | hunyadi/pylinsql | bba0017322edbda25a5a2c87f5b46407eea9a00a | [
"MIT"
] | null | null | null | import asyncio
import functools
import time
def _log_func_timing(f, args, kw, sec: float):
print("func: %r args: [%r, %r] took: %2.4f sec" % (f.__name__, args, kw, sec))
def timing(f):
"Decorator to log"
if asyncio.iscoroutinefunction(f):
@functools.wraps(f)
async def wrap(*args, **kw)... | 22.294118 | 82 | 0.51847 | 0 | 0 | 0 | 0 | 454 | 0.598945 | 205 | 0.270449 | 59 | 0.077836 |
96a839ea7a6be1421d492c4092e290ebd78292b8 | 715 | py | Python | examples/wsgi_usage/apache_modwsgi_server_example.py | digimatspa/python-jsonrpc | 7f8a022c112f8957cee18c54fc48557690cfe417 | [
"MIT"
] | 97 | 2015-01-06T14:29:31.000Z | 2022-02-17T07:27:11.000Z | examples/wsgi_usage/apache_modwsgi_server_example.py | HoverHell/python-jsonrpc | 41bcd48dd7879ca780481605dc1ffb611ead9100 | [
"MIT"
] | 37 | 2015-01-03T11:00:48.000Z | 2021-04-23T06:12:45.000Z | examples/wsgi_usage/apache_modwsgi_server_example.py | HoverHell/python-jsonrpc | 41bcd48dd7879ca780481605dc1ffb611ead9100 | [
"MIT"
] | 63 | 2015-02-04T20:14:48.000Z | 2022-02-17T07:27:13.000Z | #!/usr/bin/env python
# coding: utf-8
# BEGIN --- required only for testing, remove in real world code --- BEGIN
import os
import sys
THISDIR = os.path.dirname(os.path.abspath(__file__))
APPDIR = os.path.abspath(os.path.join(THISDIR, os.path.pardir, os.path.pardir))
sys.path.insert(0, APPDIR)
# END --- required only f... | 21.029412 | 79 | 0.706294 | 161 | 0.225175 | 0 | 0 | 82 | 0.114685 | 0 | 0 | 261 | 0.365035 |
96a84245805dc4fa3773a993afd163825be5f67d | 27,511 | py | Python | dicomToProjection/convertDicoms.py | tarolangner/mri_biometry | 8c52f48c2c9ff823a300c5298ea3992b53440816 | [
"MIT"
] | null | null | null | dicomToProjection/convertDicoms.py | tarolangner/mri_biometry | 8c52f48c2c9ff823a300c5298ea3992b53440816 | [
"MIT"
] | null | null | null | dicomToProjection/convertDicoms.py | tarolangner/mri_biometry | 8c52f48c2c9ff823a300c5298ea3992b53440816 | [
"MIT"
] | null | null | null | import os
import sys
import io
import time
import zipfile
import pydicom
import numpy as np
import scipy.interpolate
import numba_interpolate
from skimage import filters
import nrrd
import cv2
c_out_pixel_spacing = np.array((2.23214293, 2.23214293, 3.))
c_resample_tolerance = 0.01 # Only interpolate voxels furth... | 32.947305 | 211 | 0.637963 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6,182 | 0.22471 |
96a94e5f66df21e992b1df975469b8edd292ca16 | 3,285 | py | Python | ffttest.py | teslaworksumn/Reactor | ba6d2d80bd606047e81a5e1ccc0f1af26497feb7 | [
"MIT"
] | null | null | null | ffttest.py | teslaworksumn/Reactor | ba6d2d80bd606047e81a5e1ccc0f1af26497feb7 | [
"MIT"
] | null | null | null | ffttest.py | teslaworksumn/Reactor | ba6d2d80bd606047e81a5e1ccc0f1af26497feb7 | [
"MIT"
] | null | null | null | # From http://julip.co/2012/05/arduino-python-soundlight-spectrum/
# Python 2.7 code to analyze sound and interface with Arduino
import pyaudio # from http://people.csail.mit.edu/hubert/pyaudio/
import serial # from http://pyserial.sourceforge.net/
import numpy # from http://numpy.scipy.org/
import audioop
import ... | 28.076923 | 128 | 0.578082 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,216 | 0.370167 |
96aa0527808e7632054573910aceede43a35b2b3 | 6,422 | py | Python | monitoring/perf-monitor-test.py | abhisheksawarkar/gcp-ml-ops | 462780e6caad370781e191f530f1fd4a4a57431c | [
"Apache-2.0"
] | 30 | 2021-04-14T16:52:19.000Z | 2022-03-17T20:39:42.000Z | monitoring/perf-monitor-test.py | shashank3959/gcp-ml-ops | afa7885e0230c580296724d6dcc5e619a115f24c | [
"Apache-2.0"
] | null | null | null | monitoring/perf-monitor-test.py | shashank3959/gcp-ml-ops | afa7885e0230c580296724d6dcc5e619a115f24c | [
"Apache-2.0"
] | 4 | 2021-04-14T16:52:28.000Z | 2022-01-13T19:05:26.000Z | # Copyright (c) 2021 NVIDIA Corporation. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | 34.902174 | 145 | 0.575833 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,814 | 0.282467 |
96aa3bc5e94ffc210e626376f0da8dd2ffc01f94 | 3,996 | py | Python | daemon/core/gui/dialogs/throughput.py | montag451/core | 3be162b0b0f54b35520b980023abdfad4ff5e489 | [
"BSD-2-Clause"
] | null | null | null | daemon/core/gui/dialogs/throughput.py | montag451/core | 3be162b0b0f54b35520b980023abdfad4ff5e489 | [
"BSD-2-Clause"
] | null | null | null | daemon/core/gui/dialogs/throughput.py | montag451/core | 3be162b0b0f54b35520b980023abdfad4ff5e489 | [
"BSD-2-Clause"
] | null | null | null | """
throughput dialog
"""
import tkinter as tk
from tkinter import ttk
from typing import TYPE_CHECKING
from core.gui.dialogs.colorpicker import ColorPickerDialog
from core.gui.dialogs.dialog import Dialog
from core.gui.themes import FRAME_PAD, PADX, PADY
if TYPE_CHECKING:
from core.gui.app import Application
c... | 36 | 88 | 0.62037 | 3,676 | 0.91992 | 0 | 0 | 0 | 0 | 0 | 0 | 328 | 0.082082 |
96aa991d741b497c4ac277aabd1b587505844ad6 | 5,488 | py | Python | backend/api/tests/unit_tests/test_cards.py | hieutt99/aidudu | 00dff59e8dff109904b340cd7ae763d6201773e8 | [
"MIT"
] | 3 | 2021-10-31T19:32:20.000Z | 2022-01-02T15:31:11.000Z | backend/api/tests/unit_tests/test_cards.py | hieutt99/aidudu | 00dff59e8dff109904b340cd7ae763d6201773e8 | [
"MIT"
] | 49 | 2021-10-31T16:08:35.000Z | 2022-01-04T16:29:06.000Z | backend/api/tests/unit_tests/test_cards.py | hieutt99/aidudu | 00dff59e8dff109904b340cd7ae763d6201773e8 | [
"MIT"
] | 2 | 2021-12-19T17:03:22.000Z | 2022-01-03T08:27:01.000Z | from django.test.client import BOUNDARY
from api.tests.unit_tests.utils import *
class CardTest(APITestCase):
# url = reverse('card-detail')
def setUp(self):
hook_init_APITestCase(self)
self.test_workspace = Workspace.objects.create(
name='test_workspace',
# default va... | 35.179487 | 111 | 0.598397 | 5,405 | 0.984876 | 0 | 0 | 0 | 0 | 0 | 0 | 857 | 0.156159 |
96ab9f2c7f20292bca2815ee86e2e792b39a18da | 1,412 | py | Python | mouse.py | Ra-Na/android-mouse-cursor | b9f0a8394871cb17a2d6ec1a0cc2548b86990ce0 | [
"MIT"
] | 7 | 2019-12-05T13:34:37.000Z | 2022-01-15T09:58:11.000Z | mouse.py | Ra-Na/android-mouse-cursor | b9f0a8394871cb17a2d6ec1a0cc2548b86990ce0 | [
"MIT"
] | null | null | null | mouse.py | Ra-Na/android-mouse-cursor | b9f0a8394871cb17a2d6ec1a0cc2548b86990ce0 | [
"MIT"
] | 5 | 2019-07-27T02:28:04.000Z | 2022-02-14T15:10:25.000Z | import socket
def getch(): # define non-Windows version
import sys, tty, termios
fd = sys.stdin.fileno()
old_settings = termios.tcgetattr(fd)
try:
tty.setraw(sys.stdin.fileno())
ch = sys.stdin.read(1)
finally:
termios.tcsetattr(fd, termios.TCSADRAIN, old_settings)
ret... | 25.214286 | 62 | 0.576487 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 499 | 0.353399 |
96adbd6c68f6247e87e6ccdd7457197d2e799780 | 4,278 | py | Python | routes/process_tag.py | PowerSaucisse/QuarKEY-api-server | ba327d3a49e8ea35efbb989550cb8a1429098b15 | [
"MIT"
] | 5 | 2021-07-26T14:46:35.000Z | 2021-07-26T22:50:56.000Z | routes/process_tag.py | PowerSaucisse/quarkey-api-server | ba327d3a49e8ea35efbb989550cb8a1429098b15 | [
"MIT"
] | null | null | null | routes/process_tag.py | PowerSaucisse/quarkey-api-server | ba327d3a49e8ea35efbb989550cb8a1429098b15 | [
"MIT"
] | null | null | null | from utils.security.auth import AccountAuthToken
import falcon, uuid, datetime
from routes.middleware import AuthorizeResource
from utils.base import api_validate_form, api_message
from utils.config import AppState
class ProcessTag:
def __init__(self) -> None:
self._token_controller = AccountAuthToken('... | 39.981308 | 140 | 0.556568 | 4,060 | 0.949042 | 0 | 0 | 3,932 | 0.919121 | 0 | 0 | 974 | 0.227676 |
96aeee51e8b4208d515dafe2237e76a19c17dd76 | 895 | py | Python | players/human.py | pikatyuu/deep-learning-othello | d9f149b01f079f5d021ba9655445cd43a847a628 | [
"MIT"
] | null | null | null | players/human.py | pikatyuu/deep-learning-othello | d9f149b01f079f5d021ba9655445cd43a847a628 | [
"MIT"
] | null | null | null | players/human.py | pikatyuu/deep-learning-othello | d9f149b01f079f5d021ba9655445cd43a847a628 | [
"MIT"
] | null | null | null | class Human():
def __init__(self, name="Human"):
self.name = name
def action(self, game):
safe_input = False
while not safe_input:
pos = input("choose a position: ")
if pos == "draw":
game.draw()
elif pos == "exit":
imp... | 27.96875 | 59 | 0.444693 | 894 | 0.998883 | 0 | 0 | 0 | 0 | 0 | 0 | 103 | 0.115084 |
96af356d59393d735c1df16fcdd2f437e70407ca | 2,338 | py | Python | HackerEarth/Python/BasicProgramming/InputOutput/BasicsOfInputOutput/SeatingArrangement.py | cychitivav/programming_exercises | e8e7ddb4ec4eea52ee0d3826a144c7dc97195e78 | [
"MIT"
] | null | null | null | HackerEarth/Python/BasicProgramming/InputOutput/BasicsOfInputOutput/SeatingArrangement.py | cychitivav/programming_exercises | e8e7ddb4ec4eea52ee0d3826a144c7dc97195e78 | [
"MIT"
] | null | null | null | HackerEarth/Python/BasicProgramming/InputOutput/BasicsOfInputOutput/SeatingArrangement.py | cychitivav/programming_exercises | e8e7ddb4ec4eea52ee0d3826a144c7dc97195e78 | [
"MIT"
] | null | null | null | #!/Usr/bin/env python
"""
Akash and Vishal are quite fond of travelling. They mostly travel by railways. They were travelling in a train one day and they got interested in the seating arrangement of their compartment. The compartment looked something like
So they got interested to know the seat number facing them ... | 32.027397 | 230 | 0.582977 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,015 | 0.432651 |
96af8b4a48adf5297e31757c90f73a77f6edf704 | 101 | py | Python | vault_password.py | RMuskovets/empireofcode | a2a9cfe2c43c7f28999b426601063dd0af352db5 | [
"Apache-2.0"
] | 1 | 2018-02-20T12:11:45.000Z | 2018-02-20T12:11:45.000Z | vault_password.py | RMuskovets/empireofcode | a2a9cfe2c43c7f28999b426601063dd0af352db5 | [
"Apache-2.0"
] | null | null | null | vault_password.py | RMuskovets/empireofcode | a2a9cfe2c43c7f28999b426601063dd0af352db5 | [
"Apache-2.0"
] | null | null | null | def golf(p): return len(p)>9 and p!=p.lower() and p!=p.upper() and any('0'<=l and l<='9' for l in p)
| 50.5 | 100 | 0.584158 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | 0.059406 |
96af9cf77f54780c67f68a366b9f2da0eae70db7 | 3,149 | py | Python | analysis/marc_verification_sharp.py | maxschalz/studious_potato | a368aa88036c1f0ffcd494e994b0975be2575210 | [
"BSD-3-Clause"
] | null | null | null | analysis/marc_verification_sharp.py | maxschalz/studious_potato | a368aa88036c1f0ffcd494e994b0975be2575210 | [
"BSD-3-Clause"
] | null | null | null | analysis/marc_verification_sharp.py | maxschalz/studious_potato | a368aa88036c1f0ffcd494e994b0975be2575210 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
import matplotlib
matplotlib.use('pgf')
import matplotlib.pyplot as plt
import numpy as np
from multi_isotope_calculator import Multi_isotope
import plotsettings as ps
plt.style.use('seaborn-darkgrid')
plt.rcParams.update(ps.tex_fonts())
def main():
plot()
#figure5()
def figure1():
... | 30.278846 | 73 | 0.580502 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 480 | 0.152429 |
96b02e8ac66ecd2c65e6e010e248801adc096f97 | 497 | py | Python | clase6/clases.py | Tank3-TK3/codigo-basico-Python | 580e8d284fa8a4d70b2a264762c91bd64c89ab80 | [
"MIT"
] | 7 | 2021-04-19T01:32:49.000Z | 2021-06-04T17:38:04.000Z | clase6/clases.py | Tank3-TK3/codigo-basico-Python | 580e8d284fa8a4d70b2a264762c91bd64c89ab80 | [
"MIT"
] | null | null | null | clase6/clases.py | Tank3-TK3/codigo-basico-Python | 580e8d284fa8a4d70b2a264762c91bd64c89ab80 | [
"MIT"
] | null | null | null | class Animals:
def comer(self):
print("Comiendo")
def dormir(self):
print("Durmiendo")
class Perro:
def __init__(self, nombre):
self.nombre = nombre
def comer(self):
print("Comiendo")
def dormir(self):
print("Durmiendo")
def ladrar(self):
print("Ladrando")
print("----------------------... | 23.666667 | 60 | 0.525151 | 285 | 0.573441 | 0 | 0 | 0 | 0 | 0 | 0 | 166 | 0.334004 |
96b0583a014d7b5a8ac9ea17b0f8eea2bc40f0eb | 3,103 | py | Python | homeworks_advanced/homework2_attention_in_seq2seq/modules.py | BiscuitsLayer/ml-mipt | 24917705189d2eb97a07132405b4f93654cb1aaf | [
"MIT"
] | 1 | 2021-08-01T11:29:11.000Z | 2021-08-01T11:29:11.000Z | homeworks_advanced/homework2_attention_in_seq2seq/modules.py | ivasio/ml-mipt | 9c8896b4dfe46ee02bc5fdbca47acffbeca6828e | [
"MIT"
] | null | null | null | homeworks_advanced/homework2_attention_in_seq2seq/modules.py | ivasio/ml-mipt | 9c8896b4dfe46ee02bc5fdbca47acffbeca6828e | [
"MIT"
] | null | null | null | import random
import torch
from torch import nn
from torch.nn import functional as F
class Encoder(nn.Module):
def __init__(self, input_dim, emb_dim, hid_dim, n_layers, dropout):
super().__init__()
self.input_dim = input_dim
self.emb_dim = emb_dim
self.hid_dim = hid_dim
se... | 29.836538 | 92 | 0.638737 | 3,006 | 0.96874 | 0 | 0 | 0 | 0 | 0 | 0 | 574 | 0.184982 |
96b22687eb09935202fe84c81b4d3c7659c65ad8 | 1,753 | py | Python | zipselected/__init__.py | raguay/ZipSelected | 8663623498db6e87beded2aaecac65cd0979788d | [
"MIT"
] | 6 | 2017-01-26T09:09:51.000Z | 2021-12-14T11:38:54.000Z | zipselected/__init__.py | raguay/ZipSelected | 8663623498db6e87beded2aaecac65cd0979788d | [
"MIT"
] | 2 | 2017-03-17T11:24:26.000Z | 2018-02-22T13:47:41.000Z | zipselected/__init__.py | raguay/ZipSelected | 8663623498db6e87beded2aaecac65cd0979788d | [
"MIT"
] | 2 | 2017-10-16T06:19:27.000Z | 2020-05-15T13:42:26.000Z | from fman import DirectoryPaneCommand, show_alert
import os
import zipfile
from fman.url import as_human_readable
from fman.url import as_url
def zipdir(rootZip, path, ziph):
numf = 0
# ziph is zipfile handle
for root, dirs, files in os.walk(path):
for file in files:
ziph.w... | 39.840909 | 100 | 0.58243 | 1,185 | 0.675984 | 0 | 0 | 0 | 0 | 0 | 0 | 91 | 0.051911 |
96b3255531b199084f95bb09b62e2c476d0885f5 | 626 | py | Python | functions/aurora_check_status.py | aws-samples/aws-stepfunctions-aurora-clone | ca60dbb1e98bb337662ac6140a2749fa03363d48 | [
"MIT-0"
] | 7 | 2022-02-22T16:23:00.000Z | 2022-03-18T18:44:06.000Z | functions/aurora_check_status.py | aws-samples/aws-stepfunctions-aurora-clone | ca60dbb1e98bb337662ac6140a2749fa03363d48 | [
"MIT-0"
] | null | null | null | functions/aurora_check_status.py | aws-samples/aws-stepfunctions-aurora-clone | ca60dbb1e98bb337662ac6140a2749fa03363d48 | [
"MIT-0"
] | null | null | null | import boto3
client = boto3.client('rds')
def lambda_handler(event, context):
target_db_cluster_identifier=event['TargetDBClusterIdentifier']
payload = event.copy()
try:
response = client.describe_db_clusters(DBClusterIdentifier=target_db_cluster_identifier)
payload... | 25.04 | 96 | 0.629393 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 122 | 0.194888 |
96b4507fab2d696dd5272cc8fb8efb5a6fdf9e81 | 6,545 | py | Python | smellCatalog/InputProcessor.py | neilernst/smells | c093ee72a12f62693d8635359b7ca4958ecba0e0 | [
"MIT"
] | null | null | null | smellCatalog/InputProcessor.py | neilernst/smells | c093ee72a12f62693d8635359b7ca4958ecba0e0 | [
"MIT"
] | null | null | null | smellCatalog/InputProcessor.py | neilernst/smells | c093ee72a12f62693d8635359b7ca4958ecba0e0 | [
"MIT"
] | 1 | 2019-07-15T14:16:37.000Z | 2019-07-15T14:16:37.000Z | import re
from Smell import Smell
from SmellCategory import SmellCategory
from Reference import Reference
SMELL = "\[smell\]"
SMELL_ID = "\[smell-id\]"
SMELL_NAME = "\[smell-name\]"
SMELL_END = "\[smell-end\]"
SMELL_DES = "\[smell-description\]"
SMELL_AKA = "\[smell-aka\]"
SMELL_CATEGORY = "\[smell-category\]"
SMELL_S... | 42.5 | 93 | 0.559664 | 5,816 | 0.888617 | 0 | 0 | 0 | 0 | 0 | 0 | 470 | 0.071811 |
96b5076f3752a0f19a06b6d629287742be1b298b | 414 | py | Python | YorForger/modules/redis/afk_redis.py | Voidxtoxic/kita | b2a3007349727280e149dcca017413d7dc2e7648 | [
"MIT"
] | null | null | null | YorForger/modules/redis/afk_redis.py | Voidxtoxic/kita | b2a3007349727280e149dcca017413d7dc2e7648 | [
"MIT"
] | null | null | null | YorForger/modules/redis/afk_redis.py | Voidxtoxic/kita | b2a3007349727280e149dcca017413d7dc2e7648 | [
"MIT"
] | null | null | null |
from YorForger import REDIS
# AFK
def is_user_afk(userid):
rget = REDIS.get(f"is_afk_{userid}")
return bool(rget)
def start_afk(userid, reason):
REDIS.set(f"is_afk_{userid}", reason)
def afk_reason(userid):
return strb(REDIS.get(f"is_afk_{userid}"))
def end_afk(userid):
REDIS.delete(f"is_af... | 15.333333 | 46 | 0.695652 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 86 | 0.207729 |
96b51c0b082319955c9c8c901bb9467463e9b730 | 859 | py | Python | mini_event.py | shubhamjain/earphone-event | 0513a06904ea98c3962015d6edaf5f63943a03b7 | [
"MIT"
] | 6 | 2018-08-16T21:38:40.000Z | 2020-11-19T05:53:09.000Z | mini_event.py | shubhamjain/earphone-event | 0513a06904ea98c3962015d6edaf5f63943a03b7 | [
"MIT"
] | 1 | 2020-10-21T17:55:07.000Z | 2020-10-21T17:55:07.000Z | mini_event.py | shubhamjain/earphone-event | 0513a06904ea98c3962015d6edaf5f63943a03b7 | [
"MIT"
] | 1 | 2021-09-08T15:05:52.000Z | 2021-09-08T15:05:52.000Z | import threading
class mini_event:
BUTTON_DOWN = 1
BUTTON_UP = 2
BUTTON_HOLD = 3
subscribers = { BUTTON_DOWN: [], BUTTON_UP : [], BUTTON_HOLD: [] }
trigger_hold_stop = False # This value should be turned to True if the hold event callback needs to be stopped.
def add_subscriber( self, callba... | 28.633333 | 115 | 0.604191 | 839 | 0.976717 | 0 | 0 | 0 | 0 | 0 | 0 | 85 | 0.098952 |
96b58e236e198367799150eb2cf1c9825aebfff3 | 13,225 | py | Python | tin/utils.py | balazsdukai/tin2stardb | efb160ba744f757c4a6d4674c7abec8bf0694415 | [
"MIT"
] | null | null | null | tin/utils.py | balazsdukai/tin2stardb | efb160ba744f757c4a6d4674c7abec8bf0694415 | [
"MIT"
] | null | null | null | tin/utils.py | balazsdukai/tin2stardb | efb160ba744f757c4a6d4674c7abec8bf0694415 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Various utility functions for handling geometry etc."""
import math
from statistics import mean
from typing import Tuple, Union, Iterable, Generator, Mapping
import logging
MODULE_MATPLOTLIB_AVAILABLE = True
try:
import matplotlib.pyplot as plt
import matplotlib.lines as lines
exce... | 38.444767 | 127 | 0.607108 | 0 | 0 | 2,419 | 0.182911 | 0 | 0 | 0 | 0 | 5,046 | 0.38155 |
96b5abda600a3ff8286fd10ad76e69e6c1844b69 | 7,748 | py | Python | tfworker/cli.py | objectrocket/terraform-worker | 5a3c81a465d31bf7c9186fa59be2bfa8f4578449 | [
"Apache-2.0"
] | 6 | 2020-02-10T21:53:18.000Z | 2021-07-21T18:10:02.000Z | tfworker/cli.py | RSS-Engineering/terraform-worker | 98b04eacd828448985bc9ded3a46497f06d7c6ae | [
"Apache-2.0"
] | 4 | 2020-09-20T13:04:26.000Z | 2021-03-23T21:20:57.000Z | tfworker/cli.py | RSS-Engineering/terraform-worker | 98b04eacd828448985bc9ded3a46497f06d7c6ae | [
"Apache-2.0"
] | 3 | 2020-06-12T18:38:33.000Z | 2020-09-15T21:01:53.000Z | #!/usr/bin/env python
# Copyright 2020 Richard Maynard ([email protected])
#
# 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
#
# Unles... | 28.277372 | 126 | 0.672303 | 0 | 0 | 0 | 0 | 5,434 | 0.701342 | 0 | 0 | 3,963 | 0.511487 |
96b74e78276fe832497e5e00ed9a762980bd1fbc | 3,777 | py | Python | shs/input/dialogs/ac_init.py | ansobolev/shs | 7a5f61bd66fe1e8ae047a4d3400b055175a53f4e | [
"MIT"
] | 1 | 2016-06-22T13:30:25.000Z | 2016-06-22T13:30:25.000Z | shs/input/dialogs/ac_init.py | ansobolev/shs | 7a5f61bd66fe1e8ae047a4d3400b055175a53f4e | [
"MIT"
] | 1 | 2017-12-01T04:49:45.000Z | 2017-12-01T04:49:45.000Z | shs/input/dialogs/ac_init.py | ansobolev/shs | 7a5f61bd66fe1e8ae047a4d3400b055175a53f4e | [
"MIT"
] | null | null | null | import wx
from wx.lib.agw.floatspin import FloatSpin
from shs.input.fdf_options import ChoiceLine, MeasuredLine, NumberLine, ThreeNumberLine
try:
from geom import Geom
except ImportError:
from shs.geom import Geom
class Bravais(ChoiceLine):
label = 'Composition'
choices = ['BCC', 'FCC', 'SC']
o... | 32.282051 | 112 | 0.605507 | 3,538 | 0.936722 | 0 | 0 | 0 | 0 | 0 | 0 | 178 | 0.047127 |
96b8879f01bcc6f2a6fb4f8f1c990b4167027165 | 5,377 | py | Python | mgs/v1.0/data_server.py | vt-rocksat-2017/dashboard | e99a71edc74dd8b7f3eec023c381524561a7b6e4 | [
"MIT"
] | 1 | 2017-08-09T19:57:38.000Z | 2017-08-09T19:57:38.000Z | mgs/v1.0/data_server.py | vt-rocksat-2017/dashboard | e99a71edc74dd8b7f3eec023c381524561a7b6e4 | [
"MIT"
] | null | null | null | mgs/v1.0/data_server.py | vt-rocksat-2017/dashboard | e99a71edc74dd8b7f3eec023c381524561a7b6e4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#########################################
# Title: Rocksat Data Server Class #
# Project: Rocksat #
# Version: 1.0 #
# Date: August, 2017 #
# Author: Zach Leffke, KJ4QLP #
# Comment: Initial Version #
###... | 38.407143 | 109 | 0.565929 | 4,864 | 0.904594 | 0 | 0 | 0 | 0 | 0 | 0 | 1,055 | 0.196206 |
96b888fef4eb174221ced8eecdc0b4280bce51d8 | 3,932 | py | Python | handledata.py | bioPunkKitchen/climate.local | ccd29da3d84542d5f9c73a5d75bc3ceefeef1f08 | [
"MIT"
] | 1 | 2019-05-28T18:33:49.000Z | 2019-05-28T18:33:49.000Z | handledata.py | bioPunkKitchen/climate.local | ccd29da3d84542d5f9c73a5d75bc3ceefeef1f08 | [
"MIT"
] | 1 | 2019-12-30T14:52:02.000Z | 2020-01-04T11:41:08.000Z | handledata.py | bioPunkKitchen/climate.local | ccd29da3d84542d5f9c73a5d75bc3ceefeef1f08 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import datetime
import time
import os
import matplotlib.pyplot as plt
import matplotlib.dates as md
import numpy as np
class handle_data:
data_file = "./data/data.log"
data_list = []
def __init__(self):
pass
def insert_data(self, timestamp, temp, state_onoff, state_light, state_cool... | 30.015267 | 252 | 0.625127 | 3,671 | 0.933384 | 0 | 0 | 0 | 0 | 0 | 0 | 1,634 | 0.415459 |
96b9956367c551043c19348764e4606177dd4559 | 555 | py | Python | day01/python/beckel/solution.py | clssn/aoc-2019 | a978e5235855be937e60a1e7f88d1ef9b541be15 | [
"MIT"
] | 22 | 2019-11-27T08:28:46.000Z | 2021-04-27T05:37:08.000Z | day01/python/wiedmann/solution.py | sancho1241/aoc-2019 | e0f63824c8250e0f84a42805e1a7ff7d9232002c | [
"MIT"
] | 77 | 2019-11-16T17:22:42.000Z | 2021-05-10T20:36:36.000Z | day01/python/wiedmann/solution.py | sancho1241/aoc-2019 | e0f63824c8250e0f84a42805e1a7ff7d9232002c | [
"MIT"
] | 43 | 2019-11-27T06:36:51.000Z | 2021-11-03T20:56:48.000Z | import math
def fuel_needed(mass):
return math.floor(int(mass)/3 - 2)
def fuel_needed_recursive(mass):
fuel_needed_i = fuel_needed(mass)
if (fuel_needed_i <= 0):
return 0
return fuel_needed_i + fuel_needed_recursive(fuel_needed_i)
total_fuel = 0
total_fuel_recursive = 0
with open("input.txt"... | 25.227273 | 63 | 0.704505 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 52 | 0.093694 |
96b9a2d50c1e158d5bd73be619a6523cec7b4cfa | 45,634 | py | Python | arraytool_rc.py | zinka/arraytool_gui | c1ba763e170f7efde99414a29946410c4994e924 | [
"BSD-3-Clause"
] | 11 | 2017-04-20T20:08:04.000Z | 2022-03-29T22:30:24.000Z | arraytool_rc.py | zinka/arraytool_gui | c1ba763e170f7efde99414a29946410c4994e924 | [
"BSD-3-Clause"
] | null | null | null | arraytool_rc.py | zinka/arraytool_gui | c1ba763e170f7efde99414a29946410c4994e924 | [
"BSD-3-Clause"
] | 7 | 2018-01-28T12:59:45.000Z | 2022-03-19T12:34:25.000Z | # -*- coding: utf-8 -*-
# Resource object code
#
# Created by: The Resource Compiler for PyQt4 (Qt v4.8.7)
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore
qt_resource_data = "\
\x00\x00\x03\x97\
\x89\
\x50\x4e\x47\x0d\x0a\x1a\x0a\x00\x00\x00\x0d\x49\x48\x44\x52\x00\
\x00\x00\x16\x0... | 59.887139 | 129 | 0.725884 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 45,276 | 0.992155 |
96bb265549d6f2b01a8d5a363f1cef448dfbda43 | 581 | py | Python | xinyu/python/node/graphicNode/turtle/base_graphics.py | xzhuah/codingDimension | 9b90b93a3a3b8afee28e3a2a571050ca3f86f066 | [
"Apache-2.0"
] | 1 | 2020-11-06T20:39:11.000Z | 2020-11-06T20:39:11.000Z | xinyu/python/node/graphicNode/turtle/base_graphics.py | xzhuah/codingDimension | 9b90b93a3a3b8afee28e3a2a571050ca3f86f066 | [
"Apache-2.0"
] | 1 | 2021-08-28T02:29:51.000Z | 2021-08-28T02:29:51.000Z | xinyu/python/node/graphicNode/turtle/base_graphics.py | xzhuah/codingDimension | 9b90b93a3a3b8afee28e3a2a571050ca3f86f066 | [
"Apache-2.0"
] | null | null | null | # Created by Xinyu Zhu on 2021/6/6, 21:08
from turtle import Turtle
import turtle
def draw_rectangle(turtle: Turtle, llx, lly, width, height):
turtle.up()
turtle.goto(llx, lly)
turtle.begin_fill()
turtle.down()
turtle.goto(llx + width, lly)
turtle.goto(llx + width, lly + height)
turtle.go... | 22.346154 | 60 | 0.636833 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 64 | 0.110155 |
96bc131385537becfa54518e6876cbcdcb1526f8 | 2,439 | py | Python | deform_conv/cnn.py | lone17/deform-conv | 3502cedbeae61c961d7e988382c55b9d45fd1873 | [
"MIT"
] | null | null | null | deform_conv/cnn.py | lone17/deform-conv | 3502cedbeae61c961d7e988382c55b9d45fd1873 | [
"MIT"
] | null | null | null | deform_conv/cnn.py | lone17/deform-conv | 3502cedbeae61c961d7e988382c55b9d45fd1873 | [
"MIT"
] | null | null | null | from __future__ import absolute_import, division
from keras.layers import *
from deform_conv.layers import ConvOffset2D
def get_cnn():
inputs = l = Input((None, None, 1), name='input')
# conv11
l = Conv2D(32, (3, 3), padding='same', name='conv11')(l)
l = Activation('relu', name='conv11_relu')(l)
... | 32.959459 | 84 | 0.622796 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 486 | 0.199262 |
96bc9e10f5eba6df7448344bf718f39170c04f04 | 1,861 | py | Python | perf/unit/ledger_rest.py | jancajthaml-openbank/e2e | a2ef84b6564022e95de76438fc795e2ef927aa2b | [
"Apache-2.0"
] | null | null | null | perf/unit/ledger_rest.py | jancajthaml-openbank/e2e | a2ef84b6564022e95de76438fc795e2ef927aa2b | [
"Apache-2.0"
] | 30 | 2018-03-18T05:58:32.000Z | 2022-01-19T23:21:31.000Z | perf/unit/ledger_rest.py | jancajthaml-openbank/e2e | a2ef84b6564022e95de76438fc795e2ef927aa2b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from unit.common import Unit
from helpers.eventually import eventually
from helpers.shell import execute
import string
import time
import os
class LedgerRest(Unit):
def __init__(self):
(code, result) = execute([
"systemctl", "start", 'ledger-rest'
], si... | 23.858974 | 80 | 0.587319 | 1,669 | 0.89683 | 0 | 0 | 718 | 0.385814 | 0 | 0 | 361 | 0.193982 |
96bcc512ded27d54238d89fca3c8655f2d09789e | 1,431 | py | Python | pythonneat/neat/Population.py | SananR/PythonNEAT | 951615b89d8211a22e147bc03446bf597576a6fc | [
"MIT"
] | 2 | 2020-06-08T19:39:45.000Z | 2022-01-20T18:21:38.000Z | pythonneat/neat/Population.py | SananR/PythonNEAT | 951615b89d8211a22e147bc03446bf597576a6fc | [
"MIT"
] | null | null | null | pythonneat/neat/Population.py | SananR/PythonNEAT | 951615b89d8211a22e147bc03446bf597576a6fc | [
"MIT"
] | null | null | null | from pythonneat.neat.Species import Species
import pythonneat.neat.Speciation as Speciation
import pythonneat.neat.utils.Parameters as Parameters
current_genomes = []
def add_genome(genome):
"""Adds genome to the species list based on its
compatability distance to already existing species
Inputs:
ge... | 28.62 | 109 | 0.678546 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 177 | 0.12369 |
96be495bd3261e63c1a53206e1ecae309a118594 | 387 | py | Python | container_service_extension/pksclient/api/__init__.py | tschoergez/container-service-extension | e1fbaf7e9c242a416d3f580880c1051286847cfd | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | container_service_extension/pksclient/api/__init__.py | tschoergez/container-service-extension | e1fbaf7e9c242a416d3f580880c1051286847cfd | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | container_service_extension/pksclient/api/__init__.py | tschoergez/container-service-extension | e1fbaf7e9c242a416d3f580880c1051286847cfd | [
"BSD-2-Clause",
"BSD-3-Clause"
] | null | null | null | from __future__ import absolute_import
# flake8: noqa
# import apis into api package
from container_service_extension.pksclient.api.cluster_api import ClusterApi
from container_service_extension.pksclient.api.plans_api import PlansApi
from container_service_extension.pksclient.api.profile_api import ProfileApi
from c... | 38.7 | 76 | 0.881137 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.113695 |
96beda9b3aae1f2d6cee27edea34723ea5136c59 | 1,733 | py | Python | examples/applications/clustering/agglomerative.py | SahanJayasinghe/sentence-transformers | 0ec07c6b2a996a5998129d2168ccafface49877a | [
"Apache-2.0"
] | 2 | 2021-08-24T13:28:33.000Z | 2021-08-24T13:28:42.000Z | examples/applications/clustering/agglomerative.py | SahanJayasinghe/sentence-transformers | 0ec07c6b2a996a5998129d2168ccafface49877a | [
"Apache-2.0"
] | null | null | null | examples/applications/clustering/agglomerative.py | SahanJayasinghe/sentence-transformers | 0ec07c6b2a996a5998129d2168ccafface49877a | [
"Apache-2.0"
] | null | null | null | """
This is a simple application for sentence embeddings: clustering
Sentences are mapped to sentence embeddings and then agglomerative clustering with a threshold is applied.
"""
from sentence_transformers import SentenceTransformer
from sklearn.cluster import AgglomerativeClustering
import numpy as np
embedder = Se... | 37.673913 | 148 | 0.725332 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 771 | 0.444893 |
96bee57e7d78263abb2c0dde497d36d9e3def948 | 1,364 | py | Python | generated-libraries/python/netapp/vserver/vserver_aggr_info.py | radekg/netapp-ontap-lib-get | 6445ebb071ec147ea82a486fbe9f094c56c5c40d | [
"MIT"
] | 2 | 2017-03-28T15:31:26.000Z | 2018-08-16T22:15:18.000Z | generated-libraries/python/netapp/vserver/vserver_aggr_info.py | radekg/netapp-ontap-lib-get | 6445ebb071ec147ea82a486fbe9f094c56c5c40d | [
"MIT"
] | null | null | null | generated-libraries/python/netapp/vserver/vserver_aggr_info.py | radekg/netapp-ontap-lib-get | 6445ebb071ec147ea82a486fbe9f094c56c5c40d | [
"MIT"
] | null | null | null | from netapp.netapp_object import NetAppObject
class VserverAggrInfo(NetAppObject):
"""
Assigned aggregate name and available size.
"""
_aggr_availsize = None
@property
def aggr_availsize(self):
"""
Assigned aggregate available size.
Attributes: non-creatable, non-mo... | 26.230769 | 91 | 0.577713 | 1,316 | 0.964809 | 0 | 0 | 868 | 0.636364 | 0 | 0 | 433 | 0.317449 |
96bfcdd0287b23d40e6c42cd64034c753cbc7300 | 133 | py | Python | sample4.py | vswamy/python | 51835bf7cfec894059a41f2929509026fe611119 | [
"Apache-2.0"
] | null | null | null | sample4.py | vswamy/python | 51835bf7cfec894059a41f2929509026fe611119 | [
"Apache-2.0"
] | null | null | null | sample4.py | vswamy/python | 51835bf7cfec894059a41f2929509026fe611119 | [
"Apache-2.0"
] | null | null | null | #Learning Python
import os
list = [1,2,3]
##using list as a queue
print(list)
list.pop(0)
print(list)
list.append(5)
print(list)
| 9.5 | 23 | 0.691729 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 39 | 0.293233 |
7367174cab478d0699640581faa954e034871a9e | 3,199 | py | Python | python/hongong/ch05/05_2.py | gangserver/py_test | 869bdfa5c94c3b6a15b87e0c3de6b2cdaca821f4 | [
"Apache-2.0"
] | null | null | null | python/hongong/ch05/05_2.py | gangserver/py_test | 869bdfa5c94c3b6a15b87e0c3de6b2cdaca821f4 | [
"Apache-2.0"
] | null | null | null | python/hongong/ch05/05_2.py | gangserver/py_test | 869bdfa5c94c3b6a15b87e0c3de6b2cdaca821f4 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
wine = pd.read_csv('https://bit.ly/wine-date')
# wine = pd.read_csv('../data/wine.csv')
print(wine.head())
data = wine[['alcohol', 'sugar', 'pH']].to_numpy()
target = wine['class'].to_numpy()
from sklearn.model_selection import train_test_split
train_input, test_input, train_target, test_target ... | 28.81982 | 131 | 0.758987 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 383 | 0.119725 |
73675fa4c6cc91d3e8f132bfb335856070974495 | 1,016 | py | Python | junk/dot_classifier_tf/potential.py | jpzwolak/quantum-ml | aebe3496516be3bc0fc4392aaf7805ab5faf98dc | [
"MIT"
] | 4 | 2018-06-27T17:20:19.000Z | 2021-05-30T06:21:01.000Z | junk/dot_classifier_tf/potential.py | jpzwolak/quantum-ml | aebe3496516be3bc0fc4392aaf7805ab5faf98dc | [
"MIT"
] | null | null | null | junk/dot_classifier_tf/potential.py | jpzwolak/quantum-ml | aebe3496516be3bc0fc4392aaf7805ab5faf98dc | [
"MIT"
] | 4 | 2018-11-30T20:34:17.000Z | 2022-02-16T23:06:37.000Z | # Module to build a potential landscape
import numpy as np
def gauss(x,mean=0.0,stddev=0.02,peak=1.0):
'''
Input:
x : x-coordintes
Output:
f(x) where f is a Gaussian with the given mean, stddev and peak value
'''
stddev = 5*(x[1] - x[0])
return peak*np.exp(-(x-mean)**2/(2*stddev**2))
d... | 27.459459 | 155 | 0.629921 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 577 | 0.567913 |
73680345e2e353c1eaf1fb045f543678e6921793 | 878 | py | Python | src/data/879.py | NULLCT/LOMC | 79a16474a8f21310e0fb47e536d527dd5dc6d655 | [
"MIT"
] | null | null | null | src/data/879.py | NULLCT/LOMC | 79a16474a8f21310e0fb47e536d527dd5dc6d655 | [
"MIT"
] | null | null | null | src/data/879.py | NULLCT/LOMC | 79a16474a8f21310e0fb47e536d527dd5dc6d655 | [
"MIT"
] | null | null | null | from sys import stdin
input = stdin.readline
from collections import deque
N, Q = map(int, input().split())
tree = [[] for _ in range(N + 1)]
level = [0] * (N + 1)
for _ in range(N - 1):
a, b = map(int, input().split())
tree[a].append(b)
tree[b].append(a)
visited = [False] * (N + 1)
def bfs(st):
glo... | 19.954545 | 45 | 0.490888 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 0.013667 |
736815ffba5524694e4bf07787408fa70f5b7ab8 | 1,614 | py | Python | objectfactory/nested.py | devinaconley/py-object-factory | 6c97821feea8c47f7ad909cedbe57938c92761aa | [
"MIT"
] | 4 | 2019-05-28T15:20:35.000Z | 2022-03-18T20:53:57.000Z | objectfactory/nested.py | devinaconley/py-object-factory | 6c97821feea8c47f7ad909cedbe57938c92761aa | [
"MIT"
] | 3 | 2019-03-17T00:27:28.000Z | 2019-12-04T16:07:11.000Z | objectfactory/nested.py | devinaconley/py-object-factory | 6c97821feea8c47f7ad909cedbe57938c92761aa | [
"MIT"
] | null | null | null | """
nested field
implements marshmallow field for objectfactory nested objects
"""
# lib
import marshmallow
# src
from .serializable import Serializable
from .factory import create
class NestedFactoryField( marshmallow.fields.Field ):
def __init__( self, field_type=None, **kwargs ):
super().__init__( ... | 26.032258 | 86 | 0.57311 | 1,427 | 0.884139 | 0 | 0 | 0 | 0 | 0 | 0 | 567 | 0.351301 |
7368bcef3513f858130a78b597825be9b12f3327 | 1,709 | py | Python | spacy/cli/__init__.py | g4brielvs/spaCy | cca8651fc8133172ebaa9d9fc438ed1fbf34fb33 | [
"BSD-3-Clause",
"MIT"
] | 2 | 2017-06-23T20:54:31.000Z | 2022-01-06T08:11:49.000Z | spacy/cli/__init__.py | g4brielvs/spaCy | cca8651fc8133172ebaa9d9fc438ed1fbf34fb33 | [
"BSD-3-Clause",
"MIT"
] | 1 | 2021-03-01T19:01:37.000Z | 2021-03-01T19:01:37.000Z | spacy/cli/__init__.py | g4brielvs/spaCy | cca8651fc8133172ebaa9d9fc438ed1fbf34fb33 | [
"BSD-3-Clause",
"MIT"
] | 1 | 2021-06-21T07:17:48.000Z | 2021-06-21T07:17:48.000Z | from wasabi import msg
from ._util import app, setup_cli # noqa: F401
# These are the actual functions, NOT the wrapped CLI commands. The CLI commands
# are registered automatically and won't have to be imported here.
from .download import download # noqa: F401
from .info import info # noqa: F401
from .package imp... | 44.973684 | 80 | 0.752487 | 0 | 0 | 0 | 0 | 432 | 0.252779 | 0 | 0 | 706 | 0.413107 |
73697b6fc24a0e06b73e768d5f059255782d3e66 | 490 | py | Python | code/example code/introducing-python-master/1st_edition/art/panda1.py | ChouHsuan-Cheng/Learning_Python_Base | 857873466463e6b20f24b1e8946c837c318f2536 | [
"CNRI-Python"
] | null | null | null | code/example code/introducing-python-master/1st_edition/art/panda1.py | ChouHsuan-Cheng/Learning_Python_Base | 857873466463e6b20f24b1e8946c837c318f2536 | [
"CNRI-Python"
] | null | null | null | code/example code/introducing-python-master/1st_edition/art/panda1.py | ChouHsuan-Cheng/Learning_Python_Base | 857873466463e6b20f24b1e8946c837c318f2536 | [
"CNRI-Python"
] | null | null | null | from direct.showbase.ShowBase import ShowBase
class MyApp(ShowBase):
def __init__(self):
ShowBase.__init__(self)
# Load the environment model.
self.environ = self.loader.loadModel("models/environment")
# Reparent the model to render.
self.environ.reparentTo(self.render)
... | 27.222222 | 66 | 0.657143 | 417 | 0.85102 | 0 | 0 | 0 | 0 | 0 | 0 | 131 | 0.267347 |
736a64ec89b619ffc454f1a8592cdcb1f2263f5a | 16,104 | py | Python | btclib/ssa.py | giubby84/btclib | 0dd7e4e8ca43451a03b577fd7ec95715a1a21711 | [
"MIT"
] | null | null | null | btclib/ssa.py | giubby84/btclib | 0dd7e4e8ca43451a03b577fd7ec95715a1a21711 | [
"MIT"
] | null | null | null | btclib/ssa.py | giubby84/btclib | 0dd7e4e8ca43451a03b577fd7ec95715a1a21711 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (C) 2017-2020 The btclib developers
#
# This file is part of btclib. It is subject to the license terms in the
# LICENSE file found in the top-level directory of this distribution.
#
# No part of btclib including this file, may be copied, modified, propagated,
# or distributed except... | 30.442344 | 88 | 0.648162 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7,060 | 0.438292 |
736b9802fb2c5a179b409bf71bdd9ff72225db52 | 998 | py | Python | 13. REST API using OpenAPI, Flask & Connexions/source_code/test-api/src/test_api/core/pets.py | Edmartt/articles | 93d62086ff141f5646193afb868973e94f33f1e6 | [
"MIT"
] | 31 | 2020-03-01T20:27:03.000Z | 2022-02-15T14:53:09.000Z | 13. REST API using OpenAPI, Flask & Connexions/source_code/test-api/src/test_api/core/pets.py | hmajid2301/articles | 27f38cc6c2dd470d879b30d54d1e804a7d76caab | [
"MIT"
] | 24 | 2020-04-04T12:18:25.000Z | 2022-03-29T08:41:57.000Z | 13. REST API using OpenAPI, Flask & Connexions/source_code/test-api/src/test_api/core/pets.py | Edmartt/articles | 93d62086ff141f5646193afb868973e94f33f1e6 | [
"MIT"
] | 52 | 2020-02-29T04:01:10.000Z | 2022-03-11T07:54:16.000Z | import json
def get_all_pets():
pets = read_from_file()
pets_in_store = []
for k, v in pets.items():
current_pet = {"id": k, **v}
pets_in_store.append(current_pet)
return pets
def remove_pet(id):
pets = read_from_file()
del pets[id]
write_to_file(pets)
def update_pet(i... | 19.96 | 77 | 0.603206 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 80 | 0.08016 |
736d59ff49e38e22e2651e066d945a62407f38ec | 73 | py | Python | CodeWars/8 Kyu/Price of Mangoes.py | anubhab-code/Competitive-Programming | de28cb7d44044b9e7d8bdb475da61e37c018ac35 | [
"MIT"
] | null | null | null | CodeWars/8 Kyu/Price of Mangoes.py | anubhab-code/Competitive-Programming | de28cb7d44044b9e7d8bdb475da61e37c018ac35 | [
"MIT"
] | null | null | null | CodeWars/8 Kyu/Price of Mangoes.py | anubhab-code/Competitive-Programming | de28cb7d44044b9e7d8bdb475da61e37c018ac35 | [
"MIT"
] | null | null | null | def mango(quantity, price):
return (quantity - quantity // 3) * price | 36.5 | 45 | 0.671233 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
736eb235587fea9084624307afb075d1bfa93603 | 5,582 | py | Python | car-number-plate.project/car number plate.py | SumanthKumarS/mrucode-car-numberplate-detection- | 46f759a5dec01ee551080db68ca250b064a25a01 | [
"Apache-2.0"
] | null | null | null | car-number-plate.project/car number plate.py | SumanthKumarS/mrucode-car-numberplate-detection- | 46f759a5dec01ee551080db68ca250b064a25a01 | [
"Apache-2.0"
] | null | null | null | car-number-plate.project/car number plate.py | SumanthKumarS/mrucode-car-numberplate-detection- | 46f759a5dec01ee551080db68ca250b064a25a01 | [
"Apache-2.0"
] | null | null | null | import matplotlib.pyplot as plt
import cv2
import imutils
import pytesseract as pt
from tkinter import *
from tkinter import messagebox
# ploting the images
def plot_img(img1, img2, title1="", title2=""):
fig = plt.figure(figsize=[5, 5])
# axis 1
ax1 = fig.add_subplot(121)
ax1.imshow(img1... | 34.45679 | 172 | 0.682551 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,966 | 0.352204 |
736ef7d551671fb41b699b2055b5a873b3f9d021 | 13,229 | py | Python | IBMWatson_Examples/WatsonNLU.py | sptennak/TextAnalytics | dde30337dc4d769ce7fb31b6f3021721bcd0b056 | [
"Apache-2.0"
] | 4 | 2018-07-11T06:58:53.000Z | 2020-09-06T13:17:54.000Z | IBMWatson_Examples/WatsonNLU.py | sptennak/TextAnalytics | dde30337dc4d769ce7fb31b6f3021721bcd0b056 | [
"Apache-2.0"
] | null | null | null | IBMWatson_Examples/WatsonNLU.py | sptennak/TextAnalytics | dde30337dc4d769ce7fb31b6f3021721bcd0b056 | [
"Apache-2.0"
] | 1 | 2020-09-06T13:18:00.000Z | 2020-09-06T13:18:00.000Z | # -*- coding: utf-8 -*-
"""
Created on Fri May 18 22:15:35 2018
@author: Sumudu Tennakoon
References:
[1] https://www.ibm.com/watson/developercloud/natural-language-understanding/api/v1/
"""
from watson_developer_cloud import NaturalLanguageUnderstandingV1, WatsonException, WatsonApiException
from watson_developer_cl... | 45.150171 | 205 | 0.595434 | 8,142 | 0.615466 | 0 | 0 | 0 | 0 | 0 | 0 | 2,918 | 0.220576 |
7370be693eff3bd55bdb03b72b2306e42f8caced | 6,813 | py | Python | invenio_drafts_resources/resources/records/resource.py | fenekku/invenio-drafts-resources | fadae86fb9b36073cef13713fbc174ef771e49ec | [
"MIT"
] | null | null | null | invenio_drafts_resources/resources/records/resource.py | fenekku/invenio-drafts-resources | fadae86fb9b36073cef13713fbc174ef771e49ec | [
"MIT"
] | null | null | null | invenio_drafts_resources/resources/records/resource.py | fenekku/invenio-drafts-resources | fadae86fb9b36073cef13713fbc174ef771e49ec | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2020 CERN.
# Copyright (C) 2020 Northwestern University.
#
# Invenio-Drafts-Resources is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see LICENSE file for more
# details.
"""Invenio Drafts Resources module to create REST APIs.""... | 31.541667 | 77 | 0.60957 | 5,932 | 0.870688 | 0 | 0 | 3,773 | 0.553794 | 0 | 0 | 1,929 | 0.283135 |
73719b129e4d31a646493cafb373317395215b7e | 56,465 | py | Python | pyscreener/preprocessing/gypsum_dl/Steps/SMILES/dimorphite_dl/dimorphite_dl.py | futianfan/pyscreener | 15cce4ca8002ba083254aefa716d0e9c3ef00dba | [
"MIT"
] | 28 | 2020-12-11T22:10:16.000Z | 2022-02-25T05:00:51.000Z | molpal/objectives/pyscreener/preprocessing/gypsum_dl/Steps/SMILES/dimorphite_dl/dimorphite_dl.py | ashuein/molpal | 1e17a0c406516ceaeaf273a6983d06206bcfe76f | [
"MIT"
] | 3 | 2021-09-17T14:14:53.000Z | 2021-09-23T11:04:10.000Z | molpal/objectives/pyscreener/preprocessing/gypsum_dl/Steps/SMILES/dimorphite_dl/dimorphite_dl.py | ashuein/molpal | 1e17a0c406516ceaeaf273a6983d06206bcfe76f | [
"MIT"
] | 9 | 2021-03-03T12:10:10.000Z | 2022-02-15T06:53:11.000Z | # Copyright 2020 Jacob D. Durrant
#
# 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 writ... | 38.860977 | 209 | 0.535819 | 49,526 | 0.87711 | 0 | 0 | 36,872 | 0.653006 | 0 | 0 | 26,647 | 0.471921 |
73722b13a366409a78c447bdbc55cbb010f2c490 | 568 | py | Python | src/visuanalytics/tests/analytics/transform/transform_test_helper.py | mxsph/Data-Analytics | c82ff54b78f50b6660d7640bfee96ea68bef598f | [
"MIT"
] | 3 | 2020-08-24T19:02:09.000Z | 2021-05-27T20:22:41.000Z | src/visuanalytics/tests/analytics/transform/transform_test_helper.py | mxsph/Data-Analytics | c82ff54b78f50b6660d7640bfee96ea68bef598f | [
"MIT"
] | 342 | 2020-08-13T10:24:23.000Z | 2021-08-12T14:01:52.000Z | src/visuanalytics/tests/analytics/transform/transform_test_helper.py | visuanalytics/visuanalytics | f9cce7bc9e3227568939648ddd1dd6df02eac752 | [
"MIT"
] | 8 | 2020-09-01T07:11:18.000Z | 2021-04-09T09:02:11.000Z | from visuanalytics.analytics.control.procedures.step_data import StepData
from visuanalytics.analytics.transform.transform import transform
def prepare_test(values: list, data, expected_data: dict, config=None):
if config is None:
config = {}
step_data = StepData(config, "0", 0)
step_data.insert_... | 29.894737 | 73 | 0.721831 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 74 | 0.130282 |
737252b8db4b5f48d4c98ee3b57ca3749e94a02f | 693 | py | Python | configs/diseased/resnet50_cancer_adddata.py | jiangwenj02/mmclassification | 4c3657c16f370ace9013b160aa054c87fd27a055 | [
"Apache-2.0"
] | null | null | null | configs/diseased/resnet50_cancer_adddata.py | jiangwenj02/mmclassification | 4c3657c16f370ace9013b160aa054c87fd27a055 | [
"Apache-2.0"
] | null | null | null | configs/diseased/resnet50_cancer_adddata.py | jiangwenj02/mmclassification | 4c3657c16f370ace9013b160aa054c87fd27a055 | [
"Apache-2.0"
] | null | null | null | _base_ = [
'../_base_/models/resnet50.py', '../_base_/datasets/cancer_bs32_pil_resize.py',
'../_base_/schedules/imagenet_bs256_coslr.py', '../_base_/default_runtime.py'
]
model = dict(
head=dict(
num_classes=2,
topk=(1,))
)
data = dict(
train=dict(
data_prefix='/data3/zzhang/tmp... | 34.65 | 121 | 0.689755 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 382 | 0.551227 |
7373df1f357495c213b36ad2e30241e90eab5f96 | 4,907 | py | Python | polyaxon/scheduler/dockerizer_scheduler.py | vfdev-5/polyaxon | 3e1511a993dc1a03e0a0827de0357f4adcc0015f | [
"MIT"
] | null | null | null | polyaxon/scheduler/dockerizer_scheduler.py | vfdev-5/polyaxon | 3e1511a993dc1a03e0a0827de0357f4adcc0015f | [
"MIT"
] | null | null | null | polyaxon/scheduler/dockerizer_scheduler.py | vfdev-5/polyaxon | 3e1511a993dc1a03e0a0827de0357f4adcc0015f | [
"MIT"
] | null | null | null | import logging
import traceback
from kubernetes.client.rest import ApiException
from django.conf import settings
import auditor
from constants.jobs import JobLifeCycle
from db.models.build_jobs import BuildJob
from docker_images.image_info import get_tagged_image
from event_manager.events.build_job import BUILD_JOB... | 34.801418 | 99 | 0.648665 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,022 | 0.208274 |
737528bac9620b8ee07a8513acd084d73b0adc0c | 9,587 | py | Python | test/test_pyini.py | limodou/uliweb3 | 560fe818047c8ee8b4b775e714d9c637f0d23651 | [
"BSD-2-Clause"
] | 16 | 2018-09-12T02:50:28.000Z | 2021-08-20T08:38:31.000Z | test/test_pyini.py | limodou/uliweb3 | 560fe818047c8ee8b4b775e714d9c637f0d23651 | [
"BSD-2-Clause"
] | 21 | 2018-11-29T06:41:08.000Z | 2022-01-18T13:27:38.000Z | test/test_pyini.py | limodou/uliweb3 | 560fe818047c8ee8b4b775e714d9c637f0d23651 | [
"BSD-2-Clause"
] | 1 | 2018-10-08T10:02:56.000Z | 2018-10-08T10:02:56.000Z | #coding=utf8
from uliweb.utils.pyini import *
def test_sorteddict():
"""
>>> d = SortedDict()
>>> d
<SortedDict {}>
>>> d.name = 'limodou'
>>> d['class'] = 'py'
>>> d
<SortedDict {'class':'py', 'name':'limodou'}>
>>> d.keys()
['name', 'class']
>>> d.values()
['limodou', ... | 22.295349 | 93 | 0.456973 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9,178 | 0.951384 |
7375e7557e967afa603dac5a97005866394c65de | 797 | py | Python | src/game.py | cwainwright/think-inside-the-box | dd537e72229a42f8f5f7074151799d3b07dfdfbd | [
"MIT"
] | null | null | null | src/game.py | cwainwright/think-inside-the-box | dd537e72229a42f8f5f7074151799d3b07dfdfbd | [
"MIT"
] | null | null | null | src/game.py | cwainwright/think-inside-the-box | dd537e72229a42f8f5f7074151799d3b07dfdfbd | [
"MIT"
] | null | null | null | import threading
from queue import Queue
from blessed import Terminal
FPS = 60
class Game:
"""The top level class for the game"""
def __init__(self, manager_cls: type):
self.manager_cls = manager_cls
def run(self) -> None:
"""The run method for the game, handling the TUI"""
ter... | 24.90625 | 82 | 0.595985 | 713 | 0.894605 | 0 | 0 | 0 | 0 | 0 | 0 | 91 | 0.114178 |
73760d51c39df213af720ac9a7cf8ca846fad61d | 1,366 | py | Python | alice_scripts/skill.py | borzunov/alice_scripts | db4cd08226ae5429ec8083ffedc0edef8b44adeb | [
"MIT"
] | 27 | 2018-07-30T19:35:17.000Z | 2021-09-12T18:18:22.000Z | alice_scripts/skill.py | borzunov/alice_scripts | db4cd08226ae5429ec8083ffedc0edef8b44adeb | [
"MIT"
] | 2 | 2018-11-01T09:49:48.000Z | 2020-12-17T13:39:23.000Z | alice_scripts/skill.py | borzunov/alice_scripts | db4cd08226ae5429ec8083ffedc0edef8b44adeb | [
"MIT"
] | 7 | 2018-10-24T18:39:30.000Z | 2021-11-25T13:55:41.000Z | import logging
import threading
import flask
from .requests import Request
__all__ = ['Skill']
class Skill(flask.Flask):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self._sessions = {}
self._session_lock = threading.RLock()
def script(self, generator):
... | 26.784314 | 64 | 0.572474 | 1,264 | 0.925329 | 0 | 0 | 518 | 0.379209 | 0 | 0 | 123 | 0.090044 |
737c8fcb95ea540c79cfba48d2fa31a9bd9f57a9 | 1,227 | py | Python | src/main/fileextractors/fileextractor.py | michael-stanin/Subtitles-Distributor | e4638d952235f96276729239596dc31d9ccc2ee1 | [
"MIT"
] | 1 | 2017-06-03T19:42:05.000Z | 2017-06-03T19:42:05.000Z | src/main/fileextractors/fileextractor.py | michael-stanin/Subtitles-Distributor | e4638d952235f96276729239596dc31d9ccc2ee1 | [
"MIT"
] | null | null | null | src/main/fileextractors/fileextractor.py | michael-stanin/Subtitles-Distributor | e4638d952235f96276729239596dc31d9ccc2ee1 | [
"MIT"
] | null | null | null | import logging
from main.fileextractors.compressedfile import get_compressed_file
from main.utilities.fileutils import dir_path
from main.utilities.subtitlesadjuster import ArchiveAdjuster
class FileExtractor:
def __init__(self, subname, movfile):
self.sn, self.mn = subname, movfile
self.subzip = ... | 35.057143 | 111 | 0.673187 | 1,035 | 0.843521 | 0 | 0 | 0 | 0 | 0 | 0 | 94 | 0.07661 |
7380bfdbf0d2f900bab496e56a02fad07f1e4ac8 | 476 | py | Python | cjson/body.py | tslight/cjson | 1ab08400347e5ff33d3efd9e9879a54a9066a80c | [
"0BSD"
] | null | null | null | cjson/body.py | tslight/cjson | 1ab08400347e5ff33d3efd9e9879a54a9066a80c | [
"0BSD"
] | null | null | null | cjson/body.py | tslight/cjson | 1ab08400347e5ff33d3efd9e9879a54a9066a80c | [
"0BSD"
] | null | null | null | import curses
from get_json import get_json
def body(screen):
div = curses.newwin(curses.LINES - 2, curses.COLS, 1, 0)
div.box() # draw border around container window
# use a sub-window so we don't clobber the the container window's border.
txt = div.subwin(curses.LINES - 5, curses.COLS - 4, 2, 2)
... | 29.75 | 77 | 0.684874 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 169 | 0.355042 |
7382da4a97a03a9bab8ad1771db18f2352be8d95 | 5,518 | py | Python | SDis_Self-Training/plotting/createScatterPlot.py | mgeorgati/DasymetricMapping | d87b97a076cca3e03286c6b27b118904e03315c0 | [
"BSD-3-Clause"
] | null | null | null | SDis_Self-Training/plotting/createScatterPlot.py | mgeorgati/DasymetricMapping | d87b97a076cca3e03286c6b27b118904e03315c0 | [
"BSD-3-Clause"
] | null | null | null | SDis_Self-Training/plotting/createScatterPlot.py | mgeorgati/DasymetricMapping | d87b97a076cca3e03286c6b27b118904e03315c0 | [
"BSD-3-Clause"
] | null | null | null | import sys, os, seaborn as sns, rasterio, pandas as pd
import numpy as np
import matplotlib.pyplot as plt
sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
from config.definitions import ROOT_DIR, ancillary_path, city,year
attr_value ="totalpop"
gtP = ROOT_DIR + "/Evaluation/{0}_groundT... | 66.481928 | 237 | 0.702791 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,983 | 0.540594 |
7382ea8531ce700712937018018e99ffb94c7c1d | 562 | py | Python | codepack/service/delivery_service/delivery_service.py | ihnokim/codepack | 9d043b2db977de503faf7f5f1370c1424c6cb19f | [
"MIT"
] | 2 | 2021-04-18T17:51:49.000Z | 2021-06-22T10:21:30.000Z | codepack/service/delivery_service/delivery_service.py | ihnokim/codepack | 9d043b2db977de503faf7f5f1370c1424c6cb19f | [
"MIT"
] | 24 | 2021-12-23T18:02:01.000Z | 2022-03-27T03:03:38.000Z | codepack/service/delivery_service/delivery_service.py | ihnokim/codepack | 9d043b2db977de503faf7f5f1370c1424c6cb19f | [
"MIT"
] | 1 | 2021-09-13T12:56:40.000Z | 2021-09-13T12:56:40.000Z | import abc
from codepack.service.service import Service
class DeliveryService(Service, metaclass=abc.ABCMeta):
def __init__(self):
super().__init__()
@abc.abstractmethod
def send(self, id, serial_number, item=None, timestamp=None):
"""send item"""
@abc.abstractmethod
def receive(... | 23.416667 | 65 | 0.658363 | 503 | 0.895018 | 0 | 0 | 374 | 0.66548 | 0 | 0 | 85 | 0.151246 |
7386b0f7b4c54bd5b874bd75d2eaef2e32ff4344 | 23,056 | py | Python | nengo/tests/test_learning_rules.py | pedrombmachado/nengo | abc85e1a75ce2f980e19eef195d98081f95efd28 | [
"BSD-2-Clause"
] | null | null | null | nengo/tests/test_learning_rules.py | pedrombmachado/nengo | abc85e1a75ce2f980e19eef195d98081f95efd28 | [
"BSD-2-Clause"
] | null | null | null | nengo/tests/test_learning_rules.py | pedrombmachado/nengo | abc85e1a75ce2f980e19eef195d98081f95efd28 | [
"BSD-2-Clause"
] | null | null | null | import numpy as np
import pytest
import nengo
from nengo.builder import Builder
from nengo.builder.operator import Reset, Copy
from nengo.builder.signal import Signal
from nengo.dists import UniformHypersphere
from nengo.exceptions import ValidationError
from nengo.learning_rules import LearningRuleTypeParam, PES, BCM... | 33.126437 | 88 | 0.627906 | 226 | 0.009802 | 0 | 0 | 6,866 | 0.297797 | 0 | 0 | 2,910 | 0.126214 |
7387856755f04e2fce184f38847164fa54bfabcd | 922 | py | Python | joplin_web/api.py | foxmask/joplin-web | eb261e515b9ecf9c878a1d6492aba06ddf6d97c6 | [
"BSD-3-Clause"
] | 382 | 2018-08-20T07:51:11.000Z | 2022-03-11T14:52:53.000Z | joplin_web/api.py | marph91/joplin-web | eb261e515b9ecf9c878a1d6492aba06ddf6d97c6 | [
"BSD-3-Clause"
] | 71 | 2018-10-01T07:01:20.000Z | 2022-02-22T07:17:47.000Z | joplin_web/api.py | marph91/joplin-web | eb261e515b9ecf9c878a1d6492aba06ddf6d97c6 | [
"BSD-3-Clause"
] | 67 | 2018-10-01T07:09:50.000Z | 2022-03-19T09:30:09.000Z | # coding: utf-8
"""
joplin-web
"""
from django.conf import settings
from django.http.response import JsonResponse
from django.urls import reverse
from joplin_api import JoplinApiSync
from joplin_web.utils import nb_notes_by_tag, nb_notes_by_folder
import logging
from rich import console
console = console.Console()
... | 24.918919 | 64 | 0.729935 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 134 | 0.145336 |
738921989a2bdec68647069a9b524b0c70e83266 | 1,449 | py | Python | blousebrothers/confs/management/commands/update_stats.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | 1 | 2022-01-27T11:58:10.000Z | 2022-01-27T11:58:10.000Z | blousebrothers/confs/management/commands/update_stats.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | 5 | 2021-03-19T00:01:54.000Z | 2022-03-11T23:46:21.000Z | blousebrothers/confs/management/commands/update_stats.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | null | null | null | import numpy as np
from django.core.management.base import BaseCommand
from oscar.core.loading import get_classes
StatsSpe, StatsItem, Test, Speciality, Item, Conference = get_classes(
'confs.models',
(
"StatsSpe", "StatsItem", "Test", "Speciality", "Item", "Conference"
)
)
class Command(BaseCo... | 32.2 | 93 | 0.569358 | 1,148 | 0.792271 | 0 | 0 | 0 | 0 | 0 | 0 | 120 | 0.082816 |
738989c5716d2f2f6127adc48d74596868c20221 | 6,403 | py | Python | ssd_project/functions/multiboxloss.py | ilijagjorgjiev/SSD_FascadeParsing | a31346a3828f3bda9687a9013a40389dab446cef | [
"MIT"
] | 1 | 2020-09-27T03:57:18.000Z | 2020-09-27T03:57:18.000Z | ssd_project/functions/multiboxloss.py | ilijagjorgjiev/SSD_FascadeParsing | a31346a3828f3bda9687a9013a40389dab446cef | [
"MIT"
] | null | null | null | ssd_project/functions/multiboxloss.py | ilijagjorgjiev/SSD_FascadeParsing | a31346a3828f3bda9687a9013a40389dab446cef | [
"MIT"
] | null | null | null | import torch
import torch.nn as nn
import torch.nn.functional as F
from math import sqrt as sqrt
import collections
import numpy as np
import itertools
from ssd_project.utils.utils import *
from ssd_project.utils.global_variables import *
device = DEVICE
class MultiBoxLoss(nn.Module):
"""
For our SSD we use a ... | 45.091549 | 135 | 0.687178 | 6,146 | 0.959863 | 0 | 0 | 0 | 0 | 0 | 0 | 2,774 | 0.433234 |
73899046274e7f34b8512a7c9032b640315aef48 | 1,574 | py | Python | glitter2/tests/app.py | matham/glitter2 | ebede5a18edb1b2e34f1824e4262d01a148cf2f3 | [
"MIT"
] | null | null | null | glitter2/tests/app.py | matham/glitter2 | ebede5a18edb1b2e34f1824e4262d01a148cf2f3 | [
"MIT"
] | null | null | null | glitter2/tests/app.py | matham/glitter2 | ebede5a18edb1b2e34f1824e4262d01a148cf2f3 | [
"MIT"
] | null | null | null | import trio
from kivy.config import Config
Config.set('graphics', 'width', '1600')
Config.set('graphics', 'height', '900')
Config.set('modules', 'touchring', '')
for items in Config.items('input'):
Config.remove_option('input', items[0])
from glitter2.main import Glitter2App
from kivy.tests.async_common import U... | 28.107143 | 74 | 0.606734 | 985 | 0.625794 | 0 | 0 | 0 | 0 | 265 | 0.168361 | 138 | 0.087675 |
738a30149882a96a75590cfa02fa03b482ae6233 | 589 | py | Python | Gateway/WSService/Controller.py | reability/BruteScanner | bc352ec93c672f4743cf34d37e3e580bf07a7a73 | [
"MIT"
] | null | null | null | Gateway/WSService/Controller.py | reability/BruteScanner | bc352ec93c672f4743cf34d37e3e580bf07a7a73 | [
"MIT"
] | null | null | null | Gateway/WSService/Controller.py | reability/BruteScanner | bc352ec93c672f4743cf34d37e3e580bf07a7a73 | [
"MIT"
] | null | null | null | from aiohttp import web
from aiohttp import WSMsgType
from Settings import log
class WebSocket(web.View):
async def get(self):
ws = web.WebSocketResponse()
await ws.prepare(self.request)
self.request.app['websockets'].append(ws)
async for msg in ws:
if msg.type == WS... | 25.608696 | 84 | 0.59253 | 506 | 0.859083 | 0 | 0 | 0 | 0 | 475 | 0.806452 | 71 | 0.120543 |
738a85e82da68aa322a25cf87d2adf64e784db74 | 2,056 | py | Python | data/kbqa/parse_kbqa.py | UKPLab/TWEAC-qa-agent-selection | ed4f0cafa87aefd4820cca0d7f4881d2de99a9f0 | [
"MIT"
] | 9 | 2021-04-16T12:45:45.000Z | 2022-01-29T10:52:52.000Z | data/kbqa/parse_kbqa.py | UKPLab/TWEAC-qa-agent-selection | ed4f0cafa87aefd4820cca0d7f4881d2de99a9f0 | [
"MIT"
] | 1 | 2021-11-25T04:16:25.000Z | 2021-11-25T09:54:29.000Z | data/kbqa/parse_kbqa.py | UKPLab/TWEAC-qa-agent-selection | ed4f0cafa87aefd4820cca0d7f4881d2de99a9f0 | [
"MIT"
] | 3 | 2021-04-16T12:43:41.000Z | 2021-11-25T04:21:43.000Z | import json
import os
def qald(in_folder, out_folder):
train = json.load(open(os.path.join(in_folder, "qald-7-train-en-wikidata.json")))
test = json.load(open(os.path.join(in_folder, "qald-7-test-en-wikidata-withoutanswers.json")))
train_q = []
test_q = []
for qs in train["questions"]:
fo... | 38.792453 | 170 | 0.634728 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 636 | 0.309339 |
738b1d73ae1addd61c4193601b402b8a17cc0fd6 | 1,112 | py | Python | flink_rest_client/common.py | frego-dev/flink-rest-client | e63e3bc4e6ec73a1a86adb3bfbc011087a5248bd | [
"MIT"
] | null | null | null | flink_rest_client/common.py | frego-dev/flink-rest-client | e63e3bc4e6ec73a1a86adb3bfbc011087a5248bd | [
"MIT"
] | null | null | null | flink_rest_client/common.py | frego-dev/flink-rest-client | e63e3bc4e6ec73a1a86adb3bfbc011087a5248bd | [
"MIT"
] | null | null | null | import requests
class RestException(Exception):
"""
Exception to catch REST API related exceptions.
"""
def __init__(self, *args: object) -> None:
super().__init__(*args)
def _execute_rest_request(
url,
http_method=None,
accepted_status_code=None,
files=None,
params=None... | 24.173913 | 85 | 0.610612 | 179 | 0.160971 | 0 | 0 | 0 | 0 | 0 | 0 | 210 | 0.188849 |
738bc5924597cda0fc1b0821b35e4dee0b3c08ce | 9,696 | py | Python | functions.py | emiliozamorano15/arvato-udacity-capstone | ce550eebefbf13cebacfe111134b0391a73789a4 | [
"MIT"
] | null | null | null | functions.py | emiliozamorano15/arvato-udacity-capstone | ce550eebefbf13cebacfe111134b0391a73789a4 | [
"MIT"
] | null | null | null | functions.py | emiliozamorano15/arvato-udacity-capstone | ce550eebefbf13cebacfe111134b0391a73789a4 | [
"MIT"
] | null | null | null | import pandas as pd
import numpy as np
def missing_dict(df):
'''
Function to build a dictionary of indicators of missing information per feature
INPUT:
df: pandas dataframe with features, description, and values that mean "unknown"
OUPUT:
missing_dict: dictionary of values for "unkwon" pe... | 34.261484 | 102 | 0.653465 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,116 | 0.52764 |
738c97be8d45d5cf7a790774eb0b1a71db20018a | 1,133 | py | Python | PYTHON_POO/AFmain.py | davihonorato/Curso-python | 47e6b4b2f5b37ef520b8b31d37dba0b5d259a0b0 | [
"MIT"
] | null | null | null | PYTHON_POO/AFmain.py | davihonorato/Curso-python | 47e6b4b2f5b37ef520b8b31d37dba0b5d259a0b0 | [
"MIT"
] | null | null | null | PYTHON_POO/AFmain.py | davihonorato/Curso-python | 47e6b4b2f5b37ef520b8b31d37dba0b5d259a0b0 | [
"MIT"
] | null | null | null | # Criar uma base de dados. O usuário pode adicionar, excluir e listar clientes (que possuem id e nome).
# *utilizar encapsulamento.
class Clientes:
def __init__(self):
self.__lista = {} # Recomenda-se estritamente não modificar essa variável
def adicionar_cliente(self, id, nome):
if 'cliente... | 32.371429 | 103 | 0.66902 | 633 | 0.555263 | 0 | 0 | 0 | 0 | 0 | 0 | 440 | 0.385965 |
738d10783ee6f1c6ba70fb6d0517987a990ac096 | 2,321 | py | Python | env/lib/python3.4/site-packages/jsonrpc/tests/test_utils.py | Organizational-Proof-Of-Work/clearinghoused_build | 7bab4ccb516015913bad41cfdc9eb15d3fbfcaf4 | [
"MIT"
] | null | null | null | env/lib/python3.4/site-packages/jsonrpc/tests/test_utils.py | Organizational-Proof-Of-Work/clearinghoused_build | 7bab4ccb516015913bad41cfdc9eb15d3fbfcaf4 | [
"MIT"
] | null | null | null | env/lib/python3.4/site-packages/jsonrpc/tests/test_utils.py | Organizational-Proof-Of-Work/clearinghoused_build | 7bab4ccb516015913bad41cfdc9eb15d3fbfcaf4 | [
"MIT"
] | null | null | null | """ Test utility functionality."""
import datetime
import decimal
import json
import sys
if sys.version_info < (2, 7):
import unittest2 as unittest
else:
import unittest
from mock import patch
from ..utils import JSONSerializable, DatetimeDecimalEncoder
class TestJSONSerializable(unittest.TestCase):
""... | 26.078652 | 77 | 0.635502 | 2,051 | 0.883671 | 0 | 0 | 58 | 0.024989 | 0 | 0 | 216 | 0.093063 |
738d3ae3312a3ea39b2dd401e3c5ee88d3d77ab6 | 18,859 | py | Python | 264_nth_ugly_number.py | gengwg/leetcode | 0af5256ec98149ef5863f3bba78ed1e749650f6e | [
"Apache-2.0"
] | 2 | 2018-04-24T19:17:40.000Z | 2018-04-24T19:33:52.000Z | 264_nth_ugly_number.py | gengwg/leetcode | 0af5256ec98149ef5863f3bba78ed1e749650f6e | [
"Apache-2.0"
] | null | null | null | 264_nth_ugly_number.py | gengwg/leetcode | 0af5256ec98149ef5863f3bba78ed1e749650f6e | [
"Apache-2.0"
] | 3 | 2020-06-17T05:48:52.000Z | 2021-01-02T06:08:25.000Z | # 264. Ugly Number II
#
# Write a program to check whether a given number is an ugly number.
#
# Ugly numbers are positive numbers whose prime factors only include
# 2, 3, 5. For example, 6, 8 are ugly while 14 is not ugly since it
# includes another prime factor 7.
#
# Note that 1 is typically treated as an ugly numbe... | 162.577586 | 15,773 | 0.74198 | 18,823 | 0.972815 | 0 | 0 | 0 | 0 | 0 | 0 | 1,871 | 0.096698 |
7391ce7ef2ad24d97f65315f42ffbecced2389a8 | 3,563 | py | Python | neutron/db/migration/alembic_migrations/versions/14be42f3d0a5_default_sec_group_table.py | osic-neutron/neutron-ipcapacity | 678cbadb0be57203e0cc4c493082d2d54afc7c17 | [
"Apache-2.0"
] | 1 | 2019-01-13T04:42:21.000Z | 2019-01-13T04:42:21.000Z | neutron/db/migration/alembic_migrations/versions/14be42f3d0a5_default_sec_group_table.py | osic-neutron/neutron-ipcapacity | 678cbadb0be57203e0cc4c493082d2d54afc7c17 | [
"Apache-2.0"
] | null | null | null | neutron/db/migration/alembic_migrations/versions/14be42f3d0a5_default_sec_group_table.py | osic-neutron/neutron-ipcapacity | 678cbadb0be57203e0cc4c493082d2d54afc7c17 | [
"Apache-2.0"
] | null | null | null | # Copyright 2015 OpenStack Foundation
#
# 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 ... | 37.114583 | 78 | 0.634858 | 288 | 0.080831 | 0 | 0 | 0 | 0 | 0 | 0 | 1,358 | 0.381139 |
739221f14ebd9dfa18ce38c36afe1cd0d2d397f6 | 2,126 | py | Python | coredis/response/callbacks/script.py | alisaifee/aredis | c5764a5a2a29c4ed25278548aa54eece94974440 | [
"MIT"
] | null | null | null | coredis/response/callbacks/script.py | alisaifee/aredis | c5764a5a2a29c4ed25278548aa54eece94974440 | [
"MIT"
] | null | null | null | coredis/response/callbacks/script.py | alisaifee/aredis | c5764a5a2a29c4ed25278548aa54eece94974440 | [
"MIT"
] | null | null | null | from __future__ import annotations
from coredis.response.callbacks import ResponseCallback
from coredis.response.types import LibraryDefinition
from coredis.response.utils import flat_pairs_to_dict
from coredis.typing import Any, AnyStr, Mapping, Union
from coredis.utils import EncodingInsensitiveDict
class Function... | 40.884615 | 88 | 0.629351 | 1,816 | 0.854186 | 0 | 0 | 0 | 0 | 0 | 0 | 157 | 0.073848 |
7393a024a0f2a49dd9e4ca3dcf823461e29e512f | 885 | py | Python | controllers/editor.py | matumaros/BomberApe | d71616192fd54d9a595261c258e4c7367d2eac5d | [
"Apache-2.0"
] | null | null | null | controllers/editor.py | matumaros/BomberApe | d71616192fd54d9a595261c258e4c7367d2eac5d | [
"Apache-2.0"
] | null | null | null | controllers/editor.py | matumaros/BomberApe | d71616192fd54d9a595261c258e4c7367d2eac5d | [
"Apache-2.0"
] | null | null | null |
from models.tilemap import TileMap
class EditorController:
def __init__(self, view):
self.view = view
self.tilemap = TileMap()
def place_tile(self, coord, ttype):
self.tilemap.add_tile(coord, ttype)
self.view.board.update_tiles({coord: ttype})
def place_spawn(self, coor... | 26.029412 | 58 | 0.632768 | 845 | 0.954802 | 0 | 0 | 0 | 0 | 0 | 0 | 35 | 0.039548 |
739647d67e5d34152efe879eebab2aba747ceb26 | 815 | py | Python | src/Pages/LoginPage.py | Artem0791/Hackathon18_09 | 15f7e6c14264a574dc3efc42c5edd03e39b8dab8 | [
"MIT"
] | 1 | 2021-09-17T18:26:33.000Z | 2021-09-17T18:26:33.000Z | src/Pages/LoginPage.py | Artem0791/Hackathon18_09 | 15f7e6c14264a574dc3efc42c5edd03e39b8dab8 | [
"MIT"
] | null | null | null | src/Pages/LoginPage.py | Artem0791/Hackathon18_09 | 15f7e6c14264a574dc3efc42c5edd03e39b8dab8 | [
"MIT"
] | 3 | 2021-09-18T10:06:32.000Z | 2021-09-18T20:50:29.000Z | from .BasePage import BasePage
from src.Locators import LoginPage
from src.Services.Faker.FakeDataGenerator import DataGenerator
class Login(BasePage):
def create_account(self):
data = DataGenerator()
self.select(LoginPage.CreateCustomer.title, 'Mr.')
self.input(LoginPage.CreateCustomer.fi... | 40.75 | 74 | 0.75092 | 681 | 0.835583 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 0.033129 |
7398394632b763b7e8c94ec433a660e60ba8425e | 2,777 | py | Python | setup.py | willamm/dragonchain | c3a619e452b6256920ed15ccf5e5263a33dc33e1 | [
"Apache-2.0"
] | 3 | 2017-10-24T23:12:58.000Z | 2017-10-24T23:15:28.000Z | setup.py | willamm/dragonchain | c3a619e452b6256920ed15ccf5e5263a33dc33e1 | [
"Apache-2.0"
] | null | null | null | setup.py | willamm/dragonchain | c3a619e452b6256920ed15ccf5e5263a33dc33e1 | [
"Apache-2.0"
] | 1 | 2018-01-23T00:32:05.000Z | 2018-01-23T00:32:05.000Z | """
Copyright 2016 Disney Connected and Advanced Technologies
Licensed under the Apache License, Version 2.0 (the "Apache License")
with the following modification; you may not use this file except in
compliance with the Apache License and the following modification to it:
Section 6. Trademarks. is deleted and replace... | 38.041096 | 117 | 0.687432 | 902 | 0.324811 | 0 | 0 | 0 | 0 | 0 | 0 | 1,637 | 0.589485 |