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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
3254729c0575b8bd980f42074c2cb939b0ad6cf0 | 1,382 | py | Python | problems/p012.py | 10jmellott/ProjectEuler | eb84d129bbc37ba10ad7814ad2138d81568e0085 | [
"Unlicense"
] | null | null | null | problems/p012.py | 10jmellott/ProjectEuler | eb84d129bbc37ba10ad7814ad2138d81568e0085 | [
"Unlicense"
] | null | null | null | problems/p012.py | 10jmellott/ProjectEuler | eb84d129bbc37ba10ad7814ad2138d81568e0085 | [
"Unlicense"
] | null | null | null | """<a href="https://projecteuler.net/problem=12" class="title-custom-link">Highly divisible triangular number</a>
The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle
number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The first ten terms would be:
1, 3, 6, 10, 15, 21, 28, 36,... | 32.139535 | 113 | 0.664978 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 859 | 0.621563 |
3255418e552bf21eec558aa0897845fa6583a29c | 4,984 | py | Python | u3s2m1ass1-pt6/code/rpg_queries.py | LambdaTheda/lambdata-Unit3 | b44b20f2f3e28d2b17613660ddb562afe4825686 | [
"MIT"
] | null | null | null | u3s2m1ass1-pt6/code/rpg_queries.py | LambdaTheda/lambdata-Unit3 | b44b20f2f3e28d2b17613660ddb562afe4825686 | [
"MIT"
] | null | null | null | u3s2m1ass1-pt6/code/rpg_queries.py | LambdaTheda/lambdata-Unit3 | b44b20f2f3e28d2b17613660ddb562afe4825686 | [
"MIT"
] | 1 | 2020-05-11T04:33:24.000Z | 2020-05-11T04:33:24.000Z | import sqlite3
import os
#DB_FILEPATH = "data/chinook.db"
DB_FILEPATH = os.path.join(os.path.dirname(__file__), "..", "data", "rpg_db.sqlite3")
conn = sqlite3.connect(DB_FILEPATH)
conn.row_factory = sqlite3.Row
print(type(conn)) #> <class 'sqlite3.Connection'>
curs = conn.cursor()
print(type(curs)) #> <class 'sqlite3.... | 30.576687 | 85 | 0.731742 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,926 | 0.787721 |
3256173ee4e9a424745cf36c9f1ac6cf9bf2bc08 | 7,872 | py | Python | tools/table.py | asterick/minimon.js | 4876544525eb1bfef1b81a12807e7ba37cdd4949 | [
"0BSD"
] | 5 | 2019-04-25T00:19:56.000Z | 2020-09-02T01:24:40.000Z | tools/table.py | asterick/minimon.js | 4876544525eb1bfef1b81a12807e7ba37cdd4949 | [
"0BSD"
] | 6 | 2020-05-23T23:17:59.000Z | 2022-02-17T21:50:46.000Z | tools/table.py | asterick/minimon.js | 4876544525eb1bfef1b81a12807e7ba37cdd4949 | [
"0BSD"
] | null | null | null | #!/usr/bin/env python3
# ISC License
#
# Copyright (c) 2019, Bryon Vandiver
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFT... | 32.528926 | 123 | 0.506225 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,113 | 0.395452 |
325927f14aed5b03fe28e7161da22ac9db1b0f2b | 15,364 | py | Python | test_log.py | erkooi/desp_tools | 2bea2e44591ceeeb62cbfe163b4635a3157f6582 | [
"Apache-2.0"
] | null | null | null | test_log.py | erkooi/desp_tools | 2bea2e44591ceeeb62cbfe163b4635a3157f6582 | [
"Apache-2.0"
] | null | null | null | test_log.py | erkooi/desp_tools | 2bea2e44591ceeeb62cbfe163b4635a3157f6582 | [
"Apache-2.0"
] | null | null | null | ###############################################################################
#
# Copyright (C) 2012
# ASTRON (Netherlands Institute for Radio Astronomy) <http://www.astron.nl/>
# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
#
# This program is free software: you can redistribute it and/or modify
# it under the term... | 48.466877 | 164 | 0.570034 | 13,327 | 0.867417 | 0 | 0 | 0 | 0 | 0 | 0 | 7,437 | 0.484054 |
325b56ca169aa22d3b3e5e502acb535b1e7a8a46 | 868 | py | Python | subaudible/subparse.py | RobbieClarken/subaudible | f22bdec90693727b36eff426e96d6960387fb94d | [
"MIT"
] | null | null | null | subaudible/subparse.py | RobbieClarken/subaudible | f22bdec90693727b36eff426e96d6960387fb94d | [
"MIT"
] | null | null | null | subaudible/subparse.py | RobbieClarken/subaudible | f22bdec90693727b36eff426e96d6960387fb94d | [
"MIT"
] | null | null | null | import re
def parse_srt(line_iter):
"""
Parses SubRip text into caption dicts.
Args:
line_iter: An iterator that yields lines of a SubRip file.
Yields:
dict: Caption dicts with `start`, `end` and `text` keys.
"""
line_iter = iter(line.rstrip('\r\n') for line in line_iter)
... | 27.125 | 67 | 0.59447 | 0 | 0 | 527 | 0.607143 | 0 | 0 | 0 | 0 | 297 | 0.342166 |
325b89ab7374be326978f10a334f001191bd3ead | 1,971 | py | Python | application/models/basemodel.py | ahmedsadman/festive | e0e739f126de2e8368014398f5c928c410098da5 | [
"MIT"
] | 2 | 2020-10-19T23:26:23.000Z | 2020-10-20T02:14:10.000Z | application/models/basemodel.py | ahmedsadman/fest-management-api | e0e739f126de2e8368014398f5c928c410098da5 | [
"MIT"
] | null | null | null | application/models/basemodel.py | ahmedsadman/fest-management-api | e0e739f126de2e8368014398f5c928c410098da5 | [
"MIT"
] | 1 | 2021-08-04T15:45:29.000Z | 2021-08-04T15:45:29.000Z | from sqlalchemy import func
from application import db
from application.helpers.error_handlers import ServerError
class BaseModel(db.Model):
__abstract__ = True
def save(self):
"""save the item to database"""
try:
db.session.add(self)
db.session.commit()
except... | 33.982759 | 78 | 0.597666 | 1,854 | 0.940639 | 0 | 0 | 1,297 | 0.658042 | 0 | 0 | 639 | 0.324201 |
325ca5543e9808ec6039d4cf69192bb2bde47b8f | 522 | py | Python | tests/core/resource_test_base.py | alteia-ai/alteia-python-sdk | 27ec7458334334ed6a1edae52cb25d5ce8734177 | [
"MIT"
] | 11 | 2020-12-22T14:39:21.000Z | 2022-02-18T16:34:34.000Z | tests/core/resource_test_base.py | alteia-ai/alteia-python-sdk | 27ec7458334334ed6a1edae52cb25d5ce8734177 | [
"MIT"
] | 1 | 2021-08-05T14:21:12.000Z | 2021-08-09T13:22:55.000Z | tests/core/resource_test_base.py | alteia-ai/alteia-python-sdk | 27ec7458334334ed6a1edae52cb25d5ce8734177 | [
"MIT"
] | null | null | null | import os
from unittest.mock import patch
import alteia
from tests.alteiatest import AlteiaTestBase
class ResourcesTestBase(AlteiaTestBase):
@classmethod
def setUpClass(cls):
with patch('alteia.core.connection.token.TokenManager.renew_token') as mock:
mock.return_value = None
... | 27.473684 | 89 | 0.726054 | 418 | 0.800766 | 0 | 0 | 366 | 0.701149 | 0 | 0 | 75 | 0.143678 |
325dd1dcfd3afeca98237f91ac72ec8dacd09a26 | 137 | py | Python | scripts/viterbi.py | Tereshchenkolab/digitize-ecg-cli | fa5a17c5390a11ce07e39e6a8eecb56ed38b16a1 | [
"MIT"
] | 6 | 2021-06-12T08:20:33.000Z | 2022-03-01T15:32:35.000Z | scripts/viterbi.py | Tereshchenkolab/ecg-digitize | fa5a17c5390a11ce07e39e6a8eecb56ed38b16a1 | [
"MIT"
] | null | null | null | scripts/viterbi.py | Tereshchenkolab/ecg-digitize | fa5a17c5390a11ce07e39e6a8eecb56ed38b16a1 | [
"MIT"
] | null | null | null | from ecgdigitize.signal.extraction.viterbi import *
if __name__ == "__main__":
print(list(interpolate(Point(0,0), Point(5,5)))) | 27.4 | 56 | 0.70073 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 0.072993 |
325fc49ee449fcf77d594c853f23436486f7b300 | 2,711 | py | Python | tests/io/s3/test_s3_fetcher.py | ToucanToco/PeaKina | afaeec65d9b136d42331f140c3048d27bcddb6b1 | [
"BSD-3-Clause"
] | null | null | null | tests/io/s3/test_s3_fetcher.py | ToucanToco/PeaKina | afaeec65d9b136d42331f140c3048d27bcddb6b1 | [
"BSD-3-Clause"
] | null | null | null | tests/io/s3/test_s3_fetcher.py | ToucanToco/PeaKina | afaeec65d9b136d42331f140c3048d27bcddb6b1 | [
"BSD-3-Clause"
] | null | null | null | from typing import Any, Dict
import boto3
import pytest
from s3fs import S3FileSystem
from peakina.io.s3.s3_fetcher import S3Fetcher
@pytest.fixture
def s3_fetcher(s3_endpoint_url):
return S3Fetcher(client_kwargs={"endpoint_url": s3_endpoint_url})
def test_s3_fetcher_open(s3_fetcher):
dirpath = "s3://acce... | 33.8875 | 94 | 0.693471 | 626 | 0.230911 | 0 | 0 | 118 | 0.043526 | 0 | 0 | 709 | 0.261527 |
3262d7cd59e5780cbf71323fcb7c77c193d6904e | 324 | py | Python | testemunhoweb/consulta/migrations/0002_auto_20191202_0219.py | danielcamilo13/testemunhoWEB | 46825e31123058fa6ee21e4e71e9e0bedde32bb4 | [
"bzip2-1.0.6"
] | 1 | 2019-12-03T01:37:13.000Z | 2019-12-03T01:37:13.000Z | testemunhoweb/consulta/migrations/0002_auto_20191202_0219.py | danielcamilo13/testemunhoWEB | 46825e31123058fa6ee21e4e71e9e0bedde32bb4 | [
"bzip2-1.0.6"
] | 11 | 2020-06-06T01:28:35.000Z | 2022-03-12T00:16:34.000Z | testemunhoweb/consulta/migrations/0002_auto_20191202_0219.py | danielcamilo13/testemunhoWEB | 46825e31123058fa6ee21e4e71e9e0bedde32bb4 | [
"bzip2-1.0.6"
] | null | null | null | # Generated by Django 2.2.7 on 2019-12-02 05:19
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('consulta', '0001_initial'),
]
operations = [
migrations.RenameModel(
old_name='generate',
new_name='consulta',
),
... | 18 | 47 | 0.58642 | 239 | 0.737654 | 0 | 0 | 0 | 0 | 0 | 0 | 91 | 0.280864 |
32638416d54a115fde42bba19086c99e40948e61 | 802 | py | Python | backend/events/tests/test_views.py | trfoss/parrot | 2f120ee1ab82368f85b2b5a7f1c45afc26aa8963 | [
"BSD-2-Clause"
] | 5 | 2019-02-25T02:24:51.000Z | 2019-04-21T00:56:43.000Z | backend/events/tests/test_views.py | trfoss/parrot | 2f120ee1ab82368f85b2b5a7f1c45afc26aa8963 | [
"BSD-2-Clause"
] | 51 | 2019-02-06T03:36:27.000Z | 2021-06-10T21:11:24.000Z | backend/events/tests/test_views.py | trfoss/parrot | 2f120ee1ab82368f85b2b5a7f1c45afc26aa8963 | [
"BSD-2-Clause"
] | 7 | 2019-02-06T04:37:10.000Z | 2019-03-28T07:52:26.000Z | """
backend/events/tests/test_views.py
Tests for the events page views. We use the test client. Read more at
https://docs.djangoproject.com/en/2.1/topics/testing/tools/
"""
import json
from django.test import TestCase
class EventsPageViewTests(TestCase):
"""Events page view tests for route /events/data
""... | 26.733333 | 69 | 0.63591 | 577 | 0.719451 | 0 | 0 | 0 | 0 | 0 | 0 | 400 | 0.498753 |
32649f15ad311acc51f598d331270d3f4fb588d6 | 497 | py | Python | instructors/lessons/practical_utils/examples/os-path-walk.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 46 | 2017-09-27T20:19:36.000Z | 2020-12-08T10:07:19.000Z | instructors/lessons/practical_utils/examples/os-path-walk.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 6 | 2018-01-09T08:07:37.000Z | 2020-09-07T12:25:13.000Z | instructors/lessons/practical_utils/examples/os-path-walk.py | mgadagin/PythonClass | 70b370362d75720b3fb0e1d6cc8158f9445e9708 | [
"MIT"
] | 18 | 2017-10-10T02:06:51.000Z | 2019-12-01T10:18:13.000Z | import os
import os.path
def visit(arg, dirname, names):
print dirname, arg
for name in names:
subname = os.path.join(dirname, name)
if os.path.isdir(subname):
print ' %s/' % name
else:
print ' %s' % name
print
os.mkdir('example')
os.mkdir('example/one')
f... | 22.590909 | 45 | 0.591549 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 124 | 0.249497 |
326587ea3dd2af6a3849b34225b40c151ddc17b4 | 532 | py | Python | tikplay/provider/tests/retriever_test.py | tietokilta-saato/tikplay | 8061451c21f06bd07129a8a42543ea86b7518d4a | [
"MIT"
] | 2 | 2015-01-15T14:14:50.000Z | 2015-10-23T05:37:34.000Z | tikplay/provider/tests/retriever_test.py | tietokilta-saato/tikplay | 8061451c21f06bd07129a8a42543ea86b7518d4a | [
"MIT"
] | 8 | 2015-01-12T10:27:27.000Z | 2015-05-11T12:05:03.000Z | tikplay/provider/tests/retriever_test.py | tietokilta-saato/tikplay | 8061451c21f06bd07129a8a42543ea86b7518d4a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Part of tikplay
# Yes, this is a bit of a non-test.
from nose.tools import *
from tikplay.provider.retriever import Retriever
class TestRetriever(object):
def __init__(self):
self.retriever = Retriever({})
@raises(NotImplementedError)
def test_handles(self):
self.r... | 25.333333 | 73 | 0.682331 | 380 | 0.714286 | 0 | 0 | 178 | 0.334586 | 0 | 0 | 112 | 0.210526 |
3265c12d40cc56aa2b76c483dff904dc52c43391 | 11,333 | py | Python | myfunds/web/views/crypto/views.py | anzodev/myfunds | 9f6cda99f443cec064d15d7ff7780f297cbdfe10 | [
"MIT"
] | null | null | null | myfunds/web/views/crypto/views.py | anzodev/myfunds | 9f6cda99f443cec064d15d7ff7780f297cbdfe10 | [
"MIT"
] | null | null | null | myfunds/web/views/crypto/views.py | anzodev/myfunds | 9f6cda99f443cec064d15d7ff7780f297cbdfe10 | [
"MIT"
] | null | null | null | import csv
import io
from datetime import datetime
import peewee as pw
from flask import Blueprint
from flask import g
from flask import make_response
from flask import redirect
from flask import render_template
from flask import request
from flask import url_for
from wtforms import Form
from wtforms import IntegerFie... | 29.667539 | 88 | 0.682344 | 141 | 0.012442 | 0 | 0 | 9,970 | 0.879732 | 0 | 0 | 1,212 | 0.106944 |
32664ad5a10d717905dcb559f04579027da2c523 | 268 | py | Python | Python/InvertTree.py | lywc20/daily-programming | 78529e535aea5bda409e5a2a009274dca7011e29 | [
"MIT"
] | null | null | null | Python/InvertTree.py | lywc20/daily-programming | 78529e535aea5bda409e5a2a009274dca7011e29 | [
"MIT"
] | null | null | null | Python/InvertTree.py | lywc20/daily-programming | 78529e535aea5bda409e5a2a009274dca7011e29 | [
"MIT"
] | null | null | null | class TreeNode:
def __init__(self,val):
self.left = None
self.right = None
self.val = None
def invertTree(self,root):
if root:
root.left, root.right = self.invertTree(root.right), self.invertTree(root.left)
return root
| 24.363636 | 87 | 0.619403 | 118 | 0.440299 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
32665f5e99814a1ca419ee599a7bb327ba8ffbf0 | 9,115 | py | Python | src/modeci_mdf/interfaces/pytorch/mod_torch_builtins.py | 29riyasaxena/MDF | 476e6950d0f14f29463eb4f6e3be518dfb2160a5 | [
"Apache-2.0"
] | 12 | 2021-01-18T20:38:21.000Z | 2022-03-29T15:01:10.000Z | src/modeci_mdf/interfaces/pytorch/mod_torch_builtins.py | 29riyasaxena/MDF | 476e6950d0f14f29463eb4f6e3be518dfb2160a5 | [
"Apache-2.0"
] | 101 | 2020-12-14T15:23:07.000Z | 2022-03-31T17:06:19.000Z | src/modeci_mdf/interfaces/pytorch/mod_torch_builtins.py | 29riyasaxena/MDF | 476e6950d0f14f29463eb4f6e3be518dfb2160a5 | [
"Apache-2.0"
] | 15 | 2020-12-04T22:37:14.000Z | 2022-03-31T09:48:03.000Z | """
Wrap commonly-used torch builtins in nn.Module subclass
for easier automatic construction of script
"""
import torch
import torch.nn as nn
import torch.nn.functional as F
class argmax(torch.nn.Module):
def __init__(self):
super().__init__()
def forward(self, A):
return torch.argmax(A)
c... | 23.798956 | 88 | 0.501042 | 8,515 | 0.934174 | 0 | 0 | 0 | 0 | 0 | 0 | 528 | 0.057926 |
326698864c4df87b158debf66bd86b994c325aa0 | 8,068 | py | Python | taf/testlib/snmphelpers.py | stepanandr/taf | 75cb85861f8e9703bab7dc6195f3926b8394e3d0 | [
"Apache-2.0"
] | 10 | 2016-12-16T00:05:58.000Z | 2018-10-30T17:48:25.000Z | taf/testlib/snmphelpers.py | stepanandr/taf | 75cb85861f8e9703bab7dc6195f3926b8394e3d0 | [
"Apache-2.0"
] | 40 | 2017-01-04T23:07:05.000Z | 2018-04-16T19:52:02.000Z | taf/testlib/snmphelpers.py | stepanandr/taf | 75cb85861f8e9703bab7dc6195f3926b8394e3d0 | [
"Apache-2.0"
] | 23 | 2016-12-30T05:03:53.000Z | 2020-04-01T08:40:24.000Z | # Copyright (c) 2011 - 2017, Intel Corporation.
#
# 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 agre... | 29.992565 | 104 | 0.649603 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,353 | 0.415592 |
3266f7d31cc045815dafabe76a68d2f3cebde4da | 6,843 | py | Python | cadence/apps/backend/views.py | BitLooter/Cadence | 3adbe51f042120f7154711a58a614ce0e8b3664b | [
"BSD-2-Clause"
] | null | null | null | cadence/apps/backend/views.py | BitLooter/Cadence | 3adbe51f042120f7154711a58a614ce0e8b3664b | [
"BSD-2-Clause"
] | null | null | null | cadence/apps/backend/views.py | BitLooter/Cadence | 3adbe51f042120f7154711a58a614ce0e8b3664b | [
"BSD-2-Clause"
] | null | null | null | import json
import logging
from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseNotFound
from django.core.exceptions import ObjectDoesNotExist
from django.views.decorators.csrf import csrf_exempt # See note below on saveplaylist
import models
# Set up logging
logger = logging.getLogger("apps")... | 34.736041 | 153 | 0.672366 | 0 | 0 | 0 | 0 | 3,981 | 0.581762 | 0 | 0 | 3,447 | 0.503726 |
32675e661c420861aca3a72ce984ac5043cdeab4 | 2,868 | py | Python | elexon_api/utils.py | GiorgioBalestrieri/elexon_api_tool | 5b271e9d4a52dec5585a232833a699b8392ee6b0 | [
"MIT"
] | 4 | 2019-06-07T11:14:46.000Z | 2021-04-01T14:15:14.000Z | elexon_api/utils.py | GiorgioBalestrieri/elexon_api_tool | 5b271e9d4a52dec5585a232833a699b8392ee6b0 | [
"MIT"
] | null | null | null | elexon_api/utils.py | GiorgioBalestrieri/elexon_api_tool | 5b271e9d4a52dec5585a232833a699b8392ee6b0 | [
"MIT"
] | 6 | 2019-02-28T20:24:26.000Z | 2021-03-30T18:08:23.000Z | import os
from pathlib import Path
import pandas as pd
from collections import defaultdict
from typing import Dict, List
from .config import REQUIRED_D, API_KEY_FILENAME
import logging
logger = logging.getLogger(__name__)
logger.addHandler(logging.NullHandler())
def get_required_parameters(service_code: str) -> Lis... | 25.380531 | 81 | 0.540098 | 45 | 0.01569 | 0 | 0 | 0 | 0 | 0 | 0 | 1,396 | 0.48675 |
326881582afe0e7d4f36578fa52df6c3b487641d | 1,608 | py | Python | relative_connectivity_of_subgraphs.py | doberse/RRI | e2fdc085d8040efc230a25eec670dd6839cbf1f7 | [
"MIT"
] | null | null | null | relative_connectivity_of_subgraphs.py | doberse/RRI | e2fdc085d8040efc230a25eec670dd6839cbf1f7 | [
"MIT"
] | null | null | null | relative_connectivity_of_subgraphs.py | doberse/RRI | e2fdc085d8040efc230a25eec670dd6839cbf1f7 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import networkx as nx
import pandas as pd
#Other nodes connected by one node
r=open('input_data/BC-related_RRI_network.txt')
ll=r.readlines()
r.close()
rna_pairs=[]
node_to_nodes={}
for l in ll:
ws=l.strip().split('\t')
qx=sorted(ws[0:2])
rna_pairs.append((qx[0],qx[1]... | 26.360656 | 99 | 0.625622 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 382 | 0.237562 |
326bc9a28ede548053a0104238484ec204f3ccb0 | 1,518 | py | Python | macdaily/cmd/install.py | JarryShaw/MacDaily | 853b841dd1f1f7e6aae7bf2c305ff008bc76055c | [
"BSD-3-Clause"
] | 10 | 2018-09-20T19:57:56.000Z | 2021-11-14T18:28:10.000Z | macdaily/cmd/install.py | JarryShaw/jsdaily | 3ca7aa7c75a12dc08ab44f78af2b089e1ed41d3d | [
"BSD-3-Clause"
] | 2 | 2020-05-31T08:49:47.000Z | 2021-12-28T16:57:42.000Z | macdaily/cmd/install.py | JarryShaw/jsdaily | 3ca7aa7c75a12dc08ab44f78af2b089e1ed41d3d | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import abc
from macdaily.cls.command import Command
from macdaily.util.tools.print import print_info
class InstallCommand(Command):
@property
def cmd(self):
return 'install'
@property
def act(self):
return ('install', 'installed', 'installed')
@property... | 25.3 | 99 | 0.607378 | 1,388 | 0.914361 | 0 | 0 | 402 | 0.264822 | 0 | 0 | 284 | 0.187088 |
326dd27e7ff223645c2d0bf5d397fdea5ed20af2 | 2,632 | py | Python | src/piotr/cmdline/fs.py | orangecms/piotr | f892ce6eaaa08ea81eb01943a388b64fbf3ccc44 | [
"MIT"
] | 47 | 2021-07-02T08:39:02.000Z | 2021-11-08T22:21:39.000Z | src/piotr/cmdline/fs.py | orangecms/piotr | f892ce6eaaa08ea81eb01943a388b64fbf3ccc44 | [
"MIT"
] | 2 | 2021-07-08T09:25:30.000Z | 2021-07-12T10:06:51.000Z | src/piotr/cmdline/fs.py | orangecms/piotr | f892ce6eaaa08ea81eb01943a388b64fbf3ccc44 | [
"MIT"
] | 5 | 2021-07-08T08:29:17.000Z | 2021-10-18T13:35:11.000Z | """
FS commandline module.
Allows to:
- list host filesystems
- remove a specific host filesystem
- add a specific host filesystem
"""
from os.path import basename
from piotr.cmdline import CmdlineModule, module, command
from piotr.user import UserDirectory as ud
from piotr.util import confirm
@module('fs', 'List, ... | 32.9 | 112 | 0.549392 | 2,275 | 0.864033 | 0 | 0 | 2,333 | 0.886062 | 0 | 0 | 1,165 | 0.442461 |
32717c3bd131867ffad78e96d71e4ee21ce9b1c6 | 61 | py | Python | mct_logging/src/mct_logging/__init__.py | iorodeo/mct | fa8b85f36533c9b1486ca4f6b0c40c3daa6f4e11 | [
"Apache-2.0"
] | null | null | null | mct_logging/src/mct_logging/__init__.py | iorodeo/mct | fa8b85f36533c9b1486ca4f6b0c40c3daa6f4e11 | [
"Apache-2.0"
] | null | null | null | mct_logging/src/mct_logging/__init__.py | iorodeo/mct | fa8b85f36533c9b1486ca4f6b0c40c3daa6f4e11 | [
"Apache-2.0"
] | null | null | null | import tracking_pts_logger_master
import tracking_pts_logger
| 20.333333 | 33 | 0.934426 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
32723b5595559318393e20a40362e1d61e41c415 | 3,133 | py | Python | singlecellmultiomics/modularDemultiplexer/demultiplexModules/scartrace.py | zztin/SingleCellMultiOmics | d3035c33eb1375f0703cc49537417b755ad8a693 | [
"MIT"
] | 17 | 2019-05-21T09:12:16.000Z | 2022-02-14T19:26:58.000Z | singlecellmultiomics/modularDemultiplexer/demultiplexModules/scartrace.py | zztin/SingleCellMultiOmics | d3035c33eb1375f0703cc49537417b755ad8a693 | [
"MIT"
] | 70 | 2019-05-20T08:08:45.000Z | 2021-06-22T15:58:01.000Z | singlecellmultiomics/modularDemultiplexer/demultiplexModules/scartrace.py | zztin/SingleCellMultiOmics | d3035c33eb1375f0703cc49537417b755ad8a693 | [
"MIT"
] | 7 | 2020-04-09T15:11:12.000Z | 2022-02-14T15:23:31.000Z | from singlecellmultiomics.modularDemultiplexer.baseDemultiplexMethods import UmiBarcodeDemuxMethod, NonMultiplexable
# ScarTrace
class ScartraceR1(UmiBarcodeDemuxMethod):
def __init__(self, barcodeFileParser, **kwargs):
self.barcodeFileAlias = 'scartrace'
UmiBarcodeDemuxMethod.__init__(
... | 34.054348 | 125 | 0.605171 | 2,976 | 0.949888 | 0 | 0 | 0 | 0 | 0 | 0 | 470 | 0.150016 |
3272a27a8fc6fa3c964e19b20bd692f8755a0dee | 6,151 | py | Python | tests/models.py | intellineers/django-bridger | ed097984a99df7da40a4d01bd00c56e3c6083056 | [
"BSD-3-Clause"
] | 2 | 2020-03-17T00:53:23.000Z | 2020-07-16T07:00:33.000Z | tests/models.py | intellineers/django-bridger | ed097984a99df7da40a4d01bd00c56e3c6083056 | [
"BSD-3-Clause"
] | 76 | 2019-12-05T01:15:57.000Z | 2021-09-07T16:47:27.000Z | tests/models.py | intellineers/django-bridger | ed097984a99df7da40a4d01bd00c56e3c6083056 | [
"BSD-3-Clause"
] | 1 | 2020-02-05T15:09:47.000Z | 2020-02-05T15:09:47.000Z | from datetime import date, time
from django.contrib.postgres.fields import ArrayField
from django.db import models
from django.utils import timezone
from django_fsm import FSMField, transition
from rest_framework.reverse import reverse
from simple_history.models import HistoricalRecords
from bridger.buttons import Ac... | 31.22335 | 123 | 0.677451 | 5,524 | 0.898065 | 0 | 0 | 5,619 | 0.91351 | 0 | 0 | 1,070 | 0.173955 |
327639bba2a2aa36c47d30fbf67b64ee714db74b | 2,975 | py | Python | RNAstructure_Source/RNAstructure_python_interface/Error_handling.py | mayc2/PseudoKnot_research | 33e94b84435d87aff3d89dbad970c438ac173331 | [
"MIT"
] | null | null | null | RNAstructure_Source/RNAstructure_python_interface/Error_handling.py | mayc2/PseudoKnot_research | 33e94b84435d87aff3d89dbad970c438ac173331 | [
"MIT"
] | null | null | null | RNAstructure_Source/RNAstructure_python_interface/Error_handling.py | mayc2/PseudoKnot_research | 33e94b84435d87aff3d89dbad970c438ac173331 | [
"MIT"
] | null | null | null | #automated error checking for RNAstructure python interface
from __future__ import print_function
import inspect
from functools import wraps
from collections import defaultdict
debug = False
class StructureError(Exception): pass
class RNAstructureInternalError(Exception):pass
lookup_exceptions = defaultdict(lambda:Runt... | 35.416667 | 110 | 0.621176 | 84 | 0.028235 | 0 | 0 | 829 | 0.278655 | 0 | 0 | 379 | 0.127395 |
3276b79a61cf27161c545de376944d5851538c10 | 52,691 | py | Python | Src/si_figs.py | jomimc/FoldAsymCode | 1896e5768e738bb5d1921a3f4c8eaf7f66c06be9 | [
"MIT"
] | 1 | 2020-10-07T14:24:06.000Z | 2020-10-07T14:24:06.000Z | Src/si_figs.py | jomimc/FoldAsymCode | 1896e5768e738bb5d1921a3f4c8eaf7f66c06be9 | [
"MIT"
] | null | null | null | Src/si_figs.py | jomimc/FoldAsymCode | 1896e5768e738bb5d1921a3f4c8eaf7f66c06be9 | [
"MIT"
] | null | null | null | from collections import defaultdict, Counter
from itertools import product, permutations
from glob import glob
import json
import os
from pathlib import Path
import pickle
import sqlite3
import string
import sys
import time
import matplotlib as mpl
from matplotlib import colors
from matplotlib import pyplot as plt
fro... | 42.085463 | 162 | 0.557723 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 9,586 | 0.181929 |
327808782f63cb50deaafbd843fb0446afafa40c | 81 | py | Python | release_ce.py | BTW-Community/BTW-MCP | 4422e153525265029754dec222fc0c0064e03962 | [
"MIT"
] | 2 | 2021-12-12T17:14:53.000Z | 2021-12-25T04:03:18.000Z | release_ce.py | BTW-Community/BTW-MCP | 4422e153525265029754dec222fc0c0064e03962 | [
"MIT"
] | null | null | null | release_ce.py | BTW-Community/BTW-MCP | 4422e153525265029754dec222fc0c0064e03962 | [
"MIT"
] | null | null | null | from btw_mcp import *
package_release("vanilla", "main", directory="ce_release") | 27 | 58 | 0.765432 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 27 | 0.333333 |
327857254668f20b13612c825f93043e95b1c5c9 | 3,449 | py | Python | test_beam_search.py | slegroux/slgBeam | 733049ad4a97f582bc169623941cfbdf3efea207 | [
"Apache-2.0"
] | null | null | null | test_beam_search.py | slegroux/slgBeam | 733049ad4a97f582bc169623941cfbdf3efea207 | [
"Apache-2.0"
] | null | null | null | test_beam_search.py | slegroux/slgBeam | 733049ad4a97f582bc169623941cfbdf3efea207 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# (c) 2020 Sylvain Le Groux <[email protected]>
import pytest
from pytest import approx
import numpy as np
import torch
from IPython import embed
from beam_search import Tokenizer, Score, BeamSearch
@pytest.fixture(scope='module')
def data():
mat = torch.Tensor(np.genfromtxt('data/... | 33.813725 | 98 | 0.632647 | 0 | 0 | 0 | 0 | 540 | 0.156567 | 0 | 0 | 573 | 0.166135 |
327872875221fcfb18f1db81613c4a83884de390 | 3,404 | py | Python | src/main/python/hydra/kafkatest/maxrate_test.py | bopopescu/hydra | ec0793f8c1f49ceb93bf1f1a9789085b68d55f08 | [
"Apache-2.0"
] | 10 | 2016-05-28T15:56:43.000Z | 2018-01-03T21:30:58.000Z | src/main/python/hydra/kafkatest/maxrate_test.py | bopopescu/hydra | ec0793f8c1f49ceb93bf1f1a9789085b68d55f08 | [
"Apache-2.0"
] | 17 | 2016-06-06T22:15:28.000Z | 2020-07-22T20:28:12.000Z | src/main/python/hydra/kafkatest/maxrate_test.py | bopopescu/hydra | ec0793f8c1f49ceb93bf1f1a9789085b68d55f08 | [
"Apache-2.0"
] | 5 | 2016-06-01T22:01:44.000Z | 2020-07-22T20:12:49.000Z | __author__ = 'annyz'
from pprint import pprint, pformat # NOQA
import logging
import os
import sys
from datetime import datetime
from hydra.lib import util
from hydra.kafkatest.runtest import RunTestKAFKA
from hydra.lib.boundary import Scanner
from optparse import OptionParser
l = util.createlogger('runSuitMaxRate',... | 38.247191 | 94 | 0.595476 | 2,426 | 0.712691 | 0 | 0 | 0 | 0 | 0 | 0 | 821 | 0.241187 |
327a37a67a58b314caa95c02379bd85e44d7216f | 722 | py | Python | src/api/v1/villains/serializers.py | reiniervdwindt/power-ranger-api | 13ce639a7f5e9d4b106ce5f094c076db0aad398e | [
"MIT"
] | null | null | null | src/api/v1/villains/serializers.py | reiniervdwindt/power-ranger-api | 13ce639a7f5e9d4b106ce5f094c076db0aad398e | [
"MIT"
] | null | null | null | src/api/v1/villains/serializers.py | reiniervdwindt/power-ranger-api | 13ce639a7f5e9d4b106ce5f094c076db0aad398e | [
"MIT"
] | null | null | null | from rest_framework import serializers
from series.models import Series
from villains.models import Villain
class VillainSeriesSerializer(serializers.ModelSerializer):
name = serializers.CharField()
class Meta(object):
fields = ('id', 'name',)
model = Series
class VillainDetailSerializer(s... | 26.740741 | 88 | 0.688366 | 604 | 0.836565 | 0 | 0 | 0 | 0 | 0 | 0 | 114 | 0.157895 |
327a4fc033970cf2fec138ab6d2ea6fa9e580d97 | 1,574 | py | Python | map_report.py | porcpine1967/aoe2stats | 52965e437b8471753186ba1fc34cb773807eb496 | [
"MIT"
] | null | null | null | map_report.py | porcpine1967/aoe2stats | 52965e437b8471753186ba1fc34cb773807eb496 | [
"MIT"
] | null | null | null | map_report.py | porcpine1967/aoe2stats | 52965e437b8471753186ba1fc34cb773807eb496 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
""" Writes out map popularity of last two pools."""
from datetime import datetime, timedelta
from utils.map_pools import map_type_filter, pools
from utils.tools import execute_sql, last_time_breakpoint, map_name_lookup
SQL = """SELECT map_type, COUNT(*) as cnt
FROM matches
WHERE started BETWEEN ... | 32.122449 | 85 | 0.560991 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 314 | 0.199492 |
327c981e0a47fcedcb62aea60362f8adb3c7ccec | 5,277 | py | Python | common/xrd-ui-tests-qautomate/pagemodel/ss_keys_and_cert_dlg_subject_dname.py | ria-ee/XTM | 6103f3f5bbba387b8b59b050c0c4f1fb2180fc37 | [
"MIT"
] | 3 | 2018-03-15T14:22:50.000Z | 2021-11-08T10:30:35.000Z | common/xrd-ui-tests-qautomate/pagemodel/ss_keys_and_cert_dlg_subject_dname.py | ria-ee/XTM | 6103f3f5bbba387b8b59b050c0c4f1fb2180fc37 | [
"MIT"
] | 11 | 2017-04-06T09:25:41.000Z | 2018-06-04T09:08:48.000Z | common/xrd-ui-tests-qautomate/pagemodel/ss_keys_and_cert_dlg_subject_dname.py | ria-ee/XTM | 6103f3f5bbba387b8b59b050c0c4f1fb2180fc37 | [
"MIT"
] | 20 | 2017-03-14T07:21:58.000Z | 2019-05-21T09:26:30.000Z | # -*- coding: utf-8 -*-
# Example for using WebDriver object: driver = get_driver() e.g driver.current_url
from webframework import TESTDATA
from variables import strings
from selenium.webdriver.common.by import By
from webframework.extension.util.common_utils import *
from webframework.extension.util.webtimings import... | 53.30303 | 250 | 0.675005 | 4,840 | 0.917188 | 0 | 0 | 0 | 0 | 0 | 0 | 3,500 | 0.663256 |
327cb6d4121abb0fa5a0265759fdf829da140dce | 6,303 | py | Python | tempdb/postgres.py | runfalk/tempdb | a19f7568db1795025c9ec8adfd84a9544f9a6966 | [
"MIT"
] | 2 | 2021-01-17T00:01:14.000Z | 2021-01-18T09:26:56.000Z | tempdb/postgres.py | runfalk/tempdb | a19f7568db1795025c9ec8adfd84a9544f9a6966 | [
"MIT"
] | null | null | null | tempdb/postgres.py | runfalk/tempdb | a19f7568db1795025c9ec8adfd84a9544f9a6966 | [
"MIT"
] | null | null | null | import getpass
import os
import platform
import psycopg2
import sys
import tempfile
from glob import glob
from psycopg2.extensions import ISOLATION_LEVEL_AUTOCOMMIT, quote_ident
from subprocess import check_output, PIPE, Popen
from time import sleep
from ._compat import ustr
from .utils import is_executable, Uri, Ver... | 30.597087 | 79 | 0.58369 | 5,908 | 0.937331 | 300 | 0.047596 | 208 | 0.033 | 0 | 0 | 1,610 | 0.255434 |
327ee9780e46ebbfd9024596b22934ad7011175f | 426 | py | Python | nymph/modules/tool.py | smilelight/nymph | c8da2211f7a8f58d1c6d327b243e419ed9e64ead | [
"Apache-2.0"
] | 1 | 2020-08-10T00:58:14.000Z | 2020-08-10T00:58:14.000Z | nymph/modules/tool.py | smilelight/nymph | c8da2211f7a8f58d1c6d327b243e419ed9e64ead | [
"Apache-2.0"
] | null | null | null | nymph/modules/tool.py | smilelight/nymph | c8da2211f7a8f58d1c6d327b243e419ed9e64ead | [
"Apache-2.0"
] | 1 | 2021-07-03T07:06:41.000Z | 2021-07-03T07:06:41.000Z | # -*- coding: utf-8 -*-
import pandas as pd
def save_dict_to_csv(dict_data: dict, csv_path: str):
indexes = list(dict_data.keys())
columns = list(list(dict_data.values())[0].keys())
data = []
for row in dict_data:
data.append([item for item in dict_data[row].values()])
pd_data = pd.DataFra... | 30.428571 | 64 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 29 | 0.068075 |
327fa5382ee48b811835bb16249bdcc124edd278 | 1,187 | py | Python | apps/core/serializers.py | jfterpstra/onepercentclub-site | 43e8e01ac4d3d1ffdd5959ebd048ce95bb2dba0e | [
"BSD-3-Clause"
] | 7 | 2015-01-02T19:31:14.000Z | 2021-03-22T17:30:23.000Z | apps/core/serializers.py | jfterpstra/onepercentclub-site | 43e8e01ac4d3d1ffdd5959ebd048ce95bb2dba0e | [
"BSD-3-Clause"
] | 1 | 2015-03-06T08:34:59.000Z | 2015-03-06T08:34:59.000Z | apps/core/serializers.py | jfterpstra/onepercentclub-site | 43e8e01ac4d3d1ffdd5959ebd048ce95bb2dba0e | [
"BSD-3-Clause"
] | null | null | null | from rest_framework import serializers
from bluebottle.utils.model_dispatcher import get_donation_model
from bluebottle.bb_projects.serializers import ProjectPreviewSerializer as BaseProjectPreviewSerializer
from bluebottle.bb_accounts.serializers import UserPreviewSerializer
DONATION_MODEL = get_donation_model()
c... | 42.392857 | 125 | 0.754844 | 864 | 0.727885 | 0 | 0 | 0 | 0 | 0 | 0 | 271 | 0.228307 |
328065cc7a0c80c52a732c0213b03b1281db7d57 | 1,035 | py | Python | Python/rockpaperscissors/rockpaperscissors.py | rvrheenen/OpenKattis | 7fd59fcb54e86cdf10f56c580c218c62e584f391 | [
"MIT"
] | 12 | 2016-10-03T20:43:43.000Z | 2021-06-12T17:18:42.000Z | Python/rockpaperscissors/rockpaperscissors.py | rvrheenen/OpenKattis | 7fd59fcb54e86cdf10f56c580c218c62e584f391 | [
"MIT"
] | null | null | null | Python/rockpaperscissors/rockpaperscissors.py | rvrheenen/OpenKattis | 7fd59fcb54e86cdf10f56c580c218c62e584f391 | [
"MIT"
] | 10 | 2017-11-14T19:56:37.000Z | 2021-02-02T07:39:57.000Z | # WORKS BUT ISN'T FAST ENOUGH
first_run = True
while(True):
inp = input().split()
if len(inp) == 1:
break
if first_run:
first_run = False
else:
print()
nPlayers, nGames = [int(x) for x in inp]
resultsW = [0] * nPlayers
resultsL = [0] * nPlayers
for i in range( int... | 32.34375 | 147 | 0.510145 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 100 | 0.096618 |
3280c700cb467b6fd44a96a8f003a083cb2e0a5f | 9,460 | py | Python | monitorcontrol/monitor_control.py | klwlau/monitorcontrol | 92d07c7a93585de14551ba1f1dd8bb3a009c4842 | [
"MIT"
] | null | null | null | monitorcontrol/monitor_control.py | klwlau/monitorcontrol | 92d07c7a93585de14551ba1f1dd8bb3a009c4842 | [
"MIT"
] | null | null | null | monitorcontrol/monitor_control.py | klwlau/monitorcontrol | 92d07c7a93585de14551ba1f1dd8bb3a009c4842 | [
"MIT"
] | null | null | null | ###############################################################################
# Copyright 2019 Alex M.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including witho... | 30.031746 | 79 | 0.595455 | 5,947 | 0.628647 | 567 | 0.059937 | 2,764 | 0.292178 | 0 | 0 | 6,268 | 0.662579 |
328135201e01cdb2208c77c5703c4b619db0d327 | 6,201 | py | Python | algorithms/vae.py | ENSP-AI-Mentoring/machine-learning-algorithms | d53d5342f79d08066e158228cab6240872f61f72 | [
"Apache-2.0"
] | 1 | 2021-11-14T19:46:46.000Z | 2021-11-14T19:46:46.000Z | algorithms/vae.py | ENSP-AI-Mentoring/machine-learning-algorithms | d53d5342f79d08066e158228cab6240872f61f72 | [
"Apache-2.0"
] | null | null | null | algorithms/vae.py | ENSP-AI-Mentoring/machine-learning-algorithms | d53d5342f79d08066e158228cab6240872f61f72 | [
"Apache-2.0"
] | null | null | null | import numpy as np
import torch
from torch.optim import Adam
from torch.utils.data import DataLoader
from tqdm import tqdm
class VAE:
def __init__(
self,
train_data,
test_data,
in_dim,
encoder_width,
decoder_width,
latent_dim,
device=None,
):
... | 31.8 | 94 | 0.588776 | 6,075 | 0.979681 | 0 | 0 | 0 | 0 | 0 | 0 | 820 | 0.132237 |
32837c01862960b0796752083e66eefb2afb0c24 | 1,244 | py | Python | qfig.py | mth1haha/BlockchainQueueingNetwork | 611dc84b857efbec22edfe5f3a1bb8f7052a39aa | [
"Apache-2.0"
] | 1 | 2021-11-30T08:22:43.000Z | 2021-11-30T08:22:43.000Z | qfig.py | mth1haha/BlockchainQueueingNetwork | 611dc84b857efbec22edfe5f3a1bb8f7052a39aa | [
"Apache-2.0"
] | null | null | null | qfig.py | mth1haha/BlockchainQueueingNetwork | 611dc84b857efbec22edfe5f3a1bb8f7052a39aa | [
"Apache-2.0"
] | 1 | 2020-11-25T08:48:25.000Z | 2020-11-25T08:48:25.000Z | import simpy as sp
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
from scipy import stats, integrate
def client(env, lamda, q, tic):
meant = 1/lamda
while True:
t = np.random.exponential(meant)
yield env.timeout(t)
q.put('job')
tic.append(env.now)
def ... | 20.393443 | 52 | 0.619775 | 0 | 0 | 516 | 0.396923 | 0 | 0 | 0 | 0 | 201 | 0.154615 |
328382e2d62ec49094cab44e02a8b760c1f9a700 | 4,756 | py | Python | all_words.py | secureterminal/100-Days-of-Code | 04383ae541938d8a551b5aac9a0dad3348a6ef23 | [
"MIT"
] | 1 | 2022-01-28T13:55:39.000Z | 2022-01-28T13:55:39.000Z | Day 7/all_words.py | secureterminal/100-Days-of-Code | 04383ae541938d8a551b5aac9a0dad3348a6ef23 | [
"MIT"
] | 1 | 2022-02-02T00:13:18.000Z | 2022-02-03T11:32:53.000Z | Day 7/all_words.py | secureterminal/100-Days-of-Code | 04383ae541938d8a551b5aac9a0dad3348a6ef23 | [
"MIT"
] | 2 | 2022-02-07T20:49:36.000Z | 2022-02-19T21:22:15.000Z | word_list = ['pseudolamellibranchiate',
'microcolorimetrically',
'pancreaticoduodenostomy',
'theologicoastronomical',
'pancreatoduodenectomy',
'tetraiodophenolphthalein',
'choledocholithotripsy',
'hematospectrophotometer',
'deintellectualization',
'pharyngoepiglottidean',
'psychophysiologically',
'pathologic... | 21.716895 | 47 | 0.676409 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,270 | 0.897813 |
32839d586b1955e1c6b167959e736b233c1def5e | 363 | py | Python | vandal/objects/__init__.py | vandal-dev/vandal | 1981c86f4de6632776a4132ecbc206fac5188f32 | [
"Apache-2.0"
] | 1 | 2022-02-22T18:39:57.000Z | 2022-02-22T18:39:57.000Z | vandal/objects/__init__.py | vandal-dev/vandal | 1981c86f4de6632776a4132ecbc206fac5188f32 | [
"Apache-2.0"
] | null | null | null | vandal/objects/__init__.py | vandal-dev/vandal | 1981c86f4de6632776a4132ecbc206fac5188f32 | [
"Apache-2.0"
] | null | null | null | # import all relevant contents from the associated module.
from vandal.objects.montecarlo import (
MonteCarlo,
MCapp,
)
from vandal.objects.eoq import(
EOQ,
EOQapp,
)
from vandal.objects.dijkstra import Dijkstra
# all relevant contents.
__all__ = [
'MonteCarlo',
'EOQ',
'D... | 16.5 | 59 | 0.628099 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 126 | 0.347107 |
3283d11b9d4cf8bd45f4150291dcecd926809bd7 | 124 | py | Python | authentication/admin.py | jatingupta14/cruzz | 9a00f1555cdd5c76c9ef250d7037d72d725de367 | [
"MIT"
] | 7 | 2018-11-09T14:40:54.000Z | 2019-12-20T08:10:17.000Z | authentication/admin.py | jatingupta14/cruzz | 9a00f1555cdd5c76c9ef250d7037d72d725de367 | [
"MIT"
] | 25 | 2018-11-30T17:38:36.000Z | 2018-12-27T17:21:09.000Z | authentication/admin.py | jatingupta14/cruzz | 9a00f1555cdd5c76c9ef250d7037d72d725de367 | [
"MIT"
] | 6 | 2018-12-03T14:44:29.000Z | 2018-12-26T11:49:43.000Z | # Django
from django.contrib import admin
# local Django
from authentication.models import User
admin.site.register(User)
| 15.5 | 38 | 0.806452 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 22 | 0.177419 |
328414bd2a696253fdce02e567455456707be002 | 480 | py | Python | src/dlkp/datasets/__init__.py | midas-research/dlkp | 5f47a780a6b05a71f799287d8ad612542a897047 | [
"MIT"
] | 2 | 2022-03-12T15:08:55.000Z | 2022-03-14T09:11:43.000Z | src/dlkp/datasets/__init__.py | midas-research/dlkp | 5f47a780a6b05a71f799287d8ad612542a897047 | [
"MIT"
] | 14 | 2022-02-19T07:42:09.000Z | 2022-03-20T21:43:42.000Z | src/dlkp/datasets/__init__.py | midas-research/dlkp | 5f47a780a6b05a71f799287d8ad612542a897047 | [
"MIT"
] | null | null | null | class KPDatasets:
def __init__(self) -> None:
pass
def get_train_dataset(self):
if "train" not in self.datasets:
return None
return self.datasets["train"]
def get_eval_dataset(self):
if "validation" not in self.datasets:
return None
return se... | 25.263158 | 45 | 0.597917 | 479 | 0.997917 | 0 | 0 | 0 | 0 | 0 | 0 | 50 | 0.104167 |
3287cec655cdef3ec14897e557822dfcd28c5019 | 84 | py | Python | nv/__init__.py | 3stack-software/nv | 7b00fb857aea238ed060a9eb017e351aac19258e | [
"Apache-2.0"
] | null | null | null | nv/__init__.py | 3stack-software/nv | 7b00fb857aea238ed060a9eb017e351aac19258e | [
"Apache-2.0"
] | 1 | 2017-06-19T00:52:37.000Z | 2017-06-19T00:52:37.000Z | nv/__init__.py | 3stack-software/nv | 7b00fb857aea238ed060a9eb017e351aac19258e | [
"Apache-2.0"
] | null | null | null | from .__version__ import __version__
from .core import create, remove, launch_shell
| 28 | 46 | 0.833333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
32885105782d33bbebe4c4cc904fbc2149735713 | 784 | py | Python | app/live/tests.py | B-ROY/TESTGIT | 40221cf254c90d37d21afb981635740aebf11949 | [
"Apache-2.0"
] | 2 | 2017-12-02T13:58:30.000Z | 2018-08-02T17:07:59.000Z | app/live/tests.py | B-ROY/TESTGIT | 40221cf254c90d37d21afb981635740aebf11949 | [
"Apache-2.0"
] | null | null | null | app/live/tests.py | B-ROY/TESTGIT | 40221cf254c90d37d21afb981635740aebf11949 | [
"Apache-2.0"
] | null | null | null | import os
from django.conf import settings
from django.contrib.auth.models import User
from django.contrib.auth.tests.utils import skipIfCustomUser
from django.contrib.flatpages.models import FlatPage
from django.test import TestCase
from django.test.utils import override_settings
class HeyDoAppTest(unittest.TestCase)... | 27.034483 | 60 | 0.632653 | 444 | 0.566327 | 0 | 0 | 0 | 0 | 0 | 0 | 88 | 0.112245 |
328b211073d9f2b0d84385aebf512b9639d8569d | 1,133 | py | Python | application/utils/data_transfer_objects.py | charles-crawford/sentiment | 38cfd6af1cc81ad1858621a182cd76dc3e5f04db | [
"MIT"
] | null | null | null | application/utils/data_transfer_objects.py | charles-crawford/sentiment | 38cfd6af1cc81ad1858621a182cd76dc3e5f04db | [
"MIT"
] | null | null | null | application/utils/data_transfer_objects.py | charles-crawford/sentiment | 38cfd6af1cc81ad1858621a182cd76dc3e5f04db | [
"MIT"
] | null | null | null | from flask_restx.fields import String, Boolean, Raw, List, Float, Nested
class DataTransferObjects:
def __init__(self, ns):
self.ns = ns
self.general_responses = {200: 'OK',
404: "Resource not found",
400: "Bad Request",
... | 33.323529 | 112 | 0.529568 | 1,057 | 0.932921 | 0 | 0 | 0 | 0 | 0 | 0 | 289 | 0.255075 |
328faff3ddad6381d560dd2330552d383362af7f | 91 | py | Python | utils.py | Spratiher9/newsnuggets | 1147e55a9a0c8a483384711840462b1526cf7681 | [
"MIT"
] | 1 | 2021-11-17T19:18:42.000Z | 2021-11-17T19:18:42.000Z | utils.py | Spratiher9/newsnuggets | 1147e55a9a0c8a483384711840462b1526cf7681 | [
"MIT"
] | null | null | null | utils.py | Spratiher9/newsnuggets | 1147e55a9a0c8a483384711840462b1526cf7681 | [
"MIT"
] | null | null | null | from gnews import GNews
def get_client():
news_client = GNews()
return news_client | 18.2 | 25 | 0.725275 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
329003760fc6877a5fb340f8c2de344d9c2c4d3e | 13,284 | py | Python | grover.py | raulillo82/TFG-Fisica-2021 | 8acfd748c7f49ea294606a9c185227927ec2e256 | [
"MIT"
] | null | null | null | grover.py | raulillo82/TFG-Fisica-2021 | 8acfd748c7f49ea294606a9c185227927ec2e256 | [
"MIT"
] | null | null | null | grover.py | raulillo82/TFG-Fisica-2021 | 8acfd748c7f49ea294606a9c185227927ec2e256 | [
"MIT"
] | null | null | null | #!/usr/bin/python3
'''
* Copyright (C) 2021 Raúl Osuna Sánchez-Infante
*
* This software may be modified and distributed under the terms
* of the MIT license. See the LICENSE.txt file for details.
'''
##################
#Needed libraries#
##################
import matplotlib as mpl
mpl.use('TkAgg')
import matpl... | 29.851685 | 187 | 0.546522 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5,201 | 0.391376 |
3291b0fa03bb75af83a902f66fc3f91285f8e9a3 | 9,147 | py | Python | TM1py/Services/GitService.py | adscheevel/tm1py | 8a53c7a63e3c0e2c6198c2cd0c2f57d10a7cfe43 | [
"MIT"
] | 113 | 2019-03-12T19:42:39.000Z | 2022-03-31T22:40:05.000Z | TM1py/Services/GitService.py | adscheevel/tm1py | 8a53c7a63e3c0e2c6198c2cd0c2f57d10a7cfe43 | [
"MIT"
] | 459 | 2019-01-25T09:32:18.000Z | 2022-03-24T21:57:16.000Z | TM1py/Services/GitService.py | adscheevel/tm1py | 8a53c7a63e3c0e2c6198c2cd0c2f57d10a7cfe43 | [
"MIT"
] | 107 | 2019-01-31T15:08:34.000Z | 2022-03-16T14:58:38.000Z | # -*- coding: utf-8 -*-
import json
from typing import List
from TM1py.Objects.Git import Git
from TM1py.Objects.GitCommit import GitCommit
from TM1py.Objects.GitPlan import GitPushPlan, GitPullPlan, GitPlan
from TM1py.Services.ObjectService import ObjectService
from TM1py.Services.RestService import RestService, Resp... | 44.619512 | 117 | 0.608396 | 8,778 | 0.959659 | 0 | 0 | 0 | 0 | 0 | 0 | 3,750 | 0.40997 |
3294741b0f8e1bf0eeabf4019d19a68a63e99c23 | 1,419 | py | Python | tests/bind_tests/diagram_tests/strategies.py | lycantropos/voronoi | 977e0b3e5eff2dd294e2e6ce1a8030c763e86233 | [
"MIT"
] | null | null | null | tests/bind_tests/diagram_tests/strategies.py | lycantropos/voronoi | 977e0b3e5eff2dd294e2e6ce1a8030c763e86233 | [
"MIT"
] | null | null | null | tests/bind_tests/diagram_tests/strategies.py | lycantropos/voronoi | 977e0b3e5eff2dd294e2e6ce1a8030c763e86233 | [
"MIT"
] | null | null | null | from hypothesis import strategies
from hypothesis_geometry import planar
from tests.bind_tests.hints import (BoundCell,
BoundDiagram,
BoundEdge,
BoundVertex)
from tests.bind_tests.utils import (bound_source_cate... | 44.34375 | 76 | 0.653982 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
32955f3ecdc5ec46e6e7127a3ed57f1411af2c54 | 2,381 | py | Python | apps/blog/serializers.py | yc19890920/dble_fastapi_blog | dd9b8984d849df893d4fea270e8b75ac12d01241 | [
"Apache-2.0"
] | null | null | null | apps/blog/serializers.py | yc19890920/dble_fastapi_blog | dd9b8984d849df893d4fea270e8b75ac12d01241 | [
"Apache-2.0"
] | 2 | 2021-03-31T19:56:46.000Z | 2021-04-30T21:19:15.000Z | apps/blog/serializers.py | yc19890920/dble_fastapi_blog | dd9b8984d849df893d4fea270e8b75ac12d01241 | [
"Apache-2.0"
] | null | null | null | """
@Author: YangCheng
@contact: [email protected]
@Software: Y.C
@Time: 2020/7/21 15:22
"""
from typing import List
from pydantic import BaseModel, Field
from tortoise import Tortoise
from tortoise.contrib.pydantic import pydantic_model_creator, pydantic_queryset_creator
from lib.tortoise.pydantic import json_... | 25.063158 | 87 | 0.761025 | 735 | 0.308694 | 0 | 0 | 0 | 0 | 0 | 0 | 551 | 0.231415 |
329a1a34027b83c6621340af222a98c0d43067e0 | 1,102 | py | Python | Python/image_analysis_centerlines/analysis_example.py | fromenlab/guides | ac9831265f8219d5b5a8ee3a441fc77c7ae4fe3b | [
"MIT"
] | null | null | null | Python/image_analysis_centerlines/analysis_example.py | fromenlab/guides | ac9831265f8219d5b5a8ee3a441fc77c7ae4fe3b | [
"MIT"
] | null | null | null | Python/image_analysis_centerlines/analysis_example.py | fromenlab/guides | ac9831265f8219d5b5a8ee3a441fc77c7ae4fe3b | [
"MIT"
] | null | null | null | from skimage import img_as_bool, io, color, morphology
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
# Testing process
# Import images
one = img_as_bool(color.rgb2gray(io.imread('1.jpg')))
cross = img_as_bool(color.rgb2gray(io.imread('cross.jpg')))
grid = img_as_bool(color.rgb2gray(io.imread('... | 34.4375 | 83 | 0.791289 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 149 | 0.135209 |
329a5ba2f15a3280c3c7c2b2a6a0114abcec0cf9 | 485 | py | Python | resources/settings.py | Miriel-py/Room-Wizard | 83d86fe8e8fed8bb073b38465cd0e97b1a6113b8 | [
"MIT"
] | null | null | null | resources/settings.py | Miriel-py/Room-Wizard | 83d86fe8e8fed8bb073b38465cd0e97b1a6113b8 | [
"MIT"
] | null | null | null | resources/settings.py | Miriel-py/Room-Wizard | 83d86fe8e8fed8bb073b38465cd0e97b1a6113b8 | [
"MIT"
] | null | null | null | # global_data.py
import os
from dotenv import load_dotenv
# Read the bot token from the .env file
load_dotenv()
TOKEN = os.getenv('DISCORD_TOKEN')
DEBUG_MODE = os.getenv('DEBUG_MODE')
BOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DB_FILE = os.path.join(BOT_DIR, 'database/room_wizard_db.db')
... | 24.25 | 69 | 0.764948 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 163 | 0.336082 |
329e532aeccbe51ed3829d6a07920bf7c69171ef | 602 | py | Python | Python OOP/Exams/23 August 2021/1, 2/project/astronaut/astronaut_repository.py | a-shiro/SoftUni-Courses | 7d0ca6401017a28b5ff7e7fa3e5df8bba8ddbe77 | [
"MIT"
] | null | null | null | Python OOP/Exams/23 August 2021/1, 2/project/astronaut/astronaut_repository.py | a-shiro/SoftUni-Courses | 7d0ca6401017a28b5ff7e7fa3e5df8bba8ddbe77 | [
"MIT"
] | null | null | null | Python OOP/Exams/23 August 2021/1, 2/project/astronaut/astronaut_repository.py | a-shiro/SoftUni-Courses | 7d0ca6401017a28b5ff7e7fa3e5df8bba8ddbe77 | [
"MIT"
] | null | null | null | class AstronautRepository:
def __init__(self):
self.astronauts = []
def add(self, astronaut):
self.astronauts.append(astronaut)
def remove(self, astronaut):
self.astronauts.remove(astronaut)
def find_by_name(self, name: str):
for astronaut in self.astronauts:
... | 30.1 | 92 | 0.609635 | 601 | 0.998339 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
329eec6934c9b0ff2824d0ffd01a1902dae80850 | 1,767 | py | Python | detection_algorithms/temporal_anomaly_detection/model_def.py | hanahs-deepfake-detection/detection-algorithms | 6d7ec53eaf333adb10a1aba448f80fceaf7722be | [
"MIT"
] | null | null | null | detection_algorithms/temporal_anomaly_detection/model_def.py | hanahs-deepfake-detection/detection-algorithms | 6d7ec53eaf333adb10a1aba448f80fceaf7722be | [
"MIT"
] | null | null | null | detection_algorithms/temporal_anomaly_detection/model_def.py | hanahs-deepfake-detection/detection-algorithms | 6d7ec53eaf333adb10a1aba448f80fceaf7722be | [
"MIT"
] | null | null | null | """
Model Definition
"""
from tensorflow import keras
from tensorflow.keras.applications import ResNet101V2
from tensorflow.keras.layers import (
BatchNormalization, Conv2D, Dense, Dropout, Flatten, LSTM, MaxPool2D,
TimeDistributed, Lambda
)
import tensorflow as tf
from .spatial_transformer.bilinear_sampler i... | 42.071429 | 84 | 0.654782 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 77 | 0.043577 |
329f38947acdd5b4c36b6e62995a1a5be5206f16 | 1,515 | py | Python | scripts/lwtnn-build-dummy-inputs.py | aghoshpub/lwtnn | 979069b372f8c3d001d08fb0c756ff98954db644 | [
"MIT"
] | 98 | 2016-11-27T04:05:56.000Z | 2022-02-28T17:14:19.000Z | scripts/lwtnn-build-dummy-inputs.py | aghoshpub/lwtnn | 979069b372f8c3d001d08fb0c756ff98954db644 | [
"MIT"
] | 90 | 2016-11-24T15:13:31.000Z | 2021-11-29T14:09:34.000Z | scripts/lwtnn-build-dummy-inputs.py | aghoshpub/lwtnn | 979069b372f8c3d001d08fb0c756ff98954db644 | [
"MIT"
] | 46 | 2016-12-15T17:21:43.000Z | 2022-01-27T22:45:42.000Z | #!/usr/bin/env python3
"""Generate fake serialized NNs to test the lightweight classes"""
import argparse
import json
import h5py
import numpy as np
def _run():
args = _get_args()
_build_keras_arch("arch.json")
_build_keras_inputs_file("variable_spec.json")
_build_keras_weights("weights.h5", verbose=... | 27.545455 | 72 | 0.634323 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 299 | 0.19736 |
329f8f1e2538fb2f56b719613eee2ed54216347d | 4,884 | py | Python | osspeak/platforms/windows.py | OSSpeak/OSSpeak | 327c38a37684165f87bf8d76ab2ca135b43b8ab7 | [
"MIT"
] | 1 | 2020-03-17T10:24:41.000Z | 2020-03-17T10:24:41.000Z | osspeak/platforms/windows.py | OSSpeak/OSSpeak | 327c38a37684165f87bf8d76ab2ca135b43b8ab7 | [
"MIT"
] | 12 | 2016-09-28T05:16:00.000Z | 2020-11-27T22:32:40.000Z | osspeak/platforms/windows.py | OSSpeak/OSSpeak | 327c38a37684165f87bf8d76ab2ca135b43b8ab7 | [
"MIT"
] | null | null | null | '''
Collection of Windows-specific I/O functions
'''
import msvcrt
import time
import ctypes
from platforms import winconstants, winclipboard
EnumWindows = ctypes.windll.user32.EnumWindows
EnumWindowsProc = ctypes.WINFUNCTYPE(ctypes.c_bool, ctypes.POINTER(ctypes.c_int), ctypes.POINTER(ctypes.c_int))
GetWindowText = c... | 37.282443 | 123 | 0.719287 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 183 | 0.037469 |
32a0d30f56c4a1916c5ad0aef5a7b50495e1860b | 715 | py | Python | sudokusolver/common/messenger.py | Blondberg/SudokuSolver | 4a6f1f927d41f7a39a953b9784b28d570edf1f09 | [
"MIT"
] | null | null | null | sudokusolver/common/messenger.py | Blondberg/SudokuSolver | 4a6f1f927d41f7a39a953b9784b28d570edf1f09 | [
"MIT"
] | null | null | null | sudokusolver/common/messenger.py | Blondberg/SudokuSolver | 4a6f1f927d41f7a39a953b9784b28d570edf1f09 | [
"MIT"
] | null | null | null | # messenger.py - contains functions to create different kinds of messages like info or error
# color the text, usage: print bcolors.WARNING + "Warning: No active frommets remain. Continue?" + bcolors.ENDC
BCOLORS = {
'HEADER': '\033[95m',
'OKBLUE': '\033[94m',
'OKGREEN': '\033[92m',
'WARNING': '\033[9... | 23.833333 | 111 | 0.633566 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 436 | 0.60979 |
32a23291b7486cbc9a87ce5a914dd735071b20e4 | 554 | py | Python | test.py | w0w/miniPFC | 63b1bf608de03efada2a1b57c0370b6a7c2bf1ad | [
"MIT"
] | null | null | null | test.py | w0w/miniPFC | 63b1bf608de03efada2a1b57c0370b6a7c2bf1ad | [
"MIT"
] | null | null | null | test.py | w0w/miniPFC | 63b1bf608de03efada2a1b57c0370b6a7c2bf1ad | [
"MIT"
] | null | null | null | import json
import RPi.GPIO as GPIO
from modules.sensor import getTempC, getHumidity
def loadConfig():
with open('./config/pin.json') as data_file:
data = json.load(data_file)
return data
currentPins = loadConfig().values()
def bootActuators():
'''Assumes that pi is booting and set off al... | 25.181818 | 63 | 0.66426 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 100 | 0.180505 |
32a426fd1c9efac97183a6c708ae91ac77c14062 | 1,170 | py | Python | example.py | clagraff/habu | 28d05c2fa2204b26177bbaed969648b92b89c735 | [
"MIT"
] | null | null | null | example.py | clagraff/habu | 28d05c2fa2204b26177bbaed969648b92b89c735 | [
"MIT"
] | null | null | null | example.py | clagraff/habu | 28d05c2fa2204b26177bbaed969648b92b89c735 | [
"MIT"
] | null | null | null | import json
import habu
def do_req(uri, *args, **kwargs):
route_data = {
"/": {
"_links": {
"people": { "href": "/people" },
"animals": { "href": "/animals" }
}
},
"/people": {
"_links": {
"self": { "href":... | 23.4 | 105 | 0.417949 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 344 | 0.294017 |
32a62b611ae086d7c010dc8106960f0f8f3738b2 | 1,162 | py | Python | notify_tweet.py | mkaraki/WatchTweets | 9b0a4ef66e38311453fff99d02091758b1bd0df5 | [
"MIT"
] | null | null | null | notify_tweet.py | mkaraki/WatchTweets | 9b0a4ef66e38311453fff99d02091758b1bd0df5 | [
"MIT"
] | 1 | 2022-01-26T18:03:15.000Z | 2022-01-26T18:03:35.000Z | notify_tweet.py | mkaraki/WatchTweets | 9b0a4ef66e38311453fff99d02091758b1bd0df5 | [
"MIT"
] | null | null | null | import json
import os
import requests
from dotenv import load_dotenv
# You have to configure in this file to notify other services
def notifyHandler(tweet):
notifyDiscord(tweet)
return
def notifyDiscord(tweet, find_user_info=False):
msg = tweet['text']
if ('entities' in tweet and 'urls' in tweet[... | 26.409091 | 87 | 0.553356 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 438 | 0.376936 |
32aa7faedb604f995e124967e180cd9dc0c8087d | 2,245 | py | Python | credentials.py | Ken-mbira/Trust_Password_Protector | 7d4d25e6d10582c21cc84ce0ffdffe45d45c0d63 | [
"MIT"
] | null | null | null | credentials.py | Ken-mbira/Trust_Password_Protector | 7d4d25e6d10582c21cc84ce0ffdffe45d45c0d63 | [
"MIT"
] | null | null | null | credentials.py | Ken-mbira/Trust_Password_Protector | 7d4d25e6d10582c21cc84ce0ffdffe45d45c0d63 | [
"MIT"
] | 1 | 2021-09-07T05:08:02.000Z | 2021-09-07T05:08:02.000Z | import random
import string
class Cred:
"""
This is a class that makes the user credentials for their different accounts
"""
def __init__(self,account_name,user_name,email,password):
"""
This will construct an instance of the credentials class
"""
self.account_name ... | 32.071429 | 128 | 0.632962 | 2,216 | 0.987082 | 0 | 0 | 1,425 | 0.634744 | 0 | 0 | 1,023 | 0.455679 |
32ac15da27e5771cb19e9b355fd09244b1a2fee3 | 561 | py | Python | misprogs/sensor_Luz_LCD.py | dacocube/CursoGalileo | 1dac903031d9ff61174cb0c5e00e3f3795ea60de | [
"Apache-2.0"
] | null | null | null | misprogs/sensor_Luz_LCD.py | dacocube/CursoGalileo | 1dac903031d9ff61174cb0c5e00e3f3795ea60de | [
"Apache-2.0"
] | null | null | null | misprogs/sensor_Luz_LCD.py | dacocube/CursoGalileo | 1dac903031d9ff61174cb0c5e00e3f3795ea60de | [
"Apache-2.0"
] | null | null | null | import signal
import sys
import time
import pyupm_grove as grove
import pyupm_i2clcd as lcd
def interruptHandler(signal, frame):
sys.exit(0)
if __name__=='__main__':
signal.signal(signal.SIGINT, interruptHandler)
myLcd = lcd.Jhd1313m1(0, 0x3E,0x62)
sensorluz=grove.GroveLight(0)
coloR=255
colorG=200
colorB=100... | 20.777778 | 63 | 0.761141 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 77 | 0.137255 |
32b0d4c387e53daeda7939c3bdfe5d3e18cb6dbb | 210 | py | Python | setup.py | cogsy23/pyfsm | 22236994f7455a39489d1438b7c8bbcd081352be | [
"MIT"
] | null | null | null | setup.py | cogsy23/pyfsm | 22236994f7455a39489d1438b7c8bbcd081352be | [
"MIT"
] | null | null | null | setup.py | cogsy23/pyfsm | 22236994f7455a39489d1438b7c8bbcd081352be | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(
name='FSM',
version='0.1',
author='Ben Coughlan',
author_email='[email protected]',
packages=find_packages(),
license_file='LICENSE',
)
| 19.090909 | 43 | 0.666667 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 50 | 0.238095 |
32b26100558c8d0079fd4f055056d994cd62c099 | 9,553 | py | Python | clustviz/clarans.py | barbarametzler/ClustViz | a460e1ffb5195dfe1e12bca106366901d169a690 | [
"MIT"
] | 6 | 2019-11-14T11:22:54.000Z | 2020-03-01T09:14:21.000Z | clustviz/clarans.py | barbarametzler/ClustViz | a460e1ffb5195dfe1e12bca106366901d169a690 | [
"MIT"
] | 2 | 2020-07-21T07:49:07.000Z | 2021-04-06T16:16:09.000Z | clustviz/clarans.py | barbarametzler/ClustViz | a460e1ffb5195dfe1e12bca106366901d169a690 | [
"MIT"
] | 5 | 2020-07-14T15:22:00.000Z | 2022-03-19T19:45:32.000Z | import random
from typing import Tuple, Dict, Any
import scipy
import itertools
import graphviz
import numpy as np
import pandas as pd
from clustviz.pam import plot_pam
from pyclustering.utils import euclidean_distance_square
from pyclustering.cluster.clarans import clarans as clarans_pyclustering
class clarans(cla... | 36.185606 | 114 | 0.539098 | 6,934 | 0.725845 | 0 | 0 | 0 | 0 | 0 | 0 | 2,233 | 0.233749 |
32b489e63deb6a7323ecb9996f33d06edac172bd | 1,507 | py | Python | bin/demo_findit_backup_url.py | cariaso/metapub | bfa361dd6e5de8ee0859e596d490fb478f7dcfba | [
"Apache-2.0"
] | 28 | 2019-09-09T08:12:31.000Z | 2021-12-17T00:09:14.000Z | bin/demo_findit_backup_url.py | cariaso/metapub | bfa361dd6e5de8ee0859e596d490fb478f7dcfba | [
"Apache-2.0"
] | 33 | 2019-11-07T05:36:04.000Z | 2022-01-29T01:14:57.000Z | bin/demo_findit_backup_url.py | cariaso/metapub | bfa361dd6e5de8ee0859e596d490fb478f7dcfba | [
"Apache-2.0"
] | 10 | 2019-09-09T10:04:05.000Z | 2021-06-08T16:00:14.000Z | from __future__ import absolute_import, print_function, unicode_literals
import os
import requests
from metapub.findit import FindIt
from metapub.exceptions import *
from requests.packages import urllib3
urllib3.disable_warnings()
OUTPUT_DIR = 'findit'
CURL_TIMEOUT = 4000
def try_request(url):
# verify=False m... | 28.433962 | 98 | 0.666224 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 160 | 0.106171 |
32b5c206b4bd2dca61a6557018af529be9b8ba2f | 3,939 | py | Python | kgcnn/layers/conv/dmpnn_conv.py | the16thpythonist/gcnn_keras | 27d794095b684333d93149c825d84b85df8c30ff | [
"MIT"
] | 47 | 2021-03-10T10:15:42.000Z | 2022-03-14T00:53:40.000Z | kgcnn/layers/conv/dmpnn_conv.py | the16thpythonist/gcnn_keras | 27d794095b684333d93149c825d84b85df8c30ff | [
"MIT"
] | 36 | 2021-05-06T15:06:51.000Z | 2022-03-02T13:06:16.000Z | kgcnn/layers/conv/dmpnn_conv.py | the16thpythonist/gcnn_keras | 27d794095b684333d93149c825d84b85df8c30ff | [
"MIT"
] | 11 | 2021-04-05T02:14:27.000Z | 2022-03-02T03:25:52.000Z | import tensorflow as tf
from kgcnn.layers.base import GraphBaseLayer
from kgcnn.layers.gather import GatherNodesOutgoing, GatherNodesIngoing
from kgcnn.layers.pooling import PoolingLocalEdges
from kgcnn.layers.modules import LazySubtract
@tf.keras.utils.register_keras_serializable(package='kgcnn', name='DMPNNGatherE... | 43.766667 | 117 | 0.67276 | 3,507 | 0.890327 | 0 | 0 | 3,694 | 0.937801 | 0 | 0 | 1,724 | 0.437675 |
32b80da9076a6963ab2a24a72478920a41611e59 | 181 | py | Python | src/keys_management/secret_key/types.py | nielsen-oss/keys-management | ddeeceb19dae68516272fe13dfc6521dcbe295f2 | [
"Apache-2.0"
] | 6 | 2021-06-25T17:21:18.000Z | 2021-07-13T17:31:28.000Z | src/keys_management/secret_key/types.py | nielsen-oss/keys-management | ddeeceb19dae68516272fe13dfc6521dcbe295f2 | [
"Apache-2.0"
] | null | null | null | src/keys_management/secret_key/types.py | nielsen-oss/keys-management | ddeeceb19dae68516272fe13dfc6521dcbe295f2 | [
"Apache-2.0"
] | null | null | null | from typing import Callable, Tuple, Union
StrOrBytes = Union[str, bytes]
StrOrBytesPair = Tuple[StrOrBytes, StrOrBytes]
KeysStore = Callable[[], Union[StrOrBytes, StrOrBytesPair]]
| 30.166667 | 59 | 0.78453 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
32b877d4916dd5d40bd6976997b7ef7d01823785 | 349 | py | Python | api/admin.py | jchmura/suchary-django | af2e8a62d222fd6eb18f29af95c23ab098ccc2a6 | [
"MIT"
] | null | null | null | api/admin.py | jchmura/suchary-django | af2e8a62d222fd6eb18f29af95c23ab098ccc2a6 | [
"MIT"
] | 2 | 2021-03-19T21:54:17.000Z | 2021-06-10T19:20:12.000Z | api/admin.py | jchmura/suchary-django | af2e8a62d222fd6eb18f29af95c23ab098ccc2a6 | [
"MIT"
] | null | null | null | from django.contrib import admin
from api.models import Device
class DeviceAdmin(admin.ModelAdmin):
list_display = ['android_id', 'alias', 'model', 'os_version', 'version', 'created', 'last_seen', 'active']
list_filter = ['active']
search_fields = ['registration_id', 'android_id', 'alias']
admin.site.r... | 26.846154 | 110 | 0.713467 | 239 | 0.684814 | 0 | 0 | 0 | 0 | 0 | 0 | 119 | 0.340974 |
32b93fe289994ee8aa84e901e1536e526ce09b82 | 169 | py | Python | project/help/urls.py | samuraii/otus_python_backend | 1bc7c8953a03008c94dd4b0ca89a7c830772f79a | [
"MIT"
] | null | null | null | project/help/urls.py | samuraii/otus_python_backend | 1bc7c8953a03008c94dd4b0ca89a7c830772f79a | [
"MIT"
] | null | null | null | project/help/urls.py | samuraii/otus_python_backend | 1bc7c8953a03008c94dd4b0ca89a7c830772f79a | [
"MIT"
] | null | null | null | # from django.contrib import admin
# from django.urls import path
from django.conf.urls import url
from help import views
urlpatterns = [
url(r'^$', views.index)
]
| 18.777778 | 34 | 0.727811 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 69 | 0.408284 |
32b9a1053b526032d5d6c19f20fe7c9cbc1b1859 | 5,299 | py | Python | social_network/utils.py | diana-gv/django-social-network | 48bafca81f28874ceead59e263ce5b7e3853dbfb | [
"BSD-3-Clause"
] | 3 | 2015-01-13T05:45:04.000Z | 2020-01-10T19:05:35.000Z | social_network/utils.py | diana-gv/django-social-network | 48bafca81f28874ceead59e263ce5b7e3853dbfb | [
"BSD-3-Clause"
] | null | null | null | social_network/utils.py | diana-gv/django-social-network | 48bafca81f28874ceead59e263ce5b7e3853dbfb | [
"BSD-3-Clause"
] | 6 | 2015-01-13T04:40:53.000Z | 2021-08-13T01:07:40.000Z | # coding=utf-8
import random
from django.core.cache import cache
from django.core.exceptions import ObjectDoesNotExist
from django.utils.translation import ugettext as _
from notifications.models import EventType
from social_graph import EdgeType
try:
from hashlib import sha1 as sha_constructor, md5 as md5_constru... | 31.35503 | 93 | 0.670881 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,344 | 0.253633 |
32ba91d9753d50c77b106fbc0d73eade94889fbb | 219 | py | Python | datavis/urls.py | poulomihore/iot-hackathon | 4f90c12c164f3ee09341fc1381b1f7898a5d3055 | [
"MIT"
] | null | null | null | datavis/urls.py | poulomihore/iot-hackathon | 4f90c12c164f3ee09341fc1381b1f7898a5d3055 | [
"MIT"
] | null | null | null | datavis/urls.py | poulomihore/iot-hackathon | 4f90c12c164f3ee09341fc1381b1f7898a5d3055 | [
"MIT"
] | null | null | null | from django.urls import path
from . import views
urlpatterns = [
path('', views.get_percentage, name='get_percentage'),
path('get_percentage_value', views.get_percentage_value, name='get_percentage_value'),
]
| 24.333333 | 90 | 0.748858 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 0.283105 |
32bb0cd05fa6989d453a40177c162d1a6d206545 | 10,866 | py | Python | datafiles/migrations/0001_initial.py | ChalkLab/SciFlow | 5bf021007d6184402ebfe6cefc2111d99160cb69 | [
"MIT"
] | 1 | 2021-04-26T20:03:11.000Z | 2021-04-26T20:03:11.000Z | datafiles/migrations/0001_initial.py | ChalkLab/SciFlow | 5bf021007d6184402ebfe6cefc2111d99160cb69 | [
"MIT"
] | 17 | 2021-04-23T16:51:59.000Z | 2021-12-13T21:17:41.000Z | datafiles/migrations/0001_initial.py | ChalkLab/SciFlow | 5bf021007d6184402ebfe6cefc2111d99160cb69 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.8 on 2021-10-12 15:54
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='AspectActlog',
fields=[
('id', models.AutoF... | 43.119048 | 117 | 0.510307 | 10,773 | 0.991441 | 0 | 0 | 0 | 0 | 0 | 0 | 1,657 | 0.152494 |
32bd83533b8a10d702670e0618e12d21f2714992 | 712 | py | Python | f8a_jobs/handlers/flow.py | sawood14012/fabric8-analytics-jobs | a7d850dfef5785144676b9a3b4e29942161e5347 | [
"Apache-2.0"
] | 5 | 2017-05-04T11:22:31.000Z | 2018-08-24T16:12:30.000Z | f8a_jobs/handlers/flow.py | sawood14012/fabric8-analytics-jobs | a7d850dfef5785144676b9a3b4e29942161e5347 | [
"Apache-2.0"
] | 325 | 2017-05-03T08:44:03.000Z | 2021-12-13T21:03:49.000Z | f8a_jobs/handlers/flow.py | sawood14012/fabric8-analytics-jobs | a7d850dfef5785144676b9a3b4e29942161e5347 | [
"Apache-2.0"
] | 28 | 2017-05-02T05:09:32.000Z | 2021-03-11T09:42:34.000Z | """Schedule multiple flows of a type."""
from .base import BaseHandler
class FlowScheduling(BaseHandler):
"""Schedule multiple flows of a type."""
def execute(self, flow_name, flow_arguments):
"""Schedule multiple flows of a type, do filter expansion if needed.
:param flow_name: flow name t... | 33.904762 | 76 | 0.651685 | 637 | 0.894663 | 0 | 0 | 0 | 0 | 0 | 0 | 287 | 0.40309 |
32bdf6c9f66952e90bfd46bcfa58f2ec034c3c0d | 1,032 | py | Python | mako/stats/notifier.py | zer0tonin/mako | 12420056e13e1acd333e686537d5ebc909450620 | [
"MIT"
] | null | null | null | mako/stats/notifier.py | zer0tonin/mako | 12420056e13e1acd333e686537d5ebc909450620 | [
"MIT"
] | 1 | 2021-06-02T04:22:46.000Z | 2021-06-02T04:22:46.000Z | mako/stats/notifier.py | zer0tonin/mako | 12420056e13e1acd333e686537d5ebc909450620 | [
"MIT"
] | null | null | null | import logging
logger = logging.getLogger(__name__)
class Notifier:
def __init__(self, redis):
self.redis = redis
async def notify_guilds(self):
guilds_set = "guilds"
logger.debug("Scanning {}".format(guilds_set))
result = []
async for guild_id in self.redis.isscan(... | 30.352941 | 86 | 0.631783 | 975 | 0.944767 | 0 | 0 | 0 | 0 | 890 | 0.862403 | 107 | 0.103682 |
32be27b57feb5ea94289c2693437fff5fe254149 | 286 | py | Python | app/models/users.py | muzzammilh/valid-voice | 7e5f8211471cfeb1f404de6b0b715196e8276b41 | [
"MIT"
] | null | null | null | app/models/users.py | muzzammilh/valid-voice | 7e5f8211471cfeb1f404de6b0b715196e8276b41 | [
"MIT"
] | null | null | null | app/models/users.py | muzzammilh/valid-voice | 7e5f8211471cfeb1f404de6b0b715196e8276b41 | [
"MIT"
] | null | null | null | from app.helpers.sqlalchemy import db
class Role(db.Model):
__tablename__ = 'tt'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(64), unique=True)
default = db.Column(db.Boolean, default=False, index=True)
permissions = db.Column(db.Integer) | 35.75 | 62 | 0.706294 | 247 | 0.863636 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | 0.013986 |
32c012e2243ac30d8702a0e4c7e1a09c458c9ec8 | 12,819 | py | Python | pysnmp/HUAWEI-CDP-COMPLIANCE-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/HUAWEI-CDP-COMPLIANCE-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/HUAWEI-CDP-COMPLIANCE-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module HUAWEI-CDP-COMPLIANCE-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/HUAWEI-CDP-COMPLIANCE-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 19:31:50 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.... | 140.868132 | 2,381 | 0.791715 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,843 | 0.22178 |
32c0b9c3ba62988df85d3108c0c4b36be8f563b9 | 1,223 | py | Python | pybb/contrib/mentions/processors.py | thoas/pybbm | 0e7ab7ef60f15951660015f2b9be0ff7192f1095 | [
"BSD-2-Clause"
] | 1 | 2015-05-18T09:19:30.000Z | 2015-05-18T09:19:30.000Z | pybb/contrib/mentions/processors.py | ulule/pybbm | 0e7ab7ef60f15951660015f2b9be0ff7192f1095 | [
"BSD-2-Clause"
] | 5 | 2017-06-13T16:25:34.000Z | 2018-07-17T20:30:56.000Z | pybb/contrib/mentions/processors.py | ulule/pybbm | 0e7ab7ef60f15951660015f2b9be0ff7192f1095 | [
"BSD-2-Clause"
] | 1 | 2018-10-29T13:12:59.000Z | 2018-10-29T13:12:59.000Z | import re
from pybb.processors import BaseProcessor
from pybb.compat import get_user_model
from . import settings
class MentionProcessor(BaseProcessor):
username_re = r'@([\w\-]+)'
format = '@%(username)s'
tag = '[mention=%(user_id)s]%(username)s[/mention]'
model = get_user_model()
def get_user... | 25.479167 | 98 | 0.562551 | 1,104 | 0.902698 | 0 | 0 | 0 | 0 | 0 | 0 | 116 | 0.094849 |
32c304191982cf35da8aed8e53fd875c3bef3ba2 | 1,505 | py | Python | PageObjectModel/Test/addAndEditionData.py | lblaszkowski/Arena | 61f924bc7c3994ec7714fe68f60b02b35ccd286b | [
"Apache-2.0"
] | null | null | null | PageObjectModel/Test/addAndEditionData.py | lblaszkowski/Arena | 61f924bc7c3994ec7714fe68f60b02b35ccd286b | [
"Apache-2.0"
] | null | null | null | PageObjectModel/Test/addAndEditionData.py | lblaszkowski/Arena | 61f924bc7c3994ec7714fe68f60b02b35ccd286b | [
"Apache-2.0"
] | null | null | null | import unittest
from selenium import webdriver
from PageObjectModel.Pages.addAndEditionDataPage import AddAndEditionData_Page
from time import sleep
url = 'https://buggy-testingcup.pgs-soft.com/'
class AddAndEditionDataPage(unittest.TestCase):
def setUp(self, browser="mozilla", task="task_3"):
if browse... | 32.717391 | 106 | 0.67907 | 1,302 | 0.863968 | 0 | 0 | 0 | 0 | 0 | 0 | 252 | 0.16722 |
32c40b429ba7f1090b72fd13e36b8055346940c3 | 827 | py | Python | q2_api_client/clients/mobile_ws/calendar_client.py | jcook00/q2-api-client | 4431af164eb4baf52e26e8842e017cad1609a279 | [
"BSD-2-Clause"
] | null | null | null | q2_api_client/clients/mobile_ws/calendar_client.py | jcook00/q2-api-client | 4431af164eb4baf52e26e8842e017cad1609a279 | [
"BSD-2-Clause"
] | null | null | null | q2_api_client/clients/mobile_ws/calendar_client.py | jcook00/q2-api-client | 4431af164eb4baf52e26e8842e017cad1609a279 | [
"BSD-2-Clause"
] | null | null | null | from q2_api_client.clients.base_q2_client import BaseQ2Client
from q2_api_client.endpoints.mobile_ws_endpoints import CalendarEndpoint
class CalendarClient(BaseQ2Client):
def get_calendar(self):
"""GET /mobilews/calendar
:return: Response object
:rtype: requests.Response
"""
... | 33.08 | 108 | 0.718259 | 689 | 0.833132 | 0 | 0 | 0 | 0 | 0 | 0 | 280 | 0.338573 |
32c4baf38f537ef55e48bae1faabe6aee1fe7ca3 | 11,477 | py | Python | cg_token.py | gmnicke2/GISolve-API-Util | 74d10d2ae60c1f000ef151a394ef9276b284867a | [
"MIT"
] | null | null | null | cg_token.py | gmnicke2/GISolve-API-Util | 74d10d2ae60c1f000ef151a394ef9276b284867a | [
"MIT"
] | null | null | null | cg_token.py | gmnicke2/GISolve-API-Util | 74d10d2ae60c1f000ef151a394ef9276b284867a | [
"MIT"
] | null | null | null | #!/usr/bin/env python
"""
Set of utilities to issue/verify/revoke a CG token with REST calls
Requires valid username and password either in bash environment or
given at the command line.
Issue Token:
Token can be easily created (and stored to env) with the folloing:
# create token using CG_USERNAME, ... | 33.55848 | 81 | 0.611658 | 241 | 0.020999 | 0 | 0 | 0 | 0 | 0 | 0 | 6,487 | 0.565217 |
32c57ec480ef32335403cba14fba78c713f0eb97 | 741 | py | Python | azext_script/compilers/az/handlers/HDInsight.py | yorek/adl | d9da1b7d46c71415e38a6efe5b1c8d45b02b3704 | [
"MIT"
] | null | null | null | azext_script/compilers/az/handlers/HDInsight.py | yorek/adl | d9da1b7d46c71415e38a6efe5b1c8d45b02b3704 | [
"MIT"
] | 1 | 2018-10-15T05:51:38.000Z | 2018-10-15T05:51:38.000Z | azext_script/compilers/az/handlers/HDInsight.py | yorek/adl | d9da1b7d46c71415e38a6efe5b1c8d45b02b3704 | [
"MIT"
] | 1 | 2018-10-18T18:41:02.000Z | 2018-10-18T18:41:02.000Z | from .Generic import GenericHandler
class HDInsightHandler(GenericHandler):
azure_object = "hdinsight"
def execute(self):
fqn = self.get_full_resource_name()
self.add_context_parameter("resource-group", "group")
if fqn == "hdinsight" and self.action == "create": ... | 30.875 | 70 | 0.618084 | 702 | 0.947368 | 0 | 0 | 0 | 0 | 0 | 0 | 148 | 0.19973 |
32c59fc06a151e5b5740b23fbb1aff371ee1d8f2 | 30,841 | py | Python | a2-py-beta/erd_converter.py | francisgerman70/CSC370 | 0682ea5abdfdbc87b76efd18f98e27a6c49d2b45 | [
"MIT"
] | null | null | null | a2-py-beta/erd_converter.py | francisgerman70/CSC370 | 0682ea5abdfdbc87b76efd18f98e27a6c49d2b45 | [
"MIT"
] | null | null | null | a2-py-beta/erd_converter.py | francisgerman70/CSC370 | 0682ea5abdfdbc87b76efd18f98e27a6c49d2b45 | [
"MIT"
] | null | null | null | from audioop import add
from erd import *
from table import *
# This function converts an ERD object into a Database object
# The Database object should correspond to a fully correct implementation
# of the ERD, including both data structure and constraints, such that the
# CREATE TABLE statements generated by the Dat... | 55.171735 | 303 | 0.642489 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4,371 | 0.141727 |
32c6b6ee54440932d94dc43f2f2f342cc123a082 | 1,848 | py | Python | ObitSystem/ObitSD/scripts/scriptResidCal.py | sarrvesh/Obit | e4ce6029e9beb2a8c0316ee81ea710b66b2b7986 | [
"Linux-OpenIB"
] | 5 | 2019-08-26T06:53:08.000Z | 2020-10-20T01:08:59.000Z | ObitSystem/ObitSD/scripts/scriptResidCal.py | sarrvesh/Obit | e4ce6029e9beb2a8c0316ee81ea710b66b2b7986 | [
"Linux-OpenIB"
] | null | null | null | ObitSystem/ObitSD/scripts/scriptResidCal.py | sarrvesh/Obit | e4ce6029e9beb2a8c0316ee81ea710b66b2b7986 | [
"Linux-OpenIB"
] | 8 | 2017-08-29T15:12:32.000Z | 2022-03-31T12:16:08.000Z | # Program to self calibrate OTF data
import Obit, OTF, Image, OSystem, OErr, OTFGetSoln, InfoList, Table
# Init Obit
err=OErr.OErr()
ObitSys=OSystem.OSystem ("Python", 1, 103, 1, ["None"], 1, ["./"], 1, 0, err)
OErr.printErrMsg(err, "Error with Obit startup")
# Files
disk = 1
# Dirty
inFullFile = "OTFDirtyFull.fits"... | 31.862069 | 77 | 0.715368 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 631 | 0.34145 |
32c6c31592e8107e78ef2bb52771dcffacd50781 | 393 | py | Python | html_mining/twitter.py | sourceperl/sandbox | bbe1be52c3e51906a8ec94411c4df6a95dcbb39c | [
"MIT"
] | null | null | null | html_mining/twitter.py | sourceperl/sandbox | bbe1be52c3e51906a8ec94411c4df6a95dcbb39c | [
"MIT"
] | null | null | null | html_mining/twitter.py | sourceperl/sandbox | bbe1be52c3e51906a8ec94411c4df6a95dcbb39c | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import requests
from bs4 import BeautifulSoup
r = requests.get("https://twitter.com/ThePSF", headers={"User-Agent": ""})
if r.status_code == 200:
s = BeautifulSoup(r.content, "html.parser")
# extract tweets
l_tw = []
for p in s.find_all("p", attrs={"clas... | 23.117647 | 74 | 0.62341 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 138 | 0.351145 |
32c80a80f478110db9183291633d248502cd65ad | 590 | py | Python | warehouse_labeling_machines/libs/utils.py | sdg97/warehouse_labeling_machines | 3650b9fb2d3fef85ee01925acf0a9266dafe746a | [
"Apache-2.0"
] | null | null | null | warehouse_labeling_machines/libs/utils.py | sdg97/warehouse_labeling_machines | 3650b9fb2d3fef85ee01925acf0a9266dafe746a | [
"Apache-2.0"
] | null | null | null | warehouse_labeling_machines/libs/utils.py | sdg97/warehouse_labeling_machines | 3650b9fb2d3fef85ee01925acf0a9266dafe746a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
import decimal
import multiprocessing
import random
def roundDecimal(v):
'''
Sembra che l'arrotondamento di un decimal sia più complicato del previsto
'''
return v.quantize(decimal.Decimal('0.01'), rounding=decimal.ROUND_HALF_UP)
def maybeStart(startCb, deb... | 21.851852 | 78 | 0.666102 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 259 | 0.43824 |
32c8f25c548f019704dfb22f0db7ab07f62d2dd9 | 504 | py | Python | projeto/main/migrations/0017_alter_user_room.py | neilom18/g5-chess | 8998199b3432f0b83aa27e5c2126173ecc87f311 | [
"MIT"
] | null | null | null | projeto/main/migrations/0017_alter_user_room.py | neilom18/g5-chess | 8998199b3432f0b83aa27e5c2126173ecc87f311 | [
"MIT"
] | 1 | 2021-10-03T22:26:45.000Z | 2021-10-03T22:26:45.000Z | projeto/main/migrations/0017_alter_user_room.py | neilom18/g5-chess | 8998199b3432f0b83aa27e5c2126173ecc87f311 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.4 on 2021-09-24 15:29
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('main', '0016_alter_user_usercode'),
]
operations = [
migrations.AlterField(
model_name='user',
... | 25.2 | 141 | 0.640873 | 378 | 0.75 | 0 | 0 | 0 | 0 | 0 | 0 | 108 | 0.214286 |
08613adf55222eb81cf9aea8d6ff94d2cf2ab660 | 105 | py | Python | groups/views.py | AliAkberAakash/learn-in-groups | 850601ddd5520c850ebec12003c8337670762948 | [
"MIT"
] | null | null | null | groups/views.py | AliAkberAakash/learn-in-groups | 850601ddd5520c850ebec12003c8337670762948 | [
"MIT"
] | null | null | null | groups/views.py | AliAkberAakash/learn-in-groups | 850601ddd5520c850ebec12003c8337670762948 | [
"MIT"
] | null | null | null | from django.shortcuts import render
def group_list(request):
return render(request, 'group_list.html')
| 21 | 42 | 0.8 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 17 | 0.161905 |
086749fe086bfe8b53982e2dc76e87c1e91b6cc7 | 1,596 | py | Python | code/p3.py | OscarFlores-IFi/CDINP19 | 7fb0cb6ff36b9a10bcfa0772b172c5e49996df48 | [
"MIT"
] | null | null | null | code/p3.py | OscarFlores-IFi/CDINP19 | 7fb0cb6ff36b9a10bcfa0772b172c5e49996df48 | [
"MIT"
] | null | null | null | code/p3.py | OscarFlores-IFi/CDINP19 | 7fb0cb6ff36b9a10bcfa0772b172c5e49996df48 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Feb 11 09:18:37 2019
@author: if715029
"""
import pandas as pd
import numpy as np
import sklearn.metrics as skm
import scipy.spatial.distance as sc
#%% Leer datos
data = pd.read_excel('../data/Test de películas(1-16).xlsx', encoding='latin_1')
#%% Seleccionar datos (a mi e... | 21.863014 | 80 | 0.697368 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 575 | 0.359375 |
0867a27f2b0a9d65b0fbacf348d77dfbc3427264 | 1,187 | py | Python | itao/utils/qt_logger.py | MaxChangInnodisk/itao | b0745eb48bf67718ef00db566c4cc19896d903a7 | [
"MIT"
] | null | null | null | itao/utils/qt_logger.py | MaxChangInnodisk/itao | b0745eb48bf67718ef00db566c4cc19896d903a7 | [
"MIT"
] | null | null | null | itao/utils/qt_logger.py | MaxChangInnodisk/itao | b0745eb48bf67718ef00db566c4cc19896d903a7 | [
"MIT"
] | null | null | null | import logging
class CustomLogger:
def __init__(self):
pass
""" Create logger which name is 'dev' """
def create_logger(self, name='dev', log_file='itao.log', write_mode='w'):
logger = logging.getLogger(name)
# setup LEVEL
logger.setLevel(logging.DEBUG)
# setup... | 34.911765 | 97 | 0.615838 | 1,171 | 0.986521 | 0 | 0 | 0 | 0 | 0 | 0 | 277 | 0.233361 |
0867ca55ebc85e21b29f1ca39ad6e18f1d0c662a | 99 | py | Python | pypupil/serializer.py | choisuyeon/pypupil | 3fdb1f29c6b28613b6b39094c01e61560214daff | [
"MIT"
] | 9 | 2018-08-07T11:00:54.000Z | 2021-02-13T04:36:05.000Z | pypupil/serializer.py | choisuyeon/pypupil | 3fdb1f29c6b28613b6b39094c01e61560214daff | [
"MIT"
] | null | null | null | pypupil/serializer.py | choisuyeon/pypupil | 3fdb1f29c6b28613b6b39094c01e61560214daff | [
"MIT"
] | 1 | 2020-12-03T00:44:29.000Z | 2020-12-03T00:44:29.000Z | class Serializer:
""" send data serially
"""
def __init__(self):
return
| 14.142857 | 27 | 0.525253 | 97 | 0.979798 | 0 | 0 | 0 | 0 | 0 | 0 | 31 | 0.313131 |
08687783aacc944c351fc37618c9c87ef69b3d6b | 2,296 | py | Python | scripts/ndvi_diff.py | hkfrei/pythonRemoteSensing | c8681d859313ee5ad01e5b9753f8c43462268624 | [
"MIT"
] | 1 | 2019-12-18T21:54:22.000Z | 2019-12-18T21:54:22.000Z | scripts/ndvi_diff.py | hkfrei/pythonRemoteSensing | c8681d859313ee5ad01e5b9753f8c43462268624 | [
"MIT"
] | null | null | null | scripts/ndvi_diff.py | hkfrei/pythonRemoteSensing | c8681d859313ee5ad01e5b9753f8c43462268624 | [
"MIT"
] | 1 | 2020-07-01T16:44:21.000Z | 2020-07-01T16:44:21.000Z | import numpy
import rasterio
import gdal
print('all modules imported')
# path to the folder with the ndvi rasters
base_path = "/Users/hk/Downloads/gaga/"
# shapefile with forest mask
forest_mask = base_path + "waldmaske_wgs84.shp"
# initialize the necessary rasters for the ndvi calculation.
ndvi_2017 = rasterio.open... | 41.745455 | 120 | 0.726916 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 946 | 0.412021 |
08691612fc229c4b74017cbf49ecddb0965a12ea | 462 | py | Python | helga_umb/signals/util.py | ktdreyer/helga-umb | f0c6858745d90205e74eec0eb5ebaafa655b2336 | [
"MIT"
] | null | null | null | helga_umb/signals/util.py | ktdreyer/helga-umb | f0c6858745d90205e74eec0eb5ebaafa655b2336 | [
"MIT"
] | 2 | 2018-04-27T15:37:10.000Z | 2018-08-22T21:00:40.000Z | helga_umb/signals/util.py | ktdreyer/helga-umb | f0c6858745d90205e74eec0eb5ebaafa655b2336 | [
"MIT"
] | null | null | null | def product_from_branch(branch):
"""
Return a product name from this branch name.
:param branch: eg. "ceph-3.0-rhel-7"
:returns: eg. "ceph"
"""
if branch.startswith('private-'):
# Let's just return the thing after "private-" and hope there's a
# product string match somewhere in... | 30.8 | 73 | 0.621212 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 297 | 0.642857 |
08698150dd4c0d31ae984574dc2eb2d108201474 | 752 | py | Python | work/2021/ne201076/src/cpu_notify.py | tora01/SkillLab | 61ebfaf45c503b9e6f4a3d05a7edd4de2fcad93e | [
"CC0-1.0"
] | 2 | 2020-09-09T02:40:23.000Z | 2021-09-12T18:08:15.000Z | work/2021/ne201076/src/cpu_notify.py | tora01/SkillLab | 61ebfaf45c503b9e6f4a3d05a7edd4de2fcad93e | [
"CC0-1.0"
] | 1 | 2021-09-14T09:36:38.000Z | 2021-09-14T09:36:38.000Z | work/2021/ne201076/src/cpu_notify.py | tora01/SkillLab | 61ebfaf45c503b9e6f4a3d05a7edd4de2fcad93e | [
"CC0-1.0"
] | 19 | 2021-09-07T06:11:29.000Z | 2021-09-07T07:45:08.000Z | import requests
url = 'https://notify-api.line.me/api/notify'#LINE NotifyのAPIのURL
token = '2RNdAKwlaj69HK0KlEdMX1y575gDWNKrPpggFcLnh82' #自分のアクセストークン
ms = "新たなソフトを開くと負担が過剰にかかってしまいます。"#送信する通知内容
def line(message,url,token):
post_data = {'message': message}
headers = {'Authorization': 'Bearer ' + token}
#送信する... | 31.333333 | 73 | 0.670213 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 480 | 0.503145 |
0869ba6e18dfa77decb88cf8144acde0c451215e | 49 | py | Python | src/titiler/application/titiler/application/__init__.py | kalxas/titiler | 5e4e497f1033eb64b65315068c094abe8259cd8c | [
"MIT"
] | null | null | null | src/titiler/application/titiler/application/__init__.py | kalxas/titiler | 5e4e497f1033eb64b65315068c094abe8259cd8c | [
"MIT"
] | null | null | null | src/titiler/application/titiler/application/__init__.py | kalxas/titiler | 5e4e497f1033eb64b65315068c094abe8259cd8c | [
"MIT"
] | null | null | null | """titiler.application"""
__version__ = "0.6.0"
| 12.25 | 25 | 0.653061 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 32 | 0.653061 |
0869cc3c4f8fe0eb7c864da5eb1b5caf6b676944 | 550 | py | Python | testScripts/getAllFiles.py | ryanemerson/JGroups-HiTab | 8fd8c6c45219e4c04618630be7e2449ebb0578dc | [
"Apache-2.0"
] | null | null | null | testScripts/getAllFiles.py | ryanemerson/JGroups-HiTab | 8fd8c6c45219e4c04618630be7e2449ebb0578dc | [
"Apache-2.0"
] | null | null | null | testScripts/getAllFiles.py | ryanemerson/JGroups-HiTab | 8fd8c6c45219e4c04618630be7e2449ebb0578dc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import os
from collections import defaultdict
hosts = {'mill001', 'mill004', 'mill005'}
user = 'a7109534'
file_location = '/work/a7109534/'
#file_location = '/home/ryan/workspace/JGroups'
#file_location = '/home/pg/p11/a7109534/'
file_wildcard = '*'
extension = ".csv"
get_file = file_location + f... | 26.190476 | 77 | 0.681818 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 196 | 0.356364 |
0869fc3b1af3273cc468fc0da2d162910f894bff | 3,610 | py | Python | studio/model.py | NunoEdgarGFlowHub/studio | 42b221892a81535842ff25cbbcc434d6422a19e5 | [
"Apache-2.0"
] | null | null | null | studio/model.py | NunoEdgarGFlowHub/studio | 42b221892a81535842ff25cbbcc434d6422a19e5 | [
"Apache-2.0"
] | null | null | null | studio/model.py | NunoEdgarGFlowHub/studio | 42b221892a81535842ff25cbbcc434d6422a19e5 | [
"Apache-2.0"
] | null | null | null | """Data providers."""
import os
try:
# try-except statement needed because
# pip module is not available in google app engine
import pip
except ImportError:
pip = None
import yaml
import six
from .artifact_store import get_artifact_store
from .http_provider import HTTPProvider
from .firebase_provider... | 28.88 | 77 | 0.591967 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 455 | 0.126039 |
086a788b83deae56a16772a629310d3b84a228a0 | 570 | py | Python | Server/server/model_inference/predictor.py | thaiminhpv/Doctor-Cyclop-Hackathon-2021 | afb943f7d00ceccb408c895077517ddd06d87fd7 | [
"MIT"
] | 6 | 2021-04-30T05:28:04.000Z | 2022-03-21T14:50:43.000Z | Server/server/model_inference/predictor.py | thaiminhpv/Doctor-Cyclop-Hackathon-2021 | afb943f7d00ceccb408c895077517ddd06d87fd7 | [
"MIT"
] | null | null | null | Server/server/model_inference/predictor.py | thaiminhpv/Doctor-Cyclop-Hackathon-2021 | afb943f7d00ceccb408c895077517ddd06d87fd7 | [
"MIT"
] | 1 | 2022-01-10T14:58:02.000Z | 2022-01-10T14:58:02.000Z | import numpy as np
import pandas as pd
from server.model_inference.config import labels
from server.model_inference.core_model import get_model_prediction
from server.util.prediction_to_json import pandas_to_json
def get_predictions(images):
ids = list(images.keys())
out = np.hstack((np.asarray(ids)[np.newax... | 31.666667 | 90 | 0.764912 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 18 | 0.031579 |
086b6939a15a14e2ba2c7a9bf78818444b385782 | 7,310 | py | Python | extendPlugins/minecraft.py | f88af65a/XyzB0ts | 21a557288877b24f337f16002d8bb72b155f2551 | [
"MIT"
] | 4 | 2021-10-17T11:54:07.000Z | 2022-03-18T13:10:11.000Z | extendPlugins/minecraft.py | f88af65a/XyzB0ts | 21a557288877b24f337f16002d8bb72b155f2551 | [
"MIT"
] | null | null | null | extendPlugins/minecraft.py | f88af65a/XyzB0ts | 21a557288877b24f337f16002d8bb72b155f2551 | [
"MIT"
] | 1 | 2021-10-16T09:51:25.000Z | 2021-10-16T09:51:25.000Z | import asyncio
import json
import socket
import time
from botsdk.util.BotPlugin import BotPlugin
from botsdk.util.Error import printTraceBack
def getMcRequestData(ip, port):
data = (b"\x00\xff\xff\xff\xff\x0f"
+ bytes([len(ip.encode("utf8"))])
+ ip.encode("utf8")
+ int.to_byte... | 36.733668 | 79 | 0.477291 | 6,951 | 0.91726 | 0 | 0 | 0 | 0 | 6,508 | 0.858802 | 1,178 | 0.15545 |