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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
424d80dc7999edc27c21ab202ecf629475f40e26 | 2,026 | py | Python | tests/primitives/flow/probe_tcpip_extended_unibiflow_test.py | kjerabek/netexp | 362c200230ba7b2549adcedd4a9890492dad51c7 | [
"MIT"
] | null | null | null | tests/primitives/flow/probe_tcpip_extended_unibiflow_test.py | kjerabek/netexp | 362c200230ba7b2549adcedd4a9890492dad51c7 | [
"MIT"
] | null | null | null | tests/primitives/flow/probe_tcpip_extended_unibiflow_test.py | kjerabek/netexp | 362c200230ba7b2549adcedd4a9890492dad51c7 | [
"MIT"
] | null | null | null | from tests.primitives.flow import probe_tcpip_extended_biflow_test
from netexp.primitives.flow import TCPIPFlowExtendedUniBiFlowInfo
from netexp.common import naming
class TestTCPIPExtendedUniBiFlow(probe_tcpip_extended_biflow_test.TestTCPIPExtendedBiFlow):
flow_class = TCPIPFlowExtendedUniBiFlowInfo
def t... | 56.277778 | 117 | 0.651037 | 1,856 | 0.916091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
424f02955cdf26ece00480c3e560a36d37aea6f6 | 19,816 | py | Python | optionstrader/database.py | Zaitsev11/Optionstrader | ed2dbef802ad08f14a0e5280e91746f1bf1fa3f3 | [
"MIT"
] | 6 | 2018-04-26T03:02:04.000Z | 2022-02-26T04:58:53.000Z | optionstrader/database.py | webclinic017/Optionstrader | ed2dbef802ad08f14a0e5280e91746f1bf1fa3f3 | [
"MIT"
] | null | null | null | optionstrader/database.py | webclinic017/Optionstrader | ed2dbef802ad08f14a0e5280e91746f1bf1fa3f3 | [
"MIT"
] | 5 | 2019-12-01T08:09:08.000Z | 2021-11-28T03:43:24.000Z | import time
import mysql.connector
from optionstrader.customlogging import CustomLog
from optionstrader.parser import Parser
MYSQL_IP_ADDR = '192.168.1.10'
# Used to debug via logs
DEBUG = False
class Database:
def __init__(self):
"""
There's some confusion with database vs table.
We wil... | 41.717895 | 155 | 0.605874 | 19,618 | 0.990008 | 0 | 0 | 0 | 0 | 0 | 0 | 7,637 | 0.385396 |
424fc9a502a8c9fe3c5da2a1e3dec902d92abba5 | 10,254 | py | Python | backend/api/migrations/0001_initial.py | leowotzak/ljwe-db | ab49f90feaac5fad26efa900db5567c9c09f3435 | [
"MIT"
] | null | null | null | backend/api/migrations/0001_initial.py | leowotzak/ljwe-db | ab49f90feaac5fad26efa900db5567c9c09f3435 | [
"MIT"
] | 9 | 2021-11-17T18:31:29.000Z | 2021-11-21T00:47:39.000Z | backend/api/migrations/0001_initial.py | leowotzak/ljwe-db | ab49f90feaac5fad26efa900db5567c9c09f3435 | [
"MIT"
] | null | null | null | # Generated by Django 3.2.9 on 2021-11-24 02:52
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Symbol',
fields=[
... | 49.062201 | 111 | 0.536083 | 10,128 | 0.987712 | 0 | 0 | 0 | 0 | 0 | 0 | 2,185 | 0.213088 |
42500bb71a15c0815810b37eafb946db4fb96b64 | 3,713 | py | Python | Ch2_Linked_Lists/test/test_CTCI_Ch2_Ex6.py | mtrdazzo/CTCI | 30a82aed96b05fe21b7d337a138e4ec19950eb9d | [
"MIT"
] | null | null | null | Ch2_Linked_Lists/test/test_CTCI_Ch2_Ex6.py | mtrdazzo/CTCI | 30a82aed96b05fe21b7d337a138e4ec19950eb9d | [
"MIT"
] | null | null | null | Ch2_Linked_Lists/test/test_CTCI_Ch2_Ex6.py | mtrdazzo/CTCI | 30a82aed96b05fe21b7d337a138e4ec19950eb9d | [
"MIT"
] | null | null | null | from unittest import TestCase
from CTCI.Ch2_Linked_Lists.common.SinglyLinkedList import Empty, Node
from CTCI.Ch2_Linked_Lists.exercises.CTCI_Ch2_Ex6 import PalindromeSinglyLinkedList, is_palindrome_brute_force
from CTCI.Ch2_Linked_Lists.exercises.CTCI_Ch2_Ex6 import is_palindrome_reverse
class TestPalindromeSinglyLi... | 24.919463 | 110 | 0.649879 | 3,414 | 0.919472 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
4250d5da81ea72feff3b65a105d5b2c76567a7d7 | 49,917 | py | Python | alphafold2_pytorch/utils.py | nilbot/alphafold2 | 455124ca9135e534739b9670c010512487965547 | [
"MIT"
] | 1 | 2022-01-21T04:58:18.000Z | 2022-01-21T04:58:18.000Z | alphafold2_pytorch/utils.py | nilbot/alphafold2 | 455124ca9135e534739b9670c010512487965547 | [
"MIT"
] | null | null | null | alphafold2_pytorch/utils.py | nilbot/alphafold2 | 455124ca9135e534739b9670c010512487965547 | [
"MIT"
] | null | null | null | # utils for working with 3d-protein structures
import os
import numpy as np
import torch
from functools import wraps
from einops import rearrange, repeat
# import torch_sparse # only needed for sparse nth_deg adj calculation
# bio
from Bio import SeqIO
import itertools
import string
# sidechainnet
from sidechainnet... | 41.356255 | 122 | 0.610033 | 0 | 0 | 0 | 0 | 4,773 | 0.095575 | 0 | 0 | 22,164 | 0.443813 |
4252097259c5f8f2219e8a65c81337c134ef50fa | 1,151 | py | Python | src/clean_property_file.py | wmaciel/van-crime | e70d0310f41de3a1b54572f6c6bf01083e56e0ab | [
"MIT"
] | 2 | 2016-03-03T00:14:59.000Z | 2016-08-21T14:28:02.000Z | src/clean_property_file.py | wmaciel/van-crime | e70d0310f41de3a1b54572f6c6bf01083e56e0ab | [
"MIT"
] | null | null | null | src/clean_property_file.py | wmaciel/van-crime | e70d0310f41de3a1b54572f6c6bf01083e56e0ab | [
"MIT"
] | null | null | null | __author__ = 'walthermaciel'
import pandas as pd
import numpy as np
def load_csv(path):
# Load
print 'Loading', path
df = pd.read_csv(path)
# Remove unwanted columns
print 'Dropping unwanted columns'
df = df[['PID', 'TAX_ASSESSMENT_YEAR', 'CURRENT_LAND_VALUE', 'STREET_NAME', 'TO_CIVIC_NUMBER'... | 28.775 | 99 | 0.650738 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 502 | 0.436142 |
4252c9d8b3317ae5bd56696743e5b2124dce1942 | 4,040 | py | Python | homeassistant/components/sensor/verisure.py | beschouten/home-assistant | f50c30bbbad4d92e342c8547630c63c0c7882803 | [
"MIT"
] | 1 | 2016-07-14T05:20:54.000Z | 2016-07-14T05:20:54.000Z | homeassistant/components/sensor/verisure.py | beschouten/home-assistant | f50c30bbbad4d92e342c8547630c63c0c7882803 | [
"MIT"
] | null | null | null | homeassistant/components/sensor/verisure.py | beschouten/home-assistant | f50c30bbbad4d92e342c8547630c63c0c7882803 | [
"MIT"
] | 1 | 2018-11-22T13:55:23.000Z | 2018-11-22T13:55:23.000Z | """
Interfaces with Verisure sensors.
For more details about this platform, please refer to the documentation at
documentation at https://home-assistant.io/components/verisure/
"""
import logging
from homeassistant.components.verisure import HUB as hub
from homeassistant.const import TEMP_CELSIUS
from homeassistant.h... | 26.933333 | 74 | 0.611881 | 2,617 | 0.647612 | 0 | 0 | 1,715 | 0.4244 | 0 | 0 | 1,211 | 0.299678 |
4253d0f64f25024f864712c154a198a0bd7c1158 | 1,135 | py | Python | articles/blogs/tests/factories.py | MahmoudFarid/articles | f0238908b1430c949dace50401fb3ddf268a581b | [
"MIT"
] | null | null | null | articles/blogs/tests/factories.py | MahmoudFarid/articles | f0238908b1430c949dace50401fb3ddf268a581b | [
"MIT"
] | null | null | null | articles/blogs/tests/factories.py | MahmoudFarid/articles | f0238908b1430c949dace50401fb3ddf268a581b | [
"MIT"
] | null | null | null | import factory
from factory.django import DjangoModelFactory as Factory
from django.contrib.auth.models import Permission
from ..models import Blog
from articles.users.tests.factories import UserFactory
class Blogfactory(Factory):
user = user = factory.SubFactory(UserFactory)
title = factory.Faker('sentence... | 33.382353 | 102 | 0.767401 | 488 | 0.429956 | 0 | 0 | 0 | 0 | 0 | 0 | 169 | 0.148899 |
425489e4c1a682c5eeaad70ce3b5e922f8f9536b | 8,847 | py | Python | api_formatter/serializers.py | RockefellerArchiveCenter/argo | c02fec68dbb50382f3f0bdf11c51240ca22a181c | [
"MIT"
] | null | null | null | api_formatter/serializers.py | RockefellerArchiveCenter/argo | c02fec68dbb50382f3f0bdf11c51240ca22a181c | [
"MIT"
] | 115 | 2019-08-19T20:19:06.000Z | 2022-03-04T17:40:50.000Z | api_formatter/serializers.py | RockefellerArchiveCenter/argo | c02fec68dbb50382f3f0bdf11c51240ca22a181c | [
"MIT"
] | null | null | null | from datetime import datetime
from django.urls import reverse
from rest_framework import serializers
from .view_helpers import description_from_notes
class ExternalIdentifierSerializer(serializers.Serializer):
identifier = serializers.CharField()
source = serializers.CharField()
class DateSerializer(seria... | 35.247012 | 98 | 0.706228 | 8,626 | 0.97502 | 0 | 0 | 0 | 0 | 0 | 0 | 643 | 0.07268 |
42549d1737ce596628e42957af0838f8a820986b | 828 | py | Python | cmz/cms_news/migrations/0004_auto_20160923_1958.py | inmagik/cmz | e183f0c7203bda5efb1cbeb96f4f06a76aa91231 | [
"MIT"
] | 1 | 2016-10-01T18:35:24.000Z | 2016-10-01T18:35:24.000Z | cmz/cms_news/migrations/0004_auto_20160923_1958.py | inmagik/cmz | e183f0c7203bda5efb1cbeb96f4f06a76aa91231 | [
"MIT"
] | 8 | 2016-09-14T21:39:09.000Z | 2016-10-25T20:08:31.000Z | cmz/cms_news/migrations/0004_auto_20160923_1958.py | inmagik/cmz | e183f0c7203bda5efb1cbeb96f4f06a76aa91231 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-09-23 19:58
from __future__ import unicode_literals
import datetime
from django.db import migrations, models
from django.utils.timezone import utc
class Migration(migrations.Migration):
dependencies = [
('cms_news', '0003_auto_20160923_1956'),
... | 27.6 | 126 | 0.621981 | 617 | 0.745169 | 0 | 0 | 0 | 0 | 0 | 0 | 152 | 0.183575 |
42553eda4ebfb5ccb85d9727626440163f717d34 | 3,252 | py | Python | mopidy/audio/utils.py | grdorin/mopidy | 76db44088c102d7ad92a3fc6a15a938e66b99b0d | [
"Apache-2.0"
] | 6,700 | 2015-01-01T03:57:59.000Z | 2022-03-30T09:31:31.000Z | mopidy/audio/utils.py | pnijhara/mopidy | 7168787ea6c82b66e138fc2b388d78fa1c7661ba | [
"Apache-2.0"
] | 1,141 | 2015-01-02T09:48:59.000Z | 2022-03-28T22:25:30.000Z | mopidy/audio/utils.py | pnijhara/mopidy | 7168787ea6c82b66e138fc2b388d78fa1c7661ba | [
"Apache-2.0"
] | 735 | 2015-01-01T21:15:50.000Z | 2022-03-20T16:13:44.000Z | from mopidy import httpclient
from mopidy.internal.gi import Gst
def calculate_duration(num_samples, sample_rate):
"""Determine duration of samples using GStreamer helper for precise
math."""
return Gst.util_uint64_scale(num_samples, Gst.SECOND, sample_rate)
def create_buffer(data, timestamp=None, durat... | 31.882353 | 78 | 0.681119 | 995 | 0.305966 | 0 | 0 | 0 | 0 | 0 | 0 | 1,400 | 0.430504 |
425582d3b0bd9aebc3e98f0f395cf656db9c8b38 | 467 | py | Python | day09/part1.py | mtn/advent16 | 0df34237485ee1246532e9eda0ef643e6950d13e | [
"MIT"
] | null | null | null | day09/part1.py | mtn/advent16 | 0df34237485ee1246532e9eda0ef643e6950d13e | [
"MIT"
] | null | null | null | day09/part1.py | mtn/advent16 | 0df34237485ee1246532e9eda0ef643e6950d13e | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import re
with open("input.txt") as f:
content = f.read().strip()
ans = ""
i = 0
while i < len(content):
if content[i] == "(":
end = content[i:].find(")") + i
instr = content[i+1:end]
chars, times = map(int, content[i+1:end].split("x"))
to_copy = conten... | 20.304348 | 60 | 0.509636 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 0.094218 |
4255be118dbe243d9d0c4b4eac0548f7377725a0 | 2,825 | py | Python | sa/profiles/Alcatel/AOS/get_inventory.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 84 | 2017-10-22T11:01:39.000Z | 2022-02-27T03:43:48.000Z | sa/profiles/Alcatel/AOS/get_inventory.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 22 | 2017-12-11T07:21:56.000Z | 2021-09-23T02:53:50.000Z | sa/profiles/Alcatel/AOS/get_inventory.py | prorevizor/noc | 37e44b8afc64318b10699c06a1138eee9e7d6a4e | [
"BSD-3-Clause"
] | 23 | 2017-12-06T06:59:52.000Z | 2022-02-24T00:02:25.000Z | # ----------------------------------------------------------------------
# Alcatel.AOS.get_inventory
# ----------------------------------------------------------------------
# Copyright (C) 2007-2014 The NOC Project
# See LICENSE for details
# ----------------------------------------------------------------------
# Py... | 36.217949 | 72 | 0.43469 | 2,362 | 0.836106 | 0 | 0 | 0 | 0 | 0 | 0 | 1,262 | 0.446726 |
42569d1c317bd48e4f4e7021e87396555e651ced | 1,276 | py | Python | db_conn.py | achhetr/Library-book-store-app | a85e9a26dba48119ce52abb5ee8219528e06ac30 | [
"MIT"
] | null | null | null | db_conn.py | achhetr/Library-book-store-app | a85e9a26dba48119ce52abb5ee8219528e06ac30 | [
"MIT"
] | null | null | null | db_conn.py | achhetr/Library-book-store-app | a85e9a26dba48119ce52abb5ee8219528e06ac30 | [
"MIT"
] | null | null | null | import sqlite3
class Database:
# create book always if not exists
def __init__(self,db):
self.conn = sqlite3.connect(db)
self.cur = self.conn.execute("CREATE TABLE IF NOT EXISTS book (id INTEGER PRIMARY KEY, " +
"title TEXT, author TEXT, year INTEGER, isbn INTEGER)"... | 33.578947 | 98 | 0.579937 | 1,260 | 0.987461 | 0 | 0 | 0 | 0 | 0 | 0 | 375 | 0.293887 |
4258b13ddf592d8967b4cf56eb4a465b00010bc4 | 5,286 | py | Python | edge-tool/cbor_converter.py | hckim-kornic/mbed-edge-kornic | b83ea92066fae7c274777aa27494d5524c577c12 | [
"Apache-2.0"
] | null | null | null | edge-tool/cbor_converter.py | hckim-kornic/mbed-edge-kornic | b83ea92066fae7c274777aa27494d5524c577c12 | [
"Apache-2.0"
] | null | null | null | edge-tool/cbor_converter.py | hckim-kornic/mbed-edge-kornic | b83ea92066fae7c274777aa27494d5524c577c12 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright 2018 ARM Ltd.
#
# SPDX-License-Identifier: Apache-2.0
#
# 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 ... | 40.661538 | 99 | 0.620885 | 2,896 | 0.547862 | 0 | 0 | 0 | 0 | 0 | 0 | 2,257 | 0.426977 |
4258ec1ee3116d288de649b3f19210bd3aa35e35 | 3,012 | py | Python | turbinia/processors/archive_test.py | sa3eed3ed/turbinia | 1eb4db37813f2bd44dcc2c3764e9411f6a2f9d97 | [
"Apache-2.0"
] | 559 | 2015-09-16T21:55:12.000Z | 2022-03-28T11:08:11.000Z | turbinia/processors/archive_test.py | sa3eed3ed/turbinia | 1eb4db37813f2bd44dcc2c3764e9411f6a2f9d97 | [
"Apache-2.0"
] | 630 | 2015-09-16T21:53:41.000Z | 2022-03-25T07:03:32.000Z | turbinia/processors/archive_test.py | sa3eed3ed/turbinia | 1eb4db37813f2bd44dcc2c3764e9411f6a2f9d97 | [
"Apache-2.0"
] | 158 | 2015-12-06T20:39:32.000Z | 2022-03-13T22:15:01.000Z | # -*- coding: utf-8 -*-
# Copyright 2019 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | 33.842697 | 74 | 0.729416 | 2,056 | 0.682603 | 0 | 0 | 0 | 0 | 0 | 0 | 1,273 | 0.422643 |
42595d917949c306ffaf79514babf64460ba3c69 | 1,869 | py | Python | blog.py | BenTimor/SerializationConceptSystem | 0f85dc32063d270a5564cda3199d84d474e5d83e | [
"MIT"
] | 1 | 2020-11-13T22:21:47.000Z | 2020-11-13T22:21:47.000Z | blog.py | BenTimor/SerializationConceptSystem | 0f85dc32063d270a5564cda3199d84d474e5d83e | [
"MIT"
] | null | null | null | blog.py | BenTimor/SerializationConceptSystem | 0f85dc32063d270a5564cda3199d84d474e5d83e | [
"MIT"
] | null | null | null | from utils import database
class Config:
config = None
def __init__(self, users, posts, comments):
self.users = users
self.posts = posts
self.comments = comments
Config.config = self
@staticmethod
def update():
database["concept", True]["config", "WHERE id=1"] ... | 29.666667 | 160 | 0.602996 | 1,835 | 0.981808 | 0 | 0 | 1,171 | 0.626538 | 0 | 0 | 146 | 0.078117 |
4259a696e067dbb5b562342c586a116816461462 | 29 | py | Python | src/svr/tests/__init__.py | yottaawesome/fsnd-project-2 | 7ed478fa945a561a28af06dc8e4492a9fbea510a | [
"MIT"
] | 3 | 2019-05-04T12:30:00.000Z | 2020-05-14T06:28:51.000Z | src/svr/tests/__init__.py | yottaawesome/fsnd-project-2 | 7ed478fa945a561a28af06dc8e4492a9fbea510a | [
"MIT"
] | 1 | 2019-05-05T01:30:37.000Z | 2019-05-16T02:50:04.000Z | src/svr/tests/__init__.py | yottaawesome/fsnd-project-2 | 7ed478fa945a561a28af06dc8e4492a9fbea510a | [
"MIT"
] | 1 | 2020-03-27T07:12:40.000Z | 2020-03-27T07:12:40.000Z | from .test_db import TestDal
| 14.5 | 28 | 0.827586 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
425afadcb24a0ea23083f2d7fe78d83b6b1403c9 | 971 | py | Python | Owner/models.py | 2000090063/Vehicle_Rental_System-SDP-2- | 483d811aa239a226607b4bfb262c99da3be017b4 | [
"MIT"
] | 3 | 2022-03-12T08:27:42.000Z | 2022-03-17T12:16:16.000Z | Owner/models.py | 2000090063/Vehicle_Rental_System-SDP-2- | 483d811aa239a226607b4bfb262c99da3be017b4 | [
"MIT"
] | null | null | null | Owner/models.py | 2000090063/Vehicle_Rental_System-SDP-2- | 483d811aa239a226607b4bfb262c99da3be017b4 | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
class Owner(models.Model):
Owner_id = models.AutoField
Owner_firstname = models.CharField(max_length=60)
Owner_lastname = models.CharField(max_length=60)
Owner_address = models.CharField(max_length=600)
Owner_email = models.CharField(max_lengt... | 42.217391 | 70 | 0.748713 | 914 | 0.941298 | 0 | 0 | 0 | 0 | 0 | 0 | 50 | 0.051493 |
425c5f6cf6cd74314b97f4bcb6721e3f260e8ac7 | 6,548 | py | Python | tectosaur/fmm/builder.py | jlmaurer/tectosaur | 7cc5606d814f061395b19754e7a4b6c5e4c236e5 | [
"MIT"
] | 17 | 2017-06-29T16:48:56.000Z | 2021-10-03T18:31:41.000Z | tectosaur/fmm/builder.py | jlmaurer/tectosaur | 7cc5606d814f061395b19754e7a4b6c5e4c236e5 | [
"MIT"
] | 4 | 2018-05-29T08:21:13.000Z | 2021-04-01T01:28:50.000Z | tectosaur/fmm/builder.py | jlmaurer/tectosaur | 7cc5606d814f061395b19754e7a4b6c5e4c236e5 | [
"MIT"
] | 8 | 2019-06-10T22:19:40.000Z | 2022-01-12T20:55:37.000Z | import numpy as np
import tectosaur.util.gpu as gpu
from tectosaur.fmm.c2e import build_c2e
import logging
logger = logging.getLogger(__name__)
def make_tree(m, cfg, max_pts_per_cell):
tri_pts = m[0][m[1]]
centers = np.mean(tri_pts, axis = 1)
pt_dist = tri_pts - centers[:,np.newaxis,:]
Rs = np.max(np... | 36.786517 | 95 | 0.609652 | 4,655 | 0.710904 | 0 | 0 | 0 | 0 | 0 | 0 | 437 | 0.066738 |
425d43c4429c4fecedfff11a5de11c9d121390a6 | 2,553 | py | Python | fabio/test/codecs/test_mpaimage.py | picca/fabio | bc3aae330bef6e1c983007562157edfe6d7daf91 | [
"Apache-2.0"
] | null | null | null | fabio/test/codecs/test_mpaimage.py | picca/fabio | bc3aae330bef6e1c983007562157edfe6d7daf91 | [
"Apache-2.0"
] | 2 | 2019-04-24T13:43:41.000Z | 2019-06-13T08:54:02.000Z | fabio/test/codecs/test_mpaimage.py | boesecke/fabio | 11350e445a6def4d02c6860aea3ae7f36652af6a | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Project: Fable Input Output
# https://github.com/silx-kit/fabio
#
# Copyright (C) European Synchrotron Radiation Facility, Grenoble, France
#
# Principal author: Jérôme Kieffer ([email protected])
#
# This program is free software: you... | 34.04 | 111 | 0.653741 | 1,105 | 0.432485 | 0 | 0 | 0 | 0 | 0 | 0 | 1,220 | 0.477495 |
425dd97c671323bb5d6b53095ab3886bfc7da465 | 1,064 | py | Python | currencySpider.py | cloud322/helloScrap | 6313c5b99bce04c6a78a5dfb2ec910c73a33add3 | [
"Apache-2.0"
] | null | null | null | currencySpider.py | cloud322/helloScrap | 6313c5b99bce04c6a78a5dfb2ec910c73a33add3 | [
"Apache-2.0"
] | null | null | null | currencySpider.py | cloud322/helloScrap | 6313c5b99bce04c6a78a5dfb2ec910c73a33add3 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import scrapy
import codecs
import sys
#리눅스상에서 utf-8 로 파일에 내용을 기록하려면 시스템 기본 인코딩으 ㄹutf-8 로 설정해야함
reload(sys)
sys.setdefaultencoding('utf8')
# scrapy 에서 spider 는 crawling/scrapping을 담당하는 핵심부분
#crawling/scrapping 절차에 대한 정의를 하는 부분
class CurrSpider(scrapy.Spider):
name = 'currSpider'
start_... | 28 | 86 | 0.56015 | 853 | 0.698036 | 0 | 0 | 0 | 0 | 0 | 0 | 698 | 0.571195 |
425f6d304bf8b5a8fd1c2a47d2f7c554468160b1 | 1,812 | py | Python | tests/test_sanity_check/test_similar_columns.py | thibaultbl/feature_engine | 08374227e7a88b67ee64b64f22e4f30390df9253 | [
"BSD-3-Clause"
] | 1 | 2021-09-08T08:54:56.000Z | 2021-09-08T08:54:56.000Z | tests/test_sanity_check/test_similar_columns.py | thibaultbl/feature_engine | 08374227e7a88b67ee64b64f22e4f30390df9253 | [
"BSD-3-Clause"
] | 1 | 2021-09-10T08:54:51.000Z | 2021-09-10T08:54:51.000Z | tests/test_sanity_check/test_similar_columns.py | thibaultbl/feature_engine | 08374227e7a88b67ee64b64f22e4f30390df9253 | [
"BSD-3-Clause"
] | null | null | null | import numpy as np
import pandas as pd
from feature_engine.sanity_check import SimilarColumns
def test_similar_columns_when_more_columns_in_train_than_test(
df_vartypes, df_na
):
# When columns are the same
train = df_na.copy()
test = df_vartypes.copy()
similar_columns = SimilarColumns()
si... | 27.044776 | 85 | 0.557395 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 308 | 0.169978 |
425fb9945bfce39ef08339e9cffda8aa831a4e3d | 6,780 | py | Python | examples/sem_seg_dense/train.py | megaelius/deep_gcns_torch | 5d565a02020ff9faff3a34d55f278e7328c73ec2 | [
"MIT"
] | null | null | null | examples/sem_seg_dense/train.py | megaelius/deep_gcns_torch | 5d565a02020ff9faff3a34d55f278e7328c73ec2 | [
"MIT"
] | null | null | null | examples/sem_seg_dense/train.py | megaelius/deep_gcns_torch | 5d565a02020ff9faff3a34d55f278e7328c73ec2 | [
"MIT"
] | null | null | null |
import __init__
import os
#os.environ['LD_LIBRARY_PATH'] += ':/usr/local/cuda-11.1/bin64:/usr/local/cuda-11.2/bin64'
import numpy as np
import torch
import torch.multiprocessing as mp
import torch_geometric.datasets as GeoData
from torch_geometric.loader import DenseDataLoader
import torch_geometric.transforms as T... | 39.649123 | 156 | 0.633333 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,001 | 0.14764 |
426012a76defd0d35b2275dd689a17428018f29c | 707 | py | Python | sources/tkinter/prog03.py | kantel/pythoncuriosa | 4dfb92b443cbe0acf8d8efa5c54efbf13e834620 | [
"MIT"
] | null | null | null | sources/tkinter/prog03.py | kantel/pythoncuriosa | 4dfb92b443cbe0acf8d8efa5c54efbf13e834620 | [
"MIT"
] | null | null | null | sources/tkinter/prog03.py | kantel/pythoncuriosa | 4dfb92b443cbe0acf8d8efa5c54efbf13e834620 | [
"MIT"
] | null | null | null | import tkinter as tk
from tkinter import ttk
win = tk.Tk()
win.title("Python GUI")
win.resizable(False, False)
win.configure(background = "grey94")
a_label = ttk.Label(win, text = "Gib Deinen Namen ein:")
a_label.grid(column = 0, row = 0)
a_label.grid_configure(padx = 8, pady = 8)
def clickMe():
action.configure... | 26.185185 | 65 | 0.701556 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 70 | 0.098731 |
4260837af4a64a8bea9204399d75709291c91101 | 528 | py | Python | openarticlegauge/slavedriver.py | CottageLabs/OpenArticleGauge | 58d29b4209a7b59041d61326ffe1cf03f98f3cff | [
"BSD-3-Clause"
] | 1 | 2016-04-07T18:29:27.000Z | 2016-04-07T18:29:27.000Z | openarticlegauge/slavedriver.py | CottageLabs/OpenArticleGauge | 58d29b4209a7b59041d61326ffe1cf03f98f3cff | [
"BSD-3-Clause"
] | 11 | 2015-01-06T15:53:09.000Z | 2022-03-01T01:46:14.000Z | openarticlegauge/slavedriver.py | CottageLabs/OpenArticleGauge | 58d29b4209a7b59041d61326ffe1cf03f98f3cff | [
"BSD-3-Clause"
] | null | null | null | """
Initialise the Celery instance to be used by the application
This is largely just boiler plate, and we could probably look at coming back to it and cleaning it
up a bit in the future.
"""
from __future__ import absolute_import
from celery import Celery
celery = Celery()
from openarticlegauge import celeryconfi... | 21.12 | 98 | 0.780303 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 260 | 0.492424 |
42629d99092a4d568c978d01f8d8dafafec338c9 | 28,061 | py | Python | cbf_ros/scripts/cbf_controller_sy.py | k1majd/CBF_TB_RRT | 2632357d42155de6dec5802c337a5abfdc824aac | [
"MIT"
] | 2 | 2021-10-07T17:06:57.000Z | 2021-11-23T15:58:14.000Z | cbf_ros/scripts/cbf_controller_sy.py | k1majd/CBF_TB_RRT | 2632357d42155de6dec5802c337a5abfdc824aac | [
"MIT"
] | 1 | 2021-10-13T17:18:32.000Z | 2021-10-13T17:37:26.000Z | cbf_ros/scripts/cbf_controller_sy.py | k1majd/CBF_TB_RRT | 2632357d42155de6dec5802c337a5abfdc824aac | [
"MIT"
] | 1 | 2021-11-30T11:09:43.000Z | 2021-11-30T11:09:43.000Z | #! /usr/bin/env python
# call roscore
# $ roscore
#
# If start in manual
# $ rosrun cbf_ros cbf_controller.py
import rospy
import sys
import argparse
import re
import numpy as np
from scipy.integrate import odeint
from sympy import symbols, Matrix, sin, cos, lambdify, exp, sqrt, log
import matplotlib.pyplot as plt
im... | 51.393773 | 222 | 0.490218 | 21,357 | 0.761092 | 0 | 0 | 0 | 0 | 0 | 0 | 4,187 | 0.149211 |
4262af6285d912525c9c840db4e454a16f646f01 | 5,250 | py | Python | src/gui/ui_paste_dialog.py | tonypdmtr/sxtool | 225468d70c5fe1bf7414f19ce13dcdd43e872433 | [
"BSD-2-Clause"
] | 3 | 2018-10-11T15:34:24.000Z | 2022-02-20T23:24:01.000Z | src/gui/ui_paste_dialog.py | tonypdmtr/sxtool | 225468d70c5fe1bf7414f19ce13dcdd43e872433 | [
"BSD-2-Clause"
] | 1 | 2018-10-16T06:58:22.000Z | 2018-10-22T20:19:55.000Z | src/gui/ui_paste_dialog.py | tonypdmtr/sxtool | 225468d70c5fe1bf7414f19ce13dcdd43e872433 | [
"BSD-2-Clause"
] | 1 | 2022-02-20T23:26:50.000Z | 2022-02-20T23:26:50.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'src/gui/ui_paste_dialog.ui'
#
# Created by: PyQt5 UI code generator 5.11.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_PasteDialog(object):
def setupUi(self, PasteDialog)... | 58.333333 | 110 | 0.739619 | 4,992 | 0.950857 | 0 | 0 | 0 | 0 | 0 | 0 | 938 | 0.178667 |
4262ea9b91c2ce1c0da94f2913617caab9285e6f | 110 | py | Python | app/pathfinding/finder/__init__.py | TheronHa/Spaghetti | e181c2f7ea0c044fb7d0edb36bd203dac2eabaf9 | [
"MIT"
] | 208 | 2017-01-23T17:45:13.000Z | 2022-03-22T22:27:25.000Z | app/pathfinding/finder/__init__.py | TheronHa/Spaghetti | e181c2f7ea0c044fb7d0edb36bd203dac2eabaf9 | [
"MIT"
] | 31 | 2017-10-28T09:21:06.000Z | 2021-09-26T15:38:36.000Z | app/pathfinding/finder/__init__.py | TheronHa/Spaghetti | e181c2f7ea0c044fb7d0edb36bd203dac2eabaf9 | [
"MIT"
] | 60 | 2016-12-13T00:05:36.000Z | 2022-03-21T22:23:49.000Z | __all__ = ['a_star', 'best_first', 'bi_a_star', 'breadth_first', 'dijkstra',
'finder', 'ida_star']
| 36.666667 | 76 | 0.609091 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 74 | 0.672727 |
4263245bfbde431be1ac8c88739a3f1f392bf22f | 34,891 | py | Python | dependencies/src/4Suite-XML-1.0.2/test/Xml/Xslt/Borrowed/uo_20000929.py | aleasims/Peach | bb56841e943d719d5101fee0a503ed34308eda04 | [
"MIT"
] | null | null | null | dependencies/src/4Suite-XML-1.0.2/test/Xml/Xslt/Borrowed/uo_20000929.py | aleasims/Peach | bb56841e943d719d5101fee0a503ed34308eda04 | [
"MIT"
] | null | null | null | dependencies/src/4Suite-XML-1.0.2/test/Xml/Xslt/Borrowed/uo_20000929.py | aleasims/Peach | bb56841e943d719d5101fee0a503ed34308eda04 | [
"MIT"
] | 1 | 2020-07-26T03:57:45.000Z | 2020-07-26T03:57:45.000Z | #Uche's test from Sun's SVG slide publisher
import os
from Xml.Xslt import test_harness
#From Sun's toolkit
sheet_1_uri = "Xml/Xslt/Borrowed/svgslides.xsl"
sheet_2_uri = "Xml/Xslt/Borrowed/svgslides_custom.xsl"
sheet_3_uri = "Xml/Xslt/Borrowed/slidescript.xsl"
source_1_uri = "Xml/Xslt/Borrowed/slides4svg.xml"
saxon_o... | 51.010234 | 541 | 0.567367 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 34,129 | 0.978161 |
42646da758d7d00689423c6bb8d4edd633b50938 | 232 | py | Python | src/2/2338.py | youngdaLee/Baekjoon | 7d858d557dbbde6603fe4e8af2891c2b0e1940c0 | [
"MIT"
] | 11 | 2020-09-20T15:17:11.000Z | 2022-03-17T12:43:33.000Z | src/2/2338.py | youngdaLee/Baekjoon | 7d858d557dbbde6603fe4e8af2891c2b0e1940c0 | [
"MIT"
] | 3 | 2021-10-30T07:51:36.000Z | 2022-03-09T05:19:23.000Z | src/2/2338.py | youngdaLee/Baekjoon | 7d858d557dbbde6603fe4e8af2891c2b0e1940c0 | [
"MIT"
] | 13 | 2021-01-21T03:19:08.000Z | 2022-03-28T10:44:58.000Z | """
2338. 긴자리 계산
작성자: xCrypt0r
언어: Python 3
사용 메모리: 29,380 KB
소요 시간: 72 ms
해결 날짜: 2020년 9월 13일
"""
def main():
A, B = int(input()), int(input())
print(A + B, A - B, A * B, sep='\n')
if __name__ == '__main__':
main()
| 12.888889 | 40 | 0.538793 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 165 | 0.580986 |
4264be58cf46729f9ccb094d1db453583943d301 | 2,952 | py | Python | tests/ut/python/nn/test_activation.py | PowerOlive/mindspore | bda20724a94113cedd12c3ed9083141012da1f15 | [
"Apache-2.0"
] | 3,200 | 2020-02-17T12:45:41.000Z | 2022-03-31T20:21:16.000Z | tests/ut/python/nn/test_activation.py | zimo-geek/mindspore | 665ec683d4af85c71b2a1f0d6829356f2bc0e1ff | [
"Apache-2.0"
] | 176 | 2020-02-12T02:52:11.000Z | 2022-03-28T22:15:55.000Z | tests/ut/python/nn/test_activation.py | zimo-geek/mindspore | 665ec683d4af85c71b2a1f0d6829356f2bc0e1ff | [
"Apache-2.0"
] | 621 | 2020-03-09T01:31:41.000Z | 2022-03-30T03:43:19.000Z | # Copyright 2020 Huawei Technologies Co., Ltd
#
# 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... | 27.333333 | 80 | 0.661247 | 966 | 0.327236 | 0 | 0 | 554 | 0.187669 | 0 | 0 | 677 | 0.229336 |
42667a983dfb48f00077636f4ff9f6c3c1fe62f9 | 743 | py | Python | sdk/python/tests/integration/feature_repos/universal/data_source_creator.py | marsishandsome/feast | 998e16945da240bfa73570cdb2c5e3639f892d34 | [
"Apache-2.0"
] | 1 | 2021-09-16T16:17:58.000Z | 2021-09-16T16:17:58.000Z | sdk/python/tests/integration/feature_repos/universal/data_source_creator.py | marsishandsome/feast | 998e16945da240bfa73570cdb2c5e3639f892d34 | [
"Apache-2.0"
] | null | null | null | sdk/python/tests/integration/feature_repos/universal/data_source_creator.py | marsishandsome/feast | 998e16945da240bfa73570cdb2c5e3639f892d34 | [
"Apache-2.0"
] | null | null | null | from abc import ABC, abstractmethod
from typing import Dict
import pandas as pd
from feast.data_source import DataSource
from feast.repo_config import FeastConfigBaseModel
class DataSourceCreator(ABC):
@abstractmethod
def create_data_source(
self,
destination: str,
df: pd.DataFrame,
... | 22.515152 | 69 | 0.664872 | 566 | 0.761777 | 0 | 0 | 514 | 0.69179 | 0 | 0 | 16 | 0.021534 |
42683ff20338aa58755c4a687ba9b5618ac5ee33 | 1,393 | py | Python | tests/interpreter/expression/var_assignment_interpreter_test.py | OtavioHenrique/yalul | ce99e32365ed5607527b9f2f39705ad5d9e20ba2 | [
"MIT"
] | 1 | 2021-04-01T20:22:36.000Z | 2021-04-01T20:22:36.000Z | tests/interpreter/expression/var_assignment_interpreter_test.py | OtavioHenrique/yalul | ce99e32365ed5607527b9f2f39705ad5d9e20ba2 | [
"MIT"
] | 1 | 2020-11-20T22:24:38.000Z | 2020-11-20T22:24:38.000Z | tests/interpreter/expression/var_assignment_interpreter_test.py | OtavioHenrique/yalul | ce99e32365ed5607527b9f2f39705ad5d9e20ba2 | [
"MIT"
] | null | null | null | from yalul.interpreters.environment import Environment
from yalul.interpreters.expressions.var_assignment_interpreter import VarAssignmentInterpreter
from yalul.interpreters.interpreter_errors import InterpreterErrors
class TestVarAssignmentInterpreter:
"""Test var assignment expression interpreter"""
def te... | 34.825 | 116 | 0.676238 | 1,172 | 0.84135 | 0 | 0 | 0 | 0 | 0 | 0 | 411 | 0.295047 |
4268f94ca522ab0b564db536a3198008325ec23d | 2,547 | py | Python | backend/externals/events.py | crosspower/naruko | 4c524e2ef955610a711830bc86d730ffe4fc2bd8 | [
"MIT"
] | 17 | 2019-01-23T04:37:43.000Z | 2019-10-15T01:42:31.000Z | backend/externals/events.py | snickerjp/naruko | 4c524e2ef955610a711830bc86d730ffe4fc2bd8 | [
"MIT"
] | 1 | 2019-01-23T08:04:44.000Z | 2019-01-23T08:44:33.000Z | backend/externals/events.py | snickerjp/naruko | 4c524e2ef955610a711830bc86d730ffe4fc2bd8 | [
"MIT"
] | 6 | 2019-01-23T09:10:59.000Z | 2020-12-02T04:15:41.000Z | import boto3
from django.conf import settings
from backend.models import CloudWatchEvent
import json
class Events:
def __init__(self):
self.client = boto3.client('events', region_name=settings.NARUKO_REGION)
def list_rules(self):
response = []
for rules in self._list_rul... | 28.617978 | 81 | 0.568512 | 2,516 | 0.957746 | 546 | 0.207842 | 380 | 0.144652 | 0 | 0 | 313 | 0.119147 |
4269db32f55f118da9ba1a4ffe9262967fe30e06 | 283 | py | Python | 1501-1600/1560-Most Visited Sector in a Circular Track/1560-Most Visited Sector in a Circular Track.py | jiadaizhao/LeetCode | 4ddea0a532fe7c5d053ffbd6870174ec99fc2d60 | [
"MIT"
] | 49 | 2018-05-05T02:53:10.000Z | 2022-03-30T12:08:09.000Z | 1501-1600/1560-Most Visited Sector in a Circular Track/1560-Most Visited Sector in a Circular Track.py | ptx-c/LeetCode | 4ddea0a532fe7c5d053ffbd6870174ec99fc2d60 | [
"MIT"
] | 11 | 2017-12-15T22:31:44.000Z | 2020-10-02T12:42:49.000Z | 1501-1600/1560-Most Visited Sector in a Circular Track/1560-Most Visited Sector in a Circular Track.py | ptx-c/LeetCode | 4ddea0a532fe7c5d053ffbd6870174ec99fc2d60 | [
"MIT"
] | 28 | 2017-12-05T10:56:51.000Z | 2022-01-26T18:18:27.000Z | class Solution:
def mostVisited(self, n: int, rounds: List[int]) -> List[int]:
start, end = rounds[0], rounds[-1]
if end >= start:
return list(range(start, end + 1))
else:
return list(range(1, end + 1)) + list(range(start, n + 1))
| 35.375 | 70 | 0.533569 | 282 | 0.996466 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
426a3bed4febe19951912ab6a1ea3a6374609094 | 356 | py | Python | eg/deparse/example.py | KennethBlaney/rivescript-python | 87db472847ab526060afd9a5b8548e9689501a85 | [
"MIT"
] | null | null | null | eg/deparse/example.py | KennethBlaney/rivescript-python | 87db472847ab526060afd9a5b8548e9689501a85 | [
"MIT"
] | null | null | null | eg/deparse/example.py | KennethBlaney/rivescript-python | 87db472847ab526060afd9a5b8548e9689501a85 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# Manipulate sys.path to be able to import converscript from this local git
# repository.
import os
import sys
sys.path.append(os.path.join(os.path.dirname(__file__), "..", ".."))
from converscript import RiveScript
import json
bot = RiveScript()
bot.load_file("example.rive")
dep = bot.deparse... | 20.941176 | 75 | 0.735955 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 131 | 0.367978 |
426a6f57e84f4626e97b52d506e5d77552f5cfca | 2,715 | py | Python | figuras/PycharmKayStatisticalReport/example_8_11.py | bor9/estudiando_el_kay | 6e07908b8b0b5a5166dadce30001e6100e8304c3 | [
"MIT"
] | null | null | null | figuras/PycharmKayStatisticalReport/example_8_11.py | bor9/estudiando_el_kay | 6e07908b8b0b5a5166dadce30001e6100e8304c3 | [
"MIT"
] | null | null | null | figuras/PycharmKayStatisticalReport/example_8_11.py | bor9/estudiando_el_kay | 6e07908b8b0b5a5166dadce30001e6100e8304c3 | [
"MIT"
] | 1 | 2021-11-02T05:27:27.000Z | 2021-11-02T05:27:27.000Z | import matplotlib.pyplot as plt
import numpy as np
from scipy import signal, linalg
from matplotlib import rc
from matplotlib import rcParams
__author__ = 'ernesto'
# if use latex or mathtext
rc('text', usetex=True)
rcParams['text.latex.preamble'] = [r"\usepackage{amsmath}"]
#respuesta al impulso deseada: sinc
N = ... | 29.835165 | 104 | 0.64825 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 717 | 0.263603 |
426b013c87350379997d161bc0ecdefe4dd2b27e | 19,353 | py | Python | src/robotide/ui/treenodehandlers.py | crylearner/RIDE3X | 767f45b0c908f18ecc7473208def8dc7489f43b0 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2017-08-20T14:46:02.000Z | 2017-08-20T14:46:02.000Z | src/robotide/ui/treenodehandlers.py | crylearner/RIDE3X | 767f45b0c908f18ecc7473208def8dc7489f43b0 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | src/robotide/ui/treenodehandlers.py | crylearner/RIDE3X | 767f45b0c908f18ecc7473208def8dc7489f43b0 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | # Copyright 2008-2015 Nokia Solutions and Networks
#
# 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 appl... | 33.598958 | 80 | 0.661965 | 16,783 | 0.867204 | 0 | 0 | 1,914 | 0.098899 | 0 | 0 | 1,532 | 0.079161 |
426e4afa33488c3f61e9819e1e0e8ab285e730fe | 902 | py | Python | config.py | rajatomar788/pyblog | d450dc1ceb3a6b3aeb747648a0fb1b4334e4b3ae | [
"MIT"
] | null | null | null | config.py | rajatomar788/pyblog | d450dc1ceb3a6b3aeb747648a0fb1b4334e4b3ae | [
"MIT"
] | null | null | null | config.py | rajatomar788/pyblog | d450dc1ceb3a6b3aeb747648a0fb1b4334e4b3ae | [
"MIT"
] | null | null | null | import os
basedir = os.path.abspath(os.path.dirname(__file__))
class Config(object):
SECRET_KEY = os.environ.get('SECRET_KEY') or 'rajatomar788'
if os.environ.get('DATABASE_URL') is None:
SQLALCHEMY_DATABASE_URI = 'sqlite:///' + os.path.join(basedir, 'app.db')
elif os.environ.get('EXTRA_DATABASE') ... | 29.096774 | 80 | 0.674058 | 837 | 0.927938 | 0 | 0 | 0 | 0 | 0 | 0 | 227 | 0.251663 |
426e9a71b5a0425ef77735be32bb8398f28a2e1e | 45 | py | Python | ceefax/fonts/size7extracondensed/__init__.py | mscroggs/CEEFAX | 8e7a075de1809064b77360da24ebbbaa409c3bf2 | [
"MIT"
] | 1 | 2020-03-28T15:53:22.000Z | 2020-03-28T15:53:22.000Z | ceefax/fonts/size7extracondensed/__init__.py | mscroggs/CEEFAX | 8e7a075de1809064b77360da24ebbbaa409c3bf2 | [
"MIT"
] | 1 | 2021-02-05T13:43:52.000Z | 2021-02-05T13:43:52.000Z | ceefax/fonts/size7extracondensed/__init__.py | mscroggs/CEEFAX | 8e7a075de1809064b77360da24ebbbaa409c3bf2 | [
"MIT"
] | null | null | null | from .default import size7extracondensedfont
| 22.5 | 44 | 0.888889 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
426e9a7b517f49d7e52664e4ad563ce95c7c8446 | 3,433 | py | Python | bom/helpers.py | gxyp/indabom | 114991be2471eda2cf658c68706ab7bb05b06959 | [
"MIT"
] | null | null | null | bom/helpers.py | gxyp/indabom | 114991be2471eda2cf658c68706ab7bb05b06959 | [
"MIT"
] | null | null | null | bom/helpers.py | gxyp/indabom | 114991be2471eda2cf658c68706ab7bb05b06959 | [
"MIT"
] | null | null | null | from bom.octopart_parts_match import match_part
from bom.models import Part, PartClass, Seller, SellerPart, Subpart, \
Manufacturer, Organization, PartFile
def create_a_fake_organization(user, free=False):
org = Organization(
name="Atlas",
subscription='F' if free else 'P',
owner=user)... | 23.040268 | 77 | 0.642587 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 236 | 0.068745 |
426f6bd9b353f10dd5dac6c8afa818c7319f5d74 | 8,612 | py | Python | keycodes/key/codes/win.py | jonchun/ptoys-mapper | a2dde413d37e897ec41b69ac979e538afb7435f0 | [
"MIT"
] | null | null | null | keycodes/key/codes/win.py | jonchun/ptoys-mapper | a2dde413d37e897ec41b69ac979e538afb7435f0 | [
"MIT"
] | null | null | null | keycodes/key/codes/win.py | jonchun/ptoys-mapper | a2dde413d37e897ec41b69ac979e538afb7435f0 | [
"MIT"
] | null | null | null | # Source:
# https://github.com/tpn/winsdk-10/blob/46c66795f49679eb4783377968ce25f6c778285a/Include/10.0.10240.0/um/WinUser.h
# # convert all C-style comments to python multi-line string comment
# find: (^/\*[\s\S\r]+?\*/)
# replace: """\n$1\n"""
# # convert all keycode #defines to be python constants
# find: #define\s... | 20.407583 | 114 | 0.576637 | 7,941 | 0.922085 | 0 | 0 | 0 | 0 | 0 | 0 | 3,092 | 0.359034 |
426fdd67326d3cc89802cd8abeba99af022807c1 | 117 | py | Python | application/flicket_errors/__init__.py | abbas0001/flicket | 547a5e783cccf157d10df88608440aa2919d7e7b | [
"MIT"
] | null | null | null | application/flicket_errors/__init__.py | abbas0001/flicket | 547a5e783cccf157d10df88608440aa2919d7e7b | [
"MIT"
] | null | null | null | application/flicket_errors/__init__.py | abbas0001/flicket | 547a5e783cccf157d10df88608440aa2919d7e7b | [
"MIT"
] | null | null | null | #! python3
# -*- coding: utf-8 -*-
#
from flask import Blueprint
bp_errors = Blueprint('flicket-errors', __name__)
| 14.625 | 49 | 0.683761 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 50 | 0.42735 |
4270b9f3f72e8e2eb3176ce2f540c1dc258f357c | 399 | py | Python | SmartBuild/modules/migrations/0003_module_shortcut.py | ampamo/smart-build | a0c9a3871eb7ca06a6cd6d4a15aba70e2291f4fb | [
"CC0-1.0"
] | null | null | null | SmartBuild/modules/migrations/0003_module_shortcut.py | ampamo/smart-build | a0c9a3871eb7ca06a6cd6d4a15aba70e2291f4fb | [
"CC0-1.0"
] | null | null | null | SmartBuild/modules/migrations/0003_module_shortcut.py | ampamo/smart-build | a0c9a3871eb7ca06a6cd6d4a15aba70e2291f4fb | [
"CC0-1.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('modules', '0002_module_floor'),
]
operations = [
migrations.AddField(
model_name='module',
name='sho... | 19.95 | 53 | 0.601504 | 290 | 0.726817 | 0 | 0 | 0 | 0 | 0 | 0 | 69 | 0.172932 |
4273f06b359f41b03bbac8b02773bc579762c6fd | 6,789 | py | Python | app/common.py | yxonic/dl-boilerplate | d503716ad514929ddfdc41341e37b0e3f1a1f0f5 | [
"MIT"
] | 1 | 2017-09-26T05:13:19.000Z | 2017-09-26T05:13:19.000Z | app/common.py | yxonic/dl-boilerplate | d503716ad514929ddfdc41341e37b0e3f1a1f0f5 | [
"MIT"
] | null | null | null | app/common.py | yxonic/dl-boilerplate | d503716ad514929ddfdc41341e37b0e3f1a1f0f5 | [
"MIT"
] | null | null | null | import abc
import argparse
import logging
import pathlib
from collections import namedtuple
from operator import itemgetter
import toml
class NotConfiguredError(Exception):
pass
class ParseError(Exception):
pass
class Model(abc.ABC):
"""Interface for model that can save/load parameters.
Each mod... | 28.405858 | 78 | 0.577405 | 6,637 | 0.977611 | 0 | 0 | 2,782 | 0.409781 | 0 | 0 | 1,529 | 0.225217 |
4274e96e6ce5245f31a18bf5087d02fdafd53341 | 2,737 | py | Python | training/train_pos_dep.py | ex00/spacy-ru | 7284d8127dca322fcc2aa9ce0267699cfc9baf38 | [
"MIT"
] | null | null | null | training/train_pos_dep.py | ex00/spacy-ru | 7284d8127dca322fcc2aa9ce0267699cfc9baf38 | [
"MIT"
] | null | null | null | training/train_pos_dep.py | ex00/spacy-ru | 7284d8127dca322fcc2aa9ce0267699cfc9baf38 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals, print_function
import sys
from pathlib import Path
import spacy
from spacy.lang.ru import Russian
from spacy.pipeline import Tagger, DependencyParser
from spacy.util import fix_random_seed, set_lang_class
from models.dep import MyDEP
from models.loadvec import get_ft_vec
from... | 27.646465 | 111 | 0.700037 | 40 | 0.014556 | 0 | 0 | 0 | 0 | 0 | 0 | 554 | 0.201601 |
4275177baedf41f1ab31ef0704dfda58eb058f5e | 1,512 | py | Python | tests/test_peephole_optimizations.py | capuanob/angr | 4e5bb119965cb282f5bcb3dea5b598e88097f715 | [
"BSD-2-Clause"
] | null | null | null | tests/test_peephole_optimizations.py | capuanob/angr | 4e5bb119965cb282f5bcb3dea5b598e88097f715 | [
"BSD-2-Clause"
] | null | null | null | tests/test_peephole_optimizations.py | capuanob/angr | 4e5bb119965cb282f5bcb3dea5b598e88097f715 | [
"BSD-2-Clause"
] | null | null | null | # pylint:disable=missing-class-docstring,no-self-use
import os
import unittest
import archinfo
import ailment
import angr
from angr.analyses.decompiler.peephole_optimizations import ConstantDereferences
test_location = os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'binaries', 'tests')
class ... | 38.769231 | 119 | 0.683201 | 1,148 | 0.759259 | 0 | 0 | 0 | 0 | 0 | 0 | 346 | 0.228836 |
42755fd81a38eefae8f526ffb8db205e1141d33b | 604 | py | Python | PySpace/mysql/mysql_insertdata.py | dralee/LearningRepository | 4324d3c5ac1a12dde17ae70c1eb7f3d36a047ba4 | [
"Apache-2.0"
] | null | null | null | PySpace/mysql/mysql_insertdata.py | dralee/LearningRepository | 4324d3c5ac1a12dde17ae70c1eb7f3d36a047ba4 | [
"Apache-2.0"
] | null | null | null | PySpace/mysql/mysql_insertdata.py | dralee/LearningRepository | 4324d3c5ac1a12dde17ae70c1eb7f3d36a047ba4 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
# 文件名:mysql_createtable.py
import pymysql
# 打开数据库连接
db = pymysql.connect('localhost','root','1234','fdtest')
# 使用cursor()方法创建一个游标对象cursor
cursor = db.cursor()
# SQL插入语句
sql = """INSERT INTO EMPLOYEE(
FIRST_NAME,LAST_NAME,AGE,SEX,INCOME)
VALUES('Mac2','Mohan2',20,'M',6000)"""
"""
或
sql = "INS... | 16.777778 | 56 | 0.61755 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 552 | 0.773109 |
42787867fa3db8b6721924f36a9b0de8973ee0ae | 1,572 | py | Python | appleseed_python.py | AllegorithmicSAS/sat-scons | 3eea609385fb9bdd93562097d302a3707c3c6ebe | [
"BSD-3-Clause"
] | 25 | 2018-09-17T00:10:30.000Z | 2021-11-07T06:41:35.000Z | appleseed_python.py | AllegorithmicSAS/sat-scons | 3eea609385fb9bdd93562097d302a3707c3c6ebe | [
"BSD-3-Clause"
] | null | null | null | appleseed_python.py | AllegorithmicSAS/sat-scons | 3eea609385fb9bdd93562097d302a3707c3c6ebe | [
"BSD-3-Clause"
] | 3 | 2018-08-28T15:01:43.000Z | 2021-05-04T16:54:51.000Z | import os
import subprocess
import threading
mutex = threading.Lock()
def render_appleseed(target_file, base_color_tex, normal_tex, roughness_tex, metallic_tex, resolution, appleseed_path):
mutex.acquire()
try:
# Read the template file from disk.
with open("scene_template.appleseed", "r") as... | 40.307692 | 125 | 0.688295 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 441 | 0.280534 |
42793637f0ad1d6b8bdb63c8ad74420df516a382 | 1,327 | py | Python | conjureup/ui/views/credentials.py | iMichka/conjure-up | 8e4599e6f58b52163384150d8d71e7802462d126 | [
"MIT"
] | 1 | 2019-06-26T23:39:13.000Z | 2019-06-26T23:39:13.000Z | conjureup/ui/views/credentials.py | iMichka/conjure-up | 8e4599e6f58b52163384150d8d71e7802462d126 | [
"MIT"
] | null | null | null | conjureup/ui/views/credentials.py | iMichka/conjure-up | 8e4599e6f58b52163384150d8d71e7802462d126 | [
"MIT"
] | 1 | 2020-10-05T14:42:31.000Z | 2020-10-05T14:42:31.000Z | from ubuntui.utils import Padding
from ubuntui.widgets.hr import HR
from conjureup.app_config import app
from conjureup.ui.views.base import BaseView, SchemaFormView
from conjureup.ui.widgets.selectors import MenuSelectButtonList
class NewCredentialView(SchemaFormView):
title = "New Credential Creation"
def... | 33.175 | 73 | 0.694047 | 1,090 | 0.821402 | 0 | 0 | 0 | 0 | 0 | 0 | 226 | 0.170309 |
427ab04e73a73ae528a76eac0fdda4742addfcf9 | 355 | py | Python | sleekxmpp/plugins/__init__.py | aristanetworks/SleekXMPP | 91f53bf1964a564f6f12477a31884e9ec38cef75 | [
"MIT"
] | null | null | null | sleekxmpp/plugins/__init__.py | aristanetworks/SleekXMPP | 91f53bf1964a564f6f12477a31884e9ec38cef75 | [
"MIT"
] | 1 | 2020-04-10T22:09:06.000Z | 2020-04-10T22:09:06.000Z | sleekxmpp/plugins/__init__.py | aristanetworks/SleekXMPP | 91f53bf1964a564f6f12477a31884e9ec38cef75 | [
"MIT"
] | 1 | 2019-12-05T12:10:16.000Z | 2019-12-05T12:10:16.000Z | """
SleekXMPP: The Sleek XMPP Library
Copyright (C) 2010 Nathanael C. Fritz
This file is part of SleekXMPP.
See the file LICENSE for copying permission.
"""
__all__ = ['xep_0004', 'xep_0012', 'xep_0030', 'xep_0033', 'xep_0045',
'xep_0050', 'xep_0085', 'xep_0092', 'xep_0199', 'gmail_notify',
... | 32.272727 | 74 | 0.63662 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 297 | 0.83662 |
427af261bc83da6fc8ac5c1ea1e2a2473e51e220 | 5,276 | py | Python | main.py | pwillworth/dfkreport | ae10226430a3a74ac3c07ae888cab14dde778db8 | [
"Apache-2.0"
] | 11 | 2022-01-18T17:36:12.000Z | 2022-03-21T21:09:17.000Z | main.py | pwillworth/dfkreport | ae10226430a3a74ac3c07ae888cab14dde778db8 | [
"Apache-2.0"
] | null | null | null | main.py | pwillworth/dfkreport | ae10226430a3a74ac3c07ae888cab14dde778db8 | [
"Apache-2.0"
] | 4 | 2022-01-18T18:37:48.000Z | 2022-01-22T02:14:48.000Z | #!/usr/bin/env python3
import transactions
import taxmap
import db
import settings
import datetime
import argparse
import uuid
import pickle
import jsonpickle
import logging
import logging.handlers
import traceback
def main():
handler = logging.handlers.RotatingFileHandler('../main.log', maxBytes=33554432, backup... | 47.531532 | 224 | 0.666035 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,624 | 0.307809 |
427b0f2bb086452498a9bfd3a4dc95c14c7879d6 | 127 | py | Python | src/tarski/fstrips/contingent/__init__.py | phoeft670/tarski | 7d955e535fbbca012bfd1a12402b97febc6b35b9 | [
"Apache-2.0"
] | 29 | 2018-11-26T20:31:04.000Z | 2021-12-29T11:08:40.000Z | src/tarski/fstrips/contingent/__init__.py | phoeft670/tarski | 7d955e535fbbca012bfd1a12402b97febc6b35b9 | [
"Apache-2.0"
] | 101 | 2018-06-07T13:10:01.000Z | 2022-03-11T11:54:00.000Z | src/tarski/fstrips/contingent/__init__.py | phoeft670/tarski | 7d955e535fbbca012bfd1a12402b97febc6b35b9 | [
"Apache-2.0"
] | 18 | 2018-11-01T22:44:39.000Z | 2022-02-28T04:57:15.000Z | from .problem import ContingentProblem as Problem
from .. action import Action
from .sensor import Sensor
from . import errors
| 25.4 | 49 | 0.811024 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
427bd9dc45f6695e499240fef94ddec3e4b3fe88 | 80 | py | Python | p40-49/p48.py | kbrose/project_euler | f582ef1887f44628997e05d88253adad0822d6b9 | [
"Unlicense"
] | 1 | 2015-10-11T15:53:00.000Z | 2015-10-11T15:53:00.000Z | p40-49/p48.py | kbrose/project_euler | f582ef1887f44628997e05d88253adad0822d6b9 | [
"Unlicense"
] | null | null | null | p40-49/p48.py | kbrose/project_euler | f582ef1887f44628997e05d88253adad0822d6b9 | [
"Unlicense"
] | null | null | null | sum = 0
for i in xrange(1,1001):
sum = sum + i**i
print sum % 10000000000
| 11.428571 | 24 | 0.6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
427dedadfbbcbe3c95d00fdafba41ac3a4018d6f | 2,121 | py | Python | property_proteome/length/run.py | rrazban/proteomevis_scripts | 2b6309a78287ffab4ee745383c21b9f474b93b60 | [
"MIT"
] | 1 | 2020-11-11T06:14:10.000Z | 2020-11-11T06:14:10.000Z | property_proteome/length/run.py | rrazban/proteomevis_scripts | 2b6309a78287ffab4ee745383c21b9f474b93b60 | [
"MIT"
] | null | null | null | property_proteome/length/run.py | rrazban/proteomevis_scripts | 2b6309a78287ffab4ee745383c21b9f474b93b60 | [
"MIT"
] | 1 | 2019-05-28T19:13:24.000Z | 2019-05-28T19:13:24.000Z | #!/usr/bin/python
help_msg = 'get uniprot length of entire proteome'
import os, sys
CWD = os.getcwd()
UTLTS_DIR = CWD[:CWD.index('proteomevis_scripts')]+'/proteomevis_scripts/utlts'
sys.path.append(UTLTS_DIR)
from parse_user_input import help_message
from read_in_file import read_in
from parse_data import organism
... | 29.054795 | 87 | 0.705799 | 726 | 0.342291 | 0 | 0 | 0 | 0 | 0 | 0 | 433 | 0.204149 |
427e1e9e41044ab46aedd645fb3078c3369fa522 | 2,086 | py | Python | machine_learning/torch_time_series_forecasting/src/data/dataset.py | iimuz/til | b100438e8ce2f369331b3be215a4b9cdce9ffda5 | [
"MIT"
] | 4 | 2020-07-25T01:20:08.000Z | 2020-10-03T12:58:15.000Z | machine_learning/torch_time_series_forecasting/src/data/dataset.py | iimuz/til | b100438e8ce2f369331b3be215a4b9cdce9ffda5 | [
"MIT"
] | 29 | 2019-09-30T08:04:14.000Z | 2022-03-12T13:51:08.000Z | machine_learning/torch_time_series_forecasting/src/data/dataset.py | iimuz/til | b100438e8ce2f369331b3be215a4b9cdce9ffda5 | [
"MIT"
] | 1 | 2020-08-14T05:15:51.000Z | 2020-08-14T05:15:51.000Z | """データセットをダウンロードするためのスクリプトです."""
# default packages
import logging
import pathlib
import traceback
import urllib.request as request
# third party
import pandas as pd
import tqdm as tqdm_std
# my packages
import src.data.directory as directory
# logger
logger = logging.getLogger(__name__)
class TqdmUpTo(tqdm_std.tq... | 25.13253 | 85 | 0.622244 | 624 | 0.289157 | 0 | 0 | 0 | 0 | 0 | 0 | 743 | 0.3443 |
427f14f88f6ffd13fff4e9351ec1d15fe8db0b86 | 3,320 | py | Python | app.py | aracnid/i-xero | 2fb2f093a8a92e0ba2f4cdbe440e962a38c09f7e | [
"MIT"
] | null | null | null | app.py | aracnid/i-xero | 2fb2f093a8a92e0ba2f4cdbe440e962a38c09f7e | [
"MIT"
] | null | null | null | app.py | aracnid/i-xero | 2fb2f093a8a92e0ba2f4cdbe440e962a38c09f7e | [
"MIT"
] | null | null | null | """Primary application.
"""
import json
import logging
import logging.config
import os
import sys
from flask import url_for, render_template, redirect, request
from i_xero import Xero2
from i_xero.i_flask import FlaskInterface
from utils import jsonify, serialize_model
# initialize logging
# The SlackBot app doesn't... | 28.376068 | 83 | 0.71506 | 0 | 0 | 0 | 0 | 2,035 | 0.612952 | 0 | 0 | 764 | 0.23012 |
427fcbdb91cef4c0c0751c48d3eb5d865ef45367 | 8,023 | py | Python | ui/Ui_main.py | realm520/aimless | 772e87f5b5a00eeac88be948e424310128fcec1a | [
"MIT"
] | null | null | null | ui/Ui_main.py | realm520/aimless | 772e87f5b5a00eeac88be948e424310128fcec1a | [
"MIT"
] | null | null | null | ui/Ui_main.py | realm520/aimless | 772e87f5b5a00eeac88be948e424310128fcec1a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'F:\work\code\pyqt5\ui\main.ui'
#
# Created by: PyQt5 UI code generator 5.9
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
... | 52.782895 | 108 | 0.720429 | 7,537 | 0.939424 | 0 | 0 | 0 | 0 | 0 | 0 | 978 | 0.1219 |
42835a66857dcf283ba037650081bbeeec2eb903 | 587 | py | Python | leetcode/345.reverse-vowels-of-a-string.py | geemaple/algorithm | 68bc5032e1ee52c22ef2f2e608053484c487af54 | [
"MIT"
] | 177 | 2017-08-21T08:57:43.000Z | 2020-06-22T03:44:22.000Z | leetcode/345.reverse-vowels-of-a-string.py | geemaple/algorithm | 68bc5032e1ee52c22ef2f2e608053484c487af54 | [
"MIT"
] | 2 | 2018-09-06T13:39:12.000Z | 2019-06-03T02:54:45.000Z | leetcode/345.reverse-vowels-of-a-string.py | geemaple/algorithm | 68bc5032e1ee52c22ef2f2e608053484c487af54 | [
"MIT"
] | 23 | 2017-08-23T06:01:28.000Z | 2020-04-20T03:17:36.000Z | class Solution(object):
def reverseVowels(self, s):
"""
:type s: str
:rtype: str
"""
vowels = set("aeiouAEIOU")
s = list(s)
i = 0
j = len(s) - 1
while i < j:
while i < j and s[i] not in vowels:
i +=... | 22.576923 | 47 | 0.294719 | 587 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 70 | 0.11925 |
4283b88a83b93254b8e97d4642f0ca0d5d69279d | 68 | py | Python | examples/02_pybind/01_basic/example.py | BlockResearchGroup/WS_interoperability | 604ab29c242b30b2ee9125a589afe69010ba1844 | [
"MIT"
] | 1 | 2019-07-26T22:25:25.000Z | 2019-07-26T22:25:25.000Z | examples/02_pybind/01_basic/example.py | BlockResearchGroup/WS_interoperability | 604ab29c242b30b2ee9125a589afe69010ba1844 | [
"MIT"
] | 5 | 2019-04-14T21:07:03.000Z | 2019-05-27T21:46:37.000Z | examples/02_pybind/01_basic/example.py | BlockResearchGroup/WS_interoperability | 604ab29c242b30b2ee9125a589afe69010ba1844 | [
"MIT"
] | null | null | null | # example.py
import basic
result = basic.add(1, 5)
print(result)
| 8.5 | 24 | 0.691176 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 12 | 0.176471 |
4284396ea1fd88ed33820f0870333abd8149c2de | 2,213 | py | Python | cocotbext/spi/devices/TI/DRV8304.py | eoshea/cocotbext-spi | 9b610ca27945e22e168da5774cab8051304ea90f | [
"MIT"
] | 2 | 2021-08-13T20:10:41.000Z | 2022-03-09T19:24:24.000Z | cocotbext/spi/devices/TI/DRV8304.py | eoshea/cocotbext-spi | 9b610ca27945e22e168da5774cab8051304ea90f | [
"MIT"
] | 3 | 2021-08-23T15:34:00.000Z | 2022-01-18T19:27:26.000Z | cocotbext/spi/devices/TI/DRV8304.py | eoshea/cocotbext-spi | 9b610ca27945e22e168da5774cab8051304ea90f | [
"MIT"
] | 2 | 2021-11-12T12:47:45.000Z | 2021-11-18T10:35:43.000Z |
import cocotb
from cocotb.triggers import FallingEdge, RisingEdge, First, Timer, Event
from ... import SpiSlaveBase, SpiConfig, SpiFrameError, SpiFrameTimeout
class DRV8304(SpiSlaveBase):
def __init__(self, signals):
self._config = SpiConfig(
word_width=16,
cpol=False,
... | 30.315068 | 89 | 0.589245 | 2,050 | 0.926344 | 0 | 0 | 0 | 0 | 918 | 0.414822 | 332 | 0.150023 |
4289d7f6e86034585cd9c9cf37666cc58aab806e | 540 | py | Python | manage.py | Kenneth-joseph/Blogs | b6c508d36cdf2f874c233485003021d10567de7b | [
"Unlicense"
] | null | null | null | manage.py | Kenneth-joseph/Blogs | b6c508d36cdf2f874c233485003021d10567de7b | [
"Unlicense"
] | null | null | null | manage.py | Kenneth-joseph/Blogs | b6c508d36cdf2f874c233485003021d10567de7b | [
"Unlicense"
] | 1 | 2021-11-17T11:03:08.000Z | 2021-11-17T11:03:08.000Z | from app import create_app,db
from flask_script import Manager,Server
from app.models import User,Comment,Blog
from flask_migrate import Migrate, MigrateCommand
#manage.shell
# Creating app instance
app = create_app('production')
migrate = Migrate(app,db)
manager = Manager(app)
manager.add_command('db',MigrateComm... | 24.545455 | 72 | 0.766667 | 0 | 0 | 0 | 0 | 113 | 0.209259 | 0 | 0 | 70 | 0.12963 |
428a08abf8ca4b32d91aa59e5ac79f8b3eb02d8f | 901 | py | Python | src/apps/core/migrations/0005_auto_20180417_1219.py | zhiyuli/HydroLearn | b2c2b44e49d37391149d0896ce5124e882f22ee3 | [
"BSD-3-Clause"
] | null | null | null | src/apps/core/migrations/0005_auto_20180417_1219.py | zhiyuli/HydroLearn | b2c2b44e49d37391149d0896ce5124e882f22ee3 | [
"BSD-3-Clause"
] | null | null | null | src/apps/core/migrations/0005_auto_20180417_1219.py | zhiyuli/HydroLearn | b2c2b44e49d37391149d0896ce5124e882f22ee3 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2018-04-17 17:19
from __future__ import unicode_literals
from django.db import migrations
import django_extensions.db.fields
class Migration(migrations.Migration):
dependencies = [
('core', '0004_auto_20180417_1218'),
]
operations = [
... | 33.37037 | 266 | 0.657048 | 716 | 0.794673 | 0 | 0 | 0 | 0 | 0 | 0 | 224 | 0.248613 |
428b1f1d92a691f7e032bddbf0f11e16a416cdf3 | 186 | py | Python | syncgateway/__init__.py | ecordell/syncgateway-admin-client | 78a8d45ff290b42b5c771b901fb92edcde126ff4 | [
"MIT"
] | null | null | null | syncgateway/__init__.py | ecordell/syncgateway-admin-client | 78a8d45ff290b42b5c771b901fb92edcde126ff4 | [
"MIT"
] | 1 | 2015-12-10T20:42:12.000Z | 2015-12-10T20:42:12.000Z | syncgateway/__init__.py | ecordell/syncgateway-admin-client | 78a8d45ff290b42b5c771b901fb92edcde126ff4 | [
"MIT"
] | null | null | null | __author__ = 'Evan Cordell'
__copyright__ = 'Copyright 2012-2015 Localmed, Inc.'
__version__ = "0.1.6"
__version_info__ = tuple(__version__.split('.'))
__short_version__ = __version__
| 23.25 | 52 | 0.758065 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 60 | 0.322581 |
428b51da1bd2717103e2c7bb03266fb5b3a3af22 | 7,452 | py | Python | members/views.py | leonrenkema/makerspaceleiden-crm | 36ea20f5b9e263e8f30b1831ae4a2b1d5b926d3c | [
"Apache-2.0"
] | 5 | 2019-03-12T21:38:32.000Z | 2021-11-06T15:26:56.000Z | members/views.py | leonrenkema/makerspaceleiden-crm | 36ea20f5b9e263e8f30b1831ae4a2b1d5b926d3c | [
"Apache-2.0"
] | 33 | 2019-01-21T15:54:50.000Z | 2021-05-18T17:54:52.000Z | members/views.py | leonrenkema/makerspaceleiden-crm | 36ea20f5b9e263e8f30b1831ae4a2b1d5b926d3c | [
"Apache-2.0"
] | 5 | 2019-01-21T15:47:26.000Z | 2021-09-22T07:14:34.000Z | from django.shortcuts import render, redirect
from django.contrib.auth.forms import PasswordResetForm
from django.core.mail import EmailMessage
from django.template import loader
from django.http import HttpResponse
from django.contrib.auth.decorators import login_required
from django.conf import settings
from django... | 35.485714 | 118 | 0.554616 | 0 | 0 | 0 | 0 | 6,106 | 0.819377 | 0 | 0 | 1,543 | 0.207059 |
428b5eca1188b78557324447b1ddda687b1af59c | 3,911 | py | Python | test_scripts/ns_instance/duan/service/vfc/nfvo/lcm/lcm/ns/views/deprecated/create_ns_view.py | lremember/VFC | 837559db1396091811382359100bfc60e1aab5b2 | [
"MIT"
] | 1 | 2019-10-10T00:52:18.000Z | 2019-10-10T00:52:18.000Z | test_scripts/ns_instance/duan/service/vfc/nfvo/lcm/lcm/ns/views/deprecated/create_ns_view.py | lremember/VFC-Files | 837559db1396091811382359100bfc60e1aab5b2 | [
"MIT"
] | null | null | null | test_scripts/ns_instance/duan/service/vfc/nfvo/lcm/lcm/ns/views/deprecated/create_ns_view.py | lremember/VFC-Files | 837559db1396091811382359100bfc60e1aab5b2 | [
"MIT"
] | null | null | null | # Copyright 2018 ZTE 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 agreed to in ... | 41.168421 | 92 | 0.692662 | 2,575 | 0.658399 | 0 | 0 | 2,536 | 0.648428 | 0 | 0 | 968 | 0.247507 |
428be7b7fc4fa9ed70e9c54b4441f37388d4cbd4 | 3,304 | py | Python | parse_training_input.py | alexpotter1/vulndetect-ml | 338fbf919b24520f9107a1604d1c8af48aadff76 | [
"MIT"
] | 1 | 2020-02-25T01:53:23.000Z | 2020-02-25T01:53:23.000Z | parse_training_input.py | alexpotter1/vulndetect-ml | 338fbf919b24520f9107a1604d1c8af48aadff76 | [
"MIT"
] | null | null | null | parse_training_input.py | alexpotter1/vulndetect-ml | 338fbf919b24520f9107a1604d1c8af48aadff76 | [
"MIT"
] | 1 | 2020-10-24T15:30:38.000Z | 2020-10-24T15:30:38.000Z | #!/usr/bin/env python3
import javalang
def isPrimitive(obj):
return not hasattr(obj, '__dict__')
def extract_bad_function_from_text(src):
return extract_function_from_text(src, criterion='bad')
def extract_function_from_text(src, criterion='bad'):
def recursive_find_deepest_child_position(node_body, ... | 33.714286 | 121 | 0.59776 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 305 | 0.092312 |
428caa0f2af4107e3b019feaf07304cc2bf7796d | 17,226 | py | Python | src/mist/api/rules/models/main.py | SpiralUp/mist.api | a3b5233ab4aa3f6a0a2dea6333ff1e5a260af934 | [
"Apache-2.0"
] | 6 | 2017-08-24T00:34:30.000Z | 2022-01-16T21:29:22.000Z | src/mist/api/rules/models/main.py | SpiralUp/mist.api | a3b5233ab4aa3f6a0a2dea6333ff1e5a260af934 | [
"Apache-2.0"
] | 9 | 2021-03-31T18:50:47.000Z | 2022-01-09T23:20:02.000Z | src/mist/api/rules/models/main.py | SpiralUp/mist.api | a3b5233ab4aa3f6a0a2dea6333ff1e5a260af934 | [
"Apache-2.0"
] | 13 | 2017-09-21T18:17:02.000Z | 2022-02-21T04:29:25.000Z | import uuid
import mongoengine as me
from mist.api import config
from mist.api.exceptions import BadRequestError
from mist.api.users.models import Organization
from mist.api.selectors.models import SelectorClassMixin
from mist.api.rules.base import NoDataRuleController
from mist.api.rules.base import ResourceRuleCo... | 35.155102 | 79 | 0.673981 | 14,731 | 0.855161 | 0 | 0 | 4,875 | 0.283002 | 0 | 0 | 7,951 | 0.46157 |
428d613a4c439197af5e225dec64ebdd98da7d00 | 1,685 | py | Python | setup.py | andrewwhitehead/django-oidc-rp | 233f1daeef96dbe84ecbb37fa31393c84f9c2805 | [
"MIT"
] | 20 | 2018-04-16T13:17:35.000Z | 2021-06-05T00:08:33.000Z | setup.py | andrewwhitehead/django-oidc-rp | 233f1daeef96dbe84ecbb37fa31393c84f9c2805 | [
"MIT"
] | 9 | 2018-07-20T18:19:13.000Z | 2021-12-22T08:57:18.000Z | setup.py | bcgov/django-oidc-rp | 50e6fa143e61b04849b4c66beef078be0d7669de | [
"MIT"
] | 21 | 2018-07-10T16:05:44.000Z | 2022-01-24T05:57:09.000Z | # -*- coding: utf-8 -*-
import codecs
from os.path import abspath
from os.path import dirname
from os.path import join
from setuptools import find_packages
from setuptools import setup
import oidc_rp
def read_relative_file(filename):
""" Returns contents of the given file, whose path is supposed relative to thi... | 31.792453 | 100 | 0.648071 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 864 | 0.51276 |
428e0c3390f490eb7e09d675c22baad9bedb5ba6 | 171 | py | Python | nndet/evaluator/detection/__init__.py | joeranbosma/nnDetection | 2ebbf1cdc8a8794c73e325f06fea50632c78ae8c | [
"BSD-3-Clause"
] | 242 | 2021-05-17T12:31:39.000Z | 2022-03-31T11:51:29.000Z | nndet/evaluator/detection/__init__.py | joeranbosma/nnDetection | 2ebbf1cdc8a8794c73e325f06fea50632c78ae8c | [
"BSD-3-Clause"
] | 59 | 2021-06-02T07:32:10.000Z | 2022-03-31T18:45:52.000Z | nndet/evaluator/detection/__init__.py | joeranbosma/nnDetection | 2ebbf1cdc8a8794c73e325f06fea50632c78ae8c | [
"BSD-3-Clause"
] | 38 | 2021-05-31T14:01:37.000Z | 2022-03-21T08:24:40.000Z | from nndet.evaluator.detection.froc import FROCMetric
from nndet.evaluator.detection.coco import COCOMetric
from nndet.evaluator.detection.hist import PredictionHistogram
| 42.75 | 62 | 0.877193 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
428e40b791a018156767a64f9f6283399ebd2b1c | 289 | py | Python | tests/test_update.py | sosie-js/ankisync2 | a41580197eab7f180f02a38a4aa912eb54cfaa93 | [
"MIT"
] | 39 | 2020-02-12T23:41:24.000Z | 2022-02-28T15:46:23.000Z | tests/test_update.py | sosie-js/ankisync2 | a41580197eab7f180f02a38a4aa912eb54cfaa93 | [
"MIT"
] | 9 | 2019-08-02T18:25:07.000Z | 2022-02-07T23:14:43.000Z | tests/test_update.py | sosie-js/ankisync2 | a41580197eab7f180f02a38a4aa912eb54cfaa93 | [
"MIT"
] | 6 | 2019-09-09T14:27:48.000Z | 2021-08-31T08:13:00.000Z | # from ankisync2.apkg import Apkg, db
# Has to be done through normal database methods
# def test_update():
# apkg = Apkg("example1.apkg")
# for n in db.Notes.filter(db.Notes.data["field1"] == "data1"):
# n.data["field3"] = "data2"
# n.save()
# apkg.close()
| 24.083333 | 67 | 0.598616 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 278 | 0.961938 |
428eac96b1905cf94fc5b1f167e60c8c46762f48 | 16,931 | py | Python | lib/place_model.py | ihaeyong/drama-graph | 60c3c216cd74bb19efd6baf836f6c7c2b42b764f | [
"MIT"
] | 3 | 2021-04-28T07:19:39.000Z | 2022-03-07T09:34:19.000Z | lib/place_model.py | ihaeyong/drama-graph | 60c3c216cd74bb19efd6baf836f6c7c2b42b764f | [
"MIT"
] | 18 | 2020-08-24T12:40:38.000Z | 2022-03-12T00:47:14.000Z | lib/place_model.py | ihaeyong/drama-graph | 60c3c216cd74bb19efd6baf836f6c7c2b42b764f | [
"MIT"
] | 1 | 2020-10-15T10:09:20.000Z | 2020-10-15T10:09:20.000Z | import torch
import torch.nn as nn
from torchvision.datasets.vision import VisionDataset
from PIL import Image
import os, sys, math
import os.path
import torch
import json
import torch.utils.model_zoo as model_zoo
from Yolo_v2_pytorch.src.utils import *
from Yolo_v2_pytorch.src.yolo_net import Yolo
from Yolo_v2_pytorc... | 36.647186 | 126 | 0.631268 | 11,071 | 0.653889 | 0 | 0 | 0 | 0 | 0 | 0 | 5,143 | 0.303762 |
428f4631d1d991fd823deb6aae84c7555b191363 | 9,127 | py | Python | ch01/challenge.py | laszlokiraly/LearningAlgorithms | 032a3cc409546619cf41220821d081cde54bbcce | [
"MIT"
] | null | null | null | ch01/challenge.py | laszlokiraly/LearningAlgorithms | 032a3cc409546619cf41220821d081cde54bbcce | [
"MIT"
] | null | null | null | ch01/challenge.py | laszlokiraly/LearningAlgorithms | 032a3cc409546619cf41220821d081cde54bbcce | [
"MIT"
] | null | null | null | """
Challenge Exercises for Chapter 1.
"""
import random
import timeit
from algs.table import DataTable, ExerciseNum, caption
from algs.counting import RecordedItem
def partition(A, lo, hi, idx):
"""
Partition using A[idx] as value. Note lo and hi are INCLUSIVE on both
ends and idx must be valid index. C... | 29.066879 | 102 | 0.573573 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3,300 | 0.361565 |
428f6c9308ecfc2aebd2c05427a3eb4c4bcb191b | 522 | py | Python | exaslct_src/lib/data/dependency_collector/dependency_image_info_collector.py | mace84/script-languages | d586cbe212bbb4efbfb39e095183729c65489360 | [
"MIT"
] | null | null | null | exaslct_src/lib/data/dependency_collector/dependency_image_info_collector.py | mace84/script-languages | d586cbe212bbb4efbfb39e095183729c65489360 | [
"MIT"
] | 1 | 2019-05-06T07:36:11.000Z | 2019-05-06T07:36:11.000Z | exaslct_src/lib/data/dependency_collector/dependency_image_info_collector.py | mace84/script-languages | d586cbe212bbb4efbfb39e095183729c65489360 | [
"MIT"
] | 1 | 2019-05-03T08:49:29.000Z | 2019-05-03T08:49:29.000Z | from typing import Dict
from exaslct_src.lib.data.image_info import ImageInfo
from exaslct_src.lib.data.dependency_collector.dependency_collector import DependencyInfoCollector
class DependencyImageInfoCollector(DependencyInfoCollector[ImageInfo]):
def is_info(self, input):
return isinstance(input, Dict... | 29 | 98 | 0.764368 | 313 | 0.599617 | 0 | 0 | 0 | 0 | 0 | 0 | 15 | 0.028736 |
42914f6fbdf21a73ae8be4659f5689614360b711 | 3,131 | py | Python | tensorflow_transform/test_case_test.py | LaudateCorpus1/transform | afee306046b8f656355b0170793ee64423f30e23 | [
"Apache-2.0"
] | 970 | 2017-02-10T04:33:46.000Z | 2022-03-26T08:11:20.000Z | tensorflow_transform/test_case_test.py | LaudateCorpus1/transform | afee306046b8f656355b0170793ee64423f30e23 | [
"Apache-2.0"
] | 216 | 2017-02-23T04:50:59.000Z | 2022-03-31T13:52:57.000Z | tensorflow_transform/test_case_test.py | LaudateCorpus1/transform | afee306046b8f656355b0170793ee64423f30e23 | [
"Apache-2.0"
] | 238 | 2017-02-17T16:30:55.000Z | 2022-03-03T20:10:25.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 a... | 36.835294 | 79 | 0.544874 | 2,365 | 0.75535 | 0 | 0 | 173 | 0.055254 | 0 | 0 | 1,112 | 0.355158 |
4293119f4fbe0691576ba0bf3959decad7140860 | 6,388 | py | Python | metageta/icons.py | ssutee/metageta | 70b7e572acefcce7a8f4d8de719f936934319064 | [
"MIT"
] | null | null | null | metageta/icons.py | ssutee/metageta | 70b7e572acefcce7a8f4d8de719f936934319064 | [
"MIT"
] | null | null | null | metageta/icons.py | ssutee/metageta | 70b7e572acefcce7a8f4d8de719f936934319064 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Copyright (c) 2013 Australian Government, Department of the Environment
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without... | 63.88 | 89 | 0.688009 | 5,129 | 0.802912 | 0 | 0 | 0 | 0 | 0 | 0 | 6,111 | 0.956637 |
42934dc5c7b47e76f47a4a49a47981e068b48692 | 1,417 | py | Python | chmp/src/chmp/torch_utils/_test_bayes.py | chmp/misc-exp | 2edc2ed598eb59f4ccb426e7a5c1a23343a6974b | [
"MIT"
] | 6 | 2017-10-31T20:54:37.000Z | 2020-10-23T19:03:00.000Z | chmp/src/chmp/torch_utils/_test_bayes.py | chmp/misc-exp | 2edc2ed598eb59f4ccb426e7a5c1a23343a6974b | [
"MIT"
] | 7 | 2020-03-24T16:14:34.000Z | 2021-03-18T20:51:37.000Z | chmp/src/chmp/torch_utils/_test_bayes.py | chmp/misc-exp | 2edc2ed598eb59f4ccb426e7a5c1a23343a6974b | [
"MIT"
] | 1 | 2019-07-29T07:55:49.000Z | 2019-07-29T07:55:49.000Z | import torch
import pytest
# NOTE: also registers the KL divergence
from chmp.torch_utils import NormalModule, WeightsHS, fixed
def test_kl_divergence__gamma__log_normal():
p = torch.distributions.LogNormal(torch.zeros(2), torch.ones(2))
q = torch.distributions.Gamma(torch.ones(2), torch.ones(2))
torch.... | 28.918367 | 73 | 0.666902 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 62 | 0.043754 |
4293fa719a880b9bfe3a700da09a0f285fc6495b | 867 | py | Python | test/hummingbot/core/utils/test_fixed_rate_source.py | BGTCapital/hummingbot | 2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242 | [
"Apache-2.0"
] | 3,027 | 2019-04-04T18:52:17.000Z | 2022-03-30T09:38:34.000Z | test/hummingbot/core/utils/test_fixed_rate_source.py | BGTCapital/hummingbot | 2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242 | [
"Apache-2.0"
] | 4,080 | 2019-04-04T19:51:11.000Z | 2022-03-31T23:45:21.000Z | test/hummingbot/core/utils/test_fixed_rate_source.py | BGTCapital/hummingbot | 2c50f50d67cedccf0ef4d8e3f4c8cdce3dc87242 | [
"Apache-2.0"
] | 1,342 | 2019-04-04T20:50:53.000Z | 2022-03-31T15:22:36.000Z | from decimal import Decimal
from unittest import TestCase
from hummingbot.core.utils.fixed_rate_source import FixedRateSource
class FixedRateSourceTests(TestCase):
def test_look_for_unconfigured_pair_rate(self):
rate_source = FixedRateSource()
self.assertIsNone(rate_source.rate("BTC-USDT"))
... | 32.111111 | 83 | 0.731257 | 737 | 0.850058 | 0 | 0 | 0 | 0 | 0 | 0 | 63 | 0.072664 |
4297be6e9ea671a123810cad1577476fb18a42d0 | 5,293 | py | Python | src/graphnet/models/detector/icecube.py | kaareendrup/gnn-reco | 21f4e36ef17c765a04cde0b2e34d5f802a988055 | [
"Apache-2.0"
] | null | null | null | src/graphnet/models/detector/icecube.py | kaareendrup/gnn-reco | 21f4e36ef17c765a04cde0b2e34d5f802a988055 | [
"Apache-2.0"
] | null | null | null | src/graphnet/models/detector/icecube.py | kaareendrup/gnn-reco | 21f4e36ef17c765a04cde0b2e34d5f802a988055 | [
"Apache-2.0"
] | null | null | null | import torch
from torch_geometric.data import Data
from graphnet.components.pool import group_pulses_to_dom, group_pulses_to_pmt, sum_pool_and_distribute
from graphnet.data.constants import FEATURES
from graphnet.models.detector.detector import Detector
class IceCube86(Detector):
"""`Detector` class for IceCube-... | 33.713376 | 128 | 0.575477 | 5,028 | 0.949934 | 0 | 0 | 69 | 0.013036 | 0 | 0 | 1,816 | 0.343095 |
429945dde445e0205f0ceeefa695def22a8e1795 | 450 | py | Python | tests/routes_parsing/test1.py | hellojoechip/bambleweeny | ef65f574081eb169aef5a2f7363c3f8ba9ebf028 | [
"MIT"
] | 22 | 2018-09-30T12:08:09.000Z | 2020-11-18T06:32:01.000Z | tests/routes_parsing/test1.py | hellojoechip/bambleweeny | ef65f574081eb169aef5a2f7363c3f8ba9ebf028 | [
"MIT"
] | 34 | 2018-09-13T14:54:21.000Z | 2020-03-26T18:26:26.000Z | tests/routes_parsing/test1.py | hellojoechip/bambleweeny | ef65f574081eb169aef5a2f7363c3f8ba9ebf028 | [
"MIT"
] | 17 | 2018-10-07T15:41:50.000Z | 2021-12-10T10:29:02.000Z | import re
t1 = 'Data !@[value1] and also !@[system:uptime] testing.'
print("Content: " + t1)
if re.search('!@\[[_a-zA-Z0-9:]*\]', t1):
print("YES")
else:
print("NO")
o = re.sub('!@\[[_a-zA-Z0-9:]*\]', '_B9yPrsE_\\g<0>_B9yPrsE_', t1)
o2 = o.split("_B9yPrsE_")
for i in o2:
if i.startswith("!@["):
... | 21.428571 | 66 | 0.482222 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 194 | 0.431111 |
429a7f070688a75a8c4a4c449d4d3474a9a7088a | 5,430 | py | Python | internal/notes/builtin-SAVE/packages/suite-sparse/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 1 | 2019-01-17T20:07:19.000Z | 2019-01-17T20:07:19.000Z | internal/notes/builtin-SAVE/packages/suite-sparse/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | null | null | null | internal/notes/builtin-SAVE/packages/suite-sparse/package.py | HPCToolkit/hpctest | 5ff4455582bf39e75530a31badcf6142081b386b | [
"BSD-3-Clause"
] | 2 | 2019-08-06T18:13:57.000Z | 2021-11-05T18:19:49.000Z | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, [email protected], All rights reserved.
# LLNL-CODE-64... | 44.876033 | 122 | 0.618416 | 4,172 | 0.768324 | 0 | 0 | 0 | 0 | 0 | 0 | 3,703 | 0.681952 |
429b606cd5d96a46f963693074a289b595badea4 | 4,580 | py | Python | tick/array/serialize.py | andro2157/tick | d22d0e70c8bb2d5b232ffa7b97426010c2328edc | [
"BSD-3-Clause"
] | null | null | null | tick/array/serialize.py | andro2157/tick | d22d0e70c8bb2d5b232ffa7b97426010c2328edc | [
"BSD-3-Clause"
] | null | null | null | tick/array/serialize.py | andro2157/tick | d22d0e70c8bb2d5b232ffa7b97426010c2328edc | [
"BSD-3-Clause"
] | null | null | null | # License: BSD 3 clause
import os
import numpy as np
import scipy
from tick.array.build.array import (
tick_float_array_to_file,
tick_float_array2d_to_file,
tick_float_sparse2d_to_file,
tick_double_array_to_file,
tick_double_array2d_to_file,
tick_double_sparse2d_to_file,
tick_float_array_... | 32.94964 | 76 | 0.613974 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,662 | 0.362882 |
429b9b03d73a5f7f9bbccc750f09ea936a25f8a0 | 78 | py | Python | __init__.py | bbockelm/glideinWMS | a2b39e3d4ff6c4527efad54b1eefe728a4ec9d18 | [
"BSD-3-Clause"
] | null | null | null | __init__.py | bbockelm/glideinWMS | a2b39e3d4ff6c4527efad54b1eefe728a4ec9d18 | [
"BSD-3-Clause"
] | 3 | 2015-12-02T19:37:45.000Z | 2016-01-20T03:21:48.000Z | __init__.py | bbockelm/glideinWMS | a2b39e3d4ff6c4527efad54b1eefe728a4ec9d18 | [
"BSD-3-Clause"
] | 1 | 2015-12-01T23:02:41.000Z | 2015-12-01T23:02:41.000Z | __all__=["factory","frontend","lib","tools","creation","install","unittests"]
| 39 | 77 | 0.692308 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 61 | 0.782051 |
429beefc88e6c9cf72106405ad5b6e321025f9d6 | 20,658 | py | Python | views/menuVisualizacaoGeral.py | iOsnaaente/Tracker-solar-Supervisorio | 9790c34f0d9df283bc1b92f79b2807875dbcfe3e | [
"MIT"
] | 2 | 2022-01-29T21:33:12.000Z | 2022-02-01T12:41:35.000Z | views/menuVisualizacaoGeral.py | iOsnaaente/Tracker-solar-Supervisorio | 9790c34f0d9df283bc1b92f79b2807875dbcfe3e | [
"MIT"
] | null | null | null | views/menuVisualizacaoGeral.py | iOsnaaente/Tracker-solar-Supervisorio | 9790c34f0d9df283bc1b92f79b2807875dbcfe3e | [
"MIT"
] | null | null | null | import dearpygui.dearpygui as dpg
import datetime as dt
import math
from registry import *
SUN_DATA.update_date()
# FUNCTIONS
def get_semi_circle_points( center, radius, angle_i, angle_f, segments = 360, closed = False ):
points_close = [[ center[0], center[1]-radius ] , center, [ c... | 70.989691 | 267 | 0.554265 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2,651 | 0.127932 |
429cb5fb216dbdf5ec9ff71a33c2d298dd2c8210 | 4,071 | py | Python | python/jwt.py | angelbarranco/passes-rest-samples | 93f54e3e7b651bcfd1b269e2bcd5d9bf9d50ad8c | [
"Apache-2.0"
] | 95 | 2019-06-05T12:45:15.000Z | 2022-03-30T14:02:27.000Z | python/jwt.py | angelbarranco/passes-rest-samples | 93f54e3e7b651bcfd1b269e2bcd5d9bf9d50ad8c | [
"Apache-2.0"
] | 21 | 2019-06-18T15:41:41.000Z | 2022-03-04T15:29:57.000Z | python/jwt.py | angelbarranco/passes-rest-samples | 93f54e3e7b651bcfd1b269e2bcd5d9bf9d50ad8c | [
"Apache-2.0"
] | 45 | 2019-06-13T20:57:11.000Z | 2022-03-21T13:43:31.000Z | """
Copyright 2019 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 agreed to in... | 35.4 | 121 | 0.747237 | 2,751 | 0.675755 | 0 | 0 | 0 | 0 | 0 | 0 | 1,680 | 0.412675 |
429ce61086d20c4c1d15d20e5249184bf0cc61e3 | 4,714 | py | Python | janus.py | caxmd/januus | 79208e2450b4c5b1c81346b99814462f6d083b66 | [
"MIT"
] | 83 | 2017-12-11T03:33:10.000Z | 2022-02-17T15:13:54.000Z | janus.py | caxmd/januus | 79208e2450b4c5b1c81346b99814462f6d083b66 | [
"MIT"
] | 3 | 2017-12-25T16:15:44.000Z | 2018-06-17T11:06:08.000Z | janus.py | caxmd/januus | 79208e2450b4c5b1c81346b99814462f6d083b66 | [
"MIT"
] | 25 | 2017-12-11T03:51:12.000Z | 2022-02-17T15:13:57.000Z | # Includes some code derived from the cpython project.
# Source: https://github.com/python/cpython/blob/master/Lib/zipfile.py
# Excuse the mess.
import argparse
from hashlib import sha1
import os
import struct
from zipfile import _EndRecData, ZipFile
from zlib import adler32
_ECD_SIGNATURE = 0
_ECD_DISK_NUMBER = 1
_... | 31.218543 | 152 | 0.655282 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 426 | 0.090369 |
429cf2c16bb83449ca0bd5d3338a9cac6d753159 | 74 | py | Python | constants.py | phy1um/tmtc-discord-bot | 7d01cd4c1a78dc0b8aa2bb703c8970ff7bb27f92 | [
"MIT"
] | null | null | null | constants.py | phy1um/tmtc-discord-bot | 7d01cd4c1a78dc0b8aa2bb703c8970ff7bb27f92 | [
"MIT"
] | null | null | null | constants.py | phy1um/tmtc-discord-bot | 7d01cd4c1a78dc0b8aa2bb703c8970ff7bb27f92 | [
"MIT"
] | null | null | null |
ANNOUNCEMENT_ROLE = "941805571915513857"
GUILD_ID = "878926572235665418"
| 18.5 | 40 | 0.824324 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 40 | 0.540541 |
429eedb68c601680755c430f3d242a23508963a5 | 3,352 | py | Python | test/gst-msdk/transcode/mpeg2.py | haribommi/vaapi-fits | cbf2a463bd3b2c9af5c45a1376b0bde2b703ed23 | [
"BSD-3-Clause"
] | null | null | null | test/gst-msdk/transcode/mpeg2.py | haribommi/vaapi-fits | cbf2a463bd3b2c9af5c45a1376b0bde2b703ed23 | [
"BSD-3-Clause"
] | null | null | null | test/gst-msdk/transcode/mpeg2.py | haribommi/vaapi-fits | cbf2a463bd3b2c9af5c45a1376b0bde2b703ed23 | [
"BSD-3-Clause"
] | null | null | null | ##
### Copyright (C) 2018-2019 Intel Corporation
###
### SPDX-License-Identifier: BSD-3-Clause
###
from ....lib import *
from ..util import *
from .transcoder import TranscoderTest
spec = load_test_spec("mpeg2", "transcode")
class to_avc(TranscoderTest):
@slash.requires(*have_gst_element("msdkh264enc"))
@slash.re... | 38.976744 | 107 | 0.683174 | 3,118 | 0.930191 | 0 | 0 | 2,985 | 0.890513 | 0 | 0 | 943 | 0.281325 |
42a05049df648190833a6dde333b459a1ed6a363 | 10,220 | py | Python | rusel/base/context.py | ruslan-ok/ruslan | fc402e53d2683581e13f4d6c69a6f21e5c2ca1f8 | [
"MIT"
] | null | null | null | rusel/base/context.py | ruslan-ok/ruslan | fc402e53d2683581e13f4d6c69a6f21e5c2ca1f8 | [
"MIT"
] | null | null | null | rusel/base/context.py | ruslan-ok/ruslan | fc402e53d2683581e13f4d6c69a6f21e5c2ca1f8 | [
"MIT"
] | null | null | null | import os, time, mimetypes, glob
from django.utils.translation import gettext_lazy as _
from django.urls import reverse
from task.const import *
from task.models import Task, detect_group
from rusel.base.config import Config
from rusel.base.forms import CreateGroupForm
from rusel.context import get_base_context
from ru... | 40.078431 | 196 | 0.531409 | 9,859 | 0.964677 | 0 | 0 | 0 | 0 | 0 | 0 | 946 | 0.092564 |
42a0a34d1333c63396ab8f94b968a15d8d78c49d | 2,046 | py | Python | deepdiy/plugins/system/debugger/debugger.py | IEWbgfnYDwHRoRRSKtkdyMDUzgdwuBYgDKtDJWd/diy | 080ddece4f982f22f3d5cff8d9d82e12fcd946a1 | [
"MIT"
] | 57 | 2019-05-01T05:27:19.000Z | 2022-03-06T12:11:55.000Z | deepdiy/plugins/system/debugger/debugger.py | markusj1201/deepdiy | 080ddece4f982f22f3d5cff8d9d82e12fcd946a1 | [
"MIT"
] | 6 | 2020-01-28T22:42:22.000Z | 2022-02-10T00:13:11.000Z | deepdiy/plugins/system/debugger/debugger.py | markusj1201/deepdiy | 080ddece4f982f22f3d5cff8d9d82e12fcd946a1 | [
"MIT"
] | 13 | 2019-05-08T03:19:58.000Z | 2021-08-02T04:24:15.000Z | import os,rootpath
rootpath.append(pattern='main.py') # add the directory of main.py to PATH
import glob
from kivy.app import App
from kivy.lang import Builder
from kivy.properties import ObjectProperty,DictProperty,ListProperty
from kivy.uix.boxlayout import BoxLayout
import logging,importlib,pkgutil
class Debugger(B... | 31 | 106 | 0.711632 | 1,695 | 0.828446 | 0 | 0 | 0 | 0 | 0 | 0 | 848 | 0.414467 |
42a141b9ed0d23fd4819a5a6563c8f54190ea8c2 | 1,885 | py | Python | supervised_learning/classification/perceptron/perceptron.py | Ambitious-idiot/python-machine-learning | 6c057dd64fb47de3e822b825135d24896ce13a4a | [
"MIT"
] | 3 | 2021-04-15T06:20:31.000Z | 2021-05-28T05:26:06.000Z | supervised_learning/classification/perceptron/perceptron.py | Ambitious-idiot/python-machine-learning | 6c057dd64fb47de3e822b825135d24896ce13a4a | [
"MIT"
] | null | null | null | supervised_learning/classification/perceptron/perceptron.py | Ambitious-idiot/python-machine-learning | 6c057dd64fb47de3e822b825135d24896ce13a4a | [
"MIT"
] | null | null | null | import numpy as np
class Perceptron:
def __init__(self, weight, bias=0):
self.weight = weight
self.bias = bias
def __repr__(self):
return 'Perceptron(weight=%r, bias=%r)' % (self.weight, self.bias)
def __get_predictions(self, data):
return np.dot(data, self.weight) + self... | 40.106383 | 116 | 0.682228 | 1,863 | 0.988329 | 0 | 0 | 0 | 0 | 0 | 0 | 32 | 0.016976 |
42a1c00f35b59908451cfee2563f53a899db2598 | 901 | py | Python | pygama/dsp/_processors/trap_filter.py | sweigart/pygama | 3c5fe4c69230814933b2de879b9a305ff0d4ad5e | [
"Apache-2.0"
] | 1 | 2022-01-19T14:31:56.000Z | 2022-01-19T14:31:56.000Z | pygama/dsp/_processors/trap_filter.py | sweigart/pygama | 3c5fe4c69230814933b2de879b9a305ff0d4ad5e | [
"Apache-2.0"
] | 1 | 2020-12-08T20:07:24.000Z | 2020-12-08T20:07:24.000Z | pygama/dsp/_processors/trap_filter.py | sweigart/pygama | 3c5fe4c69230814933b2de879b9a305ff0d4ad5e | [
"Apache-2.0"
] | null | null | null | import numpy as np
from numba import guvectorize
@guvectorize(["void(float32[:], int32, int32, float32[:])",
"void(float64[:], int32, int32, float64[:])",
"void(int32[:], int32, int32, int32[:])",
"void(int64[:], int32, int32, int64[:])"],
"(n),(),()->(n)", nopyt... | 37.541667 | 102 | 0.558269 | 0 | 0 | 0 | 0 | 848 | 0.941176 | 0 | 0 | 228 | 0.253052 |
42a664bd1e777200555f859b46debbdacf24989f | 61 | py | Python | other.py | nunenuh/idcard_datagen | 694a1736f0f5c97c22462474991a6e32456f9498 | [
"MIT"
] | 1 | 2020-09-30T04:34:01.000Z | 2020-09-30T04:34:01.000Z | other.py | nunenuh/idcard_datagen | 694a1736f0f5c97c22462474991a6e32456f9498 | [
"MIT"
] | null | null | null | other.py | nunenuh/idcard_datagen | 694a1736f0f5c97c22462474991a6e32456f9498 | [
"MIT"
] | null | null | null |
def is_true(a,b,c,d,e,f,g):
if a>10:
print(10) | 10.166667 | 27 | 0.47541 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
42a67cbf934d63272df061aa18d737365bf0fa29 | 5,109 | py | Python | pilferer/engine.py | Sebastian-dm/pilferer | 5126377154c7ba08fbea1a9dfad752bf8b1c72a9 | [
"MIT"
] | null | null | null | pilferer/engine.py | Sebastian-dm/pilferer | 5126377154c7ba08fbea1a9dfad752bf8b1c72a9 | [
"MIT"
] | null | null | null | pilferer/engine.py | Sebastian-dm/pilferer | 5126377154c7ba08fbea1a9dfad752bf8b1c72a9 | [
"MIT"
] | null | null | null | import tcod
from input_handlers import handle_keys
from game_states import GameStates
from render_functions import clear_all, render_all, RenderOrder
from map_objects.game_map import GameMap
from fov_functions import initialize_fov, recompute_fov
from entity import Entity, get_blocking_entity_at_location
from compon... | 32.335443 | 112 | 0.603249 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 400 | 0.078293 |
42a6cbc1a232b14997c3952e709da0eebe84cd51 | 2,337 | py | Python | galaxy/api/v2/urls.py | SamyCoenen/galaxy | 7c17ef45e53b0fc2fe8a2c70a99f3947604e0b0e | [
"Apache-2.0"
] | null | null | null | galaxy/api/v2/urls.py | SamyCoenen/galaxy | 7c17ef45e53b0fc2fe8a2c70a99f3947604e0b0e | [
"Apache-2.0"
] | null | null | null | galaxy/api/v2/urls.py | SamyCoenen/galaxy | 7c17ef45e53b0fc2fe8a2c70a99f3947604e0b0e | [
"Apache-2.0"
] | null | null | null | # (c) 2012-2019, Ansible by Red Hat
#
# This file is part of Ansible Galaxy
#
# Ansible Galaxy is free software: you can redistribute it and/or modify
# it under the terms of the Apache License as published by
# the Apache Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
... | 35.953846 | 75 | 0.682071 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1,457 | 0.623449 |
42a78f723d388f6c17abd15949a96f2a870ca42a | 1,933 | py | Python | mindhome_alpha/erpnext/stock/doctype/stock_settings/test_stock_settings.py | Mindhome/field_service | 3aea428815147903eb9af1d0c1b4b9fc7faed057 | [
"MIT"
] | 1 | 2021-04-29T14:55:29.000Z | 2021-04-29T14:55:29.000Z | mindhome_alpha/erpnext/stock/doctype/stock_settings/test_stock_settings.py | Mindhome/field_service | 3aea428815147903eb9af1d0c1b4b9fc7faed057 | [
"MIT"
] | null | null | null | mindhome_alpha/erpnext/stock/doctype/stock_settings/test_stock_settings.py | Mindhome/field_service | 3aea428815147903eb9af1d0c1b4b9fc7faed057 | [
"MIT"
] | 1 | 2021-04-29T14:39:01.000Z | 2021-04-29T14:39:01.000Z | # -*- coding: utf-8 -*-
# Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and Contributors
# See license.txt
from __future__ import unicode_literals
import frappe
import unittest
class TestStockSettings(unittest.TestCase):
def setUp(self):
frappe.db.set_value("Stock Settings", None, "clean_description_html", 0)
... | 42.021739 | 338 | 0.698914 | 1,749 | 0.904811 | 0 | 0 | 0 | 0 | 0 | 0 | 1,170 | 0.605277 |
42a96ad3b83164695c47573ef1f876f36eb4d891 | 1,148 | py | Python | pybloxy/classes/http.py | R0bl0x10501050/roblox.py | cbbb25878627c2d837caaeb7edf37d0aeda615ae | [
"MIT"
] | null | null | null | pybloxy/classes/http.py | R0bl0x10501050/roblox.py | cbbb25878627c2d837caaeb7edf37d0aeda615ae | [
"MIT"
] | null | null | null | pybloxy/classes/http.py | R0bl0x10501050/roblox.py | cbbb25878627c2d837caaeb7edf37d0aeda615ae | [
"MIT"
] | null | null | null | import logging
import requests
class Http:
def sendRequest(url):
payload = requests.get(str(url))
statusCode = payload.status_code
content = payload.content
if statusCode != 200:
return logging.error(f"[Pybloxy - GET] Something went wrong! Error Code: {statusCode}")
return content
def postRequest(u... | 26.697674 | 93 | 0.722997 | 1,116 | 0.972125 | 0 | 0 | 0 | 0 | 0 | 0 | 266 | 0.231707 |
42a99e600220ea6f0c20b482db83263664318f69 | 1,305 | py | Python | resources/nuice_simulations/src/layers_sim/layers_sim_node.py | SpyGuyIan/NUice | 47991a848dac244b4c476b4a92f7a27a1f9e5dcc | [
"MIT"
] | 1 | 2021-08-17T00:40:42.000Z | 2021-08-17T00:40:42.000Z | resources/nuice_simulations/src/layers_sim/layers_sim_node.py | SpyGuyIan/NUice | 47991a848dac244b4c476b4a92f7a27a1f9e5dcc | [
"MIT"
] | 1 | 2021-01-31T17:15:40.000Z | 2021-01-31T17:15:40.000Z | resources/nuice_simulations/src/layers_sim/layers_sim_node.py | NUMarsIce/NUice | 47991a848dac244b4c476b4a92f7a27a1f9e5dcc | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
from std_msgs.msg import Float64
import random
possibleLayers = [140, 50, 80, 200, 100]
cur_position = 0.0
def position_callback(msg):
global cur_position
cur_position = msg.data
#Build the layers simulation, then publish material strengths. Lasts 100 seconds.
def runLayers... | 29 | 81 | 0.691954 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 289 | 0.221456 |
42a9a106ced30891f6bde30e0be69f4978578110 | 1,121 | py | Python | imagescraper/imagescraper/spiders/image_crawl_spider.py | karthikn2789/Scrapy-Projects | 84db4ed1a2f38d6fa03d1bfa6a6ebf9fb527f523 | [
"MIT"
] | 2 | 2021-04-08T12:48:10.000Z | 2021-06-16T09:42:39.000Z | imagescraper/imagescraper/spiders/image_crawl_spider.py | karthikn2789/Scrapy-Projects | 84db4ed1a2f38d6fa03d1bfa6a6ebf9fb527f523 | [
"MIT"
] | null | null | null | imagescraper/imagescraper/spiders/image_crawl_spider.py | karthikn2789/Scrapy-Projects | 84db4ed1a2f38d6fa03d1bfa6a6ebf9fb527f523 | [
"MIT"
] | 6 | 2020-08-05T09:45:39.000Z | 2021-11-16T14:05:20.000Z | import scrapy
import re
from scrapy.linkextractors import LinkExtractor
from scrapy.spiders import CrawlSpider, Rule
from ..items import ImagescraperItem
class ImageCrawlSpiderSpider(CrawlSpider):
name = "image_crawl_spider"
allowed_domains = ["books.toscrape.com"]
def start_requests(self):
url =... | 36.16129 | 92 | 0.611954 | 964 | 0.859946 | 739 | 0.659233 | 0 | 0 | 0 | 0 | 399 | 0.355932 |