hexsha stringlengths 40 40 | size int64 4 1.02M | ext stringclasses 8
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 209 | max_stars_repo_name stringlengths 5 121 | max_stars_repo_head_hexsha stringlengths 40 40 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 4 209 | max_issues_repo_name stringlengths 5 121 | max_issues_repo_head_hexsha stringlengths 40 40 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 4 209 | max_forks_repo_name stringlengths 5 121 | max_forks_repo_head_hexsha stringlengths 40 40 | 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 4 1.02M | avg_line_length float64 1.07 66.1k | max_line_length int64 4 266k | alphanum_fraction float64 0.01 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
95937b6c655000e3afd6bcd53cd133cbcf86b347 | 447 | py | Python | experiment/get_xml.py | juliapochynok/LearnKorean_project | 60c53c1422379bbfc0fbba4c32f74105430326e8 | [
"Apache-2.0"
] | 1 | 2020-07-19T11:35:14.000Z | 2020-07-19T11:35:14.000Z | experiment/get_xml.py | juliapochynok/LearnKorean_project | 60c53c1422379bbfc0fbba4c32f74105430326e8 | [
"Apache-2.0"
] | 1 | 2019-03-04T14:18:03.000Z | 2019-03-04T14:18:03.000Z | experiment/get_xml.py | juliapochynok/LearnKorean_project | 60c53c1422379bbfc0fbba4c32f74105430326e8 | [
"Apache-2.0"
] | null | null | null | import requests
import xml.etree.ElementTree
def make_wordimfo_file(needed_word, file):
'''
'''
parameters = { 'key': "84AD3BB0C4BF3809A9CF3CCA68FAF946", 'q': needed_word, 'part': 'word', 'translated': 'y',\
'trans_lang': '1'}
url = "https://krdict.korean.go.kr/api/search"
url1 = re... | 27.9375 | 116 | 0.61745 |
57b5ef063b41516ff438cb500ffa0794aec1b17b | 192 | py | Python | src/pypine/do/__init__.py | jkpubsrc/PyPine | e0144fabd8d7cd061f14ac4478ba2d3bc8fafe03 | [
"Apache-1.1"
] | null | null | null | src/pypine/do/__init__.py | jkpubsrc/PyPine | e0144fabd8d7cd061f14ac4478ba2d3bc8fafe03 | [
"Apache-1.1"
] | null | null | null | src/pypine/do/__init__.py | jkpubsrc/PyPine | e0144fabd8d7cd061f14ac4478ba2d3bc8fafe03 | [
"Apache-1.1"
] | null | null | null |
__version__ = "0.2021.3.19"
from .AbstractDataObjectBase import AbstractDataObjectBase
from .DiskFile import DiskFile
from .InMemoryFile import InMemoryFile
from .URLFile import URLFile | 17.454545 | 58 | 0.817708 |
5387117729af21b503fde095a5c82b13c3330208 | 2,970 | py | Python | src/01_basic_model_creation.py | abhishekvarma12345/Transfer_Learning | 2e583a544d41944e8efc88018c9a20c91ae24db8 | [
"MIT"
] | null | null | null | src/01_basic_model_creation.py | abhishekvarma12345/Transfer_Learning | 2e583a544d41944e8efc88018c9a20c91ae24db8 | [
"MIT"
] | null | null | null | src/01_basic_model_creation.py | abhishekvarma12345/Transfer_Learning | 2e583a544d41944e8efc88018c9a20c91ae24db8 | [
"MIT"
] | null | null | null | import argparse
import os
import numpy as np
from tqdm import tqdm
import logging
from src.utils.common import read_yaml, create_directories
import tensorflow as tf
import io
import time
STAGE = "basic model" ## <<< change stage name
logging.basicConfig(
filename=os.path.join("logs", 'basic_running_logs.log'), ... | 29.7 | 88 | 0.653535 |
e5d690564bb509f5c5fd2324f295e31a4b5c3929 | 16,648 | py | Python | ale/util.py | tthatcher95/ale | 6bebf2172c7ffde91e09b0f138c6aebb5b5bca24 | [
"Unlicense"
] | null | null | null | ale/util.py | tthatcher95/ale | 6bebf2172c7ffde91e09b0f138c6aebb5b5bca24 | [
"Unlicense"
] | null | null | null | ale/util.py | tthatcher95/ale | 6bebf2172c7ffde91e09b0f138c6aebb5b5bca24 | [
"Unlicense"
] | null | null | null | import os
from os import path
from glob import glob
from itertools import filterfalse, groupby
import warnings
import pvl
import collections
from collections import OrderedDict
from itertools import chain
import subprocess
import re
import networkx as nx
from networkx.algorithms.shortest_paths.generic import shorte... | 32.515625 | 124 | 0.606379 |
9961490c6fbb427bcea3d9d8bc556439f64e2f3c | 5,144 | py | Python | src/transform/transformer.py | aquariumbio/experiment-request | 026e3eb767c47f980a35004e9ded5e4e33553693 | [
"MIT"
] | null | null | null | src/transform/transformer.py | aquariumbio/experiment-request | 026e3eb767c47f980a35004e9ded5e4e33553693 | [
"MIT"
] | null | null | null | src/transform/transformer.py | aquariumbio/experiment-request | 026e3eb767c47f980a35004e9ded5e4e33553693 | [
"MIT"
] | null | null | null | from __future__ import annotations
import abc
from typing import TYPE_CHECKING
if TYPE_CHECKING:
from cp_request.attribute import Attribute
from cp_request.measurement import Control, Measurement, Sample
from cp_request.named_entity import NamedEntity
from cp_request.treatment import Treatment
from... | 35.232877 | 80 | 0.697512 |
53f462e06c422ce134e510cda70e5c860519e21d | 125 | py | Python | buglab/data/modelsync/__init__.py | microsoft/neurips21-self-supervised-bug-detection-and-repair | 4e51184a63aecd19174ee40fc6433260ab73d56e | [
"MIT"
] | 47 | 2021-10-19T16:15:41.000Z | 2022-03-21T11:51:43.000Z | buglab/data/modelsync/__init__.py | microsoft/neurips21-self-supervised-bug-detection-and-repair | 4e51184a63aecd19174ee40fc6433260ab73d56e | [
"MIT"
] | 2 | 2022-01-10T09:41:44.000Z | 2022-03-09T12:54:55.000Z | buglab/data/modelsync/__init__.py | microsoft/neurips21-self-supervised-bug-detection-and-repair | 4e51184a63aecd19174ee40fc6433260ab73d56e | [
"MIT"
] | 11 | 2021-11-30T13:25:03.000Z | 2022-03-16T11:38:08.000Z | from .client import MockModelSyncClient, ModelSyncClient
from .data import ModelSyncData
from .server import ModelSyncServer
| 31.25 | 56 | 0.864 |
f65e4cc6c07a73bc43977ec69bff34f542a64e5c | 127 | py | Python | control_gpio_pi/92high.py | Rahul14singh/remote_raspberrypigpio_control | 315bba85024a6c2612ac84e21858fe93cbb3cf8f | [
"MIT"
] | 10 | 2017-06-28T17:35:43.000Z | 2022-02-22T22:57:27.000Z | control_gpio_pi/92high.py | Rahul14singh/Remote_raspberrypi_GPIO_Control | 315bba85024a6c2612ac84e21858fe93cbb3cf8f | [
"MIT"
] | null | null | null | control_gpio_pi/92high.py | Rahul14singh/Remote_raspberrypi_GPIO_Control | 315bba85024a6c2612ac84e21858fe93cbb3cf8f | [
"MIT"
] | null | null | null | import RPi.GPIO as ir
print "PIN 24 High"
ir.setwarnings(False)
ir.setmode(ir.BOARD)
ir.setup(24,ir.OUT)
ir.output(24,ir.HIGH)
| 18.142857 | 21 | 0.748031 |
7cd759e8b66f959231a1eaf82bb30bbdaa4fadbd | 395 | py | Python | gh_action/wsgi.py | SmartC2016/github_action | 42f3e1d7f9f15c4253812388a37360ee403a304d | [
"MIT"
] | null | null | null | gh_action/wsgi.py | SmartC2016/github_action | 42f3e1d7f9f15c4253812388a37360ee403a304d | [
"MIT"
] | null | null | null | gh_action/wsgi.py | SmartC2016/github_action | 42f3e1d7f9f15c4253812388a37360ee403a304d | [
"MIT"
] | null | null | null | """
WSGI config for gh_action project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/3.1/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SET... | 23.235294 | 78 | 0.787342 |
a02af4cf8a1c1bcd44269410cf8fee8b3191c2a7 | 11,669 | py | Python | annotation/regexes.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | 5 | 2021-01-14T03:34:42.000Z | 2022-03-07T15:34:18.000Z | annotation/regexes.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | 551 | 2020-10-19T00:02:38.000Z | 2022-03-30T02:18:22.000Z | annotation/regexes.py | SACGF/variantgrid | 515195e2f03a0da3a3e5f2919d8e0431babfd9c9 | [
"RSA-MD"
] | null | null | null | import re
from enum import Enum
from operator import attrgetter
from re import RegexFlag
from typing import List, Union, Match, Dict, Optional
from annotation.models.models import Citation
from annotation.models.models_enums import CitationSource
from library.log_utils import report_message
from ontology.models import... | 48.620833 | 246 | 0.645128 |
e17c4c36199e125584120783d3cca398b8f1e4d5 | 1,182 | py | Python | grow/commands/subcommands/inspect_stats.py | matthiasrohmer/grow | 88fae5026040ad0f7dd9260ee290cebbe49b39d7 | [
"MIT"
] | null | null | null | grow/commands/subcommands/inspect_stats.py | matthiasrohmer/grow | 88fae5026040ad0f7dd9260ee290cebbe49b39d7 | [
"MIT"
] | null | null | null | grow/commands/subcommands/inspect_stats.py | matthiasrohmer/grow | 88fae5026040ad0f7dd9260ee290cebbe49b39d7 | [
"MIT"
] | null | null | null | """Subcommand for displaying pod stats."""
import os
import click
from grow.commands import shared
from grow.common import rc_config
from grow.deployments import stats as stats_lib
from grow.pods import pods
from grow import storage
CFG = rc_config.RC_CONFIG.prefixed('grow.inspect.stats')
@click.command(name='stat... | 35.818182 | 85 | 0.692893 |
cf9cb82140636e09defc032445dc361a3cdf2aaf | 897 | py | Python | cmdb/ipmi/urls.py | longgeek/muop_v1 | e1dda2261384afb51429cfe1efbabdf17c2bbba0 | [
"Apache-2.0"
] | null | null | null | cmdb/ipmi/urls.py | longgeek/muop_v1 | e1dda2261384afb51429cfe1efbabdf17c2bbba0 | [
"Apache-2.0"
] | null | null | null | cmdb/ipmi/urls.py | longgeek/muop_v1 | e1dda2261384afb51429cfe1efbabdf17c2bbba0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Longgeek <longgeek@gmail.com>
from django.conf.urls import url
from cmdb.ipmi.actions import bmc, fan, power, event, bootdev, temperature
urlpatterns = [
url(r'^fan/([0-9]*)/$', fan.status, name='fan_status'),
url(r'^time/([0-9]*)/$', bmc.time, name='bmc... | 44.85 | 83 | 0.615385 |
79bc123c7b9a8ab995cefe34416776b6a58ee585 | 1,462 | py | Python | components/monoprice_10761/number/__init__.py | jhenkens/monoprice-6ch-esphome | f49bb7b34cb35670fe9513d7e9d18eb598e4d3bc | [
"MIT"
] | 4 | 2021-12-01T05:22:18.000Z | 2022-02-22T07:26:17.000Z | components/monoprice_10761/number/__init__.py | jhenkens/monoprice-6ch-esphome | f49bb7b34cb35670fe9513d7e9d18eb598e4d3bc | [
"MIT"
] | null | null | null | components/monoprice_10761/number/__init__.py | jhenkens/monoprice-6ch-esphome | f49bb7b34cb35670fe9513d7e9d18eb598e4d3bc | [
"MIT"
] | null | null | null | from esphome.components import number
import esphome.config_validation as cv
import esphome.codegen as cg
from esphome.const import CONF_ID
from .. import monoprice_10761_ns, CONF_MONOPRICE_10761_ID, CONF_ZONE, CONF_COMMAND, Monoprice10761
DEPENDENCIES = ["monoprice_10761"]
CODEOWNERS = ["@jhenkens"]
Monoprice10761Nu... | 32.488889 | 101 | 0.695622 |
04413abe9b41273c1d064c5183a530f5397610ff | 21,417 | py | Python | ibeis/main_module.py | brmscheiner/ibeis | 9bb93a6cd74ac47921e734c80917a38609dfe661 | [
"Apache-2.0"
] | null | null | null | ibeis/main_module.py | brmscheiner/ibeis | 9bb93a6cd74ac47921e734c80917a38609dfe661 | [
"Apache-2.0"
] | null | null | null | ibeis/main_module.py | brmscheiner/ibeis | 9bb93a6cd74ac47921e734c80917a38609dfe661 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
This module defines the entry point into the IBEIS system
ibeis.opendb and ibeis.main are the main entry points
"""
from __future__ import absolute_import, division, print_function
#from six.moves import builtins
import sys
import multiprocessing
#try:
import utool as ut
profile = ut.profil... | 32.797856 | 96 | 0.619228 |
964ee80a4a1f064a7c78aafcd653905351a294ba | 1,357 | py | Python | timemory/gperf/heap_profiler.py | jrmadsen/TiMEmory | 8df2055e68da56e2fe57f716ca9b6d27f7eb4407 | [
"MIT"
] | 5 | 2018-01-19T06:18:00.000Z | 2019-07-19T16:08:46.000Z | timemory/gperf/heap_profiler.py | jrmadsen/TiMEmory | 8df2055e68da56e2fe57f716ca9b6d27f7eb4407 | [
"MIT"
] | 1 | 2018-02-09T21:33:08.000Z | 2018-02-11T23:39:47.000Z | timemory/gperf/heap_profiler.py | jrmadsen/TiMEmory | 8df2055e68da56e2fe57f716ca9b6d27f7eb4407 | [
"MIT"
] | 2 | 2019-06-30T00:46:54.000Z | 2019-07-09T18:35:45.000Z | #!@PYTHON_EXECUTABLE@
# MIT License
#
# Copyright (c) 2020, The Regents of the University of California,
# through Lawrence Berkeley National Laboratory (subject to receipt of any
# required approvals from the U.S. Dept. of Energy). All rights reserved.
#
# Permission is hereby granted, free of charge, to any person o... | 45.233333 | 80 | 0.77745 |
bac01a8aa79ff45d34a268ccea7c6dec2f9e4841 | 728 | py | Python | get_scannet_part.py | dsw-jlu-rgzn/gcn_votenet | 5d39861c9861f822f39dc3747ccfc17b5377c9e8 | [
"MIT"
] | null | null | null | get_scannet_part.py | dsw-jlu-rgzn/gcn_votenet | 5d39861c9861f822f39dc3747ccfc17b5377c9e8 | [
"MIT"
] | null | null | null | get_scannet_part.py | dsw-jlu-rgzn/gcn_votenet | 5d39861c9861f822f39dc3747ccfc17b5377c9e8 | [
"MIT"
] | null | null | null | # -*- coding: UTF8 -*-
import os
import shutil
size = 0
scannet_dir = "/home/dongshuwei/3Ddetection/scannet/scans"
ids = os.listdir(scannet_dir)
dir_id = []
file_name = []
dist_dile = "/home/dongshuwei/3Ddetection/scannet_vis"
for id in ids:
the_dir_id = os.path.join(scannet_dir, id)
the_file_name = id+"_vh_cle... | 29.12 | 76 | 0.701923 |
506b24c27619b3f1aebb275b08bcc929e094f3f4 | 977 | py | Python | pgdrive/tests/vis_funtionality/vis_render_msg.py | decisionforce/pgdrive | 19af5d09a40a68a2a5f8b3ac8b40f109e71c26ee | [
"Apache-2.0"
] | 97 | 2020-12-25T06:02:17.000Z | 2022-01-16T06:58:39.000Z | pgdrive/tests/vis_funtionality/vis_render_msg.py | decisionforce/pgdrive | 19af5d09a40a68a2a5f8b3ac8b40f109e71c26ee | [
"Apache-2.0"
] | 192 | 2020-12-25T07:58:17.000Z | 2021-08-28T10:13:59.000Z | pgdrive/tests/vis_funtionality/vis_render_msg.py | decisionforce/pgdrive | 19af5d09a40a68a2a5f8b3ac8b40f109e71c26ee | [
"Apache-2.0"
] | 11 | 2020-12-29T11:23:44.000Z | 2021-12-06T23:25:49.000Z | from pgdrive.component.map.base_map import BaseMap, MapGenerateMethod
from pgdrive.envs.pgdrive_env import PGDriveEnv
from pgdrive.utils import setup_logger
setup_logger(debug=True)
if __name__ == "__main__":
env = PGDriveEnv(
{
"environment_num": 4,
"traffic_density": 0.1,
... | 29.606061 | 71 | 0.554759 |
c0a85a62a5f5699e9543f85e0432908cc9a7a78a | 13,916 | py | Python | python/ray/tune/sample.py | jody3t/ray | 6a78ba9752dc7f17b0e4b7423898c0facf777d3d | [
"Apache-2.0"
] | null | null | null | python/ray/tune/sample.py | jody3t/ray | 6a78ba9752dc7f17b0e4b7423898c0facf777d3d | [
"Apache-2.0"
] | null | null | null | python/ray/tune/sample.py | jody3t/ray | 6a78ba9752dc7f17b0e4b7423898c0facf777d3d | [
"Apache-2.0"
] | null | null | null | import logging
import random
from copy import copy
from inspect import signature
from numbers import Number
from typing import Any, Callable, Dict, List, Optional, Sequence, Union
import numpy as np
logger = logging.getLogger(__name__)
class Domain:
"""Base class to specify a type and valid range to sample para... | 31.627273 | 80 | 0.593202 |
914db75793ba4af530c08d097936783044495342 | 810 | py | Python | setup.py | bruno-janota/lambdata-bjanota | 4e4d9c0a3a2a1ddaaa7857d694bc14f33175ce2b | [
"MIT"
] | null | null | null | setup.py | bruno-janota/lambdata-bjanota | 4e4d9c0a3a2a1ddaaa7857d694bc14f33175ce2b | [
"MIT"
] | 3 | 2020-03-24T17:40:48.000Z | 2021-06-02T00:32:37.000Z | setup.py | bruno-janota/lambdata-bjanota | 4e4d9c0a3a2a1ddaaa7857d694bc14f33175ce2b | [
"MIT"
] | 1 | 2019-09-05T03:44:55.000Z | 2019-09-05T03:44:55.000Z | """
lambdata-bruno-janota - A Collection of Data Science helper functions.
"""
import setuptools
REQUIRED = [
"numpy",
"pandas",
"sklearn"
]
with open("README.md", "r") as fh:
LONG_DESCRIPTION = fh.read()
setuptools.setup(
name="lambdata-bruno-janota",
version="0.0.1",
author="bruno-jano... | 25.3125 | 70 | 0.665432 |
876a312426e46326a622afbbed72da0d69106814 | 1,876 | py | Python | app/user/serializers.py | dragonzite/recipe-app-api | 3409afe997b0b1a6e2c82225d345562f20c2e5f6 | [
"MIT"
] | null | null | null | app/user/serializers.py | dragonzite/recipe-app-api | 3409afe997b0b1a6e2c82225d345562f20c2e5f6 | [
"MIT"
] | null | null | null | app/user/serializers.py | dragonzite/recipe-app-api | 3409afe997b0b1a6e2c82225d345562f20c2e5f6 | [
"MIT"
] | null | null | null | from django.contrib.auth import get_user_model, authenticate
from django.utils.translation import ugettext_lazy as _
from rest_framework import serializers
class UserSerializer(serializers.ModelSerializer):
"""Serializer for the new user
Args:
serializers (obj): rest_framework module
"""
cl... | 29.777778 | 77 | 0.63806 |
3ef025e78d2f3a783aea393d5908fd44601000e7 | 10,635 | py | Python | attic/key.py | AaronWebster/attic | be7e636b6de677776d57b788c9a435070063575d | [
"BSD-3-Clause"
] | 1 | 2022-02-11T21:46:40.000Z | 2022-02-11T21:46:40.000Z | attic/key.py | AaronWebster/attic | be7e636b6de677776d57b788c9a435070063575d | [
"BSD-3-Clause"
] | 20 | 2022-02-14T07:54:49.000Z | 2022-02-14T07:57:38.000Z | attic/key.py | AaronWebster/attic | be7e636b6de677776d57b788c9a435070063575d | [
"BSD-3-Clause"
] | null | null | null | from binascii import hexlify, a2b_base64, b2a_base64
from getpass import getpass
import os
import msgpack
import textwrap
import hmac
from hashlib import sha256
import zlib
from attic.crypto import pbkdf2_sha256, get_random_bytes, AES, bytes_to_long, long_to_bytes, bytes_to_int, num_aes_blocks
from attic.helpers impor... | 31.187683 | 121 | 0.66441 |
5ed419bce8701b9e287011c69d99ba6bf59558a7 | 2,849 | py | Python | raidcal/common_settings.py | katajakasa/Raidcal | 61d17d8ca0c58c09debb31e868afdd377a87f38d | [
"MIT"
] | null | null | null | raidcal/common_settings.py | katajakasa/Raidcal | 61d17d8ca0c58c09debb31e868afdd377a87f38d | [
"MIT"
] | null | null | null | raidcal/common_settings.py | katajakasa/Raidcal | 61d17d8ca0c58c09debb31e868afdd377a87f38d | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Application definition
INSTALLED_APPS = (
'raidcal.maincal',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'crispy_forms',
'compressor',
... | 30.967391 | 109 | 0.631099 |
5199354acd6db260a9ba46e6bd11dc0a27cf19cc | 515 | py | Python | openpeerpower/helpers/typing.py | pcaston/Open-Peer-Power | 81805d455c548e0f86b0f7fedc793b588b2afdfd | [
"Apache-2.0"
] | null | null | null | openpeerpower/helpers/typing.py | pcaston/Open-Peer-Power | 81805d455c548e0f86b0f7fedc793b588b2afdfd | [
"Apache-2.0"
] | null | null | null | openpeerpower/helpers/typing.py | pcaston/Open-Peer-Power | 81805d455c548e0f86b0f7fedc793b588b2afdfd | [
"Apache-2.0"
] | 1 | 2019-04-24T14:10:08.000Z | 2019-04-24T14:10:08.000Z | """Typing Helpers for Open Peer Power."""
from typing import Any, Dict, Optional, Tuple
import openpeerpower.core
# pylint: disable=invalid-name
GPSType = Tuple[float, float]
ConfigType = Dict[str, Any]
ContextType = openpeerpower.core.Context
EventType = openpeerpower.core.Event
OpenPeerPowerType = openpeerpower.co... | 27.105263 | 52 | 0.794175 |
663f64767793a753e6f3ebd528650cc7904ae056 | 1,519 | py | Python | sir.py | retr0-13/skype_ip_resolver | 4f9ec2f05ddff28cc90cb631f8eae4882ee2d293 | [
"MIT"
] | 11 | 2015-09-03T12:07:59.000Z | 2022-03-06T06:59:10.000Z | sir.py | retr0-13/skype_ip_resolver | 4f9ec2f05ddff28cc90cb631f8eae4882ee2d293 | [
"MIT"
] | null | null | null | sir.py | retr0-13/skype_ip_resolver | 4f9ec2f05ddff28cc90cb631f8eae4882ee2d293 | [
"MIT"
] | 4 | 2018-04-01T09:03:30.000Z | 2021-04-08T19:13:47.000Z | #!/usr/bin/python
"""
Copyright (c) 2014 tilt (https://github.com/AeonDave/sir)
See the file 'LICENSE' for copying permission
"""
import sys, getopt, logging
from lib import update
from lib import actions
from lib.logger import logger
# Tilt Setup
try:
options, args = getopt.getopt(sys.argv[1:], 'n:vhu', ... | 21.7 | 106 | 0.57472 |
6ea6bb20e3040fb50407ffeb855a15a9b13a1663 | 156 | py | Python | {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/commands/__init__.py | yankeexe/cookiecutter-python-cli | 992bc1bf9af825b6ad144e5e4cbf969a58003347 | [
"MIT"
] | 4 | 2021-02-12T05:32:25.000Z | 2022-01-19T10:30:46.000Z | {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/commands/__init__.py | yankeexe/cookiecutter-python-cli | 992bc1bf9af825b6ad144e5e4cbf969a58003347 | [
"MIT"
] | 1 | 2022-01-19T13:56:45.000Z | 2022-01-20T12:13:06.000Z | {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/commands/__init__.py | yankeexe/cookiecutter-python-cli | 992bc1bf9af825b6ad144e5e4cbf969a58003347 | [
"MIT"
] | 1 | 2022-01-19T10:30:49.000Z | 2022-01-19T10:30:49.000Z | """
Exports for CLI commands.
"""
from {{cookiecutter.project_slug}}.commands.init import init
from {{cookiecutter.project_slug}}.commands.show import show
| 26 | 60 | 0.775641 |
c6d48e481202750b624658513892e4d88444ba2b | 2,631 | py | Python | libp2p/security/noise/io.py | g-r-a-n-t/py-libp2p | 36a4a9150dcc53b42315b5c6868fccde5083963b | [
"Apache-2.0",
"MIT"
] | 315 | 2019-02-13T01:29:09.000Z | 2022-03-28T13:44:07.000Z | libp2p/security/noise/io.py | pipermerriam/py-libp2p | 379a157d6b67e86a616b2458af519bbe5fb26a51 | [
"Apache-2.0",
"MIT"
] | 249 | 2019-02-22T05:00:07.000Z | 2022-03-29T16:30:46.000Z | libp2p/security/noise/io.py | ralexstokes/py-libp2p | 5144ab82894623969cb17baf0d4c64bd0a274068 | [
"Apache-2.0",
"MIT"
] | 77 | 2019-02-24T19:45:17.000Z | 2022-03-30T03:20:09.000Z | from typing import cast
from noise.connection import NoiseConnection as NoiseState
from libp2p.io.abc import EncryptedMsgReadWriter, MsgReadWriteCloser, ReadWriteCloser
from libp2p.io.msgio import FixedSizeLenMsgReadWriter
from libp2p.network.connection.raw_connection_interface import IRawConnection
SIZE_NOISE_MESSA... | 35.554054 | 88 | 0.694033 |
460c4a27fc5a84f7040ab8eea7813e22da721ad7 | 1,350 | py | Python | orc8r/gateway/python/magma/magmad/events.py | omnicate/magma | e1e6c244f9e8bd000587a3dad3c54f4e64ada222 | [
"BSD-3-Clause"
] | null | null | null | orc8r/gateway/python/magma/magmad/events.py | omnicate/magma | e1e6c244f9e8bd000587a3dad3c54f4e64ada222 | [
"BSD-3-Clause"
] | null | null | null | orc8r/gateway/python/magma/magmad/events.py | omnicate/magma | e1e6c244f9e8bd000587a3dad3c54f4e64ada222 | [
"BSD-3-Clause"
] | null | null | null | """
Copyright (c) 2016-present, Facebook, Inc.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. An additional grant
of patent rights can be found in the PATENTS file in the same directory.
"""
import json
import snowflake... | 31.395349 | 79 | 0.714815 |
12517c9b5218f24acb1494c3bd9b5c4d3e1deab9 | 25,461 | py | Python | qa/rpc-tests/fundrawtransaction-hd.py | AtomicLemon/bitthatchain | 60231977d446a3f0ba4c112a1405eebed9acc17a | [
"MIT"
] | null | null | null | qa/rpc-tests/fundrawtransaction-hd.py | AtomicLemon/bitthatchain | 60231977d446a3f0ba4c112a1405eebed9acc17a | [
"MIT"
] | null | null | null | qa/rpc-tests/fundrawtransaction-hd.py | AtomicLemon/bitthatchain | 60231977d446a3f0ba4c112a1405eebed9acc17a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import *
# Creat... | 40.672524 | 214 | 0.558658 |
4c8aa2ccdf738480dc8ce7bf8e085875879a1e5c | 1,350 | py | Python | tests/records/test_plr.py | pvalsecc/pyramid_oereb | 3d9a8a68952641e923c34e086768630e21a559ed | [
"BSD-2-Clause"
] | null | null | null | tests/records/test_plr.py | pvalsecc/pyramid_oereb | 3d9a8a68952641e923c34e086768630e21a559ed | [
"BSD-2-Clause"
] | 3 | 2019-12-26T17:00:44.000Z | 2022-03-21T22:16:54.000Z | tests/records/test_plr.py | pvalsecc/pyramid_oereb | 3d9a8a68952641e923c34e086768630e21a559ed | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
import datetime
import pytest
from shapely.geometry import Point
from pyramid_oereb.lib.records.geometry import GeometryRecord
from pyramid_oereb.lib.records.image import ImageRecord
from pyramid_oereb.lib.records.law_status import LawStatusRecord
from pyramid_oereb.lib.records.office import Of... | 39.705882 | 103 | 0.754815 |
6f9282a3891ba4b2e58c2ba4d146e2191bba93a4 | 3,576 | py | Python | pyns/protocols/factory.py | Kuree/pyns | c627d11bbc79b86f868371282165b41652040e57 | [
"MIT"
] | null | null | null | pyns/protocols/factory.py | Kuree/pyns | c627d11bbc79b86f868371282165b41652040e57 | [
"MIT"
] | null | null | null | pyns/protocols/factory.py | Kuree/pyns | c627d11bbc79b86f868371282165b41652040e57 | [
"MIT"
] | null | null | null | from . import TDMANode, TDMABaseStation
from . import CSMANode, CSMABaseStation
from . import LPDQNode, LPDQBaseStation
from . import DQNNode, DQNBaseStation
from . import ALOHANode, ALOHABaseStation
from . import LORANode, LORABaseStation
import json
import inspect
from enum import Enum
class ProtocolType(Enum):
... | 33.420561 | 75 | 0.677573 |
9254a149d28961f519e2f1c82f6df29190013a04 | 370 | py | Python | Adafruit_QT_Py_ESP32-S2/Capacitive_Touch_One_Pin/code.py | gamblor21/Adafruit_Learning_System_Guides | f5dab4a758bc82d0bfc3c299683fe89dc093912a | [
"MIT"
] | null | null | null | Adafruit_QT_Py_ESP32-S2/Capacitive_Touch_One_Pin/code.py | gamblor21/Adafruit_Learning_System_Guides | f5dab4a758bc82d0bfc3c299683fe89dc093912a | [
"MIT"
] | null | null | null | Adafruit_QT_Py_ESP32-S2/Capacitive_Touch_One_Pin/code.py | gamblor21/Adafruit_Learning_System_Guides | f5dab4a758bc82d0bfc3c299683fe89dc093912a | [
"MIT"
] | null | null | null | # SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries
# SPDX-License-Identifier: Unlicense
"""
CircuitPython Capacitive Touch Pin Example - Print to the serial console when one pin is touched.
"""
import time
import board
import touchio
touch = touchio.TouchIn(board.A2)
while True:
if touch.value:
... | 23.125 | 97 | 0.743243 |
5c8b9c9ad3ef87f3b37baf34b6ed3f4a880fe634 | 3,934 | py | Python | preproc.py | SingularityF/VO-1s-Ov-A | 0b9f053253eb958e8268f6ba8a8b828e31778ee2 | [
"MIT"
] | null | null | null | preproc.py | SingularityF/VO-1s-Ov-A | 0b9f053253eb958e8268f6ba8a8b828e31778ee2 | [
"MIT"
] | null | null | null | preproc.py | SingularityF/VO-1s-Ov-A | 0b9f053253eb958e8268f6ba8a8b828e31778ee2 | [
"MIT"
] | null | null | null | import cv2
import tensorflow as tf
import numpy as np
def tf_int64_feature(value):
"""Returns an int64_list from a bool / enum / int / uint."""
return tf.train.Feature(int64_list=tf.train.Int64List(value=[value]))
def tf_bytes_feature(value):
"""Returns a bytes_list from a string / byte."""
if isins... | 33.623932 | 119 | 0.649975 |
678484c782528c67b0377388a024bc4205be1556 | 882 | py | Python | LeetCode/InterviewQuestions/ques2.py | shrey199325/LeetCodeSolution | fede0d98d2aeeedc3cd501ac5042f2217494f4c6 | [
"Unlicense"
] | null | null | null | LeetCode/InterviewQuestions/ques2.py | shrey199325/LeetCodeSolution | fede0d98d2aeeedc3cd501ac5042f2217494f4c6 | [
"Unlicense"
] | null | null | null | LeetCode/InterviewQuestions/ques2.py | shrey199325/LeetCodeSolution | fede0d98d2aeeedc3cd501ac5042f2217494f4c6 | [
"Unlicense"
] | 1 | 2020-09-18T09:38:26.000Z | 2020-09-18T09:38:26.000Z | """
class inter():
pass
class B:
def alpha(self):
print("B")
class C:
def alpha(self):
print("C")
class A(metaclass=inter, B, C):
def alpha(self):
super(B, self).alpha()
@staticmethod
def stat_method(val):
return val
@classmethod
def class_method(cl... | 10.888889 | 53 | 0.495465 |
c0d8ba8108e546a207fa6fd42baada6cdcc267d0 | 1,494 | py | Python | uplink/api/ranks.py | Subzidion/uplink-python | 2fc4fc65e15b157a7d6c76dc72ba1b2bd5fb4428 | [
"Apache-2.0"
] | null | null | null | uplink/api/ranks.py | Subzidion/uplink-python | 2fc4fc65e15b157a7d6c76dc72ba1b2bd5fb4428 | [
"Apache-2.0"
] | null | null | null | uplink/api/ranks.py | Subzidion/uplink-python | 2fc4fc65e15b157a7d6c76dc72ba1b2bd5fb4428 | [
"Apache-2.0"
] | null | null | null | from flask import jsonify, request, abort
from .. import db
from ..models import Rank
from . import api
@api.route('/rank', methods=['GET'])
def getRanks():
ranks = Rank.query.all()
return jsonify({ 'ranks': [ rank.to_dict() for rank in ranks ] })
@api.route('/rank', methods=['POST'])
def postRank():
if... | 26.678571 | 104 | 0.621151 |
dec446fe2c2f3312a871b6c017871788bab83a41 | 3,994 | py | Python | examples/adwords/v201506/account_management/get_account_changes.py | fosterwei/adwords-keyword-planner-API-googleads-python-lib | b80b8b3741a55f1d00c5974bc58f92540663c6f6 | [
"Apache-2.0"
] | 1 | 2020-05-23T11:32:32.000Z | 2020-05-23T11:32:32.000Z | examples/adwords/v201506/account_management/get_account_changes.py | fosterwei/adwords-keyword-planner-API-googleads-python-lib | b80b8b3741a55f1d00c5974bc58f92540663c6f6 | [
"Apache-2.0"
] | null | null | null | examples/adwords/v201506/account_management/get_account_changes.py | fosterwei/adwords-keyword-planner-API-googleads-python-lib | b80b8b3741a55f1d00c5974bc58f92540663c6f6 | [
"Apache-2.0"
] | 2 | 2018-04-20T02:16:33.000Z | 2020-11-12T20:58:54.000Z | #!/usr/bin/python
#
# Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | 38.403846 | 78 | 0.648723 |
00f1f72be2817228d7f8fbbd72fc340e84db1a97 | 5,945 | py | Python | src/c02_introducing_essential_functional_concepts.py | jashburn8020/functional-python-programming | 34dab481e48f5e95f2d4f5400156f13b232aef25 | [
"Apache-2.0"
] | null | null | null | src/c02_introducing_essential_functional_concepts.py | jashburn8020/functional-python-programming | 34dab481e48f5e95f2d4f5400156f13b232aef25 | [
"Apache-2.0"
] | null | null | null | src/c02_introducing_essential_functional_concepts.py | jashburn8020/functional-python-programming | 34dab481e48f5e95f2d4f5400156f13b232aef25 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env pytest-3
"""
Introducing Essential Functional Concepts
We'll look at each of the following functional programming topics:
- First-class and higher-order functions, which are sometimes known as pure functions.
- Immutable data.
- Strict and non-strict evaluation. We can also call this eager versus lazy e... | 38.108974 | 99 | 0.693692 |
b46c6e9f185ee5feec7e97567c280b1ffce0e210 | 22,123 | py | Python | keras/callbacks_v1_test.py | itsraina/keras | 5e9376b5b94b6fb445dd52dbfafbc4e95bff5e35 | [
"Apache-2.0"
] | null | null | null | keras/callbacks_v1_test.py | itsraina/keras | 5e9376b5b94b6fb445dd52dbfafbc4e95bff5e35 | [
"Apache-2.0"
] | null | null | null | keras/callbacks_v1_test.py | itsraina/keras | 5e9376b5b94b6fb445dd52dbfafbc4e95bff5e35 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 The TensorFlow 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 applica... | 35.567524 | 80 | 0.531076 |
64b3abfc411dcbb56011f91ca095bdfdcf613afb | 21,710 | py | Python | CryptoAttacks/Block/gcm.py | akbarszcz/CryptoAttacks | ae675d016b314414a3dc9b23c7d8a32da4c62457 | [
"MIT"
] | 54 | 2017-03-28T23:46:58.000Z | 2022-02-23T01:53:38.000Z | CryptoAttacks/Block/gcm.py | maximmasiutin/CryptoAttacks | d1d47d3cb2ce38738a60b728bc35ce80bfe64374 | [
"MIT"
] | null | null | null | CryptoAttacks/Block/gcm.py | maximmasiutin/CryptoAttacks | d1d47d3cb2ce38738a60b728bc35ce80bfe64374 | [
"MIT"
] | 13 | 2017-03-31T06:07:23.000Z | 2021-11-20T19:01:30.000Z | from __future__ import absolute_import, division, print_function
from builtins import bytes, range, int
import math
from itertools import combinations
try:
from itertools import zip_longest
except:
from itertools import izip_longest as zip_longest
from random import randint
from copy import deepcopy
from Cryp... | 28.305085 | 155 | 0.580147 |
dcfa26e596224bd7534bef1a245e941f9c799733 | 11,341 | py | Python | src/evaluate.py | the-gamecoders/TheGameHub | b60b237a2626defda2240951f14074d13075c3c9 | [
"MIT"
] | null | null | null | src/evaluate.py | the-gamecoders/TheGameHub | b60b237a2626defda2240951f14074d13075c3c9 | [
"MIT"
] | null | null | null | src/evaluate.py | the-gamecoders/TheGameHub | b60b237a2626defda2240951f14074d13075c3c9 | [
"MIT"
] | 1 | 2020-11-15T14:24:43.000Z | 2020-11-15T14:24:43.000Z | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'evaluate.ui'
#
# Created by: PyQt5 UI code generator 5.15.1
#
# WARNING: Any manual changes made to this file will be lost when pyuic5 is
# run again. Do not edit this file unless you know what you are doing.
from PyQt5 import Q... | 42.796226 | 117 | 0.608853 |
fc82bb27a5dbb2bd65ede07302d5f8f551af58ae | 93,329 | py | Python | crabageprediction/venv/Lib/site-packages/fontTools/cffLib/__init__.py | 13rianlucero/CrabAgePrediction | 92bc7fbe1040f49e820473e33cc3902a5a7177c7 | [
"MIT"
] | null | null | null | crabageprediction/venv/Lib/site-packages/fontTools/cffLib/__init__.py | 13rianlucero/CrabAgePrediction | 92bc7fbe1040f49e820473e33cc3902a5a7177c7 | [
"MIT"
] | null | null | null | crabageprediction/venv/Lib/site-packages/fontTools/cffLib/__init__.py | 13rianlucero/CrabAgePrediction | 92bc7fbe1040f49e820473e33cc3902a5a7177c7 | [
"MIT"
] | null | null | null | """cffLib: read/write Adobe CFF fonts
OpenType fonts with PostScript outlines contain a completely independent
font file, Adobe's *Compact Font Format*. So dealing with OpenType fonts
requires also dealing with CFF. This module allows you to read and write
fonts written in the CFF format.
In 2016, OpenType 1.8 introd... | 30.913879 | 156 | 0.694007 |
21658900ead32dd2caada22f663e19f75f7bd6b4 | 5,711 | py | Python | sdk/python/pulumi_azure_native/cache/v20210301/get_private_endpoint_connection.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/cache/v20210301/get_private_endpoint_connection.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/cache/v20210301/get_private_endpoint_connection.py | sebtelko/pulumi-azure-native | 711ec021b5c73da05611c56c8a35adb0ce3244e4 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
fro... | 42.303704 | 193 | 0.698477 |
7dadadef1dd0943294d6619155cf7140f3536b6a | 599 | py | Python | tencent/lengthOfLIS.py | summer-vacation/AlgoExec | 55c6c3e7890b596b709b50cafa415b9594c03edd | [
"MIT"
] | null | null | null | tencent/lengthOfLIS.py | summer-vacation/AlgoExec | 55c6c3e7890b596b709b50cafa415b9594c03edd | [
"MIT"
] | 2 | 2019-12-09T06:12:51.000Z | 2019-12-16T14:38:34.000Z | tencent/lengthOfLIS.py | summer-vacation/AlgoExec | 55c6c3e7890b596b709b50cafa415b9594c03edd | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
File Name: lengthOfLIS
Author : jing
Date: 2020/3/24
https://leetcode-cn.com/problems/longest-increasing-subsequence/
最长上升子序列
"""
class Solution:
def lengthOfLIS(self, nums) -> int:
if nums is None or len(nums) == 0:
return 0
... | 23.038462 | 67 | 0.475793 |
5b1165f2e66336ce08da4aaa4d3c62ee5105ee6e | 736 | py | Python | examples/alembic/migrations/versions/3bf110ac566b_initial_create_table.py | DanCardin/sqlalchemy-postgresql-audit | e4f9d9497cf77dc96a243c48cd07c7658d4265dc | [
"MIT"
] | 3 | 2019-06-24T07:28:11.000Z | 2020-07-14T08:08:27.000Z | examples/alembic/migrations/versions/3bf110ac566b_initial_create_table.py | DanCardin/sqlalchemy-postgresql-audit | e4f9d9497cf77dc96a243c48cd07c7658d4265dc | [
"MIT"
] | 7 | 2019-06-20T20:56:44.000Z | 2019-06-28T07:00:04.000Z | examples/alembic/migrations/versions/3bf110ac566b_initial_create_table.py | DanCardin/sqlalchemy-postgresql-audit | e4f9d9497cf77dc96a243c48cd07c7658d4265dc | [
"MIT"
] | 2 | 2021-03-04T03:36:15.000Z | 2021-11-09T15:28:57.000Z | """Initial create table
Revision ID: 3bf110ac566b
Revises:
Create Date: 2019-06-23 12:24:26.501538
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '3bf110ac566b'
down_revision = None
branch_labels = None
depends_on = None
def upgrade():
# ### commands au... | 23 | 70 | 0.67663 |
6385f1a3ab345564a2a3ac7560f5b9d252838e37 | 15,751 | py | Python | topik/_version.py | ContinuumIO/topik | 3f943dce48fe8ca805868151c33f155a2d200a7c | [
"BSD-3-Clause"
] | 104 | 2015-02-06T10:37:32.000Z | 2019-10-11T09:53:10.000Z | topik/_version.py | sleitner/topik | 3f943dce48fe8ca805868151c33f155a2d200a7c | [
"BSD-3-Clause"
] | 61 | 2015-05-21T21:16:14.000Z | 2018-06-13T18:37:36.000Z | topik/_version.py | sleitner/topik | 3f943dce48fe8ca805868151c33f155a2d200a7c | [
"BSD-3-Clause"
] | 27 | 2015-03-09T07:46:08.000Z | 2021-03-22T13:27:40.000Z |
# This file helps to compute a version number in source trees obtained from
# git-archive tarball (such as those provided by githubs download-from-tag
# feature). Distribution tarballs (built by setup.py sdist) and build
# directories (produced by setup.py build) will contain a much shorter file
# that just contains t... | 34.167028 | 79 | 0.587582 |
6397a60bb633dd9772f20e5bcd71e9f966a80259 | 18,957 | py | Python | bakery_cli/scripts/genmetadata.py | jessamynsmith/fontbakery | fd75d7651c133ea27f8f98e81d1571e02ef5cf46 | [
"Apache-2.0"
] | null | null | null | bakery_cli/scripts/genmetadata.py | jessamynsmith/fontbakery | fd75d7651c133ea27f8f98e81d1571e02ef5cf46 | [
"Apache-2.0"
] | null | null | null | bakery_cli/scripts/genmetadata.py | jessamynsmith/fontbakery | fd75d7651c133ea27f8f98e81d1571e02ef5cf46 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# taken from https://code.google.com/p/googlefontdirectory/source/browse/tools/genmetadata/genmetadata.py
#
# Copyright 2012, Google Inc.
# Author: Jeremie Lenfant-Engelmann (jeremiele a google com)
# Author: Dave Crossland (dcrossland a google com )
#
# Licensed under the A... | 31.385762 | 463 | 0.618927 |
d6792a73798158e71a5f4c65659ba7e052a6bf48 | 1,033 | py | Python | char-rnn-generation/model.py | rdcsung/practical-pytorch | 6c57013c16eb928232af5e9bbe886a41c4ac9f9e | [
"MIT"
] | null | null | null | char-rnn-generation/model.py | rdcsung/practical-pytorch | 6c57013c16eb928232af5e9bbe886a41c4ac9f9e | [
"MIT"
] | null | null | null | char-rnn-generation/model.py | rdcsung/practical-pytorch | 6c57013c16eb928232af5e9bbe886a41c4ac9f9e | [
"MIT"
] | null | null | null | # https://github.com/spro/practical-pytorch
import torch
import torch.nn as nn
from torch.autograd import Variable
import config
class RNN(nn.Module):
def __init__(self, input_size, hidden_size, output_size, n_layers=1):
super(RNN, self).__init__()
self.input_size = input_size
self.hidden... | 31.30303 | 95 | 0.673766 |
e419e8c427020085f1744b6b91ec250edf882070 | 2,041 | py | Python | pageobjects/contact_us.py | sammy-nyubs/sovtech | 95d13f5830b259925bac32151dfe0d3309cfee0d | [
"Apache-2.0"
] | null | null | null | pageobjects/contact_us.py | sammy-nyubs/sovtech | 95d13f5830b259925bac32151dfe0d3309cfee0d | [
"Apache-2.0"
] | null | null | null | pageobjects/contact_us.py | sammy-nyubs/sovtech | 95d13f5830b259925bac32151dfe0d3309cfee0d | [
"Apache-2.0"
] | null | null | null | from selenium.webdriver.common.by import By
from toolium.pageobjects.page_object import PageObject
import time
class contact_usPagePageObject(PageObject):
def init_page_elements(self):
self.get_in_touch = (By.XPATH, "//h2[contains(text(),'Get in touch')]")
def open(self):
""" ... | 42.520833 | 164 | 0.67222 |
bdc8402291b6b69c943ffe54cfcc55e5801d497d | 4,997 | py | Python | mikefm_skill/observation.py | mohm-dhi/mikefm-skill | 7f8125983b4ec2a84c3ec5f7f683d389d2163ff4 | [
"MIT"
] | null | null | null | mikefm_skill/observation.py | mohm-dhi/mikefm-skill | 7f8125983b4ec2a84c3ec5f7f683d389d2163ff4 | [
"MIT"
] | null | null | null | mikefm_skill/observation.py | mohm-dhi/mikefm-skill | 7f8125983b4ec2a84c3ec5f7f683d389d2163ff4 | [
"MIT"
] | null | null | null | import os
from shapely.geometry import Point, MultiPoint
import pandas as pd
from mikeio import Dfs0, eum
class Observation:
name = None
df = None
itemInfo = None
color = "#d62728"
# DHI: darkblue: #004165,
# midblue: #0098DB,
# gray: #8B8D8E,
# lightblue:#63CEFF,
... | 25.237374 | 83 | 0.550931 |
0b262dc4e46e3805a80996d5c5edea60d04f0487 | 1,305 | py | Python | vut/lib/python3.8/site-packages/pipenv/vendor/pip_shims/__init__.py | dan-mutua/djangowk1 | 1e5dcb6443ef21451e21845ec639198719e11b10 | [
"MIT"
] | 18,636 | 2017-12-06T14:53:18.000Z | 2022-03-31T13:12:34.000Z | vut/lib/python3.8/site-packages/pipenv/vendor/pip_shims/__init__.py | dan-mutua/djangowk1 | 1e5dcb6443ef21451e21845ec639198719e11b10 | [
"MIT"
] | 3,640 | 2017-12-06T16:58:35.000Z | 2022-03-31T22:20:57.000Z | vut/lib/python3.8/site-packages/pipenv/vendor/pip_shims/__init__.py | dan-mutua/djangowk1 | 1e5dcb6443ef21451e21845ec639198719e11b10 | [
"MIT"
] | 1,987 | 2017-12-06T15:04:51.000Z | 2022-03-26T10:05:15.000Z | # -*- coding=utf-8 -*-
"""
This library is a set of compatibilty access shims to the ``pip`` internal API.
It provides compatibility with pip versions 8.0 through the current release. The
shims are provided using a lazy import strategy by hacking a module by overloading
a class instance's ``getattr`` method. This libra... | 24.622642 | 82 | 0.68046 |
038bfedb961c372ce61faf55350be365b32797f5 | 997 | py | Python | solutions/0763.Partition_Labels/python_solution.py | garyzccisme/leetcode | 56be6aeb07253c9da2d354eb239bd016b7574b22 | [
"MIT"
] | 2 | 2020-06-16T17:15:17.000Z | 2021-07-26T12:17:54.000Z | solutions/0763.Partition_Labels/python_solution.py | garyzccisme/leetcode | 56be6aeb07253c9da2d354eb239bd016b7574b22 | [
"MIT"
] | null | null | null | solutions/0763.Partition_Labels/python_solution.py | garyzccisme/leetcode | 56be6aeb07253c9da2d354eb239bd016b7574b22 | [
"MIT"
] | 1 | 2020-10-03T18:34:56.000Z | 2020-10-03T18:34:56.000Z | # My Solution
class Solution:
def partitionLabels(self, S: str) -> List[int]:
letter_dict = {}
for i, letter in enumerate(S):
if letter not in letter_dict:
letter_dict[letter] = [i, i]
else:
letter_dict[letter][-1] = i
pos = list(lett... | 27.694444 | 69 | 0.465396 |
aa6c31bc5bda966d39c7c4b0c6adfd6a821fe832 | 393 | py | Python | eventup/users/models/role_admin.py | Z-Devs-platzi/backend | 66dc436311c1e5e307c5f32d6a151fb9e5d6e0b8 | [
"MIT"
] | null | null | null | eventup/users/models/role_admin.py | Z-Devs-platzi/backend | 66dc436311c1e5e307c5f32d6a151fb9e5d6e0b8 | [
"MIT"
] | 15 | 2020-08-23T18:40:49.000Z | 2022-03-12T00:46:49.000Z | eventup/users/models/role_admin.py | Z-Devs-platzi/event_up-backend | 2b03a87e220cf4d68c4c2c2067096926d6f19b37 | [
"MIT"
] | null | null | null | """Profile model."""
# Django
from django.db import models
# Utilities
from eventup.utils.models import GeneralModel
class RoleAdmin(GeneralModel):
"""Role Admin model.
The role base of the user main.
"""
name = models.TextField(max_length=500, blank=False, null=False)
def __str__(self):
... | 19.65 | 68 | 0.6743 |
c703b7cf0d2bcd2a2b045643206b20482eaa2b4b | 2,481 | py | Python | bin/update_results.py | bmustiata/jenny | 1fd5b873684a747d9924f3f07d4e114c2193ac3c | [
"BSD-3-Clause"
] | 84 | 2018-04-14T08:13:02.000Z | 2022-03-25T13:41:17.000Z | bin/update_results.py | bmustiata/jenny | 1fd5b873684a747d9924f3f07d4e114c2193ac3c | [
"BSD-3-Clause"
] | 61 | 2018-04-05T22:21:46.000Z | 2019-12-01T14:30:14.000Z | bin/update_results.py | bmustiata/jenny | 1fd5b873684a747d9924f3f07d4e114c2193ac3c | [
"BSD-3-Clause"
] | 10 | 2018-08-20T16:44:07.000Z | 2021-02-15T19:50:28.000Z | #!/usr/bin/env python3
import os
import os.path
import subprocess
import sys
from typing import List
PROJECT_FOLDER = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
def update_single_test(folder: str) -> None:
log_folder = folder
current_folder = os.curdir # type: str
os.chdir("{0}/{1}"... | 28.517241 | 77 | 0.651753 |
c797b48912518b804b816199ababd3cc8d2fd3e1 | 10,662 | py | Python | aiida/backends/tests/cmdline/commands/test_code.py | joepvd/aiida_core | 6e9711046753332933f982971db1d7ac7e7ade58 | [
"BSD-2-Clause"
] | null | null | null | aiida/backends/tests/cmdline/commands/test_code.py | joepvd/aiida_core | 6e9711046753332933f982971db1d7ac7e7ade58 | [
"BSD-2-Clause"
] | null | null | null | aiida/backends/tests/cmdline/commands/test_code.py | joepvd/aiida_core | 6e9711046753332933f982971db1d7ac7e7ade58 | [
"BSD-2-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
###########################################################################
# Copyright (c), The AiiDA team. All rights reserved. #
# This file is part of the AiiDA code. #
# ... | 42.991935 | 120 | 0.636091 |
c40e84478b80fe3ebff8ada60a45ac082c6fa81c | 1,318 | py | Python | test/test_add_contact.py | Marat-github/new_proj_1 | a35d49f260ec08218a92782b83e974785c3a3581 | [
"Apache-2.0"
] | null | null | null | test/test_add_contact.py | Marat-github/new_proj_1 | a35d49f260ec08218a92782b83e974785c3a3581 | [
"Apache-2.0"
] | null | null | null | test/test_add_contact.py | Marat-github/new_proj_1 | a35d49f260ec08218a92782b83e974785c3a3581 | [
"Apache-2.0"
] | null | null | null |
from model.contact_class import Contact
def test_add_contact(app):
app.session.login(username="admin", password="secret")
app.contact.create_contact(Contact(firstname="1234", middlename="1243", lastname="234", nickname="324", title="324234",
company="fdge", address="ebebebt", home... | 57.304348 | 123 | 0.570561 |
470d6d544634af5f6d93cc19bd20c9e1176e8fd5 | 214 | py | Python | cryptosploit.py | nullpsifer/cryptosploit | e33cfca07397c05dffa734274c202acc7ff597b4 | [
"MIT"
] | null | null | null | cryptosploit.py | nullpsifer/cryptosploit | e33cfca07397c05dffa734274c202acc7ff597b4 | [
"MIT"
] | null | null | null | cryptosploit.py | nullpsifer/cryptosploit | e33cfca07397c05dffa734274c202acc7ff597b4 | [
"MIT"
] | null | null | null | from interfaces import *
from states import AwaitingCommandState
def main():
interface = TerminalInterface(AwaitingCommandState())
interface.handleCommands()
if __name__ == "__main__":
main()
| 21.4 | 57 | 0.719626 |
bc4d51d3bd84b09763d10f222217339b64eb88b2 | 14,799 | py | Python | appGUI/preferences/tools/ToolsISOPrefGroupUI.py | DannyPol/flatcam | 25a8634d0658e98b7fae31a095f8bef40c1b3067 | [
"MIT"
] | 1 | 2022-02-11T06:19:34.000Z | 2022-02-11T06:19:34.000Z | appGUI/preferences/tools/ToolsISOPrefGroupUI.py | MRemy2/FlatCam | d4f941335ca8a8d5351aab23b396f99da06a9029 | [
"MIT"
] | null | null | null | appGUI/preferences/tools/ToolsISOPrefGroupUI.py | MRemy2/FlatCam | d4f941335ca8a8d5351aab23b396f99da06a9029 | [
"MIT"
] | null | null | null | from PyQt5 import QtWidgets
from PyQt5.QtCore import QSettings
from appGUI.GUIElements import RadioSet, FCDoubleSpinner, FCComboBox2, FCCheckBox, FCSpinner, NumericalEvalTupleEntry
from appGUI.preferences.OptionsGroupUI import OptionsGroupUI
import gettext
import appTranslation as fcTranslate
import builtins
fcTrans... | 42.525862 | 117 | 0.593081 |
3883c2a3b6513acfd31aa53f189c2c2ef634ded8 | 2,047 | py | Python | distopia/district/__init__.py | kevinguo344/distopia | 077dd3501bd43565d1a9647a151fb20b90b71a54 | [
"MIT"
] | null | null | null | distopia/district/__init__.py | kevinguo344/distopia | 077dd3501bd43565d1a9647a151fb20b90b71a54 | [
"MIT"
] | null | null | null | distopia/district/__init__.py | kevinguo344/distopia | 077dd3501bd43565d1a9647a151fb20b90b71a54 | [
"MIT"
] | null | null | null | """
District
=========
:class:`District` defines a district and and the precincts it contains.
"""
__all__ = ('District', )
class District(object):
"""
Describes a district, its precincts and its metrics.
"""
name = ''
"""A globally unique name (or number) describing the district.
"""
... | 25.271605 | 77 | 0.608207 |
7fcc4151fc635130ed97cbcc693c2d2a28801b9f | 2,323 | py | Python | var/spack/repos/builtin/packages/py-bluepysnap/package.py | DriesVerachtert/spack | 7b55a4cc4cddb183138e4af2d140567a98297543 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/py-bluepysnap/package.py | DriesVerachtert/spack | 7b55a4cc4cddb183138e4af2d140567a98297543 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | var/spack/repos/builtin/packages/py-bluepysnap/package.py | DriesVerachtert/spack | 7b55a4cc4cddb183138e4af2d140567a98297543 | [
"ECL-2.0",
"Apache-2.0",
"MIT-0",
"MIT"
] | null | null | null | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PyBluepysnap(PythonPackage):
"""Pythonic Sonata circuits access API"""
homepage = "ht... | 48.395833 | 95 | 0.717607 |
cb748998520081d003f6e3d859d246ad5c427f21 | 31,540 | py | Python | pygbm/gradient_boosting.py | aniajj9/pygbm | 08206c88d703f3085b4a18b8ceef83b3450cfc91 | [
"MIT"
] | null | null | null | pygbm/gradient_boosting.py | aniajj9/pygbm | 08206c88d703f3085b4a18b8ceef83b3450cfc91 | [
"MIT"
] | null | null | null | pygbm/gradient_boosting.py | aniajj9/pygbm | 08206c88d703f3085b4a18b8ceef83b3450cfc91 | [
"MIT"
] | null | null | null | """
Gradient Boosting decision trees for classification and regression.
"""
from abc import ABC, abstractmethod
import numpy as np
from numba import njit, prange
from time import time
from sklearn.base import BaseEstimator, RegressorMixin, ClassifierMixin
from sklearn.utils import check_X_y, check_random_state, check_... | 42.679296 | 79 | 0.624604 |
f6ff48deb9fb9ebd76e48ee147a3d063ebc775c0 | 2,249 | py | Python | udacity-program_self_driving_car_engineer_v1.0/part01-computer vision and deep learning/module04-computer vision/lesson01-camera calibration/undistort_and_transform/distort_transform.py | linksdl/futuretec-project-self_driving_cars_projects | 38e8f14543132ec86a8bada8d708eefaef23fee8 | [
"MIT"
] | null | null | null | udacity-program_self_driving_car_engineer_v1.0/part01-computer vision and deep learning/module04-computer vision/lesson01-camera calibration/undistort_and_transform/distort_transform.py | linksdl/futuretec-project-self_driving_cars_projects | 38e8f14543132ec86a8bada8d708eefaef23fee8 | [
"MIT"
] | null | null | null | udacity-program_self_driving_car_engineer_v1.0/part01-computer vision and deep learning/module04-computer vision/lesson01-camera calibration/undistort_and_transform/distort_transform.py | linksdl/futuretec-project-self_driving_cars_projects | 38e8f14543132ec86a8bada8d708eefaef23fee8 | [
"MIT"
] | null | null | null | """
# !/usr/bin/env python
# -*- coding: utf-8 -*-
@Time : 2022/2/24 23:00
@Author : shengdl999links@gmail.com
@ProjectName : udacity-program_self_driving_car_engineer_v1.0_source.0
@File : distort_transform.py
"""
import pickle
import cv2
import numpy as np
import matplotlib.pyplot as plt
import m... | 37.483333 | 89 | 0.669186 |
9c59c74a7b41a45097f0f004065bfb7e3236acea | 1,333 | py | Python | csv_handler.py | Lauenburg/simple_webcrawler | 27cb1ec3625033ebb232bf7ac40546e89658abdd | [
"MIT"
] | null | null | null | csv_handler.py | Lauenburg/simple_webcrawler | 27cb1ec3625033ebb232bf7ac40546e89658abdd | [
"MIT"
] | null | null | null | csv_handler.py | Lauenburg/simple_webcrawler | 27cb1ec3625033ebb232bf7ac40546e89658abdd | [
"MIT"
] | null | null | null | import csv
import os
def create_csv_file(path, csv_file_name, csv_header=None):
''' Creates a csv file with the default header defined below.
Args:
path: Path to the csv_file
csv_file_name: Name of the csv file
csv_header: Header for the csv-file
Return:
... | 27.204082 | 71 | 0.631658 |
80ce750e47e69d1ea755ad8a857ebfac2ec20ea3 | 3,894 | py | Python | manifolds/main.py | rrkarim/MoNet | 0913173735ce2f369a16165b50c47438b7249406 | [
"MIT"
] | 35 | 2019-06-28T11:00:19.000Z | 2022-03-26T19:03:21.000Z | manifolds/main.py | rrkarim/MoNet | 0913173735ce2f369a16165b50c47438b7249406 | [
"MIT"
] | 3 | 2020-08-13T08:16:00.000Z | 2022-02-28T13:20:43.000Z | manifolds/main.py | rrkarim/MoNet | 0913173735ce2f369a16165b50c47438b7249406 | [
"MIT"
] | 3 | 2020-05-31T13:48:43.000Z | 2022-01-24T13:11:30.000Z | import argparse
import os.path as osp
import torch
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import torch.backends.cudnn as cudnn
from torch_geometric.datasets import FAUST
from torch_geometric.data import DataLoader
import torch_geometric.transforms as T
from conv import GMMCo... | 35.4 | 74 | 0.665383 |
140fafa64c75356310fa8071504252b81973574a | 24,357 | py | Python | tensorflow/python/kernel_tests/check_ops_test.py | sachinpro/sachinpro.github.io | c3bbd8d89818f5d8bb7296c851ed5e52c19728e3 | [
"Apache-2.0"
] | 1 | 2018-01-24T12:57:47.000Z | 2018-01-24T12:57:47.000Z | tensorflow/python/kernel_tests/check_ops_test.py | sachinpro/sachinpro.github.io | c3bbd8d89818f5d8bb7296c851ed5e52c19728e3 | [
"Apache-2.0"
] | null | null | null | tensorflow/python/kernel_tests/check_ops_test.py | sachinpro/sachinpro.github.io | c3bbd8d89818f5d8bb7296c851ed5e52c19728e3 | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 38.785032 | 80 | 0.673277 |
785b937a837d5802b9fa00a8074ecfe9c68f6c81 | 1,079 | py | Python | Web-Development/Learning-Django/Polling-Site/polls_app/migrations/0001_initial.py | oliverkeen/Sandbox | 40e2a9239a81ebaeff6e7b34ed8329c6796d71f5 | [
"MIT"
] | null | null | null | Web-Development/Learning-Django/Polling-Site/polls_app/migrations/0001_initial.py | oliverkeen/Sandbox | 40e2a9239a81ebaeff6e7b34ed8329c6796d71f5 | [
"MIT"
] | null | null | null | Web-Development/Learning-Django/Polling-Site/polls_app/migrations/0001_initial.py | oliverkeen/Sandbox | 40e2a9239a81ebaeff6e7b34ed8329c6796d71f5 | [
"MIT"
] | null | null | null | # Generated by Django 3.1.7 on 2021-03-25 17:54
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Question',
fields=[
... | 32.69697 | 118 | 0.587581 |
9191fe9394efb568cec8993f6d50b4af875985e9 | 3,039 | py | Python | SimilarSentences/TrainSentences.py | shangan23/similar-sentences | 49a512b4010fb1a4a4def2685b04f9c27551b543 | [
"Apache-2.0"
] | 9 | 2020-04-15T13:31:01.000Z | 2021-12-13T06:37:08.000Z | SimilarSentences/TrainSentences.py | shangan23/similar-sentences | 49a512b4010fb1a4a4def2685b04f9c27551b543 | [
"Apache-2.0"
] | null | null | null | SimilarSentences/TrainSentences.py | shangan23/similar-sentences | 49a512b4010fb1a4a4def2685b04f9c27551b543 | [
"Apache-2.0"
] | 3 | 2020-06-23T12:45:47.000Z | 2020-10-09T05:41:53.000Z | import numpy as np
import logging
import zipfile
import os
import shutil
from sentence_transformers import SentenceTransformer, LoggingHandler
from sys import exit
class TrainSentences:
def __init__(self, txt_file, pretrain_model: str = None):
dir_path = os.getcwd() + '/'
file_path = dir_path + t... | 41.067568 | 87 | 0.602501 |
13ba6cfcbf7a417e45a97fa1c6e508cb2411260d | 113 | py | Python | agbot/models/states.py | Toffooo/aituio | a4382f2d857cf8a5dd3b44bbc5fa93203c2eec28 | [
"MIT"
] | 1 | 2022-01-18T14:17:11.000Z | 2022-01-18T14:17:11.000Z | agbot/models/states.py | Toffooo/aituio | a4382f2d857cf8a5dd3b44bbc5fa93203c2eec28 | [
"MIT"
] | null | null | null | agbot/models/states.py | Toffooo/aituio | a4382f2d857cf8a5dd3b44bbc5fa93203c2eec28 | [
"MIT"
] | null | null | null | from aiogram.dispatcher.filters.state import State, StatesGroup
class UseState(StatesGroup):
who = State()
| 18.833333 | 63 | 0.769912 |
e317927b3ad6f6c82f03e391a88299190d06dab0 | 2,620 | py | Python | app/modules/labeled_group.py | embian-inc/Appium-Python-Console | bb15ac441d713a0be4a8e6fee61ca54cf6fc7614 | [
"MIT"
] | 8 | 2017-09-25T05:46:53.000Z | 2022-02-04T14:42:57.000Z | app/modules/labeled_group.py | embian-inc/Appium-Python-Console | bb15ac441d713a0be4a8e6fee61ca54cf6fc7614 | [
"MIT"
] | null | null | null | app/modules/labeled_group.py | embian-inc/Appium-Python-Console | bb15ac441d713a0be4a8e6fee61ca54cf6fc7614 | [
"MIT"
] | 2 | 2018-11-28T19:16:20.000Z | 2022-02-04T14:39:15.000Z | # -*- coding: utf-8 -*-
import os,sys
from bs4 import BeautifulSoup
from app.modules.rect import Bounds, Point
from labeled_element import LabeledElement
reload(sys)
sys.setdefaultencoding('utf-8')
class LabeledGroup(LabeledElement):
#group: {'gtype':'selection|sequence', 'pre':[LabeledAction, ...], 'final':[(La... | 32.345679 | 139 | 0.635115 |
cdb283559563caf2cc79f74e7f501f1eda6a2498 | 1,348 | py | Python | load_tests/QueryGuest_Case/add_guests.py | Ezetowers/AppEngine_EventsManagement | 23e496dee161fbe62596f466d3e83e9a88c2f2b4 | [
"MIT"
] | null | null | null | load_tests/QueryGuest_Case/add_guests.py | Ezetowers/AppEngine_EventsManagement | 23e496dee161fbe62596f466d3e83e9a88c2f2b4 | [
"MIT"
] | null | null | null | load_tests/QueryGuest_Case/add_guests.py | Ezetowers/AppEngine_EventsManagement | 23e496dee161fbe62596f466d3e83e9a88c2f2b4 | [
"MIT"
] | null | null | null | from lxml import etree
import sys
REQUEST_BODY_PART_1 = '<![CDATA[actualEvent='
REQUEST_BODY_PART_2 = '&guestName=Phil&guestSurname=Collins&guestCompany=GenesisSRL&guestEmail='
REQUEST_BODY_PART_3 = '&checkDuplicates=false]]>'
CONTENT_TYPE = 'Content-type: application/x-www-form-urlencoded'
def usage():
print "p... | 32.878049 | 108 | 0.654303 |
9d2ac6bbd7d9ef2580e7d60000631f555a05c17a | 15,463 | py | Python | sdk/python/pulumi_azure_native/web/v20210101/web_app_relay_service_connection.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/web/v20210101/web_app_relay_service_connection.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | sdk/python/pulumi_azure_native/web/v20210101/web_app_relay_service_connection.py | polivbr/pulumi-azure-native | 09571f3bf6bdc4f3621aabefd1ba6c0d4ecfb0e7 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
import warnings
import pulumi
import pulumi.runtime
from typing import Any, Mapping, Optional, Sequence, Union, overload
from ... import _utilities
__... | 46.575301 | 2,021 | 0.670439 |
abde5948bfb9448ac231ad1734c1110428078ef9 | 196 | py | Python | mm_tools/web/models/__init__.py | ceko/mischief-tools | 10618982a08aa765e5e71bb6ac7d4ee6886cb65f | [
"MIT"
] | null | null | null | mm_tools/web/models/__init__.py | ceko/mischief-tools | 10618982a08aa765e5e71bb6ac7d4ee6886cb65f | [
"MIT"
] | 5 | 2021-03-19T02:48:51.000Z | 2021-09-22T18:58:55.000Z | mm_tools/web/models/__init__.py | ceko/mischief-tools | 10618982a08aa765e5e71bb6ac7d4ee6886cb65f | [
"MIT"
] | null | null | null | from django.db import models
from .items import Item, Priority, ItemTier
from .tokens import Token
from .raids import *
from .base import *
from .characters import Character
from .users import *
| 21.777778 | 43 | 0.780612 |
70de64d2c6fad42a1deff1d730cb527188b852a5 | 383 | py | Python | examples/keras/iris_server.py | jacquelinegarrahan/lume-epics | f647107d87c80f3b69eaa5d49de08f212e95428d | [
"BSD-3-Clause-LBNL"
] | 1 | 2020-06-24T02:54:28.000Z | 2020-06-24T02:54:28.000Z | examples/keras/iris_server.py | jacquelinegarrahan/lume-epics | f647107d87c80f3b69eaa5d49de08f212e95428d | [
"BSD-3-Clause-LBNL"
] | 1 | 2021-07-29T03:59:01.000Z | 2021-07-29T03:59:01.000Z | examples/keras/iris_server.py | jacquelinegarrahan/lume-epics | f647107d87c80f3b69eaa5d49de08f212e95428d | [
"BSD-3-Clause-LBNL"
] | 5 | 2020-06-12T21:29:47.000Z | 2021-10-16T22:48:15.000Z |
from lume_epics.epics_server import Server
from lume_model.utils import model_from_yaml
with open("examples/files/iris_config.yml", "r") as f:
model_class, model_kwargs = model_from_yaml(f, load_model=False)
prefix = "test"
server = Server(
model_class,
prefix,
model_kwargs=model_kwargs
)
# monitor ... | 23.9375 | 68 | 0.759791 |
f8d1a7c2ec9a5d79795c58aa579b89c5d0213001 | 794 | py | Python | bts/utilities/octoBTS/dataBaseClass.py | ellisgeek/Burn-the-Subs | c30c41b6bdba573f906c36d367547c7305017b4f | [
"MIT"
] | 10 | 2018-09-25T18:05:41.000Z | 2020-05-05T21:12:22.000Z | bts/utilities/octoBTS/dataBaseClass.py | ellisgeek/Burn-the-Subs | c30c41b6bdba573f906c36d367547c7305017b4f | [
"MIT"
] | 1 | 2018-12-29T19:36:21.000Z | 2018-12-29T19:36:21.000Z | bts/utilities/octoBTS/dataBaseClass.py | ellisgeek/Burn-the-Subs | c30c41b6bdba573f906c36d367547c7305017b4f | [
"MIT"
] | 6 | 2018-12-29T00:59:22.000Z | 2021-09-15T17:12:01.000Z | # db shit goes here
# so if we want to change anything on the fly
# we don't have to edit like 7 programs.
# this is from: with help from: cordain99 etc
# status = 0: name entered 1: name placed 2:gcode ready 3: burnt to board
from peewee import *
from playhouse.sqliteq import SqliteQueueDatabase
from . import settin... | 27.37931 | 73 | 0.714106 |
31e4514253566355c82c69780f0a4369f03a460b | 73 | py | Python | combine.py | kw0nta/pyledjr | b3f4c5f727defa025b78cd5cdd9f2cb134559e4c | [
"MIT"
] | 1 | 2019-08-11T03:48:48.000Z | 2019-08-11T03:48:48.000Z | combine.py | kw0nta/pyledjr | b3f4c5f727defa025b78cd5cdd9f2cb134559e4c | [
"MIT"
] | null | null | null | combine.py | kw0nta/pyledjr | b3f4c5f727defa025b78cd5cdd9f2cb134559e4c | [
"MIT"
] | null | null | null | """
Combine individual cleaned bank account data into a single file.
"""
| 18.25 | 64 | 0.739726 |
3dab07d52ad2a6d28440ce56d7ee97244aca53fd | 1,300 | py | Python | test.py | rapsealk/yolov3-tf2 | 4e5381a5c8ceda28668e0f144e58638ee64d9187 | [
"MIT"
] | null | null | null | test.py | rapsealk/yolov3-tf2 | 4e5381a5c8ceda28668e0f144e58638ee64d9187 | [
"MIT"
] | null | null | null | test.py | rapsealk/yolov3-tf2 | 4e5381a5c8ceda28668e0f144e58638ee64d9187 | [
"MIT"
] | null | null | null | #!/usr/local/bin/python3
# -*- coding: utf-8 -*-
import unittest
import os
import io
import time
import tensorflow as tf
import numpy as np
from PIL import ImageGrab
shape = (1080, 1920, 3)
class TensorFlowImageTestCase(unittest.TestCase):
def test_pillow_image(self):
ticks = []
for _ in range(... | 30.232558 | 92 | 0.625385 |
5f89e6c0ee1155767632d3e5269e846be578789a | 6,104 | py | Python | fairseq/distributed/legacy_distributed_data_parallel.py | MANGA-UOFA/NAUS | 8c0c0815a280d0661adf588302848c7f1ecc56da | [
"MIT"
] | 8 | 2022-03-19T15:20:10.000Z | 2022-03-30T20:29:25.000Z | fairseq/distributed/legacy_distributed_data_parallel.py | MANGA-UOFA/NAUS | 8c0c0815a280d0661adf588302848c7f1ecc56da | [
"MIT"
] | null | null | null | fairseq/distributed/legacy_distributed_data_parallel.py | MANGA-UOFA/NAUS | 8c0c0815a280d0661adf588302848c7f1ecc56da | [
"MIT"
] | 2 | 2022-03-18T14:42:41.000Z | 2022-03-19T15:23:20.000Z | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"""
A modified version of the legacy DistributedDataParallel module that uses c10d
communication primitives. This version is simpler than the ... | 36.771084 | 88 | 0.55652 |
fc642e7cae179e800da97f7f9df4799650624163 | 2,535 | py | Python | Moon_Data/source/predict.py | ACasey13/udacity-ML-case-studies | ebdbe44786403d3373779d576a00f552754cf15d | [
"MIT"
] | null | null | null | Moon_Data/source/predict.py | ACasey13/udacity-ML-case-studies | ebdbe44786403d3373779d576a00f552754cf15d | [
"MIT"
] | null | null | null | Moon_Data/source/predict.py | ACasey13/udacity-ML-case-studies | ebdbe44786403d3373779d576a00f552754cf15d | [
"MIT"
] | null | null | null | import argparse
import os
import sys
import pandas as pd
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
import torch.utils.data
from io import StringIO
from six import BytesIO
# import model
from model import SimpleNet
# accepts and returns numpy data
CONTENT_TYPE = 'application/x... | 30.914634 | 89 | 0.696252 |
0305ca99d4af997bf57b71067468ac537b615655 | 10,927 | py | Python | explain.py | IPL-UV/LatentGranger | 78d25621f94f338c3c1957a216679c94b2d9b764 | [
"BSD-3-Clause"
] | null | null | null | explain.py | IPL-UV/LatentGranger | 78d25621f94f338c3c1957a216679c94b2d9b764 | [
"BSD-3-Clause"
] | null | null | null | explain.py | IPL-UV/LatentGranger | 78d25621f94f338c3c1957a216679c94b2d9b764 | [
"BSD-3-Clause"
] | 1 | 2021-08-09T09:58:19.000Z | 2021-08-09T09:58:19.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# BSD 3-Clause License (see LICENSE file)
# Copyright (c) Image and Signaling Process Group (ISP) IPL-UV 2021
# All rights reserved.
"""
Explain latent space of LatentGranger
"""
import os
import git
import numpy as np
import argparse, yaml
from datetime import datetime... | 35.477273 | 102 | 0.623867 |
a440664956723eab08fdbc275f38fa9b0ebae042 | 10,816 | py | Python | airbyte-integrations/bases/base-normalization/integration_tests/dbt_integration_test.py | ashis-Nayak-13/airbyte | e699f397401c509286fd29f2678e9ee860f001a5 | [
"MIT"
] | 2 | 2021-03-02T09:17:41.000Z | 2021-03-02T11:02:23.000Z | airbyte-integrations/bases/base-normalization/integration_tests/dbt_integration_test.py | ashis-Nayak-13/airbyte | e699f397401c509286fd29f2678e9ee860f001a5 | [
"MIT"
] | 4 | 2021-06-10T13:30:31.000Z | 2021-06-10T14:03:22.000Z | airbyte-integrations/bases/base-normalization/integration_tests/dbt_integration_test.py | keu/airbyte | 0bfd83052887e1ca72ddfdb339c62d2e39b050bc | [
"MIT"
] | 1 | 2021-07-02T15:08:53.000Z | 2021-07-02T15:08:53.000Z | #
# MIT License
#
# Copyright (c) 2020 Airbyte
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, pu... | 40.815094 | 123 | 0.596801 |
e4ca5a98263def49e8fe87b37ea0cf66a3890236 | 6,038 | py | Python | test/part_manager_oop.py | yassineazrak/app_desktop_sraping_web | 5bc61a452deaeedf7526e6811de82f76311ed85a | [
"MIT"
] | 136 | 2019-11-07T14:08:45.000Z | 2022-03-31T23:56:12.000Z | test/part_manager_oop.py | yassineazrak/app_desktop_sraping_web | 5bc61a452deaeedf7526e6811de82f76311ed85a | [
"MIT"
] | 4 | 2019-11-08T12:39:07.000Z | 2021-07-04T16:12:57.000Z | test/part_manager_oop.py | yassineazrak/app_desktop_sraping_web | 5bc61a452deaeedf7526e6811de82f76311ed85a | [
"MIT"
] | 98 | 2019-11-07T18:09:52.000Z | 2022-03-28T16:39:06.000Z | import tkinter as tk
from tkinter import messagebox
from db import Database
# Instanciate databse object
db = Database('store.db')
# Main Application/GUI class
class Application(tk.Frame):
def __init__(self, master):
super().__init__(master)
self.master = master
master.title('Part Manage... | 37.7375 | 137 | 0.617257 |
03b68a85e90b9b6f1bf6bc0ce79172eaa4f10d9b | 54,732 | py | Python | research/object_detection/inputs.py | duncanriach-nvidia/tensorflow-models | f95f014e6192434f405b7d6209c885072a3f6b6d | [
"Apache-2.0"
] | 1 | 2020-05-20T11:40:56.000Z | 2020-05-20T11:40:56.000Z | research/object_detection/inputs.py | duncanriach-nvidia/tensorflow-models | f95f014e6192434f405b7d6209c885072a3f6b6d | [
"Apache-2.0"
] | null | null | null | research/object_detection/inputs.py | duncanriach-nvidia/tensorflow-models | f95f014e6192434f405b7d6209c885072a3f6b6d | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 The TensorFlow 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 applica... | 45.046914 | 81 | 0.740499 |
c271975c5b2509c3980649a11526b214cbce831b | 6,368 | py | Python | utils/generator/generators_isic_test.py | leezhp1994/TMHFS | 4711c38aab7657313eea3697da5cb1e4122ae8c8 | [
"Apache-2.0"
] | 7 | 2020-05-20T02:22:25.000Z | 2021-03-26T08:51:51.000Z | utils/generator/generators_isic_test.py | leezhp1994/TMHFS | 4711c38aab7657313eea3697da5cb1e4122ae8c8 | [
"Apache-2.0"
] | null | null | null | utils/generator/generators_isic_test.py | leezhp1994/TMHFS | 4711c38aab7657313eea3697da5cb1e4122ae8c8 | [
"Apache-2.0"
] | null | null | null | """
This code based on codes from https://github.com/tristandeleu/ntm-one-shot \
and https://github.com/kjunelee/MetaOptNet
"""
import numpy as np
import random, os
import pickle as pkl
from PIL import Image
import pandas as pd
import utils.generator.additional_transforms as add_transforms... | 39.552795 | 157 | 0.585898 |
ec5b91a0224a0e390523216ef95d80ded5a79025 | 1,479 | py | Python | setup.py | sih4sing5hong5/hue7jip8 | 64ff872e11ce36c3721889f59de92b694735400c | [
"MIT"
] | 15 | 2018-10-15T06:45:50.000Z | 2021-08-10T03:43:00.000Z | setup.py | tku609630339/hue7jip8 | 64ff872e11ce36c3721889f59de92b694735400c | [
"MIT"
] | 58 | 2017-08-02T07:26:11.000Z | 2020-11-06T06:50:09.000Z | setup.py | sih4sing5hong5/hue7jip8 | 64ff872e11ce36c3721889f59de92b694735400c | [
"MIT"
] | 4 | 2018-07-10T20:10:35.000Z | 2021-05-22T08:49:01.000Z | from setuptools import setup
from os import walk
import os
import sys
from 版本 import 版本
# tar無法度下傷長的檔案名,所以愛用zip
# python setup.py sdist --format=zip upload
try:
# travis攏先`python setup.py sdist`才閣上傳
sys.argv.insert(sys.argv.index('sdist') + 1, '--format=zip')
except ValueError:
# 無upload
pass
def 讀(檔... | 23.47619 | 67 | 0.597701 |
74c3998665f3c93c811fb672334ed7ceed0a2a49 | 4,933 | py | Python | armada/tests/unit/api/test_armada_controller.py | openstack/airship-armada | 416eff4e52f72169c3ebf49a8ffca36086692b7a | [
"Apache-2.0"
] | 29 | 2018-05-21T04:34:34.000Z | 2019-05-10T12:32:46.000Z | armada/tests/unit/api/test_armada_controller.py | openstack/airship-armada | 416eff4e52f72169c3ebf49a8ffca36086692b7a | [
"Apache-2.0"
] | 1 | 2019-11-11T23:31:27.000Z | 2019-11-11T23:31:27.000Z | armada/tests/unit/api/test_armada_controller.py | airshipit/armada | 790af88d61bb3d0f0368faae22e94b4e533df92d | [
"Apache-2.0"
] | 9 | 2019-05-23T10:14:00.000Z | 2020-03-03T03:08:02.000Z | # Copyright 2017 AT&T Intellectual Property. All other 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... | 34.985816 | 79 | 0.631664 |
43f5569a13dd26e3e044ea8726b6f4f22d8a8f59 | 2,018 | py | Python | benchmark.py | wjwOffline/brainfuck-jit-interpreter | c1e58feffe95050d86ddf17fecc2edb5f6ac29ce | [
"MIT"
] | 14 | 2021-05-19T09:57:58.000Z | 2022-03-23T16:32:25.000Z | benchmark.py | wjwOffline/brainfuck-jit-interpreter | c1e58feffe95050d86ddf17fecc2edb5f6ac29ce | [
"MIT"
] | 1 | 2022-01-10T05:06:24.000Z | 2022-01-10T05:32:28.000Z | benchmark.py | wjwOffline/brainfuck-jit-interpreter | c1e58feffe95050d86ddf17fecc2edb5f6ac29ce | [
"MIT"
] | 2 | 2021-06-04T13:59:26.000Z | 2021-12-29T12:14:15.000Z | import logging
import shlex
import subprocess
import sys
import threading
import os
import time
default_benchmark_time = 10
constant_idx_zer = 0
constant_idx_one = 1
def exec_cmd(command, file_name, timeout):
try:
with open(file_name, 'w+') as f:
cmd = subprocess.Popen(shlex.split(command),
... | 34.20339 | 105 | 0.652131 |
0fdbd30996d223aa52fcbb7f1ce15f24b7331d5b | 1,917 | py | Python | tests/test_01_main/test_env_vars_3.py | sondrelg/uvicorn-gunicorn-docker | ddd38797d6a9ca820bd8b3134a0398ef3df8877a | [
"MIT"
] | null | null | null | tests/test_01_main/test_env_vars_3.py | sondrelg/uvicorn-gunicorn-docker | ddd38797d6a9ca820bd8b3134a0398ef3df8877a | [
"MIT"
] | null | null | null | tests/test_01_main/test_env_vars_3.py | sondrelg/uvicorn-gunicorn-docker | ddd38797d6a9ca820bd8b3134a0398ef3df8877a | [
"MIT"
] | null | null | null | import os
import time
import docker
import requests
from docker.client import DockerClient
from ..utils import (
CONTAINER_NAME,
get_config,
get_logs,
get_process_names,
get_response_text1,
remove_previous_container,
)
client = docker.from_env()
def verify_container(container: DockerClient,... | 29.492308 | 91 | 0.665102 |
3d78e464a063dff4c3f266eebf88a4f54eb528a5 | 5,864 | py | Python | model/e2e_ctc.py | hajiejue/FP-Code | d144336cfd8e70b289a673567f727b9c9abbf9f5 | [
"MIT"
] | null | null | null | model/e2e_ctc.py | hajiejue/FP-Code | d144336cfd8e70b289a673567f727b9c9abbf9f5 | [
"MIT"
] | null | null | null | model/e2e_ctc.py | hajiejue/FP-Code | d144336cfd8e70b289a673567f727b9c9abbf9f5 | [
"MIT"
] | null | null | null | import logging
import math
import sys
import numpy as np
import six
import torch
import torch.nn.functional as F
from torch.autograd import Variable
import warpctc_pytorch as warp_ctc
from model.e2e_common import linear_tensor, to_cuda
# ------------- CTC Network ---------------------------------------------------... | 37.350318 | 120 | 0.590723 |
b1e1ec7856eb200d4d8e65977bd452c0946e7d9b | 10,560 | py | Python | h2o-py/h2o/astfun.py | ahmedengu/h2o-3 | ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11 | [
"Apache-2.0"
] | 2 | 2019-09-02T15:49:45.000Z | 2019-09-02T16:01:58.000Z | h2o-py/h2o/astfun.py | ahmedengu/h2o-3 | ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11 | [
"Apache-2.0"
] | 2 | 2021-06-02T02:24:03.000Z | 2021-11-15T17:51:49.000Z | h2o-py/h2o/astfun.py | ahmedengu/h2o-3 | ac2c0a6fbe7f8e18078278bf8a7d3483d41aca11 | [
"Apache-2.0"
] | 1 | 2019-12-09T03:07:04.000Z | 2019-12-09T03:07:04.000Z | # -*- encoding: utf-8 -*-
"""
Disassembly support.
:copyright: (c) 2016 H2O.ai
:license: Apache License Version 2.0 (see LICENSE for details)
"""
from __future__ import absolute_import, division, print_function, unicode_literals
from opcode import * # an undocumented builtin module
import inspect
from h2o.utils.c... | 33.846154 | 100 | 0.619223 |
e822a7bea72bed49e55f3e323ba3838496cd5039 | 3,940 | py | Python | tests/test_device.py | giltom/megastone | 0ef02c724d53acf7a06430f58bc5f777676d78a9 | [
"MIT"
] | 2 | 2021-04-03T01:55:09.000Z | 2021-04-12T15:12:10.000Z | tests/test_device.py | giltom/megastone | 0ef02c724d53acf7a06430f58bc5f777676d78a9 | [
"MIT"
] | null | null | null | tests/test_device.py | giltom/megastone | 0ef02c724d53acf7a06430f58bc5f777676d78a9 | [
"MIT"
] | null | null | null | from megastone.device import DeviceFaultError
import pytest
import megastone as ms
DEV_ADDR = 0x2400
DEV_SIZE = 0x100
REGDEV_ADDR = 0x2800
CODE_ADDR = 0x1000
SEG_SIZE = 0x1000
READ_CHAR = b'A'
WRITE_CHAR = b'B'
class MyDevice(ms.Device):
def __init__(self, name: str, address: int, size: int):
super()._... | 23.592814 | 86 | 0.61066 |
a9c4fccf1bdbc6c7ff5b627fc9362b875bbe90e9 | 875 | py | Python | tests/rules/test_missing_space_before_subcommand.py | eoinjordan/thefeck | e04f50409ba3069ec6a9f7c0aab39ca835a41b68 | [
"MIT"
] | null | null | null | tests/rules/test_missing_space_before_subcommand.py | eoinjordan/thefeck | e04f50409ba3069ec6a9f7c0aab39ca835a41b68 | [
"MIT"
] | null | null | null | tests/rules/test_missing_space_before_subcommand.py | eoinjordan/thefeck | e04f50409ba3069ec6a9f7c0aab39ca835a41b68 | [
"MIT"
] | null | null | null | import pytest
from thefeck.rules.missing_space_before_subcommand import (
match, get_new_command)
from thefeck.types import Command
@pytest.fixture(autouse=True)
def all_executables(mocker):
return mocker.patch(
'thefeck.rules.missing_space_before_subcommand.get_all_executables',
return_value=... | 28.225806 | 76 | 0.702857 |
e413b60e64612be9fc90fa51f8d81f01e0ec45f8 | 8,516 | py | Python | src/m4_functions_vs_methods.py | lipkower/02-ObjectsFunctionsAndMethods | 426fcc59ee4337314621721e2f6a1f8fe094448c | [
"MIT"
] | null | null | null | src/m4_functions_vs_methods.py | lipkower/02-ObjectsFunctionsAndMethods | 426fcc59ee4337314621721e2f6a1f8fe094448c | [
"MIT"
] | null | null | null | src/m4_functions_vs_methods.py | lipkower/02-ObjectsFunctionsAndMethods | 426fcc59ee4337314621721e2f6a1f8fe094448c | [
"MIT"
] | null | null | null | """
Demonstrates using (calling) FUNCTIONS and using (calling) METHODS:
-- what is similar, and
-- how they differ.
Authors: David Mutchler, Vibha Alangar, Matt Boutell, Dave Fisher,
Aaron Wilkin, their colleagues, and Emma Lipkowski.
""" # done: 1. PUT YOUR NAME IN THE ABOVE LINE.
#####################... | 34.33871 | 79 | 0.533701 |
90f078fa32a53e7510ef63d009dcb374b0201ab2 | 981 | py | Python | tests/client.py | julianss/flr | c91b3e94fa96b81d54d0d53ae685b8e9b458ec03 | [
"MIT"
] | 2 | 2020-09-09T23:28:25.000Z | 2021-01-22T18:20:56.000Z | tests/client.py | julianss/flr | c91b3e94fa96b81d54d0d53ae685b8e9b458ec03 | [
"MIT"
] | null | null | null | tests/client.py | julianss/flr | c91b3e94fa96b81d54d0d53ae685b8e9b458ec03 | [
"MIT"
] | 2 | 2020-10-08T20:02:38.000Z | 2020-10-27T01:48:43.000Z | import requests
class FlareClient():
def __init__(self, host="http://localhost:6800"):
self.host = host
self.headers = {}
def login(self, login, password, email=False):
resp = requests.post(self.host + "/auth", json={
('login' if not email else 'email'): login,
... | 31.645161 | 79 | 0.50051 |
e0b7721aa9d2ef8a2ab5aa01697884bc10d162f9 | 6,196 | py | Python | gbf_raid_bot/calibration/__init__.py | Frizz925/gbf-raid-bot | 2e063500c8c561d8d82851f73824b4c210989309 | [
"MIT"
] | 2 | 2018-03-15T19:22:13.000Z | 2020-04-07T15:12:47.000Z | gbf_raid_bot/calibration/__init__.py | Frizz925/gbf-raid-bot | 2e063500c8c561d8d82851f73824b4c210989309 | [
"MIT"
] | null | null | null | gbf_raid_bot/calibration/__init__.py | Frizz925/gbf-raid-bot | 2e063500c8c561d8d82851f73824b4c210989309 | [
"MIT"
] | null | null | null | from gbf_raid_bot.config import ConfigReader, ConfigGenerator
from gbf_raid_bot.utilities import Timer
from gbf_raid_bot import OFFSETS
from abc import ABC, abstractmethod
from mss import mss as MSS
from PIL import Image
from threading import Thread, Lock
from pymouse import PyMouseEvent
import time
import numpy as np... | 23.119403 | 89 | 0.679148 |
adce71649c86c176b86ad4283af079e1ebb692c1 | 489 | py | Python | Primer/users/signals.py | RealBrandonChen/code_snippets | e7b83eeffc5c076a6585f2614fc6afed996d8381 | [
"MIT"
] | null | null | null | Primer/users/signals.py | RealBrandonChen/code_snippets | e7b83eeffc5c076a6585f2614fc6afed996d8381 | [
"MIT"
] | null | null | null | Primer/users/signals.py | RealBrandonChen/code_snippets | e7b83eeffc5c076a6585f2614fc6afed996d8381 | [
"MIT"
] | null | null | null | # Help add user's profile automatically everytime the users register
from django.db.models.signals import post_save
from django.contrib.auth.models import User
from django.dispatch import receiver
from .models import Profile
@receiver(post_save, sender=User)
def created_profile(sender, instance, created, **kwargs):
... | 32.6 | 68 | 0.783231 |
03789845fcc45787256d6ac068a4aa3904415954 | 236 | py | Python | authentication/admin.py | maryamTha/zam20 | 136014bd8c2359244f9fce5adb15781914408500 | [
"MIT"
] | null | null | null | authentication/admin.py | maryamTha/zam20 | 136014bd8c2359244f9fce5adb15781914408500 | [
"MIT"
] | null | null | null | authentication/admin.py | maryamTha/zam20 | 136014bd8c2359244f9fce5adb15781914408500 | [
"MIT"
] | null | null | null | from django.contrib import admin
# Register your models here.
from .models import User
class UserAdmin(admin.ModelAdmin):
list_display = ['username', 'email', 'auth_provider', 'created_at']
admin.site.register(User, UserAdmin)
| 19.666667 | 71 | 0.75 |
135cef57a660b9a30ba797ab906ff87ac8e0ef33 | 895 | py | Python | setup.py | iamcryptoki/crawlyn | aa6e311c9668f580a0d0d451b8ea7a52ffe59a37 | [
"MIT"
] | 2 | 2021-03-29T20:51:08.000Z | 2022-03-01T01:44:12.000Z | setup.py | iamcryptoki/crawlyn | aa6e311c9668f580a0d0d451b8ea7a52ffe59a37 | [
"MIT"
] | null | null | null | setup.py | iamcryptoki/crawlyn | aa6e311c9668f580a0d0d451b8ea7a52ffe59a37 | [
"MIT"
] | 4 | 2019-05-24T07:19:28.000Z | 2021-12-28T14:33:33.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import crawlyn
from setuptools import setup
setup(
name='crawlyn',
version=crawlyn.__version__,
description="Experimental crawler to grab data from websites.",
long_description=open('README.txt').read(),
author='Galou Gentil',
author_email='hello... | 26.323529 | 67 | 0.612291 |
5a6b327337c625e8626a5f29636e057d6ccbad7a | 3,674 | py | Python | src/tests/sys/netinet6/frag6/frag6_01.py | lastweek/source-freebsd | 0821950b0c40cbc891a27964b342e0202a3859ec | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | src/tests/sys/netinet6/frag6/frag6_01.py | lastweek/source-freebsd | 0821950b0c40cbc891a27964b342e0202a3859ec | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | src/tests/sys/netinet6/frag6/frag6_01.py | lastweek/source-freebsd | 0821950b0c40cbc891a27964b342e0202a3859ec | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | #!/usr/bin/env python
#-
# SPDX-License-Identifier: BSD-2-Clause
#
# Copyright (c) 2019 Netflix, Inc.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright... | 31.672414 | 76 | 0.716658 |
17ff364f523163c0065ba2b10c6d3a40a475cb86 | 14,388 | py | Python | zun/tests/unit/db/test_compute_host.py | magician03/zun | 4db10041fa4db0dd81f2e110b113172db3dc8f80 | [
"Apache-2.0"
] | 3 | 2018-09-07T02:31:05.000Z | 2018-10-17T10:30:47.000Z | zun/tests/unit/db/test_compute_host.py | magician03/zun | 4db10041fa4db0dd81f2e110b113172db3dc8f80 | [
"Apache-2.0"
] | null | null | null | zun/tests/unit/db/test_compute_host.py | magician03/zun | 4db10041fa4db0dd81f2e110b113172db3dc8f80 | [
"Apache-2.0"
] | 1 | 2018-09-07T02:26:23.000Z | 2018-09-07T02:26:23.000Z | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | 43.6 | 78 | 0.650125 |
c19fad3f87233200d63f4dfc25583d01b8517268 | 86,164 | py | Python | caffevis/app.py | HoLuLuLu/deep-visualization-toolbox | 1c7469b389b2bbaa3edde3d2b73fcdd35d157216 | [
"MIT"
] | null | null | null | caffevis/app.py | HoLuLuLu/deep-visualization-toolbox | 1c7469b389b2bbaa3edde3d2b73fcdd35d157216 | [
"MIT"
] | null | null | null | caffevis/app.py | HoLuLuLu/deep-visualization-toolbox | 1c7469b389b2bbaa3edde3d2b73fcdd35d157216 | [
"MIT"
] | null | null | null | #! /usr/bin/env python
# -*- coding: utf-8
# add parent folder to search path, to enable import of core modules like settings
import os,sys,inspect
currentdir = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))
parentdir = os.path.dirname(currentdir)
sys.path.insert(0,parentdir)
import cv2
im... | 53.089341 | 196 | 0.63118 |
78ae7709adc0ab884678ce738677fe10d21a247c | 7,118 | py | Python | mycroft_voice_satellite/__init__.py | Joanguitar/HiveMind-voice-sat | f1ec8c3fa9c5ff3b87389993bdd081f7fc647620 | [
"Apache-2.0"
] | null | null | null | mycroft_voice_satellite/__init__.py | Joanguitar/HiveMind-voice-sat | f1ec8c3fa9c5ff3b87389993bdd081f7fc647620 | [
"Apache-2.0"
] | null | null | null | mycroft_voice_satellite/__init__.py | Joanguitar/HiveMind-voice-sat | f1ec8c3fa9c5ff3b87389993bdd081f7fc647620 | [
"Apache-2.0"
] | null | null | null | from mycroft_voice_satellite.speech.listener import RecognizerLoop
from mycroft_voice_satellite.configuration import CONFIGURATION
from jarbas_hive_mind.slave.terminal import HiveMindTerminalProtocol, \
HiveMindTerminal
from jarbas_hive_mind import HiveMindConnection
from ovos_utils.log import LOG
from ovos_utils i... | 37.661376 | 82 | 0.619837 |
ca777ec6572b0cd05006ef425459e9e1ee3c179b | 5,188 | py | Python | pwnlib/encoders/mips/xor.py | zaratec/pwntools | 8793decd1c9b8c822e3db6c27b9cbf6e8cddfeba | [
"MIT"
] | 1 | 2021-01-11T07:11:22.000Z | 2021-01-11T07:11:22.000Z | pwnlib/encoders/mips/xor.py | zerocool443/pwntools | 76fe04e3560419380108b398310cc35316b35dfb | [
"MIT"
] | null | null | null | pwnlib/encoders/mips/xor.py | zerocool443/pwntools | 76fe04e3560419380108b398310cc35316b35dfb | [
"MIT"
] | 1 | 2021-11-14T01:36:34.000Z | 2021-11-14T01:36:34.000Z | #!/usr/bin/env python2
# Source:
# https://github.com/zcutlip/bowcaster/blob/master/src/bowcaster/encoders/mips.py
#
# Copyright (c) 2013 Zachary Cutlip <uid000@gmail.com>,
# 2013 Tactical Network Solutions, LLC
#
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this s... | 38.147059 | 81 | 0.583655 |
a4fa941fc6bc8c9ece6000838973529910ac4a14 | 17,208 | py | Python | google-cloud-sdk/lib/third_party/dulwich/web.py | bopopescu/searchparty | afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6 | [
"Apache-2.0"
] | 1 | 2017-11-29T18:52:27.000Z | 2017-11-29T18:52:27.000Z | google-cloud-sdk/lib/third_party/dulwich/web.py | bopopescu/searchparty | afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6 | [
"Apache-2.0"
] | null | null | null | google-cloud-sdk/lib/third_party/dulwich/web.py | bopopescu/searchparty | afdc2805cb1b77bd5ac9fdd1a76217f4841f0ea6 | [
"Apache-2.0"
] | 3 | 2017-07-27T18:44:13.000Z | 2020-07-25T17:48:53.000Z | # web.py -- WSGI smart-http server
# Copyright (C) 2010 Google, Inc.
# Copyright (C) 2012 Jelmer Vernooij <jelmer@samba.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; version 2
# or (at ... | 34.210736 | 105 | 0.637552 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.