hexsha stringlengths 40 40 | size int64 2 1.05M | ext stringclasses 9
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 4 193 | max_stars_repo_name stringlengths 6 109 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 36.6k ⌀ | 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 193 | max_issues_repo_name stringlengths 6 109 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 29.8k ⌀ | 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 193 | max_forks_repo_name stringlengths 6 109 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 11.2k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 2 1.05M | avg_line_length float64 1 404k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
9e4d25ada312409ccc3e16afef06c54316bd5f3f | 967 | py | Python | batchglm/train/tf/util.py | SabrinaRichter/batchglm | 2da429f895f7eb577a835da334f4ae146a9422ce | [
"BSD-3-Clause"
] | null | null | null | batchglm/train/tf/util.py | SabrinaRichter/batchglm | 2da429f895f7eb577a835da334f4ae146a9422ce | [
"BSD-3-Clause"
] | null | null | null | batchglm/train/tf/util.py | SabrinaRichter/batchglm | 2da429f895f7eb577a835da334f4ae146a9422ce | [
"BSD-3-Clause"
] | null | null | null | from typing import Dict, Any, Union
import xarray as xr
import tensorflow as tf
def input_to_feed_dict(graph: tf.Graph, input_data: Union[dict, xr.Dataset]) \
-> Dict[Union[Union[tf.Tensor, tf.Operation], Any], Any]:
"""
Converts some input data to a feedable dict for Tensorflow sessions based on the... | 33.344828 | 111 | 0.682523 |
9e4d392b530d7f56229683c550095ab3d1de6236 | 1,833 | py | Python | TriggerFactory.py | wadeguthrie/MonkeyHouse | bff7ca23658e4dfb5c13f13268676baa512013d4 | [
"Apache-2.0"
] | null | null | null | TriggerFactory.py | wadeguthrie/MonkeyHouse | bff7ca23658e4dfb5c13f13268676baa512013d4 | [
"Apache-2.0"
] | null | null | null | TriggerFactory.py | wadeguthrie/MonkeyHouse | bff7ca23658e4dfb5c13f13268676baa512013d4 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/python
"""
Implements Message Triggers for MonkeyHouse.
"""
import re
import Log
import LogicalTrigger
import MessageHandlerInterface
import MessageTrigger
import TimerTrigger
class TriggerFactory(object):
"""Builds MonkeyHouse Triggers of the type described in text input."""
__factory = {
... | 35.941176 | 78 | 0.487725 |
9e4d3cc449de94f9a003e765e15f28d81af60544 | 19,390 | py | Python | trac/versioncontrol/web_ui/log.py | arielnetworks/trac | 1a96a3c39961a8952358cb8c64ccf9e94079c26b | [
"BSD-3-Clause"
] | 1 | 2017-08-03T07:04:28.000Z | 2017-08-03T07:04:28.000Z | trac/versioncontrol/web_ui/log.py | arielnetworks/trac | 1a96a3c39961a8952358cb8c64ccf9e94079c26b | [
"BSD-3-Clause"
] | null | null | null | trac/versioncontrol/web_ui/log.py | arielnetworks/trac | 1a96a3c39961a8952358cb8c64ccf9e94079c26b | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
#
# Copyright (C) 2003-2009 Edgewall Software
# Copyright (C) 2003-2005 Jonas Borgström <jonas@edgewall.com>
# Copyright (C) 2005-2006 Christian Boos <cboos@edgewall.org>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as pa... | 42.615385 | 79 | 0.511913 |
9e4d501352c8fdaf6e2fced9c9eaf8a364edaae2 | 22,017 | py | Python | mps_database/tools/depricate/export_alarms.py | slaclab/mps_database | 023ed9bb3b333e382cc612f816c3f4b295b66a4c | [
"BSD-3-Clause-LBNL"
] | null | null | null | mps_database/tools/depricate/export_alarms.py | slaclab/mps_database | 023ed9bb3b333e382cc612f816c3f4b295b66a4c | [
"BSD-3-Clause-LBNL"
] | 1 | 2017-07-07T21:31:59.000Z | 2017-07-07T21:31:59.000Z | mps_database/tools/depricate/export_alarms.py | slaclab/mps_database | 023ed9bb3b333e382cc612f816c3f4b295b66a4c | [
"BSD-3-Clause-LBNL"
] | 4 | 2017-07-07T20:10:54.000Z | 2020-12-13T00:03:37.000Z | #!/usr/bin/env python
from mps_database.mps_config import MPSConfig, models
from mps_database.tools.mps_names import MpsName
from sqlalchemy import func, exc
import argparse
import sys
import os
import errno
import re
import shutil
from pprint import *
def create_dir(path, clean=False, debug=False):
"""
Creat... | 42.097514 | 129 | 0.559658 |
9e4d50168356e84db3f0d71e252ff191cf55abd1 | 2,023 | py | Python | lib/spack/spack/operating_systems/mac_os.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2020-10-15T01:08:42.000Z | 2021-10-18T01:28:18.000Z | lib/spack/spack/operating_systems/mac_os.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | lib/spack/spack/operating_systems/mac_os.py | lguyot/spack | e910c227a7bac3adf2c18fc86cf994811b7d14f7 | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | null | null | null | # Copyright 2013-2019 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)
import platform as py_platform
from spack.architecture import OperatingSystem
from spack.version import Version
from spac... | 31.609375 | 77 | 0.607019 |
9e4d50bea39b5f999f16352903f1f9ea090f0621 | 35 | py | Python | custom_components/google_vision/__init__.py | robmarkcole/HASS-Google-Vision | b96dc94ab1d7e3ee85122070f906edf7b13a0b87 | [
"MIT"
] | 19 | 2019-10-17T18:42:10.000Z | 2021-03-09T19:58:12.000Z | custom_components/google_vision/__init__.py | entrpn/Hassio_face_detection | 76edda5345b1feeca3678a65494004a4442b5548 | [
"MIT"
] | 9 | 2019-10-27T11:25:51.000Z | 2021-08-30T18:34:25.000Z | custom_components/google_vision/__init__.py | entrpn/Hassio_face_detection | 76edda5345b1feeca3678a65494004a4442b5548 | [
"MIT"
] | 3 | 2019-11-30T23:30:06.000Z | 2021-08-30T17:50:49.000Z | """The Google Vision component."""
| 17.5 | 34 | 0.685714 |
9e4d6a2cbcc41391dc1a35bab28d2365d2a1ae20 | 7,150 | py | Python | website/pages/site.py | ongzhixian/hci-admin | 25564d0b906df466390ff7124ac75b765be87429 | [
"MIT"
] | null | null | null | website/pages/site.py | ongzhixian/hci-admin | 25564d0b906df466390ff7124ac75b765be87429 | [
"MIT"
] | null | null | null | website/pages/site.py | ongzhixian/hci-admin | 25564d0b906df466390ff7124ac75b765be87429 | [
"MIT"
] | null | null | null | ################################################################################
# Modules and functions import statements
################################################################################
import logging
from datetime import datetime, timedelta
from helpers.app_runtime import app, app_settings, app_se... | 33.255814 | 116 | 0.62993 |
9e4daa770a9203afbb321abae941f39343e65e57 | 5,190 | py | Python | bpycv/scene_setting.py | Pandinosaurus/bpycv | c576e01622d87eb3534f73bf1a5686bd2463de97 | [
"MIT"
] | null | null | null | bpycv/scene_setting.py | Pandinosaurus/bpycv | c576e01622d87eb3534f73bf1a5686bd2463de97 | [
"MIT"
] | null | null | null | bpycv/scene_setting.py | Pandinosaurus/bpycv | c576e01622d87eb3534f73bf1a5686bd2463de97 | [
"MIT"
] | 1 | 2022-03-15T15:42:23.000Z | 2022-03-15T15:42:23.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
@author: DIYer22@github
@mail: ylxx@live.com
Created on Thu Jan 16 18:17:20 2020
"""
import bpy
import boxx
import random
def remove_useless_data():
"""
remove all data and release RAM
"""
for block in bpy.data.meshes:
if block.users == 0:
... | 32.236025 | 83 | 0.626012 |
9e4db7951a4d854c8c94d1f2855c2b0a24e8fafe | 4,201 | py | Python | src/extract_one_scene.py | AndyYangjd/data_fuse_demo | 3e19e42c2e02795e8b11aa60e5310c02a3e04316 | [
"BSD-3-Clause"
] | 8 | 2020-10-09T13:43:51.000Z | 2022-01-17T06:18:52.000Z | src/extract_one_scene.py | AndyYangjd/data_fuse_demo | 3e19e42c2e02795e8b11aa60e5310c02a3e04316 | [
"BSD-3-Clause"
] | null | null | null | src/extract_one_scene.py | AndyYangjd/data_fuse_demo | 3e19e42c2e02795e8b11aa60e5310c02a3e04316 | [
"BSD-3-Clause"
] | null | null | null | # extract_one_scene.py
# extract can-front and radar-front file-path in the first scene
import json
import os
from pathlib import Path
import matplotlib
from nuscenes.nuscenes import NuScenes
nusc = NuScenes(version='v1.0-mini',
dataroot=r'D:\datasets\data\sets\nuscenes',
verbose=Tru... | 35.601695 | 79 | 0.622947 |
9e4dbeb9b97d0317fb72d84d08399b7120229707 | 126 | py | Python | terrascript/data/camptocamp/jwt.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 507 | 2017-07-26T02:58:38.000Z | 2022-01-21T12:35:13.000Z | terrascript/data/camptocamp/jwt.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 135 | 2017-07-20T12:01:59.000Z | 2021-10-04T22:25:40.000Z | terrascript/data/camptocamp/jwt.py | mjuenema/python-terrascript | 6d8bb0273a14bfeb8ff8e950fe36f97f7c6e7b1d | [
"BSD-2-Clause"
] | 81 | 2018-02-20T17:55:28.000Z | 2022-01-31T07:08:40.000Z | # terrascript/data/camptocamp/jwt.py
# Automatically generated by tools/makecode.py (24-Sep-2021 15:19:50 UTC)
__all__ = []
| 21 | 73 | 0.746032 |
9e4dea1086426ace539ce20fe4582ce96321e913 | 2,404 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/ssd1306_bouncing_ball.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 185 | 2017-01-11T06:43:38.000Z | 2022-03-26T12:58:02.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/ssd1306_bouncing_ball.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 49 | 2017-03-21T12:59:01.000Z | 2022-01-27T01:36:24.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/ssd1306_bouncing_ball.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 71 | 2017-12-09T15:16:06.000Z | 2022-02-05T11:34:58.000Z | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
import board
import busio
import adafruit_ssd1306
# Create the I2C interface.
i2c = busio.I2C(board.SCL, board.SDA)
# Create the SSD1306 OLED class.
# The first two parameters are the pixel width and pixel height. Change t... | 27.318182 | 91 | 0.618968 |
9e4dff0252bc22a5b9f0542e2629782d40379b3f | 121,817 | py | Python | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_plans_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2021-09-07T18:39:05.000Z | 2021-09-07T18:39:05.000Z | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_plans_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | null | null | null | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_12_01/operations/_app_service_plans_operations.py | vincenttran-msft/azure-sdk-for-python | 348b56f9f03eeb3f7b502eed51daf494ffff874d | [
"MIT"
] | 1 | 2022-03-04T06:21:56.000Z | 2022-03-04T06:21:56.000Z | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | 41.8184 | 254 | 0.665441 |
9e4e10f1926fc9b2ad07171ad8ff88a58b413551 | 3,408 | py | Python | exts/errorhandler.py | mihirsh02/Zeta | 66830b296996a94df1e5b4ad42a2997fc6beeb79 | [
"MIT"
] | null | null | null | exts/errorhandler.py | mihirsh02/Zeta | 66830b296996a94df1e5b4ad42a2997fc6beeb79 | [
"MIT"
] | null | null | null | exts/errorhandler.py | mihirsh02/Zeta | 66830b296996a94df1e5b4ad42a2997fc6beeb79 | [
"MIT"
] | null | null | null | import discord
from discord.ext import commands
import traceback
import sys
import asyncio
class CommandErrorHandler(commands.Cog):
def __init__(self, bot: commands.Bot):
self.bot = bot
@commands.Cog.listener()
async def on_command_error(self, ctx: commands.Context, error):
"""This functi... | 45.44 | 123 | 0.651995 |
9e4e35cd597f82ee2a7d046d42d705caa3d1d6c1 | 2,752 | py | Python | soqal.py | ma7555/SOQAL | ebacc7c5cd149279361bb7168f33b61f510517ea | [
"MIT"
] | null | null | null | soqal.py | ma7555/SOQAL | ebacc7c5cd149279361bb7168f33b61f510517ea | [
"MIT"
] | null | null | null | soqal.py | ma7555/SOQAL | ebacc7c5cd149279361bb7168f33b61f510517ea | [
"MIT"
] | null | null | null | import numpy as np
def softmax(x):
"""Compute softmax values for each sets of scores in x."""
e_x = np.exp(x - np.max(x))
return e_x / e_x.sum()
class SOQAL:
def __init__(self, retriever, reader, beta):
self.retriever = retriever
self.beta = beta
self.reader = reader
def b... | 32.761905 | 92 | 0.550145 |
9e4e3ccee4104bd5e696a67f58cf7854bc36dd60 | 10,492 | py | Python | code/formatters.py | seanyeh/talon_configs | 142e402bb18f532d6f65c622174a6bbbf99aad91 | [
"Unlicense"
] | null | null | null | code/formatters.py | seanyeh/talon_configs | 142e402bb18f532d6f65c622174a6bbbf99aad91 | [
"Unlicense"
] | null | null | null | code/formatters.py | seanyeh/talon_configs | 142e402bb18f532d6f65c622174a6bbbf99aad91 | [
"Unlicense"
] | null | null | null | from talon import Module, Context, actions, ui, imgui, app
from talon.grammar import Phrase
from typing import List, Union
import re
ctx = Context()
key = actions.key
edit = actions.edit
words_to_keep_lowercase = "a,an,the,at,by,for,in,is,of,on,to,up,and,as,but,or,nor".split(
","
)
# last_phrase has the last phr... | 32.583851 | 167 | 0.654117 |
9e4e571b2c5730d60bb81e6e1ba4f3f3cdb43bb0 | 1,425 | py | Python | exploits/copy.py | binarioGH/minihacktools | 664e72ccc54089baa3b4d2ddc28bdcddbfdd1833 | [
"MIT"
] | null | null | null | exploits/copy.py | binarioGH/minihacktools | 664e72ccc54089baa3b4d2ddc28bdcddbfdd1833 | [
"MIT"
] | null | null | null | exploits/copy.py | binarioGH/minihacktools | 664e72ccc54089baa3b4d2ddc28bdcddbfdd1833 | [
"MIT"
] | null | null | null | import socket
import sys
import time
def exploit(ip, port, command):
""" Triggers vsftpd 2.3.4 backdoor and prints supplied command's output """
try:
print('[*] Attempting to trigger backdoor...')
ftp_socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
ftp_socket.connect((ip, p... | 32.386364 | 79 | 0.622456 |
9e4e7e0b7e37a228e819331b4d9ea81aebea2f7c | 5,296 | py | Python | consumers.py | dev-easyshares/mighty | a6cf473fb8cfbf5b92db68c7b068fc8ae2911b8b | [
"MIT"
] | null | null | null | consumers.py | dev-easyshares/mighty | a6cf473fb8cfbf5b92db68c7b068fc8ae2911b8b | [
"MIT"
] | 1 | 2022-03-12T00:57:37.000Z | 2022-03-12T00:57:37.000Z | consumers.py | dev-easyshares/mighty | a6cf473fb8cfbf5b92db68c7b068fc8ae2911b8b | [
"MIT"
] | null | null | null | from django.contrib.contenttypes.models import ContentType
import json, logging
from asgiref.sync import async_to_sync
from channels.generic.websocket import WebsocketConsumer, AsyncWebsocketConsumer
from channels.db import database_sync_to_async
from mighty.apps import MightyConfig as conf
from mighty.models import C... | 42.031746 | 159 | 0.658044 |
9e4e7ede6159238f82b442ae11da4fd9173feb1d | 23 | py | Python | kin/version.py | swilso793/kin-sdk-python | 8ea1a24826aed7d6976b4a1bf5063ba5ea3460bb | [
"MIT"
] | 12 | 2019-01-26T10:00:03.000Z | 2021-11-10T15:43:17.000Z | kin/version.py | gonczo/kin-core-python | 0dbba917f1b1619cbe2b0baf2fd905c361ce72eb | [
"MIT"
] | 29 | 2019-01-30T12:40:48.000Z | 2019-12-19T16:55:08.000Z | kin/version.py | gonczo/kin-core-python | 0dbba917f1b1619cbe2b0baf2fd905c361ce72eb | [
"MIT"
] | 12 | 2019-01-18T00:59:45.000Z | 2021-05-05T10:41:00.000Z |
__version__ = "0.2.6"
| 7.666667 | 21 | 0.608696 |
9e4ea45a9ee6264916ff5d6a6568141408eee1e0 | 25,827 | py | Python | cadnano/strandset/strandset.py | sherwoodyao/cadnano2.5 | ce6ff019b88ee7728de947bd86b35861cf57848d | [
"BSD-3-Clause"
] | 69 | 2015-01-13T02:54:40.000Z | 2022-03-27T14:25:51.000Z | cadnano/strandset/strandset.py | scholer/cadnano2.5 | ce6ff019b88ee7728de947bd86b35861cf57848d | [
"BSD-3-Clause"
] | 127 | 2015-01-01T06:26:34.000Z | 2022-03-02T12:48:05.000Z | cadnano/strandset/strandset.py | scholer/cadnano2.5 | ce6ff019b88ee7728de947bd86b35861cf57848d | [
"BSD-3-Clause"
] | 48 | 2015-01-22T19:57:49.000Z | 2022-03-27T14:27:53.000Z | # -*- coding: utf-8 -*-
from bisect import (
bisect_left,
insort_left
)
from typing import (
Tuple,
List
)
import cadnano.util as util
from cadnano.proxies.cnproxy import (
ProxySignal,
UndoCommand
)
from cadnano.proxies.cnobject import CNObject
from cadnano.proxies.cnenum import (
StrandEn... | 32.486792 | 107 | 0.563325 |
9e4eb2d0fe76fd80b820a8012de1487904cde7fe | 4,584 | py | Python | handlers/order_request/final_step_ordering.py | itcosplay/cryptobot | 6890cfde64a631bf0e4db55f6873a2217212d801 | [
"MIT"
] | null | null | null | handlers/order_request/final_step_ordering.py | itcosplay/cryptobot | 6890cfde64a631bf0e4db55f6873a2217212d801 | [
"MIT"
] | null | null | null | handlers/order_request/final_step_ordering.py | itcosplay/cryptobot | 6890cfde64a631bf0e4db55f6873a2217212d801 | [
"MIT"
] | null | null | null | import traceback
from aiogram import types
from aiogram.dispatcher import FSMContext
from data import all_emoji
from loader import dp, bot, permit, sheet
from states import Request
from utils import notify_about_balance
from utils import notify_about_permit_to_order
from utils import notify_someone
from utils import ... | 34.992366 | 117 | 0.649651 |
9e4ec59e7098443efc53506a4ba159e84b5c1618 | 5,468 | py | Python | tensorflow/contrib/gan/python/features/python/random_tensor_pool_impl.py | tianyapiaozi/tensorflow | fb3ce0467766a8e91f1da0ad7ada7c24fde7a73a | [
"Apache-2.0"
] | 71 | 2017-05-25T16:02:15.000Z | 2021-06-09T16:08:08.000Z | tensorflow/contrib/gan/python/features/python/random_tensor_pool_impl.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 133 | 2017-04-26T16:49:49.000Z | 2019-10-15T11:39:26.000Z | tensorflow/contrib/gan/python/features/python/random_tensor_pool_impl.py | shrikunjsarda/tensorflow | 7e8927e7af0c51ac20a63bd4eab6ff83df1a39ae | [
"Apache-2.0"
] | 31 | 2018-09-11T02:17:17.000Z | 2021-12-15T10:33:35.000Z | # 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... | 39.057143 | 80 | 0.720007 |
9e4edc0eac56bf6cc4ddafc80e994b2ed60a69e7 | 3,510 | py | Python | dawdle/test_irc.py | dlowe-net/dawdlerpg | 32c50f50c9409397d03470bdad28970e0deeedf1 | [
"Apache-2.0"
] | 1 | 2021-08-24T16:56:38.000Z | 2021-08-24T16:56:38.000Z | dawdle/test_irc.py | dlowe-net/dawdlerpg | 32c50f50c9409397d03470bdad28970e0deeedf1 | [
"Apache-2.0"
] | 2 | 2021-08-24T16:52:52.000Z | 2021-08-30T19:39:17.000Z | dawdle/test_irc.py | dlowe-net/dawdlerpg | 32c50f50c9409397d03470bdad28970e0deeedf1 | [
"Apache-2.0"
] | 1 | 2021-08-30T19:15:17.000Z | 2021-08-30T19:15:17.000Z | import unittest
from dawdle import conf
from dawdle import irc
class FakeBot():
def nick_changed(self, old: str, new: str) -> None:
pass
class TestIRCMessage(unittest.TestCase):
def test_basic(self) -> None:
line = "@time=2021-07-31T13:55:00;bar=baz :nick!example@example.com PART #example :... | 40.813953 | 249 | 0.626781 |
9e4edd4139d10562fccb757bc3a873ce42ee00ac | 1,033 | py | Python | leetcode/94. Inorder/iterative_solution.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 3 | 2017-02-15T20:55:04.000Z | 2018-09-26T18:48:24.000Z | leetcode/94. Inorder/iterative_solution.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 4 | 2017-10-07T18:59:20.000Z | 2019-10-08T05:43:25.000Z | leetcode/94. Inorder/iterative_solution.py | saisankargochhayat/algo_quest | a24f9a22c019ab31d56bd5a7ca5ba790d54ce5dc | [
"Apache-2.0"
] | 1 | 2017-10-08T06:52:21.000Z | 2017-10-08T06:52:21.000Z | # 1) Create an empty stack S.
# 2) Initialize current node as root
# 3) Push the current node to S and set current = current->left until current is NULL
# 4) If current is NULL and stack is not empty then
# a) Pop the top item from stack.
# b) Print the popped item, set current = popped_item->right
# c... | 41.32 | 85 | 0.581801 |
9e4efccd60e6b868382004124b39dc0fa11b6ac2 | 549 | py | Python | src/apps/dpi/urls.py | SGC-Tlaxcala/cerebro | 6c842f66d849065a70002fccdb1eaca1e3d61d99 | [
"MIT"
] | null | null | null | src/apps/dpi/urls.py | SGC-Tlaxcala/cerebro | 6c842f66d849065a70002fccdb1eaca1e3d61d99 | [
"MIT"
] | 48 | 2017-04-21T17:35:23.000Z | 2020-08-29T04:19:35.000Z | src/apps/dpi/urls.py | SGC-Tlaxcala/cerebro | 6c842f66d849065a70002fccdb1eaca1e3d61d99 | [
"MIT"
] | null | null | null | # coding: utf-8
"""Rutas de DPI."""
# app: dpi
# módulo: urls
# descripción: rutas
# autor: Javier Sanchez Toledano
# fecha: lunes, 28 de mayo de 2018
from django.contrib.auth.decorators import login_required
from django.urls import path
from apps.dpi.views import DPIAdd, DPIEdit, DPIIndex
... | 26.142857 | 77 | 0.668488 |
9e4f25c0b65a160c8c5544e4cbd7f4eb66a0d465 | 2,942 | py | Python | tests/helpers.py | EVEprosper/ProsperDatareader | 31f0d77074c21222161774f4d653326925611167 | [
"MIT"
] | null | null | null | tests/helpers.py | EVEprosper/ProsperDatareader | 31f0d77074c21222161774f4d653326925611167 | [
"MIT"
] | 14 | 2017-08-14T02:25:42.000Z | 2018-11-16T19:15:52.000Z | tests/helpers.py | EVEprosper/ProsperDatareader | 31f0d77074c21222161774f4d653326925611167 | [
"MIT"
] | null | null | null | """helpers.py: common utilities for tests"""
import json
from os import path
import jsonschema
import prosper.common.prosper_config as p_config
HERE = path.abspath(path.dirname(__file__))
CONFIG_PATH = path.join(HERE, 'test_config.cfg')
CONFIG = p_config.ProsperConfig(CONFIG_PATH)
def validate_schema(
test... | 25.362069 | 66 | 0.64412 |
9e4f4487673d56a041e2a03382e44329b69c6c30 | 10,790 | py | Python | deeplesion/models/truncated_densenet3d_alignshift.py | ashwinvaswani/lesion_detection | 26246e3954209075c56649dfb2ef565290e6dcb3 | [
"MIT"
] | null | null | null | deeplesion/models/truncated_densenet3d_alignshift.py | ashwinvaswani/lesion_detection | 26246e3954209075c56649dfb2ef565290e6dcb3 | [
"MIT"
] | null | null | null | deeplesion/models/truncated_densenet3d_alignshift.py | ashwinvaswani/lesion_detection | 26246e3954209075c56649dfb2ef565290e6dcb3 | [
"MIT"
] | null | null | null | # Ke Yan, Imaging Biomarkers and Computer-Aided Diagnosis Laboratory,
from collections import namedtuple
import torch
import torch.nn.functional as F
from torch import nn
import torchvision.models as models
from torchvision.models.densenet import model_urls
import math
import torch.utils.model_zoo as model_zoo
import ... | 43.861789 | 140 | 0.604727 |
9e4f676b3d48ce7bb301000109bea02e72afb390 | 32 | py | Python | btd6_memory_info/generated/UnityEngine/Purchasing/ProductCatalogPayout/product_catalog_payout.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/UnityEngine/Purchasing/ProductCatalogPayout/product_catalog_payout.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | btd6_memory_info/generated/UnityEngine/Purchasing/ProductCatalogPayout/product_catalog_payout.py | 56kyle/bloons_auto | 419d55b51d1cddc49099593970adf1c67985b389 | [
"MIT"
] | null | null | null | class ProductCatalogPayout: pass | 32 | 32 | 0.90625 |
9e4f767c0e3bb717883915d97bd12c8819b53b6f | 11,245 | py | Python | contrib/python/src/python/pants/contrib/python/checks/tasks/checkstyle/common.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | contrib/python/src/python/pants/contrib/python/checks/tasks/checkstyle/common.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | contrib/python/src/python/pants/contrib/python/checks/tasks/checkstyle/common.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import ast
import codecs
import itertools
import os
import re
import textwrap
import toke... | 30.066845 | 96 | 0.679858 |
9e502531905963d94f7e3eb2e7e90899525bb1a3 | 3,013 | py | Python | src/indriya_msgs/python/publish_pb2.py | praveenv4k/Indriya | a74a4b8bb9f04b5e858305769e892edfcab32df5 | [
"MIT"
] | 1 | 2017-07-12T15:30:58.000Z | 2017-07-12T15:30:58.000Z | src/indriya_msgs/python/publish_pb2.py | praveenv4k/Indriya | a74a4b8bb9f04b5e858305769e892edfcab32df5 | [
"MIT"
] | null | null | null | src/indriya_msgs/python/publish_pb2.py | praveenv4k/Indriya | a74a4b8bb9f04b5e858305769e892edfcab32df5 | [
"MIT"
] | 1 | 2016-03-09T12:34:19.000Z | 2016-03-09T12:34:19.000Z | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: publish.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _refle... | 33.10989 | 219 | 0.730501 |
9e50304d7b012f2b992a20b2ce2dcbebf500c1a5 | 55,755 | py | Python | Multiple_Tic_Tac.py | jberkow713/Multiple-Tic-Tac-Toe | f5dd3630adfd038f472f2752a262b0c276760985 | [
"MIT"
] | null | null | null | Multiple_Tic_Tac.py | jberkow713/Multiple-Tic-Tac-Toe | f5dd3630adfd038f472f2752a262b0c276760985 | [
"MIT"
] | null | null | null | Multiple_Tic_Tac.py | jberkow713/Multiple-Tic-Tac-Toe | f5dd3630adfd038f472f2752a262b0c276760985 | [
"MIT"
] | null | null | null | import turtle
import os
import math
import random
from copy import deepcopy
import numpy as np
global Move_list
Move_list = []
# Use https://trinket.io/features/pygame to convert this to an online embedded game, when the
# Website is up
#Webflow
#Setting up initial gameplay variables
# sc = turtle.Screen()
# sc... | 37.294314 | 166 | 0.530284 |
9e50635ab2a50f7ee2b9d3146cc078cfe745d55e | 1,533 | py | Python | aurora/bag_transfer/migrations/0021_dashboardmonthdata_dashboardrecordtypedata.py | DLynch-Technology/aurora | 92f4b61ae0cdaf6f7c5a35bbdfb68e5ee91f8c96 | [
"MIT"
] | null | null | null | aurora/bag_transfer/migrations/0021_dashboardmonthdata_dashboardrecordtypedata.py | DLynch-Technology/aurora | 92f4b61ae0cdaf6f7c5a35bbdfb68e5ee91f8c96 | [
"MIT"
] | null | null | null | aurora/bag_transfer/migrations/0021_dashboardmonthdata_dashboardrecordtypedata.py | DLynch-Technology/aurora | 92f4b61ae0cdaf6f7c5a35bbdfb68e5ee91f8c96 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.15 on 2019-01-15 02:30
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('bag_transfer', '0020_auto_20181205_2156'),
]
oper... | 40.342105 | 129 | 0.615786 |
9e507389ef40d7f76713399802abe92fcc95b38d | 10,239 | py | Python | beamlines/nanomax/macros_common/attenuate.py | alexbjorling/acquisition-framework | 4090381344aabca05155612845ba4e4a47455dc3 | [
"MIT"
] | null | null | null | beamlines/nanomax/macros_common/attenuate.py | alexbjorling/acquisition-framework | 4090381344aabca05155612845ba4e4a47455dc3 | [
"MIT"
] | 2 | 2018-09-19T06:49:03.000Z | 2019-06-28T10:47:37.000Z | beamlines/nanomax/macros_common/attenuate.py | alexbjorling/acquisition-framework | 4090381344aabca05155612845ba4e4a47455dc3 | [
"MIT"
] | null | null | null | """
Module providing a macro to automatically absorb X percent of the
beam using the absorbers at the NanoMAX beamline
"""
import os
import numpy as np
from contrast.environment import env, macro, register_shortcut, runCommand
# ToDo
# - avoid elements with absorption edges close to the current energy
# ... | 42.135802 | 79 | 0.53599 |
9e50a8b11232496bb54a8759b4091ab1b7f8867c | 10,267 | py | Python | tests/regressiontests/admin_validation/tests.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | null | null | null | tests/regressiontests/admin_validation/tests.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | null | null | null | tests/regressiontests/admin_validation/tests.py | hafeez3000/django | 08e1175ac8d683b692ec3c67dc31df149f07dc8f | [
"BSD-3-Clause"
] | null | null | null | from django.contrib import admin
from django import forms
from django.contrib.admin.validation import validate, validate_inline, \
ImproperlyConfigured
from django.test import TestCase
from models import Song, Book, Album, TwoAlbumFKAndAnE, State, City
class SongForm(forms.... | 35.773519 | 167 | 0.625791 |
9e50dc8e2267d0fba5b8d6151ae52cc540bc18c3 | 10,962 | py | Python | simulation/rl_trpo_train.py | LBNL-ETA/FlexDRL | 630a6f5e050deefc2d0635a211b6888adcfae37c | [
"BSD-3-Clause-LBNL"
] | 4 | 2021-03-12T17:43:52.000Z | 2022-02-14T17:04:29.000Z | simulation/rl_trpo_train.py | LBNL-ETA/FlexDRL | 630a6f5e050deefc2d0635a211b6888adcfae37c | [
"BSD-3-Clause-LBNL"
] | null | null | null | simulation/rl_trpo_train.py | LBNL-ETA/FlexDRL | 630a6f5e050deefc2d0635a211b6888adcfae37c | [
"BSD-3-Clause-LBNL"
] | 1 | 2022-03-20T17:01:55.000Z | 2022-03-20T17:01:55.000Z | #!/usr/bin/env python3
from gym_flexlab.envs import flexlab_env
import os
import math
import time
import gym
import argparse
from tensorboardX import SummaryWriter
import pandas
from drllib import tpro_model, trpo, utils
import numpy as np
import torch
import torch.optim as optim
import torch.nn.functional as F
... | 38.734982 | 128 | 0.550994 |
9e50f83a77ff320ba1e24758b3ca40a6d4967bf2 | 3,632 | py | Python | elfinder/exceptions.py | bohyn/yawd-elfinder | fad675199bc151d42f9f4adbeb0f785c5dcb9e52 | [
"BSD-3-Clause"
] | null | null | null | elfinder/exceptions.py | bohyn/yawd-elfinder | fad675199bc151d42f9f4adbeb0f785c5dcb9e52 | [
"BSD-3-Clause"
] | null | null | null | elfinder/exceptions.py | bohyn/yawd-elfinder | fad675199bc151d42f9f4adbeb0f785c5dcb9e52 | [
"BSD-3-Clause"
] | 1 | 2019-07-18T09:27:09.000Z | 2019-07-18T09:27:09.000Z | from django.utils.translation import ugettext as _
class ElfinderErrorMessages:
"""
Standard error message codes, the text message of which is handled by the
elFinder client
"""
ERROR_UNKNOWN = 'errUnknown'
ERROR_UNKNOWN_CMD = 'errUnknownCmd'
ERROR_CONF = 'errConf'
ERROR_CONF_NO_JSON ... | 41.747126 | 137 | 0.719163 |
9e5110be60ee750b72453d3f0f9a2b61e6bc7f52 | 1,919 | py | Python | scripts/compute_stats.py | vsoch/NETransliteration-COLING2018 | 5d5f59e561ecea45a6d3602121e1049baa7a76c3 | [
"MIT"
] | 52 | 2018-06-12T17:08:17.000Z | 2022-02-20T11:35:30.000Z | scripts/compute_stats.py | vsoch/NETransliteration-COLING2018 | 5d5f59e561ecea45a6d3602121e1049baa7a76c3 | [
"MIT"
] | 2 | 2018-08-18T20:00:29.000Z | 2019-10-03T10:12:26.000Z | scripts/compute_stats.py | vsoch/NETransliteration-COLING2018 | 5d5f59e561ecea45a6d3602121e1049baa7a76c3 | [
"MIT"
] | 10 | 2018-06-12T18:04:37.000Z | 2021-04-15T17:32:57.000Z | #! /usr/bin/env python3
# Copyright 2018 Amazon.com
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, m... | 33.666667 | 105 | 0.737884 |
9e51233e1b65104b656154c3beba35adc4420ecf | 14,637 | py | Python | ginga/util/iqcalc.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | null | null | null | ginga/util/iqcalc.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | null | null | null | ginga/util/iqcalc.py | Cadair/ginga | 5afdd8824f27c7ae7d8d82b5013b0ff0068bd8b8 | [
"BSD-3-Clause"
] | null | null | null | #
# iqcalc.py -- image quality calculations on FITS data
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) 2011-2012, Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
import math
import logging
import numpy
import thre... | 35.7 | 90 | 0.544715 |
9e5125f47459686c4338a96d44053654ad477e95 | 2,059 | py | Python | storage/storage.py | callmed/sensor-board | ab6af1afda9227a229132635c1d4e9d36efdaf1e | [
"Apache-2.0"
] | null | null | null | storage/storage.py | callmed/sensor-board | ab6af1afda9227a229132635c1d4e9d36efdaf1e | [
"Apache-2.0"
] | null | null | null | storage/storage.py | callmed/sensor-board | ab6af1afda9227a229132635c1d4e9d36efdaf1e | [
"Apache-2.0"
] | null | null | null | import logging
import time
logger = logging.getLogger(__name__)
try:
import pickle
from uuid import uuid4
except ImportError:
logger.exception("Failure loading module")
# ToDo: Implement a numpy-array initialization to make data available in a
# more suffisticated way.
class Storage:
""" Conta... | 29.84058 | 79 | 0.610005 |
9e5134cc9f031da4c88cb6e4904ef3cd4f2da3c6 | 600 | py | Python | contrib/python/src/python/pants/contrib/python/checks/tasks/checkstyle/new_style_classes.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | contrib/python/src/python/pants/contrib/python/checks/tasks/checkstyle/new_style_classes.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | contrib/python/src/python/pants/contrib/python/checks/tasks/checkstyle/new_style_classes.py | ghthor/pants | 450de702414f87f563081ddefaefd8a554de07a3 | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import absolute_import, division, print_function, unicode_literals
import ast
from pants.contrib.python.checks.tasks.checkstyle.common import CheckstylePlu... | 31.578947 | 82 | 0.765 |
9e513bf6129ebf2a7c6f892d46b21f074b19f6dd | 109 | py | Python | 215. Kth Largest Element in an Array.py | Dharaneeshwar/Leetcode | cc3ed07f6ac5f4d6e3f60c57a94a06a8be2f5287 | [
"MIT"
] | 4 | 2020-11-17T05:24:24.000Z | 2021-06-14T21:01:45.000Z | 215. Kth Largest Element in an Array.py | Dharaneeshwar/Leetcode | cc3ed07f6ac5f4d6e3f60c57a94a06a8be2f5287 | [
"MIT"
] | null | null | null | 215. Kth Largest Element in an Array.py | Dharaneeshwar/Leetcode | cc3ed07f6ac5f4d6e3f60c57a94a06a8be2f5287 | [
"MIT"
] | null | null | null | class Solution:
def findKthLargest(self, nums: List[int], k: int) -> int:
return sorted(nums)[-k] | 36.333333 | 61 | 0.633028 |
9e513fa9afaf84b233109467e7a81a74f070a5d5 | 645 | py | Python | examples/docs_snippets/docs_snippets/guides/dagster/graph_job_op/composite_solid_multi_out.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | examples/docs_snippets/docs_snippets/guides/dagster/graph_job_op/composite_solid_multi_out.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | examples/docs_snippets/docs_snippets/guides/dagster/graph_job_op/composite_solid_multi_out.py | kstennettlull/dagster | dd6f57e170ff03bf145f1dd1417e0b2c3156b1d6 | [
"Apache-2.0"
] | null | null | null | from dagster import Output, OutputDefinition, composite_solid, pipeline, solid
@solid
def do_something():
pass
@solid(output_defs=[OutputDefinition(int, "one"), OutputDefinition(int, "two")])
def return_multi():
yield Output(1, "one")
yield Output(2, "two")
@composite_solid(
output_defs=[OutputDef... | 18.970588 | 80 | 0.674419 |
9e518edf538cf8ad8ce8be3d37ad9816b458c8eb | 43,079 | py | Python | datasets/CocoDatasetInfo.py | li-xl/Pose2Seg.jittor | 3af29a8c0fdfff99ea3a8bab2e01966bebd55f25 | [
"MIT"
] | null | null | null | datasets/CocoDatasetInfo.py | li-xl/Pose2Seg.jittor | 3af29a8c0fdfff99ea3a8bab2e01966bebd55f25 | [
"MIT"
] | null | null | null | datasets/CocoDatasetInfo.py | li-xl/Pose2Seg.jittor | 3af29a8c0fdfff99ea3a8bab2e01966bebd55f25 | [
"MIT"
] | null | null | null | ##############################################################
# COCO dataset Info Loader. Clear unvalid items.
##############################################################
import os
import numpy as np
import scipy.sparse
import cv2
import copy
import math
from pycocotools.coco import COCO
import pycocot... | 46.371367 | 126 | 0.528332 |
9e51a0a482a5747d8541f9ead8072685c75f2901 | 4,259 | py | Python | configs/gdgy/retinanet_r50_fpn_1x_gdgy_online.py | mgnfcnt-ec/mmdet | 46647fba610dfb396569d7910058c707d67d4ec4 | [
"Apache-2.0"
] | 1 | 2022-03-01T02:46:52.000Z | 2022-03-01T02:46:52.000Z | configs/gdgy/retinanet_r50_fpn_1x_gdgy_online.py | mgnfcnt-ec/mmdet | 46647fba610dfb396569d7910058c707d67d4ec4 | [
"Apache-2.0"
] | null | null | null | configs/gdgy/retinanet_r50_fpn_1x_gdgy_online.py | mgnfcnt-ec/mmdet | 46647fba610dfb396569d7910058c707d67d4ec4 | [
"Apache-2.0"
] | null | null | null | model = dict(
type='RetinaNet',
backbone=dict(
type='ResNet',
depth=50,
num_stages=4,
out_indices=(0, 1, 2, 3),
frozen_stages=1,
norm_cfg=dict(type='BN', requires_grad=True),
norm_eval=True,
style='pytorch',
init_cfg=dict(type='Pretrained',... | 28.019737 | 79 | 0.559991 |
9e51a60364297f51ca6246bd188f47fb6841fb68 | 1,299 | py | Python | rlkit/torch/sac/policies/policy_from_q.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 1,662 | 2018-01-25T05:23:56.000Z | 2021-07-19T10:14:06.000Z | rlkit/torch/sac/policies/policy_from_q.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 121 | 2018-05-07T22:09:09.000Z | 2021-07-08T16:33:37.000Z | rlkit/torch/sac/policies/policy_from_q.py | Asap7772/railrl_evalsawyer | baba8ce634d32a48c7dfe4dc03b123e18e96e0a3 | [
"MIT"
] | 443 | 2018-03-04T17:53:25.000Z | 2021-07-21T17:16:16.000Z | import abc
import logging
import numpy as np
import torch
import torch.nn.functional as F
from torch import nn as nn
import rlkit.torch.pytorch_util as ptu
from rlkit.policies.base import ExplorationPolicy
from rlkit.torch.core import torch_ify, elem_or_tuple_to_numpy
from rlkit.torch.distributions import (
Delta... | 27.638298 | 88 | 0.692841 |
9e51c34758f335fc0a99e24bac7866ebe816b98e | 680 | py | Python | python3/dash_apps/dash_t_9_dropdown_selector_component.py | Nahid-Hassan/code-snippets | 24bd4b81564887822a0801a696001fcbeb6a7a75 | [
"MIT"
] | 2 | 2020-09-29T04:09:41.000Z | 2020-10-18T13:33:36.000Z | python3/dash_apps/dash_t_9_dropdown_selector_component.py | Nahid-Hassan/code-snippets | 24bd4b81564887822a0801a696001fcbeb6a7a75 | [
"MIT"
] | null | null | null | python3/dash_apps/dash_t_9_dropdown_selector_component.py | Nahid-Hassan/code-snippets | 24bd4b81564887822a0801a696001fcbeb6a7a75 | [
"MIT"
] | 1 | 2021-12-26T04:55:55.000Z | 2021-12-26T04:55:55.000Z | import dash
import dash_core_components as dcc
import dash_html_components as html
import pandas as pd
app = dash.Dash()
df = pd.read_csv('./gapminder_tidy.csv')
country_name = df.Country
country_name = list(country_name.unique())
app.layout = html.Div([
html.H1(children='Choose a country',
style=... | 23.448276 | 51 | 0.563235 |
9e51d6afa7d00e561cd40eff064cb883469c535c | 733 | py | Python | homecontrol/exceptions.py | jaipradeesh/HomeControl | 79ffe8a403fb53e3faf91f55f66d912bb62b4f5f | [
"MIT"
] | null | null | null | homecontrol/exceptions.py | jaipradeesh/HomeControl | 79ffe8a403fb53e3faf91f55f66d912bb62b4f5f | [
"MIT"
] | null | null | null | homecontrol/exceptions.py | jaipradeesh/HomeControl | 79ffe8a403fb53e3faf91f55f66d912bb62b4f5f | [
"MIT"
] | null | null | null | """Exceptions"""
class HomeControlException(BaseException):
"""The base exception for HomeControl"""
class ItemNotFoundException(HomeControlException):
"""Item not found"""
class ModuleNotFoundException(HomeControlException):
"""Module not found"""
class PipInstallError(HomeControlException):
""... | 21.558824 | 58 | 0.757162 |
9e521b8aafb78b6e7377b250cf8734a5a9b05dbf | 10,854 | py | Python | mezzanine_advanced_admin/templatetags/advanced_admin_tags.py | askinteractive/mezzanine-advanced-admin | 4c2f80ca209d2f549e50de69eb95ef1243c04c48 | [
"Apache-2.0"
] | 2 | 2015-10-28T00:26:40.000Z | 2015-11-15T15:27:02.000Z | mezzanine_advanced_admin/templatetags/advanced_admin_tags.py | askinteractive/mezzanine-advanced-admin-new | b33935149fcd925ba8f9e06ca126524e5cb5998a | [
"Apache-2.0"
] | null | null | null | mezzanine_advanced_admin/templatetags/advanced_admin_tags.py | askinteractive/mezzanine-advanced-admin-new | b33935149fcd925ba8f9e06ca126524e5cb5998a | [
"Apache-2.0"
] | null | null | null | from importlib import import_module
from django.contrib import admin
from django.contrib.sites.models import Site
from django.core.urlresolvers import reverse, NoReverseMatch
from django.template.defaultfilters import capfirst
from django.template.loader import render_to_string
from django.utils.translation import uge... | 35.355049 | 143 | 0.616915 |
9e522858afc9d5d711309b664f6ac8760a58d65c | 245 | py | Python | test/generate/autotest/35_ADDC_A_d.py | Aimini/hm-51 | 2d46323388a0679b2f99d1a33f5a0d55a5f838e6 | [
"MIT"
] | null | null | null | test/generate/autotest/35_ADDC_A_d.py | Aimini/hm-51 | 2d46323388a0679b2f99d1a33f5a0d55a5f838e6 | [
"MIT"
] | 20 | 2020-01-13T04:19:37.000Z | 2020-02-12T14:25:44.000Z | test/generate/autotest/35_ADDC_A_d.py | Aimini/hm-51 | 2d46323388a0679b2f99d1a33f5a0d55a5f838e6 | [
"MIT"
] | null | null | null | #########################################################
# 2020-01-22 22:58:47
# AI
# ins: ADDC A, direct
##########################################################
from .common.INS_XXX_A_d import INS_XXX_A_D
p = INS_XXX_A_D("ADDC").gen(0, 17) | 30.625 | 58 | 0.367347 |
9e529ce5eb8a0cf5a13624d5477d8d29db43e057 | 1,983 | py | Python | hrl_fabric_based_tactile_sensor/src/hrl_fabric_based_tactile_sensor/sensor_model.py | gt-ros-pkg/hrl-haptic-manip | 6458187075033ecd3a22fbcdc1a632df39b0cba1 | [
"Apache-2.0"
] | 1 | 2017-07-13T14:58:35.000Z | 2017-07-13T14:58:35.000Z | hrl_fabric_based_tactile_sensor/src/hrl_fabric_based_tactile_sensor/sensor_model.py | gt-ros-pkg/hrl-haptic-manip | 6458187075033ecd3a22fbcdc1a632df39b0cba1 | [
"Apache-2.0"
] | null | null | null | hrl_fabric_based_tactile_sensor/src/hrl_fabric_based_tactile_sensor/sensor_model.py | gt-ros-pkg/hrl-haptic-manip | 6458187075033ecd3a22fbcdc1a632df39b0cba1 | [
"Apache-2.0"
] | 2 | 2017-03-08T14:44:22.000Z | 2019-07-15T23:46:35.000Z |
import matplotlib.pyplot as pp
import numpy as np, math
import roslib; roslib.load_manifest('sandbox_advait_darpa_m3')
def one_over_x(x):
return 1/x
def one_over_x_square(x):
return 1./(x**2.5)
def compute_rho(p):
return 300. * one_over_x_square(p/1000.)
def compute_sensor_output(rho, r1, a):
l... | 22.534091 | 79 | 0.523449 |
9e52b70d7ed4d118bb72d47a98e2f143e27e8a75 | 28,439 | py | Python | modules/racingpost.py | Rotzke/betfairacing | 553e0488fcd4c73b7403a733f5216522a278c9ce | [
"MIT"
] | null | null | null | modules/racingpost.py | Rotzke/betfairacing | 553e0488fcd4c73b7403a733f5216522a278c9ce | [
"MIT"
] | null | null | null | modules/racingpost.py | Rotzke/betfairacing | 553e0488fcd4c73b7403a733f5216522a278c9ce | [
"MIT"
] | null | null | null | #!/usr/bin/python3
"""Racing Post horses info scraper."""
import csv
import json
import logging
import os
import re
import traceback
from datetime import datetime
from time import sleep
import requests
from bson.json_util import dumps
from lxml import html
from pymongo import MongoClient
import pandas as pd
from open... | 42.007386 | 79 | 0.432188 |
9e52d270cad5442065044e648f035a1cbfebbfbb | 9,509 | py | Python | research/object_detection/examples/plot_object_detection_saved_model.py | jianzhnie/models | 123ceb62baca18f4befc22b21af3439463b34220 | [
"Apache-2.0"
] | 2 | 2021-12-01T12:24:57.000Z | 2021-12-08T14:10:46.000Z | research/object_detection/examples/plot_object_detection_saved_model.py | jianzhnie/models | 123ceb62baca18f4befc22b21af3439463b34220 | [
"Apache-2.0"
] | 1 | 2020-11-17T09:35:24.000Z | 2020-11-17T09:35:24.000Z | research/object_detection/examples/plot_object_detection_saved_model.py | jianzhnie/models | 123ceb62baca18f4befc22b21af3439463b34220 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# coding: utf-8
"""
Object Detection From TF2 Saved Model
=====================================
"""
# %%
# This demo will take you through the steps of running an "out-of-the-box" TensorFlow 2 compatible
# detection model on a collection of images. More specifically, in this example we will be us... | 42.641256 | 283 | 0.704596 |
9e52de36f9c8d4ccb302c55d4e67d1ab4c5bd148 | 8,025 | py | Python | alipay/aop/api/domain/AlipayDataIotdataSearchlibraryBaiUploadModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/AlipayDataIotdataSearchlibraryBaiUploadModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/AlipayDataIotdataSearchlibraryBaiUploadModel.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class AlipayDataIotdataSearchlibraryBaiUploadModel(object):
def __init__(self):
self._account_id = None
self._biz_id = None
self._company_id = None
self._content_id = No... | 30.169173 | 77 | 0.566106 |
9e52eaef1a9c846dae618fe8e7d3c293ce5d74fc | 6,353 | py | Python | ambari-agent/src/test/python/ambari_agent/TestPythonExecutor.py | wbear2/ambari | a1891193984da47015cd5483b5b95e040677d7df | [
"Apache-2.0"
] | 5 | 2018-06-03T05:19:40.000Z | 2021-04-16T17:10:49.000Z | ambari-agent/src/test/python/ambari_agent/TestPythonExecutor.py | wbear2/ambari | a1891193984da47015cd5483b5b95e040677d7df | [
"Apache-2.0"
] | null | null | null | ambari-agent/src/test/python/ambari_agent/TestPythonExecutor.py | wbear2/ambari | a1891193984da47015cd5483b5b95e040677d7df | [
"Apache-2.0"
] | 6 | 2019-05-07T13:24:39.000Z | 2021-02-15T14:12:37.000Z | #!/usr/bin/env python
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License")... | 36.722543 | 127 | 0.724225 |
9e52fcea6dc57434a894cc7360b3cea6360f342d | 10,164 | py | Python | bootloader/waflib/Tools/vala.py | BA7JCM/pyinstaller | 51ff689509391921bdce42848f3a077dcbb40ca0 | [
"Apache-2.0"
] | null | null | null | bootloader/waflib/Tools/vala.py | BA7JCM/pyinstaller | 51ff689509391921bdce42848f3a077dcbb40ca0 | [
"Apache-2.0"
] | null | null | null | bootloader/waflib/Tools/vala.py | BA7JCM/pyinstaller | 51ff689509391921bdce42848f3a077dcbb40ca0 | [
"Apache-2.0"
] | null | null | null | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file
import re
from waflib import Build, Context, Errors, Logs, Node, Options, Task, Utils
from waflib.TaskGen import extension, taskgen_method
from waflib.Configure import conf
class valac(Task.Task):
... | 40.173913 | 120 | 0.620917 |
9e5302d217b15556f3f05f28384a5b3e92e465dd | 3,271 | py | Python | sfepy/discrete/evaluate_variable.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | 510 | 2015-01-19T16:22:25.000Z | 2022-03-30T19:02:51.000Z | sfepy/discrete/evaluate_variable.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | 402 | 2015-01-22T10:57:50.000Z | 2022-03-30T15:19:23.000Z | sfepy/discrete/evaluate_variable.py | clazaro/sfepy | 78757a6989d6aaf85a3fb27957b9179c5e2aa2c7 | [
"BSD-3-Clause"
] | 156 | 2015-01-05T14:23:38.000Z | 2022-03-22T13:08:30.000Z | import numpy as nm
from sfepy.base.base import assert_
from sfepy.terms.extmods import terms
def eval_real(vec, conn, geo, mode, shape, bf=None):
"""
Evaluate basic derived quantities of a real variable given its DOF
vector, connectivity and reference mapping.
"""
n_el, n_qp, dim, n_en, n_comp = s... | 31.152381 | 73 | 0.572608 |
9e531ad6f0ca7524af223ec6496cbaef17def994 | 5,338 | py | Python | cvap/model/esc50_clf.py | zhaoyanpeng/lvamodel | 93b06ff43ae6a76323cecea4c10cf457945c2711 | [
"MIT"
] | 6 | 2021-12-20T06:01:56.000Z | 2022-03-25T06:44:50.000Z | cvap/model/esc50_clf.py | zhaoyanpeng/vipant | 93b06ff43ae6a76323cecea4c10cf457945c2711 | [
"MIT"
] | null | null | null | cvap/model/esc50_clf.py | zhaoyanpeng/vipant | 93b06ff43ae6a76323cecea4c10cf457945c2711 | [
"MIT"
] | null | null | null | from omegaconf import OmegaConf
import os, re
import warnings
from typing import Union, List
from collections import defaultdict, OrderedDict
import copy
import time
import torch
import numpy as np
from torch import nn
from PIL import Image
from tqdm import tqdm
import torch.distributed as dist
from torch.nn.parallel... | 41.061538 | 95 | 0.598913 |
9e5359ac608384d43f5b66104c76955602cb45d8 | 679 | py | Python | rtf_sensors/imu_serial_node.py | RecklessTedsFunland/rtf_sensors | 880e93b1a358ff3ea65f5c90949c483e52ac44c7 | [
"MIT"
] | null | null | null | rtf_sensors/imu_serial_node.py | RecklessTedsFunland/rtf_sensors | 880e93b1a358ff3ea65f5c90949c483e52ac44c7 | [
"MIT"
] | null | null | null | rtf_sensors/imu_serial_node.py | RecklessTedsFunland/rtf_sensors | 880e93b1a358ff3ea65f5c90949c483e52ac44c7 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
##############################################
# The MIT License (MIT)
# Copyright (c) 2020 Kevin Walchko
# see LICENSE for full details
##############################################
import os
if 'BLINKA_MCP2221' in os.environ.keys():
pass
else:
os.environ['BLINK... | 18.351351 | 46 | 0.555228 |
9e535ab7c5f951924c89b0855176404cf95c7038 | 24,563 | py | Python | tests/test_pairs.py | dabapps/django-readers | dfbf52c2c3599b364ca80ae6efbc26fea7a1d197 | [
"BSD-2-Clause"
] | 79 | 2021-02-26T15:45:34.000Z | 2022-03-19T01:55:19.000Z | tests/test_pairs.py | sobolevn/django-readers | a23431e2d23a8215fdddf2b48e80e793d1e0eeab | [
"BSD-2-Clause"
] | 13 | 2021-02-27T12:36:18.000Z | 2022-03-22T13:34:28.000Z | tests/test_pairs.py | sobolevn/django-readers | a23431e2d23a8215fdddf2b48e80e793d1e0eeab | [
"BSD-2-Clause"
] | 1 | 2021-07-16T14:16:19.000Z | 2021-07-16T14:16:19.000Z | from django.test import TestCase
from django_readers import pairs, producers, projectors, qs
from tests.models import Category, Group, Owner, Thing, Widget
from tests.test_producers import title_and_reverse
class PairsTestCase(TestCase):
def test_fields(self):
for name in ["first", "second", "third"]:
... | 34.547117 | 88 | 0.464723 |
9e5376870ac6cbf169f33b8b2344afe282db8848 | 3,360 | py | Python | oculy/plotting/plots/base.py | MatthieuDartiailh/oculy | 0cdae49aa1b546f26b31d14e944c7d481d368361 | [
"BSD-3-Clause"
] | null | null | null | oculy/plotting/plots/base.py | MatthieuDartiailh/oculy | 0cdae49aa1b546f26b31d14e944c7d481d368361 | [
"BSD-3-Clause"
] | null | null | null | oculy/plotting/plots/base.py | MatthieuDartiailh/oculy | 0cdae49aa1b546f26b31d14e944c7d481d368361 | [
"BSD-3-Clause"
] | 1 | 2022-03-21T12:14:19.000Z | 2022-03-21T12:14:19.000Z | # --------------------------------------------------------------------------------------
# Copyright 2021 by Oculy Authors, see git history for more details.
#
# Distributed under the terms of the BSD license.
#
# The full license is in the file LICENCE, distributed with this software.
# -------------------------------... | 26.88 | 88 | 0.626786 |
9e537fba2f0d40f324b06dba30d34ab2fd357c21 | 464 | py | Python | CHAOS-Challenge/main.py | tueimage/meta-segmentation-msc-2018 | d497e6ea99b89fdb54e11568452894f022269043 | [
"MIT"
] | 3 | 2019-07-16T12:31:38.000Z | 2020-07-22T17:03:53.000Z | CHAOS-Challenge/main.py | tueimage/meta-segmentation-msc-2018 | d497e6ea99b89fdb54e11568452894f022269043 | [
"MIT"
] | null | null | null | CHAOS-Challenge/main.py | tueimage/meta-segmentation-msc-2018 | d497e6ea99b89fdb54e11568452894f022269043 | [
"MIT"
] | 1 | 2020-12-10T12:56:06.000Z | 2020-12-10T12:56:06.000Z | import model
from utils import train_generator
import os
from keras.callbacks import ModelCheckpoint
os.environ["CUDA_VISIBLE_DEVICES"] = "1,2"
def main():
m = model.unet()
callbacks = [ModelCheckpoint('best_model.h5', monitor='loss', period = 20)]
history = m.fit_generator(train_generator(5), steps_per_epo... | 27.294118 | 122 | 0.713362 |
9e53b370506990fc5f76586694946fb4ef03bac3 | 9,155 | py | Python | alipay/aop/api/domain/GFAOpenAPIBaseAcceptance.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 213 | 2018-08-27T16:49:32.000Z | 2021-12-29T04:34:12.000Z | alipay/aop/api/domain/GFAOpenAPIBaseAcceptance.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 29 | 2018-09-29T06:43:00.000Z | 2021-09-02T03:27:32.000Z | alipay/aop/api/domain/GFAOpenAPIBaseAcceptance.py | antopen/alipay-sdk-python-all | 8e51c54409b9452f8d46c7bb10eea7c8f7e8d30c | [
"Apache-2.0"
] | 59 | 2018-08-27T16:59:26.000Z | 2022-03-25T10:08:15.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import json
from alipay.aop.api.constant.ParamConstants import *
class GFAOpenAPIBaseAcceptance(object):
def __init__(self):
self._acceptance_id = None
self._biz_ev_code = None
self._biz_pd_code = None
self._cnl_ev_code = None
... | 34.417293 | 97 | 0.619661 |
9e53c16a3b5a66e26d814d547641598f8ed55387 | 6,527 | py | Python | IMLearn/learners/gaussian_estimators.py | Tzory/IML.HUJI | 95dd33a69f21c52025f5699ec73ce86e6a797c97 | [
"MIT"
] | null | null | null | IMLearn/learners/gaussian_estimators.py | Tzory/IML.HUJI | 95dd33a69f21c52025f5699ec73ce86e6a797c97 | [
"MIT"
] | null | null | null | IMLearn/learners/gaussian_estimators.py | Tzory/IML.HUJI | 95dd33a69f21c52025f5699ec73ce86e6a797c97 | [
"MIT"
] | null | null | null | from __future__ import annotations
import numpy as np
from numpy.linalg import inv, det, slogdet
class UnivariateGaussian:
"""
Class for univariate Gaussian Distribution Estimator
"""
def __init__(self, biased_var: bool = False) -> UnivariateGaussian:
"""
Estimator for univariate Gaus... | 29.668182 | 96 | 0.574383 |
9e53d220c7e37de269ae3e3799f57c24fb273d39 | 471 | py | Python | build/aruco/catkin_generated/pkg.installspace.context.pc.py | FProgrammerLIU/caster_man_ros | a75b503fad3a470f985072a2b3953e89074f3223 | [
"MIT"
] | null | null | null | build/aruco/catkin_generated/pkg.installspace.context.pc.py | FProgrammerLIU/caster_man_ros | a75b503fad3a470f985072a2b3953e89074f3223 | [
"MIT"
] | null | null | null | build/aruco/catkin_generated/pkg.installspace.context.pc.py | FProgrammerLIU/caster_man_ros | a75b503fad3a470f985072a2b3953e89074f3223 | [
"MIT"
] | null | null | null | # generated from catkin/cmake/template/pkg.context.pc.in
CATKIN_PACKAGE_PREFIX = ""
PROJECT_PKG_CONFIG_INCLUDE_DIRS = "/home/caster/ros_ws/caster/install/include".split(';') if "/home/caster/ros_ws/caster/install/include" != "" else []
PROJECT_CATKIN_DEPENDS = "".replace(';', ' ')
PKG_CONFIG_LIBRARIES_WITH_PREFIX = "-l... | 52.333333 | 151 | 0.734607 |
9e53f4b79cdc8eb9cb36bfa9a3dc4175b8c38b0e | 2,954 | py | Python | gps303/common.py | crosser/gsm303 | c09808cddcddadbe7af392337977707ac27355e9 | [
"MIT"
] | null | null | null | gps303/common.py | crosser/gsm303 | c09808cddcddadbe7af392337977707ac27355e9 | [
"MIT"
] | null | null | null | gps303/common.py | crosser/gsm303 | c09808cddcddadbe7af392337977707ac27355e9 | [
"MIT"
] | null | null | null | """ Common housekeeping for all daemons """
from configparser import ConfigParser, SectionProxy
from getopt import getopt
from logging import Formatter, getLogger, Logger, StreamHandler, DEBUG, INFO
from logging.handlers import SysLogHandler
from pkg_resources import get_distribution, DistributionNotFound
from sys imp... | 29.838384 | 76 | 0.573121 |
9e5447ad63467496e6f26ff75be7d89364a06f72 | 31,299 | py | Python | tests/unittests/test_backend.py | ansys/automatic-installer | 47563fbccf0769ba0153deb9cce373d99e8a8b26 | [
"MIT"
] | 2 | 2022-02-17T10:02:29.000Z | 2022-02-22T21:31:09.000Z | tests/unittests/test_backend.py | ansys/automatic-installer | 47563fbccf0769ba0153deb9cce373d99e8a8b26 | [
"MIT"
] | 4 | 2022-02-15T09:56:49.000Z | 2022-03-31T15:44:10.000Z | tests/unittests/test_backend.py | ansys/automatic-installer | 47563fbccf0769ba0153deb9cce373d99e8a8b26 | [
"MIT"
] | 1 | 2022-02-22T21:31:17.000Z | 2022-02-22T21:31:17.000Z | import io
import json
import os
import shutil
import unittest
from collections import namedtuple
from pathlib import Path
from tempfile import TemporaryDirectory
from unittest.mock import patch
from zipfile import BadZipFile
from zlib import error as zlib_err
import psutil
import responses
import downloader_backend
... | 42.238866 | 120 | 0.63411 |
9e547673371228b215a3323e7e5e687e0b46c56f | 295 | py | Python | 02_parallel/ioBottleneck2.py | 837477/Python_Parallel | 7590ff38e6a2b1dbec139e9571b6564b5bbf276f | [
"MIT"
] | 67 | 2017-08-27T18:00:46.000Z | 2022-03-01T11:54:16.000Z | 02_parallel/ioBottleneck2.py | 837477/python_parallel_programming_study | 2294f4a3de9e9f5b16b6772a3a8d96c37eb63c0f | [
"MIT"
] | 8 | 2018-10-18T17:15:45.000Z | 2021-12-24T01:58:05.000Z | 02_parallel/ioBottleneck2.py | 837477/python_parallel_programming_study | 2294f4a3de9e9f5b16b6772a3a8d96c37eb63c0f | [
"MIT"
] | 49 | 2017-08-18T12:53:30.000Z | 2022-02-06T09:40:50.000Z | import urllib2
import time
from BeautifulSoup import BeautifulSoup
linkArray = []
def getLinks():
req = urllib2.urlopen('http://www.example.com')
soup = BeautifulSoup(req.read())
for link in soup.findAll('a'):
linkArray.append(link.get('href'))
print(len(linkArray))
getLinks()
| 19.666667 | 49 | 0.708475 |
9e547dc01aaa1592c042feeed21497422dc1e9be | 2,499 | py | Python | tests/test_enum.py | fcortes/django-ninja | c29a5ae298ec22e25f8ee49c7787bd8a311bac78 | [
"MIT"
] | null | null | null | tests/test_enum.py | fcortes/django-ninja | c29a5ae298ec22e25f8ee49c7787bd8a311bac78 | [
"MIT"
] | 1 | 2021-04-25T07:00:55.000Z | 2021-04-25T07:00:55.000Z | tests/test_enum.py | fcortes/django-ninja | c29a5ae298ec22e25f8ee49c7787bd8a311bac78 | [
"MIT"
] | null | null | null | from datetime import date
from enum import Enum
from json import encoder
from pydantic import BaseModel
from ninja import NinjaAPI
from ninja.testing import TestClient
class RoomEnum(str, Enum):
double = "double"
twin = "twin"
single = "single"
class Booking(BaseModel):
start: date
end: date
... | 25.5 | 86 | 0.593037 |
9e54a5c837396c258ee83eba70e7a441c2bc35dd | 8,843 | py | Python | conv_is_all_you_need/src/Cropping_Window_Xception/scripts/find_leaked_imgs.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | conv_is_all_you_need/src/Cropping_Window_Xception/scripts/find_leaked_imgs.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | conv_is_all_you_need/src/Cropping_Window_Xception/scripts/find_leaked_imgs.py | guitarmind/HPA-competition-solutions | 547d53aaca148fdb5f4585526ad7364dfa47967d | [
"MIT"
] | null | null | null | import pandas as pd
import sys
from multiprocessing import Pool
import numpy as np
import cv2
from lib.utils import load_image, info, debug, display_imgs
from lib.config import gen_config
config = gen_config()
# use the ladder trick to make it O(n) instead of O(n^2)
def compare_fn(img_record):
return img_record... | 33.496212 | 131 | 0.604207 |
9e54c7cb2e10b4120a72278e8979d6f528685a38 | 5,051 | py | Python | docking/viewer.py | derekvantilborg/MolDox | 9fd6d7da7ad18b9a7c80adc4737eddc78080833f | [
"MIT"
] | null | null | null | docking/viewer.py | derekvantilborg/MolDox | 9fd6d7da7ad18b9a7c80adc4737eddc78080833f | [
"MIT"
] | null | null | null | docking/viewer.py | derekvantilborg/MolDox | 9fd6d7da7ad18b9a7c80adc4737eddc78080833f | [
"MIT"
] | null | null | null | """
Author: Derek van Tilborg
Data: dec 20 2021
Wrapper for py3Dmol and 3Dmol. Works with layers.
Example:
model = Viewer()
model.add_layer('1AZ8_clean.pdb')
model.add_surface(color='white', opacity=0.75)
model.cartoon()
model.add_layer('1AZ8_lig.mol2')
model.sticks(radius=0.2, colorscheme='or... | 35.570423 | 120 | 0.607404 |
9e54cae9abd1dcf7eaf856c3cec3bd6c7e395d62 | 2,406 | py | Python | tests/python/pants_test/engine/test_selectors.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/engine/test_selectors.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | 1 | 2018-09-04T17:37:34.000Z | 2018-09-04T19:42:58.000Z | tests/python/pants_test/engine/test_selectors.py | mpopenko-exos/pants | 47d27037c8b13291fc9023e56ddd1b1defdf1b8e | [
"Apache-2.0"
] | null | null | null | # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import ast
import unittest
from pants.engine.selectors import Get
class AClass:
pass
class BClass:
def __eq__(self, other):
return type(self) == type(other)
class SubBClass... | 32.958904 | 106 | 0.684123 |
9e54e3835414a06dc07881c1330f401f63346f88 | 1,204 | py | Python | cloudmesh/pi/port.py | cloudmesh/cloudmesh.pi | bdf706b3763031341c41b811749064c293e73c14 | [
"Apache-2.0"
] | 2 | 2017-09-18T00:56:36.000Z | 2018-06-01T23:41:23.000Z | cloudmesh/pi/port.py | cloudmesh/cloudmesh-pi | bdf706b3763031341c41b811749064c293e73c14 | [
"Apache-2.0"
] | 1 | 2018-04-16T18:37:17.000Z | 2018-04-16T18:37:17.000Z | cloudmesh/pi/port.py | cloudmesh/cloudmesh.pi | bdf706b3763031341c41b811749064c293e73c14 | [
"Apache-2.0"
] | 3 | 2017-09-20T11:13:54.000Z | 2017-11-30T23:48:37.000Z | import platform
import os
class Port(object):
def __init__(self):
self.names = {
"D7": [7,8],
"D8": [8,9],
"D5": [5,6],
"D6": [6,7],
"D4": [4,5],
"D3": [4,3],
"D2": [2,3]
}
def __str__(self):
print(self.names)
... | 24.571429 | 137 | 0.496678 |
9e54e9f77e3e7ca574dd09825a3ff5bf579876ba | 1,209 | py | Python | angalabiri/users/forms.py | dark-codr/ebiangala | 0af3de29b2afa71df3e138cd16ecddc69fbd597d | [
"MIT"
] | 1 | 2021-03-25T14:06:23.000Z | 2021-03-25T14:06:23.000Z | angalabiri/users/forms.py | dark-codr/ebiangala | 0af3de29b2afa71df3e138cd16ecddc69fbd597d | [
"MIT"
] | 5 | 2021-09-08T03:08:46.000Z | 2022-03-12T00:56:35.000Z | angalabiri/users/forms.py | me-edavids/ebiangala | 0af3de29b2afa71df3e138cd16ecddc69fbd597d | [
"MIT"
] | null | null | null | from dal import autocomplete
from django import forms
from django.contrib.auth import forms as admin_forms
from django.contrib.auth import get_user_model
from django.utils.translation import gettext_lazy as _
from angalabiri.users.models import Addresses
User = get_user_model()
class UserChangeForm(admin_forms.User... | 25.1875 | 78 | 0.592225 |
9e551bbbdd9290f263d922184b2c4573a38d1689 | 1,770 | py | Python | native_client_sdk/PRESUBMIT.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2019-01-28T08:09:58.000Z | 2021-11-15T15:32:10.000Z | native_client_sdk/PRESUBMIT.py | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | null | null | null | native_client_sdk/PRESUBMIT.py | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Top-level presubmit script for native_client_sdk.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details on the... | 31.052632 | 78 | 0.672881 |
9e554a81380630014959f52e8f68c744f7c9742f | 1,677 | py | Python | ttt_package/libs/maxi_min.py | Ipgnosis/tic_tac_toe | e1519b702531965cc647ff37c1c46d72f4b3b24e | [
"BSD-3-Clause"
] | null | null | null | ttt_package/libs/maxi_min.py | Ipgnosis/tic_tac_toe | e1519b702531965cc647ff37c1c46d72f4b3b24e | [
"BSD-3-Clause"
] | 4 | 2021-03-25T19:52:40.000Z | 2021-12-12T17:57:11.000Z | ttt_package/libs/maxi_min.py | Ipgnosis/tic_tac_toe | e1519b702531965cc647ff37c1c46d72f4b3b24e | [
"BSD-3-Clause"
] | null | null | null | # a function to calculate the optimum (maximum and minimum) probabilities
# written by Russell on 3/21/21
# the param for maximin is a list of tuples
# each tuple contains 3 probabilities, each adding up to 1
# the cell number of the move in question is stored at n[3]
# probs[n] = (p1, p2, p3, cell);
# the goal is to:... | 34.22449 | 90 | 0.572451 |
9e558219ee4e013c07cb77dc85a37909c2a8e95c | 138 | py | Python | deal/_schemes.py | m4ta1l/deal | 2a8e9bf412b8635b00a2b798dd8802375814a1c8 | [
"MIT"
] | 2 | 2021-01-11T12:01:24.000Z | 2021-02-02T23:42:20.000Z | deal/_schemes.py | Zac-HD/deal | 2e170e9c200aa248edc3cf173b556d86f158eb9b | [
"MIT"
] | 7 | 2020-09-05T13:54:28.000Z | 2020-11-27T05:59:19.000Z | deal/_schemes.py | Zac-HD/deal | 2e170e9c200aa248edc3cf173b556d86f158eb9b | [
"MIT"
] | null | null | null |
class Scheme:
def __init__(self, data):
self.data = data
def is_valid(self) -> bool:
raise NotImplementedError
| 15.333333 | 33 | 0.615942 |
9e5593ed18128a853de489a8a0923db276258b8c | 762 | py | Python | modelConfigs/ModelP.py | jesisca-tandi/video-actions-classification | c90aafc9d212982368565fc373ac7fd0ff08e1d6 | [
"MIT"
] | null | null | null | modelConfigs/ModelP.py | jesisca-tandi/video-actions-classification | c90aafc9d212982368565fc373ac7fd0ff08e1d6 | [
"MIT"
] | null | null | null | modelConfigs/ModelP.py | jesisca-tandi/video-actions-classification | c90aafc9d212982368565fc373ac7fd0ff08e1d6 | [
"MIT"
] | null | null | null | from keras.models import Sequential, load_model
from keras.layers import Dense, Dropout, Flatten, Conv1D, Conv2D, MaxPooling2D, Embedding, LSTM, TimeDistributed, Masking, Lambda, GRU, Bidirectional, LeakyReLU
from keras.optimizers import Adam
def createModel(modelName='ModelP'):
opt = Adam(lr=0.005)
model =... | 38.1 | 160 | 0.738845 |
9e559607d9b50d1dbfd212bd6192fc59ce079c91 | 2,864 | py | Python | pyop2/finalised.py | chromy/PyOP2 | 8a1955c628b795019485c9771709c338a806e661 | [
"BSD-3-Clause"
] | null | null | null | pyop2/finalised.py | chromy/PyOP2 | 8a1955c628b795019485c9771709c338a806e661 | [
"BSD-3-Clause"
] | null | null | null | pyop2/finalised.py | chromy/PyOP2 | 8a1955c628b795019485c9771709c338a806e661 | [
"BSD-3-Clause"
] | null | null | null | # This file is part of PyOP2
#
# PyOP2 is Copyright (c) 2012, Imperial College London and
# others. Please see the AUTHORS file in the main source directory for
# a full list of copyright holders. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted ... | 32.179775 | 78 | 0.730098 |
9e55e0f08293884bf1a68d7d9033703406f62efd | 4,670 | py | Python | scripts/db/__init__.py | a-wakeel/Device-Registration-Subsystem | dd9fa387e2087a6ccea9676303debe640bd99422 | [
"Unlicense"
] | 6 | 2018-11-07T12:41:30.000Z | 2020-04-12T18:07:03.000Z | scripts/db/__init__.py | a-wakeel/Device-Registration-Subsystem | dd9fa387e2087a6ccea9676303debe640bd99422 | [
"Unlicense"
] | 1 | 2020-10-20T12:33:18.000Z | 2020-10-20T12:33:18.000Z | scripts/db/__init__.py | a-wakeel/Device-Registration-Subsystem | dd9fa387e2087a6ccea9676303debe640bd99422 | [
"Unlicense"
] | 10 | 2018-11-12T06:15:19.000Z | 2021-11-18T05:45:12.000Z | """
DRS Database Script Module
Copyright (c) 2018-2021 Qualcomm Technologies, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met:
Redistribution... | 60.649351 | 844 | 0.722912 |
9e55f4f70025f5143f9a49f90dcc774d2963bbab | 120 | py | Python | simplivity/__init__.py | HewlettPackard/simplivity-python-sdk | 03d8e92a02fe66e878ed22b37944e5a6ce991ef1 | [
"Apache-2.0"
] | 7 | 2020-02-28T09:03:09.000Z | 2022-03-28T15:52:23.000Z | simplivity/__init__.py | HewlettPackard/simplivity-python-sdk | 03d8e92a02fe66e878ed22b37944e5a6ce991ef1 | [
"Apache-2.0"
] | 47 | 2020-01-16T20:32:19.000Z | 2020-08-27T04:43:00.000Z | simplivity/__init__.py | HewlettPackard/simplivity-python-sdk | 03d8e92a02fe66e878ed22b37944e5a6ce991ef1 | [
"Apache-2.0"
] | 16 | 2020-01-10T14:15:17.000Z | 2021-04-06T13:31:01.000Z | __title__ = 'simplivity'
__version__ = '1.1.0'
from simplivity.connection import *
from simplivity.exceptions import *
| 20 | 35 | 0.775 |
9e55fd6b87a784ad04f7eae46e2a4cb1d3371195 | 6,728 | py | Python | tests/fixture/database/relational/test_generic.py | JonM0/pytest-mock-resources | 96936b750bf26d53205b02008e02546e59b95082 | [
"MIT"
] | 1 | 2021-06-29T18:14:56.000Z | 2021-06-29T18:14:56.000Z | tests/fixture/database/relational/test_generic.py | michaelbukachi/pytest-mock-resources | f0c5d56af7aeca3cd1a64cd84237d8d4b5b993a4 | [
"MIT"
] | null | null | null | tests/fixture/database/relational/test_generic.py | michaelbukachi/pytest-mock-resources | f0c5d56af7aeca3cd1a64cd84237d8d4b5b993a4 | [
"MIT"
] | null | null | null | import pytest
import sqlalchemy
from sqlalchemy import Column, Integer, MetaData, select, SmallInteger, Table, Unicode
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
from pytest_mock_resources import create_postgres_fixture, create_sqlite_fixture, Rows
from pytest_mock_... | 35.97861 | 94 | 0.715369 |
9e55fe525c39b909daa06044d17aee7a4c77a5e7 | 481 | py | Python | search/tasks.py | moonbirddk/networked-toolbox | b059b77bfda173794b3cad55874cb06edc70d0e1 | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2016-09-02T12:45:31.000Z | 2018-02-10T10:18:11.000Z | search/tasks.py | Socialsquare/networked-toolbox | b059b77bfda173794b3cad55874cb06edc70d0e1 | [
"BSD-2-Clause-FreeBSD"
] | 17 | 2020-03-24T15:58:05.000Z | 2022-02-10T08:08:57.000Z | search/tasks.py | moonbirddk/networked-toolbox | b059b77bfda173794b3cad55874cb06edc70d0e1 | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2018-01-05T08:02:18.000Z | 2018-01-05T08:02:18.000Z | from __future__ import absolute_import
from django.conf import settings
from celery import shared_task
from celery.utils.log import get_task_logger
from django.utils.importlib import import_module
from django.core.management import call_command
log = get_task_logger(__name__)
@shared_task(ignore_result=True)
de... | 22.904762 | 66 | 0.798337 |
9e562639afccbf5ff67d24de44e24a04b1e6cba5 | 4,767 | py | Python | not_prolific/amasino/main.py | TimS70/WebET_Analysis | 32fc2e1b70c2dad5637ee1614a6a651bc8d458b4 | [
"MIT"
] | null | null | null | not_prolific/amasino/main.py | TimS70/WebET_Analysis | 32fc2e1b70c2dad5637ee1614a6a651bc8d458b4 | [
"MIT"
] | null | null | null | not_prolific/amasino/main.py | TimS70/WebET_Analysis | 32fc2e1b70c2dad5637ee1614a6a651bc8d458b4 | [
"MIT"
] | null | null | null | import os
import subprocess
from data_prep.add_variables.choice.choice_options import top_bottom_attributes
from not_prolific.amasino.cleaning import invalid_choice_runs
from not_prolific.amasino.prep_data_et import transform_xy_coordinates, \
run_clustering
from not_prolific.amasino.prep_data_trial import load_da... | 37.242188 | 106 | 0.699392 |
9e562c0f22a11fc2b45dba3028673ea077793ea5 | 1,337 | py | Python | hs_core/tests/api/rest/test_user_info.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 178 | 2015-01-08T23:03:36.000Z | 2022-03-03T13:56:45.000Z | hs_core/tests/api/rest/test_user_info.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 4,125 | 2015-01-01T14:26:15.000Z | 2022-03-31T16:38:55.000Z | hs_core/tests/api/rest/test_user_info.py | hydroshare/hydroshare | bf9888bbe61507aff070b1dfcec2fdec1921468d | [
"BSD-3-Clause"
] | 53 | 2015-03-15T17:56:51.000Z | 2022-03-17T00:32:16.000Z | import json
from django.contrib.auth.models import Group
from rest_framework.test import APIClient
from rest_framework import status
from rest_framework.test import APITestCase
from hs_core.hydroshare import users
class TestUserInfo(APITestCase):
def setUp(self):
self.maxDiff = None
self.clien... | 31.833333 | 77 | 0.676889 |
9e5638145ae1c3192b3081eab76b9cd9d0447dc7 | 7,014 | py | Python | memory/lib/pitree/node.py | anrddh/memsight | 9e279ade02926543a34fce452e66a161f7fede7d | [
"BSD-2-Clause"
] | 1 | 2020-06-03T23:47:16.000Z | 2020-06-03T23:47:16.000Z | memory/lib/pitree/node.py | anrddh/memsight | 9e279ade02926543a34fce452e66a161f7fede7d | [
"BSD-2-Clause"
] | null | null | null | memory/lib/pitree/node.py | anrddh/memsight | 9e279ade02926543a34fce452e66a161f7fede7d | [
"BSD-2-Clause"
] | 1 | 2020-03-30T13:51:55.000Z | 2020-03-30T13:51:55.000Z | """Node object stored in the pitree.
A node is an interval which supports balancing operations.
"""
class Node(object):
"""A node stores intervals representing memory."""
def __init__(self, interval, mmax, parent):
"""Initialize the node, pointers start as None and it has no depth."""
self.i... | 39.184358 | 123 | 0.60422 |
9e563d41138726fe02501961ed6a20c868c49073 | 340 | py | Python | foods/pizza.py | av1m/cars | efa09e2e61e1398996b2b22328e959d03b67170f | [
"MIT"
] | null | null | null | foods/pizza.py | av1m/cars | efa09e2e61e1398996b2b22328e959d03b67170f | [
"MIT"
] | null | null | null | foods/pizza.py | av1m/cars | efa09e2e61e1398996b2b22328e959d03b67170f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Representation of a Pizza
"""
import logging
from cars.truck import TruckFood
from foods.kebab import Kebab
logger = logging.getLogger(__name__)
class Pizza(Kebab):
"""Representation of a Pizza food"""
pass
class TruckPizza(TruckFood):
"""Representation of a TruckPizza""... | 13.6 | 40 | 0.685294 |
9e565a4069087165e7fe82aa01828b3f0a7aea78 | 386 | py | Python | app/core/migrations/0002_alter_user_username.py | Misiaty-Mat/Event-schedule | 15ab5ec3d49b1f16e43a8d90709df5d143401c7a | [
"MIT"
] | null | null | null | app/core/migrations/0002_alter_user_username.py | Misiaty-Mat/Event-schedule | 15ab5ec3d49b1f16e43a8d90709df5d143401c7a | [
"MIT"
] | null | null | null | app/core/migrations/0002_alter_user_username.py | Misiaty-Mat/Event-schedule | 15ab5ec3d49b1f16e43a8d90709df5d143401c7a | [
"MIT"
] | null | null | null | # Generated by Django 3.2.5 on 2022-01-25 17:39
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='user',
name='username',
fiel... | 20.315789 | 64 | 0.590674 |
9e568bcfe618f6ced203d5b017445b09db3fd27f | 12,195 | py | Python | src/models/portfolio/web_random_forest.py | webclinic017/market_machine_learning | 79f3e774d08ceb6c313db8b7d8439e1f14d1ca27 | [
"Apache-2.0"
] | 1 | 2022-03-25T08:45:38.000Z | 2022-03-25T08:45:38.000Z | src/models/portfolio/web_random_forest.py | webclinic017/market_machine_learning | 79f3e774d08ceb6c313db8b7d8439e1f14d1ca27 | [
"Apache-2.0"
] | null | null | null | src/models/portfolio/web_random_forest.py | webclinic017/market_machine_learning | 79f3e774d08ceb6c313db8b7d8439e1f14d1ca27 | [
"Apache-2.0"
] | null | null | null | import pandas as pd
from pandas.io.pickle import read_pickle
from sklearn.metrics import roc_curve, auc
from scipy import interp
from sklearn.model_selection import KFold
from sklearn.preprocessing import StandardScaler
import matplotlib.pyplot as plt
import numpy as np
import matplotlib
import matplotlib as mpl
from m... | 39.852941 | 115 | 0.6205 |
9e569a45fa0778d9a7e1f8afbe9efe7cc92a8676 | 43,382 | py | Python | ngraph/transformers/gpu/kernels/kernel_specs.py | NervanaSystems/ngraph-python | ac032c83c7152b615a9ad129d54d350f9d6a2986 | [
"Apache-2.0"
] | 18 | 2018-03-19T04:16:49.000Z | 2021-02-08T14:44:58.000Z | ngraph/transformers/gpu/kernels/kernel_specs.py | rsumner31/ngraph | 5e5c9bb9f24d95aee190b914dd2d44122fc3be53 | [
"Apache-2.0"
] | 2 | 2019-04-16T06:41:49.000Z | 2019-05-06T14:08:13.000Z | ngraph/transformers/gpu/kernels/kernel_specs.py | rsumner31/ngraph | 5e5c9bb9f24d95aee190b914dd2d44122fc3be53 | [
"Apache-2.0"
] | 11 | 2018-06-16T15:59:08.000Z | 2021-03-06T00:45:30.000Z | # ******************************************************************************
# Copyright 2014-2018 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apa... | 39.690759 | 210 | 0.57812 |
9e56b9e8db8b4edca7858c506a272d905425262f | 1,418 | py | Python | ini.py | rayjustinhuang/BitesofPy | 03b694c5259ff607621419d9677c5caff90a6057 | [
"MIT"
] | null | null | null | ini.py | rayjustinhuang/BitesofPy | 03b694c5259ff607621419d9677c5caff90a6057 | [
"MIT"
] | null | null | null | ini.py | rayjustinhuang/BitesofPy | 03b694c5259ff607621419d9677c5caff90a6057 | [
"MIT"
] | null | null | null | import configparser
class ToxIniParser:
def __init__(self, ini_file):
"""Use configparser to load ini_file into self.config"""
self.config = configparser.ConfigParser()
self.config.read(ini_file)
pass
@property
def number_of_sections(self):
"""Return the number of ... | 31.511111 | 95 | 0.568406 |
9e56c5b6628146c1669757df886cee3303dc643a | 2,384 | py | Python | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/display_button_soundboard.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 47 | 2021-02-15T23:02:36.000Z | 2022-03-04T21:30:03.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/display_button_soundboard.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 7 | 2021-02-19T20:00:08.000Z | 2022-01-14T10:51:12.000Z | adafruit_circuitpython_libs/adafruit-circuitpython-bundle-py-20210214/examples/display_button_soundboard.py | jacoblb64/pico_rgb_keypad_hid | 3251ca6a98ef86d9f98c54f639c4d61810601a0b | [
"MIT"
] | 14 | 2021-02-20T17:40:56.000Z | 2022-01-01T19:53:38.000Z | # SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries
# SPDX-License-Identifier: MIT
import time
from adafruit_pyportal import PyPortal
from adafruit_button import Button
SHOW_BUTTONS = False
# the current working directory (where this file is)
cwd = ("/" + __file__).rsplit("/", 1)[0]
# No internet use vers... | 36.676923 | 84 | 0.563339 |
9e56ea6f17cbf791058d930da49e376f37b07e2f | 1,564 | py | Python | app/builder.py | benranderson/run | c2079a61b16311646e88494f9ac4742c970fec98 | [
"MIT"
] | null | null | null | app/builder.py | benranderson/run | c2079a61b16311646e88494f9ac4742c970fec98 | [
"MIT"
] | 22 | 2018-01-23T15:20:14.000Z | 2018-03-01T23:44:12.000Z | app/builder.py | benranderson/run | c2079a61b16311646e88494f9ac4742c970fec98 | [
"MIT"
] | null | null | null | from datetime import datetime, date, timedelta
def rest_week(week, plan_length):
'''
int -> boolean
Determine if current week is a rest week.
Plans work on a 4 week block, with every 4th week being an easier week.
Runner has at least 2 weeks, and a maximum of 5 weeks before they get an
easie... | 30.076923 | 80 | 0.659847 |
9e56fa5f382f6156f2c01b13951406c3c5bf407b | 175,510 | py | Python | xmodfit.py | nayanbera/XModFit | d98aceb9b74418ef7ef8bc076e0b405019e8867e | [
"MIT"
] | null | null | null | xmodfit.py | nayanbera/XModFit | d98aceb9b74418ef7ef8bc076e0b405019e8867e | [
"MIT"
] | null | null | null | xmodfit.py | nayanbera/XModFit | d98aceb9b74418ef7ef8bc076e0b405019e8867e | [
"MIT"
] | null | null | null | import importlib
from PyQt5.QtWidgets import QWidget, QApplication, QPushButton, QLabel, QLineEdit, QVBoxLayout, QMessageBox, QCheckBox, \
QComboBox, QListWidget, QDialog, QFileDialog, QAbstractItemView, QSplitter, QSizePolicy, QAbstractScrollArea, QHBoxLayout, QTextEdit, QShortcut,\
QProgressDialog, QDesktopW... | 53.168737 | 216 | 0.591465 |
9e56fe95a6e01f57f06f2207b17cd50393f51015 | 67 | py | Python | backend/api/minhash/__init__.py | Carbonara-Project/Carbonara-Web | be1fac46ed3e4f590f3d885e646970a29ec43cb5 | [
"MIT"
] | 2 | 2020-01-07T12:35:11.000Z | 2021-09-18T10:30:57.000Z | backend/api/minhash/__init__.py | Carbonara-Project/Carbonara-Web | be1fac46ed3e4f590f3d885e646970a29ec43cb5 | [
"MIT"
] | null | null | null | backend/api/minhash/__init__.py | Carbonara-Project/Carbonara-Web | be1fac46ed3e4f590f3d885e646970a29ec43cb5 | [
"MIT"
] | null | null | null | from .lean_minhash import LeanMinHash
from .minhash import MinHash
| 22.333333 | 37 | 0.850746 |
9e573987ec2b99918f7d5e1bc8670333fd2c2880 | 1,544 | py | Python | components/cronet/tools/extract_from_jars.py | Wzzzx/chromium-crosswalk | 768dde8efa71169f1c1113ca6ef322f1e8c9e7de | [
"BSD-3-Clause-No-Nuclear-License-2014",
"BSD-3-Clause"
] | 2 | 2019-01-28T08:09:58.000Z | 2021-11-15T15:32:10.000Z | components/cronet/tools/extract_from_jars.py | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | null | null | null | components/cronet/tools/extract_from_jars.py | maidiHaitai/haitaibrowser | a232a56bcfb177913a14210e7733e0ea83a6b18d | [
"BSD-3-Clause"
] | 6 | 2020-09-23T08:56:12.000Z | 2021-11-18T03:40:49.000Z | #!/usr/bin/env python
#
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import optparse
import os
import sys
REPOSITORY_ROOT = os.path.abspath(os.path.join(
os.path.dirname(__file__), '..', '..', '..'... | 29.132075 | 79 | 0.718264 |
9e5757902cebba45eab334ae76ffd7666c6e78fc | 3,502 | py | Python | drawpage/unit tests/distanceTechniquesUnittest.py | Nitroklaus31/Clustering-in-Object-Centric-Process-Mining | 7ca6bd4bf9845b3e68ebcc94a441cfb2f318b2e0 | [
"MIT"
] | 4 | 2021-12-02T15:48:09.000Z | 2022-01-17T17:21:13.000Z | drawpage/unit tests/distanceTechniquesUnittest.py | Nitroklaus31/Clustering-in-Object-Centric-Process-Mining | 7ca6bd4bf9845b3e68ebcc94a441cfb2f318b2e0 | [
"MIT"
] | null | null | null | drawpage/unit tests/distanceTechniquesUnittest.py | Nitroklaus31/Clustering-in-Object-Centric-Process-Mining | 7ca6bd4bf9845b3e68ebcc94a441cfb2f318b2e0 | [
"MIT"
] | 10 | 2021-12-07T17:41:04.000Z | 2022-01-21T15:55:36.000Z | # Library imports
import unittest
import numpy as np
# Local imports
#from drawpage.clustering_techniques import cluster_kmedoids, cluster_agglomerative
from drawpage.distance_techniques import LevenshteinDistance, BooleanDistance, EuclideanDistance
class MyTestCase(unittest.TestCase):
def test_levenshtein(self)... | 50.028571 | 116 | 0.452027 |
9e5774a99f7cd06824eddb7f5a2d94abfc648a94 | 3,631 | py | Python | oscar/lib/python2.7/site-packages/django/conf/urls/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/conf/urls/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | oscar/lib/python2.7/site-packages/django/conf/urls/__init__.py | sainjusajan/django-oscar | 466e8edc807be689b0a28c9e525c8323cc48b8e1 | [
"BSD-3-Clause"
] | null | null | null | import warnings
from importlib import import_module
from django.core.exceptions import ImproperlyConfigured
from django.urls import (
LocaleRegexURLResolver, RegexURLPattern, RegexURLResolver,
)
from django.utils import six
from django.utils.deprecation import RemovedInDjango20Warning
__all__ = ['handle... | 42.22093 | 103 | 0.657395 |
9e57954c12ac03594f7e6c2664f840783f7d2134 | 1,081 | py | Python | structure/management/commands/test_structures.py | Jimmy-A-Caroli/protwis | 8987947f9325b2e331e957587cda39e4995628f5 | [
"Apache-2.0"
] | null | null | null | structure/management/commands/test_structures.py | Jimmy-A-Caroli/protwis | 8987947f9325b2e331e957587cda39e4995628f5 | [
"Apache-2.0"
] | null | null | null | structure/management/commands/test_structures.py | Jimmy-A-Caroli/protwis | 8987947f9325b2e331e957587cda39e4995628f5 | [
"Apache-2.0"
] | 1 | 2021-03-03T15:58:50.000Z | 2021-03-03T15:58:50.000Z | from build.management.commands.base_build import Command as BaseBuild
from structure.models import Structure
from structure.functions import StructureBuildCheck
class Command(BaseBuild):
def add_arguments(self, parser):
super(Command, self).add_arguments(parser=parser)
def handle(self, *args, **opt... | 40.037037 | 122 | 0.629047 |
9e5795873bd2c21b05c16c44577ee625fd09166b | 128,554 | py | Python | gslib/third_party/storage_apitools/storage_v1_messages.py | stanhu/gsutil | e8403ed5e07caed3027455c7b883fef733612360 | [
"Apache-2.0"
] | 649 | 2015-01-08T01:50:15.000Z | 2022-03-31T08:33:38.000Z | gslib/third_party/storage_apitools/storage_v1_messages.py | stanhu/gsutil | e8403ed5e07caed3027455c7b883fef733612360 | [
"Apache-2.0"
] | 798 | 2015-01-02T07:46:09.000Z | 2022-03-31T20:37:19.000Z | gslib/third_party/storage_apitools/storage_v1_messages.py | stanhu/gsutil | e8403ed5e07caed3027455c7b883fef733612360 | [
"Apache-2.0"
] | 315 | 2015-01-02T10:26:53.000Z | 2022-03-27T02:18:58.000Z | # Copyright 2014 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... | 41.847005 | 84 | 0.738546 |
9e579e91e8665b35fdc7a4fa6cdf132fdda01016 | 2,335 | py | Python | scrapers/today.py | sammytran277/good-news-aggregator | 4ba7d8adfea5e370ef22367aa4468592d15995f6 | [
"MIT"
] | null | null | null | scrapers/today.py | sammytran277/good-news-aggregator | 4ba7d8adfea5e370ef22367aa4468592d15995f6 | [
"MIT"
] | null | null | null | scrapers/today.py | sammytran277/good-news-aggregator | 4ba7d8adfea5e370ef22367aa4468592d15995f6 | [
"MIT"
] | null | null | null | """Scraping script for today.com"""
from bs4 import BeautifulSoup
from helper import fix_title
import requests
import sqlite3
def get_articles(url):
"""Returns article links, images, and titles as a list of dictionaries"""
page = requests.get(url)
page_content = page.content
soup = BeautifulSoup(pa... | 27.151163 | 78 | 0.635974 |
9e57bbcd0b1c4fc305be3149f4041e0cf61b6a4c | 51,415 | py | Python | python/sub/wav_reg_block.py | lsteveol/gen_registers | 536e84822bd19fcfd5de79eb04e6f081ce5c8c07 | [
"Apache-2.0"
] | null | null | null | python/sub/wav_reg_block.py | lsteveol/gen_registers | 536e84822bd19fcfd5de79eb04e6f081ce5c8c07 | [
"Apache-2.0"
] | null | null | null | python/sub/wav_reg_block.py | lsteveol/gen_registers | 536e84822bd19fcfd5de79eb04e6f081ce5c8c07 | [
"Apache-2.0"
] | null | null | null | """
wav_reg_block.py
~~~~~~~~~~
A module to implement a block of registers
"""
import re
import math
import wav_bitfield as wbf
import wav_register as wr
import wav_print as wp
import sys
#For PDF Gen
#from reportlab.lib.enums import TA_JUSTIFY
#from reportlab.lib.pagesizes import letter
#from reportlab.platypus ... | 36.361386 | 251 | 0.524925 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.