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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
45156df577791ff159e318cbc3c7550a59d3c192 | 2,968 | py | Python | src/slack/slack_json_factories/dialog_json/comment.py | yejingyu/jama-slack-integration | 55d1366d6cde3962e788afebe0001747cbe11fe8 | [
"MIT"
] | 1 | 2019-07-30T01:41:53.000Z | 2019-07-30T01:41:53.000Z | src/slack/slack_json_factories/dialog_json/comment.py | yejingyu/jama-slack-integration | 55d1366d6cde3962e788afebe0001747cbe11fe8 | [
"MIT"
] | 4 | 2018-11-16T05:56:06.000Z | 2018-11-29T05:07:52.000Z | src/slack/slack_json_factories/dialog_json/comment.py | yejingyu/jama-slack-integration | 55d1366d6cde3962e788afebe0001747cbe11fe8 | [
"MIT"
] | 6 | 2018-11-08T03:49:28.000Z | 2019-04-29T19:53:25.000Z | def comment_dialog(data=None):
"""
Function takes in a JSON object, and uses the following format:
https://api.slack.com/dialogs
Returns created JSON object, then is sent back to Slack.
"""
text = ""
state = ""
project_holder = None
item_holder = None
if data is not None:
... | 34.511628 | 78 | 0.412062 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,172 | 0.394879 |
45168a0a61e3273b57493bda1e9d073423e6c698 | 8,105 | py | Python | tests/hahm/test_config_flow.py | Voxxie/custom_homematic | d199f1fcc565febe42e686198a9eb33ef4d755f6 | [
"MIT"
] | null | null | null | tests/hahm/test_config_flow.py | Voxxie/custom_homematic | d199f1fcc565febe42e686198a9eb33ef4d755f6 | [
"MIT"
] | null | null | null | tests/hahm/test_config_flow.py | Voxxie/custom_homematic | d199f1fcc565febe42e686198a9eb33ef4d755f6 | [
"MIT"
] | null | null | null | """Test the HaHomematic config flow."""
from typing import Any
from unittest.mock import patch
from homeassistant import config_entries
from homeassistant.components.hahm.config_flow import (
ATTR_BICDOS_RF_ENABLED,
ATTR_BICDOS_RF_PORT,
ATTR_HMIP_RF_ENABLED,
ATTR_HOST,
ATTR_HS485D_ENABLED,
ATTR... | 33.217213 | 84 | 0.664405 | 0 | 0 | 0 | 0 | 0 | 0 | 7,214 | 0.890068 | 1,099 | 0.135595 |
451695e3856e2d5dd4a42abbf9ad2c012826eaed | 792 | py | Python | komapy/decorators.py | bpptkg/komapy | a33fce5f4fbfacf085fd1f8043a57564be192a8d | [
"MIT"
] | null | null | null | komapy/decorators.py | bpptkg/komapy | a33fce5f4fbfacf085fd1f8043a57564be192a8d | [
"MIT"
] | null | null | null | komapy/decorators.py | bpptkg/komapy | a33fce5f4fbfacf085fd1f8043a57564be192a8d | [
"MIT"
] | null | null | null | from functools import partial
class counter:
"""
A counter decorator to track how many times a function is called.
"""
def __init__(self, func):
self.func = func
self.count = 0
def __call__(self, *args, **kwargs):
self.count += 1
return self.func(*args, **kwargs)
... | 26.4 | 78 | 0.616162 | 287 | 0.362374 | 0 | 0 | 0 | 0 | 0 | 0 | 309 | 0.390152 |
4516fa710b28e684423724f2bca16759c34404c0 | 5,883 | py | Python | Applications/Examples/python/market_price_authentication.py | Refinitiv/websocket-api | 15a5957510d2bb246cbbf65ed999ff0089b3a65d | [
"Apache-2.0"
] | 36 | 2019-01-08T17:43:38.000Z | 2022-03-11T21:59:58.000Z | Applications/Examples/python/market_price_authentication.py | thomsonreuters/websocket-api | 52c940a01d40a6c073d35922d8214d927327caa4 | [
"Apache-2.0"
] | 14 | 2019-12-27T15:58:12.000Z | 2021-11-03T21:39:27.000Z | Applications/Examples/python/market_price_authentication.py | thomsonreuters/websocket-api | 52c940a01d40a6c073d35922d8214d927327caa4 | [
"Apache-2.0"
] | 28 | 2019-01-22T21:43:15.000Z | 2022-03-29T11:43:05.000Z | #|-----------------------------------------------------------------------------
#| This source code is provided under the Apache 2.0 license --
#| and is provided AS IS with no warranty or guarantee of fit for purpose. --
#| See the project's LICENSE.md for details. --
... | 34.810651 | 235 | 0.590345 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,269 | 0.385688 |
4517ac136f86ccb5533a40509e2b215d308bd04d | 571 | py | Python | cardDao.py | Blueredemption/Inventory | 8d61671071f89b51b3e34c5eb673200fc8baffc0 | [
"MIT"
] | null | null | null | cardDao.py | Blueredemption/Inventory | 8d61671071f89b51b3e34c5eb673200fc8baffc0 | [
"MIT"
] | null | null | null | cardDao.py | Blueredemption/Inventory | 8d61671071f89b51b3e34c5eb673200fc8baffc0 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
class CardDao():
def __init__(self): # constructor
super().__init__()
self.create()
self.return()
self.update()
self.delete()
self.populate()
def create(self): # there will be create for cards
print('Create')
def return(... | 16.794118 | 54 | 0.528897 | 473 | 0.828371 | 0 | 0 | 0 | 0 | 0 | 0 | 113 | 0.197898 |
451838fb8b3acc8747399824b9d60c1c29d67e5c | 3,416 | py | Python | test_kmethods.py | quinlan-lab/kmertools | 93e90919c26e2fc899a905b77748857404389e13 | [
"MIT"
] | 1 | 2020-08-25T01:35:38.000Z | 2020-08-25T01:35:38.000Z | test_kmethods.py | quinlan-lab/kmertools | 93e90919c26e2fc899a905b77748857404389e13 | [
"MIT"
] | null | null | null | test_kmethods.py | quinlan-lab/kmertools | 93e90919c26e2fc899a905b77748857404389e13 | [
"MIT"
] | 1 | 2021-07-13T23:21:56.000Z | 2021-07-13T23:21:56.000Z | from unittest import TestCase
from eskedit.kmethods import *
class Test(TestCase):
def test_generate_kmers(self):
print('Testing %s' % 'test_generate_kmers')
for i in range(1, 8):
self.assertEqual(len(generate_kmers(i)), 4 ** i)
def test_gen_random_sequence(self):
print('... | 30.5 | 63 | 0.660422 | 3,352 | 0.981265 | 0 | 0 | 0 | 0 | 0 | 0 | 930 | 0.272248 |
45187c05fe7efccfb6cd2366904c5d7b0e9849c8 | 8,747 | py | Python | distributed_social_network/users/views.py | leevtori/CMPUT404-project | 52214288855ae4b3f05b8d17e67a2686debffb19 | [
"Apache-2.0"
] | null | null | null | distributed_social_network/users/views.py | leevtori/CMPUT404-project | 52214288855ae4b3f05b8d17e67a2686debffb19 | [
"Apache-2.0"
] | 51 | 2019-03-22T00:31:06.000Z | 2021-06-10T21:17:30.000Z | distributed_social_network/users/views.py | leevtori/CMPUT404-project | 52214288855ae4b3f05b8d17e67a2686debffb19 | [
"Apache-2.0"
] | 1 | 2019-08-03T14:41:22.000Z | 2019-08-03T14:41:22.000Z | from django.urls import reverse_lazy, reverse
from django.shortcuts import get_object_or_404, render, HttpResponse, HttpResponseRedirect
from requests.auth import HTTPBasicAuth
from .models import User, Node
from .forms import CustomUserCreationForm, UserCreationForm
from django.views.generic import ListView
from djan... | 36.598326 | 115 | 0.658169 | 8,106 | 0.926718 | 0 | 0 | 0 | 0 | 0 | 0 | 1,154 | 0.131931 |
4519b87ff604566c931c34b6c30b719a965b014c | 1,569 | py | Python | util.py | reckenrode/ParanoiaCharGen | 07aa5a5cf1699ae47edab95ee5490b2f1d48c501 | [
"BSD-2-Clause"
] | 1 | 2021-12-20T00:03:34.000Z | 2021-12-20T00:03:34.000Z | util.py | reckenrode/ParanoiaCharGen | 07aa5a5cf1699ae47edab95ee5490b2f1d48c501 | [
"BSD-2-Clause"
] | null | null | null | util.py | reckenrode/ParanoiaCharGen | 07aa5a5cf1699ae47edab95ee5490b2f1d48c501 | [
"BSD-2-Clause"
] | null | null | null | #from weakref import WeakValueDictionary
import random, operator, weakref
def format_service_group(group):
"""pretty prints the group"""
rstr = '%s [%s]'
if group.cover != None: # Spy for IntSec
return rstr % (group.cover, group.cover.firm)
elif group.spyon != None:
return rstr % (group.spyon, group.spyon.firm... | 30.173077 | 109 | 0.702358 | 364 | 0.231995 | 0 | 0 | 0 | 0 | 0 | 0 | 345 | 0.219885 |
451a01d6bf880434d082fec4bb6d94642deb72ee | 2,195 | py | Python | moex/tests/test_service.py | ChanTerelLy/broker-account-analist | a723c83fe9a924905eb0754b4acb1231b31f9c87 | [
"MIT"
] | null | null | null | moex/tests/test_service.py | ChanTerelLy/broker-account-analist | a723c83fe9a924905eb0754b4acb1231b31f9c87 | [
"MIT"
] | 11 | 2021-02-21T19:39:41.000Z | 2021-06-13T16:29:47.000Z | moex/tests/test_service.py | ChanTerelLy/broker-account-analist | a723c83fe9a924905eb0754b4acb1231b31f9c87 | [
"MIT"
] | 2 | 2021-11-16T16:31:37.000Z | 2022-02-11T02:55:37.000Z | import asyncio
import unittest
from moex.service import Cbr, Moex
class CbrTest(unittest.TestCase):
def setUp(self) -> None:
self.cbr = Cbr('01.01.2021')
def test_usd(self):
self.assertEqual(self.cbr.USD, 73.88)
def test_euro(self):
self.assertEqual(self.cbr.EUR, 90.79)
class... | 34.296875 | 119 | 0.655125 | 2,075 | 0.94533 | 0 | 0 | 0 | 0 | 0 | 0 | 382 | 0.174032 |
451aa8ccde2d865dd652ad209fefdf68afe0ad46 | 2,820 | py | Python | streamlit_app.py | guim4dev/education-cv | ffd880090de28e36849b4d53c424c2009791aaf5 | [
"MIT"
] | null | null | null | streamlit_app.py | guim4dev/education-cv | ffd880090de28e36849b4d53c424c2009791aaf5 | [
"MIT"
] | null | null | null | streamlit_app.py | guim4dev/education-cv | ffd880090de28e36849b4d53c424c2009791aaf5 | [
"MIT"
] | null | null | null | import streamlit as st
import pandas as pd
import numpy as np
import plotly.express as px
st.title("Relatório de Aula")
df = pd.read_csv('data/emocoes.csv')
agg = pd.read_csv('data/agg.csv')
Engajado = df[df['emocao'] == 'Engajado']
Engajado_agg = Engajado.groupby(['emocao', 'pessoa']).size().reset_index(name='size')... | 32.413793 | 134 | 0.699291 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 747 | 0.264051 |
451af08e7abf6ac7cd2e6c4f9832ea860419a281 | 4,410 | py | Python | other_nominate/register_other_nominate.py | kondounagi/japanese_movies_dataset | 349f217cd04e07fd44a401ecb2f2dcaea7bc2e5e | [
"MIT"
] | 1 | 2019-08-05T21:43:09.000Z | 2019-08-05T21:43:09.000Z | other_nominate/register_other_nominate.py | kondounagi/japanese_movies_dataset | 349f217cd04e07fd44a401ecb2f2dcaea7bc2e5e | [
"MIT"
] | 3 | 2020-03-31T05:53:37.000Z | 2021-12-13T20:07:39.000Z | other_nominate/register_other_nominate.py | kondounagi/japanese_movies_dataset | 349f217cd04e07fd44a401ecb2f2dcaea7bc2e5e | [
"MIT"
] | null | null | null | import argparse
import json
import os
from os import listdir
from os.path import isfile, join
class RegisterOtherNominate:
# Register the prize winners of each award to the formatting style.
def __init__(self):
parser = argparse.ArgumentParser()
parser.add_argument("-d", "--directory",
... | 35.28 | 80 | 0.460544 | 4,175 | 0.946712 | 123 | 0.027891 | 0 | 0 | 0 | 0 | 546 | 0.12381 |
451b7210c711e56db4043ee4381d442e6b1a9d25 | 5,477 | py | Python | PC6/table.py | ReneCapella/pythonTinkering | 93a5080e8ef6f67fe8ca0b67eb1fb27370beb26a | [
"MIT"
] | null | null | null | PC6/table.py | ReneCapella/pythonTinkering | 93a5080e8ef6f67fe8ca0b67eb1fb27370beb26a | [
"MIT"
] | null | null | null | PC6/table.py | ReneCapella/pythonTinkering | 93a5080e8ef6f67fe8ca0b67eb1fb27370beb26a | [
"MIT"
] | null | null | null | class Table:
# Constructor
# Defauls row and col to 0 if less than 0
def __init__(self, col_count, row_count, headers = [], border_size = 0):
self.col_count = col_count if col_count >= 0 else 0
self.row_count = row_count if row_count >= 0 else 0
self.border_size = border_size if ... | 33.601227 | 95 | 0.617126 | 4,134 | 0.754793 | 0 | 0 | 0 | 0 | 0 | 0 | 1,459 | 0.266387 |
451d32ddace64c14dc2a20c09b0af3249bd93791 | 676 | py | Python | api/db/models/child_datum.py | peuan-testai/opentestdata-api | 9e9b12e73abc30a2031eb49d51d5b9d5412ed6ba | [
"MIT"
] | 15 | 2019-06-27T02:48:02.000Z | 2020-11-29T09:01:29.000Z | api/db/models/child_datum.py | peuan-testai/opentestdata-api | 9e9b12e73abc30a2031eb49d51d5b9d5412ed6ba | [
"MIT"
] | 16 | 2019-07-26T19:51:55.000Z | 2022-03-12T00:00:24.000Z | api/db/models/child_datum.py | peuan-testai/opentestdata-api | 9e9b12e73abc30a2031eb49d51d5b9d5412ed6ba | [
"MIT"
] | 7 | 2019-06-26T11:10:50.000Z | 2020-09-04T08:52:58.000Z | from .. import db
from .base import BaseModel
class ChildDatum(BaseModel):
__tablename__ = 'child_data'
# fields
parent_id = db.Column(db.Integer, db.ForeignKey('data.id'), nullable=False)
datum_id = db.Column(db.Integer, db.ForeignKey('data.id'), nullable=False)
name = db.Column(db.String(length... | 30.727273 | 91 | 0.659763 | 627 | 0.927515 | 0 | 0 | 0 | 0 | 0 | 0 | 115 | 0.170118 |
451d5be5b8b8cc7a0af4de177c971df7cd94b93b | 13,474 | py | Python | mate3/devices.py | kodonnell/mate3 | 6c378cc7d5eee59e322075b7fcdc91c49b24265f | [
"MIT"
] | null | null | null | mate3/devices.py | kodonnell/mate3 | 6c378cc7d5eee59e322075b7fcdc91c49b24265f | [
"MIT"
] | null | null | null | mate3/devices.py | kodonnell/mate3 | 6c378cc7d5eee59e322075b7fcdc91c49b24265f | [
"MIT"
] | null | null | null | import dataclasses as dc
from typing import Any, Dict, Iterable, List, Optional
from loguru import logger
from mate3.field_values import FieldValue, ModelValues
from mate3.read import AllModelReads
from mate3.sunspec.fields import IntegerField
from mate3.sunspec.model_base import Model
from mate3.sunspec.models impor... | 38.062147 | 120 | 0.656672 | 12,231 | 0.907748 | 733 | 0.054401 | 3,396 | 0.252041 | 0 | 0 | 3,425 | 0.254193 |
451de10c0477bdaf31e0d063879d50b5418e6b0b | 490 | py | Python | catkin_ws/src/ros_python/function_ws/srv_sub_pub/src/srv_server.py | min-chuir-Park/ROS_Tutorials | 4c19e7673ec7098019c747833c45f0d32b85dab4 | [
"MIT"
] | 1 | 2019-07-04T04:49:05.000Z | 2019-07-04T04:49:05.000Z | catkin_ws/src/ros_python/function_ws/srv_sub_pub/src/srv_server.py | min-chuir-Park/ROS_Tutorials | 4c19e7673ec7098019c747833c45f0d32b85dab4 | [
"MIT"
] | null | null | null | catkin_ws/src/ros_python/function_ws/srv_sub_pub/src/srv_server.py | min-chuir-Park/ROS_Tutorials | 4c19e7673ec7098019c747833c45f0d32b85dab4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
from srv_sub_pub.srv import *
NAME = "add_two_ints_server"
def add_two_ints(req):
print("Returning [%s + %s = %s]" % (req.a, req.b, (req.a + req.b)))
return AddTwoIntsResponse(req.a + req.b)
def add_two_ints_server():
rospy.init_node(NAME)
s = rospy.Service('add_t... | 22.272727 | 71 | 0.681633 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 149 | 0.304082 |
451f9b7ff4174b43f88b83397cc76cc631f10347 | 148 | py | Python | app/captcha/handlers/verify.py | huioo/tornadoWeb | 001efbae9815b30d8a0c0b4ba8819cc711b99dc4 | [
"Apache-2.0"
] | null | null | null | app/captcha/handlers/verify.py | huioo/tornadoWeb | 001efbae9815b30d8a0c0b4ba8819cc711b99dc4 | [
"Apache-2.0"
] | null | null | null | app/captcha/handlers/verify.py | huioo/tornadoWeb | 001efbae9815b30d8a0c0b4ba8819cc711b99dc4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import tornado.web
class Handler(tornado.web.RequestHandler):
def initialize(self):
pass | 18.5 | 42 | 0.662162 | 81 | 0.547297 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.297297 |
451fd926ec9ad4d32166fa0f1f6362133bc3d0df | 1,113 | py | Python | simplydomain/src/module_recursion.py | SimplySecurity/SimplyDomain-Old | 101dd55b213009b449a96a1fa8b143d85dcdba88 | [
"BSD-3-Clause"
] | 17 | 2018-08-08T11:51:26.000Z | 2022-03-27T19:43:25.000Z | simplydomain/src/module_recursion.py | SimplySecurity/SimplyDomain-Old | 101dd55b213009b449a96a1fa8b143d85dcdba88 | [
"BSD-3-Clause"
] | 10 | 2018-06-14T21:33:49.000Z | 2020-08-26T18:10:54.000Z | simplydomain/src/module_recursion.py | SimplySecurity/SimplyDomain-Old | 101dd55b213009b449a96a1fa8b143d85dcdba88 | [
"BSD-3-Clause"
] | 6 | 2018-07-20T17:52:03.000Z | 2021-10-18T09:08:33.000Z | import multiprocessing as mp
class ModuleRecursion(object):
"""Class to handle recursion.
Simple class to handle tracking and storing prior
sub-domains discovred.
"""
def __init__(self):
"""class init.
"""
self.recursion_queue = mp.Queue()
def add_subdomain(self, domain):
"""add subdomain to Q.
... | 21.403846 | 70 | 0.674753 | 1,082 | 0.972147 | 0 | 0 | 0 | 0 | 0 | 0 | 587 | 0.527403 |
451ff3d3aabbbe325d6f684b5fc8911f70524e81 | 1,691 | py | Python | python/tests/spatial_operator/test_polygon_range.py | Maxar-Corp/GeoSpark | 6248c6773dc88bf3354ea9b223f16ceb064e7627 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-10-19T07:57:29.000Z | 2021-10-19T07:57:29.000Z | python/tests/spatial_operator/test_polygon_range.py | mayankkt9/GeoSpark | 618da90413f7d86c59def92ba765fbd6d9d49761 | [
"Apache-2.0",
"MIT"
] | 3 | 2020-03-24T18:20:35.000Z | 2021-02-02T22:36:37.000Z | python/tests/spatial_operator/test_polygon_range.py | mayankkt9/GeoSpark | 618da90413f7d86c59def92ba765fbd6d9d49761 | [
"Apache-2.0",
"MIT"
] | 1 | 2021-09-26T15:51:22.000Z | 2021-09-26T15:51:22.000Z | import os
from pyspark import StorageLevel
from geospark.core.SpatialRDD import PolygonRDD
from geospark.core.enums import IndexType, FileDataSplitter
from geospark.core.geom.envelope import Envelope
from geospark.core.spatialOperator import RangeQuery
from tests.test_base import TestBase
from tests.tools import test... | 36.76087 | 97 | 0.707865 | 1,209 | 0.714962 | 0 | 0 | 0 | 0 | 0 | 0 | 50 | 0.029568 |
45202479629fa2ae422e3a2c76ead8cf08a4c08c | 2,004 | py | Python | river/compose/renamer.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 1,105 | 2019-01-24T15:15:30.000Z | 2020-11-10T18:27:00.000Z | river/compose/renamer.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 328 | 2019-01-25T13:48:43.000Z | 2020-11-11T11:41:44.000Z | river/compose/renamer.py | online-ml/creme | 60872844e6052b5ef20e4075aea30f9031377136 | [
"BSD-3-Clause"
] | 150 | 2019-01-29T19:05:21.000Z | 2020-11-11T11:50:14.000Z | from typing import Dict
from river import base
__all__ = ["Renamer", "Prefixer", "Suffixer"]
class Renamer(base.Transformer):
"""Renames features following substitution rules.
Parameters
----------
mapping
Dictionnary describing substitution rules. Keys in `mapping` that are not a feature's... | 21.094737 | 120 | 0.560878 | 1,900 | 0.948104 | 0 | 0 | 0 | 0 | 0 | 0 | 1,087 | 0.542415 |
452450d09a4bf187252d74d278741b2191dfc928 | 4,660 | py | Python | open_publishing/catalog/catalog_types.py | open-publishing/open-publishing-api | 0d1646bb2460c6f35cba610a355941d2e07bfefd | [
"BSD-3-Clause"
] | null | null | null | open_publishing/catalog/catalog_types.py | open-publishing/open-publishing-api | 0d1646bb2460c6f35cba610a355941d2e07bfefd | [
"BSD-3-Clause"
] | null | null | null | open_publishing/catalog/catalog_types.py | open-publishing/open-publishing-api | 0d1646bb2460c6f35cba610a355941d2e07bfefd | [
"BSD-3-Clause"
] | null | null | null | from open_publishing.core import FieldGroup
from open_publishing.core import FieldDescriptor
from open_publishing.core.enums import CatalogType, VLBCategory, AcademicCategory
from open_publishing.core import SimpleField
from open_publishing.extendable_enum_field import ExtendableEnumField
from open_publishing.genre im... | 41.981982 | 106 | 0.547425 | 4,108 | 0.881545 | 0 | 0 | 71 | 0.015236 | 0 | 0 | 493 | 0.105794 |
4524547bc1c556606b6ef59589378a69ffa68a6d | 2,263 | py | Python | app/request.py | aenshtyn/News-Update | 2a09099cd6468d00e2e1972072a88db3e4b7cb78 | [
"MIT"
] | null | null | null | app/request.py | aenshtyn/News-Update | 2a09099cd6468d00e2e1972072a88db3e4b7cb78 | [
"MIT"
] | null | null | null | app/request.py | aenshtyn/News-Update | 2a09099cd6468d00e2e1972072a88db3e4b7cb78 | [
"MIT"
] | null | null | null | import urllib.request,json
from .models import Source,Article
# Getting Api Key
api_key = None
#Getting the base urls
source_base_url = None
article_base_url = None
def configure_request(app):
global api_key,source_base_url,article_base_url
api_key = app.config['SOURCE_API_KEY']
source_base_url = app.conf... | 30.173333 | 86 | 0.699956 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 501 | 0.221388 |
4524add159eab216540f8144d587795ca3f57c91 | 5,027 | py | Python | corai_util/finance/src/param_iv.py | Code-Cornelius/python_libraries | 71c388da60e2aeb94369c3813faca93bf6a18ebf | [
"MIT"
] | 1 | 2022-01-01T22:10:04.000Z | 2022-01-01T22:10:04.000Z | corai_util/finance/src/param_iv.py | Code-Cornelius/python_libraries | 71c388da60e2aeb94369c3813faca93bf6a18ebf | [
"MIT"
] | null | null | null | corai_util/finance/src/param_iv.py | Code-Cornelius/python_libraries | 71c388da60e2aeb94369c3813faca93bf6a18ebf | [
"MIT"
] | null | null | null | # normal libraries
import math
import numpy as np
# priv_libraries
from corai_util.finance.src.financials import compute_price, compute_integral
from corai_util.finance.src.implied_vol import implied_volatility_newton, total_implied_vol_newton
phi_heston = lambda xx: (1 - (1 - np.exp(-xx)) / xx) / xx
phi_heston_lambd... | 33.966216 | 120 | 0.63139 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 831 | 0.165307 |
45266515995c4fa2eef2c47f14074dcb92d42fdb | 687 | py | Python | cracking_the_coding_interview_qs/8.7-8.8/get_all_permutations_of_string_test.py | angelusualle/algorithms | 86286a49db2a755bc57330cb455bcbd8241ea6be | [
"Apache-2.0"
] | null | null | null | cracking_the_coding_interview_qs/8.7-8.8/get_all_permutations_of_string_test.py | angelusualle/algorithms | 86286a49db2a755bc57330cb455bcbd8241ea6be | [
"Apache-2.0"
] | null | null | null | cracking_the_coding_interview_qs/8.7-8.8/get_all_permutations_of_string_test.py | angelusualle/algorithms | 86286a49db2a755bc57330cb455bcbd8241ea6be | [
"Apache-2.0"
] | null | null | null | import unittest
from get_all_permutations_of_string import get_all_permutations_of_string, get_all_permutations_of_string_with_dups
class Test_Case_Get_All_Permutations_Of_String(unittest.TestCase):
def test_get_all_permutations_of_string(self):
self.assertListEqual(get_all_permutations_of_string("tea"), [... | 76.333333 | 176 | 0.764192 | 554 | 0.806405 | 0 | 0 | 0 | 0 | 0 | 0 | 123 | 0.179039 |
4526f09b63533011d0dbd7fc3b49ed217cae0f86 | 8,171 | py | Python | third-party/webscalesqlclient/mysql-5.6/xtrabackup/test/kewpie/percona_tests/xtrabackup_disabled/xb_partial_test.py | hkirsman/hhvm_centos7_builds | 2a1fd6de0d2d289c1575f43f10018f3bec23bb13 | [
"PHP-3.01",
"Zend-2.0"
] | 2 | 2018-03-07T08:31:29.000Z | 2019-02-01T10:10:48.000Z | third-party/webscalesqlclient/mysql-5.6/xtrabackup/test/kewpie/percona_tests/xtrabackup_disabled/xb_partial_test.py | hkirsman/hhvm_centos7_builds | 2a1fd6de0d2d289c1575f43f10018f3bec23bb13 | [
"PHP-3.01",
"Zend-2.0"
] | 1 | 2021-02-23T14:52:22.000Z | 2021-02-23T14:52:22.000Z | xtrabackup_main/xb_partial_test.py | isabella232/kewpie | 47d67124fa755719eda3ca5a621a2abf0322d3f9 | [
"Apache-2.0"
] | 1 | 2020-11-13T10:17:28.000Z | 2020-11-13T10:17:28.000Z | #! /usr/bin/env python
# -*- mode: python; indent-tabs-mode: nil; -*-
# vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
#
# Copyright (C) 2011 Patrick Crews
#
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Softwar... | 45.648045 | 135 | 0.571778 | 6,993 | 0.855832 | 0 | 0 | 0 | 0 | 0 | 0 | 2,491 | 0.304859 |
45271fd81da1faed37c0972df122fea04a51747b | 104 | py | Python | filter.py | Gerrydh/MPP-Recursion | de81bb0dcd50f7f66971db9000e6262767168b8f | [
"Apache-2.0"
] | null | null | null | filter.py | Gerrydh/MPP-Recursion | de81bb0dcd50f7f66971db9000e6262767168b8f | [
"Apache-2.0"
] | null | null | null | filter.py | Gerrydh/MPP-Recursion | de81bb0dcd50f7f66971db9000e6262767168b8f | [
"Apache-2.0"
] | null | null | null | print filter((lambda x: (x%2) ==0 ), [1,2,3,4,5,6])
print filter((lambda x: (x%2) !=0 ), [1,2,3,4,5,6]) | 52 | 52 | 0.519231 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
45278aea9c424ae5e3cd32a1bd843d89d29dbea4 | 156 | py | Python | project euler/q2.py | milkmeat/thomas | fbc72af34267488d931a4885d4e19fce22fea582 | [
"MIT"
] | null | null | null | project euler/q2.py | milkmeat/thomas | fbc72af34267488d931a4885d4e19fce22fea582 | [
"MIT"
] | null | null | null | project euler/q2.py | milkmeat/thomas | fbc72af34267488d931a4885d4e19fce22fea582 | [
"MIT"
] | null | null | null | l=[0]*100
l[0]=1
l[1]=2
for x in range (2,100):
l[x]=l[x-1]+l[x-2]
#print l
f=0
for c in l:
if c%2==0 and c<4000000:
f=f+c
print f | 14.181818 | 29 | 0.474359 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9 | 0.057692 |
452797680ac9c44f15c014b0a008440ac1ea29cb | 12,809 | py | Python | recipes/LibriSpeech/ASR/CTC/train_with_wav2vec.py | mj-kh/speechbrain | 9351f61cc057ddf3f8a0b7074a9c3c857dec84ed | [
"Apache-2.0"
] | 3,913 | 2021-03-14T13:54:52.000Z | 2022-03-30T05:09:55.000Z | recipes/LibriSpeech/ASR/CTC/train_with_wav2vec.py | mj-kh/speechbrain | 9351f61cc057ddf3f8a0b7074a9c3c857dec84ed | [
"Apache-2.0"
] | 667 | 2021-03-14T20:11:17.000Z | 2022-03-31T04:07:17.000Z | recipes/LibriSpeech/ASR/CTC/train_with_wav2vec.py | mj-kh/speechbrain | 9351f61cc057ddf3f8a0b7074a9c3c857dec84ed | [
"Apache-2.0"
] | 785 | 2021-03-14T13:20:57.000Z | 2022-03-31T03:26:03.000Z | #!/usr/bin/env/python3
"""Recipe for training a wav2vec-based ctc ASR system with librispeech.
The system employs wav2vec as its encoder. Decoding is performed with
ctc greedy decoder.
To run this recipe, do the following:
> python train_with_wav2vec.py hparams/train_with_wav2vec.yaml
The neural network is trained on C... | 35.879552 | 89 | 0.640331 | 6,040 | 0.471543 | 3,584 | 0.279803 | 796 | 0.062144 | 0 | 0 | 3,243 | 0.253181 |
45284a1d25fe21c81004bcc320ecfac7a3fe05f4 | 907 | py | Python | src/dask_awkward/tests/test_utils.py | douglasdavis/dask-awkward | e8829d32ed080d643c7e4242036ce64aee60eda6 | [
"BSD-3-Clause"
] | 21 | 2021-09-09T19:32:30.000Z | 2022-03-01T15:42:06.000Z | src/dask_awkward/tests/test_utils.py | douglasdavis/dask-awkward | e8829d32ed080d643c7e4242036ce64aee60eda6 | [
"BSD-3-Clause"
] | 14 | 2021-09-23T16:54:10.000Z | 2022-03-23T19:24:53.000Z | src/dask_awkward/tests/test_utils.py | douglasdavis/dask-awkward | e8829d32ed080d643c7e4242036ce64aee60eda6 | [
"BSD-3-Clause"
] | 3 | 2021-09-09T19:32:32.000Z | 2021-11-18T17:27:35.000Z | from __future__ import annotations
from ..utils import normalize_single_outer_inner_index
def test_normalize_single_outer_inner_index() -> None:
divisions = (0, 12, 14, 20, 23, 24)
indices = [0, 1, 2, 8, 12, 13, 14, 15, 17, 20, 21, 22]
results = [
(0, 0),
(0, 1),
(0, 2),
(... | 22.675 | 62 | 0.46527 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 0.015436 |
45288cac480034ff3c670253791c5dd9e04dcb61 | 16,413 | py | Python | core/client_socket.py | schalekamp/ibapipy | a9e02d604d9f4a2ad87e78089654b29305aa110d | [
"Apache-2.0"
] | 1 | 2020-08-13T05:45:48.000Z | 2020-08-13T05:45:48.000Z | core/client_socket.py | schalekamp/ibapipy | a9e02d604d9f4a2ad87e78089654b29305aa110d | [
"Apache-2.0"
] | null | null | null | core/client_socket.py | schalekamp/ibapipy | a9e02d604d9f4a2ad87e78089654b29305aa110d | [
"Apache-2.0"
] | null | null | null | """Implements the EClientSocket interface for the Interactive Brokers API."""
import threading
import ibapipy.config as config
from ibapipy.core.network_handler import NetworkHandler
class ClientSocket:
"""Provides methods for sending requests to TWS."""
def __init__(self):
"""Initialize a new instan... | 36.718121 | 79 | 0.628709 | 14,305 | 0.871565 | 0 | 0 | 0 | 0 | 0 | 0 | 3,616 | 0.220313 |
4529524b72ee8b6f655a486a5542d22fd69041be | 2,234 | py | Python | common.py | shawnau/DataScienceBowl2018 | 3c6f0f26dd86b71aad55fca52314e6432d0b3a82 | [
"MIT"
] | null | null | null | common.py | shawnau/DataScienceBowl2018 | 3c6f0f26dd86b71aad55fca52314e6432d0b3a82 | [
"MIT"
] | null | null | null | common.py | shawnau/DataScienceBowl2018 | 3c6f0f26dd86b71aad55fca52314e6432d0b3a82 | [
"MIT"
] | null | null | null | import os
from datetime import datetime
PROJECT_PATH = os.path.dirname(os.path.realpath(__file__))
IDENTIFIER = datetime.now().strftime('%Y-%m-%d_%H-%M-%S')
#numerical libs
import numpy as np
import random
import matplotlib
matplotlib.use('TkAgg')
import cv2
# torch libs
import torch
from torch.utils.data.sampler... | 26.282353 | 90 | 0.723814 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 530 | 0.237243 |
452af70b9e1700ac30a7f0af42ce0f50e0812342 | 1,460 | py | Python | NumberExtractor.py | Dikshit15/SolveSudoku | 7a84e64c9b708c730179f65c8cce8a360ff96d7f | [
"MIT"
] | 54 | 2019-01-03T20:05:26.000Z | 2022-02-22T12:46:47.000Z | NumberExtractor.py | Dikshit15/SolveSudoku | 7a84e64c9b708c730179f65c8cce8a360ff96d7f | [
"MIT"
] | 1 | 2021-05-18T07:05:28.000Z | 2021-05-20T04:38:30.000Z | NumberExtractor.py | Dikshit15/SolveSudoku | 7a84e64c9b708c730179f65c8cce8a360ff96d7f | [
"MIT"
] | 29 | 2019-02-28T13:54:45.000Z | 2021-12-17T03:22:33.000Z | import numpy as np
import cv2
import matplotlib.pyplot as plt
import numpy as np
from keras.models import model_from_json
# Load the saved model
json_file = open('models/model.json', 'r')
loaded_model_json = json_file.read()
json_file.close()
loaded_model = model_from_json(loaded_model_json)
# load weights into new mo... | 31.73913 | 92 | 0.656164 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 534 | 0.365753 |
452b051b1e4ced509f2b30c049b1e85fd074fa94 | 38,889 | py | Python | code/Rts.py | andreschristen/RTs | d3dceb7d2f518222cfaa940b4ecfc9c7f63a25a9 | [
"CC0-1.0"
] | null | null | null | code/Rts.py | andreschristen/RTs | d3dceb7d2f518222cfaa940b4ecfc9c7f63a25a9 | [
"CC0-1.0"
] | null | null | null | code/Rts.py | andreschristen/RTs | d3dceb7d2f518222cfaa940b4ecfc9c7f63a25a9 | [
"CC0-1.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue May 12 18:28:54 2020
@author: Dr J A Christen (CIMAT-CONACYT, Mexico) jac at cimat.mx
Instantaneous reproduction numbers calculations.
Rts_P, Implementation of Cori et al (2013)
Rts_AR, new filtering version using an autoregressive linear model of Ca... | 44.906467 | 156 | 0.550618 | 20,219 | 0.519795 | 0 | 0 | 0 | 0 | 0 | 0 | 15,343 | 0.394442 |
452ce291eab1e58321278df273620d4a3c795783 | 678 | py | Python | zombieclusters.py | tnkteja/notthisagain | 85e2b2cbea1298a052986e9dfe5e73d022b537f3 | [
"MIT"
] | null | null | null | zombieclusters.py | tnkteja/notthisagain | 85e2b2cbea1298a052986e9dfe5e73d022b537f3 | [
"MIT"
] | null | null | null | zombieclusters.py | tnkteja/notthisagain | 85e2b2cbea1298a052986e9dfe5e73d022b537f3 | [
"MIT"
] | null | null | null | class cluster(object):
def __init__(self,members=[]):
self.s=set(members)
def merge(self, other):
self.s.union(other.s)
return self
class clusterManager(object):
def __init__(self,clusters={}):
self.c=clusters
def merge(self, i, j):
self.c[i]=self.c[j]=self.c[i... | 26.076923 | 86 | 0.59292 | 399 | 0.588496 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | 0.004425 |
452dfafcf95365869f17107edc7e9285e32b7078 | 2,989 | py | Python | CondTools/Ecal/python/EcalO2O_laser_online_cfg.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 6 | 2017-09-08T14:12:56.000Z | 2022-03-09T23:57:01.000Z | CondTools/Ecal/python/EcalO2O_laser_online_cfg.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 545 | 2017-09-19T17:10:19.000Z | 2022-03-07T16:55:27.000Z | CondTools/Ecal/python/EcalO2O_laser_online_cfg.py | SWuchterl/cmssw | 769b4a7ef81796579af7d626da6039dfa0347b8e | [
"Apache-2.0"
] | 14 | 2017-10-04T09:47:21.000Z | 2019-10-23T18:04:45.000Z | import FWCore.ParameterSet.Config as cms
process = cms.Process("ProcessOne")
process.load("CondCore.DBCommon.CondDBCommon_cfi")
process.CondDBCommon.DBParameters.authenticationPath = '/nfshome0/popcondev/conddb'
#
# Choose the output database
#
process.CondDBCommon.connect = 'oracle://cms_orcon_prod/CMS_COND_42X_ECAL_... | 41.513889 | 112 | 0.577451 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,047 | 0.350284 |
452e242fef5c444f6a84742a55e2adf53a8f64d3 | 9,907 | py | Python | algofi/v1/staking.py | zhengxunWu3/algofi-py-sdk | 8388d71d55eae583ac3579286b5f870aa3db2913 | [
"MIT"
] | null | null | null | algofi/v1/staking.py | zhengxunWu3/algofi-py-sdk | 8388d71d55eae583ac3579286b5f870aa3db2913 | [
"MIT"
] | null | null | null | algofi/v1/staking.py | zhengxunWu3/algofi-py-sdk | 8388d71d55eae583ac3579286b5f870aa3db2913 | [
"MIT"
] | null | null | null | from algosdk import logic
from algosdk.future.transaction import ApplicationOptInTxn, AssetOptInTxn, ApplicationNoOpTxn, PaymentTxn, AssetTransferTxn
from ..contract_strings import algofi_manager_strings as manager_strings
from .prepend import get_init_txns
from ..utils import TransactionGroup, Transactions, randint, i... | 43.262009 | 159 | 0.731402 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,531 | 0.457353 |
452e279a6193abc88461babe810211a3f8d434ff | 1,661 | py | Python | main.py | kirantambe/koinex-status-ticker | 487028a00605912e9fee97f4b29f260a2ab4f66f | [
"MIT"
] | null | null | null | main.py | kirantambe/koinex-status-ticker | 487028a00605912e9fee97f4b29f260a2ab4f66f | [
"MIT"
] | 1 | 2021-06-01T21:56:55.000Z | 2021-06-01T21:56:55.000Z | main.py | kirantambe/koinex-status-ticker | 487028a00605912e9fee97f4b29f260a2ab4f66f | [
"MIT"
] | 1 | 2018-01-16T03:51:09.000Z | 2018-01-16T03:51:09.000Z | import rumps
import requests
import json
API_URL = 'https://koinex.in/api/ticker'
UPDATE_INTERVAL = 60
CURRENCIES = {
'Bitcoin': 'BTC',
'Ethereum': 'ETH',
'Ripple': 'XRP',
'Litecoin': 'LTC',
'Bitcoin Cash': 'BCH',
}
class KoinexStatusBarApp(rumps.App):
def __init__(self):
super(Koin... | 26.790323 | 77 | 0.587598 | 1,360 | 0.818784 | 0 | 0 | 484 | 0.291391 | 0 | 0 | 287 | 0.172787 |
452f2babff6fef2a136326734c3cab066e39250a | 900 | py | Python | app.py | migueljunior/docker | 09effa41a2207294ec9ab8bd34b166c862edea72 | [
"Apache-2.0"
] | null | null | null | app.py | migueljunior/docker | 09effa41a2207294ec9ab8bd34b166c862edea72 | [
"Apache-2.0"
] | null | null | null | app.py | migueljunior/docker | 09effa41a2207294ec9ab8bd34b166c862edea72 | [
"Apache-2.0"
] | null | null | null | from flask import Flask, jsonify
from time import strftime
from socket import gethostname
from socket import gethostbyname
app = Flask(__name__)
@app.route('/')
def welcome():
message = 'Please add /docker after the port 8888'
return message
@app.route('/docker')
def docker():
currentDate = strftime('%... | 31.034483 | 54 | 0.646667 | 0 | 0 | 0 | 0 | 669 | 0.743333 | 0 | 0 | 277 | 0.307778 |
452f9d740231a724ca7b77510cb8a67453b7e2aa | 8,605 | py | Python | knn_and_regression/src/free_response.py | WallabyLester/Machine_Learning_From_Scratch | 6042cf421f5de2db61fb570b7c4de64dc03453f3 | [
"MIT"
] | null | null | null | knn_and_regression/src/free_response.py | WallabyLester/Machine_Learning_From_Scratch | 6042cf421f5de2db61fb570b7c4de64dc03453f3 | [
"MIT"
] | null | null | null | knn_and_regression/src/free_response.py | WallabyLester/Machine_Learning_From_Scratch | 6042cf421f5de2db61fb570b7c4de64dc03453f3 | [
"MIT"
] | null | null | null | import numpy as np
from numpy.core.fromnumeric import mean
from numpy.core.numeric import True_
from numpy.testing._private.utils import rand
from polynomial_regression import PolynomialRegression
from generate_regression_data import generate_regression_data
from metrics import mean_squared_error # mse
from math impor... | 38.936652 | 176 | 0.664614 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,165 | 0.251598 |
45303096a42f87f1631edf145b0ae0b347d69c0b | 753 | py | Python | chapter10/exercises/EG10-20 Twinkle Twinkle classes.py | munnep/begin_to_code_with_python | 3ef14d90785526b6b26d262a7627eee73791d7d0 | [
"MIT"
] | null | null | null | chapter10/exercises/EG10-20 Twinkle Twinkle classes.py | munnep/begin_to_code_with_python | 3ef14d90785526b6b26d262a7627eee73791d7d0 | [
"MIT"
] | null | null | null | chapter10/exercises/EG10-20 Twinkle Twinkle classes.py | munnep/begin_to_code_with_python | 3ef14d90785526b6b26d262a7627eee73791d7d0 | [
"MIT"
] | null | null | null | # EG10-20 Twinkle Twinkle classes
import time
import snaps
class Note:
def __init__(self, note, duration):
self.__note = note
self.__duration = duration
def play(self):
snaps.play_note(self.__note)
time.sleep(self.__duration)
tune = [Note(note=0, duration=0.4), Note(note=0, d... | 30.12 | 63 | 0.622842 | 207 | 0.2749 | 0 | 0 | 0 | 0 | 0 | 0 | 33 | 0.043825 |
453161fcfe76bf1d62b11f9f68c0fa622f378ff1 | 3,523 | py | Python | tests/python/gpu/test_forward.py | xudong-sun/mxnet | fe42d30d5885dd576cb871fd70594c53efce9b42 | [
"Apache-2.0"
] | 31 | 2016-04-29T09:13:44.000Z | 2021-02-16T21:27:00.000Z | tests/python/gpu/test_forward.py | greenpea0104/incubator-mxnet | fc9e70bf2d349ad4c6cb65ff3f0958e23a7410bf | [
"Apache-2.0"
] | 23 | 2018-06-11T20:03:54.000Z | 2018-08-10T03:17:49.000Z | tests/python/gpu/test_forward.py | greenpea0104/incubator-mxnet | fc9e70bf2d349ad4c6cb65ff3f0958e23a7410bf | [
"Apache-2.0"
] | 47 | 2016-04-19T22:46:09.000Z | 2020-09-30T08:09:16.000Z | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 43.493827 | 93 | 0.676412 | 0 | 0 | 0 | 0 | 992 | 0.281578 | 0 | 0 | 1,438 | 0.408175 |
4532f548d365251f68edc483eadcb7b23a21e639 | 7,706 | py | Python | docs/src/conf.py | rbeucher/LavaVu | 317a234d69ba3eb06a827a1f8658feb031fe358b | [
"CC-BY-4.0"
] | 23 | 2016-01-26T23:06:53.000Z | 2019-06-11T08:31:32.000Z | docs/src/conf.py | rbeucher/LavaVu | 317a234d69ba3eb06a827a1f8658feb031fe358b | [
"CC-BY-4.0"
] | 73 | 2016-03-16T03:02:35.000Z | 2019-07-18T07:29:52.000Z | docs/src/conf.py | rbeucher/LavaVu | 317a234d69ba3eb06a827a1f8658feb031fe358b | [
"CC-BY-4.0"
] | 6 | 2016-03-25T23:22:49.000Z | 2018-01-16T14:38:09.000Z | # -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
# LavaVu conf based on conf.py from underworld2
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config
# -- Path setup ------------... | 30.101563 | 79 | 0.666623 | 114 | 0.014794 | 0 | 0 | 83 | 0.010771 | 0 | 0 | 5,549 | 0.720088 |
453357739358367ed9649135f97753882d4359cd | 25,824 | py | Python | experiments/pamogk_exp.py | tastanlab/pamogk | fdd1a5b3dcd43b91ce9aa9989c7815b71f13e710 | [
"FTL"
] | 6 | 2020-06-18T14:37:01.000Z | 2021-09-12T07:25:47.000Z | experiments/pamogk_exp.py | tastanlab/pamogk | fdd1a5b3dcd43b91ce9aa9989c7815b71f13e710 | [
"FTL"
] | null | null | null | experiments/pamogk_exp.py | tastanlab/pamogk | fdd1a5b3dcd43b91ce9aa9989c7815b71f13e710 | [
"FTL"
] | 5 | 2020-01-02T09:08:36.000Z | 2021-07-17T12:35:37.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import collections
import mkkm_mr
import networkx as nx
from sklearn.cluster import KMeans, SpectralClustering
from snf_simple import SNF
from pamogk import config
from pamogk import label_mapper
from pamogk.data_processor import rnaseq_processor as rp, synapse_rppa_pro... | 44.755633 | 122 | 0.642852 | 22,542 | 0.872909 | 0 | 0 | 16,816 | 0.651177 | 0 | 0 | 7,655 | 0.29643 |
45346855166d8c198852fc2c2b74490101e9dbc6 | 1,703 | py | Python | d3network/data/handschriftencensus_scrap.py | GusRiva/GusRiva | 50d63e3bc84f007b10df6edadbab85e23cf15731 | [
"MIT"
] | null | null | null | d3network/data/handschriftencensus_scrap.py | GusRiva/GusRiva | 50d63e3bc84f007b10df6edadbab85e23cf15731 | [
"MIT"
] | null | null | null | d3network/data/handschriftencensus_scrap.py | GusRiva/GusRiva | 50d63e3bc84f007b10df6edadbab85e23cf15731 | [
"MIT"
] | null | null | null | import requests
from lxml import html
from bs4 import BeautifulSoup
import json
import codecs
import re
#In this variable I will store the information as a dictionary with this structure:
# {number : "Name"}
ms_dict = {}
links_dict = {"links" : []}
for index in range(1,27000):
print(index)
page = requests.get('ht... | 27.467742 | 90 | 0.658837 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 913 | 0.536113 |
4534bb68221abad8193f98fdfa1110b766c99aa2 | 2,590 | py | Python | tests/emukit/quadrature/test_quadrature_acquisitions.py | alexgessner/emukit | 355e26bb30edd772a81af2a1267c569d7f446d42 | [
"Apache-2.0"
] | 6 | 2019-06-02T21:23:27.000Z | 2020-02-17T09:46:30.000Z | tests/emukit/quadrature/test_quadrature_acquisitions.py | Tony-Chiong/emukit | a068c8d5e06b2ae8b038f67bf2e4f66c4d91651a | [
"Apache-2.0"
] | 4 | 2019-05-17T13:30:21.000Z | 2019-06-21T13:49:19.000Z | tests/emukit/quadrature/test_quadrature_acquisitions.py | Tony-Chiong/emukit | a068c8d5e06b2ae8b038f67bf2e4f66c4d91651a | [
"Apache-2.0"
] | 1 | 2020-01-12T19:50:44.000Z | 2020-01-12T19:50:44.000Z | # Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0
import numpy as np
import pytest
import GPy
from math import isclose
from emukit.model_wrappers.gpy_quadrature_wrappers import QuadratureRBF, RBFGPy, BaseGaussianProcessGPy
from emukit.quadrature.methods i... | 28.777778 | 103 | 0.667568 | 0 | 0 | 0 | 0 | 486 | 0.187645 | 0 | 0 | 144 | 0.055598 |
4535c1a7513cb60d8687c9c277406f75c8762e19 | 2,039 | py | Python | tests/test_ProtocolService/test_ProtocolService.py | danilocgsilva/awsinstances | c0ab6ae42b3bfbe94735f7ba4741b3facec271ce | [
"MIT"
] | null | null | null | tests/test_ProtocolService/test_ProtocolService.py | danilocgsilva/awsinstances | c0ab6ae42b3bfbe94735f7ba4741b3facec271ce | [
"MIT"
] | null | null | null | tests/test_ProtocolService/test_ProtocolService.py | danilocgsilva/awsinstances | c0ab6ae42b3bfbe94735f7ba4741b3facec271ce | [
"MIT"
] | null | null | null | import unittest
import sys
sys.path.insert(2, "..")
from awsec2instances_includes.ProtocolService import ProtocolService
class test_ProtocolService(unittest.TestCase):
def test_execption_wrong_argument(self):
wrong_argument = "some-invalid"
with self.assertRaises(Exception):
ProtocolSe... | 36.410714 | 77 | 0.714076 | 1,915 | 0.939186 | 0 | 0 | 0 | 0 | 0 | 0 | 164 | 0.080432 |
4538624158b0321268253bb048733d15b3730192 | 873 | py | Python | mltoolkit/mldp/utils/helpers/nlp/token_matching.py | mancunian1792/FewSum | c2f9ef0ae7445bdb188b6ceb28e998b3fd12b78e | [
"MIT"
] | 28 | 2020-10-12T19:05:22.000Z | 2022-03-18T01:19:29.000Z | mltoolkit/mldp/utils/helpers/nlp/token_matching.py | mancunian1792/FewSum | c2f9ef0ae7445bdb188b6ceb28e998b3fd12b78e | [
"MIT"
] | 1 | 2022-01-30T01:52:59.000Z | 2022-02-19T08:04:54.000Z | mltoolkit/mldp/utils/helpers/nlp/token_matching.py | mancunian1792/FewSum | c2f9ef0ae7445bdb188b6ceb28e998b3fd12b78e | [
"MIT"
] | 7 | 2020-10-29T14:01:04.000Z | 2022-02-22T18:33:10.000Z | from .constants import SPECIAL_TOKENS
try:
import re2 as re
except ImportError:
import re
def twitter_sentiment_token_matching(token):
"""Special token matching function for twitter sentiment data."""
if 'URL_TOKEN' in SPECIAL_TOKENS and re.match(r'https?:\/\/[^\s]+', token):
return SPECIAL_TO... | 41.571429 | 79 | 0.651775 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 305 | 0.34937 |
45387e1e55f5181cc1ef4691f476f0481b601834 | 1,503 | py | Python | setup.py | geirem/pyconfig | e99693b7bc0acb3fe6b82acd29e8724336f95c43 | [
"CC0-1.0"
] | 1 | 2020-05-15T16:22:36.000Z | 2020-05-15T16:22:36.000Z | setup.py | geirem/pyconfig | e99693b7bc0acb3fe6b82acd29e8724336f95c43 | [
"CC0-1.0"
] | 9 | 2020-05-14T08:31:48.000Z | 2021-04-22T12:35:15.000Z | setup.py | geirem/pyconfig | e99693b7bc0acb3fe6b82acd29e8724336f95c43 | [
"CC0-1.0"
] | null | null | null | """A setuptools based setup module.
See:
https://packaging.python.org/guides/distributing-packages-using-setuptools/
"""
from setuptools import setup, find_packages
from os import path
here = path.abspath(path.dirname(__file__))
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f... | 31.3125 | 75 | 0.641384 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 820 | 0.545576 |
45389f146c6eea595dda9a6c6445b4f79a204445 | 3,457 | py | Python | pybamm/solvers/scipy_solver.py | danieljtait/PyBaMM | f9d6143770e4a01099f06e3574142424730f731a | [
"BSD-3-Clause"
] | null | null | null | pybamm/solvers/scipy_solver.py | danieljtait/PyBaMM | f9d6143770e4a01099f06e3574142424730f731a | [
"BSD-3-Clause"
] | null | null | null | pybamm/solvers/scipy_solver.py | danieljtait/PyBaMM | f9d6143770e4a01099f06e3574142424730f731a | [
"BSD-3-Clause"
] | null | null | null | #
# Solver class using Scipy's adaptive time stepper
#
import casadi
import pybamm
import scipy.integrate as it
import numpy as np
class ScipySolver(pybamm.BaseSolver):
"""Solve a discretised model, using scipy._integrate.solve_ivp.
Parameters
----------
method : str, optional
The method to ... | 33.563107 | 84 | 0.565519 | 3,322 | 0.960949 | 0 | 0 | 0 | 0 | 0 | 0 | 1,332 | 0.385305 |
4539375fe3de0d453832a057381afb182d19ced7 | 5,204 | py | Python | crits/core/fields.py | dutrow/crits | 6b357daa5c3060cf622d3a3b0c7b41a9ca69c049 | [
"MIT"
] | 738 | 2015-01-02T12:39:55.000Z | 2022-03-23T11:05:51.000Z | crits/core/fields.py | deadbits/crits | 154097a1892e9d3960d6faaed4bd2e912a196a47 | [
"MIT"
] | 605 | 2015-01-01T01:03:39.000Z | 2021-11-17T18:51:07.000Z | crits/core/fields.py | deadbits/crits | 154097a1892e9d3960d6faaed4bd2e912a196a47 | [
"MIT"
] | 316 | 2015-01-07T12:35:01.000Z | 2022-03-30T04:44:30.000Z | import datetime
from dateutil.parser import parse
from mongoengine import DateTimeField, FileField
from mongoengine.connection import DEFAULT_CONNECTION_NAME
#from mongoengine.python_support import str_types
from six import string_types as str_types
import io
from django.conf import settings
if settings.FILE_DB == se... | 33.574194 | 93 | 0.613951 | 4,419 | 0.849154 | 0 | 0 | 0 | 0 | 0 | 0 | 1,174 | 0.225596 |
453972bee5e4b38dcaee26d48c6dcec6950939dd | 821 | py | Python | custom_uss/custom_widgets/outlog.py | shuanet/dss | 5daafeb89aac58e4614775f301bec920f4abfa24 | [
"Apache-2.0"
] | 2 | 2022-02-13T19:13:16.000Z | 2022-02-17T14:52:05.000Z | custom_uss/custom_widgets/outlog.py | shuanet/dss | 5daafeb89aac58e4614775f301bec920f4abfa24 | [
"Apache-2.0"
] | null | null | null | custom_uss/custom_widgets/outlog.py | shuanet/dss | 5daafeb89aac58e4614775f301bec920f4abfa24 | [
"Apache-2.0"
] | 1 | 2022-02-16T20:17:38.000Z | 2022-02-16T20:17:38.000Z | import sys
from PySide6 import QtGui
class OutLog:
def __init__(self, edit, out=None, color=None):
"""(edit, out=None, color=None) -> can write stdout, stderr to a
QTextEdit.
edit = QTextEdit
out = alternate stream ( can be the original sys.stdout )
color = alternate color (... | 25.65625 | 72 | 0.576127 | 782 | 0.952497 | 0 | 0 | 0 | 0 | 0 | 0 | 256 | 0.311815 |
453a307689bad4f488cdb3f14eea66f7d9566594 | 5,079 | py | Python | 2020/day07/day07.py | maxschalz/advent_of_code | 537ff10b74fb0faaba4fb7dffcba4a5cf3a999ae | [
"BSD-3-Clause"
] | null | null | null | 2020/day07/day07.py | maxschalz/advent_of_code | 537ff10b74fb0faaba4fb7dffcba4a5cf3a999ae | [
"BSD-3-Clause"
] | null | null | null | 2020/day07/day07.py | maxschalz/advent_of_code | 537ff10b74fb0faaba4fb7dffcba4a5cf3a999ae | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re
import unittest
COLOR = "shiny gold"
FNAME = "input.txt"
N_ITER = 1e7
TEST_FNAME = "test_input.txt"
def main():
"""Main function."""
data = load_input(FNAME)
part1(data)
part2(data)
print("\nUnittests")
unittest.main()
def part1(d... | 29.189655 | 74 | 0.590471 | 4,091 | 0.805474 | 0 | 0 | 617 | 0.121481 | 0 | 0 | 1,758 | 0.346131 |
453b632b266da30271e1e4710f1d5bea075bf4fb | 1,937 | py | Python | cluster/image/pro_seafile_7.1/scripts_7.1/start.py | chaosbunker/seafile-docker | 560d982d8cd80a20508bf616abc0dc741d7b5d84 | [
"Apache-2.0"
] | 503 | 2015-11-11T22:07:36.000Z | 2022-03-28T21:29:30.000Z | cluster/image/pro_seafile_7.1/scripts_7.1/start.py | chaosbunker/seafile-docker | 560d982d8cd80a20508bf616abc0dc741d7b5d84 | [
"Apache-2.0"
] | 209 | 2015-07-13T04:49:38.000Z | 2022-03-25T22:06:18.000Z | cluster/image/pro_seafile_7.1/scripts_7.1/start.py | chaosbunker/seafile-docker | 560d982d8cd80a20508bf616abc0dc741d7b5d84 | [
"Apache-2.0"
] | 195 | 2015-07-09T18:11:47.000Z | 2022-03-25T11:56:53.000Z | #!/usr/bin/env python3
#coding: UTF-8
import os
import sys
import time
import json
import argparse
from os.path import join, exists, dirname
from upgrade import check_upgrade
from utils import call, get_conf, get_script, get_command_output, get_install_dir
installdir = get_install_dir()
topdir = dirname(installdir)
... | 29.348485 | 113 | 0.653588 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 563 | 0.290656 |
453bee7425b707c77a51058c3fca5c10f29a6d05 | 4,774 | py | Python | codit/stats/de_duplication_stat.py | saikat107/OpenNMT-py | 148b0d860e78120de704f7a6671e8eced251801b | [
"MIT"
] | null | null | null | codit/stats/de_duplication_stat.py | saikat107/OpenNMT-py | 148b0d860e78120de704f7a6671e8eced251801b | [
"MIT"
] | null | null | null | codit/stats/de_duplication_stat.py | saikat107/OpenNMT-py | 148b0d860e78120de704f7a6671e8eced251801b | [
"MIT"
] | null | null | null | import sys, os
import nltk
import numpy as np
class Patch():
def __init__(self):
self.id = -1
self.parent_code = ''
self.child_code = ''
self.patches = []
self.verdict = False
self.distance = 0
self.verdict_token = False
pass
def __repr__(self):
... | 35.626866 | 102 | 0.59845 | 443 | 0.092794 | 0 | 0 | 0 | 0 | 0 | 0 | 942 | 0.197319 |
453c01d612c70ef3a56e01d8f48863230c296568 | 4,934 | py | Python | pysnark/qaptools/runqapgen.py | Charterhouse/pysnark | 4d8ae194a918c57a84c9f42f2d9809d66e90f006 | [
"RSA-MD"
] | 65 | 2018-01-12T08:49:18.000Z | 2022-03-16T07:35:40.000Z | pysnark/qaptools/runqapgen.py | Charterhouse/pysnark | 4d8ae194a918c57a84c9f42f2d9809d66e90f006 | [
"RSA-MD"
] | 9 | 2018-01-19T21:14:02.000Z | 2019-10-15T09:48:01.000Z | pysnark/qaptools/runqapgen.py | Charterhouse/pysnark | 4d8ae194a918c57a84c9f42f2d9809d66e90f006 | [
"RSA-MD"
] | 13 | 2018-01-15T20:50:57.000Z | 2022-03-25T05:39:36.000Z | # Copyright (c) 2016-2018 Koninklijke Philips N.V. All rights reserved. A
# copyright license for redistribution and use in source and binary forms,
# with or without modification, is hereby granted for non-commercial,
# experimental and research purposes, provided that the following conditions
# are met:
# - Redistrib... | 37.378788 | 114 | 0.688285 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,916 | 0.591001 |
453c20b8c1cf91ca7912ad336c0a4f1a000e5011 | 4,024 | py | Python | tubee/utils/__init__.py | tomy0000000/Tubee | 1bfbd3cde118cd8a31499b8255b311602fde85bc | [
"MIT"
] | 8 | 2020-12-09T13:01:41.000Z | 2022-01-09T10:06:25.000Z | tubee/utils/__init__.py | tomy0000000/Tubee | 1bfbd3cde118cd8a31499b8255b311602fde85bc | [
"MIT"
] | 141 | 2019-08-21T20:23:07.000Z | 2022-03-29T14:02:27.000Z | tubee/utils/__init__.py | tomy0000000/Tubee | 1bfbd3cde118cd8a31499b8255b311602fde85bc | [
"MIT"
] | 7 | 2020-07-28T08:52:06.000Z | 2021-07-26T02:15:36.000Z | """Helper Functions
Some Misc Functions used in this app
"""
import secrets
import string
from functools import wraps
from urllib.parse import urljoin, urlparse
from dateutil import parser
from flask import abort, current_app, request
from flask_login import current_user
from flask_migrate import upgrade
def setup_... | 27.006711 | 88 | 0.685885 | 0 | 0 | 0 | 0 | 433 | 0.107604 | 0 | 0 | 1,627 | 0.404324 |
453cbca8f170f8d57f86e5292c872a332ff4738e | 1,094 | py | Python | HourlyCrime/hour.py | pauljrodriguezcs/Chicago_Crime_Analysis | 8f385fdfbb8b770631a458edf03f90836f33b674 | [
"MIT"
] | 1 | 2020-02-12T16:25:23.000Z | 2020-02-12T16:25:23.000Z | HourlyCrime/hour.py | pauljrodriguezcs/Chicago_Crime_Analysis | 8f385fdfbb8b770631a458edf03f90836f33b674 | [
"MIT"
] | null | null | null | HourlyCrime/hour.py | pauljrodriguezcs/Chicago_Crime_Analysis | 8f385fdfbb8b770631a458edf03f90836f33b674 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import scipy.linalg as la
print("loading time series... ")
plt.figure(figsize=(16,9))
timeSeries = np.loadtxt('TheftTS.txt',delimiter=',',dtype=float) # load data
hourly = timeSeries[:,0]
plt.plot(hourly,'r-', label='Theft')
timeSeries = np.loadtxt... | 30.388889 | 85 | 0.71755 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 321 | 0.293419 |
453cc274659ff78328110cd29e7888f4f4d189f2 | 2,733 | py | Python | scripts/annotation_csv.py | RulerOf/keras-yolo3 | 8d091cf42b2f126626ad8610adf31293225b7daa | [
"MIT"
] | 37 | 2018-10-20T15:50:18.000Z | 2021-06-18T14:31:50.000Z | scripts/annotation_csv.py | RulerOf/keras-yolo3 | 8d091cf42b2f126626ad8610adf31293225b7daa | [
"MIT"
] | 34 | 2019-04-10T18:59:08.000Z | 2021-03-24T11:08:36.000Z | scripts/annotation_csv.py | RulerOf/keras-yolo3 | 8d091cf42b2f126626ad8610adf31293225b7daa | [
"MIT"
] | 13 | 2019-08-29T08:19:05.000Z | 2021-09-20T10:13:31.000Z | """
Creating training file from own custom dataset
>> python annotation_csv.py \
--path_dataset ~/Data/PeopleDetections \
--path_output ../model_data
"""
import os
import sys
import glob
import argparse
import logging
import pandas as pd
import tqdm
sys.path += [os.path.abspath('.'), os.path.abspath('..')]
... | 33.740741 | 86 | 0.626418 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 523 | 0.191365 |
453d3dd28ce2e196af7faf59e068a64e46af26e2 | 3,280 | py | Python | Assignment_2/one_vs_one.py | hthuwal/mcs-ml-assignments | 1d2850b82f49ccf31eec3c8f921f09d6260d13a4 | [
"MIT"
] | 3 | 2018-11-23T10:36:36.000Z | 2021-12-16T17:47:22.000Z | Assignment_2/one_vs_one.py | hthuwal/mcs-ml-assignments | 1d2850b82f49ccf31eec3c8f921f09d6260d13a4 | [
"MIT"
] | null | null | null | Assignment_2/one_vs_one.py | hthuwal/mcs-ml-assignments | 1d2850b82f49ccf31eec3c8f921f09d6260d13a4 | [
"MIT"
] | 7 | 2018-11-14T18:14:12.000Z | 2021-12-16T17:47:34.000Z | from pegasos import bgd_pegasos
import numpy as np
import pandas as pd
import pickle
import sys
def read_data(file):
x = pd.read_csv(file, header=None)
if x.shape[1] > 784:
y = np.array(x[[784]]).flatten()
x = x.drop(columns=[784])
else:
y = np.zeros(x.shape[0])
x = x.as_matri... | 27.107438 | 108 | 0.498171 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 232 | 0.070732 |
453dfae7aa03af853f997301ef1cbbd1ca05e43a | 1,533 | py | Python | tools/numpy-examples.py | martinahogg/machinelearning | 03b473375e64a0398177194df2fe26a1a89feedf | [
"Apache-2.0"
] | 2 | 2017-08-17T14:38:14.000Z | 2017-08-17T14:40:32.000Z | tools/numpy-examples.py | martinahogg/machinelearning | 03b473375e64a0398177194df2fe26a1a89feedf | [
"Apache-2.0"
] | null | null | null | tools/numpy-examples.py | martinahogg/machinelearning | 03b473375e64a0398177194df2fe26a1a89feedf | [
"Apache-2.0"
] | null | null | null | import numpy as np
# Inner (or dot) product
a = np.array([1,2])
b = np.array([3,4])
np.inner(a, b)
a.dot(b)
# Outer product
a = np.array([1,2])
b = np.array([3,4])
np.outer(a, b)
# Inverse
m = np.array([[1,2], [3,4]])
np.linalg.inv(m)
# Inner (or dot) product
m = np.array([[1,2], [3,4]])
minv = np.linalg.inv(m)
m.... | 20.716216 | 79 | 0.629485 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 708 | 0.46184 |
453fdaffee2d4ec5ec8223f0fa753fce8c413273 | 14,337 | py | Python | src/relstorage/tests/util.py | lungj/relstorage | e18394b0197f6b70708037f36defbd3fe3ee5137 | [
"ZPL-2.1"
] | null | null | null | src/relstorage/tests/util.py | lungj/relstorage | e18394b0197f6b70708037f36defbd3fe3ee5137 | [
"ZPL-2.1"
] | null | null | null | src/relstorage/tests/util.py | lungj/relstorage | e18394b0197f6b70708037f36defbd3fe3ee5137 | [
"ZPL-2.1"
] | null | null | null | import os
import platform
import unittest
# ZODB >= 3.9. The blob directory can be a private cache.
shared_blob_dir_choices = (False, True)
RUNNING_ON_TRAVIS = os.environ.get('TRAVIS')
RUNNING_ON_APPVEYOR = os.environ.get('APPVEYOR')
RUNNING_ON_CI = RUNNING_ON_TRAVIS or RUNNING_ON_APPVEYOR
def _do_not_skip(reason):... | 37.046512 | 92 | 0.604032 | 12,093 | 0.843482 | 0 | 0 | 0 | 0 | 0 | 0 | 2,881 | 0.200949 |
45409f2dbf3fb01dea755f2b203a25f415411768 | 2,435 | py | Python | sktime/datatypes/_panel/_examples.py | marcio55afr/sktime | 25ba2f470f037366ca6b0e529137d3d0a6191e2e | [
"BSD-3-Clause"
] | 5,349 | 2019-03-21T14:56:50.000Z | 2022-03-31T11:25:30.000Z | sktime/datatypes/_panel/_examples.py | marcio55afr/sktime | 25ba2f470f037366ca6b0e529137d3d0a6191e2e | [
"BSD-3-Clause"
] | 1,803 | 2019-03-26T13:33:53.000Z | 2022-03-31T23:58:10.000Z | sktime/datatypes/_panel/_examples.py | marcio55afr/sktime | 25ba2f470f037366ca6b0e529137d3d0a6191e2e | [
"BSD-3-Clause"
] | 911 | 2019-03-25T01:21:30.000Z | 2022-03-31T04:45:51.000Z | # -*- coding: utf-8 -*-
"""Example generation for testing.
Exports dict of examples, useful for testing as fixtures.
example_dict: dict indexed by triple
1st element = mtype - str
2nd element = considered as this scitype - str
3rd element = int - index of example
elements are data objects, considered examples f... | 31.623377 | 79 | 0.632444 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,167 | 0.479261 |
4540a0cc0547d5162f147799d9341ebb9bb38b1a | 2,951 | py | Python | ipfnlite/get_los_diaggeom.py | guimarais/AUGlite | 8b6f6fbf57d974eabd7eb4c04c8b18478a38c9de | [
"MIT"
] | null | null | null | ipfnlite/get_los_diaggeom.py | guimarais/AUGlite | 8b6f6fbf57d974eabd7eb4c04c8b18478a38c9de | [
"MIT"
] | null | null | null | ipfnlite/get_los_diaggeom.py | guimarais/AUGlite | 8b6f6fbf57d974eabd7eb4c04c8b18478a38c9de | [
"MIT"
] | null | null | null | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 9 15:34:36 2019
@author: eseliuni
"""
from __future__ import print_function
#from builtins import str
#from builtins import range
import os
def get_coordinate_from_line(coordinate, line):
"""
Returns a value of a coordinate from a line
... | 35.554217 | 118 | 0.583192 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 867 | 0.293799 |
4544050d8eb06081ede4910d4218a872c580f338 | 35 | py | Python | src/mock/webrepl.py | hipek/esp32-heating-control | 4ee511118eb9a208e92298bdcf9c9242368c1806 | [
"MIT"
] | null | null | null | src/mock/webrepl.py | hipek/esp32-heating-control | 4ee511118eb9a208e92298bdcf9c9242368c1806 | [
"MIT"
] | null | null | null | src/mock/webrepl.py | hipek/esp32-heating-control | 4ee511118eb9a208e92298bdcf9c9242368c1806 | [
"MIT"
] | null | null | null | def start(password=None):
pass
| 11.666667 | 25 | 0.685714 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
454453eab91aa77a631ac0aa12025ca69dac8cdb | 4,294 | py | Python | app.py | univoid/a3x | 46f48363f191344747fec5e643efe1b467fb04c3 | [
"MIT"
] | null | null | null | app.py | univoid/a3x | 46f48363f191344747fec5e643efe1b467fb04c3 | [
"MIT"
] | null | null | null | app.py | univoid/a3x | 46f48363f191344747fec5e643efe1b467fb04c3 | [
"MIT"
] | null | null | null | import os
import base64
import botocore
import boto3
import json
import urllib
from chalice import BadRequestError
from chalice import ChaliceViewError
from chalice import Chalice
app = Chalice(app_name='a3x')
app.debug = True
REGION = 'us-east-1'
BUCKET = 'freko-001'
S3 = boto3.resource('s3')
REKOGNITION = boto3.cl... | 30.027972 | 96 | 0.642757 | 0 | 0 | 0 | 0 | 700 | 0.163018 | 0 | 0 | 1,095 | 0.255007 |
188445351d4fd03596d67479b0ce34074904480c | 7,387 | py | Python | nnutils/laplacian_loss.py | lolrudy/GPV_pose | f326a623b3e45e6edfc1963b068e8e7aaea2bfff | [
"MIT"
] | 10 | 2022-03-16T02:14:56.000Z | 2022-03-31T19:01:34.000Z | nnutils/laplacian_loss.py | lolrudy/GPV_pose | f326a623b3e45e6edfc1963b068e8e7aaea2bfff | [
"MIT"
] | 1 | 2022-03-18T06:43:16.000Z | 2022-03-18T06:56:35.000Z | nnutils/laplacian_loss.py | lolrudy/GPV_pose | f326a623b3e45e6edfc1963b068e8e7aaea2bfff | [
"MIT"
] | 2 | 2022-03-19T13:06:28.000Z | 2022-03-19T16:08:18.000Z | # --------------------------------------------------------
# Written by Yufei Ye (https://github.com/JudyYe)
# --------------------------------------------------------
from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
# Copyright (c) Facebook, Inc. and its affi... | 36.569307 | 84 | 0.578855 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,666 | 0.63165 |
18864b9d7449a28b5e8d9bd986a21846e666ecbc | 3,294 | py | Python | bioimageio/spec/commands.py | esgomezm/spec-bioimage-io | 2bc3f8177d5346ac94bf8a771ed619e076c6e935 | [
"MIT"
] | null | null | null | bioimageio/spec/commands.py | esgomezm/spec-bioimage-io | 2bc3f8177d5346ac94bf8a771ed619e076c6e935 | [
"MIT"
] | null | null | null | bioimageio/spec/commands.py | esgomezm/spec-bioimage-io | 2bc3f8177d5346ac94bf8a771ed619e076c6e935 | [
"MIT"
] | null | null | null | import shutil
import traceback
from pathlib import Path
from pprint import pprint
from typing import List, Optional, Union
from marshmallow import ValidationError
from bioimageio.spec import export_resource_package, load_raw_resource_description
from bioimageio.spec.shared.raw_nodes import URI
from bioimageio.spec.sh... | 34.3125 | 112 | 0.663327 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 649 | 0.197025 |
18865f902dc6b7cb2f38ac721fff0266a60bf991 | 1,309 | py | Python | pettingzoo/test/max_cycles_test.py | RedTachyon/PettingZoo | 0c4be0ca0de5a11bf8eff3f7b87976edcacd093e | [
"Apache-2.0"
] | 846 | 2020-05-12T05:55:00.000Z | 2021-10-08T19:38:40.000Z | pettingzoo/test/max_cycles_test.py | RedTachyon/PettingZoo | 0c4be0ca0de5a11bf8eff3f7b87976edcacd093e | [
"Apache-2.0"
] | 237 | 2020-04-27T06:01:39.000Z | 2021-10-13T02:55:54.000Z | pettingzoo/test/max_cycles_test.py | RedTachyon/PettingZoo | 0c4be0ca0de5a11bf8eff3f7b87976edcacd093e | [
"Apache-2.0"
] | 126 | 2020-05-29T04:20:29.000Z | 2021-10-13T05:31:12.000Z | import numpy as np
def max_cycles_test(mod):
max_cycles = 4
parallel_env = mod.parallel_env(max_cycles=max_cycles)
observations = parallel_env.reset()
dones = {agent: False for agent in parallel_env.agents}
test_cycles = max_cycles + 10 # allows environment to do more than max_cycles if it so wi... | 36.361111 | 121 | 0.683728 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 264 | 0.201681 |
188756e6fbd2150cbbb2fc3f3acd8c382070ad00 | 3,460 | py | Python | models/models.py | nv-tlabs/DIB-R-Single-Image-3D-Reconstruction | faa6364cc6ec464f81f960a9fa6b55bbf3443d5f | [
"Apache-2.0"
] | 8 | 2021-09-10T04:54:54.000Z | 2022-03-26T02:34:54.000Z | models/models.py | nv-tlabs/DIB-R-Single-Image-3D-Reconstruction | faa6364cc6ec464f81f960a9fa6b55bbf3443d5f | [
"Apache-2.0"
] | 2 | 2021-11-12T17:10:26.000Z | 2022-03-24T14:59:01.000Z | models/models.py | nv-tlabs/DIB-R-Single-Image-3D-Reconstruction | faa6364cc6ec464f81f960a9fa6b55bbf3443d5f | [
"Apache-2.0"
] | 2 | 2021-09-19T16:25:26.000Z | 2021-12-27T16:01:31.000Z | '''
MIT License
Copyright (c) 2020 Autonomous Vision Group (AVG), Max Planck Institute for Intelligent Systems Tübingen
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, inclu... | 35.306122 | 148 | 0.695954 | 1,219 | 0.35221 | 0 | 0 | 0 | 0 | 0 | 0 | 2,319 | 0.670038 |
18875eee96b4d3c67bcfb581481611caf6ee9b44 | 4,855 | py | Python | slixmpp/plugins/xep_0223.py | marconfus/slixmpp | bcf186f42dc31d360e0a0af8a4b3aaf1e0b212aa | [
"BSD-3-Clause"
] | null | null | null | slixmpp/plugins/xep_0223.py | marconfus/slixmpp | bcf186f42dc31d360e0a0af8a4b3aaf1e0b212aa | [
"BSD-3-Clause"
] | null | null | null | slixmpp/plugins/xep_0223.py | marconfus/slixmpp | bcf186f42dc31d360e0a0af8a4b3aaf1e0b212aa | [
"BSD-3-Clause"
] | null | null | null | """
Slixmpp: The Slick XMPP Library
Copyright (C) 2012 Nathanael C. Fritz, Lance J.T. Stout
This file is part of Slixmpp.
See the file LICENSE for copying permission.
"""
import logging
from slixmpp.xmlstream import register_stanza_plugin
from slixmpp.plugins.base import BasePlugin, register_plugin
... | 40.458333 | 82 | 0.557158 | 4,469 | 0.920494 | 0 | 0 | 0 | 0 | 0 | 0 | 2,602 | 0.535942 |
18890abc6529f42ce336f6f93049f9ebe7b6d9a1 | 3,578 | py | Python | merge_pdf/merge.py | DariHernandez/merge_pdf | 5aa0df950caee81d1a2c2709697f82472858b7ec | [
"MIT"
] | null | null | null | merge_pdf/merge.py | DariHernandez/merge_pdf | 5aa0df950caee81d1a2c2709697f82472858b7ec | [
"MIT"
] | null | null | null | merge_pdf/merge.py | DariHernandez/merge_pdf | 5aa0df950caee81d1a2c2709697f82472858b7ec | [
"MIT"
] | 1 | 2021-06-23T19:46:42.000Z | 2021-06-23T19:46:42.000Z | #! python3
# Combines all the pafs in the current working directory into a single pdf
import PyPDF2, os, sys, logging
class Merge ():
"""
Merge all pdfs in the current folder, or specific list of files,
by name, into a single pdf file
"""
def __init__ (self, file_output = "", replace = False, d... | 31.385965 | 103 | 0.564561 | 3,453 | 0.965064 | 0 | 0 | 0 | 0 | 0 | 0 | 1,156 | 0.323086 |
1889e33c1df53b96578448ca9e90add8e038bfe9 | 3,941 | py | Python | test/inprogress/mock/JobBrowserBFF_get_job_log_mock_test.py | eapearson/kbase-skd-module-job-browser-bff | 426445f90569adac16632ef4921f174e51abd42f | [
"MIT"
] | null | null | null | test/inprogress/mock/JobBrowserBFF_get_job_log_mock_test.py | eapearson/kbase-skd-module-job-browser-bff | 426445f90569adac16632ef4921f174e51abd42f | [
"MIT"
] | 6 | 2020-05-26T17:40:07.000Z | 2022-03-11T16:33:11.000Z | test/inprogress/mock/JobBrowserBFF_get_job_log_mock_test.py | eapearson/kbase-skd-module-job-browser-bff | 426445f90569adac16632ef4921f174e51abd42f | [
"MIT"
] | 1 | 2020-05-26T17:12:59.000Z | 2020-05-26T17:12:59.000Z | # -*- coding: utf-8 -*-
import traceback
from JobBrowserBFF.TestBase import TestBase
from biokbase.Errors import ServiceError
import unittest
import re
UPSTREAM_SERVICE = 'mock'
ENV = 'mock'
JOB_ID_WITH_LOGS = '59820c93e4b06f68bf751eeb' # non-admin
JOB_ID_NO_LOGS = '5cf1522aaa5a4d298c5dc2ff' # non-admin
JOB_ID_NOT_F... | 36.831776 | 107 | 0.603146 | 3,471 | 0.880741 | 0 | 0 | 0 | 0 | 0 | 0 | 934 | 0.236996 |
188cb20c595f8931979892b300bbc3dc12968c1c | 674 | py | Python | migrations/versions/323f8d77567b_index_related_entity_names.py | yaelmi3/backslash | edf39caf97af2c926da01c340a83648f4874e97e | [
"BSD-3-Clause"
] | 17 | 2015-11-25T13:02:38.000Z | 2021-12-14T20:18:36.000Z | migrations/versions/323f8d77567b_index_related_entity_names.py | yaelmi3/backslash | edf39caf97af2c926da01c340a83648f4874e97e | [
"BSD-3-Clause"
] | 533 | 2015-11-24T12:47:13.000Z | 2022-02-12T07:59:08.000Z | migrations/versions/323f8d77567b_index_related_entity_names.py | parallelsystems/backslash | 577cdd18d5f665a8b493c4b2e2a605b7e0f6e11b | [
"BSD-3-Clause"
] | 15 | 2015-11-22T13:25:54.000Z | 2022-02-16T19:23:11.000Z | """Index related entity names
Revision ID: 323f8d77567b
Revises: 82b34e2777a4
Create Date: 2016-11-16 13:00:25.782487
"""
# revision identifiers, used by Alembic.
revision = '323f8d77567b'
down_revision = '82b34e2777a4'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated ... | 24.962963 | 93 | 0.71365 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 451 | 0.669139 |
1890545ab78e2e102de4a2155cb00d7f5cb2cdc7 | 772 | py | Python | learn/02week/code/cc_dicegame.py | tmax818/nucamp_intro_python | 6fac59f53054055ba4ab40559c44eba07b7f9fd6 | [
"MIT"
] | null | null | null | learn/02week/code/cc_dicegame.py | tmax818/nucamp_intro_python | 6fac59f53054055ba4ab40559c44eba07b7f9fd6 | [
"MIT"
] | null | null | null | learn/02week/code/cc_dicegame.py | tmax818/nucamp_intro_python | 6fac59f53054055ba4ab40559c44eba07b7f9fd6 | [
"MIT"
] | null | null | null | import random
high_score = 0
def dice_game():
global high_score
while True:
print("Current High Score: ", high_score)
print("1) Roll Dice")
print("2) Leave Game")
choice = input("Enter your choice: ")
if choice == "2":
print("Goodbye")
break
... | 20.864865 | 56 | 0.477979 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 166 | 0.215026 |
189105da68157256feb66cf959f48a9d4b0c8a3a | 51 | py | Python | tests/development/destination/gcs/test_delete_bucket.py | denssk/backup | 292d5f1b1a3765ce0ea8d3cab8bd1ae0c583f72e | [
"Apache-2.0"
] | 69 | 2016-06-29T16:13:55.000Z | 2022-03-21T06:38:37.000Z | tests/development/destination/gcs/test_delete_bucket.py | denssk/backup | 292d5f1b1a3765ce0ea8d3cab8bd1ae0c583f72e | [
"Apache-2.0"
] | 237 | 2016-09-28T02:12:34.000Z | 2022-03-25T13:32:23.000Z | tests/development/destination/gcs/test_delete_bucket.py | denssk/backup | 292d5f1b1a3765ce0ea8d3cab8bd1ae0c583f72e | [
"Apache-2.0"
] | 45 | 2017-01-04T21:20:27.000Z | 2021-12-29T10:42:22.000Z | def test_delete_bucket(gs):
gs.delete_bucket()
| 17 | 27 | 0.745098 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
189184fcb0cca3093cef204f192b8979a5c7f238 | 29,762 | py | Python | SVS/model/utils/utils.py | ftshijt/SVS_system | 569d0a2f7ae89965bde132e5be538f6a84be471f | [
"Apache-2.0"
] | null | null | null | SVS/model/utils/utils.py | ftshijt/SVS_system | 569d0a2f7ae89965bde132e5be538f6a84be471f | [
"Apache-2.0"
] | null | null | null | SVS/model/utils/utils.py | ftshijt/SVS_system | 569d0a2f7ae89965bde132e5be538f6a84be471f | [
"Apache-2.0"
] | null | null | null | """Copyright [2020] [Jiatong Shi].
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softwar... | 32.140389 | 88 | 0.540152 | 454 | 0.015205 | 0 | 0 | 0 | 0 | 0 | 0 | 5,023 | 0.16823 |
18918e38b1911d887e6cd9f7014807483471a02f | 10,115 | py | Python | run_classifier.py | to-aoki/my-pytorch-bert | 8e412ae6331f5f19fee55b430be389de2f5c49a6 | [
"Apache-2.0"
] | 21 | 2019-03-04T03:43:19.000Z | 2022-02-14T15:50:41.000Z | run_classifier.py | to-aoki/my-pytorch-bert | 8e412ae6331f5f19fee55b430be389de2f5c49a6 | [
"Apache-2.0"
] | 1 | 2019-10-07T17:49:21.000Z | 2019-12-14T11:50:10.000Z | run_classifier.py | to-aoki/my-pytorch-bert | 8e412ae6331f5f19fee55b430be389de2f5c49a6 | [
"Apache-2.0"
] | 5 | 2019-07-19T07:04:55.000Z | 2020-07-01T13:24:14.000Z | # Author Toshihiko Aoki
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softw... | 43.787879 | 120 | 0.625309 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,909 | 0.287593 |
1891a7b479098620bf760b07575489ea73d1fccf | 279 | py | Python | dev/urls.py | ledgku/utilscombine | aaf13ca2208bcf522f005c64769c34bc8e8ee9f4 | [
"MIT"
] | 2 | 2018-07-18T10:10:01.000Z | 2018-07-18T10:10:17.000Z | dev/urls.py | ledgku/utilscombine | aaf13ca2208bcf522f005c64769c34bc8e8ee9f4 | [
"MIT"
] | 5 | 2018-09-19T11:33:54.000Z | 2021-06-10T20:43:32.000Z | dev/urls.py | ledgku/utilscombine | aaf13ca2208bcf522f005c64769c34bc8e8ee9f4 | [
"MIT"
] | null | null | null | from django.urls import path
from dev.views import FindMyIp,FindMyGps
app_name = 'dev'
urlpatterns = [
# path('', Main.as_view(), name = 'index'),
path('findmyip', FindMyIp.as_view(), name = 'findmyip'),
path('findmygps', FindMyGps.as_view(), name = 'findmygps'),
] | 27.9 | 63 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 90 | 0.322581 |
1891f24339199dafe363a5f1dfae29b9615437e5 | 406 | py | Python | cookbook/c02/p17_html_xml.py | itpubs/python3-cookbook | 140f5e4cc0416b9674edca7f4c901b1f58fc1415 | [
"Apache-2.0"
] | 3 | 2018-09-19T06:44:13.000Z | 2019-03-24T10:07:07.000Z | cookbook/c02/p17_html_xml.py | itpubs/python3-cookbook | 140f5e4cc0416b9674edca7f4c901b1f58fc1415 | [
"Apache-2.0"
] | 2 | 2020-09-19T17:10:23.000Z | 2020-10-17T16:43:52.000Z | cookbook/c02/p17_html_xml.py | itpubs/python3-cookbook | 140f5e4cc0416b9674edca7f4c901b1f58fc1415 | [
"Apache-2.0"
] | 1 | 2020-07-20T22:10:31.000Z | 2020-07-20T22:10:31.000Z | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""
Topic: 处理html和xml文本
Desc :
"""
import html
def html_xml():
s = 'Elements are written as "<tag>text</tag>".'
print(s)
print(html.escape(s))
# Disable escaping of quotes
print(html.escape(s, quote=False))
s = 'Spicy Jalapeño'
print(s.enc... | 16.916667 | 56 | 0.618227 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 216 | 0.517986 |
1892414a440ce9963c67565a93d5515f1867c2ed | 53 | py | Python | utils/__init__.py | Rfam/rfam-production | 36f3963380da2a08e9cf73c951691c4e95738ac4 | [
"Apache-2.0"
] | 7 | 2016-06-17T09:21:11.000Z | 2021-10-13T20:25:06.000Z | utils/__init__.py | mb1069/rfam-production | 10c76e249dc22d30862b3a873fd54f390e859ad8 | [
"Apache-2.0"
] | 82 | 2016-04-08T10:51:32.000Z | 2022-03-11T13:49:18.000Z | utils/__init__.py | mb1069/rfam-production | 10c76e249dc22d30862b3a873fd54f390e859ad8 | [
"Apache-2.0"
] | 3 | 2019-09-01T09:46:35.000Z | 2021-11-29T08:01:58.000Z | __all__ = ['db_utils', 'RfamDB', 'parse_taxbrowser']
| 26.5 | 52 | 0.698113 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 36 | 0.679245 |
1892cc18e4d651a8551d9ce9d603987daef5b912 | 625 | py | Python | jina/drivers/craft.py | slettner/jina | 4140961c62359e3acd540a6d88931665c6313824 | [
"Apache-2.0"
] | null | null | null | jina/drivers/craft.py | slettner/jina | 4140961c62359e3acd540a6d88931665c6313824 | [
"Apache-2.0"
] | null | null | null | jina/drivers/craft.py | slettner/jina | 4140961c62359e3acd540a6d88931665c6313824 | [
"Apache-2.0"
] | null | null | null | __copyright__ = "Copyright (c) 2020 Jina AI Limited. All rights reserved."
__license__ = "Apache-2.0"
from typing import Optional
from . import FlatRecursiveMixin, BaseExecutableDriver, DocsExtractUpdateMixin
class CraftDriver(DocsExtractUpdateMixin, FlatRecursiveMixin, BaseExecutableDriver):
"""Drivers inherit... | 31.25 | 84 | 0.72 | 411 | 0.6576 | 0 | 0 | 69 | 0.1104 | 0 | 0 | 153 | 0.2448 |
18931f6a4553b81704db5d7e58f8609781b151d9 | 5,543 | py | Python | solutionbox/structured_data/mltoolbox/_structured_data/preprocess/local_preprocess.py | freyrsae/pydatalab | 9aba1ac6bbe8e1384e7a4b07c5042af84348797d | [
"Apache-2.0"
] | 198 | 2016-07-14T19:47:52.000Z | 2022-03-15T08:45:21.000Z | solutionbox/structured_data/mltoolbox/_structured_data/preprocess/local_preprocess.py | freyrsae/pydatalab | 9aba1ac6bbe8e1384e7a4b07c5042af84348797d | [
"Apache-2.0"
] | 534 | 2016-07-15T19:12:43.000Z | 2022-03-11T23:11:39.000Z | solutionbox/structured_data/mltoolbox/_structured_data/preprocess/local_preprocess.py | freyrsae/pydatalab | 9aba1ac6bbe8e1384e7a4b07c5042af84348797d | [
"Apache-2.0"
] | 86 | 2016-07-13T17:39:05.000Z | 2021-11-03T03:39:41.000Z | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | 32.798817 | 86 | 0.673642 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,993 | 0.359553 |
189920c0b5a16b9f087f121b4d4d90e4791b2184 | 5,876 | py | Python | habitrac/habits/api/resolvers.py | IgnisDa/habitrac | 0b5f6f1f4a6659c4cce49aacae54cdb0e74af67a | [
"Apache-2.0"
] | null | null | null | habitrac/habits/api/resolvers.py | IgnisDa/habitrac | 0b5f6f1f4a6659c4cce49aacae54cdb0e74af67a | [
"Apache-2.0"
] | null | null | null | habitrac/habits/api/resolvers.py | IgnisDa/habitrac | 0b5f6f1f4a6659c4cce49aacae54cdb0e74af67a | [
"Apache-2.0"
] | null | null | null | import datetime
import json
from ariadne import MutationType, QueryType, convert_kwargs_to_snake_case
from ariadne_token_auth.decorators import login_required
from django.contrib.auth import get_user_model
from habits import models as habit_models
from utils.general import get_user
from utils.handlers.errors import Er... | 32.826816 | 89 | 0.681246 | 0 | 0 | 0 | 0 | 5,435 | 0.924949 | 0 | 0 | 912 | 0.155208 |
189970d0714654ace0194ba8650e7bc2d279578b | 2,542 | py | Python | src/target_matrix.py | smusali/rightwhalerecognition | 0def80bc7e19864093008112455ae08869b40501 | [
"MIT"
] | null | null | null | src/target_matrix.py | smusali/rightwhalerecognition | 0def80bc7e19864093008112455ae08869b40501 | [
"MIT"
] | null | null | null | src/target_matrix.py | smusali/rightwhalerecognition | 0def80bc7e19864093008112455ae08869b40501 | [
"MIT"
] | null | null | null | import csv, pylab as pl, re
DB = dict();
BD = dict();
whales_ = [];
classes = [];
line_num = 0;
with open('data/train.csv', 'rb') as train_class_data:
data = csv.reader(train_class_data, delimiter=',');
for line in data:
if (line_num == 0):
line_num += 1;
continue;
keys... | 30.261905 | 80 | 0.562549 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 185 | 0.072777 |
1899c8f523a33646e893cd33cd3682188e0ca8e5 | 5,990 | py | Python | src/fsec/yammler.py | HiggsHydra/permian-frac-exchange | 1dd1e409e5389373590c7d3780a54cd9f12d1166 | [
"MIT"
] | null | null | null | src/fsec/yammler.py | HiggsHydra/permian-frac-exchange | 1dd1e409e5389373590c7d3780a54cd9f12d1166 | [
"MIT"
] | null | null | null | src/fsec/yammler.py | HiggsHydra/permian-frac-exchange | 1dd1e409e5389373590c7d3780a54cd9f12d1166 | [
"MIT"
] | null | null | null | from typing import Union
from datetime import datetime
import os
import tempfile
from contextlib import contextmanager
import logging
from collections import Counter
import yaml
logger = logging.getLogger(__name__)
class Yammler(dict):
_no_dump = ["changed"]
_metavars = ["fspath", "updated_at"]
def __i... | 26.504425 | 88 | 0.543573 | 4,568 | 0.762604 | 621 | 0.103673 | 1,224 | 0.204341 | 0 | 0 | 763 | 0.127379 |
189b834780427e5805e8ddb0880c32074d93411d | 879 | py | Python | pricecalc/pricecalc/apps/calc/migrations/0024_ldstp_alter_furnitureincalc_options.py | oocemb/Calculation | 91d202d1b5a2dde6376487147517310682294278 | [
"Apache-2.0"
] | null | null | null | pricecalc/pricecalc/apps/calc/migrations/0024_ldstp_alter_furnitureincalc_options.py | oocemb/Calculation | 91d202d1b5a2dde6376487147517310682294278 | [
"Apache-2.0"
] | null | null | null | pricecalc/pricecalc/apps/calc/migrations/0024_ldstp_alter_furnitureincalc_options.py | oocemb/Calculation | 91d202d1b5a2dde6376487147517310682294278 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 4.0.2 on 2022-03-25 11:59
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('calc', '0023_delete_handle_alter_calctag_options_and_more'),
]
operations = [
migrations.CreateModel(
name='Ldstp',
... | 32.555556 | 117 | 0.602958 | 820 | 0.898138 | 0 | 0 | 0 | 0 | 0 | 0 | 275 | 0.301205 |
189c6b3a4cd4803a7422b2fd630d54013aa0aa1e | 14,356 | py | Python | aiida_siesta/calculations/stm.py | mailhexu/aiida_siesta_plugin | 313ef4b3532b54d8d0c81788b683c53cb4701965 | [
"MIT"
] | null | null | null | aiida_siesta/calculations/stm.py | mailhexu/aiida_siesta_plugin | 313ef4b3532b54d8d0c81788b683c53cb4701965 | [
"MIT"
] | 2 | 2019-05-12T22:11:46.000Z | 2019-05-13T11:46:16.000Z | aiida_siesta/calculations/stm.py | mailhexu/aiida_siesta_plugin | 313ef4b3532b54d8d0c81788b683c53cb4701965 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import os
# Module with fdf-aware dictionary
from tkdict import FDFDict
from aiida.orm.calculation.job import JobCalculation
from aiida.common.exceptions import InputValidationError
from aiida.common.datastructures import CalcInfo
from aiida.common.utils import classproperty
from aiida.common.... | 39.657459 | 278 | 0.60156 | 9,335 | 0.650251 | 0 | 0 | 1,026 | 0.071468 | 0 | 0 | 6,061 | 0.422193 |
189dad7d4fc31c11984202f5abd8d52b7d7034ce | 5,974 | py | Python | backend/api/fixtures/test/functional_test/load_ft_data.py | amichard/tfrs | ed3973016cc5c2ae48999d550a23b41a5ddad807 | [
"Apache-2.0"
] | 18 | 2017-05-10T21:55:11.000Z | 2021-03-01T16:41:32.000Z | backend/api/fixtures/test/functional_test/load_ft_data.py | amichard/tfrs | ed3973016cc5c2ae48999d550a23b41a5ddad807 | [
"Apache-2.0"
] | 1,167 | 2017-03-04T00:18:43.000Z | 2022-03-03T22:31:51.000Z | backend/api/fixtures/test/functional_test/load_ft_data.py | amichard/tfrs | ed3973016cc5c2ae48999d550a23b41a5ddad807 | [
"Apache-2.0"
] | 48 | 2017-03-09T17:19:39.000Z | 2022-02-24T16:38:17.000Z | import uuid
import os
from datetime import datetime
from django.db import transaction
from api.management.data_script import OperationalDataScript
from api.models.CompliancePeriod import CompliancePeriod
from api.models.Organization import Organization
from api.models.OrganizationActionsType import OrganizationActio... | 55.831776 | 132 | 0.68999 | 5,329 | 0.892032 | 0 | 0 | 4,470 | 0.748242 | 0 | 0 | 1,239 | 0.207399 |
189e049c8ff1d8fc6680e58e527827763bd3d33c | 3,456 | py | Python | challenge/agoda_cancellation_prediction.py | ZebraForce9/IML.HUJI | a263a621331c7c7d51c90c8325f76aa0797d424e | [
"MIT"
] | null | null | null | challenge/agoda_cancellation_prediction.py | ZebraForce9/IML.HUJI | a263a621331c7c7d51c90c8325f76aa0797d424e | [
"MIT"
] | null | null | null | challenge/agoda_cancellation_prediction.py | ZebraForce9/IML.HUJI | a263a621331c7c7d51c90c8325f76aa0797d424e | [
"MIT"
] | null | null | null | from challenge.agoda_cancellation_estimator import AgodaCancellationEstimator
from IMLearn.utils import split_train_test
from IMLearn.base import BaseEstimator
import numpy as np
import pandas as pd
def load_data(filename: str):
"""
Load Agoda booking cancellation dataset
Parameters
----------
fi... | 37.565217 | 120 | 0.713252 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,853 | 0.536169 |
189ea5728ae22b441ea875f1bd0c5faac3a76ced | 294 | py | Python | example2.py | presidento/scripthelper | 71b9e69f2967fb8d352376213c046263d5c31849 | [
"MIT"
] | null | null | null | example2.py | presidento/scripthelper | 71b9e69f2967fb8d352376213c046263d5c31849 | [
"MIT"
] | 3 | 2020-04-28T13:14:31.000Z | 2021-01-15T09:41:56.000Z | example2.py | presidento/scripthelper | 71b9e69f2967fb8d352376213c046263d5c31849 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import scripthelper
scripthelper.add_argument("-n", "--name", help="Name to greet")
logger, args = scripthelper.bootstrap_args()
if args.name:
logger.debug("Name was provided")
logger.info(f"Hello {args.name}")
else:
logger.warning("Name was not provided")
| 24.5 | 63 | 0.710884 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 111 | 0.377551 |
18a1a66ddfc12bbc493302b88cd1fbc01b59d040 | 71 | py | Python | Chapter 01/Chap01_Example1.40.py | Anancha/Programming-Techniques-using-Python | e80c329d2a27383909d358741a5cab03cb22fd8b | [
"MIT"
] | null | null | null | Chapter 01/Chap01_Example1.40.py | Anancha/Programming-Techniques-using-Python | e80c329d2a27383909d358741a5cab03cb22fd8b | [
"MIT"
] | null | null | null | Chapter 01/Chap01_Example1.40.py | Anancha/Programming-Techniques-using-Python | e80c329d2a27383909d358741a5cab03cb22fd8b | [
"MIT"
] | null | null | null | #backslash and new line ignored
print("one\
two\
three")
| 14.2 | 31 | 0.591549 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 0.873239 |
18a1ae9b017d856fff834435791dc30cf0986f3f | 15,575 | py | Python | turbo_seti/find_event/find_event_pipeline.py | savinshynu/turbo_seti | 7d756f130af5a323403affcdcb9f9bfa62325836 | [
"MIT"
] | null | null | null | turbo_seti/find_event/find_event_pipeline.py | savinshynu/turbo_seti | 7d756f130af5a323403affcdcb9f9bfa62325836 | [
"MIT"
] | null | null | null | turbo_seti/find_event/find_event_pipeline.py | savinshynu/turbo_seti | 7d756f130af5a323403affcdcb9f9bfa62325836 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
r"""
Front-facing script to find drifting, narrowband events in a set of generalized
cadences of ON-OFF radio SETI observations.
The main function contained in this file is :func:`find_event_pipeline` calls
find_events from find_events.py to read a list of turboSETI .dat files.
It then finds eve... | 41.094987 | 144 | 0.616116 | 404 | 0.025939 | 0 | 0 | 0 | 0 | 0 | 0 | 7,899 | 0.507159 |
18a1b4659b986cda93994b346c85aae4f37fb1a4 | 1,558 | py | Python | scripts/plot_snaps.py | wordsworthgroup/libode | c3e9dbfe3e09c49ed666f10ae8fb964b37ecb479 | [
"MIT"
] | 11 | 2020-02-27T22:32:04.000Z | 2021-05-06T17:51:50.000Z | scripts/plot_snaps.py | markmbaum/libode | c3e9dbfe3e09c49ed666f10ae8fb964b37ecb479 | [
"MIT"
] | null | null | null | scripts/plot_snaps.py | markmbaum/libode | c3e9dbfe3e09c49ed666f10ae8fb964b37ecb479 | [
"MIT"
] | 2 | 2021-09-26T07:36:55.000Z | 2021-11-29T23:45:32.000Z | import numpy as np
import matplotlib.pyplot as plt
#Dahlquist test
#sol1ex = lambda t: np.exp(-t)
#sol2ex = lambda t: np.exp(-2*t)
#oscillator 1
sol1ex = lambda t: np.cos(t**2/2)
sol2ex = lambda t: np.sin(t**2/2)
#oscillator 2
#sol1ex = lambda t: np.exp(np.sin(t**2))
#sol2ex = lambda t: np.exp(np.cos(t**2))
name = 'O... | 29.396226 | 86 | 0.632863 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 448 | 0.287548 |
18a22f9ecd12b8cd2ba070dcb05f2e55ef3f8d64 | 86 | py | Python | mne/datasets/kiloword/__init__.py | fmamashli/mne-python | 52f064415e7c9fa8fe243d22108dcdf3d86505b9 | [
"BSD-3-Clause"
] | 1,953 | 2015-01-17T20:33:46.000Z | 2022-03-30T04:36:34.000Z | mne/datasets/kiloword/__init__.py | fmamashli/mne-python | 52f064415e7c9fa8fe243d22108dcdf3d86505b9 | [
"BSD-3-Clause"
] | 8,490 | 2015-01-01T13:04:18.000Z | 2022-03-31T23:02:08.000Z | mne/datasets/kiloword/__init__.py | fmamashli/mne-python | 52f064415e7c9fa8fe243d22108dcdf3d86505b9 | [
"BSD-3-Clause"
] | 1,130 | 2015-01-08T22:39:27.000Z | 2022-03-30T21:44:26.000Z | """MNE visual_92_categories dataset."""
from .kiloword import data_path, get_version
| 21.5 | 44 | 0.790698 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 39 | 0.453488 |
18a3288be8f39dff9c36e526ba62428f9babcc0d | 1,688 | py | Python | app/framework/tagger_framework/tagger/pos/evaluation.py | kislerdm/nlp_pos_demo | cea5a0432e3fc0a626f090d40a28e084e3243efc | [
"MIT"
] | null | null | null | app/framework/tagger_framework/tagger/pos/evaluation.py | kislerdm/nlp_pos_demo | cea5a0432e3fc0a626f090d40a28e084e3243efc | [
"MIT"
] | null | null | null | app/framework/tagger_framework/tagger/pos/evaluation.py | kislerdm/nlp_pos_demo | cea5a0432e3fc0a626f090d40a28e084e3243efc | [
"MIT"
] | null | null | null | # Dmitry Kisler © 2020-present
# www.dkisler.com
from typing import List, Dict
from sklearn.metrics import f1_score, accuracy_score
def model_performance(y_true: List[List[str]],
y_pred: List[List[str]]) -> Dict[str, float]:
"""Accuracy calculation function
Args:
y_true: List... | 29.103448 | 83 | 0.598934 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 757 | 0.448194 |
18a5fa9fa6c228a2b9d1020387a728db780df2f0 | 3,451 | py | Python | tools/interpret.py | Notgnoshi/generative | d9702c18b59553541f0cce706089f9fad501cd33 | [
"MIT"
] | 5 | 2021-02-11T07:55:51.000Z | 2022-02-10T01:11:02.000Z | tools/interpret.py | Notgnoshi/generative | d9702c18b59553541f0cce706089f9fad501cd33 | [
"MIT"
] | 67 | 2020-12-31T18:02:05.000Z | 2022-02-21T14:57:52.000Z | tools/interpret.py | Notgnoshi/generative | d9702c18b59553541f0cce706089f9fad501cd33 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""Interpret an L-String as a set of 3D Turtle commands and record the turtle's path.
Multiple lines of input will be treated as a continuation of a single L-String.
Default commandset:
F,G - Step forward while drawing
f,g - Step forward without drawing
-,+ - Yaw around the normal ... | 29 | 101 | 0.634888 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,464 | 0.424225 |
18a6ffdb28982da58249e4d719411ed0e1af6ac5 | 699 | py | Python | PointsToRobot.py | chuong/robot-arm-manipulation | a5ad277f86c278ccf8fe99abe337d0c64f8a407e | [
"MIT"
] | null | null | null | PointsToRobot.py | chuong/robot-arm-manipulation | a5ad277f86c278ccf8fe99abe337d0c64f8a407e | [
"MIT"
] | null | null | null | PointsToRobot.py | chuong/robot-arm-manipulation | a5ad277f86c278ccf8fe99abe337d0c64f8a407e | [
"MIT"
] | null | null | null |
"""
@author: yuboya
"""
### pins position to be sent to robot
## from TransformationCalculation:
import numpy as np
import math
def PointsToRobot(alpha, deltax,deltay,deltaz,xyzc):
sina = math.sin(alpha)
cosa = math.cos(alpha)
pointrs = []
for pointc in xyzc:
# ... | 18.891892 | 61 | 0.542203 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 131 | 0.187411 |
18a73b665ef0eeab4028398fb264c011541365f0 | 2,418 | py | Python | plugins/module_utils/github_api.py | zp4rker/ansible-github-api | 8b4d154915a5d92ec6f379d50cfb2c66a07fb16c | [
"Apache-2.0"
] | null | null | null | plugins/module_utils/github_api.py | zp4rker/ansible-github-api | 8b4d154915a5d92ec6f379d50cfb2c66a07fb16c | [
"Apache-2.0"
] | null | null | null | plugins/module_utils/github_api.py | zp4rker/ansible-github-api | 8b4d154915a5d92ec6f379d50cfb2c66a07fb16c | [
"Apache-2.0"
] | null | null | null | import requests
import json
from json import JSONDecodeError
base_uri = "https://api.github.com/"
licenses = ['afl-3.0', 'apache-2.0', 'artistic-2.0', 'bsl-1.0', 'bsd-2-clause', 'license bsd-3-clause', 'bsd-3-clause-clear', 'cc', 'cc0-1.0', 'cc-by-4.0', 'cc-by-sa-4.0', 'wtfpl', 'ecl-2.0', 'epl-1.0', 'epl-2.0', 'eu... | 34.056338 | 413 | 0.619934 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 915 | 0.378412 |
18a994a759d85007cf88e43e5353bf80d7ac9a5c | 3,055 | py | Python | src/onegov/core/datamanager.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/datamanager.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | src/onegov/core/datamanager.py | politbuero-kampagnen/onegov-cloud | 20148bf321b71f617b64376fe7249b2b9b9c4aa9 | [
"MIT"
] | null | null | null | import os
import tempfile
import transaction
from onegov.core import log
from onegov.core.utils import safe_move
class MailDataManager(object):
""" Takes a postman and an envelope and sends it when the transaction
is commited.
Since we can't really know if a mail can be sent until it happens, we
sim... | 24.637097 | 73 | 0.629133 | 2,935 | 0.96072 | 0 | 0 | 208 | 0.068085 | 0 | 0 | 419 | 0.137152 |
18aaa916c943bdb538fc41fcf2673ef26fba2444 | 3,603 | py | Python | djangocms_modules/models.py | crydotsnake/djangocms-modules | ab5b75ee1076e6fccab1a26b8dbe1c754c4de8d7 | [
"BSD-3-Clause"
] | 8 | 2019-01-29T15:11:30.000Z | 2020-06-07T19:27:50.000Z | djangocms_modules/models.py | crydotsnake/djangocms-modules | ab5b75ee1076e6fccab1a26b8dbe1c754c4de8d7 | [
"BSD-3-Clause"
] | 11 | 2018-12-14T14:01:06.000Z | 2020-09-02T09:02:49.000Z | djangocms_modules/models.py | divio/djangocms-modules | 8328f130cddd4cf5f90beca170d1303b95158cda | [
"BSD-3-Clause"
] | 3 | 2021-04-16T12:26:27.000Z | 2021-06-25T14:53:47.000Z | from django.conf import settings
from django.db import models
from django.dispatch import receiver
from django.urls import Resolver404, resolve
from django.utils.functional import cached_property
from django.utils.translation import gettext_lazy as _
from cms import operations
from cms.models import CMSPlugin, Placeho... | 27.090226 | 75 | 0.686095 | 1,856 | 0.515126 | 0 | 0 | 1,402 | 0.38912 | 0 | 0 | 351 | 0.097419 |
18ad2e27ac7dd39dc407f19da04c84adb7ca9a06 | 553 | py | Python | do_tasks.py | youqingkui/zhihufav | 97c465d1bf825a6621d221c39a3677887cbd9261 | [
"MIT"
] | null | null | null | do_tasks.py | youqingkui/zhihufav | 97c465d1bf825a6621d221c39a3677887cbd9261 | [
"MIT"
] | null | null | null | do_tasks.py | youqingkui/zhihufav | 97c465d1bf825a6621d221c39a3677887cbd9261 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#coding=utf-8
import json
from lib.sqs import zhihufav_sqs
from lib.tasks import add_note
def get_sqs_queue():
sqs_info = zhihufav_sqs.get_messages(10)
for sqs in sqs_info:
sqs_body = sqs.get_body()
receipt_handle = sqs.receipt_handle
sqs_json = json.loads(sqs_bo... | 22.12 | 60 | 0.679928 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 66 | 0.119349 |