hexsha stringlengths 40 40 | size int64 3 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 972 | max_stars_repo_name stringlengths 6 130 | 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 972 | max_issues_repo_name stringlengths 6 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | 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 972 | max_forks_repo_name stringlengths 6 130 | 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 3 1.03M | avg_line_length float64 1.13 941k | max_line_length int64 2 941k | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1bb9812fa74884455a49dc34a4482de30e18f910 | 212 | py | Python | dataset/__init__.py | A-ZHANG1/PSENet | 7e6c93f747288341a1d8409835e8de88bdddf603 | [
"Apache-2.0"
] | 2 | 2019-07-11T13:57:53.000Z | 2019-07-31T02:04:52.000Z | dataset/__init__.py | XueKX/PSENet_python3 | 966e0749032b1423f9904d03b32cdbb9d69f8554 | [
"Apache-2.0"
] | 1 | 2019-06-14T09:24:27.000Z | 2019-08-20T01:27:17.000Z | dataset/__init__.py | XueKX/PSENet_python3 | 966e0749032b1423f9904d03b32cdbb9d69f8554 | [
"Apache-2.0"
] | 1 | 2019-07-31T02:04:54.000Z | 2019-07-31T02:04:54.000Z | from dataset.icdar2015_loader import IC15Loader
from dataset.icdar2015_test_loader import IC15TestLoader
from dataset.ctw1500_loader import CTW1500Loader
from dataset.ctw1500_test_loader import CTW1500TestLoader | 42.4 | 57 | 0.90566 |
7aa19fee3d60ea8d9d4b69a55cfc89895c5d22d8 | 503 | py | Python | phiinsta/wsgi.py | denn-is-njeruh/Instaclone | a2f3c36822c419bfeadc56adccce00ce77e1d16e | [
"MIT"
] | null | null | null | phiinsta/wsgi.py | denn-is-njeruh/Instaclone | a2f3c36822c419bfeadc56adccce00ce77e1d16e | [
"MIT"
] | null | null | null | phiinsta/wsgi.py | denn-is-njeruh/Instaclone | a2f3c36822c419bfeadc56adccce00ce77e1d16e | [
"MIT"
] | null | null | null | """
WSGI config for phiinsta project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.2/howto/deployment/wsgi/
"""
import os
from dotenv import load_dotenv
from django.core.wsgi import get_wsgi_application
loa... | 25.15 | 78 | 0.7833 |
2cea83e4025138e8d29b797811956344184332bb | 3,290 | py | Python | Demo/scripts/morse.py | 1byte2bytes/cpython | 7fbaeb819ca7b20dca048217ff585ec195e999ec | [
"Unlicense",
"TCL",
"DOC",
"AAL",
"X11"
] | 5 | 2022-03-26T21:53:36.000Z | 2022-03-30T21:47:20.000Z | Demo/scripts/morse.py | 1byte2bytes/cpython | 7fbaeb819ca7b20dca048217ff585ec195e999ec | [
"Unlicense",
"TCL",
"DOC",
"AAL",
"X11"
] | 6 | 2020-11-18T15:48:14.000Z | 2021-05-03T21:20:50.000Z | Demo/scripts/morse.py | 1byte2bytes/cpython | 7fbaeb819ca7b20dca048217ff585ec195e999ec | [
"Unlicense",
"TCL",
"DOC",
"AAL",
"X11"
] | 2 | 2015-07-16T08:14:13.000Z | 2022-03-27T01:55:17.000Z | # DAH should be three DOTs.
# Space between DOTs and DAHs should be one DOT.
# Space between two letters should be one DAH.
# Space between two words should be DOT DAH DAH.
import sys, math, audiodev
DOT = 30
DAH = 3 * DOT
OCTAVE = 2 # 1 == 441 Hz, 2 == 882 Hz, ...
morsetab = {
'A': '.-', 'a': '.-',
'B': '-...... | 21.933333 | 68 | 0.459574 |
a08546a40801ffb454cd013dba61150c17a5f401 | 30,347 | py | Python | manila/tests/api/v2/test_share_networks.py | snpd25/manila | 9cf435c7f86a7b79e01af7b8bc88cd619e34cab4 | [
"Apache-2.0"
] | 3 | 2016-06-06T13:05:00.000Z | 2021-05-05T04:29:24.000Z | manila/tests/api/v2/test_share_networks.py | snpd25/manila | 9cf435c7f86a7b79e01af7b8bc88cd619e34cab4 | [
"Apache-2.0"
] | 1 | 2021-03-31T19:40:52.000Z | 2021-03-31T19:40:52.000Z | manila/tests/api/v2/test_share_networks.py | snpd25/manila | 9cf435c7f86a7b79e01af7b8bc88cd619e34cab4 | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 NetApp
# 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 applic... | 43.539455 | 79 | 0.610999 |
6340d9326852fc234af622542d58a35a22f97474 | 1,136 | py | Python | python_code/wxichat/wxichat.py | helight/helight_code | 67e39a94c9bf9f7ade89664afa5f7887271861b2 | [
"Apache-2.0"
] | 1 | 2017-07-16T14:32:34.000Z | 2017-07-16T14:32:34.000Z | python_code/wxichat/wxichat.py | helight/helight_code | 67e39a94c9bf9f7ade89664afa5f7887271861b2 | [
"Apache-2.0"
] | null | null | null | python_code/wxichat/wxichat.py | helight/helight_code | 67e39a94c9bf9f7ade89664afa5f7887271861b2 | [
"Apache-2.0"
] | null | null | null | # coding=utf8
import itchat
import requests
def get_response2(msg):
apiUrl = 'http://www.tuling123.com/openapi/api'
data = {
'key': 'd0860e4c209a4751815c867d5d37b5fd', # Tuling Key,API的值
'info': msg, # 发出去的消息
'userid': 'helight', # 用户名
}
r = requests.po... | 27.047619 | 76 | 0.590669 |
88e99a92163e9b35236541059eaca7483a0455af | 5,822 | py | Python | assets_datasets/stimuli_f0_labels.py | msaddler/pitchnet | 8e26034be177deff7447ade7f782a4a9581c2188 | [
"MIT"
] | 6 | 2021-12-21T05:38:03.000Z | 2022-03-31T21:05:56.000Z | assets_datasets/stimuli_f0_labels.py | msaddler/pitchnet | 8e26034be177deff7447ade7f782a4a9581c2188 | [
"MIT"
] | null | null | null | assets_datasets/stimuli_f0_labels.py | msaddler/pitchnet | 8e26034be177deff7447ade7f782a4a9581c2188 | [
"MIT"
] | 1 | 2022-03-28T19:33:53.000Z | 2022-03-28T19:33:53.000Z | import sys
import os
import h5py
import glob
import numpy as np
import argparse
from dataset_util import get_f0_bins, f0_to_label, f0_to_octave, f0_to_normalized
from dataset_util import label_to_f0, octave_to_f0, normalized_to_f0
def add_f0_label_to_hdf5(hdf5_filename,
source_f0_key,
... | 53.907407 | 121 | 0.63157 |
a07f3ae90bff8d2efcd96bacb0923da3928f0e99 | 811 | py | Python | Week_3/AdvanceDjango/manage.py | girisagar46/DjangoTrainingClass | 373f4151b2ee46ea8f76ffa344603014e87d9764 | [
"MIT"
] | null | null | null | Week_3/AdvanceDjango/manage.py | girisagar46/DjangoTrainingClass | 373f4151b2ee46ea8f76ffa344603014e87d9764 | [
"MIT"
] | null | null | null | Week_3/AdvanceDjango/manage.py | girisagar46/DjangoTrainingClass | 373f4151b2ee46ea8f76ffa344603014e87d9764 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "AdvanceDjango.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure tha... | 35.26087 | 77 | 0.644883 |
614f909f8d8c7493a0a72a4fd6a20cb6caf2ea72 | 8,982 | py | Python | models/model/model_yolov3_x.py | yuanliangxie/YOLOv3_simple_baseline | 325e2963ae770e6f45912f3142941d3bddaf9d6e | [
"Apache-2.0"
] | 1 | 2022-02-26T10:13:08.000Z | 2022-02-26T10:13:08.000Z | models/model/model_yolov3_x.py | yuanliangxie/YOLOv3_simple_baseline | 325e2963ae770e6f45912f3142941d3bddaf9d6e | [
"Apache-2.0"
] | null | null | null | models/model/model_yolov3_x.py | yuanliangxie/YOLOv3_simple_baseline | 325e2963ae770e6f45912f3142941d3bddaf9d6e | [
"Apache-2.0"
] | null | null | null | import torch.nn as nn
import models.head.yolov3_head as yolov3_head
import models.backbone.new_darknet as darknet53
import models.backbone.neck as neck
import models.loss.yolo_loss_x_module as loss
from utils.logger import print_logger
from models.layer.layer_fundation import Conv2dBatchLeaky as Convolutional
import nu... | 43.601942 | 103 | 0.571699 |
1c200bec1a191ba75df30f958193bbfbd97fc651 | 2,832 | py | Python | setup.py | OrangutanGaming/Mixer.py | b77030c1cade01f43459001fb4b111ee1cb933f7 | [
"MIT"
] | null | null | null | setup.py | OrangutanGaming/Mixer.py | b77030c1cade01f43459001fb4b111ee1cb933f7 | [
"MIT"
] | null | null | null | setup.py | OrangutanGaming/Mixer.py | b77030c1cade01f43459001fb4b111ee1cb933f7 | [
"MIT"
] | null | null | null | # MIT License
#
# Copyright (c) 2019 Nihaal Sangha (Orangutan)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, c... | 35.848101 | 99 | 0.66702 |
1d4533bf9b8a0a9296b432f42dd192cdd0a4624f | 2,063 | py | Python | spinup/algos/td3/core.py | mksmsrkn/spinningup_pytorch | 1b1176126f293e44e0c2990cfda409b1e42409c9 | [
"MIT"
] | null | null | null | spinup/algos/td3/core.py | mksmsrkn/spinningup_pytorch | 1b1176126f293e44e0c2990cfda409b1e42409c9 | [
"MIT"
] | null | null | null | spinup/algos/td3/core.py | mksmsrkn/spinningup_pytorch | 1b1176126f293e44e0c2990cfda409b1e42409c9 | [
"MIT"
] | null | null | null | import numpy as np
import torch
from torch import nn
from gym.spaces import Box
class MLP(nn.Module):
def __init__(self, in_dim, hidden_sizes=(64,64), activation=nn.Tanh,
output_activation=None, output_scaler=1):
super(MLP, self).__init__()
self.output_scaler = output_scaler
... | 36.192982 | 97 | 0.603975 |
161e549ad9a260fb517f2109fe75116ad5404978 | 15,039 | py | Python | src/rpdk/core/fragment/generator.py | rachfop/cloudformation-cli | 1a892173137b1eb47cc6c9f99191e4dbe15de4a2 | [
"Apache-2.0"
] | null | null | null | src/rpdk/core/fragment/generator.py | rachfop/cloudformation-cli | 1a892173137b1eb47cc6c9f99191e4dbe15de4a2 | [
"Apache-2.0"
] | null | null | null | src/rpdk/core/fragment/generator.py | rachfop/cloudformation-cli | 1a892173137b1eb47cc6c9f99191e4dbe15de4a2 | [
"Apache-2.0"
] | 1 | 2019-12-04T00:14:25.000Z | 2019-12-04T00:14:25.000Z | """
This class has two responsibilities:
1. generating a sample template fragment so the user has some initial
file fragment as an example.
The method "generate_sample_fragment" will be called as part of the init command.
2. generating schema for provided template fragments.
The method "generate_schema" will be called ... | 38.561538 | 86 | 0.598777 |
fa81f048922ba814fbba542daa7a64363f914dfa | 3,880 | py | Python | userbot/modules/stat.py | bryanasfuk/Baphomet | bf3c3d9589511534ad848b3aa0b59e3d6b113282 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 56 | 2021-04-13T13:22:07.000Z | 2022-02-28T04:08:19.000Z | userbot/modules/stat.py | bryanasfuk/Baphomet | bf3c3d9589511534ad848b3aa0b59e3d6b113282 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 85 | 2021-04-11T17:00:29.000Z | 2022-03-31T22:16:35.000Z | userbot/modules/stat.py | bryanasfuk/Baphomet | bf3c3d9589511534ad848b3aa0b59e3d6b113282 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 140 | 2021-04-13T00:25:11.000Z | 2022-03-31T05:28:22.000Z | """Count the Number of Dialogs you have in your Telegram Account
Syntax: .stats"""
import logging
import time
from telethon.events import NewMessage
from telethon.tl.custom import Dialog
from telethon.tl.types import Channel, Chat, User
from userbot.events import register
logging.basicConfig(
format='[%(levelnam... | 34.954955 | 94 | 0.615979 |
99f831688af10e350e3aa77b887eb7d544204017 | 19,226 | py | Python | rootfs/usr/lib/python3/dist-packages/serial/serialutil.py | kappaIO-Dev/kappaIO-sdk-armhf-crosscompile | 66fc5fc21e6235f7a3be72a7ccac68e2224b7fb2 | [
"MIT"
] | null | null | null | rootfs/usr/lib/python3/dist-packages/serial/serialutil.py | kappaIO-Dev/kappaIO-sdk-armhf-crosscompile | 66fc5fc21e6235f7a3be72a7ccac68e2224b7fb2 | [
"MIT"
] | 1 | 2018-04-15T22:59:15.000Z | 2018-04-15T22:59:15.000Z | rootfs/usr/lib/python3/dist-packages/serial/serialutil.py | kappaIO-Dev/kappaIO-sdk-armhf-crosscompile | 66fc5fc21e6235f7a3be72a7ccac68e2224b7fb2 | [
"MIT"
] | null | null | null | #! python
# Python Serial Port Extension for Win32, Linux, BSD, Jython
# see __init__.py
#
# (C) 2001-2010 Chris Liechti <cliechti@gmx.net>
# this is distributed under a free software license, see license.txt
# compatibility for older Python < 2.6
try:
bytes
bytearray
except (NameError, AttributeError):
# ... | 36.481973 | 146 | 0.592947 |
9b7e44d8b103aa990596ff88f8d1942574a9bf98 | 2,322 | py | Python | src/crypto_dom/kraken/user_funding/deposit_methods.py | maxima-us/crypto-dom | d0c21638a96dfd03778f98f98e002c6be114717c | [
"MIT"
] | null | null | null | src/crypto_dom/kraken/user_funding/deposit_methods.py | maxima-us/crypto-dom | d0c21638a96dfd03778f98f98e002c6be114717c | [
"MIT"
] | 2 | 2021-01-15T15:37:21.000Z | 2021-01-25T10:10:52.000Z | src/crypto_dom/kraken/user_funding/deposit_methods.py | maxima-us/crypto-dom | d0c21638a96dfd03778f98f98e002c6be114717c | [
"MIT"
] | 1 | 2021-01-15T13:51:06.000Z | 2021-01-15T13:51:06.000Z | import typing
from decimal import Decimal
import pydantic
import stackprinter
stackprinter.set_excepthook(style="darkbg2")
from crypto_dom.kraken.definitions import ASSETCLASS, ASSET
# ============================================================
# DEPOSIT METHODS
# =================================================... | 22.990099 | 91 | 0.562016 |
c6a5b3901ebac2e0c88de912b380f36a24707e5f | 11,238 | py | Python | domino/domino.py | MrBenGriffin/or-tools | f8c473f016266f89fcbfef38bd9f3738371667b9 | [
"Apache-2.0"
] | 8 | 2021-02-24T15:19:01.000Z | 2022-03-22T15:12:45.000Z | domino/domino.py | MrBenGriffin/or-tools | f8c473f016266f89fcbfef38bd9f3738371667b9 | [
"Apache-2.0"
] | 1 | 2022-02-28T22:14:30.000Z | 2022-02-28T22:14:30.000Z | domino/domino.py | MrBenGriffin/or-tools | f8c473f016266f89fcbfef38bd9f3738371667b9 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Ben Griffin
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, so... | 37.585284 | 121 | 0.530699 |
a3814ad97aceb0ed00fa5ae279487eb1d90eae12 | 23,547 | py | Python | oneflow/python/framework/check_point_v2.py | sji15/oneflow | 523888bc251920c39021e7a0e063118d53c4cfd1 | [
"Apache-2.0"
] | null | null | null | oneflow/python/framework/check_point_v2.py | sji15/oneflow | 523888bc251920c39021e7a0e063118d53c4cfd1 | [
"Apache-2.0"
] | null | null | null | oneflow/python/framework/check_point_v2.py | sji15/oneflow | 523888bc251920c39021e7a0e063118d53c4cfd1 | [
"Apache-2.0"
] | null | null | null | """
Copyright 2020 The OneFlow Authors. 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 agr... | 37.199052 | 199 | 0.685098 |
480d1e5860b8d7e2e1793a124bc5631a62db03d3 | 2,761 | py | Python | mltoolkit/mldp/steps/collectors/unit_collector.py | stungkit/Copycat-abstractive-opinion-summarizer | 04fe5393a7bb6883516766b762f6a0c530e95375 | [
"MIT"
] | 51 | 2020-09-25T07:05:01.000Z | 2022-03-17T12:07:40.000Z | mltoolkit/mldp/steps/collectors/unit_collector.py | stungkit/Copycat-abstractive-opinion-summarizer | 04fe5393a7bb6883516766b762f6a0c530e95375 | [
"MIT"
] | 4 | 2020-10-19T10:00:22.000Z | 2022-03-14T17:02:47.000Z | mltoolkit/mldp/steps/collectors/unit_collector.py | stungkit/Copycat-abstractive-opinion-summarizer | 04fe5393a7bb6883516766b762f6a0c530e95375 | [
"MIT"
] | 22 | 2020-09-22T01:06:47.000Z | 2022-01-26T14:20:09.000Z | from .base_chunk_collector import BaseChunkCollector
from collections import OrderedDict
from mltoolkit.mldp.utils.tools import DataChunk
import numpy as np
class UnitCollector(BaseChunkCollector):
"""Collects a fixed number of data-units, then starts yielding them."""
def __init__(self, max_size):
s... | 34.08642 | 76 | 0.596523 |
074013c839e98232d89d8cd87c8b97b465f8aba9 | 1,985 | py | Python | example/gbk2ig.py | GiugnoLab/PanDelo | 0aa4eb74c104be64e79138e902ce7dec84e01662 | [
"MIT"
] | 5 | 2018-12-12T13:34:26.000Z | 2022-03-03T00:26:54.000Z | example/gbk2ig.py | GiugnoLab/PanDelo | 0aa4eb74c104be64e79138e902ce7dec84e01662 | [
"MIT"
] | null | null | null | example/gbk2ig.py | GiugnoLab/PanDelo | 0aa4eb74c104be64e79138e902ce7dec84e01662 | [
"MIT"
] | 2 | 2020-01-12T19:26:00.000Z | 2020-03-11T20:05:23.000Z | #!/usr/bin/python3
import sys
from os import listdir
from os.path import isfile, join
import re
from Bio import SeqIO
genome_length = dict()
genome2cdstag = dict()
cdstag2genome = dict()
cdstag2product = dict()
cdsseqs = dict()
def read_gbk(ifile, genome_id):
print(genome_id)
genome_cdslist = genome2cdstag... | 31.015625 | 97 | 0.606045 |
887b9fea5b9474d31ec24fbd769b7fc9f1347a4a | 705 | py | Python | bootcamp/notifications/urls.py | gusbakker/bootcamp | 822140e5c2142c24ee226e2a1d59fcf413e771ad | [
"MIT"
] | 1 | 2021-03-12T15:40:29.000Z | 2021-03-12T15:40:29.000Z | bootcamp/notifications/urls.py | gusbakker/bootcamp | 822140e5c2142c24ee226e2a1d59fcf413e771ad | [
"MIT"
] | 3 | 2020-05-11T23:27:38.000Z | 2020-05-20T13:53:13.000Z | bootcamp/notifications/urls.py | gusbakker/bootcamp | 822140e5c2142c24ee226e2a1d59fcf413e771ad | [
"MIT"
] | 1 | 2020-10-01T22:27:21.000Z | 2020-10-01T22:27:21.000Z | from django.conf.urls import url
from bootcamp.notifications import views
app_name = "notifications"
urlpatterns = [
url(r"^$", views.NotificationUnreadListView.as_view(), name="unread"),
url(r"^mark-as-read/(?P<slug>[-\w]+)/$", views.mark_as_read, name="mark_as_read"),
url(r"^mark-as-read-ajax/$", views.... | 32.045455 | 86 | 0.66383 |
079a7ccc4491a860c0ba8d3fa61be901f12a8c5b | 241 | py | Python | authlib/jose/rfc7517/__init__.py | YPCrumble/authlib | 782a0fced780849418dc2a869528d10387e24b65 | [
"BSD-3-Clause"
] | 1 | 2020-08-04T08:29:39.000Z | 2020-08-04T08:29:39.000Z | authlib/jose/rfc7517/__init__.py | YPCrumble/authlib | 782a0fced780849418dc2a869528d10387e24b65 | [
"BSD-3-Clause"
] | 10 | 2020-09-30T05:41:05.000Z | 2021-11-03T08:55:31.000Z | authlib/jose/rfc7517/__init__.py | YPCrumble/authlib | 782a0fced780849418dc2a869528d10387e24b65 | [
"BSD-3-Clause"
] | 1 | 2020-07-28T17:05:40.000Z | 2020-07-28T17:05:40.000Z | """
authlib.jose.rfc7517
~~~~~~~~~~~~~~~~~~~~~
This module represents a direct implementation of
JSON Web Key (JWK).
https://tools.ietf.org/html/rfc7517
"""
from .models import Key, KeySet
__all__ = ['Key', 'KeySet']
| 17.214286 | 53 | 0.593361 |
01f98146f4c65f2070caf4af3b9d9a55426c16d3 | 2,325 | py | Python | homeassistant/components/notify/hangouts.py | XRyu/home-assistant | c9c707e368be159f0138a40d21fdea7a2a650ffe | [
"Apache-2.0"
] | 3 | 2019-01-31T13:41:37.000Z | 2020-05-20T14:22:18.000Z | homeassistant/components/notify/hangouts.py | XRyu/home-assistant | c9c707e368be159f0138a40d21fdea7a2a650ffe | [
"Apache-2.0"
] | null | null | null | homeassistant/components/notify/hangouts.py | XRyu/home-assistant | c9c707e368be159f0138a40d21fdea7a2a650ffe | [
"Apache-2.0"
] | 1 | 2021-05-31T08:13:56.000Z | 2021-05-31T08:13:56.000Z | """
Hangouts notification service.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/notify.hangouts/
"""
import logging
import voluptuous as vol
from homeassistant.components.notify import (ATTR_TARGET, PLATFORM_SCHEMA,
... | 33.695652 | 78 | 0.669677 |
90ea20d3a1e41814c1664989eb1e173bce6fbf21 | 1,559 | py | Python | plugins/dice.py | alissonlauffer/EduuRobot | ec6e43186c269ee090ed65722a9aa763e2d705fb | [
"MIT"
] | null | null | null | plugins/dice.py | alissonlauffer/EduuRobot | ec6e43186c269ee090ed65722a9aa763e2d705fb | [
"MIT"
] | null | null | null | plugins/dice.py | alissonlauffer/EduuRobot | ec6e43186c269ee090ed65722a9aa763e2d705fb | [
"MIT"
] | 1 | 2021-01-07T08:57:07.000Z | 2021-01-07T08:57:07.000Z | # Copyright (C) 2018-2020 Amano Team <contact@amanoteam.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, mod... | 48.71875 | 105 | 0.715202 |
d882d652a79fb9c6f47b0c22232a63d53dd17cfe | 2,051 | py | Python | python/sagemaker-multimodel-endpoint/examples/download_models.py | zaremb/aws-cdk-examples | 15df70601669504cec0cd62980bb73c955f9f779 | [
"Apache-2.0"
] | null | null | null | python/sagemaker-multimodel-endpoint/examples/download_models.py | zaremb/aws-cdk-examples | 15df70601669504cec0cd62980bb73c955f9f779 | [
"Apache-2.0"
] | null | null | null | python/sagemaker-multimodel-endpoint/examples/download_models.py | zaremb/aws-cdk-examples | 15df70601669504cec0cd62980bb73c955f9f779 | [
"Apache-2.0"
] | null | null | null | import requests
import os
import os.path
import tarfile
import shutil
resnet_18_params = (
"http://data.mxnet.io/models/imagenet/resnet/18-layers/resnet-18-0000.params"
)
resnet_18_symbols = (
"http://data.mxnet.io/models/imagenet/resnet/18-layers/resnet-18-symbol.json"
)
resnet_15_params = (
"http://data... | 33.622951 | 83 | 0.692833 |
514b729da09fcd2948bb18d663dfef1397bfd793 | 1,635 | py | Python | samples/core/visualization/table_test.py | rahulsmehta/pipelines | a0a8f1da8cb7ca53cde7717aa78e666b634fec75 | [
"Apache-2.0"
] | 2,860 | 2018-05-24T04:55:01.000Z | 2022-03-31T13:49:56.000Z | samples/core/visualization/table_test.py | rahulsmehta/pipelines | a0a8f1da8cb7ca53cde7717aa78e666b634fec75 | [
"Apache-2.0"
] | 7,331 | 2018-05-16T09:03:26.000Z | 2022-03-31T23:22:04.000Z | samples/core/visualization/table_test.py | rahulsmehta/pipelines | a0a8f1da8cb7ca53cde7717aa78e666b634fec75 | [
"Apache-2.0"
] | 1,359 | 2018-05-15T11:05:41.000Z | 2022-03-31T09:42:09.000Z | # Copyright 2021 The Kubeflow Authors
#
# 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... | 32.7 | 77 | 0.73945 |
f0b8183df83c1287da18244d3d02f50dee6a65f0 | 3,719 | py | Python | CLIMATExScience/air-pollution-index/data-cleaning/2017-Kedah.py | MY-Climate-Observatory/myco-data | 5203fa63c7ce609bbc9bbc4186f55da78befdc50 | [
"CC-BY-4.0"
] | null | null | null | CLIMATExScience/air-pollution-index/data-cleaning/2017-Kedah.py | MY-Climate-Observatory/myco-data | 5203fa63c7ce609bbc9bbc4186f55da78befdc50 | [
"CC-BY-4.0"
] | null | null | null | CLIMATExScience/air-pollution-index/data-cleaning/2017-Kedah.py | MY-Climate-Observatory/myco-data | 5203fa63c7ce609bbc9bbc4186f55da78befdc50 | [
"CC-BY-4.0"
] | 1 | 2021-12-16T04:56:09.000Z | 2021-12-16T04:56:09.000Z | # -*- coding: utf-8 -*-
"""
20 May 2020
Author: Xiandi Ooi
We will first download the file from the source.
Then, the data is organized to ease future analysis. Specific changes are as follows:
1. Datetime variable added;
2. Numerical API values are extracted;
3. Dominant pollutant type are extracted
"""
... | 41.322222 | 156 | 0.640764 |
f578d816f6c8f272f9de3a34f8647bf90c9fe461 | 11,886 | py | Python | wand/resource.py | sbraz/wand | 447ddb727c87b8329483ea5d6a70924345f6821e | [
"MIT"
] | null | null | null | wand/resource.py | sbraz/wand | 447ddb727c87b8329483ea5d6a70924345f6821e | [
"MIT"
] | null | null | null | wand/resource.py | sbraz/wand | 447ddb727c87b8329483ea5d6a70924345f6821e | [
"MIT"
] | null | null | null | """:mod:`wand.resource` --- Global resource management
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There is the global resource to manage in MagickWand API. This module
implements automatic global resource management through reference counting.
"""
import atexit
import contextlib
import ctypes
import warni... | 30.872727 | 79 | 0.62847 |
dbf3373dfe57bafb054426ad6c67ab31930533c6 | 67 | py | Python | Python/M01_ProgrammingBasics/L04_ForLoop/Lab/Solutions/P05_CharacterSequence.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L04_ForLoop/Lab/Solutions/P05_CharacterSequence.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | null | null | null | Python/M01_ProgrammingBasics/L04_ForLoop/Lab/Solutions/P05_CharacterSequence.py | todorkrastev/softuni-software-engineering | cfc0b5eaeb82951ff4d4668332ec3a31c59a5f84 | [
"MIT"
] | 1 | 2022-02-23T13:03:14.000Z | 2022-02-23T13:03:14.000Z | text = input()
for each in range(len(text)):
print(text[each]) | 16.75 | 29 | 0.641791 |
b47668af830a6b5dadf1b31239675796b5f02e99 | 1,166 | py | Python | src/checksheet.py | buddseye/gmapspot | 353d6a59eb435c2526bbb2eca22009e4ae657b50 | [
"MIT"
] | null | null | null | src/checksheet.py | buddseye/gmapspot | 353d6a59eb435c2526bbb2eca22009e4ae657b50 | [
"MIT"
] | 4 | 2020-05-16T04:48:20.000Z | 2021-06-02T01:50:12.000Z | src/checksheet.py | buddseye/gmapspot | 353d6a59eb435c2526bbb2eca22009e4ae657b50 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
import csv
from copy import deepcopy
from argparse import ArgumentParser
from util.data import read_csv_to_dict, match_import_data
OUTPUT_FIELDNAMES = [
"index",
"id",
"title",
"number",
"release",
"description",
]
def get_args(args):
parser = ArgumentP... | 22.423077 | 69 | 0.639794 |
0a6dd9d3cdbb004730229f323e6487be6b159371 | 3,089 | py | Python | instagram/migrations/0001_initial.py | EmmanuelWanzala/instagramm | d5496216fd7f688f7d97ea3e083b2726fd697f7e | [
"MIT"
] | null | null | null | instagram/migrations/0001_initial.py | EmmanuelWanzala/instagramm | d5496216fd7f688f7d97ea3e083b2726fd697f7e | [
"MIT"
] | null | null | null | instagram/migrations/0001_initial.py | EmmanuelWanzala/instagramm | d5496216fd7f688f7d97ea3e083b2726fd697f7e | [
"MIT"
] | null | null | null | # Generated by Django 3.1.2 on 2020-10-20 14:43
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
ope... | 47.523077 | 145 | 0.594691 |
11759d9e0370d6cb979fc1c92421291807e15aa0 | 17,199 | py | Python | tensorflow_federated/python/learning/framework/encoding_utils.py | zhihansh/federated-oss | 38cfcb05702ff7297db76d3ccb5f5afef53ca09b | [
"Apache-2.0"
] | 1 | 2022-02-08T01:11:14.000Z | 2022-02-08T01:11:14.000Z | tensorflow_federated/python/learning/framework/encoding_utils.py | zhihansh/federated-oss | 38cfcb05702ff7297db76d3ccb5f5afef53ca09b | [
"Apache-2.0"
] | null | null | null | tensorflow_federated/python/learning/framework/encoding_utils.py | zhihansh/federated-oss | 38cfcb05702ff7297db76d3ccb5f5afef53ca09b | [
"Apache-2.0"
] | null | null | null | # Copyright 2019, The TensorFlow Federated Authors.
#
# 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 o... | 43.105263 | 80 | 0.748125 |
9614375892ed30c779d95a3e4a36c6b324e68707 | 1,563 | py | Python | nvflare/app_common/abstract/shareable_generator.py | Can-Zhao/NVFlare | 52d9dee9972b32d49d9a8add52a652ce3bb878b5 | [
"Apache-2.0"
] | 155 | 2021-08-05T18:05:09.000Z | 2022-03-27T15:32:56.000Z | nvflare/app_common/abstract/shareable_generator.py | Can-Zhao/NVFlare | 52d9dee9972b32d49d9a8add52a652ce3bb878b5 | [
"Apache-2.0"
] | 216 | 2021-12-01T06:07:12.000Z | 2022-03-30T23:34:02.000Z | nvflare/app_common/abstract/shareable_generator.py | Can-Zhao/NVFlare | 52d9dee9972b32d49d9a8add52a652ce3bb878b5 | [
"Apache-2.0"
] | 44 | 2021-11-24T16:03:29.000Z | 2022-03-24T23:28:39.000Z | # Copyright (c) 2021-2022, NVIDIA CORPORATION. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | 29.490566 | 91 | 0.690979 |
6f70d1165dbd2f9680ce3a21b212bf433b63d0db | 2,370 | py | Python | rfmizer/action.py | JunglistMNSQ/rfm | f42fa1424edbc9c57c9cd27d8183574f72acbf5c | [
"BSD-3-Clause"
] | null | null | null | rfmizer/action.py | JunglistMNSQ/rfm | f42fa1424edbc9c57c9cd27d8183574f72acbf5c | [
"BSD-3-Clause"
] | 4 | 2021-06-04T23:58:19.000Z | 2021-09-22T19:38:00.000Z | rfmizer/action.py | JunglistMNSQ/rfm | f42fa1424edbc9c57c9cd27d8183574f72acbf5c | [
"BSD-3-Clause"
] | null | null | null | from django.db import connection
from re import sub
from .models import ActionLog, Rules, Tab, User
from .sms import RocketSMS
class BalanceExeption(Exception):
pass
class GetItems:
sender = None
@classmethod
def select_from_db(cls, _id):
with connection.cursor() as c:
c.execute... | 29.625 | 67 | 0.540084 |
1a759f24fbacbb23e6e3b76b5fca7d2c58b44904 | 1,761 | py | Python | initialarticle/forms.py | haykhman/online-newspaper | ebe38be63f3f037160532b33eb76bf9a22dbf171 | [
"MIT"
] | 1 | 2018-12-10T15:50:21.000Z | 2018-12-10T15:50:21.000Z | initialarticle/forms.py | haykhman/online-newspaper | ebe38be63f3f037160532b33eb76bf9a22dbf171 | [
"MIT"
] | null | null | null | initialarticle/forms.py | haykhman/online-newspaper | ebe38be63f3f037160532b33eb76bf9a22dbf171 | [
"MIT"
] | null | null | null | from django import forms
from django.utils.translation import gettext as _
from initialarticle.models import InitialArticle
from articlecategory.models import ArticleCategoryManager
class InitialArticleCreateForm(forms.Form):
def __init__(self, *args, **kwargs):
request = kwargs.pop('request')
s... | 50.314286 | 204 | 0.725156 |
87630da2e905446f96d47504ffd9e382e33b45e4 | 3,263 | py | Python | sdk/cognitiveservices/azure-cognitiveservices-search-autosuggest/setup.py | dubiety/azure-sdk-for-python | 62ffa839f5d753594cf0fe63668f454a9d87a346 | [
"MIT"
] | 1 | 2022-02-01T18:50:12.000Z | 2022-02-01T18:50:12.000Z | sdk/cognitiveservices/azure-cognitiveservices-search-autosuggest/setup.py | ellhe-blaster/azure-sdk-for-python | 82193ba5e81cc5e5e5a5239bba58abe62e86f469 | [
"MIT"
] | null | null | null | sdk/cognitiveservices/azure-cognitiveservices-search-autosuggest/setup.py | ellhe-blaster/azure-sdk-for-python | 82193ba5e81cc5e5e5a5239bba58abe62e86f469 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... | 33.639175 | 91 | 0.610175 |
d747389d125bd8f730a256a8adb1828ce25d87f0 | 8,946 | py | Python | fixture/contacts.py | PaulRumyantsev/python_QA | 3d6809e49c2522da8cd912d2fe6f790df4293f5d | [
"Apache-2.0"
] | null | null | null | fixture/contacts.py | PaulRumyantsev/python_QA | 3d6809e49c2522da8cd912d2fe6f790df4293f5d | [
"Apache-2.0"
] | null | null | null | fixture/contacts.py | PaulRumyantsev/python_QA | 3d6809e49c2522da8cd912d2fe6f790df4293f5d | [
"Apache-2.0"
] | null | null | null | from model.contacts import Contacts
import re
from selenium.webdriver.support.ui import Select
class ContactHelper:
def __init__(self, app):
self.app = app
def open_home_page(self):
wd = self.app.wd
if not (wd.current_url.endswith("/addressbook/") and len(wd.find_elements_by_name("add... | 42.398104 | 115 | 0.650347 |
bbbf032282bcd1ae49ca98936e58eeaf6c99e29c | 1,196 | py | Python | documentedlist/setup.py | djoshea/sphinxcontrib-matlabdomain | f1ae1e6defc206676d4490665c1cfcc4796b9df0 | [
"BSD-2-Clause"
] | 2 | 2017-04-25T17:00:35.000Z | 2021-02-14T03:57:16.000Z | documentedlist/setup.py | djoshea/sphinxcontrib-matlabdomain | f1ae1e6defc206676d4490665c1cfcc4796b9df0 | [
"BSD-2-Clause"
] | null | null | null | documentedlist/setup.py | djoshea/sphinxcontrib-matlabdomain | f1ae1e6defc206676d4490665c1cfcc4796b9df0 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import os
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
requires = ['Sphinx>=0.6']
setup(
name='sphinxcontrib-documentedlist',
version='0.3',
url='http://bitbucket.org/birkenfeld/sphinx-contrib... | 29.170732 | 76 | 0.651338 |
d48a244ea7d1d20767135e526fc8bf142e091cfb | 2,871 | py | Python | src/ewaluacja2021/migrations/0001_initial.py | iplweb/django-bpp | 85f183a99d8d5027ae4772efac1e4a9f21675849 | [
"BSD-3-Clause"
] | 1 | 2017-04-27T19:50:02.000Z | 2017-04-27T19:50:02.000Z | src/ewaluacja2021/migrations/0001_initial.py | mpasternak/django-bpp | 434338821d5ad1aaee598f6327151aba0af66f5e | [
"BSD-3-Clause"
] | 41 | 2019-11-07T00:07:02.000Z | 2022-02-27T22:09:39.000Z | src/ewaluacja2021/migrations/0001_initial.py | iplweb/bpp | f027415cc3faf1ca79082bf7bacd4be35b1a6fdf | [
"BSD-3-Clause"
] | null | null | null | # Generated by Django 3.0.14 on 2021-10-11 08:26
import django.db.models.deletion
from django.db import migrations, models
import ewaluacja2021.fields
class Migration(migrations.Migration):
initial = True
dependencies = [
("bpp", "0306_delete_ewaluacja2021liczbandlauczelni"),
]
operations... | 31.549451 | 86 | 0.405782 |
274bcff82164d9e3774bf1f0a6110319d1ec657f | 493 | py | Python | util/unormalize.py | pa0l09405/Master-Degree-Thesis | 2ee34da1e34d2ec6015456c691ef6624f3ebc622 | [
"BSD-3-Clause"
] | null | null | null | util/unormalize.py | pa0l09405/Master-Degree-Thesis | 2ee34da1e34d2ec6015456c691ef6624f3ebc622 | [
"BSD-3-Clause"
] | null | null | null | util/unormalize.py | pa0l09405/Master-Degree-Thesis | 2ee34da1e34d2ec6015456c691ef6624f3ebc622 | [
"BSD-3-Clause"
] | null | null | null | class UnNormalize(object):
def __init__(self, mean, std):
self.mean = mean
self.std = std
def __call__(self, tensor):
"""
Args:
tensor (Tensor): Tensor image of size (C, H, W) to be normalized.
Returns:
Tensor: Normalized image.
"""
... | 30.8125 | 77 | 0.537525 |
579bb6760eac6b22bae98934a77cda95b7152df3 | 863 | py | Python | python/slideshot0.py | jitterbugs/hashcode2019 | 1c82fb278a063aea4146f479218941f94fc42a38 | [
"Apache-2.0"
] | null | null | null | python/slideshot0.py | jitterbugs/hashcode2019 | 1c82fb278a063aea4146f479218941f94fc42a38 | [
"Apache-2.0"
] | null | null | null | python/slideshot0.py | jitterbugs/hashcode2019 | 1c82fb278a063aea4146f479218941f94fc42a38 | [
"Apache-2.0"
] | null | null | null | #!/bin/python3
def get_ordered_slides(photosH, photosV):
print(len(photosH) + len(photosV)//2)
for p in photosH:
print(p.id)
for i in range(0, len(photosV), 2):
print(photosV[i].id, photosV[i+1].id)
class Photo:
def __init__(self, _id, orientation, tags):
self.id = _id
... | 26.151515 | 58 | 0.565469 |
915603552aa694dbf46fb48f5724d9458c4863cb | 35,030 | py | Python | .history/neuroformer/model_perceiver_20220121144523.py | woanderer/neuroformer | df3462d55977b6c9adcb6753e7c474b8b76e8021 | [
"MIT"
] | null | null | null | .history/neuroformer/model_perceiver_20220121144523.py | woanderer/neuroformer | df3462d55977b6c9adcb6753e7c474b8b76e8021 | [
"MIT"
] | null | null | null | .history/neuroformer/model_perceiver_20220121144523.py | woanderer/neuroformer | df3462d55977b6c9adcb6753e7c474b8b76e8021 | [
"MIT"
] | null | null | null | # from code.transformer_vid.utils import convert_weights
# import rotary_embedding_torch
from torch.nn.modules.activation import GELU, ReLU
# from data.OneCombo3.trainer import TrainerConfig
import math
import numpy as np
import itertools
import logging
import torch
import torch.nn as nn
from torch.nn import functiona... | 39.2713 | 139 | 0.581673 |
523374f885db97f70d2de29f35780ae6c92b58e0 | 2,164 | py | Python | networks/encoder.py | Lnna/OpenNRE-PyTorch | 907026a8bece7a867558087131cd1e97d41eb3f2 | [
"MIT"
] | 1 | 2019-08-23T09:06:56.000Z | 2019-08-23T09:06:56.000Z | networks/encoder.py | Lnna/OpenNRE-PyTorch | 907026a8bece7a867558087131cd1e97d41eb3f2 | [
"MIT"
] | null | null | null | networks/encoder.py | Lnna/OpenNRE-PyTorch | 907026a8bece7a867558087131cd1e97d41eb3f2 | [
"MIT"
] | null | null | null | import torch
import torch.autograd as autograd
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
from torch.autograd import Variable
class _CNN(nn.Module):
def __init__(self, config):
super(_CNN, self).__init__()
self.config = config
self.in_channels = 1
self.in_height = self.c... | 30.055556 | 104 | 0.715342 |
471acd91609438b556e2b1c570d719feeb427d6a | 2,695 | py | Python | item_synchronizer/helpers.py | bergercookie/item_synchronizer | 8d4c69af68bc1658b0f0a43de683f1ca132ace58 | [
"MIT"
] | 2 | 2021-11-26T22:41:36.000Z | 2021-12-06T01:23:20.000Z | item_synchronizer/helpers.py | bergercookie/item_synchronizer | 8d4c69af68bc1658b0f0a43de683f1ca132ace58 | [
"MIT"
] | null | null | null | item_synchronizer/helpers.py | bergercookie/item_synchronizer | 8d4c69af68bc1658b0f0a43de683f1ca132ace58 | [
"MIT"
] | null | null | null | """Helper functions and classes"""
from dataclasses import dataclass, field
from typing import MutableMapping, Set
from item_synchronizer.types import ID, DeleterFn, ItemGetterFn
@dataclass
class SideChanges:
"""Hold the items that are new, modified or deleted compared to the previous run.
The items related... | 28.368421 | 95 | 0.601484 |
dc69723dcd6f8188a4d459923b079f5464ab4239 | 16,297 | py | Python | CIFAR_main.py | InCogNiTo124/invertible-resnet | 630e886bcd50cc21dee0769d1a5b35100d3ff569 | [
"MIT"
] | 476 | 2019-06-06T00:46:03.000Z | 2022-03-28T15:14:28.000Z | CIFAR_main.py | ChaeJeongLee/invertible-resnet | 630e886bcd50cc21dee0769d1a5b35100d3ff569 | [
"MIT"
] | 24 | 2019-06-08T10:00:04.000Z | 2022-03-11T23:49:33.000Z | CIFAR_main.py | ChaeJeongLee/invertible-resnet | 630e886bcd50cc21dee0769d1a5b35100d3ff569 | [
"MIT"
] | 78 | 2019-06-06T08:00:48.000Z | 2022-03-08T13:16:31.000Z | """
Code for "Invertible Residual Networks"
http://proceedings.mlr.press/v97/behrmann19a.html
ICML, 2019
"""
import torch
import torch.backends.cudnn as cudnn
import torch.optim as optim
from torch.autograd import Variable
import numpy as np
import torchvision
import torchvision.transforms as transforms
import visdom
... | 45.522346 | 125 | 0.627048 |
d9ad018f7887ba0234d2531cda590e4ead0103ed | 76,539 | py | Python | meshtastic/mesh_pb2.py | astryzia/Meshtastic-python | 55b9ab8bf10522dc82fa3eb49e356c6c1b80eb31 | [
"Apache-2.0"
] | null | null | null | meshtastic/mesh_pb2.py | astryzia/Meshtastic-python | 55b9ab8bf10522dc82fa3eb49e356c6c1b80eb31 | [
"Apache-2.0"
] | null | null | null | meshtastic/mesh_pb2.py | astryzia/Meshtastic-python | 55b9ab8bf10522dc82fa3eb49e356c6c1b80eb31 | [
"Apache-2.0"
] | 1 | 2021-12-24T22:44:03.000Z | 2021-12-24T22:44:03.000Z | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: mesh.proto
"""Generated protocol buffer code."""
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf ... | 44.03855 | 7,367 | 0.746404 |
d61ea8fd3f4d975ecdefbac4980c06818afcf9b3 | 84 | py | Python | Uh-OH/backend/scrape/apps.py | SamR71/Office-Hours | 912fe67d67a810656d6aeb0c4a363b0473cf76e7 | [
"MIT"
] | 5 | 2020-01-25T20:15:08.000Z | 2020-01-25T20:39:21.000Z | Uh-OH/backend/scrape/apps.py | SamR71/Office-Hours | 912fe67d67a810656d6aeb0c4a363b0473cf76e7 | [
"MIT"
] | 39 | 2020-02-12T22:29:32.000Z | 2022-02-26T23:21:18.000Z | Uh-OH/backend/scrape/apps.py | SamR71/Office-Hours | 912fe67d67a810656d6aeb0c4a363b0473cf76e7 | [
"MIT"
] | null | null | null | from django.apps import AppConfig
class ScrapeConfig(AppConfig):
name = 'scrape'
| 14 | 33 | 0.77381 |
3eb2ede24bb76429bff3b068c3078294b1dbd2e6 | 17 | py | Python | pharmpy/__init__.py | mederrata/pharmpy | e523abd325d29369f8fbcf705d84a5d7c60534bb | [
"Apache-2.0"
] | 14 | 2019-08-23T17:55:57.000Z | 2022-03-29T13:37:20.000Z | pharmpy/__init__.py | paulzuradzki/pharmpy | e523abd325d29369f8fbcf705d84a5d7c60534bb | [
"Apache-2.0"
] | 2 | 2020-10-26T01:15:01.000Z | 2020-10-31T13:53:27.000Z | pharmpy/__init__.py | paulzuradzki/pharmpy | e523abd325d29369f8fbcf705d84a5d7c60534bb | [
"Apache-2.0"
] | 7 | 2020-07-26T18:40:31.000Z | 2021-06-25T08:55:58.000Z | name = "pharmpy"
| 8.5 | 16 | 0.647059 |
67ae4b2e07e404852cf107b4e932c74617ebe93a | 165 | py | Python | src/compas_viewers/meshviewer/__init__.py | GeneKao/compas_viewers | 6ccaa058de176478a131c54d91c4c6e2dcd52a88 | [
"MIT"
] | 5 | 2019-12-02T09:20:58.000Z | 2020-09-05T20:00:44.000Z | src/compas_viewers/meshviewer/__init__.py | GeneKao/compas_viewers | 6ccaa058de176478a131c54d91c4c6e2dcd52a88 | [
"MIT"
] | 8 | 2019-11-24T18:32:17.000Z | 2020-11-18T13:18:04.000Z | src/compas_viewers/meshviewer/__init__.py | GeneKao/compas_viewers | 6ccaa058de176478a131c54d91c4c6e2dcd52a88 | [
"MIT"
] | 4 | 2019-11-29T10:21:56.000Z | 2020-08-08T16:53:27.000Z | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
from .app import MeshViewer
__all__ = ['MeshViewer']
| 18.333333 | 38 | 0.830303 |
371abf9e22f2e6b7d5ade6f5109acfa912f35bd4 | 2,065 | py | Python | ndh/models.py | nim65s/ndh | 4945bf1f0f59bd08bdd04dd2640b3e9759fa6774 | [
"BSD-2-Clause"
] | null | null | null | ndh/models.py | nim65s/ndh | 4945bf1f0f59bd08bdd04dd2640b3e9759fa6774 | [
"BSD-2-Clause"
] | 25 | 2017-09-23T11:22:00.000Z | 2022-03-14T19:48:22.000Z | ndh/models.py | nim65s/ndh | 4945bf1f0f59bd08bdd04dd2640b3e9759fa6774 | [
"BSD-2-Clause"
] | null | null | null | """Helpers for models."""
from typing import Any
from django.db import models
from django.urls import reverse
from django.utils.safestring import mark_safe
from autoslug import AutoSlugField # type: ignore
from .querysets import NameOrderedQuerySet
from .utils import full_url
class Links:
"""A mixin to get li... | 25.8125 | 75 | 0.610654 |
6778149e2bf0f6fb343e5b0f3624ee58467218c0 | 2,906 | py | Python | python/paddle/static/__init__.py | LWhite027/PaddleBox | b14bcdf285dd8829e11ab12cc815ac1b1ab62694 | [
"Apache-2.0"
] | 10 | 2021-05-12T07:20:32.000Z | 2022-03-04T08:21:56.000Z | python/paddle/static/__init__.py | AFLee/Paddle | 311b3b44fc7d51d4d66d90ab8a3fc0d42231afda | [
"Apache-2.0"
] | 1 | 2021-01-07T11:00:58.000Z | 2021-01-07T11:00:58.000Z | python/paddle/static/__init__.py | AFLee/Paddle | 311b3b44fc7d51d4d66d90ab8a3fc0d42231afda | [
"Apache-2.0"
] | 18 | 2021-05-19T08:01:49.000Z | 2022-02-11T03:11:32.000Z | # Copyright (c) 2020 PaddlePaddle Authors. 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 app... | 50.103448 | 80 | 0.789057 |
337b6fc5665b5bcd3901ea94db3424f4ee264755 | 3,884 | py | Python | kaixiang/settings.py | zhangpotato/kx_backmanage | 5a484c19616a77a75698f63b8fa220ee027c0c17 | [
"Apache-2.0"
] | null | null | null | kaixiang/settings.py | zhangpotato/kx_backmanage | 5a484c19616a77a75698f63b8fa220ee027c0c17 | [
"Apache-2.0"
] | null | null | null | kaixiang/settings.py | zhangpotato/kx_backmanage | 5a484c19616a77a75698f63b8fa220ee027c0c17 | [
"Apache-2.0"
] | null | null | null | """
Django settings for kaixiang project.
Generated by 'django-admin startproject' using Django 2.1.1.
For more information on this file, see
https://docs.djangoproject.com/en/2.1/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.1/ref/settings/
"""
import os
... | 26.421769 | 91 | 0.667611 |
fdcd4f78a215eb76ccdbddfc02f5cf96f2bce1b6 | 3,976 | py | Python | examples/chaos_pendulum/chaos_pendulum.py | JanMV/pydy | 22c6a3965853bb3641c63e493717976d775034e2 | [
"BSD-3-Clause"
] | 298 | 2015-01-31T11:43:22.000Z | 2022-03-15T02:18:21.000Z | examples/chaos_pendulum/chaos_pendulum.py | JanMV/pydy | 22c6a3965853bb3641c63e493717976d775034e2 | [
"BSD-3-Clause"
] | 359 | 2015-01-17T16:56:42.000Z | 2022-02-08T05:27:08.000Z | examples/chaos_pendulum/chaos_pendulum.py | JanMV/pydy | 22c6a3965853bb3641c63e493717976d775034e2 | [
"BSD-3-Clause"
] | 109 | 2015-02-03T13:02:45.000Z | 2021-12-21T12:57:21.000Z | #!/usr/bin/env python
# This script generates the equations of motion for a double pendulum where the
# bob rotates about the pendulum rod. It can be shown to be chaotic when
# simulated.
# import sympy and the mechanics module
import numpy as np
import matplotlib.pyplot as plt
import sympy as sym
import sympy.physic... | 26.684564 | 79 | 0.614185 |
021e1a9f2fff4df3920edbf5bf3da20eac8eef2a | 1,936 | py | Python | config/wsgi.py | zee93/dex_lab | 1884c0cbeb4320eb08eb23eb8b92b92ebd50701c | [
"MIT"
] | 1 | 2021-05-11T21:30:57.000Z | 2021-05-11T21:30:57.000Z | config/wsgi.py | zee93/dex_lab | 1884c0cbeb4320eb08eb23eb8b92b92ebd50701c | [
"MIT"
] | null | null | null | config/wsgi.py | zee93/dex_lab | 1884c0cbeb4320eb08eb23eb8b92b92ebd50701c | [
"MIT"
] | null | null | null | """
WSGI config for Dexter Django Lab project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPL... | 44 | 79 | 0.795455 |
5a8738d5aa97253f5f211442934d2e052cbf2f59 | 2,040 | py | Python | tests/test.py | ice1x/prefix_tree | 299c530838ede8317ac35f14ce5a1e13d139b855 | [
"Apache-2.0"
] | null | null | null | tests/test.py | ice1x/prefix_tree | 299c530838ede8317ac35f14ce5a1e13d139b855 | [
"Apache-2.0"
] | null | null | null | tests/test.py | ice1x/prefix_tree | 299c530838ede8317ac35f14ce5a1e13d139b855 | [
"Apache-2.0"
] | null | null | null | import unittest
from src.prefix_tree.trie import Trie
IVAN_31_TT = {
'name': 'иван',
'age': 31,
'gender': True,
'type': True
}
IRINA_23_FT = {
'name': 'ирина',
'age': 23,
'gender': False,
'type': True
}
IO_3_TT = {
'name': 'ио',
... | 22.417582 | 85 | 0.509804 |
89ff9bc35f192a736d8db751ef84ccecc03c277f | 239 | py | Python | tests/test_api/test_auth/test_authentication/base/__init__.py | Max-Zhenzhera/my_vocab_backend | f93d0c7c7f4a45fce47eb7ce74cfcda195b13a72 | [
"MIT"
] | 1 | 2021-11-18T16:25:22.000Z | 2021-11-18T16:25:22.000Z | tests/test_api/test_auth/test_authentication/base/__init__.py | Max-Zhenzhera/my_vocab_backend | f93d0c7c7f4a45fce47eb7ce74cfcda195b13a72 | [
"MIT"
] | null | null | null | tests/test_api/test_auth/test_authentication/base/__init__.py | Max-Zhenzhera/my_vocab_backend | f93d0c7c7f4a45fce47eb7ce74cfcda195b13a72 | [
"MIT"
] | null | null | null | from .terminating_refresh_session_route import BaseTestTerminatingRefreshSessionRoute
from .user_creation_route import BaseTestUserCreationRoute
__all__ = [
'BaseTestTerminatingRefreshSessionRoute',
'BaseTestUserCreationRoute'
]
| 26.555556 | 85 | 0.857741 |
14cb3be55357a5a787421a51e08f3f8d7320359a | 33,460 | py | Python | ska-tmc/ska-dish-master-mid/src/ska_dish_master_mid/dish_master_behaviour.py | ska-telescope/tmc-prototype | 4138274e933d4b05f7fe9fc34a11c417b6d0d336 | [
"BSD-3-Clause"
] | 3 | 2019-01-10T11:49:36.000Z | 2019-07-19T03:32:52.000Z | ska-tmc/ska-dish-master-mid/src/ska_dish_master_mid/dish_master_behaviour.py | ska-telescope/tmc-prototype | 4138274e933d4b05f7fe9fc34a11c417b6d0d336 | [
"BSD-3-Clause"
] | 19 | 2019-01-07T14:50:26.000Z | 2019-10-02T13:25:23.000Z | ska-tmc/ska-dish-master-mid/src/ska_dish_master_mid/dish_master_behaviour.py | ska-telescope/tmc-prototype | 4138274e933d4b05f7fe9fc34a11c417b6d0d336 | [
"BSD-3-Clause"
] | 1 | 2018-12-21T13:39:23.000Z | 2018-12-21T13:39:23.000Z | # -*- coding: utf-8 -*-
"""
override class with command handlers for dsh-lmc.
"""
# Standard python imports
import enum
import logging
from collections import namedtuple
# Tango import
from tango import DevState, Except, ErrSeverity
# Additional import
from ska_ser_logging import configure_logging
configure_logging... | 42.787724 | 112 | 0.652421 |
32d547b799ed54b3367d4da0803a7ac95a156b2d | 8,453 | py | Python | bika/lims/browser/reports/productivity_analysesperformedpertotal.py | hocinebendou/bika.gsoc | 85bc0c587de7f52073ae0e89bddbc77bf875f295 | [
"MIT"
] | null | null | null | bika/lims/browser/reports/productivity_analysesperformedpertotal.py | hocinebendou/bika.gsoc | 85bc0c587de7f52073ae0e89bddbc77bf875f295 | [
"MIT"
] | null | null | null | bika/lims/browser/reports/productivity_analysesperformedpertotal.py | hocinebendou/bika.gsoc | 85bc0c587de7f52073ae0e89bddbc77bf875f295 | [
"MIT"
] | null | null | null | from Products.CMFCore.utils import getToolByName
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from bika.lims import bikaMessageFactory as _
from bika.lims.browser import BrowserView
from bika.lims.browser.reports.selection_macros import SelectionMacrosView
from plone.app.layout.globals.interf... | 44.026042 | 88 | 0.572814 |
9e9ff814bf1199394d4aeebff9a51b1443230c79 | 439 | py | Python | package_name/module.py | EmilRamsvik/DataPlot | eead77dd20197952f26e13abcd4288b05abf4dba | [
"MIT"
] | null | null | null | package_name/module.py | EmilRamsvik/DataPlot | eead77dd20197952f26e13abcd4288b05abf4dba | [
"MIT"
] | 1 | 2021-10-03T16:00:30.000Z | 2021-10-03T16:01:51.000Z | package_name/module.py | EmilRamsvik/DataPlot | eead77dd20197952f26e13abcd4288b05abf4dba | [
"MIT"
] | null | null | null | """
Module provides a simple cubic_rectification function.
"""
import numpy as np
import pandas as pd
# plotting tools
import plotly
import plotly.express as px
# import matplotlib.pyplot as plt
import plotly.figure_factory as ff
import plotly.graph_objects as go
class Layout:
def __init__(self):
pass
... | 15.678571 | 54 | 0.710706 |
342790f3e1859ece20ca94c4821423036d5968dd | 639 | py | Python | tests/unit/xgb/__init__.py | mikemckiernan/models | 674a3edf14c62bf0d5490f5433eed15abec416f8 | [
"Apache-2.0"
] | null | null | null | tests/unit/xgb/__init__.py | mikemckiernan/models | 674a3edf14c62bf0d5490f5433eed15abec416f8 | [
"Apache-2.0"
] | 1 | 2022-03-08T13:41:41.000Z | 2022-03-15T17:42:08.000Z | tests/unit/xgb/__init__.py | mikemckiernan/models | 674a3edf14c62bf0d5490f5433eed15abec416f8 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2021, NVIDIA 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 ... | 31.95 | 74 | 0.757433 |
f1db81addee468d94e7f0bc6e478d634e1878bec | 626 | py | Python | parquet_integration/bench_read.py | ives9638/arrow2 | b86508e67ca4b08c4544626f7bbe55cf5bd02961 | [
"Apache-2.0"
] | 1 | 2022-02-20T00:10:06.000Z | 2022-02-20T00:10:06.000Z | parquet_integration/bench_read.py | ives9638/arrow2 | b86508e67ca4b08c4544626f7bbe55cf5bd02961 | [
"Apache-2.0"
] | null | null | null | parquet_integration/bench_read.py | ives9638/arrow2 | b86508e67ca4b08c4544626f7bbe55cf5bd02961 | [
"Apache-2.0"
] | null | null | null | import timeit
import io
import pyarrow.parquet
def bench(log2_size: int, datatype: str):
with open(f"fixtures/pyarrow3/v1/benches_{2**log2_size}.parquet", "rb") as f:
data = f.read()
data = io.BytesIO(data)
def f():
pyarrow.parquet.read_table(data, columns=[datatype])
seconds = time... | 23.185185 | 81 | 0.629393 |
b20de80e6da6837d61cd84cbe13d6eb832469068 | 17,240 | py | Python | tests/test_strings.py | MadyDixit/algorithms | 76b0dafce7fd788651f23dba92bae4c19a822f5f | [
"MIT"
] | 1 | 2020-02-21T13:12:00.000Z | 2020-02-21T13:12:00.000Z | tests/test_strings.py | XZYCR7/algorithms-3 | 38173ae71780f0cb7f44373867a2ec559b239056 | [
"MIT"
] | 27 | 2020-02-21T14:02:28.000Z | 2020-02-27T12:21:42.000Z | tests/test_strings.py | XZYCR7/algorithms-3 | 38173ae71780f0cb7f44373867a2ec559b239056 | [
"MIT"
] | 1 | 2020-10-26T00:43:44.000Z | 2020-10-26T00:43:44.000Z | from algorithms.strings import (
add_binary,
match_symbol, match_symbol_1, bracket,
decode_string,
delete_reoccurring_characters,
domain_name_1, domain_name_2,
encode, decode,
group_anagrams,
int_to_roman,
is_palindrome, is_palindrome_reverse,
is_palindrome_two_pointer, is_palind... | 31.345455 | 120 | 0.642285 |
3ef928db56f0ad2f1f67a8e2266fdd8ca0b8c515 | 497 | py | Python | ryanthtrablog/posts/models.py | ryanthtra/ryanthtra-blog | 6df889e3f58635309ae44614154ef3d810a923b9 | [
"MIT"
] | null | null | null | ryanthtrablog/posts/models.py | ryanthtra/ryanthtra-blog | 6df889e3f58635309ae44614154ef3d810a923b9 | [
"MIT"
] | null | null | null | ryanthtrablog/posts/models.py | ryanthtra/ryanthtra-blog | 6df889e3f58635309ae44614154ef3d810a923b9 | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
class Post(models.Model):
title = models.CharField(max_length = 255)
publish_date = models.DateTimeField()
image = models.ImageField(upload_to='media/')
body = models.TextField()
# Custom title for post object in admin
def __str__(self):
return s... | 26.157895 | 49 | 0.716298 |
c46108b28b4d4a1fa9a465094c0ce5f48adfb6c3 | 318,468 | py | Python | languages/es.py | ptressel/sahana-eden-madpub | b16418b36d0fb781fd045f7e7edd1a30259a1f35 | [
"MIT"
] | 1 | 2016-01-01T12:22:48.000Z | 2016-01-01T12:22:48.000Z | languages/es.py | ptressel/sahana-eden-madpub | b16418b36d0fb781fd045f7e7edd1a30259a1f35 | [
"MIT"
] | null | null | null | languages/es.py | ptressel/sahana-eden-madpub | b16418b36d0fb781fd045f7e7edd1a30259a1f35 | [
"MIT"
] | 1 | 2020-04-29T13:58:31.000Z | 2020-04-29T13:58:31.000Z | # coding: utf8
{
' (leave empty to detach account)': ' (leave empty to detach account)',
' Source Type': ' Tipo de Fuente',
' by ': 'por ',
' is envisioned to be composed of several sub-modules that work together to provide complex functionality for the management of relief and project items by an organization. Th... | 63.414576 | 1,127 | 0.741261 |
c4953b074826ea3b2d92d4e48c9d4ccb1547c9a1 | 4,662 | py | Python | timesketch/lib/analyzers/yetiindicators.py | rgayon/timesketch | 5b055a580652b85c594b7383ef3c7747ba956b4f | [
"Apache-2.0"
] | 4 | 2018-11-01T16:13:31.000Z | 2022-03-18T12:09:25.000Z | timesketch/lib/analyzers/yetiindicators.py | rgayon/timesketch | 5b055a580652b85c594b7383ef3c7747ba956b4f | [
"Apache-2.0"
] | null | null | null | timesketch/lib/analyzers/yetiindicators.py | rgayon/timesketch | 5b055a580652b85c594b7383ef3c7747ba956b4f | [
"Apache-2.0"
] | 1 | 2021-11-16T00:01:18.000Z | 2021-11-16T00:01:18.000Z | """Index analyzer plugin for Yeti indicators."""
from __future__ import unicode_literals
import re
from flask import current_app
import requests
from timesketch.lib.analyzers import interface
from timesketch.lib.analyzers import manager
from timesketch.lib import emojis
class YetiIndicators(interface.BaseSketchAna... | 35.318182 | 80 | 0.578936 |
d50ecfa3738fb2256bd18f22e9893a672dccd33c | 14,988 | py | Python | mcpAlgorithm.py | octeufer/Annotate_Optimize | 32d9cecc0159882d3f962990aba07168c4a023f5 | [
"Apache-2.0"
] | null | null | null | mcpAlgorithm.py | octeufer/Annotate_Optimize | 32d9cecc0159882d3f962990aba07168c4a023f5 | [
"Apache-2.0"
] | null | null | null | mcpAlgorithm.py | octeufer/Annotate_Optimize | 32d9cecc0159882d3f962990aba07168c4a023f5 | [
"Apache-2.0"
] | null | null | null | '''
Author:Octeufer
2014/1/10
'''
import random
import hashlib
import numpy as np
class greedymcp:
def __init__(self):
pass
def FindMaxClique(self,graph,maxTime,targetCliqueSize):
clique = list()
time = 0
timeBestClique = 0
timeRestart = 0
... | 39.03125 | 186 | 0.522618 |
a6d3862b6c91c441db2cc4780ee37ed4552fb11e | 1,702 | py | Python | nexus_constructor/geometry/disk_chopper/chopper_details.py | trnielsen/nexus-constructor | 65efb6eedca30250b75f142dd29a46bc909958df | [
"BSD-2-Clause"
] | null | null | null | nexus_constructor/geometry/disk_chopper/chopper_details.py | trnielsen/nexus-constructor | 65efb6eedca30250b75f142dd29a46bc909958df | [
"BSD-2-Clause"
] | null | null | null | nexus_constructor/geometry/disk_chopper/chopper_details.py | trnielsen/nexus-constructor | 65efb6eedca30250b75f142dd29a46bc909958df | [
"BSD-2-Clause"
] | null | null | null | import numpy as np
from nexus_constructor.unit_utils import (
calculate_unit_conversion_factor,
RADIANS,
METRES,
)
TWO_PI = np.pi * 2
class ChopperDetails:
def __init__(
self,
slits: int,
slit_edges: np.ndarray,
radius: float,
slit_height: float,
angle... | 28.847458 | 88 | 0.656287 |
df8f11ed59627f70424c789949c107046871e1d0 | 748 | py | Python | cboard/cboard/urls.py | darjeeling/cboard | 2050be5878f3a8e8da4fc6b1a5e196d7a9715123 | [
"Apache-2.0"
] | null | null | null | cboard/cboard/urls.py | darjeeling/cboard | 2050be5878f3a8e8da4fc6b1a5e196d7a9715123 | [
"Apache-2.0"
] | null | null | null | cboard/cboard/urls.py | darjeeling/cboard | 2050be5878f3a8e8da4fc6b1a5e196d7a9715123 | [
"Apache-2.0"
] | null | null | null | """cboard URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/2.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based ... | 34 | 77 | 0.708556 |
c8a5277f95b8bd079d73a984bfce40fdacec517b | 1,772 | py | Python | aliyun-python-sdk-ccc/aliyunsdkccc/request/v20200701/AddPersonalNumbersToUserRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-ccc/aliyunsdkccc/request/v20200701/AddPersonalNumbersToUserRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | null | null | null | aliyun-python-sdk-ccc/aliyunsdkccc/request/v20200701/AddPersonalNumbersToUserRequest.py | yndu13/aliyun-openapi-python-sdk | 12ace4fb39fe2fb0e3927a4b1b43ee4872da43f5 | [
"Apache-2.0"
] | null | null | null | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | 35.44 | 77 | 0.765801 |
58ac32faa90819da860b11701e94019fa979a8c3 | 4,080 | py | Python | code/data_processing.py | porcelluscavia/project-callihan-tureski | e0dcd2c4972cf12c03bd4dad7aef9cd0bb6f8587 | [
"MIT"
] | 1 | 2020-03-07T11:16:13.000Z | 2020-03-07T11:16:13.000Z | code/data_processing.py | porcelluscavia/project-callihan-tureski | e0dcd2c4972cf12c03bd4dad7aef9cd0bb6f8587 | [
"MIT"
] | null | null | null | code/data_processing.py | porcelluscavia/project-callihan-tureski | e0dcd2c4972cf12c03bd4dad7aef9cd0bb6f8587 | [
"MIT"
] | 1 | 2020-06-02T09:57:41.000Z | 2020-06-02T09:57:41.000Z | from nltk.corpus import stopwords
from nltk.stem.wordnet import WordNetLemmatizer
import string
from gensim import corpora
import os
import numpy as np
from chinese_processing import ChineseStopwords
import logging
def load_texts_from_directory(path_to_documents, subset=None):
"""
Loads all .txt files from di... | 34.871795 | 113 | 0.588725 |
b970bd910601b707fe4f8f5f4bc6bb2dae2ef5de | 667 | py | Python | libs/template_exception/template_exception/rbac.py | 1995chen/python-common-libs | dcf36376ae244426fb8da5b76b96fe8e0c3911af | [
"MIT"
] | null | null | null | libs/template_exception/template_exception/rbac.py | 1995chen/python-common-libs | dcf36376ae244426fb8da5b76b96fe8e0c3911af | [
"MIT"
] | null | null | null | libs/template_exception/template_exception/rbac.py | 1995chen/python-common-libs | dcf36376ae244426fb8da5b76b96fe8e0c3911af | [
"MIT"
] | null | null | null | # -*- coding: UTF-8 -*-
from typing import List
from .base import SSOException
class AuthorizedFailException(SSOException):
"""
认证失败
"""
pass
class TokenInvalidException(SSOException):
"""
异常的Token
"""
pass
class SSOServerException(SSOException):
"""
SSO服务异常
"""
... | 14.822222 | 72 | 0.629685 |
b59c4fd26930fce881c73300486a70cca060f879 | 678 | py | Python | resources/lib/core/zbextension.py | adamprice2/ZattooBox | aae55c23f429bd6c0924a35c0e120b08df8d78f6 | [
"BSD-2-Clause"
] | 37 | 2015-01-22T15:43:36.000Z | 2021-03-03T13:42:24.000Z | resources/lib/core/zbextension.py | adamprice2/ZattooBox | aae55c23f429bd6c0924a35c0e120b08df8d78f6 | [
"BSD-2-Clause"
] | 48 | 2015-01-04T15:23:07.000Z | 2022-02-15T02:28:18.000Z | resources/lib/core/zbextension.py | adamprice2/ZattooBox | aae55c23f429bd6c0924a35c0e120b08df8d78f6 | [
"BSD-2-Clause"
] | 24 | 2015-02-17T12:38:25.000Z | 2021-03-01T11:31:54.000Z | # coding=utf-8
##################################
# ZattooBox extensions
# Base Class
# (c) 2014-2020 Pascal Nançoz
##################################
import os
class ZBExtension(object):
ZapiSession = None
ZBProxy = None
ExtensionsPath = None
def __init__(self, zapiSession, zbProxy):
self.ZapiSession = zapiS... | 20.545455 | 86 | 0.672566 |
05fa40efc53d2b7a0f6ffdaeea9b1b7f65a1938f | 741 | py | Python | vectors/cryptography_vectors/__about__.py | wdscxsj/cryptography | 94590a9aecc9e5ef6fc8eda52bae43643a4c44bd | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 2 | 2015-10-08T21:28:42.000Z | 2020-08-15T10:03:49.000Z | vectors/cryptography_vectors/__about__.py | wdscxsj/cryptography | 94590a9aecc9e5ef6fc8eda52bae43643a4c44bd | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 99 | 2021-02-13T23:35:41.000Z | 2022-03-31T03:09:24.000Z | vectors/cryptography_vectors/__about__.py | wdscxsj/cryptography | 94590a9aecc9e5ef6fc8eda52bae43643a4c44bd | [
"PSF-2.0",
"Apache-2.0",
"BSD-3-Clause"
] | 3 | 2016-04-11T20:22:38.000Z | 2018-09-20T20:39:54.000Z | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
__all__ = [
"__title__",
"__summary__",
"__uri__",
"__version__",
"__author__",
"__email__",
"__license__",
... | 26.464286 | 79 | 0.723347 |
2553cf69fd467d6e33065ec1a0e96600b615ff3c | 1,310 | py | Python | python3.7/cookiecutter-aws-sam-eventBridge-python/{{cookiecutter.project_name}}/hello_world/app.py | tgpadua/aws-sam-cli-app-templates | 2feaee402ad7376e1ca0b2f9126831cd67171df5 | [
"Apache-2.0"
] | 1 | 2020-08-14T16:09:58.000Z | 2020-08-14T16:09:58.000Z | python3.7/cookiecutter-aws-sam-eventBridge-python/{{cookiecutter.project_name}}/hello_world/app.py | johnjdailey/aws-sam-cli-app-templates | 58d91ed5820072d8a60c02d0c5b6410f5ab8193b | [
"Apache-2.0"
] | 3 | 2021-06-02T00:50:23.000Z | 2021-06-22T13:00:57.000Z | python3.7/cookiecutter-aws-sam-eventBridge-python/{{cookiecutter.project_name}}/hello_world/app.py | johnjdailey/aws-sam-cli-app-templates | 58d91ed5820072d8a60c02d0c5b6410f5ab8193b | [
"Apache-2.0"
] | null | null | null | # import requests
from model.aws.ec2 import Marshaller
from model.aws.ec2 import AWSEvent
from model.aws.ec2.ec2_instance_state_change_notification import EC2InstanceStateChangeNotification
def lambda_handler(event, context):
"""Sample Lambda function reacting to EventBridge events
Parameters
----------... | 32.75 | 120 | 0.748092 |
a1c35b3bace17b0c8572f259295a7518261ba059 | 540 | py | Python | cat/udl/tennis/ScoreMessage.py | ratchetmdt/internationalization-python | fb33e3ee2d5c7eeca7ae3977b20d27444533aa6d | [
"Apache-2.0"
] | null | null | null | cat/udl/tennis/ScoreMessage.py | ratchetmdt/internationalization-python | fb33e3ee2d5c7eeca7ae3977b20d27444533aa6d | [
"Apache-2.0"
] | null | null | null | cat/udl/tennis/ScoreMessage.py | ratchetmdt/internationalization-python | fb33e3ee2d5c7eeca7ae3977b20d27444533aa6d | [
"Apache-2.0"
] | null | null | null | import gettext
import os
import sys
from gettext import gettext as _
appdir = os.path.dirname(sys.argv[0])
appdir = os.path.abspath(appdir)
localedir = os.path.join(appdir, "locales")
gettext.install('bundle', localedir, "utf-8")
class ScoreMessage(object):
LOVE_ALL = _("Love-All")
FIFTEEN_ALL = _("Fifteen-... | 20.769231 | 45 | 0.642593 |
43ed3ba014c035f7c5b773fabbd8b5b106ed3103 | 977 | py | Python | Sketches/MPS/Experiments/Likefile2/likefile/TestLikeFile.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 12 | 2015-10-20T10:22:01.000Z | 2021-07-19T10:09:44.000Z | Sketches/MPS/Experiments/Likefile2/likefile/TestLikeFile.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 2 | 2015-10-20T10:22:55.000Z | 2017-02-13T11:05:25.000Z | Sketches/MPS/Experiments/Likefile2/likefile/TestLikeFile.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 6 | 2015-03-09T12:51:59.000Z | 2020-03-01T13:06:21.000Z | #!/usr/bin/python
import time
from background import background
from Kamaelia.UI.Pygame.Text import Textbox, TextDisplayer
from LikeFile import LikeFile
background().start()
import Queue
TD = LikeFile(
TextDisplayer(position=(20, 90),
text_height=36,
screen_width... | 24.425 | 58 | 0.520983 |
ab3a7a96598883c484260453190949792c7d9e2d | 951 | py | Python | relogic/logickit/modules/gen_repr.py | Impavidity/relogic | f647106e143cd603b95b63e06ea530cdd516aefe | [
"MIT"
] | 24 | 2019-07-20T02:10:21.000Z | 2022-03-15T07:13:07.000Z | relogic/logickit/modules/gen_repr.py | One-paper-luck/relogic | f647106e143cd603b95b63e06ea530cdd516aefe | [
"MIT"
] | 3 | 2019-11-28T04:19:25.000Z | 2019-11-30T23:29:19.000Z | relogic/logickit/modules/gen_repr.py | One-paper-luck/relogic | f647106e143cd603b95b63e06ea530cdd516aefe | [
"MIT"
] | 5 | 2019-11-27T03:12:07.000Z | 2021-12-08T11:45:43.000Z | import torch.nn as nn
import torch.nn.functional as F
import torch
from relogic.logickit.base import utils
from relogic.logickit.utils import utils
class GenRepr(nn.Module):
def __init__(self, config, task_name, n_classes=None):
super(GenRepr, self).__init__()
self.config = config
self.task_name = task_n... | 35.222222 | 97 | 0.726604 |
82b1d5b5e45af1c4921bf3e8ca812c75898f14a5 | 4,225 | py | Python | tests/callbacks/test_save_callback.py | zurutech/ashpy | 16d53100c943abf4b051b27cfd025df0a6e7c8c9 | [
"Apache-2.0"
] | 89 | 2019-07-05T11:57:24.000Z | 2021-11-22T04:25:11.000Z | tests/callbacks/test_save_callback.py | zurutech/ashpy | 16d53100c943abf4b051b27cfd025df0a6e7c8c9 | [
"Apache-2.0"
] | 58 | 2019-07-09T09:59:19.000Z | 2021-05-21T15:29:53.000Z | tests/callbacks/test_save_callback.py | zurutech/ashpy | 16d53100c943abf4b051b27cfd025df0a6e7c8c9 | [
"Apache-2.0"
] | 11 | 2019-07-08T08:39:06.000Z | 2021-08-23T12:15:16.000Z | # Copyright 2019 Zuru Tech HK Limited. 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 la... | 30.615942 | 88 | 0.707692 |
025cd9bc4966667923ac5933c8fa860fbea6492d | 8,752 | py | Python | term.py | kolyat/chainsyn | a3be6c503f5d707aa6350c8fcb43f399c9092473 | [
"MIT"
] | null | null | null | term.py | kolyat/chainsyn | a3be6c503f5d707aa6350c8fcb43f399c9092473 | [
"MIT"
] | null | null | null | term.py | kolyat/chainsyn | a3be6c503f5d707aa6350c8fcb43f399c9092473 | [
"MIT"
] | null | null | null | # Copyright (c) 2016-2022 Kirill 'Kolyat' Kiselnikov
# This file is the part of chainsyn, released under modified MIT license
# See the file LICENSE.txt included in this distribution
"""Main module of chainsyn"""
import os
import datetime
import curses
import re
import config
from core import processing, tools
def... | 31.941606 | 79 | 0.562614 |
9f9d695a628865ea7d53e3b504399c18db607c13 | 838 | py | Python | app/dbCompressor.py | DepthDeluxe/dot11sniffer | 4c283122e158a854b940136a9675d3e0515ee219 | [
"MIT"
] | 4 | 2016-11-29T16:09:54.000Z | 2021-11-12T10:34:49.000Z | app/dbCompressor.py | DepthDeluxe/dot11sniffer | 4c283122e158a854b940136a9675d3e0515ee219 | [
"MIT"
] | null | null | null | app/dbCompressor.py | DepthDeluxe/dot11sniffer | 4c283122e158a854b940136a9675d3e0515ee219 | [
"MIT"
] | 1 | 2021-11-12T10:34:49.000Z | 2021-11-12T10:34:49.000Z | import zlib
import pickle as cPickle
import pymongo
import bson
class Compress:
def __init__(self):
self.client = pymongo.MongoClient("gouda.bucknell.edu")
self.collection = self.client.cheddar.compress
self.timedb = self.client.cheddar.times
def upload(self,time,data):
pickled... | 31.037037 | 67 | 0.647971 |
ec39279854858df1d016d98494521a87706033f7 | 9,901 | py | Python | rr/tests/test_serviceprovider.py | UniversityofHelsinki/sp-registry | b1336b89788c076bf93f61b97b5469a99acd902c | [
"MIT"
] | null | null | null | rr/tests/test_serviceprovider.py | UniversityofHelsinki/sp-registry | b1336b89788c076bf93f61b97b5469a99acd902c | [
"MIT"
] | 1 | 2020-08-10T13:16:58.000Z | 2020-08-18T06:30:20.000Z | rr/tests/test_serviceprovider.py | UniversityofHelsinki/sp-registry | b1336b89788c076bf93f61b97b5469a99acd902c | [
"MIT"
] | null | null | null | from django.contrib.auth.models import Group, User
from django.test import RequestFactory, TestCase
from django.urls import reverse
from rr.models.serviceprovider import ServiceProvider
from rr.views.serviceprovider import ServiceProviderList
class ServiceProviderListTestCase(TestCase):
def setUp(self):
... | 57.563953 | 126 | 0.67478 |
15fa31e0db439c8e884fc7137a34d5c7da7dc8e9 | 1,842 | py | Python | proselint/checks/misc/waxed.py | ankita240796/proselint | 50d2a482df8f467737f9c958ace98ba152bec832 | [
"BSD-3-Clause"
] | 4,163 | 2015-10-03T07:37:21.000Z | 2022-03-31T03:52:32.000Z | proselint/checks/misc/waxed.py | ankita240796/proselint | 50d2a482df8f467737f9c958ace98ba152bec832 | [
"BSD-3-Clause"
] | 878 | 2015-09-30T20:03:33.000Z | 2022-03-28T11:06:15.000Z | proselint/checks/misc/waxed.py | ankita240796/proselint | 50d2a482df8f467737f9c958ace98ba152bec832 | [
"BSD-3-Clause"
] | 249 | 2015-10-04T12:21:27.000Z | 2022-02-28T22:13:11.000Z | """Waxed lyrical.
---
layout: post
source: Fowler's Modern English Usage
source_url: bit.ly/1YBG8QJ
title: Waxed lyrical
date: 2016-03-10 14:48:42
categories: writing
---
Fowler's says:
Its primary meaning 'grow larger, increase' (as opposed to 'wane') leads
naturally to the sense 'pass into a spec... | 33.490909 | 75 | 0.568404 |
67a48c9c9fa7f57b90c676ed012d3675270d6f35 | 545 | py | Python | setup.py | wheeler-microfluidics/logging-helpers | febc80b8204b6986e10ff061d25ab02c2154ae22 | [
"BSD-3-Clause"
] | null | null | null | setup.py | wheeler-microfluidics/logging-helpers | febc80b8204b6986e10ff061d25ab02c2154ae22 | [
"BSD-3-Clause"
] | null | null | null | setup.py | wheeler-microfluidics/logging-helpers | febc80b8204b6986e10ff061d25ab02c2154ae22 | [
"BSD-3-Clause"
] | null | null | null | import sys
import setuptools as st
import versioneer
st.setup(name='logging-helpers',
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description='Add description here.',
keywords='',
author='Christian Fobel',
author_email='christian@fobel.n... | 28.684211 | 72 | 0.644037 |
19fd412cafef218b13925ee3f65e56fdf5909b42 | 11,591 | py | Python | qiskit/pulse/instruction_schedule_map.py | diego-plan9/qiskit-terra | a4120d70bd631ad2add228fdb1f86706bc5f2339 | [
"Apache-2.0"
] | 1 | 2018-05-29T03:58:03.000Z | 2018-05-29T03:58:03.000Z | qiskit/pulse/instruction_schedule_map.py | diego-plan9/qiskit-terra | a4120d70bd631ad2add228fdb1f86706bc5f2339 | [
"Apache-2.0"
] | 3 | 2018-11-13T17:33:37.000Z | 2018-12-03T09:35:00.000Z | qiskit/pulse/instruction_schedule_map.py | diego-plan9/qiskit-terra | a4120d70bd631ad2add228fdb1f86706bc5f2339 | [
"Apache-2.0"
] | 2 | 2017-12-03T15:48:14.000Z | 2018-03-11T13:08:03.000Z | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any modif... | 39.291525 | 99 | 0.636701 |
10029791e45e77d1ea3ee0e232b2f0451441c919 | 1,315 | py | Python | benchmarks/benchmarks/signal_filtering.py | magnusja/scipy | c4a5a1f984e28840010f20a7e41caa21b8f41979 | [
"FSFAP"
] | 6 | 2016-10-28T02:39:49.000Z | 2019-02-19T21:41:01.000Z | benchmarks/benchmarks/signal_filtering.py | magnusja/scipy | c4a5a1f984e28840010f20a7e41caa21b8f41979 | [
"FSFAP"
] | 4 | 2015-07-05T19:58:44.000Z | 2016-01-24T17:17:02.000Z | benchmarks/benchmarks/signal_filtering.py | magnusja/scipy | c4a5a1f984e28840010f20a7e41caa21b8f41979 | [
"FSFAP"
] | 3 | 2019-11-02T04:25:20.000Z | 2021-02-20T10:43:43.000Z | from __future__ import division, absolute_import, print_function
import numpy as np
try:
from scipy.signal import lfilter, firwin, decimate
except ImportError:
pass
from .common import Benchmark
class Decimate(Benchmark):
param_names = ['q', 'ftype', 'zero_phase']
params = [
[2, 10, 30],
... | 27.395833 | 71 | 0.611407 |
53c674eb539f165adbf9c8d0237f0ca1a9cb96e0 | 421 | py | Python | archive_for_wyko/Pyro-3.6/examples/callback/bounce_server.py | ArcetriAdaptiveOptics/plico_interferometer_server | e14e240229c802333b2aa5bf6458a079dc950bd2 | [
"MIT"
] | null | null | null | archive_for_wyko/Pyro-3.6/examples/callback/bounce_server.py | ArcetriAdaptiveOptics/plico_interferometer_server | e14e240229c802333b2aa5bf6458a079dc950bd2 | [
"MIT"
] | 3 | 2022-01-16T01:05:01.000Z | 2022-02-23T14:05:28.000Z | archive_for_wyko/Pyro-3.6/examples/callback/bounce_server.py | ArcetriAdaptiveOptics/plico_interferometer_server | e14e240229c802333b2aa5bf6458a079dc950bd2 | [
"MIT"
] | 1 | 2022-01-14T14:04:07.000Z | 2022-01-14T14:04:07.000Z | #! /usr/bin/env python
import Pyro.naming
import Pyro.core
from Pyro.errors import NamingError
import bouncer
Pyro.core.initServer()
daemon = Pyro.core.Daemon()
ns = Pyro.naming.NameServerLocator().getNS()
daemon.useNameServer(ns)
try:
ns.createGroup(':test')
except NamingError:
pass
daemon.connect(bouncer.Bouncer... | 18.304348 | 57 | 0.764846 |
e4e7b18aa9c9c3b600e067a2e9f58558f1986064 | 503 | py | Python | userbot/plugins/quit.py | RiderFA/Dark_Userbot | 480df539bfeae994d59649a54d2478ed24b445bb | [
"MIT"
] | null | null | null | userbot/plugins/quit.py | RiderFA/Dark_Userbot | 480df539bfeae994d59649a54d2478ed24b445bb | [
"MIT"
] | null | null | null | userbot/plugins/quit.py | RiderFA/Dark_Userbot | 480df539bfeae994d59649a54d2478ed24b445bb | [
"MIT"
] | null | null | null | """
.kickme
"""
import time
from telethon.tl.functions.channels import LeaveChannelRequest
from mafiabot.utils import admin_cmd
@borg.on(admin_cmd("kickme", outgoing=True))
async def leave(e):
if not e.text[0].isalpha() and e.text[0] not in ("/", "#", "@", "!"):
await e.edit("**I Iz lev this Kensur grp*... | 25.15 | 73 | 0.59841 |
6b236a20f3adcd12898e2cd015c9610b7a39acb8 | 1,739 | py | Python | bin/make_video_index.py | eryl/multimodal-dataset | 1daddab3247f5a3a9618197beb93540a437a773f | [
"MIT"
] | null | null | null | bin/make_video_index.py | eryl/multimodal-dataset | 1daddab3247f5a3a9618197beb93540a437a773f | [
"MIT"
] | null | null | null | bin/make_video_index.py | eryl/multimodal-dataset | 1daddab3247f5a3a9618197beb93540a437a773f | [
"MIT"
] | null | null | null | import argparse
import os.path
import re
import glob
from collections import defaultdict
import imageio
import sys
import csv
def main():
parser = argparse.ArgumentParser()
parser.add_argument('directories', nargs='+')
parser.add_argument('--output')
args = parser.parse_args()
video_data = default... | 32.203704 | 88 | 0.567568 |
3f983ce5c84519674beb524ff2d0a5a1c6a3a0bc | 1,074 | py | Python | tests/integrational/native_sync/test_revoke_v3.py | natekspencer/pubnub-python | 453ba34104b4067077546d5d9ba3b206559494d1 | [
"MIT"
] | 146 | 2015-01-05T03:14:53.000Z | 2022-03-16T16:51:52.000Z | tests/integrational/native_sync/test_revoke_v3.py | natekspencer/pubnub-python | 453ba34104b4067077546d5d9ba3b206559494d1 | [
"MIT"
] | 48 | 2015-01-15T15:27:41.000Z | 2022-03-21T14:17:05.000Z | tests/integrational/native_sync/test_revoke_v3.py | natekspencer/pubnub-python | 453ba34104b4067077546d5d9ba3b206559494d1 | [
"MIT"
] | 128 | 2015-01-05T03:40:59.000Z | 2022-03-02T20:50:58.000Z | from pubnub.pubnub import PubNub
from pubnub.models.consumer.v3.channel import Channel
from tests.integrational.vcr_helper import pn_vcr
from tests.helper import pnconf_pam_stub_copy
from pubnub.models.consumer.v3.access_manager import PNGrantTokenResult, PNRevokeTokenResult
pubnub = PubNub(pnconf_pam_stub_copy())
pub... | 35.8 | 97 | 0.755121 |
1ca0154a8683fcb8304b7bdb7e7df77b4526bcd4 | 8,065 | py | Python | src/lxml/builder.py | skeptycal/lxml | 32ac7a3bdc8faf2104a77787ed18f2096d0a7346 | [
"BSD-3-Clause"
] | null | null | null | src/lxml/builder.py | skeptycal/lxml | 32ac7a3bdc8faf2104a77787ed18f2096d0a7346 | [
"BSD-3-Clause"
] | 1 | 2020-07-07T04:35:41.000Z | 2020-07-07T04:35:41.000Z | src/lxml/builder.py | skeptycal/lxml | 32ac7a3bdc8faf2104a77787ed18f2096d0a7346 | [
"BSD-3-Clause"
] | null | null | null | # cython: language_level=2
#
# Element generator factory by Fredrik Lundh.
#
# Source:
# http://online.effbot.org/2006_11_01_archive.htm#et-builder
# http://effbot.python-hosting.com/file/stuff/sandbox/elementlib/builder.py
#
# --------------------------------------------------------------------
# The ElementTre... | 32.651822 | 92 | 0.550403 |
60acce538e47c0f2e643d8f0fffbfe18a30aa3e3 | 1,424 | py | Python | easy/1748_sum_of_unique_elements.py | niki4/leetcode_py3 | 794f560a09a8950da21bd58ea222e0c74449ffa6 | [
"MIT"
] | null | null | null | easy/1748_sum_of_unique_elements.py | niki4/leetcode_py3 | 794f560a09a8950da21bd58ea222e0c74449ffa6 | [
"MIT"
] | null | null | null | easy/1748_sum_of_unique_elements.py | niki4/leetcode_py3 | 794f560a09a8950da21bd58ea222e0c74449ffa6 | [
"MIT"
] | null | null | null | """
You are given an integer array nums. The unique elements of an array are the elements that appear exactly once in the array.
Return the sum of all the unique elements of nums.
Example 1:
Input: nums = [1,2,3,2]
Output: 4
Explanation: The unique elements are [1,3], and the sum is 4.
"""
import collections
from... | 25.428571 | 124 | 0.606039 |
372b8639e05549b582ad649f8644d2040235a0b9 | 15,962 | py | Python | lib/sqlalchemy/dialects/postgresql/pg8000.py | pedropozzobon/sqlalchemy | 03989d1dce80999bb9ea1a7d36df3285e5ce4c3b | [
"MIT"
] | null | null | null | lib/sqlalchemy/dialects/postgresql/pg8000.py | pedropozzobon/sqlalchemy | 03989d1dce80999bb9ea1a7d36df3285e5ce4c3b | [
"MIT"
] | null | null | null | lib/sqlalchemy/dialects/postgresql/pg8000.py | pedropozzobon/sqlalchemy | 03989d1dce80999bb9ea1a7d36df3285e5ce4c3b | [
"MIT"
] | null | null | null | # postgresql/pg8000.py
# Copyright (C) 2005-2022 the SQLAlchemy authors and contributors <see AUTHORS
# file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: https://www.opensource.org/licenses/mit-license.php
r"""
.. dialect:: postgresql+pg8000
:name: pg8000
:dbapi: pg8000
:c... | 27.426117 | 95 | 0.630497 |
e0ac67444ccfc7c621863fd4a396cc40f553143e | 320 | py | Python | Modules_import/Turtle.py | vasetousa/Python-fundamentals | 3180c03de28b4f4d36d966221719069a7e18e521 | [
"MIT"
] | null | null | null | Modules_import/Turtle.py | vasetousa/Python-fundamentals | 3180c03de28b4f4d36d966221719069a7e18e521 | [
"MIT"
] | null | null | null | Modules_import/Turtle.py | vasetousa/Python-fundamentals | 3180c03de28b4f4d36d966221719069a7e18e521 | [
"MIT"
] | null | null | null | # import turtle
# import time
#
# turtle.forward(150)
# turtle.right(250)
# turtle.forward(150)
# time.sleep(4)
# import turtle
#
# turtle.forward(150)
# turtle.right(250)
# turtle.forward(150)
#
# turtle.done()
from turtle import forward, right, done, circle
forward(150)
right(250)
circle(80)
forward(150)
done()
| 12.307692 | 47 | 0.7 |
13f303de25e8d10aed8357e4053cac5c24910a38 | 2,998 | py | Python | dimod/reference/composites/roofduality.py | joseppinilla/dimod | e33ca5045e31ee2d9d58515f017fb6be5276cd8e | [
"Apache-2.0"
] | 1 | 2020-11-03T16:42:26.000Z | 2020-11-03T16:42:26.000Z | dimod/reference/composites/roofduality.py | xpin/dimod | 5e399317b0bfaae6ed20e22b9f2ef242f5fa5e6c | [
"Apache-2.0"
] | null | null | null | dimod/reference/composites/roofduality.py | xpin/dimod | 5e399317b0bfaae6ed20e22b9f2ef242f5fa5e6c | [
"Apache-2.0"
] | 1 | 2022-02-01T14:40:31.000Z | 2022-02-01T14:40:31.000Z | # Copyright 2019 D-Wave Systems 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 or... | 37.475 | 87 | 0.667779 |
133da7ccdf1242df11ab9e687e7131c9370011a0 | 2,597 | py | Python | shape-attributes-calculator/shape_area_calculator.py | bruceyu777/code-kata | 3c1c1f7ec24b94a30e91a0d185c6fdb9e497a008 | [
"MIT"
] | null | null | null | shape-attributes-calculator/shape_area_calculator.py | bruceyu777/code-kata | 3c1c1f7ec24b94a30e91a0d185c6fdb9e497a008 | [
"MIT"
] | null | null | null | shape-attributes-calculator/shape_area_calculator.py | bruceyu777/code-kata | 3c1c1f7ec24b94a30e91a0d185c6fdb9e497a008 | [
"MIT"
] | null | null | null | import abc
import logging
import logging.config
import yaml
import pprint
from pprint import pformat
import json
# logging.config.fileConfig('logging.conf')
# with open("logconf.yml", 'r') as f:
# log_config = yaml.safe_load(f)
# logging.config.dictConfig(log_config)
from logging_setting import *
logger = log... | 28.855556 | 116 | 0.599153 |
308e2aabfd41f3e6dd5e7898163145f42fe12aa6 | 8,037 | py | Python | kubernetes_asyncio/client/models/v1_container_port.py | tomplus/kubernetes-asyncio | 11c3eb4d50ae822545572aa7b8c15f7153f65a1c | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1_container_port.py | tomplus/kubernetes-asyncio | 11c3eb4d50ae822545572aa7b8c15f7153f65a1c | [
"Apache-2.0"
] | null | null | null | kubernetes_asyncio/client/models/v1_container_port.py | tomplus/kubernetes-asyncio | 11c3eb4d50ae822545572aa7b8c15f7153f65a1c | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: v1.23.6
Generated by: https://openapi-generator.tech
"""
try:
from inspect import getfullargspec
except Im... | 32.538462 | 216 | 0.607689 |
5cbd642f36e84dc9cfaacf3936b6cf8f8f712425 | 6,512 | py | Python | test/modules/md/test_751_sectigo.py | tititiou36/httpd | 1348607c00ba58ce371f2f8ecb08abf610227043 | [
"Apache-2.0"
] | 2,529 | 2015-01-02T11:52:53.000Z | 2022-03-30T19:54:27.000Z | test/modules/md/test_751_sectigo.py | tititiou36/httpd | 1348607c00ba58ce371f2f8ecb08abf610227043 | [
"Apache-2.0"
] | 133 | 2015-04-21T05:50:45.000Z | 2022-03-30T14:23:40.000Z | test/modules/md/test_751_sectigo.py | tititiou36/httpd | 1348607c00ba58ce371f2f8ecb08abf610227043 | [
"Apache-2.0"
] | 1,113 | 2015-01-01T14:47:02.000Z | 2022-03-29T16:47:18.000Z | import os
import re
import time
import pytest
from .md_conf import MDConf
# set the environment variables
# SECTIGO_EAB="$kid $hmac" for
# SECTIGO_TLD="<your registered dns name>"
# these tests to become active
#
DEMO_ACME = "https://acme.demo.sectigo.com/"
DEMO_TLD = None
EABS = [
{'kid': '0123', 'hmac': ... | 35.78022 | 103 | 0.601505 |
73010555adc53ff910afa0fc3380b899311fdb9e | 28 | py | Python | models/__init__.py | kaylode/mediaeval20-pp | 9c115d8121dbc84d4198ff1d117635a60b177d60 | [
"MIT"
] | 2 | 2021-07-10T14:46:02.000Z | 2021-12-13T01:33:09.000Z | models/__init__.py | kaylode/mediaeval20-pp | 9c115d8121dbc84d4198ff1d117635a60b177d60 | [
"MIT"
] | null | null | null | models/__init__.py | kaylode/mediaeval20-pp | 9c115d8121dbc84d4198ff1d117635a60b177d60 | [
"MIT"
] | null | null | null | from .model import FullModel | 28 | 28 | 0.857143 |
ffd0ecb5ef851cf21011faf29efa5c1f54fb7823 | 2,844 | py | Python | day7.py | zsmoore/Advent-Of-Code-2017 | 895a7fbaa8b8b82a338dac967bccbf97b2092b20 | [
"MIT"
] | null | null | null | day7.py | zsmoore/Advent-Of-Code-2017 | 895a7fbaa8b8b82a338dac967bccbf97b2092b20 | [
"MIT"
] | null | null | null | day7.py | zsmoore/Advent-Of-Code-2017 | 895a7fbaa8b8b82a338dac967bccbf97b2092b20 | [
"MIT"
] | null | null | null | import sys
import pprint
class tree_node:
def __init__(self, name, weight, children):
self.name = name
self.weight = int(weight)
self.children = [] if children == None else children
def __repr__(self):
return '{0} \n\tWeight:{1}\n\tChildren:{2}'.format(self.name, self.weight, ... | 26.830189 | 97 | 0.540084 |
aaebba0c7823e1e5cc6f80ac4ca0e6bad4f4c3f1 | 538 | py | Python | clustering/config.py | kburnik/naps-clustering | 8ceaad61e7f1c3d76ad9e7c7491b705b936a6f19 | [
"MIT"
] | null | null | null | clustering/config.py | kburnik/naps-clustering | 8ceaad61e7f1c3d76ad9e7c7491b705b936a6f19 | [
"MIT"
] | null | null | null | clustering/config.py | kburnik/naps-clustering | 8ceaad61e7f1c3d76ad9e7c7491b705b936a6f19 | [
"MIT"
] | null | null | null | """Configuration for directories and constants."""
import os
DIR = os.path.dirname(os.path.abspath(__file__))
"""Root directory for the source code."""
DATA_DIR = os.path.join(DIR, '..', 'data')
"""Root directory for the data."""
OUT_DIR = os.path.join(DIR, '..', 'out')
"""Direktorij za rezultate."""
DATA_NAPS_ALL... | 28.315789 | 68 | 0.704461 |
9138f1ffda246e2b7a13506095e62c2948060f01 | 19,502 | py | Python | src/static_proxy/static_base.py | Yanivmd/maloss | af85ac202668da88d0b4a885386a1e56703e37c8 | [
"MIT"
] | 1 | 2022-01-29T16:13:06.000Z | 2022-01-29T16:13:06.000Z | src/static_proxy/static_base.py | Yanivmd/maloss | af85ac202668da88d0b4a885386a1e56703e37c8 | [
"MIT"
] | null | null | null | src/static_proxy/static_base.py | Yanivmd/maloss | af85ac202668da88d0b4a885386a1e56703e37c8 | [
"MIT"
] | 1 | 2022-01-29T16:13:07.000Z | 2022-01-29T16:13:07.000Z | import os
import logging
import shutil
import tempfile
import re
from os.path import join, exists, abspath, isdir, isfile, dirname, basename, relpath
import proto.python.ast_pb2 as ast_pb2
from pm_util import get_pm_proxy_for_language, get_pm_proxy
from util.enum_util import LanguageEnum
from util.compress_files impo... | 46.767386 | 134 | 0.642344 |
8e91406bcd1b12d509bee48950ca03bd3d9cb67b | 971 | py | Python | External/opencv-2.4.6.1/samples/python2/inpaint.py | simonct/CoreAstro | eafd0aea314c427da616e1707a49aaeaf5ea6991 | [
"OML"
] | 3 | 2015-08-29T06:56:58.000Z | 2016-11-15T10:35:59.000Z | External/opencv-2.4.6.1/samples/python2/inpaint.py | simonct/CoreAstro | eafd0aea314c427da616e1707a49aaeaf5ea6991 | [
"OML"
] | null | null | null | External/opencv-2.4.6.1/samples/python2/inpaint.py | simonct/CoreAstro | eafd0aea314c427da616e1707a49aaeaf5ea6991 | [
"OML"
] | null | null | null | #!/usr/bin/env python
'''
Inpainting sample.
Inpainting repairs damage to images by floodfilling
the damage with surrounding image areas.
Usage:
inpaint.py [<image>]
Keys:
SPACE - inpaint
r - reset the inpainting mask
ESC - exit
'''
import numpy as np
import cv2
from common import Sketcher
if __name... | 21.108696 | 79 | 0.572606 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.