hexsha stringlengths 40 40 | size int64 7 1.04M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 247 | max_stars_repo_name stringlengths 4 125 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 368k ⌀ | 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 4 247 | max_issues_repo_name stringlengths 4 125 | 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 4 247 | max_forks_repo_name stringlengths 4 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 1 1.04M | avg_line_length float64 1.77 618k | max_line_length int64 1 1.02M | alphanum_fraction float64 0 1 | original_content stringlengths 7 1.04M | filtered:remove_function_no_docstring int64 -102 942k | filtered:remove_class_no_docstring int64 -354 977k | filtered:remove_delete_markers int64 0 60.1k |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fdccac5c888ee1442ac43d8d2308072faed7c6ae | 28 | py | Python | python/arm_pcie/sophon/__init__.py | sophon-ai-algo/sophon-inference | f923413b76615e265af28fd1dd2b43e5eb303dcd | [
"Apache-2.0"
] | 18 | 2020-02-21T03:06:33.000Z | 2022-03-21T03:41:56.000Z | python/arm_pcie/sophon/__init__.py | sophon-ai-algo/sophon-inference | f923413b76615e265af28fd1dd2b43e5eb303dcd | [
"Apache-2.0"
] | null | null | null | python/arm_pcie/sophon/__init__.py | sophon-ai-algo/sophon-inference | f923413b76615e265af28fd1dd2b43e5eb303dcd | [
"Apache-2.0"
] | 6 | 2020-07-10T08:55:38.000Z | 2021-12-28T01:36:04.000Z | """sophon python module
"""
| 9.333333 | 23 | 0.642857 | """sophon python module
"""
| 0 | 0 | 0 |
c4f46379330fa29cea35efeb244b09e6353956e1 | 357 | py | Python | legacy/RE8.2/all_glosses.py | jblowe/RE | d694b254eb72e3798817fcf78a8beaada70580de | [
"MIT"
] | null | null | null | legacy/RE8.2/all_glosses.py | jblowe/RE | d694b254eb72e3798817fcf78a8beaada70580de | [
"MIT"
] | null | null | null | legacy/RE8.2/all_glosses.py | jblowe/RE | d694b254eb72e3798817fcf78a8beaada70580de | [
"MIT"
] | null | null | null | import utils
import read
from argparser import args, need_to_compare, project_dir
settings = read.read_settings_file(f'{project_dir}/{args.project}.parameters.xml',
mel=args.mel,
recon=args.recon)
for gloss in utils.all_glosses(read.read_attested_l... | 32.454545 | 82 | 0.644258 | import utils
import read
from argparser import args, need_to_compare, project_dir
settings = read.read_settings_file(f'{project_dir}/{args.project}.parameters.xml',
mel=args.mel,
recon=args.recon)
for gloss in utils.all_glosses(read.read_attested_l... | 0 | 0 | 0 |
54a5e9b8b7f1b86f7498369a1e7d804ffdca1df5 | 7,568 | py | Python | sdk/python/pulumi_spotinst/tables.py | 346/pulumi-spotinst | 7a9805f2f5ce96174c8122225772baffb87252c3 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-06-28T00:48:35.000Z | 2019-06-28T00:48:35.000Z | sdk/python/pulumi_spotinst/tables.py | 346/pulumi-spotinst | 7a9805f2f5ce96174c8122225772baffb87252c3 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-12-10T22:44:29.000Z | 2019-12-10T22:44:29.000Z | sdk/python/pulumi_spotinst/tables.py | 346/pulumi-spotinst | 7a9805f2f5ce96174c8122225772baffb87252c3 | [
"ECL-2.0",
"Apache-2.0"
] | 1 | 2019-07-21T11:19:13.000Z | 2019-07-21T11:19:13.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
_SNAKE_TO_CAMEL_CASE_TABLE = {
"availability_zones": "availabilityZones",
"backend_services": "backendServices",
"beanstalk... | 44.517647 | 106 | 0.736654 | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi Terraform Bridge (tfgen) Tool. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
_SNAKE_TO_CAMEL_CASE_TABLE = {
"availability_zones": "availabilityZones",
"backend_services": "backendServices",
"beanstalk... | 0 | 0 | 0 |
102c0183a5e9f30a41b7e0856b919d78efae8f7e | 1,546 | py | Python | designateclient/v2/blacklists.py | mythus/python-designateclient | 6b6a8969465324bd2bee7a05a91d19d24bd4cd68 | [
"Apache-2.0"
] | 34 | 2015-01-16T21:45:17.000Z | 2021-11-15T09:38:53.000Z | designateclient/v2/blacklists.py | mythus/python-designateclient | 6b6a8969465324bd2bee7a05a91d19d24bd4cd68 | [
"Apache-2.0"
] | null | null | null | designateclient/v2/blacklists.py | mythus/python-designateclient | 6b6a8969465324bd2bee7a05a91d19d24bd4cd68 | [
"Apache-2.0"
] | 15 | 2015-01-16T21:45:27.000Z | 2020-05-26T05:07:29.000Z | # Copyright 2015 Hewlett-Packard Development Company, L.P.
#
# Author: Endre Karlson <endre.karlson@hp.com>
#
# 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/lice... | 31.55102 | 75 | 0.686287 | # Copyright 2015 Hewlett-Packard Development Company, L.P.
#
# Author: Endre Karlson <endre.karlson@hp.com>
#
# 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/lice... | 665 | 19 | 157 |
0ce4e57ae634f64beb6b12d151aac770a1ff4d8a | 800 | py | Python | Face Detection program/face.py | shantanukaushik97/Face-Detection | b4ef77018cca6d1517c20d5c3101bea0ff1600e8 | [
"MIT"
] | 2 | 2021-06-13T06:52:31.000Z | 2021-06-13T06:52:36.000Z | Face Detection program/face.py | shantanukaushik97/Face-Detection | b4ef77018cca6d1517c20d5c3101bea0ff1600e8 | [
"MIT"
] | null | null | null | Face Detection program/face.py | shantanukaushik97/Face-Detection | b4ef77018cca6d1517c20d5c3101bea0ff1600e8 | [
"MIT"
] | null | null | null | import cv2
import numpy as np
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
eye_cascade=cv2.CascadeClassifier('haarcascade_eye.xml')
cap = cv2.VideoCapture(0)
while True:
ret,img = cap.read()
gray=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
faces=face_cascade.detectMul... | 27.586207 | 76 | 0.62625 | import cv2
import numpy as np
face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')
eye_cascade=cv2.CascadeClassifier('haarcascade_eye.xml')
cap = cv2.VideoCapture(0)
while True:
ret,img = cap.read()
gray=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
faces=face_cascade.detectMul... | 0 | 0 | 0 |
b608743d3e0ce5db0451935d0a926d8254270e51 | 3,310 | py | Python | python/federatedml/ensemble/__init__.py | hubert-he/FATE | 6758e150bd7ca7d6f788f9a7a8c8aea7e6500363 | [
"Apache-2.0"
] | 3,787 | 2019-08-30T04:55:10.000Z | 2022-03-31T23:30:07.000Z | python/federatedml/ensemble/__init__.py | JavaGreenHands/FATE | ea1e94b6be50c70c354d1861093187e523af32f2 | [
"Apache-2.0"
] | 1,439 | 2019-08-29T16:35:52.000Z | 2022-03-31T11:55:31.000Z | python/federatedml/ensemble/__init__.py | JavaGreenHands/FATE | ea1e94b6be50c70c354d1861093187e523af32f2 | [
"Apache-2.0"
] | 1,179 | 2019-08-29T16:18:32.000Z | 2022-03-31T12:55:38.000Z | #
# Copyright 2019 The FATE 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 appli... | 66.2 | 129 | 0.84713 | #
# Copyright 2019 The FATE 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 appli... | 0 | 0 | 0 |
74c674f9e49a88c166a61bc6238191a95dece600 | 835 | py | Python | startup/SST/HW/mirrors.py | NSLS-II-SST/profile_collection | e2c9d1fce421e7ed8a60fb744c34a770f7780803 | [
"BSD-3-Clause"
] | null | null | null | startup/SST/HW/mirrors.py | NSLS-II-SST/profile_collection | e2c9d1fce421e7ed8a60fb744c34a770f7780803 | [
"BSD-3-Clause"
] | 12 | 2019-05-30T15:08:15.000Z | 2021-04-29T03:24:10.000Z | startup/SST/HW/mirrors.py | NSLS-II-SST/profile_collection | e2c9d1fce421e7ed8a60fb744c34a770f7780803 | [
"BSD-3-Clause"
] | 2 | 2019-05-23T17:13:04.000Z | 2019-10-20T14:52:05.000Z | from ophyd import EpicsSignal
from ..CommonFunctions.functions import run_report
from ..Base.mirrors import HexapodMirror, FMBHexapodMirror
run_report(__file__)
mir2_type = EpicsSignal(
"XF:07ID1-OP{Mono:PGM1-Ax:MirX}Mtr_TYPE_MON", name="SST 1 Mirror 2 Stripe"
)
mir4OLD = HexapodMirror(
"XF:07ID2-OP{Mir:M4... | 29.821429 | 87 | 0.71018 | from ophyd import EpicsSignal
from ..CommonFunctions.functions import run_report
from ..Base.mirrors import HexapodMirror, FMBHexapodMirror
run_report(__file__)
mir2_type = EpicsSignal(
"XF:07ID1-OP{Mono:PGM1-Ax:MirX}Mtr_TYPE_MON", name="SST 1 Mirror 2 Stripe"
)
mir4OLD = HexapodMirror(
"XF:07ID2-OP{Mir:M4... | 0 | 0 | 0 |
2e9da797fe88d7bb0d255e7dc0aa73d9e3c222ab | 9,547 | py | Python | RaspberrySensorsBot.py | khode-mohsen/RaspberrySensorsBot | 71c358877cdb80548983491243c36809569ce76e | [
"Apache-2.0"
] | 19 | 2016-11-09T18:28:18.000Z | 2021-09-27T10:31:50.000Z | RaspberrySensorsBot.py | khode-mohsen/RaspberrySensorsBot | 71c358877cdb80548983491243c36809569ce76e | [
"Apache-2.0"
] | 1 | 2020-04-05T18:13:02.000Z | 2020-04-05T18:13:02.000Z | RaspberrySensorsBot.py | khode-mohsen/RaspberrySensorsBot | 71c358877cdb80548983491243c36809569ce76e | [
"Apache-2.0"
] | 5 | 2016-11-09T19:29:15.000Z | 2020-01-08T22:15:28.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Telegram bot @RaspberyPi3Bot
"""
"""
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, Job
import telegram
import logging
import pickle
import os
from subprocess import call
import datetime
import sys
if not 'win' in sys.plat... | 40.2827 | 134 | 0.577983 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Telegram bot @RaspberyPi3Bot
"""
"""
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters, Job
import telegram
import logging
import pickle
import os
from subprocess import call
import datetime
import sys
if not 'win' in sys.plat... | 7,608 | -3 | 623 |
6f645a8363878231f152bb4d1f996dc0004be6fd | 3,388 | py | Python | src/commands/es.py | parkiino/kibbe | c62a6ac2ab5fa13b44dd6b54c256e14196e50c64 | [
"MIT"
] | null | null | null | src/commands/es.py | parkiino/kibbe | c62a6ac2ab5fa13b44dd6b54c256e14196e50c64 | [
"MIT"
] | null | null | null | src/commands/es.py | parkiino/kibbe | c62a6ac2ab5fa13b44dd6b54c256e14196e50c64 | [
"MIT"
] | null | null | null | import re
from src.util import merge_params, unparsed_to_map
import subprocess
from termcolor import colored
from src.config import get_config, persist_config
import click
import tempfile
from pathlib import Path
pathDataRe = re.compile(r"path\.data\s?=", re.IGNORECASE)
@click.command(context_settings=dict(
ign... | 33.88 | 201 | 0.661157 | import re
from src.util import merge_params, unparsed_to_map
import subprocess
from termcolor import colored
from src.config import get_config, persist_config
import click
import tempfile
from pathlib import Path
pathDataRe = re.compile(r"path\.data\s?=", re.IGNORECASE)
@click.command(context_settings=dict(
ign... | 1,000 | 0 | 69 |
85b20f576ceeadd0f2e6734b8a6204c058be3246 | 1,096 | py | Python | Python3-StandardLibrary/Chapter17_Socket05_select.py | anliven/Reading-Code-Learning-Python | a814cab207bbaad6b5c69b9feeb8bf2f459baf2b | [
"Apache-2.0"
] | null | null | null | Python3-StandardLibrary/Chapter17_Socket05_select.py | anliven/Reading-Code-Learning-Python | a814cab207bbaad6b5c69b9feeb8bf2f459baf2b | [
"Apache-2.0"
] | null | null | null | Python3-StandardLibrary/Chapter17_Socket05_select.py | anliven/Reading-Code-Learning-Python | a814cab207bbaad6b5c69b9feeb8bf2f459baf2b | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
import socket
import select
s = socket.socket()
# host = socket.gethostname()
host = '127.0.0.1'
port = 1234
s.bind((host, port))
s.listen(5)
inputs = [s]
while True:
rs, ws, es = select.select(inputs, [], [], 5) # select函数
for r in rs:
if r is s:
c, address = s.accept()
... | 23.826087 | 71 | 0.568431 | # coding=utf-8
import socket
import select
s = socket.socket()
# host = socket.gethostname()
host = '127.0.0.1'
port = 1234
s.bind((host, port))
s.listen(5)
inputs = [s]
while True:
rs, ws, es = select.select(inputs, [], [], 5) # select函数
for r in rs:
if r is s:
c, address = s.accept()
... | 0 | 0 | 0 |
fa446e80bebf1dbdb084d6b2890cccdc671fb543 | 5,972 | py | Python | semantic_lstm_fc.py | tadityasrinivas/quora_semantic_equivalence | 828e9ee01f26378a9a97be1b04fcf061b5e9ea8b | [
"MIT"
] | 5 | 2017-02-08T10:43:49.000Z | 2019-06-15T11:06:52.000Z | semantic_lstm_fc.py | tadityasrinivas/quora_semantic_equivalence | 828e9ee01f26378a9a97be1b04fcf061b5e9ea8b | [
"MIT"
] | null | null | null | semantic_lstm_fc.py | tadityasrinivas/quora_semantic_equivalence | 828e9ee01f26378a9a97be1b04fcf061b5e9ea8b | [
"MIT"
] | 2 | 2017-06-07T03:20:37.000Z | 2019-06-14T16:11:16.000Z | import numpy as np
import random
from keras.models import Sequential, Model
from keras.layers import Dense, LSTM, Dropout, merge, Input
from keras.layers.embeddings import Embedding
from keras.regularizers import l2
from keras.callbacks import ModelCheckpoint
import cPickle
# Create data matrices and labels list from... | 34.125714 | 162 | 0.749163 | import numpy as np
import random
from keras.models import Sequential, Model
from keras.layers import Dense, LSTM, Dropout, merge, Input
from keras.layers.embeddings import Embedding
from keras.regularizers import l2
from keras.callbacks import ModelCheckpoint
import cPickle
# Create data matrices and labels list from... | 880 | 0 | 22 |
cab8dd82d065e0fcdf8fe077d7bccd98a610f749 | 601 | py | Python | models/classifier.py | corenel/pytorch-arda | eae00b8f0c31d52a194402487ba69bd9c3875a96 | [
"MIT"
] | 56 | 2017-10-13T04:48:41.000Z | 2020-12-09T07:54:32.000Z | models/classifier.py | corenel/pytorch-arda | eae00b8f0c31d52a194402487ba69bd9c3875a96 | [
"MIT"
] | 4 | 2017-08-30T01:54:02.000Z | 2019-06-12T03:35:28.000Z | models/classifier.py | corenel/pytorch-arda | eae00b8f0c31d52a194402487ba69bd9c3875a96 | [
"MIT"
] | 12 | 2017-09-20T08:22:53.000Z | 2020-04-07T13:21:17.000Z | """Classifier for ARDA.
guarantee learned domain-invariant representations are discriminative enough
to accomplish the final classification task
"""
import torch.nn.functional as F
from torch import nn
class Classifier(nn.Module):
"""LeNet classifier model for ARDA."""
def __init__(self):
"""Init L... | 25.041667 | 76 | 0.665557 | """Classifier for ARDA.
guarantee learned domain-invariant representations are discriminative enough
to accomplish the final classification task
"""
import torch.nn.functional as F
from torch import nn
class Classifier(nn.Module):
"""LeNet classifier model for ARDA."""
def __init__(self):
"""Init L... | 0 | 0 | 0 |
9f60c2e7300814789615b91c943158a8ae8b61f1 | 1,613 | py | Python | cobl/lexicon/templatetags/lexicon_utils.py | Bibiko/CoBL-public | 5092a0d01b7a13565c7da6bf2f6c52d648a2debe | [
"BSD-2-Clause"
] | 3 | 2017-05-30T04:40:43.000Z | 2019-04-25T14:54:54.000Z | cobl/lexicon/templatetags/lexicon_utils.py | Bibiko/CoBL-public | 5092a0d01b7a13565c7da6bf2f6c52d648a2debe | [
"BSD-2-Clause"
] | null | null | null | cobl/lexicon/templatetags/lexicon_utils.py | Bibiko/CoBL-public | 5092a0d01b7a13565c7da6bf2f6c52d648a2debe | [
"BSD-2-Clause"
] | 3 | 2018-07-02T13:42:12.000Z | 2019-05-17T13:11:13.000Z | # encoding: utf-8
from django import template
from django.utils.safestring import mark_safe
from django.utils.html import escape
import re
register = template.Library()
@register.filter
@register.filter
@register.filter
def wikilink(value):
"""
Produce wiki style links to other pages within the database,... | 26.442623 | 77 | 0.601984 | # encoding: utf-8
from django import template
from django.utils.safestring import mark_safe
from django.utils.html import escape
import re
register = template.Library()
@register.filter
def in_list(value, a_list):
return value in a_list
@register.filter
def is_truncated(value, length):
return len(value.spl... | 257 | 0 | 71 |
02216a3f218d47421ffabb05d471b32da3324721 | 429 | py | Python | notebooks/computer_science/high_performance_python/generators/generators_1.py | NathanielDake/nathanieldake.github.io | 82b7013afa66328e06e51304b6af10e1ed648eb8 | [
"MIT"
] | 3 | 2018-03-30T06:28:21.000Z | 2018-04-25T15:43:24.000Z | notebooks/computer_science/high_performance_python/generators/generators_1.py | NathanielDake/nathanieldake.github.io | 82b7013afa66328e06e51304b6af10e1ed648eb8 | [
"MIT"
] | null | null | null | notebooks/computer_science/high_performance_python/generators/generators_1.py | NathanielDake/nathanieldake.github.io | 82b7013afa66328e06e51304b6af10e1ed648eb8 | [
"MIT"
] | 3 | 2018-02-07T22:21:33.000Z | 2018-05-04T20:16:43.000Z | from notebooks.computer_science.high_performance_python.profiling.utils_timing import timefn
@timefn
@timefn
for i in range(1, 10000):
pass
for i in xrange(1, 10000):
pass
| 17.875 | 92 | 0.65035 | from notebooks.computer_science.high_performance_python.profiling.utils_timing import timefn
@timefn
def range(start, stop, step=1):
numbers = []
while start < stop:
numbers.append(start)
start += step
return numbers
@timefn
def xrange(start, stop, step=1):
while start < stop:
... | 199 | 0 | 44 |
3343351fcf13b69349827a374b8edcd16a53b272 | 21,327 | py | Python | django_gotolong/phealth/views.py | surinder432/gotolong | 5c5e3ddf56325391c8a115e2f4f8ded1d58fcd4f | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 15 | 2019-12-06T16:19:45.000Z | 2021-08-20T13:22:22.000Z | django_gotolong/phealth/views.py | surinder432/gotolong | 5c5e3ddf56325391c8a115e2f4f8ded1d58fcd4f | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 14 | 2020-12-08T10:45:05.000Z | 2021-09-21T17:23:45.000Z | django_gotolong/phealth/views.py | surinder432/gotolong | 5c5e3ddf56325391c8a115e2f4f8ded1d58fcd4f | [
"BSD-2-Clause",
"BSD-3-Clause"
] | 9 | 2020-01-01T03:04:29.000Z | 2021-04-18T08:42:30.000Z | # Create your views here.
from django.views.generic.list import ListView
from django_gotolong.amfi.models import Amfi
from django_gotolong.bhav.models import Bhav
from django_gotolong.corpact.models import Corpact
from django_gotolong.dematsum.models import DematSum
from django_gotolong.demattxn.models import Dema... | 53.992405 | 116 | 0.651146 | # Create your views here.
from django.views.generic.list import ListView
from django_gotolong.amfi.models import Amfi
from django_gotolong.bhav.models import Bhav
from django_gotolong.corpact.models import Corpact
from django_gotolong.dematsum.models import DematSum
from django_gotolong.demattxn.models import Dema... | 11,178 | 9,075 | 137 |
1409278584b0defcaa53015885fc24c0177410a7 | 603 | py | Python | 2_intermediate/chapter9/solutions/characters.py | code4tomorrow/Python | 035b6f5d8fd635a16caaff78bcd3f582663dadc3 | [
"MIT"
] | 4 | 2021-03-01T00:32:45.000Z | 2021-05-21T22:01:52.000Z | 2_intermediate/chapter9/solutions/characters.py | code4tomorrow/Python | 035b6f5d8fd635a16caaff78bcd3f582663dadc3 | [
"MIT"
] | 29 | 2020-09-12T22:56:04.000Z | 2021-09-25T17:08:42.000Z | 2_intermediate/chapter9/solutions/characters.py | code4tomorrow/Python | 035b6f5d8fd635a16caaff78bcd3f582663dadc3 | [
"MIT"
] | 7 | 2021-02-25T01:50:55.000Z | 2022-02-28T00:00:42.000Z | # Characters
# Write a Python program to create
# a dictionary from a string where
# the keys are the characters
# and the values are the frequency
# of the characters.
#
# Your program should ask the user
# to enter a string, convert it into
# the dictionary described above,
# and print the resulting dictionary.
#
# E... | 22.333333 | 50 | 0.666667 | # Characters
# Write a Python program to create
# a dictionary from a string where
# the keys are the characters
# and the values are the frequency
# of the characters.
#
# Your program should ask the user
# to enter a string, convert it into
# the dictionary described above,
# and print the resulting dictionary.
#
# E... | 0 | 0 | 0 |
17275645440ec7415818823c7ebd9ba80050e9ff | 4,929 | py | Python | 3d_elev_animations.py | simon-m-mudd/LSDMappingTools | d9137710ea18e54f3dc5b6782c5696cafdd2999f | [
"MIT"
] | 34 | 2017-01-31T17:03:26.000Z | 2021-09-15T17:23:21.000Z | 3d_elev_animations.py | simon-m-mudd/LSDMappingTools | d9137710ea18e54f3dc5b6782c5696cafdd2999f | [
"MIT"
] | 14 | 2017-01-11T19:45:08.000Z | 2020-11-03T16:36:38.000Z | 3d_elev_animations.py | LSDtopotools/LSDMappingTools | d9137710ea18e54f3dc5b6782c5696cafdd2999f | [
"MIT"
] | 21 | 2015-11-26T10:24:19.000Z | 2021-09-15T17:23:22.000Z | """
Create 3d elevation plots of model runs and then animate them
"""
from LSDPlottingTools import LSDMap_GDALIO as IO
import matplotlib.pyplot as plt
from mayavi import mlab
from mayavi.modules.grid_plane import GridPlane
from matplotlib import cm
import numpy as np
import os
from sys import platform
import sys
from... | 35.207143 | 183 | 0.603368 | """
Create 3d elevation plots of model runs and then animate them
"""
from LSDPlottingTools import LSDMap_GDALIO as IO
import matplotlib.pyplot as plt
from mayavi import mlab
from mayavi.modules.grid_plane import GridPlane
from matplotlib import cm
import numpy as np
import os
from sys import platform
import sys
from... | 1,986 | 0 | 68 |
a0641d289ba22504061826cb78b391d7fd96b0c6 | 7,342 | py | Python | redisbench_admin/export/export.py | RedisLabsModules/redisbench-admin | d8573d3414e5e846411d2875555deca5c8a7d0f1 | [
"Apache-2.0"
] | 5 | 2021-08-03T12:38:30.000Z | 2022-03-23T07:35:38.000Z | redisbench_admin/export/export.py | RedisLabsModules/redisbench-admin | d8573d3414e5e846411d2875555deca5c8a7d0f1 | [
"Apache-2.0"
] | 91 | 2021-03-17T12:05:35.000Z | 2022-03-29T22:20:00.000Z | redisbench_admin/export/export.py | RedisLabsModules/redisbench-admin | d8573d3414e5e846411d2875555deca5c8a7d0f1 | [
"Apache-2.0"
] | 2 | 2021-06-07T14:06:58.000Z | 2021-07-27T10:37:15.000Z | # Apache License Version 2.0
#
# Copyright (c) 2021., Redis Labs Modules
# All rights reserved.
#
import csv
import json
import logging
import datetime
import redis
from redistimeseries.client import Client
from redisbench_admin.export.common.common import split_tags_string
from redisbench_admin.run.git import git... | 34.308411 | 116 | 0.574639 | # Apache License Version 2.0
#
# Copyright (c) 2021., Redis Labs Modules
# All rights reserved.
#
import csv
import json
import logging
import datetime
import redis
from redistimeseries.client import Client
from redisbench_admin.export.common.common import split_tags_string
from redisbench_admin.run.git import git... | 6,711 | 0 | 46 |
e176bbd5951100d09bf157b03fcb151a74e27911 | 47 | py | Python | lithops/wait/utils.py | gfinol/lithops | e165a78e0facbb70c852d7627a7407e8a8d1b946 | [
"Apache-2.0"
] | null | null | null | lithops/wait/utils.py | gfinol/lithops | e165a78e0facbb70c852d7627a7407e8a8d1b946 | [
"Apache-2.0"
] | null | null | null | lithops/wait/utils.py | gfinol/lithops | e165a78e0facbb70c852d7627a7407e8a8d1b946 | [
"Apache-2.0"
] | null | null | null | ALL_COMPLETED = 1
ANY_COMPLETED = 2
ALWAYS = 3
| 11.75 | 17 | 0.744681 | ALL_COMPLETED = 1
ANY_COMPLETED = 2
ALWAYS = 3
| 0 | 0 | 0 |
d3cd93e2682fbdc57b3aad6d8bc4034d86ade17e | 1,450 | py | Python | catalyst/dl/callbacks/metrics/functional.py | TeAmP0is0N/catalyst | 445e366266196a2f1076cc7fa2438d66dfa58c14 | [
"Apache-2.0"
] | 1 | 2020-09-24T00:34:06.000Z | 2020-09-24T00:34:06.000Z | catalyst/dl/callbacks/metrics/functional.py | TeAmP0is0N/catalyst | 445e366266196a2f1076cc7fa2438d66dfa58c14 | [
"Apache-2.0"
] | null | null | null | catalyst/dl/callbacks/metrics/functional.py | TeAmP0is0N/catalyst | 445e366266196a2f1076cc7fa2438d66dfa58c14 | [
"Apache-2.0"
] | 1 | 2020-09-24T00:34:07.000Z | 2020-09-24T00:34:07.000Z | from typing import List
import numpy as np
def calculate_dice(
true_positives: np.array,
false_positives: np.array,
false_negatives: np.array,
) -> np.array:
"""
Calculate list of Dice coefficients.
Args:
true_positives: true positives numpy tensor
false_positives: false posi... | 21.969697 | 72 | 0.613793 | from typing import List
import numpy as np
def calculate_dice(
true_positives: np.array,
false_positives: np.array,
false_negatives: np.array,
) -> np.array:
"""
Calculate list of Dice coefficients.
Args:
true_positives: true positives numpy tensor
false_positives: false posi... | 0 | 0 | 0 |
509107d79cc126a1f999712c092351f5ca8bfb83 | 511 | py | Python | eventstore_grpc/operations/__init__.py | jmshnds/eventstore_grpc | cf6a5978bcdf5bb725a569b7373ce15ee4babb25 | [
"MIT"
] | 6 | 2021-02-04T15:48:28.000Z | 2021-12-26T03:04:26.000Z | eventstore_grpc/operations/__init__.py | jmshnds/eventstore_grpc | cf6a5978bcdf5bb725a569b7373ce15ee4babb25 | [
"MIT"
] | 1 | 2021-04-14T00:06:25.000Z | 2021-04-14T07:28:34.000Z | eventstore_grpc/operations/__init__.py | jmshnds/eventstore_grpc | cf6a5978bcdf5bb725a569b7373ce15ee4babb25 | [
"MIT"
] | 1 | 2021-04-14T17:22:54.000Z | 2021-04-14T17:22:54.000Z | from eventstore_grpc.operations.merge_indexes import merge_indexes
from eventstore_grpc.operations.resign_node import resign_node
from eventstore_grpc.operations.restart_persistent_subscritions import (
restart_persistent_subscriptions,
)
from eventstore_grpc.operations.set_node_priority import set_node_priority
fr... | 51.1 | 74 | 0.900196 | from eventstore_grpc.operations.merge_indexes import merge_indexes
from eventstore_grpc.operations.resign_node import resign_node
from eventstore_grpc.operations.restart_persistent_subscritions import (
restart_persistent_subscriptions,
)
from eventstore_grpc.operations.set_node_priority import set_node_priority
fr... | 0 | 0 | 0 |
07b0eda761d42f55ef1af45c114a695aa2d2a27b | 1,064 | py | Python | tests/conftest.py | va-services-web/selenium3-python3-automation-framework | c552eb10f7ae80b62dedbd0b030aa022c6fbc18f | [
"MIT"
] | null | null | null | tests/conftest.py | va-services-web/selenium3-python3-automation-framework | c552eb10f7ae80b62dedbd0b030aa022c6fbc18f | [
"MIT"
] | null | null | null | tests/conftest.py | va-services-web/selenium3-python3-automation-framework | c552eb10f7ae80b62dedbd0b030aa022c6fbc18f | [
"MIT"
] | null | null | null | import pytest
from base.webdriverfactory import WebDriverFactory
from pages.home.login_page import LoginPage
@pytest.yield_fixture()
@pytest.yield_fixture(scope="class")
@pytest.fixture(scope="session")
@pytest.fixture(scope="session") | 28.756757 | 103 | 0.724624 | import pytest
from base.webdriverfactory import WebDriverFactory
from pages.home.login_page import LoginPage
@pytest.yield_fixture()
def setUp():
print("Running method level setUp")
yield
print("Running method level tearDown")
@pytest.yield_fixture(scope="class")
def oneTimeSetUp(request, browser, osType)... | 714 | 0 | 111 |
32d9605e0b45ff9de4fe34b514a5e92fd4a4fdf2 | 6,306 | py | Python | weather.py | wcyuan/weather-mailer | c25d718e69ecc012253fb9c6ad7bc4e57e86a205 | [
"Apache-2.0"
] | null | null | null | weather.py | wcyuan/weather-mailer | c25d718e69ecc012253fb9c6ad7bc4e57e86a205 | [
"Apache-2.0"
] | null | null | null | weather.py | wcyuan/weather-mailer | c25d718e69ecc012253fb9c6ad7bc4e57e86a205 | [
"Apache-2.0"
] | null | null | null | import contextlib
import json
import os
import sys
import urllib
import urllib2
from google.appengine.api import users
from google.appengine.ext import ndb
import jinja2
import webapp2
# ------------------------------------------------------------------------- #
API_KEY = "8e635b5992d237d6"
JINJA_ENVIRONMENT = ji... | 37.094118 | 165 | 0.633365 | import contextlib
import json
import os
import sys
import urllib
import urllib2
from google.appengine.api import users
from google.appengine.ext import ndb
import jinja2
import webapp2
# ------------------------------------------------------------------------- #
API_KEY = "8e635b5992d237d6"
JINJA_ENVIRONMENT = ji... | 506 | 18 | 50 |
02da7dce59ef635242e4166ca60f49d79854697b | 2,217 | py | Python | source/existsUI.py | MChenLiang/MPlayer | 10fac8f2b2c5fefb7f3aabdd69b08190c3ffb4ab | [
"MIT"
] | 1 | 2019-12-16T06:27:39.000Z | 2019-12-16T06:27:39.000Z | source/existsUI.py | MChenLiang/MPlayer | 10fac8f2b2c5fefb7f3aabdd69b08190c3ffb4ab | [
"MIT"
] | null | null | null | source/existsUI.py | MChenLiang/MPlayer | 10fac8f2b2c5fefb7f3aabdd69b08190c3ffb4ab | [
"MIT"
] | 1 | 2019-12-16T03:56:13.000Z | 2019-12-16T03:56:13.000Z | #!/user/bin/env python
# -*- coding: UTF-8 -*-
__author__ = 'miaoChenLiang'
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #
# import++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #
# ↓++++++++++++++++++++++++++++++... | 34.640625 | 104 | 0.410465 | #!/user/bin/env python
# -*- coding: UTF-8 -*-
__author__ = 'miaoChenLiang'
# ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #
# import++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ #
# ↓++++++++++++++++++++++++++++++... | 1,018 | 20 | 258 |
b71dd00820398d95425eb99a242cd4d665e51535 | 6,923 | py | Python | samples/smells_like_teen_spirit.py | enaki/My_Little_Piano | 92a8b3728cd0defe2ef7c65045c6ecb38946a451 | [
"MIT"
] | 1 | 2021-11-12T16:44:28.000Z | 2021-11-12T16:44:28.000Z | samples/smells_like_teen_spirit.py | enaki/My_Little_Piano | 92a8b3728cd0defe2ef7c65045c6ecb38946a451 | [
"MIT"
] | null | null | null | samples/smells_like_teen_spirit.py | enaki/My_Little_Piano | 92a8b3728cd0defe2ef7c65045c6ecb38946a451 | [
"MIT"
] | null | null | null | import array
from samples.abstract_song import Song
import time
| 55.384 | 151 | 0.614618 | import array
from samples.abstract_song import Song
import time
class SmellsLikeTennSpirit(Song):
def __init__(self, octave_1, octave_2, octave_3, delay):
super().__init__(delay)
self.octave_1 = octave_1
self.octave_2 = octave_2
self.octave_3 = octave_3
def play(self):
... | 6,609 | 12 | 238 |
18fc20011fa916f50ee897bb8fd3460ae19247c2 | 1,515 | py | Python | test.py | IkuzakIkuzok/4-4-4-4 | 30be078daa77fc603e5fd71e654e945bced3932d | [
"MIT"
] | null | null | null | test.py | IkuzakIkuzok/4-4-4-4 | 30be078daa77fc603e5fd71e654e945bced3932d | [
"MIT"
] | null | null | null | test.py | IkuzakIkuzok/4-4-4-4 | 30be078daa77fc603e5fd71e654e945bced3932d | [
"MIT"
] | null | null | null |
# (c) 2020 Kazuki KOHZUKI
import cpu
from utils import *
BOARD = [[
[[ 0, 0, 0, 0], [ 0, 0, 0, 0], [ 0, 0, 0, 0], [ 0, 0, 0, 0]],
[[ 0, 0, 0, 0], [ 0, 0, 0, 0], [ 0, 0, 0, 0], [ 0, 0, 0, 0]],
[[ 0, 0, 0, 0], [ 0, 0, 0, 0], [ 0, 0, 0, 0], [ 0, 0, 0, 0]],
[[ 0, 0, ... | 40.945946 | 78 | 0.267987 |
# (c) 2020 Kazuki KOHZUKI
import cpu
from utils import *
BOARD = [[
[[ 0, 0, 0, 0], [ 0, 0, 0, 0], [ 0, 0, 0, 0], [ 0, 0, 0, 0]],
[[ 0, 0, 0, 0], [ 0, 0, 0, 0], [ 0, 0, 0, 0], [ 0, 0, 0, 0]],
[[ 0, 0, 0, 0], [ 0, 0, 0, 0], [ 0, 0, 0, 0], [ 0, 0, 0, 0]],
[[ 0, 0, ... | 34 | 0 | 23 |
0a8c32c926b39674c4b096367d139333d686a8bd | 234 | py | Python | data_types_and_variables/more_exercises/exchange_integers.py | PetkoAndreev/Python-fundamentals | dcf2ecb65d7a82a6688a7529a14eb8a331a83256 | [
"MIT"
] | null | null | null | data_types_and_variables/more_exercises/exchange_integers.py | PetkoAndreev/Python-fundamentals | dcf2ecb65d7a82a6688a7529a14eb8a331a83256 | [
"MIT"
] | null | null | null | data_types_and_variables/more_exercises/exchange_integers.py | PetkoAndreev/Python-fundamentals | dcf2ecb65d7a82a6688a7529a14eb8a331a83256 | [
"MIT"
] | null | null | null | num1 = input()
num2 = input()
nums = [num1, num2]
result = ''
result += 'Before:\n'
result += f'a = {nums[0]}\n'
result += f'b = {nums[1]}\n'
result += 'After:\n'
result += f'a = {nums[1]}\n'
result += f'b = {nums[0]}'
print(result)
| 18 | 28 | 0.542735 | num1 = input()
num2 = input()
nums = [num1, num2]
result = ''
result += 'Before:\n'
result += f'a = {nums[0]}\n'
result += f'b = {nums[1]}\n'
result += 'After:\n'
result += f'a = {nums[1]}\n'
result += f'b = {nums[0]}'
print(result)
| 0 | 0 | 0 |
5f1e19816953739730dfcbc842d9fe2291bde675 | 9,768 | py | Python | scripts/main_dbastar.py | IMRCLab/kinodynamic-motion-planning-benchmark | 2b978b6400e5ce38f858293126a5db57da3019c6 | [
"MIT"
] | null | null | null | scripts/main_dbastar.py | IMRCLab/kinodynamic-motion-planning-benchmark | 2b978b6400e5ce38f858293126a5db57da3019c6 | [
"MIT"
] | null | null | null | scripts/main_dbastar.py | IMRCLab/kinodynamic-motion-planning-benchmark | 2b978b6400e5ce38f858293126a5db57da3019c6 | [
"MIT"
] | null | null | null | import shutil
import numpy as np
from scp import SCP
import robots
import yaml
import argparse
import subprocess
import time
import random
import copy
import shutil
from collections import defaultdict
import tempfile
from pathlib import Path
import msgpack
import sys
import os
sys.path.append(os.getcwd())
import main... | 31.81759 | 122 | 0.679668 | import shutil
import numpy as np
from scp import SCP
import robots
import yaml
import argparse
import subprocess
import time
import random
import copy
import shutil
from collections import defaultdict
import tempfile
from pathlib import Path
import msgpack
import sys
import os
sys.path.append(os.getcwd())
import main... | 9,118 | 0 | 92 |
5ba4f24c4f51237591eefb6a86a89496a0de04f1 | 1,369 | py | Python | projects/DA-project-3/problem-3.py | metanitesh/Data-Structure-Algorithm-Python | 48c4e74909700a3b4438f79050c7f974cd95b9a2 | [
"MIT"
] | null | null | null | projects/DA-project-3/problem-3.py | metanitesh/Data-Structure-Algorithm-Python | 48c4e74909700a3b4438f79050c7f974cd95b9a2 | [
"MIT"
] | null | null | null | projects/DA-project-3/problem-3.py | metanitesh/Data-Structure-Algorithm-Python | 48c4e74909700a3b4438f79050c7f974cd95b9a2 | [
"MIT"
] | null | null | null |
print("Test-1------------------------")
print(rearrange_digits([4, 6, 2, 5, 9, 8]))
# [964, 852]
print(rearrange_digits([1, 2, 3, 4, 5]))
# [42, 531]
print("Test-2------------------------")
print(rearrange_digits([]))
# At least 2 numbers required
print("Test-3------------------------")
print(rearrange_digits([1... | 21.390625 | 58 | 0.567568 | def mergesort(items):
if len(items) <= 1:
return items
mid = len(items) // 2
left = items[:mid]
right = items[mid:]
left = mergesort(left)
right = mergesort(right)
return merge(left, right)
def merge(left, right):
merged = []
leftIndex = 0
rightIndex = 0
... | 943 | 0 | 72 |
47678e733f9adde02f7e1aa0886ae2c2490b182b | 5,687 | py | Python | docs/source/auto_tutorials/tutorial_merfish.py | theislab/squidpy_notebooks | 371ddeab15c26140d74da531ce7e63eda4d5ea89 | [
"MIT"
] | 9 | 2021-02-16T08:22:42.000Z | 2022-02-21T05:49:33.000Z | docs/source/auto_tutorials/tutorial_merfish.py | theislab/squidpy_notebooks | 371ddeab15c26140d74da531ce7e63eda4d5ea89 | [
"MIT"
] | 32 | 2021-02-14T17:10:40.000Z | 2022-03-09T20:52:26.000Z | tutorials/tutorial_merfish.py | theislab/squidpy_notebooks | 371ddeab15c26140d74da531ce7e63eda4d5ea89 | [
"MIT"
] | 3 | 2021-04-01T17:10:27.000Z | 2022-02-09T12:54:14.000Z | #!/usr/bin/env python
"""
Analyze Merfish data
========================
This tutorial shows how to apply Squidpy for the analysis of Merfish data.
The data used here was obtained from :cite:`Moffitt2018-me`.
We provide a pre-processed subset of the data, in :class:`anndata.AnnData` format.
For details on how it was p... | 47.391667 | 108 | 0.653596 | #!/usr/bin/env python
"""
Analyze Merfish data
========================
This tutorial shows how to apply Squidpy for the analysis of Merfish data.
The data used here was obtained from :cite:`Moffitt2018-me`.
We provide a pre-processed subset of the data, in :class:`anndata.AnnData` format.
For details on how it was p... | 0 | 0 | 0 |
462f8712db091c920a8ecff82d10458b1fb63e2d | 781 | py | Python | app/apis/demo/routes.py | axiaoxin/flask-ping | 933d64ff8ea815111a65dcde715b25f4d01fce43 | [
"Apache-2.0"
] | 8 | 2017-11-30T09:31:48.000Z | 2020-03-20T11:45:25.000Z | app/apis/demo/routes.py | axiaoxin/flask-ping | 933d64ff8ea815111a65dcde715b25f4d01fce43 | [
"Apache-2.0"
] | 3 | 2017-12-05T03:26:08.000Z | 2019-10-21T10:35:19.000Z | app/apis/demo/routes.py | axiaoxin/flask-ping | 933d64ff8ea815111a65dcde715b25f4d01fce43 | [
"Apache-2.0"
] | 3 | 2018-06-07T06:15:12.000Z | 2018-11-18T09:03:54.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask import Blueprint
from . import views
message_api = Blueprint('message', __name__)
# 消息入口
message_api.add_url_rule('/entry', view_func=views.EntryView.as_view('entry'))
# 查询任务状态
message_api.add_url_rule(
'/notify_task/<task_id>',
view_func=views.NotifyT... | 26.931034 | 78 | 0.723431 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask import Blueprint
from . import views
message_api = Blueprint('message', __name__)
# 消息入口
message_api.add_url_rule('/entry', view_func=views.EntryView.as_view('entry'))
# 查询任务状态
message_api.add_url_rule(
'/notify_task/<task_id>',
view_func=views.NotifyT... | 0 | 0 | 0 |
04a68054903e097d73524d9d25662b23b4083934 | 2,004 | py | Python | datamaps/tests/test_api.py | hammerheadlemon/datamaps | 3605bb975f606bed1c009100d04a4048dfa28305 | [
"MIT"
] | 1 | 2020-10-16T12:52:12.000Z | 2020-10-16T12:52:12.000Z | datamaps/tests/test_api.py | yulqen/datamaps | f07fd91889749bec2b7a5fce3af4f10b3e2b3f73 | [
"MIT"
] | 13 | 2020-09-07T13:19:11.000Z | 2021-11-06T16:11:36.000Z | datamaps/tests/test_api.py | hammerheadlemon/datamaps | 3605bb975f606bed1c009100d04a4048dfa28305 | [
"MIT"
] | 1 | 2019-11-03T14:56:27.000Z | 2019-11-03T14:56:27.000Z | import datetime
from ..api import project_data_from_master, project_data_from_master_month
from ..core.temporal import Month
| 40.897959 | 87 | 0.698104 | import datetime
from ..api import project_data_from_master, project_data_from_master_month
from ..core.temporal import Month
def test_get_project_data(master):
master = project_data_from_master(master, 1, 2019)
assert (
master["Chutney Bridge.xlsm"]["Project/Programme Name"] == "Chutney Bridge Ltd"
... | 1,830 | 0 | 46 |
142378270ba484bc1e634a46f593c78aa12f808d | 2,481 | py | Python | Python/design_patterns/structural_patterns/factory_method/solution_1.py | J0shu4B0y/Practice | ea6af3773520f12afcf72f25952a80614d0c13ef | [
"MIT"
] | 1 | 2021-07-18T08:40:05.000Z | 2021-07-18T08:40:05.000Z | Python/design_patterns/structural_patterns/factory_method/solution_1.py | J0shu4B0y/Practice | ea6af3773520f12afcf72f25952a80614d0c13ef | [
"MIT"
] | 3 | 2020-02-21T13:43:44.000Z | 2020-02-21T13:54:57.000Z | Python/design_patterns/structural_patterns/factory_method/solution_1.py | J0shu4B0y/Practice-Python | ea6af3773520f12afcf72f25952a80614d0c13ef | [
"MIT"
] | 2 | 2019-07-19T10:09:08.000Z | 2020-09-20T08:07:36.000Z | import json
import xml.etree.ElementTree as et
# class Song:
# def __init__(self, song_id, title, artist):
# self.song_id = song_id
# self.title = title
# self.artist = artist
#
#
# class SongSerializer:
# def serialize(self, song, format):
# if format == "JSON":
# ... | 32.220779 | 90 | 0.618299 | import json
import xml.etree.ElementTree as et
# class Song:
# def __init__(self, song_id, title, artist):
# self.song_id = song_id
# self.title = title
# self.artist = artist
#
#
# class SongSerializer:
# def serialize(self, song, format):
# if format == "JSON":
# ... | 855 | -10 | 176 |
993f1c9b4e73abeb8bd614a9596fed2ab2798d86 | 793 | py | Python | step_impl/logIn.py | nirmalsingh7950/gauge-selenium-python | d21c3c4c12db93977f0783db83bdaefd03f14925 | [
"MIT"
] | 10 | 2018-09-09T16:05:15.000Z | 2021-12-08T15:31:49.000Z | step_impl/logIn.py | ppatil20/python-selenium | f17f0aa7e5aafa915484979f06a7a75cd7b7c4ab | [
"MIT"
] | 2 | 2018-05-22T12:13:09.000Z | 2018-07-10T10:04:07.000Z | step_impl/logIn.py | ppatil20/python-selenium | f17f0aa7e5aafa915484979f06a7a75cd7b7c4ab | [
"MIT"
] | 9 | 2018-03-29T11:34:46.000Z | 2022-03-29T00:44:34.000Z | import os
from step_impl.utils.driver import Driver
from getgauge.python import step
@step("Give an option to Log In")
@step("Show the log in status for user <name>")
@step("Login as name <name> and <password>") | 37.761905 | 77 | 0.778058 | import os
from step_impl.utils.driver import Driver
from getgauge.python import step
@step("Give an option to Log In")
def giveAnOptionToLogIn():
Driver.driver.find_element_by_link_text("Log in")
@step("Show the log in status for user <name>")
def showTheLogInStatusForUser(name):
authenticatedInfo = Driver.driver... | 513 | 0 | 66 |
544ced764fb5b2c4fa2df8a0d0b3443697493b3c | 60,102 | py | Python | util/pydevd/pysrc/pydevd.py | hinesmr/mica | 82d26b9c6b04e1b8cea7d80c054e2cf482a58520 | [
"Apache-2.0"
] | 6 | 2015-01-26T16:14:43.000Z | 2019-08-22T01:29:24.000Z | util/pydevd/pysrc/pydevd.py | hinesmr/mica | 82d26b9c6b04e1b8cea7d80c054e2cf482a58520 | [
"Apache-2.0"
] | 3 | 2015-01-06T13:31:28.000Z | 2016-10-11T16:52:09.000Z | util/pydevd/pysrc/pydevd.py | hinesmr/mica | 82d26b9c6b04e1b8cea7d80c054e2cf482a58520 | [
"Apache-2.0"
] | null | null | null | #IMPORTANT: pydevd_constants must be the 1st thing defined because it'll keep a reference to the original sys._getframe
from pydevd_constants import * #@UnusedWildImport
import pydev_imports
from pydevd_comm import CMD_CHANGE_VARIABLE, \
CMD_EVALUATE_EXPRESSION, \
CMD_... | 43.114778 | 154 | 0.550564 | #IMPORTANT: pydevd_constants must be the 1st thing defined because it'll keep a reference to the original sys._getframe
from pydevd_constants import * #@UnusedWildImport
import pydev_imports
from pydevd_comm import CMD_CHANGE_VARIABLE, \
CMD_EVALUATE_EXPRESSION, \
CMD_... | 15,744 | 395 | 527 |
3340984533747003e19a7a3675c80518dfb0e50b | 5,997 | py | Python | linefinder/utils/file_management_new.py | zhafen/linefinder | 0f4f36a83246f1b833d0c281e635d86be3d1eb95 | [
"MIT"
] | null | null | null | linefinder/utils/file_management_new.py | zhafen/linefinder | 0f4f36a83246f1b833d0c281e635d86be3d1eb95 | [
"MIT"
] | 12 | 2018-08-26T14:10:18.000Z | 2021-04-15T21:48:58.000Z | linefinder/utils/file_management_new.py | zhafen/linefinder | 0f4f36a83246f1b833d0c281e635d86be3d1eb95 | [
"MIT"
] | 1 | 2021-05-19T16:45:21.000Z | 2021-05-19T16:45:21.000Z | #!/usr/bin/env python
'''Simple functions and variables for easily accessing common files and choices
of parameters.
'''
import os
import linefinder.config as l_config
########################################################################
########################################################################
... | 27.383562 | 79 | 0.41921 | #!/usr/bin/env python
'''Simple functions and variables for easily accessing common files and choices
of parameters.
'''
import os
import linefinder.config as l_config
########################################################################
########################################################################
c... | 4,339 | 7 | 320 |
846cd4ef6e4106fe2de5f252a2ef28a8a17759d7 | 18,621 | py | Python | tickets/views.py | b1pb1p/opensource-job-portal | 26aaf8415ed27112b94f4111d5136ec6f65b2205 | [
"MIT"
] | 199 | 2019-12-14T02:25:05.000Z | 2022-03-31T11:26:12.000Z | tickets/views.py | b1pb1p/opensource-job-portal | 26aaf8415ed27112b94f4111d5136ec6f65b2205 | [
"MIT"
] | 91 | 2019-12-12T12:19:34.000Z | 2022-03-25T05:52:04.000Z | tickets/views.py | datatalking/opensource-job-portal | 26aaf8415ed27112b94f4111d5136ec6f65b2205 | [
"MIT"
] | 131 | 2019-12-13T06:26:06.000Z | 2022-03-29T19:45:18.000Z | """
Support module for recruiter, will generate a notification
email to recruiter when admin gives suggestions
"""
import json
from django.shortcuts import render
from django.http.response import HttpResponse
from django.contrib.auth.decorators import login_required
from django.conf import settings
from django... | 37.466801 | 97 | 0.60029 | """
Support module for recruiter, will generate a notification
email to recruiter when admin gives suggestions
"""
import json
from django.shortcuts import render
from django.http.response import HttpResponse
from django.contrib.auth.decorators import login_required
from django.conf import settings
from django... | 0 | 0 | 0 |
73c77153cf1c0f23f5c74934f62f20d949ff14f8 | 2,347 | py | Python | dumpsdkfuncs.py | TheGreatRambler/NintendoSwitchGameToNative | 90dee5e3b24325f781ee3adf0f3ce083c47bf13d | [
"MIT"
] | 7 | 2021-01-22T23:17:02.000Z | 2022-03-04T22:16:24.000Z | dumpsdkfuncs.py | TheGreatRambler/NintendoSwitchGameToNative | 90dee5e3b24325f781ee3adf0f3ce083c47bf13d | [
"MIT"
] | null | null | null | dumpsdkfuncs.py | TheGreatRambler/NintendoSwitchGameToNative | 90dee5e3b24325f781ee3adf0f3ce083c47bf13d | [
"MIT"
] | 1 | 2021-11-19T04:37:20.000Z | 2021-11-19T04:37:20.000Z | import idautils
import idaapi
import idc
import subprocess
import pycparser
import ida_typeinf
import ida_nalt
sdk_funcs_file = open(idc.ARGV[1], "w")
sdk_funcs_header = open(idc.ARGV[2], "w")
# Uses demumble as a drop in replacment
cppfilt_path = idc.ARGV[3]
print "Wait for auto analysis"
idc.auto_wait()
# Disable ... | 31.293333 | 129 | 0.727738 | import idautils
import idaapi
import idc
import subprocess
import pycparser
import ida_typeinf
import ida_nalt
sdk_funcs_file = open(idc.ARGV[1], "w")
sdk_funcs_header = open(idc.ARGV[2], "w")
# Uses demumble as a drop in replacment
cppfilt_path = idc.ARGV[3]
print "Wait for auto analysis"
idc.auto_wait()
# Disable ... | 0 | 0 | 0 |
498533813f644dc095adf8e752c316aaac3a4d3d | 1,925 | py | Python | pd_multiprocessing/map.py | stavrakidis/pd_multithreading | f5737e907b59448fae0d2102a90f9db4d863418a | [
"MIT"
] | null | null | null | pd_multiprocessing/map.py | stavrakidis/pd_multithreading | f5737e907b59448fae0d2102a90f9db4d863418a | [
"MIT"
] | 14 | 2019-02-20T15:18:17.000Z | 2021-06-02T00:38:20.000Z | pd_multiprocessing/map.py | stavrakidis/pd_multiprocessing | f5737e907b59448fae0d2102a90f9db4d863418a | [
"MIT"
] | null | null | null | import os
import math
from concurrent.futures import ProcessPoolExecutor
import multiprocessing as mp
import logging
import pandas as pd
def df_map(func, df: pd.DataFrame, no_of_cores: int = None, no_of_cores_perc: float = None) -> pd.DataFrame:
"""
Maps function func to DataFrame df using multithreading
... | 36.320755 | 113 | 0.674805 | import os
import math
from concurrent.futures import ProcessPoolExecutor
import multiprocessing as mp
import logging
import pandas as pd
def df_map(func, df: pd.DataFrame, no_of_cores: int = None, no_of_cores_perc: float = None) -> pd.DataFrame:
"""
Maps function func to DataFrame df using multithreading
... | 0 | 0 | 0 |
f18cc174083e8b7a6086e82a39214edff0f35939 | 6,623 | py | Python | demo_half_whole.py | esw0116/Super-SloMo | 876f0f61b8365306cdadcde976c2ddc6a8e20bf8 | [
"MIT"
] | 1 | 2021-12-27T21:53:00.000Z | 2021-12-27T21:53:00.000Z | demo_half_whole.py | esw0116/Super-SloMo | 876f0f61b8365306cdadcde976c2ddc6a8e20bf8 | [
"MIT"
] | null | null | null | demo_half_whole.py | esw0116/Super-SloMo | 876f0f61b8365306cdadcde976c2ddc6a8e20bf8 | [
"MIT"
] | null | null | null |
#[Super SloMo]
##High Quality Estimation of Multiple Intermediate Frames for Video Interpolation
import argparse
import torch
import torchvision
import torchvision.transforms as transforms
import torch.nn as nn
from model import superslomo_half as superslomo
from model.extraction import center, ends, MPRNet
from ut... | 37.630682 | 140 | 0.633701 |
#[Super SloMo]
##High Quality Estimation of Multiple Intermediate Frames for Video Interpolation
import argparse
import torch
import torchvision
import torchvision.transforms as transforms
import torch.nn as nn
from model import superslomo_half as superslomo
from model.extraction import center, ends, MPRNet
from ut... | 3,721 | 0 | 23 |
360e15dc82db012c06e0ddb0475099b757e5c4d0 | 1,282 | py | Python | aigames/aigames/games/ttt/minmaxplayer.py | AlanCLo/play_ml | 2068231341a59cf610ef2a8d07de22c35acb1418 | [
"MIT"
] | null | null | null | aigames/aigames/games/ttt/minmaxplayer.py | AlanCLo/play_ml | 2068231341a59cf610ef2a8d07de22c35acb1418 | [
"MIT"
] | null | null | null | aigames/aigames/games/ttt/minmaxplayer.py | AlanCLo/play_ml | 2068231341a59cf610ef2a8d07de22c35acb1418 | [
"MIT"
] | null | null | null | from math import inf
from .player import AbstractPlayer, player_type
from .board import Outcome
@player_type
| 27.869565 | 67 | 0.562402 | from math import inf
from .player import AbstractPlayer, player_type
from .board import Outcome
def _minmax(is_player1, board, depth, is_max):
if depth == 0 or board.is_finished():
result = board.check_outcome()
if result == Outcome.DRAW:
return 0, None
elif is_player1 == (res... | 1,084 | 14 | 71 |
9fa18845b79ed070eedab9183ca15369a7440fab | 845 | py | Python | python/day03/3b.py | mkinsner/aoc2021 | b1d40114af1887e97d224e69cde9868bc6ba05ee | [
"Unlicense"
] | null | null | null | python/day03/3b.py | mkinsner/aoc2021 | b1d40114af1887e97d224e69cde9868bc6ba05ee | [
"Unlicense"
] | null | null | null | python/day03/3b.py | mkinsner/aoc2021 | b1d40114af1887e97d224e69cde9868bc6ba05ee | [
"Unlicense"
] | null | null | null | import numpy as np
import string as s
with open("input.txt") as f:
lines = f.readlines()
chars = [list(x.strip()) for x in lines]
oxy_arr = np.array(chars, dtype=int)
co2_arr = np.copy(oxy_arr)
num_cols = len(chars[0])
for i in range(num_cols):
keep_val = int(np.median(oxy_arr[:,i]) + 0.5) # +0.5 to... | 28.166667 | 86 | 0.617751 | import numpy as np
import string as s
with open("input.txt") as f:
lines = f.readlines()
chars = [list(x.strip()) for x in lines]
oxy_arr = np.array(chars, dtype=int)
co2_arr = np.copy(oxy_arr)
num_cols = len(chars[0])
for i in range(num_cols):
keep_val = int(np.median(oxy_arr[:,i]) + 0.5) # +0.5 to... | 0 | 0 | 0 |
b4caa1e94f1687aedabc82e654d0510152ac405b | 478 | py | Python | openredragon/console/commands/about.py | pavanad/openredragon | 4e9f8bfeebc19fe9dfa917e8f2284f6f97e4a208 | [
"MIT"
] | 3 | 2020-06-27T23:07:39.000Z | 2020-07-08T18:38:11.000Z | openredragon/console/commands/about.py | pavanad/openredragon | 4e9f8bfeebc19fe9dfa917e8f2284f6f97e4a208 | [
"MIT"
] | null | null | null | openredragon/console/commands/about.py | pavanad/openredragon | 4e9f8bfeebc19fe9dfa917e8f2284f6f97e4a208 | [
"MIT"
] | 1 | 2020-05-11T00:04:50.000Z | 2020-05-11T00:04:50.000Z | from cleo import Command
from pyfiglet import Figlet
| 29.875 | 139 | 0.661088 | from cleo import Command
from pyfiglet import Figlet
class AboutCommand(Command):
name = "about"
description = "Shows information about Open Redragon command line."
def handle(self):
custom_fig = Figlet(font='big')
title = custom_fig.renderText('Open Redragon')
self.line(
... | 276 | 126 | 23 |
4d0e9ae2320bbe5d9201f5e3952ed30edb810e83 | 8,154 | py | Python | rrsm.py | MTD-group/amlt | 568a37b06f2dd289d2b62c960406e3044195fb14 | [
"MIT"
] | 2 | 2020-07-15T20:11:41.000Z | 2022-03-31T17:47:38.000Z | rrsm.py | MTD-group/amlt | 568a37b06f2dd289d2b62c960406e3044195fb14 | [
"MIT"
] | null | null | null | rrsm.py | MTD-group/amlt | 568a37b06f2dd289d2b62c960406e3044195fb14 | [
"MIT"
] | 1 | 2019-05-02T22:05:37.000Z | 2019-05-02T22:05:37.000Z |
from ase.data import covalent_radii as ase_covalent_radii
from ase.data import chemical_symbols
default_element_radii = {}
default_hard_radii = {}
for z in range(len(ase_covalent_radii)):
default_element_radii[chemical_symbols[z]] = ase_covalent_radii[z]
default_hard_radii[chemical_symbols[z]] = 0.9*ase... | 32.746988 | 115 | 0.583027 |
def try_mkdir(structure_direct):
from os import mkdir
try:
mkdir(structure_direct)
except:
pass
from ase.data import covalent_radii as ase_covalent_radii
from ase.data import chemical_symbols
default_element_radii = {}
default_hard_radii = {}
for z in range(len(ase_covalent_radii)):... | 6,920 | 0 | 73 |
e5f68209ae2dd3629f46e4d16051d7920912d83c | 791 | py | Python | tests/augmentations/test_motionblur.py | datature/discolight | ad29e75b472cf892a087d23cc9436f47f1b15441 | [
"MIT"
] | 27 | 2020-07-23T08:09:25.000Z | 2022-03-01T08:24:43.000Z | tests/augmentations/test_motionblur.py | ghnreigns/discolight | 71ee176e0e58489867f21ddfcf8cce338631129c | [
"MIT"
] | 7 | 2020-08-05T07:26:55.000Z | 2020-12-31T04:20:40.000Z | tests/augmentations/test_motionblur.py | ghnreigns/discolight | 71ee176e0e58489867f21ddfcf8cce338631129c | [
"MIT"
] | 6 | 2020-07-27T04:30:01.000Z | 2020-08-13T02:39:25.000Z | import pytest
import numpy as np
from discolight.annotations import (annotations_to_numpy_array)
from discolight.augmentations.motionblur import MotionBlur, Direction
@pytest.mark.usefixtures("sample_image")
@pytest.mark.parametrize("direction", [
Direction.UP, Direction.DOWN, Direction.RIGHT, Direction.LEFT,
... | 30.423077 | 73 | 0.783818 | import pytest
import numpy as np
from discolight.annotations import (annotations_to_numpy_array)
from discolight.augmentations.motionblur import MotionBlur, Direction
@pytest.mark.usefixtures("sample_image")
@pytest.mark.parametrize("direction", [
Direction.UP, Direction.DOWN, Direction.RIGHT, Direction.LEFT,
... | 357 | 0 | 22 |
07df079d48ba8384415b650e186bd64622fd91b7 | 14,870 | py | Python | src/python/bezier/hazmat/clipping.py | KIKI007/bezier | 66c0fbe0eea1193c4b47e0f838bb27fc1a6ef60d | [
"Apache-2.0"
] | null | null | null | src/python/bezier/hazmat/clipping.py | KIKI007/bezier | 66c0fbe0eea1193c4b47e0f838bb27fc1a6ef60d | [
"Apache-2.0"
] | null | null | null | src/python/bezier/hazmat/clipping.py | KIKI007/bezier | 66c0fbe0eea1193c4b47e0f838bb27fc1a6ef60d | [
"Apache-2.0"
] | null | null | null | # 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 34.183908 | 79 | 0.615804 | # 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under t... | 0 | 0 | 0 |
4192cd8e6f947aef4dd57ac5d3d072e4209f9189 | 15,697 | py | Python | termpair/share.py | dumpmemory/termpair | 543d84af21e2892a8b6f177d1c397b88973b0e98 | [
"MIT"
] | null | null | null | termpair/share.py | dumpmemory/termpair | 543d84af21e2892a8b6f177d1c397b88973b0e98 | [
"MIT"
] | null | null | null | termpair/share.py | dumpmemory/termpair | 543d84af21e2892a8b6f177d1c397b88973b0e98 | [
"MIT"
] | null | null | null | """
Establish a websocket connection and replace local terminal with a pty
that sends all output to the server.
"""
import asyncio
import base64
import datetime
import json
import os
import pty
import signal
import ssl
import sys
import webbrowser
from math import floor
from typing import Callable, List, Optional
from... | 36.168203 | 103 | 0.558578 | """
Establish a websocket connection and replace local terminal with a pty
that sends all output to the server.
"""
import asyncio
import base64
import datetime
import json
import os
import pty
import signal
import ssl
import sys
import webbrowser
from math import floor
from typing import Callable, List, Optional
from... | 6,429 | 6,921 | 69 |
76af35b9da8f9fbd5ad085635e474a9edbeba94c | 769 | py | Python | agent/ccExceptions.py | gregdickason/consensuscircle | 28bdfb71691f91c8ff85aa600f3948f22d8935f0 | [
"MIT"
] | null | null | null | agent/ccExceptions.py | gregdickason/consensuscircle | 28bdfb71691f91c8ff85aa600f3948f22d8935f0 | [
"MIT"
] | 1 | 2019-12-01T11:16:59.000Z | 2019-12-01T11:16:59.000Z | agent/ccExceptions.py | gregdickason/consensuscircle | 28bdfb71691f91c8ff85aa600f3948f22d8935f0 | [
"MIT"
] | null | null | null | #!/usr/bin/python
class Error(Exception):
"""Base class for exceptions """
pass
class BlockError(Error):
"""Raised when Block processing fails. Rollback not required
Attributes:
reason -- what caused the block to fail (eg instruction that is invalid)
id -- id of the block that faile... | 24.806452 | 81 | 0.642393 | #!/usr/bin/python
class Error(Exception):
"""Base class for exceptions """
pass
class BlockError(Error):
"""Raised when Block processing fails. Rollback not required
Attributes:
reason -- what caused the block to fail (eg instruction that is invalid)
id -- id of the block that faile... | 138 | 0 | 54 |
fdbbab377e79bcf4c1f869fa04ed55959c69fd5a | 761 | py | Python | kgeditor/api_1_0/demo.py | LaiXinyi823/KGEditor | 953c2916c38906b0941c015136f80b2e64dd94f3 | [
"MIT"
] | 5 | 2021-01-12T01:27:29.000Z | 2022-03-18T04:25:35.000Z | kgeditor/api_1_0/demo.py | LaiXinyi823/KGEditor | 953c2916c38906b0941c015136f80b2e64dd94f3 | [
"MIT"
] | null | null | null | kgeditor/api_1_0/demo.py | LaiXinyi823/KGEditor | 953c2916c38906b0941c015136f80b2e64dd94f3 | [
"MIT"
] | 1 | 2021-06-22T08:20:05.000Z | 2021-06-22T08:20:05.000Z | import logging
from flask import jsonify
from kgeditor import db, models
from kgeditor.utils.common import login_required
from kgeditor.utils.response_code import RET
from kgeditor.models import Graph
from . import api
@api.route("/demo")
@api.route('/public_graph', methods=['GET'])
| 28.185185 | 64 | 0.700394 | import logging
from flask import jsonify
from kgeditor import db, models
from kgeditor.utils.common import login_required
from kgeditor.utils.response_code import RET
from kgeditor.models import Graph
from . import api
@api.route("/demo")
def index():
logging.debug('info msg')
logging.info('info msg')
logg... | 449 | 0 | 44 |
104f53d7f8f5a6c2441e805a1024dd1e26942cb8 | 207 | py | Python | ch06_dash_layout/circle_css/dash_layout_assets_style.py | Ethan0621/plotly-dash-dev | abe478824db1ee511a2d92f88e5dad49f5d6e27e | [
"MIT"
] | 21 | 2020-10-02T08:17:33.000Z | 2022-03-22T06:10:17.000Z | ch06_dash_layout/circle_css/dash_layout_assets_style.py | Ethan0621/plotly-dash-dev | abe478824db1ee511a2d92f88e5dad49f5d6e27e | [
"MIT"
] | 4 | 2019-07-18T04:43:31.000Z | 2021-10-31T10:30:25.000Z | ch06_dash_layout/circle_css/dash_layout_assets_style.py | Ethan0621/plotly-dash-dev | abe478824db1ee511a2d92f88e5dad49f5d6e27e | [
"MIT"
] | 12 | 2019-07-23T05:36:57.000Z | 2021-07-11T08:57:47.000Z | import dash
import dash_html_components as html
app = dash.Dash(__name__)
app.layout = html.Div([html.Div(className="circle")]) # className属性を設定
if __name__ == "__main__":
app.run_server(debug=True)
| 20.7 | 71 | 0.73913 | import dash
import dash_html_components as html
app = dash.Dash(__name__)
app.layout = html.Div([html.Div(className="circle")]) # className属性を設定
if __name__ == "__main__":
app.run_server(debug=True)
| 0 | 0 | 0 |
57ced8ede4c54e9cf9d5b1b5f3a8192195339a71 | 2,333 | py | Python | octokit/settings.py | irqed/octokit.py | 9598024110d22b7dc698327a61d03db3e0e059d1 | [
"MIT"
] | 3 | 2015-06-05T03:36:50.000Z | 2022-03-23T12:45:39.000Z | octokit/settings.py | irqed/octokit.py | 9598024110d22b7dc698327a61d03db3e0e059d1 | [
"MIT"
] | null | null | null | octokit/settings.py | irqed/octokit.py | 9598024110d22b7dc698327a61d03db3e0e059d1 | [
"MIT"
] | null | null | null | # encoding: utf-8
"""Settings class and default values for an API client.
"""
from os import environ
from .version import __version__
# Default API endpoint
API_ENDPOINT = "https://api.github.com/"
# Default WEB endpoint
WEB_ENDPOINT = "https://github.com"
# Default User Agent header string
USER_AGENT = "octokit.... | 27.77381 | 71 | 0.671239 | # encoding: utf-8
"""Settings class and default values for an API client.
"""
from os import environ
from .version import __version__
# Default API endpoint
API_ENDPOINT = "https://api.github.com/"
# Default WEB endpoint
WEB_ENDPOINT = "https://github.com"
# Default User Agent header string
USER_AGENT = "octokit.... | 961 | 0 | 26 |
97a2608580380efc2e2e2af2dbb236545d111996 | 1,037 | py | Python | powderday/gridstats.py | smlower/powderday | 99e7cec28bfbcba40ec1cff367fa564f51d9b62c | [
"BSD-3-Clause"
] | 18 | 2019-09-04T09:48:54.000Z | 2022-02-08T20:45:19.000Z | powderday/gridstats.py | smlower/powderday | 99e7cec28bfbcba40ec1cff367fa564f51d9b62c | [
"BSD-3-Clause"
] | 79 | 2019-09-05T15:09:02.000Z | 2022-02-25T13:29:51.000Z | powderday/gridstats.py | smlower/powderday | 99e7cec28bfbcba40ec1cff367fa564f51d9b62c | [
"BSD-3-Clause"
] | 14 | 2019-08-30T18:24:52.000Z | 2021-08-05T15:33:13.000Z | from __future__ import print_function
import numpy as np
| 30.5 | 70 | 0.540984 | from __future__ import print_function
import numpy as np
def gridstats(fc1,fw1):
volume = (fw1**3)
xmin = fc1[:,0]-fw1[:,0]/2.
xmax = fc1[:,0]+fw1[:,0]/2.
ymin = fc1[:,1]-fw1[:,1]/2.
ymax = fc1[:,1]+fw1[:,1]/2.
zmin = fc1[:,2]-fw1[:,2]/2.
zmax = fc1[:,2]+fw1[:,2]/2.
print ('-------... | 950 | 0 | 23 |
2116aece34c27c55e8e1dafd1ec4664b7d632b05 | 2,194 | py | Python | deeplearn/io.py | notallheroeswearcapes/ML_Ex3 | 420b815d6e86558e8272b51fcac8153ace06f534 | [
"MIT"
] | null | null | null | deeplearn/io.py | notallheroeswearcapes/ML_Ex3 | 420b815d6e86558e8272b51fcac8153ace06f534 | [
"MIT"
] | null | null | null | deeplearn/io.py | notallheroeswearcapes/ML_Ex3 | 420b815d6e86558e8272b51fcac8153ace06f534 | [
"MIT"
] | null | null | null | import numpy as np
import json
from pathlib import Path
from tensorflow import keras
| 37.186441 | 121 | 0.677302 | import numpy as np
import json
from pathlib import Path
from tensorflow import keras
def export_data(data, prefix, train_data=None, train_labels=None, test_data=None, test_labels=None):
if train_data is not None:
np.save('data/{}_{}_train_data'.format(data, prefix), train_data)
if train_labels is not ... | 1,941 | 0 | 161 |
0f1e89f133a0f47ef3f2604981cca82cdc85c730 | 8,544 | py | Python | ui/Ui_apiwindow.py | EUFAR/asmm-eufar | 69ede7a24f757392e63f04091e86c50ab129016f | [
"BSD-3-Clause"
] | null | null | null | ui/Ui_apiwindow.py | EUFAR/asmm-eufar | 69ede7a24f757392e63f04091e86c50ab129016f | [
"BSD-3-Clause"
] | 2 | 2015-06-12T09:28:29.000Z | 2015-06-12T09:34:16.000Z | ui/Ui_apiwindow.py | eufarn7sp/asmm-eufar | 69ede7a24f757392e63f04091e86c50ab129016f | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'apiwindow.ui'
#
# Created by: PyQt5 UI code generator 5.6
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
| 55.122581 | 965 | 0.708099 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'apiwindow.ui'
#
# Created by: PyQt5 UI code generator 5.6
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_apiWindow(object):
def setupUi(self, apiWindow):
apiWindow.s... | 8,223 | 6 | 76 |
37f7c8aa844f6c3a138611ccb45501a1375104fa | 1,134 | py | Python | old/pepper1/src/test/parser/test_quoted_code.py | andybalaam/pepper | f0d12379c7c6e2d82003c0c1d6130bfac685e1c3 | [
"MIT"
] | 2 | 2018-12-19T16:32:46.000Z | 2019-01-10T09:00:33.000Z | old/pepper1/src/test/parser/test_quoted_code.py | andybalaam/pepper | f0d12379c7c6e2d82003c0c1d6130bfac685e1c3 | [
"MIT"
] | null | null | null | old/pepper1/src/test/parser/test_quoted_code.py | andybalaam/pepper | f0d12379c7c6e2d82003c0c1d6130bfac685e1c3 | [
"MIT"
] | null | null | null | # Copyright (C) 2012 Andy Balaam and The Pepper Developers
# Released under the MIT License. See the file COPYING.txt for details.
from assert_parser_result import assert_parser_result
from assert_parser_result import assert_parser_result_from_code
| 17.181818 | 72 | 0.559965 | # Copyright (C) 2012 Andy Balaam and The Pepper Developers
# Released under the MIT License. See the file COPYING.txt for details.
from assert_parser_result import assert_parser_result
from assert_parser_result import assert_parser_result_from_code
def test_quoted_sum():
assert_parser_result(
r"""
0001:0... | 832 | 0 | 46 |
707705c057111731ef5e1a07bc276225b62c6207 | 787 | py | Python | django_hello/migrations/0003_auto_20210213_1835.py | andyanday33/python-docs-hello-django | 4641ec085e00c9e6c310629ae493c3786871807b | [
"MIT"
] | null | null | null | django_hello/migrations/0003_auto_20210213_1835.py | andyanday33/python-docs-hello-django | 4641ec085e00c9e6c310629ae493c3786871807b | [
"MIT"
] | null | null | null | django_hello/migrations/0003_auto_20210213_1835.py | andyanday33/python-docs-hello-django | 4641ec085e00c9e6c310629ae493c3786871807b | [
"MIT"
] | null | null | null | # Generated by Django 3.1.6 on 2021-02-13 15:35
from django.db import migrations, models
import django.db.models.deletion
| 31.48 | 171 | 0.636595 | # Generated by Django 3.1.6 on 2021-02-13 15:35
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0002_auto_20210213_1408'),
]
operations = [
migrations.AlterField(
model_name='oeauser'... | 0 | 640 | 23 |
e7f76e57c7391a3b27d98ce108d77bb81be6628e | 1,429 | py | Python | 02_some_web_anti-crawl_cases/CSS_offset/case.py | zlj-zz/anti-crawlCase | a6ed670ad332bd456572eeff707bd5fc14186b3d | [
"MIT"
] | 1 | 2020-04-23T23:34:14.000Z | 2020-04-23T23:34:14.000Z | 02_some_web_anti-crawl_cases/CSS_offset/case.py | zlj-zz/Anti-crawlCase | a6ed670ad332bd456572eeff707bd5fc14186b3d | [
"MIT"
] | null | null | null | 02_some_web_anti-crawl_cases/CSS_offset/case.py | zlj-zz/Anti-crawlCase | a6ed670ad332bd456572eeff707bd5fc14186b3d | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:UTF-8 -*-
__author__ = 'zachary'
"""
File Name: case.py
Created Time: 2020-04-04 19:32:10
Last Modified:
"""
import requests
import os
import re
from parsel import Selector
if __name__ == "__main__":
# url = ''
# resp = requests.get(url)
resp = open('./html/flight.html... | 29.163265 | 74 | 0.552834 | #!/usr/bin/env python3
# -*- coding:UTF-8 -*-
__author__ = 'zachary'
"""
File Name: case.py
Created Time: 2020-04-04 19:32:10
Last Modified:
"""
import requests
import os
import re
from parsel import Selector
if __name__ == "__main__":
# url = ''
# resp = requests.get(url)
resp = open('./html/flight.html... | 0 | 0 | 0 |
b1b74d3e60337f0c5116a05da4c08c36f5421efa | 2,953 | py | Python | hmslearn/tests/pubsub.py | vramesh/factor-graph-compute | ea8b94b63a44c99aa279333444e4852ba7dca728 | [
"MIT"
] | 11 | 2018-03-03T18:27:47.000Z | 2020-08-01T13:09:45.000Z | hmslearn/tests/pubsub.py | vramesh/factor-graph-compute | ea8b94b63a44c99aa279333444e4852ba7dca728 | [
"MIT"
] | 24 | 2018-03-02T19:48:45.000Z | 2018-05-04T20:19:43.000Z | hmslearn/tests/pubsub.py | vramesh/factor-graph-compute | ea8b94b63a44c99aa279333444e4852ba7dca728 | [
"MIT"
] | null | null | null | import unittest
import mock
from Pubsub import Publisher, Broker, Channel, Subscriber
if __name__ == '__main__':
unittest.main()
| 31.752688 | 79 | 0.700982 | import unittest
import mock
from Pubsub import Publisher, Broker, Channel, Subscriber
class TestPublisher(unittest.TestCase):
@mock.patch('pubsub.Broker')
def setUp(self, mock_broker):
self.broker = mock_broker.return_value
publisher_id = 0
self.publisher = Publisher(publisher_id)
... | 2,110 | 636 | 69 |
33fce700aecb0bef227d4bd402737aaeb254d541 | 106 | py | Python | tests/test_models.py | DSPsleeporg/an_spindle | bebe90434628b8d50a2a7fcf5fb131fc5108a623 | [
"BSD-3-Clause"
] | null | null | null | tests/test_models.py | DSPsleeporg/an_spindle | bebe90434628b8d50a2a7fcf5fb131fc5108a623 | [
"BSD-3-Clause"
] | null | null | null | tests/test_models.py | DSPsleeporg/an_spindle | bebe90434628b8d50a2a7fcf5fb131fc5108a623 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from anmodel import models
| 13.25 | 28 | 0.632075 | # -*- coding: utf-8 -*-
from anmodel import models
class TestANmodel:
model = models.ANmodel()
| 0 | 26 | 23 |
0387d38e2ca66b86d6d6883da1f3d0f051e405bd | 6,357 | py | Python | scheduler.py | jpagnano/csci_330_Round_Robin | aa375107e2451ba0a776ac7ff1c04e7fd7b40b12 | [
"MIT"
] | null | null | null | scheduler.py | jpagnano/csci_330_Round_Robin | aa375107e2451ba0a776ac7ff1c04e7fd7b40b12 | [
"MIT"
] | null | null | null | scheduler.py | jpagnano/csci_330_Round_Robin | aa375107e2451ba0a776ac7ff1c04e7fd7b40b12 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
'''
Adam Saland
CSCI 330
Command line interface for cpu scheduling simulations
'''
import sys
from optparse import OptionParser
import random
parser = OptionParser()
parser.add_option("-s", "--seed", default=0, help="random", action="store", type="int", dest="seed")
parser.add_option("-p", "--pr... | 41.279221 | 166 | 0.605946 | #! /usr/bin/env python
'''
Adam Saland
CSCI 330
Command line interface for cpu scheduling simulations
'''
import sys
from optparse import OptionParser
import random
parser = OptionParser()
parser.add_option("-s", "--seed", default=0, help="random", action="store", type="int", dest="seed")
parser.add_option("-p", "--pr... | 0 | 0 | 0 |
c1f20e81d834ea6b27d2c2a9ed517e06e7b7ef55 | 5,213 | py | Python | test/test_logging.py | jschuhmac/qiskit-nature | b8b1181d951cf8fa76fe0db9e5ea192dad5fb186 | [
"Apache-2.0"
] | null | null | null | test/test_logging.py | jschuhmac/qiskit-nature | b8b1181d951cf8fa76fe0db9e5ea192dad5fb186 | [
"Apache-2.0"
] | null | null | null | test/test_logging.py | jschuhmac/qiskit-nature | b8b1181d951cf8fa76fe0db9e5ea192dad5fb186 | [
"Apache-2.0"
] | null | null | null | # This code is part of Qiskit.
#
# (C) Copyright IBM 2022.
#
# 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 modifications or derivative wo... | 35.705479 | 95 | 0.648187 | # This code is part of Qiskit.
#
# (C) Copyright IBM 2022.
#
# 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 modifications or derivative wo... | 1,662 | 0 | 108 |
e8d19429038cca62dee85df277b031d1349516e9 | 468 | py | Python | service/config.py | bkosciow/tenchi | 91be84169c72d470c72cb706cde7d31d337c0f7a | [
"MIT"
] | null | null | null | service/config.py | bkosciow/tenchi | 91be84169c72d470c72cb706cde7d31d337c0f7a | [
"MIT"
] | null | null | null | service/config.py | bkosciow/tenchi | 91be84169c72d470c72cb706cde7d31d337c0f7a | [
"MIT"
] | null | null | null | from configparser import ConfigParser
| 21.272727 | 86 | 0.589744 | from configparser import ConfigParser
class Config(object):
data = {}
file = "config.ini"
def __init__(self):
pass
def get(self, key, default=None):
section = 'general'
if "." in key:
section, key = key.split(".")
return self.data.get(section, key) if self... | 269 | 136 | 23 |
410cd2c706de69d215ada27599cfbe9e67c7f75c | 1,516 | py | Python | tests/test_config.py | IfengAutomation/uitester | 6f9c78c86965b05efea875d38dbd9587386977fa | [
"Apache-2.0"
] | 4 | 2016-07-12T09:01:52.000Z | 2016-12-07T03:11:02.000Z | tests/test_config.py | IfengAutomation/uitester | 6f9c78c86965b05efea875d38dbd9587386977fa | [
"Apache-2.0"
] | null | null | null | tests/test_config.py | IfengAutomation/uitester | 6f9c78c86965b05efea875d38dbd9587386977fa | [
"Apache-2.0"
] | 3 | 2016-11-29T02:13:17.000Z | 2019-10-16T06:25:20.000Z | import unittest
import os
import json
from uitester import config
| 31.583333 | 96 | 0.641161 | import unittest
import os
import json
from uitester import config
class TestConfig(unittest.TestCase):
def setUp(self):
self.root_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), os.path.pardir)
self.conf_path = os.path.join(self.root_dir, 'config')
def test_config_path(self):
... | 1,276 | 15 | 158 |
52bc711fdace85d5bc553bea493b581e378b84d7 | 2,753 | py | Python | meross_iot/controller/known/strips.py | mjrinker/MerossIot | 69deebfc6326e82d35e74ed945230c1933291471 | [
"MIT"
] | null | null | null | meross_iot/controller/known/strips.py | mjrinker/MerossIot | 69deebfc6326e82d35e74ed945230c1933291471 | [
"MIT"
] | null | null | null | meross_iot/controller/known/strips.py | mjrinker/MerossIot | 69deebfc6326e82d35e74ed945230c1933291471 | [
"MIT"
] | null | null | null | from meross_iot.controller.device import BaseDevice
from meross_iot.controller.mixins.toggle import ToggleXMixin
class MSS420F(ToggleXMixin, BaseDevice):
"""
MSS420F power strip
"""
class MSS425E(ToggleXMixin, BaseDevice):
"""
MSS425E power strip
"""
class MSS425F(ToggleXMixin, BaseDevice)... | 34.848101 | 60 | 0.396658 | from meross_iot.controller.device import BaseDevice
from meross_iot.controller.mixins.toggle import ToggleXMixin
class MSS420F(ToggleXMixin, BaseDevice):
"""
MSS420F power strip
"""
def __init__(self, device_uuid: str, manager, **kwargs):
if 'channels' not in kwargs:
kwargs['channe... | 2,186 | 0 | 104 |
9b22a81a0c913a96a8795a8ae2e21f66e1f812f6 | 4,371 | py | Python | src/language/bootstrap.py | fritzo/pomagma | 224bb6adab3fc68e2d853e6365b4b86a8f7f468f | [
"Apache-2.0"
] | 10 | 2015-06-09T00:25:01.000Z | 2019-06-11T16:07:31.000Z | src/language/bootstrap.py | fritzo/pomagma | 224bb6adab3fc68e2d853e6365b4b86a8f7f468f | [
"Apache-2.0"
] | 25 | 2015-03-23T23:16:01.000Z | 2017-08-29T03:35:59.000Z | src/language/bootstrap.py | fritzo/pomagma | 224bb6adab3fc68e2d853e6365b4b86a8f7f468f | [
"Apache-2.0"
] | null | null | null | import os
from math import exp
from parsable import parsable
import pomagma.util
import util
SPECS = {}
SPECS['sk'] = {
'binary_probs': {
'APP': 0.374992,
'COMP': 0.198589,
},
'nullary_weights': {
'B': 1.0,
'C': 1.30428,
'CB': 1.35451,
'CI': 1.74145,
... | 21.855 | 78 | 0.42782 | import os
from math import exp
from parsable import parsable
import pomagma.util
import util
SPECS = {}
SPECS['sk'] = {
'binary_probs': {
'APP': 0.374992,
'COMP': 0.198589,
},
'nullary_weights': {
'B': 1.0,
'C': 1.30428,
'CB': 1.35451,
'CI': 1.74145,
... | 0 | 0 | 0 |
43efedfa2368b98cdf0833e9540814cae94fcb57 | 3,297 | py | Python | evaluation.py | karan-deepsync/FastSpeech2 | 84ad261db4a865536b2e15dfb8346644c3192704 | [
"Apache-2.0"
] | 148 | 2020-07-04T15:28:44.000Z | 2022-03-30T15:23:06.000Z | evaluation.py | karan-deepsync/FastSpeech2 | 84ad261db4a865536b2e15dfb8346644c3192704 | [
"Apache-2.0"
] | 13 | 2020-07-05T16:22:52.000Z | 2021-12-26T06:19:10.000Z | evaluation.py | karan-deepsync/FastSpeech2 | 84ad261db4a865536b2e15dfb8346644c3192704 | [
"Apache-2.0"
] | 33 | 2020-07-04T15:38:15.000Z | 2022-03-30T08:10:20.000Z | import configargparse
from dataset import dataloader as loader
from fastspeech import FeedForwardTransformer
import sys
import torch
from dataset.texts import valid_symbols
import os
from utils.hparams import HParam, load_hparam_str
import numpy as np
def get_parser():
"""Get parser of training arguments."""
... | 32.323529 | 188 | 0.640582 | import configargparse
from dataset import dataloader as loader
from fastspeech import FeedForwardTransformer
import sys
import torch
from dataset.texts import valid_symbols
import os
from utils.hparams import HParam, load_hparam_str
import numpy as np
def evaluate(hp, validloader, model):
energy_diff = list()
... | 1,339 | 0 | 23 |
33c164e41d222026d0ccc1f0332d3ec427b4e155 | 313 | py | Python | AppDB/cassandra/repair_cassandra.py | eabyshev/appscale | 1cfb5a609130f415143ec76718e839b0f73ac668 | [
"Apache-2.0"
] | 2 | 2018-10-09T17:48:12.000Z | 2019-01-15T10:18:19.000Z | AppDB/cassandra/repair_cassandra.py | eabyshev/appscale | 1cfb5a609130f415143ec76718e839b0f73ac668 | [
"Apache-2.0"
] | null | null | null | AppDB/cassandra/repair_cassandra.py | eabyshev/appscale | 1cfb5a609130f415143ec76718e839b0f73ac668 | [
"Apache-2.0"
] | 1 | 2021-11-23T08:30:52.000Z | 2021-11-23T08:30:52.000Z | """ A test script to repair cassandra. """
import logging
from cassandra_interface import NODE_TOOL
from subprocess import call
def run():
""" Starts up cassandra. """
logging.warning("Repairing Cassandra")
call([NODE_TOOL, 'repair'])
logging.warning("Done!")
if __name__ == '__main__':
run()
| 20.866667 | 42 | 0.690096 | """ A test script to repair cassandra. """
import logging
from cassandra_interface import NODE_TOOL
from subprocess import call
def run():
""" Starts up cassandra. """
logging.warning("Repairing Cassandra")
call([NODE_TOOL, 'repair'])
logging.warning("Done!")
if __name__ == '__main__':
run()
| 0 | 0 | 0 |
0920679c9d4eddccd5312ac5b9c889984b1694b9 | 2,415 | py | Python | nesi/vendors/Alcatel/adminCommandProcessor.py | inexio/NESi | 920b23ccaf293733b4b571e4df27929c036257f7 | [
"BSD-2-Clause"
] | 30 | 2020-09-03T06:02:38.000Z | 2022-03-11T16:34:18.000Z | vendors/Alcatel/adminCommandProcessor.py | Tubbz-alt/NESi | 0db169dd6378fbd097380280cc41440e652de19e | [
"BSD-2-Clause"
] | 2 | 2021-01-15T10:33:23.000Z | 2021-02-21T21:04:37.000Z | vendors/Alcatel/adminCommandProcessor.py | Tubbz-alt/NESi | 0db169dd6378fbd097380280cc41440e652de19e | [
"BSD-2-Clause"
] | 3 | 2020-12-19T09:11:19.000Z | 2022-02-07T22:15:34.000Z | # This file is part of the NESi software.
#
# Copyright (c) 2020
# Original Software Design by Ilya Etingof <https://github.com/etingof>.
#
# Software adapted by inexio <https://github.com/inexio>.
# - Janis Groß <https://github.com/unkn0wn-user>
# - Philip Konrath <https://github.com/Connyko65>
# - Alexander Dincher <... | 36.044776 | 95 | 0.624017 | # This file is part of the NESi software.
#
# Copyright (c) 2020
# Original Software Design by Ilya Etingof <https://github.com/etingof>.
#
# Software adapted by inexio <https://github.com/inexio>.
# - Janis Groß <https://github.com/unkn0wn-user>
# - Philip Konrath <https://github.com/Connyko65>
# - Alexander Dincher <... | 1,696 | 40 | 104 |
fe3063362791da33d2ff10ff809a0a5095d205e4 | 5,095 | py | Python | Immigration_Learning/gym-cityflow/gym-cityflow/envs/cityflow_env.py | hrushikeshjadhav9/Multi-Commander | 08cdd24e282c122b8c9758ff0cb92cb600cbbbba | [
"Apache-2.0"
] | 79 | 2019-07-25T02:40:59.000Z | 2022-03-11T02:26:09.000Z | Immigration_Learning/gym-cityflow/gym-cityflow/envs/cityflow_env.py | hrushikeshjadhav9/Multi-Commander | 08cdd24e282c122b8c9758ff0cb92cb600cbbbba | [
"Apache-2.0"
] | 10 | 2019-07-26T12:12:34.000Z | 2021-03-02T12:08:20.000Z | Immigration_Learning/gym-cityflow/gym-cityflow/envs/cityflow_env.py | hrushikeshjadhav9/Multi-Commander | 08cdd24e282c122b8c9758ff0cb92cb600cbbbba | [
"Apache-2.0"
] | 23 | 2019-07-26T12:10:57.000Z | 2022-03-10T07:30:39.000Z | import gym
from gym import error, spaces, utils
from gym.utils import seeding
#
import cityflow
import pandas as pd
import os
import numpy as np
import json
import math
from gym.spaces import Discrete, Box
# metadata = {'render.modes': ['human']}
# def render(self, mode='human', close=False):
... | 39.804688 | 124 | 0.622964 | import gym
from gym import error, spaces, utils
from gym.utils import seeding
#
import cityflow
import pandas as pd
import os
import numpy as np
import json
import math
from gym.spaces import Discrete, Box
class CityflowGymEnv(gym.Env):
# metadata = {'render.modes': ['human']}
def __init__(se... | 4,525 | 9 | 227 |
616e1477ef784eca1bbdc5ce5c90cceb48de42d9 | 9,908 | py | Python | couchbase/result.py | griels/couchbase-python-client-ng | bcda55109f82e41041cf727d604bb335546f64e4 | [
"Apache-2.0"
] | null | null | null | couchbase/result.py | griels/couchbase-python-client-ng | bcda55109f82e41041cf727d604bb335546f64e4 | [
"Apache-2.0"
] | null | null | null | couchbase/result.py | griels/couchbase-python-client-ng | bcda55109f82e41041cf727d604bb335546f64e4 | [
"Apache-2.0"
] | null | null | null | from couchbase_core.subdocument import Spec
from .options import Seconds, FiniteDuration, forward_args
from couchbase_core.transcodable import Transcodable
from couchbase_core._libcouchbase import Result as SDK2Result
from couchbase_core.result import MultiResult, SubdocResult
from typing import *
from boltons.funcutil... | 27.445983 | 137 | 0.599011 | from couchbase_core.subdocument import Spec
from .options import Seconds, FiniteDuration, forward_args
from couchbase_core.transcodable import Transcodable
from couchbase_core._libcouchbase import Result as SDK2Result
from couchbase_core.result import MultiResult, SubdocResult
from typing import *
from boltons.funcutil... | 5,734 | 2,560 | 953 |
891301b752f8660a2377f291dc297f95ab079e44 | 279 | py | Python | scripts/core/neural_networks/base_solution.py | hcngdaniel/home_service_robot | 18cc376097b33b5cab9efcd8f63c38a6bdc4b5c2 | [
"MIT"
] | null | null | null | scripts/core/neural_networks/base_solution.py | hcngdaniel/home_service_robot | 18cc376097b33b5cab9efcd8f63c38a6bdc4b5c2 | [
"MIT"
] | null | null | null | scripts/core/neural_networks/base_solution.py | hcngdaniel/home_service_robot | 18cc376097b33b5cab9efcd8f63c38a6bdc4b5c2 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
from abc import ABC
import typing
| 19.928571 | 45 | 0.637993 | #!/usr/bin/env python3
from abc import ABC
import typing
class BaseSolution(ABC):
def __init__(self):
self.name: str = ""
self.result = None
self.result_topic: typing.AnyStr = ""
def __callback__(self, msg):
raise NotImplementedError()
| 142 | 3 | 76 |
fd3cb3ee698355a65eee213347db9934c2c4c1da | 1,369 | py | Python | git_commit_all.py | sirius0xff/ahk | 4eb948b898d65b7bbf970d7d5fe5888ae79311ef | [
"BSD-3-Clause"
] | null | null | null | git_commit_all.py | sirius0xff/ahk | 4eb948b898d65b7bbf970d7d5fe5888ae79311ef | [
"BSD-3-Clause"
] | null | null | null | git_commit_all.py | sirius0xff/ahk | 4eb948b898d65b7bbf970d7d5fe5888ae79311ef | [
"BSD-3-Clause"
] | null | null | null | import os
import subprocess
from datetime import datetime
from time import time
from os.path import isdir, exists, join, abspath
main()
# os.chdir(r'C:\Users\SANA-Sirius\Desktop\Software\AutoHotkey\repo')
# main()
if __name__ == '__main__':
input()
| 27.938776 | 89 | 0.548576 | import os
import subprocess
from datetime import datetime
from time import time
from os.path import isdir, exists, join, abspath
def main():
now = datetime.now()
# input(os.getcwd())
# @echo off
# for /f "delims=" %%a in ('wmic OS Get localdatetime ^| find "."') do set "dt=%%a"
# set ... | 1,073 | 0 | 25 |
eb6c01d75c356eeeb2401d9246ffdd7d5c0ee77c | 8,194 | py | Python | src/test/test_parser.py | GiselleSerate/pandorica | 4f0b6e87c49c1d4461eafbbff375e393d2ae1b52 | [
"Apache-2.0"
] | 1 | 2019-05-23T23:46:37.000Z | 2019-05-23T23:46:37.000Z | src/test/test_parser.py | GiselleSerate/pandorica | 4f0b6e87c49c1d4461eafbbff375e393d2ae1b52 | [
"Apache-2.0"
] | 19 | 2019-06-30T00:35:37.000Z | 2019-08-09T00:00:40.000Z | src/test/test_parser.py | GiselleSerate/pandorica | 4f0b6e87c49c1d4461eafbbff375e393d2ae1b52 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2019, Palo Alto Networks
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS... | 39.776699 | 119 | 0.668782 | # Copyright (c) 2019, Palo Alto Networks
#
# Permission to use, copy, modify, and/or distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS... | 5,550 | 0 | 46 |
67dd4a66036ac62e8de011bcfc23189f2821636a | 5,808 | py | Python | app/user/test/test_user_api.py | PythonDjangoJavascript/advanced_django_rest_api_with_tdd | c647208f4e7a3b40785321bee7963fa64701d8f5 | [
"MIT"
] | null | null | null | app/user/test/test_user_api.py | PythonDjangoJavascript/advanced_django_rest_api_with_tdd | c647208f4e7a3b40785321bee7963fa64701d8f5 | [
"MIT"
] | null | null | null | app/user/test/test_user_api.py | PythonDjangoJavascript/advanced_django_rest_api_with_tdd | c647208f4e7a3b40785321bee7963fa64701d8f5 | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.contrib.auth import get_user_model
from django.urls import reverse
from rest_framework.test import APIClient
from rest_framework import status
CREATE_USER_URL = reverse("user:create")
TOKEN_URL = reverse("user:token")
ME_URL = reverse("user:me")
# defining create here to... | 31.225806 | 78 | 0.62896 | from django.test import TestCase
from django.contrib.auth import get_user_model
from django.urls import reverse
from rest_framework.test import APIClient
from rest_framework import status
CREATE_USER_URL = reverse("user:create")
TOKEN_URL = reverse("user:token")
ME_URL = reverse("user:me")
# defining create here to... | 349 | 0 | 27 |
45bdcd85b816f24d52aaef80793d099614fc9b71 | 1,718 | py | Python | examples/attic/replay_model.py | leonmkim/gym-kuka-mujoco | ed45ae74d10e69f4e51439de2d1d0c0811623b6b | [
"MIT"
] | 23 | 2019-03-12T21:19:12.000Z | 2022-03-08T15:03:40.000Z | examples/attic/replay_model.py | hzm2016/gym-kuka-mujoco | a8a40bb08a1a1a269a2386ca0d102d62d8384206 | [
"MIT"
] | 16 | 2019-04-21T17:50:13.000Z | 2022-03-11T23:40:29.000Z | examples/attic/replay_model.py | hzm2016/gym-kuka-mujoco | a8a40bb08a1a1a269a2386ca0d102d62d8384206 | [
"MIT"
] | 14 | 2019-05-21T08:56:43.000Z | 2021-12-31T04:23:29.000Z | import os
from datetime import datetime
import gym
import gym_kuka_mujoco
import numpy as np
from stable_baselines import PPO2
from stable_baselines.common.vec_env import DummyVecEnv, SubprocVecEnv, VecNormalize
from stable_baselines.common.policies import MlpPolicy
if __name__=='__main__':
# Visualize the solut... | 44.051282 | 178 | 0.69092 | import os
from datetime import datetime
import gym
import gym_kuka_mujoco
import numpy as np
from stable_baselines import PPO2
from stable_baselines.common.vec_env import DummyVecEnv, SubprocVecEnv, VecNormalize
from stable_baselines.common.policies import MlpPolicy
def replay_model(env, model):
obs = env.reset(... | 310 | 0 | 23 |
ef7fefb8cd566da8f4b82c2a0c138a53147dc9c5 | 1,416 | py | Python | HotCIDR/hotcidr/notifyemail.py | Viasat/hotcidr | 7055a13f949d2fa5bb31cad9b64763e4e6bbbc8b | [
"Apache-2.0"
] | 1 | 2018-03-13T23:06:45.000Z | 2018-03-13T23:06:45.000Z | HotCIDR/hotcidr/notifyemail.py | Viasat/hotcidr | 7055a13f949d2fa5bb31cad9b64763e4e6bbbc8b | [
"Apache-2.0"
] | null | null | null | HotCIDR/hotcidr/notifyemail.py | Viasat/hotcidr | 7055a13f949d2fa5bb31cad9b64763e4e6bbbc8b | [
"Apache-2.0"
] | 2 | 2020-02-26T09:01:39.000Z | 2021-10-30T21:34:36.000Z | from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.Utils import formatdate
import smtplib
date_fmt = '%m/%d/%y %H:%M'
| 29.5 | 193 | 0.685734 | from email.mime.text import MIMEText
from email.mime.multipart import MIMEMultipart
from email.Utils import formatdate
import smtplib
date_fmt = '%m/%d/%y %H:%M'
def notifyGitBypass(ruleDict):
me = '__FILL_IN_HERE__'
to = ['__FILL_IN_HERE__']
# Create the container (outer) email message.
msg = MIME... | 1,229 | 0 | 23 |
783afb7a90e955b71b85a1d2ef55694cc20a13e9 | 1,188 | py | Python | hubcheck/pageobjects/widgets/login_remind_form.py | codedsk/hubcheck | 2ff506eb56ba00f035300862f8848e4168452a17 | [
"MIT"
] | 1 | 2016-02-13T13:42:23.000Z | 2016-02-13T13:42:23.000Z | hubcheck/pageobjects/widgets/login_remind_form.py | codedsk/hubcheck | 2ff506eb56ba00f035300862f8848e4168452a17 | [
"MIT"
] | null | null | null | hubcheck/pageobjects/widgets/login_remind_form.py | codedsk/hubcheck | 2ff506eb56ba00f035300862f8848e4168452a17 | [
"MIT"
] | null | null | null | from hubcheck.pageobjects.widgets.form_base import FormBase
from hubcheck.pageobjects.basepageelement import Text
class LoginRemindForm_Locators_Base(object):
"""locators for LoginRemindForm object"""
locators = {
'base' : "css=#hubForm",
'email' : "css=#email",
'submit' :... | 28.97561 | 78 | 0.6633 | from hubcheck.pageobjects.widgets.form_base import FormBase
from hubcheck.pageobjects.basepageelement import Text
class LoginRemindForm(FormBase):
def __init__(self, owner, locatordict={}):
super(LoginRemindForm,self).__init__(owner,locatordict)
# load hub's classes
LoginRemindForm_Locator... | 628 | 183 | 23 |
e1538cfc175be1b3bb705676e112ce099005815b | 2,600 | py | Python | proxypool/tester.py | cxapython/ProxyPoolByMe | d6cd5b07b769eabd955b8c6539aae4d805342acc | [
"Apache-2.0"
] | 4 | 2019-09-03T10:21:50.000Z | 2020-05-06T06:02:31.000Z | proxypool/tester.py | cxapython/ProxyPoolByMe | d6cd5b07b769eabd955b8c6539aae4d805342acc | [
"Apache-2.0"
] | 6 | 2021-03-31T19:15:26.000Z | 2022-03-22T20:59:22.000Z | proxypool/tester.py | cxapython/ProxyPoolByMe | d6cd5b07b769eabd955b8c6539aae4d805342acc | [
"Apache-2.0"
] | 1 | 2020-06-07T17:59:04.000Z | 2020-06-07T17:59:04.000Z | import asyncio
import aiohttp
import time
from aiohttp_requests import requests
try:
from aiohttp import ClientError
except:
from aiohttp import ClientProxyConnectionError as ProxyConnectionError
from proxypool.db import RedisClient
from proxypool.setting import *
if __name__ == '__main__':
Tester().run... | 33.766234 | 150 | 0.564231 | import asyncio
import aiohttp
import time
from aiohttp_requests import requests
try:
from aiohttp import ClientError
except:
from aiohttp import ClientProxyConnectionError as ProxyConnectionError
from proxypool.db import RedisClient
from proxypool.setting import *
class Tester(object):
def __init__(self)... | 33 | 2,329 | 23 |
04a342c5282d6386c5a883bfa9cb2b62f43a7ca4 | 351 | py | Python | py_thread_exit.py | linux-downey/AMG8833_ALGO | 475abbbf0cbe850c4d01f24aa3172eccbcd18974 | [
"MIT"
] | null | null | null | py_thread_exit.py | linux-downey/AMG8833_ALGO | 475abbbf0cbe850c4d01f24aa3172eccbcd18974 | [
"MIT"
] | null | null | null | py_thread_exit.py | linux-downey/AMG8833_ALGO | 475abbbf0cbe850c4d01f24aa3172eccbcd18974 | [
"MIT"
] | null | null | null | import threading
import signal
import os
import time
P1 = threading.Thread(target = func)
P1.start()
P1.join()
print "fuck!!!!!"
while 1:
pass
| 11.7 | 39 | 0.612536 | import threading
import signal
import os
import time
def handle(signum,frame):
print "fuck!!"
print signum
os._exit(0)
def func():
signal.signal(signal.SIGINT,handle)
print "hello!!!"
while 1:
time.sleep(1)
P1 = threading.Thread(target = func)
P1.start()
P1.join()
print ... | 142 | 0 | 46 |
a860171719c851ec7bce0998914369ebcf322375 | 501 | py | Python | project/newsfeed/migrations/0002_field_string_attributes_to_unicode.py | beijbom/coralnet | c3f4a44eeb60cb41a079329a0068dc8b34096e89 | [
"BSD-2-Clause"
] | 31 | 2019-12-08T14:22:52.000Z | 2021-12-27T04:58:12.000Z | project/newsfeed/migrations/0002_field_string_attributes_to_unicode.py | beijbom/coralnet | c3f4a44eeb60cb41a079329a0068dc8b34096e89 | [
"BSD-2-Clause"
] | 193 | 2019-12-07T23:27:43.000Z | 2022-03-05T08:05:46.000Z | project/newsfeed/migrations/0002_field_string_attributes_to_unicode.py | beijbom/coralnet | c3f4a44eeb60cb41a079329a0068dc8b34096e89 | [
"BSD-2-Clause"
] | null | null | null | # Generated by Django 1.11.29 on 2020-06-18 18:26
from django.db import migrations, models
| 27.833333 | 170 | 0.586826 | # Generated by Django 1.11.29 on 2020-06-18 18:26
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('newsfeed', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='newsitem',
name='category',
... | 0 | 386 | 23 |
579f74aa3a3ae12dfc4ea59ca07da7c9abc0da60 | 2,238 | py | Python | tests/test_manager/test_base.py | klen/peewee-aio | 723c5f5333f5a814fefe682b175faadb9e86f747 | [
"MIT"
] | 5 | 2021-09-07T13:39:47.000Z | 2022-01-14T16:01:26.000Z | tests/test_manager/test_base.py | klen/peewee-aio | 723c5f5333f5a814fefe682b175faadb9e86f747 | [
"MIT"
] | 1 | 2021-11-01T06:28:12.000Z | 2021-11-01T12:05:50.000Z | tests/test_manager/test_base.py | klen/peewee-aio | 723c5f5333f5a814fefe682b175faadb9e86f747 | [
"MIT"
] | null | null | null | import pytest
import peewee
| 28.329114 | 67 | 0.634942 | import pytest
import peewee
async def test_manager(manager, User, transaction):
assert manager.current_conn
# Execute
await manager.execute(User.insert(name='Mickey'))
await manager.execute(User.insert(name='John'))
await manager.execute(User.insert(name='Timmy'))
# Fetchval
data = await... | 2,162 | 0 | 46 |
1e5ee63bc6409921e28d2e0b2328b321b0f0c383 | 960 | py | Python | NSE_Data_Science_001/NSE01-venv/Lib/site-packages/nsepy/derivatives/archives.py | Stoned-KING/Python_Projects | 33cd9daf5252e0458b15348268f0c244b03646a7 | [
"MIT"
] | null | null | null | NSE_Data_Science_001/NSE01-venv/Lib/site-packages/nsepy/derivatives/archives.py | Stoned-KING/Python_Projects | 33cd9daf5252e0458b15348268f0c244b03646a7 | [
"MIT"
] | null | null | null | NSE_Data_Science_001/NSE01-venv/Lib/site-packages/nsepy/derivatives/archives.py | Stoned-KING/Python_Projects | 33cd9daf5252e0458b15348268f0c244b03646a7 | [
"MIT"
] | null | null | null | import requests as req
import datetime
try:
import numpy as np
import pandas as pd
except:
pass
from bs4 import BeautifulSoup
from io import StringIO, BytesIO
from nsepy.archives import date_to_str, __raw_zip_data_to_str
PRICE_LIST_URL = 'http://www1.nseindia.com/content/historical/DERIVATIVES/%s/%s/fo%... | 30 | 246 | 0.726042 | import requests as req
import datetime
try:
import numpy as np
import pandas as pd
except:
pass
from bs4 import BeautifulSoup
from io import StringIO, BytesIO
from nsepy.archives import date_to_str, __raw_zip_data_to_str
PRICE_LIST_URL = 'http://www1.nseindia.com/content/historical/DERIVATIVES/%s/%s/fo%... | 351 | 0 | 23 |
f6c9753978510dc543b7af1656ab4b023b62c65c | 2,567 | py | Python | accounts/views.py | bornamir/BT-Real-State---Django | e31b8fa6a85d9f2983a6c0c0bea3df123000db05 | [
"MIT"
] | null | null | null | accounts/views.py | bornamir/BT-Real-State---Django | e31b8fa6a85d9f2983a6c0c0bea3df123000db05 | [
"MIT"
] | null | null | null | accounts/views.py | bornamir/BT-Real-State---Django | e31b8fa6a85d9f2983a6c0c0bea3df123000db05 | [
"MIT"
] | null | null | null | from django.shortcuts import render,redirect
from django.contrib import messages, auth
from django.contrib.auth.models import User
from contacts.models import Contact
# Create your views here.
| 33.776316 | 143 | 0.596416 | from django.shortcuts import render,redirect
from django.contrib import messages, auth
from django.contrib.auth.models import User
from contacts.models import Contact
# Create your views here.
def register(req):
if req.method == 'POST':
# get form values:
first_name = req.POST['first_name']
... | 2,281 | 0 | 92 |
b8498f7e5033de8f7daaa91b53b4733a075f6cbc | 879 | py | Python | research/sentiment_analysis/data/util.py | vincentcheny/models | afb1a59fc1bc792ac72d1a3e22e2469020529788 | [
"Apache-2.0"
] | 1 | 2019-09-11T09:41:11.000Z | 2019-09-11T09:41:11.000Z | research/sentiment_analysis/data/util.py | vincentcheny/models | afb1a59fc1bc792ac72d1a3e22e2469020529788 | [
"Apache-2.0"
] | null | null | null | research/sentiment_analysis/data/util.py | vincentcheny/models | afb1a59fc1bc792ac72d1a3e22e2469020529788 | [
"Apache-2.0"
] | null | null | null | """Utility module for sentiment analysis."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
START_CHAR = 1
END_CHAR = 2
OOV_CHAR = 3
def pad_sentence(sentence, sentence_length):
"""Pad the given sentense at the end.
... | 26.636364 | 74 | 0.704209 | """Utility module for sentiment analysis."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import numpy as np
START_CHAR = 1
END_CHAR = 2
OOV_CHAR = 3
def pad_sentence(sentence, sentence_length):
"""Pad the given sentense at the end.
... | 0 | 0 | 0 |
d07c1cabe2ce07bff8c71582f004116170bbeff7 | 1,823 | py | Python | examples/example.py | comsterfpv/pseudo-airspeed | abc5910f035a6114627c733df6e571dba988b070 | [
"MIT"
] | null | null | null | examples/example.py | comsterfpv/pseudo-airspeed | abc5910f035a6114627c733df6e571dba988b070 | [
"MIT"
] | null | null | null | examples/example.py | comsterfpv/pseudo-airspeed | abc5910f035a6114627c733df6e571dba988b070 | [
"MIT"
] | null | null | null | from pseudoairspeed.analysis import pseudo, load
import argparse
import os
import pandas
# source: https://www.youtube.com/watch?v=_2XDyqGhHI0
csv_fn = os.path.join('..', 'data', 'flight_pawel_wing_2017.09.csv')
if __name__ == '__main__':
main()
| 49.27027 | 124 | 0.680746 | from pseudoairspeed.analysis import pseudo, load
import argparse
import os
import pandas
# source: https://www.youtube.com/watch?v=_2XDyqGhHI0
csv_fn = os.path.join('..', 'data', 'flight_pawel_wing_2017.09.csv')
def main():
p = argparse.ArgumentParser(description='Example function to analyze pseudo airspeed from ... | 1,544 | 0 | 23 |
edd97fd5676c9705e553c10416613d21c4ff96c5 | 259 | py | Python | m209/__init__.py | gremmie/m209 | 5090b5d66a101c0f444b03ab17fc7159f734b3ce | [
"MIT"
] | null | null | null | m209/__init__.py | gremmie/m209 | 5090b5d66a101c0f444b03ab17fc7159f734b3ce | [
"MIT"
] | null | null | null | m209/__init__.py | gremmie/m209 | 5090b5d66a101c0f444b03ab17fc7159f734b3ce | [
"MIT"
] | null | null | null | # Copyright (C) 2013 by Brian Neal.
# This file is part of m209, the M-209 simulation.
# m209 is released under the MIT License (see LICENSE.txt).
__version__ = '0.1.0'
class M209Error(Exception):
"""Base Exception class for all M209 errors"""
pass
| 25.9 | 59 | 0.702703 | # Copyright (C) 2013 by Brian Neal.
# This file is part of m209, the M-209 simulation.
# m209 is released under the MIT License (see LICENSE.txt).
__version__ = '0.1.0'
class M209Error(Exception):
"""Base Exception class for all M209 errors"""
pass
| 0 | 0 | 0 |
adaaa237d5b0b5f17f2df86fe38bdfb039f51df3 | 928 | py | Python | djweb/dj_comp_hist/views.py | hdacosta400/computation_hist | 0941184fcdc970f3a6481552ccd318f3605da3c4 | [
"BSD-3-Clause"
] | null | null | null | djweb/dj_comp_hist/views.py | hdacosta400/computation_hist | 0941184fcdc970f3a6481552ccd318f3605da3c4 | [
"BSD-3-Clause"
] | null | null | null | djweb/dj_comp_hist/views.py | hdacosta400/computation_hist | 0941184fcdc970f3a6481552ccd318f3605da3c4 | [
"BSD-3-Clause"
] | null | null | null | from django.shortcuts import render, get_object_or_404
from .models import Person, Document
# Create your views here.
from django.http import HttpResponse
| 29.935484 | 115 | 0.681034 | from django.shortcuts import render, get_object_or_404
from .models import Person, Document
# Create your views here.
from django.http import HttpResponse
def index(request):
return HttpResponse("Hello, world. You're at Computation History project.")
def person(request, person_id):
person_obj = get_object... | 698 | 0 | 69 |
fb1924dd695c928dd260a27c4264c8eb9efa8b2f | 5,493 | py | Python | deprecated/example/scienz/wine.py | Vibrant-Planet/aorist | 067e119ef4d0d40802ce74a8e47d882e557ce195 | [
"MIT"
] | 16 | 2021-08-14T10:20:16.000Z | 2022-03-31T04:19:26.000Z | deprecated/example/scienz/wine.py | scie-nz/aorist | ac1e31251af7d851c4491a310b417de880b79d09 | [
"MIT"
] | 5 | 2021-08-15T23:19:10.000Z | 2021-09-26T20:50:41.000Z | deprecated/example/scienz/wine.py | Vibrant-Planet/aorist | 067e119ef4d0d40802ce74a8e47d882e557ce195 | [
"MIT"
] | 1 | 2022-01-06T01:26:24.000Z | 2022-01-06T01:26:24.000Z | """
Description taken from: https://archive.ics.uci.edu/ml/datasets/wine
1. Title of Database: Wine recognition data
Updated Sept 21, 1998 by C.Blake : Added attribute information
2. Sources:
(a) Forina, M. et al, PARVUS - An Extendible Package for Data
Exploration, Classification and Correlation. Insti... | 29.532258 | 173 | 0.706718 | """
Description taken from: https://archive.ics.uci.edu/ml/datasets/wine
1. Title of Database: Wine recognition data
Updated Sept 21, 1998 by C.Blake : Added attribute information
2. Sources:
(a) Forina, M. et al, PARVUS - An Extendible Package for Data
Exploration, Classification and Correlation. Insti... | 0 | 0 | 0 |
0e49bb580a5d5f08175f339cfec65801ef663019 | 2,002 | py | Python | python/plugins/processing/script/AddScriptFromTemplateAction.py | dyna-mis/Hilabeling | cb7d5d4be29624a20c8a367162dbc6fd779b2b52 | [
"MIT"
] | null | null | null | python/plugins/processing/script/AddScriptFromTemplateAction.py | dyna-mis/Hilabeling | cb7d5d4be29624a20c8a367162dbc6fd779b2b52 | [
"MIT"
] | null | null | null | python/plugins/processing/script/AddScriptFromTemplateAction.py | dyna-mis/Hilabeling | cb7d5d4be29624a20c8a367162dbc6fd779b2b52 | [
"MIT"
] | 1 | 2021-12-25T08:40:30.000Z | 2021-12-25T08:40:30.000Z | # -*- coding: utf-8 -*-
"""
***************************************************************************
AddScriptFromTemplateAction.py
---------------------
Date : August 2012
Copyright : (C) 2018 by Matteo Ghetta
Email : matteo dot ghetta at gmail dot com
... | 34.517241 | 107 | 0.534466 | # -*- coding: utf-8 -*-
"""
***************************************************************************
AddScriptFromTemplateAction.py
---------------------
Date : August 2012
Copyright : (C) 2018 by Matteo Ghetta
Email : matteo dot ghetta at gmail dot com
... | 508 | 28 | 77 |
8f0c67bd2b7b81a188290f8777a0718c7e883762 | 72 | py | Python | privx_api/__init__.py | jjh-ssh/privx-sdk-for-python | dc2420cb26d962f27ba78e85b6cc33ac09a27517 | [
"Apache-2.0"
] | null | null | null | privx_api/__init__.py | jjh-ssh/privx-sdk-for-python | dc2420cb26d962f27ba78e85b6cc33ac09a27517 | [
"Apache-2.0"
] | null | null | null | privx_api/__init__.py | jjh-ssh/privx-sdk-for-python | dc2420cb26d962f27ba78e85b6cc33ac09a27517 | [
"Apache-2.0"
] | null | null | null | from .privx_api import PrivXAPI, PrivXAPIResponse, InternalAPIException
| 36 | 71 | 0.875 | from .privx_api import PrivXAPI, PrivXAPIResponse, InternalAPIException
| 0 | 0 | 0 |
616e10f5fae3a5ea4562c788c8aa6e8dba992e51 | 3,140 | py | Python | pylhc_submitter/htc/mask.py | pylhc/submitter | d0f41a3af9b1d3edd4976e6c2f0ded725bce5242 | [
"MIT"
] | null | null | null | pylhc_submitter/htc/mask.py | pylhc/submitter | d0f41a3af9b1d3edd4976e6c2f0ded725bce5242 | [
"MIT"
] | 28 | 2021-05-13T20:32:04.000Z | 2022-02-16T16:17:09.000Z | pylhc_submitter/htc/mask.py | pylhc/submitter | d0f41a3af9b1d3edd4976e6c2f0ded725bce5242 | [
"MIT"
] | null | null | null | """
Mask Resolver
-------------
This module provides functionality to resolve and write script masks for ``HTCondor`` jobs
submission.
"""
import logging
import re
from pathlib import Path
import pandas as pd
from pylhc_submitter.htc.utils import COLUMN_JOB_DIRECTORY, COLUMN_JOB_FILE
LOG = logging.ge... | 37.380952 | 101 | 0.66051 | """
Mask Resolver
-------------
This module provides functionality to resolve and write script masks for ``HTCondor`` jobs
submission.
"""
import logging
import re
from pathlib import Path
import pandas as pd
from pylhc_submitter.htc.utils import COLUMN_JOB_DIRECTORY, COLUMN_JOB_FILE
LOG = logging.ge... | 72 | 0 | 25 |
8281813687879c14230310a3d75a6d81d4878a59 | 53 | py | Python | PageDownloader.py | fede-da/PageDownloader | 2344e2307ea374690ba05923056fff9e59c9ad12 | [
"MIT"
] | null | null | null | PageDownloader.py | fede-da/PageDownloader | 2344e2307ea374690ba05923056fff9e59c9ad12 | [
"MIT"
] | null | null | null | PageDownloader.py | fede-da/PageDownloader | 2344e2307ea374690ba05923056fff9e59c9ad12 | [
"MIT"
] | null | null | null |
from gui import Gui
myGui: Gui = Gui()
myGui.run()
| 8.833333 | 19 | 0.660377 |
from gui import Gui
myGui: Gui = Gui()
myGui.run()
| 0 | 0 | 0 |
1bf8636ad93560d127d3d6d1fe0df15d89ff1d01 | 981 | py | Python | 00-lesson-1/fakelib/ani_easy.py | tonybutzer/hauge | 7cee4c8edda9a2a5a11e69425516c7c47bb21cbf | [
"MIT"
] | null | null | null | 00-lesson-1/fakelib/ani_easy.py | tonybutzer/hauge | 7cee4c8edda9a2a5a11e69425516c7c47bb21cbf | [
"MIT"
] | null | null | null | 00-lesson-1/fakelib/ani_easy.py | tonybutzer/hauge | 7cee4c8edda9a2a5a11e69425516c7c47bb21cbf | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import matplotlib.animation as animation
| 28.852941 | 101 | 0.639144 | import matplotlib.pyplot as plt
import matplotlib.animation as animation
def ani_easy(tas, cmap='BrBG'):
# Get a handle on the figure and the axes
fig, ax = plt.subplots(figsize=(12,6))
# Plot the initial frame.
cax = tas[0,:,:].plot(
add_colorbar=True,
cmap=cmap,
#cmap='BrBG',
#cmap='m... | 886 | 0 | 22 |
243a63caf61107dba6ebefd7bc68888e8fa95e3f | 1,436 | py | Python | azulejo/arrange_rotate.py | johnteslade/azulejo | 3b1a35981360513b21f90d96afff10352b6363e6 | [
"MIT"
] | 3 | 2015-07-17T09:35:22.000Z | 2015-11-15T00:13:32.000Z | azulejo/arrange_rotate.py | johnteslade/azulejo | 3b1a35981360513b21f90d96afff10352b6363e6 | [
"MIT"
] | 1 | 2015-07-17T09:36:45.000Z | 2015-07-22T20:20:53.000Z | azulejo/arrange_rotate.py | johnteslade/azulejo | 3b1a35981360513b21f90d96afff10352b6363e6 | [
"MIT"
] | null | null | null | from collections import deque
from .arrange_base import ArrangeBase
class ArrangeRotate(ArrangeBase):
""" Class to rotate through windows """
def do(self, dummy):
""" Main function that performs the arrangement """
windows = self._screen.get_all_windows()
amount_of_windows = len(wi... | 31.217391 | 75 | 0.626045 | from collections import deque
from .arrange_base import ArrangeBase
class ArrangeRotate(ArrangeBase):
""" Class to rotate through windows """
def do(self, dummy):
""" Main function that performs the arrangement """
windows = self._screen.get_all_windows()
amount_of_windows = len(wi... | 0 | 0 | 0 |
486676b9f9ecabb815db59ea10ca0ea4003c464e | 25 | py | Python | pyaedt/examples/__init__.py | koubaa/pyaedt | e5a43a4f8e5fcf0553b0fad227f9914d26b5bd3a | [
"MIT"
] | null | null | null | pyaedt/examples/__init__.py | koubaa/pyaedt | e5a43a4f8e5fcf0553b0fad227f9914d26b5bd3a | [
"MIT"
] | null | null | null | pyaedt/examples/__init__.py | koubaa/pyaedt | e5a43a4f8e5fcf0553b0fad227f9914d26b5bd3a | [
"MIT"
] | null | null | null | from .downloads import *
| 12.5 | 24 | 0.76 | from .downloads import *
| 0 | 0 | 0 |
bdaf6403e9b22af80d7d3749c95d783be133e19f | 628 | py | Python | setup.py | include-yy/account-manager | ae28433909d0f6580693d1a5b65e40dfbb9d5f57 | [
"MIT"
] | null | null | null | setup.py | include-yy/account-manager | ae28433909d0f6580693d1a5b65e40dfbb9d5f57 | [
"MIT"
] | null | null | null | setup.py | include-yy/account-manager | ae28433909d0f6580693d1a5b65e40dfbb9d5f57 | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(
name='yyam',
version='0.1.4',
packages=find_packages(),
description="include-yy's account manager",
author='include-yy',
author_email='969041171@qq.com',
url='https://github.com/include-yy/account-manager',
license='MIT',
install_... | 20.933333 | 56 | 0.56051 | from setuptools import setup, find_packages
setup(
name='yyam',
version='0.1.4',
packages=find_packages(),
description="include-yy's account manager",
author='include-yy',
author_email='969041171@qq.com',
url='https://github.com/include-yy/account-manager',
license='MIT',
install_... | 0 | 0 | 0 |
1c0f05ad0b574b2eee47e13167c1d06b9b3d31dd | 911 | py | Python | tests/test_latex_admin.py | spitfire-hash/latex-admin | b4c14647024c82b5747a09df201fff0ef3bcaf76 | [
"Apache-2.0"
] | 1 | 2020-11-17T16:58:34.000Z | 2020-11-17T16:58:34.000Z | tests/test_latex_admin.py | spitfire-hash/latex-admin | b4c14647024c82b5747a09df201fff0ef3bcaf76 | [
"Apache-2.0"
] | 1 | 2020-11-17T14:07:20.000Z | 2020-11-18T13:08:12.000Z | tests/test_latex_admin.py | spitfire-hash/latex-admin | b4c14647024c82b5747a09df201fff0ef3bcaf76 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""Tests for `latex_admin` package."""
import unittest
from click.testing import CliRunner
# from latex_admin import latex_admin
from latex_admin import cli
class TestLatexAdmin(unittest.TestCase):
"""Tests for `latex_admin` package."""
def setUp(self):
"""Set up test fixtur... | 26.794118 | 80 | 0.655324 | #!/usr/bin/env python
"""Tests for `latex_admin` package."""
import unittest
from click.testing import CliRunner
# from latex_admin import latex_admin
from latex_admin import cli
class TestLatexAdmin(unittest.TestCase):
"""Tests for `latex_admin` package."""
def setUp(self):
"""Set up test fixtur... | 0 | 0 | 0 |
12f65f381549656b1658a56d5187554d2d97daa9 | 8,111 | py | Python | src/lit_saint/datamodule.py | Actis92/lit-saint | b4344de1ac37db4cc4d625c103b7852ff4d52b0f | [
"MIT"
] | 3 | 2021-10-17T10:12:55.000Z | 2022-03-30T20:08:11.000Z | src/lit_saint/datamodule.py | Actis92/saint-lightning | 8f64fa0751fd7a36663f9e8b79bdea777905ea84 | [
"MIT"
] | 3 | 2021-10-16T16:07:11.000Z | 2021-10-20T09:08:59.000Z | src/lit_saint/datamodule.py | Actis92/saint-lightning | 8f64fa0751fd7a36663f9e8b79bdea777905ea84 | [
"MIT"
] | null | null | null | from typing import Dict
from pytorch_lightning import LightningDataModule
import pandas as pd
from sklearn.base import TransformerMixin
from sklearn.preprocessing import OrdinalEncoder
from sklearn.preprocessing import StandardScaler
from torch.utils.data import DataLoader
from lit_saint.dataset import SaintDataset
... | 44.812155 | 114 | 0.645173 | from typing import Dict
from pytorch_lightning import LightningDataModule
import pandas as pd
from sklearn.base import TransformerMixin
from sklearn.preprocessing import OrdinalEncoder
from sklearn.preprocessing import StandardScaler
from torch.utils.data import DataLoader
from lit_saint.dataset import SaintDataset
... | 1,256 | 0 | 54 |
924a5fcae464b53628ce89a1db47f7a7d45665f6 | 1,999 | py | Python | tests/test_validators.py | ajcerejeira/vatval | 1317f4d404a31d5e15bf24ff90fc45a741df7764 | [
"MIT"
] | 4 | 2019-06-13T10:04:27.000Z | 2020-04-15T13:21:12.000Z | tests/test_validators.py | ajcerejeira/vatval | 1317f4d404a31d5e15bf24ff90fc45a741df7764 | [
"MIT"
] | null | null | null | tests/test_validators.py | ajcerejeira/vatval | 1317f4d404a31d5e15bf24ff90fc45a741df7764 | [
"MIT"
] | null | null | null | import unittest
from vat_validator.validators import vat_is_valid_pt
| 26.302632 | 54 | 0.461231 | import unittest
from vat_validator.validators import vat_is_valid_pt
class ValidatorsTestCase(unittest.TestCase):
def setUp(self):
self.vat_pt_valid = [
"PT100000010",
"PT100000029",
"PT100000037",
"PT100000193",
"PT100000053",
"PT10... | 1,829 | 23 | 76 |
63598cc7514dc8fafca550921a4aa55a549b34f0 | 503 | py | Python | setup.py | nondejus/lbcapi | 2f76e48e523451203108669af95355fa3bc827c4 | [
"MIT"
] | null | null | null | setup.py | nondejus/lbcapi | 2f76e48e523451203108669af95355fa3bc827c4 | [
"MIT"
] | null | null | null | setup.py | nondejus/lbcapi | 2f76e48e523451203108669af95355fa3bc827c4 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import os
from setuptools import setup
# Allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='lbcapi',
version='1.0.2',
packages=['lbcapi'],
include_package_data=True,
license='MIT License',
des... | 23.952381 | 78 | 0.675944 | #!/usr/bin/env python
import os
from setuptools import setup
# Allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='lbcapi',
version='1.0.2',
packages=['lbcapi'],
include_package_data=True,
license='MIT License',
des... | 0 | 0 | 0 |