hexsha stringlengths 40 40 | size int64 1 1.03M | ext stringclasses 10
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 239 | max_stars_repo_name stringlengths 5 130 | max_stars_repo_head_hexsha stringlengths 40 78 | max_stars_repo_licenses listlengths 1 10 | max_stars_count int64 1 191k ⌀ | max_stars_repo_stars_event_min_datetime stringlengths 24 24 ⌀ | max_stars_repo_stars_event_max_datetime stringlengths 24 24 ⌀ | max_issues_repo_path stringlengths 3 239 | max_issues_repo_name stringlengths 5 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 67k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 239 | max_forks_repo_name stringlengths 5 130 | max_forks_repo_head_hexsha stringlengths 40 78 | max_forks_repo_licenses listlengths 1 10 | max_forks_count int64 1 105k ⌀ | max_forks_repo_forks_event_min_datetime stringlengths 24 24 ⌀ | max_forks_repo_forks_event_max_datetime stringlengths 24 24 ⌀ | content stringlengths 1 1.03M | avg_line_length float64 1 958k | max_line_length int64 1 1.03M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
794030efec87cc222af29be4be72489c696fac20 | 1,873 | py | Python | test/test_delete_contact_from_group.py | Paulss20/python_training | d0e48f453d08f29e1a0f0bfdcee2fb3aecdc5a82 | [
"Apache-2.0"
] | null | null | null | test/test_delete_contact_from_group.py | Paulss20/python_training | d0e48f453d08f29e1a0f0bfdcee2fb3aecdc5a82 | [
"Apache-2.0"
] | null | null | null | test/test_delete_contact_from_group.py | Paulss20/python_training | d0e48f453d08f29e1a0f0bfdcee2fb3aecdc5a82 | [
"Apache-2.0"
] | null | null | null |
from fixture.orm import ORMFixture
from model.group import Group
from model.add_new import AddNew
orm = ORMFixture(host="127.0.0.1", name="addressbook", user="root", password="")
def test_delete_contact_from_group(app, db):
# собираем списки групп и контактов из БД, если они пусты, добавляем группу и контакт
... | 48.025641 | 134 | 0.741591 |
794031236fbbe097d28e7a40779b9eee35ef4fe4 | 10,918 | py | Python | examples/inspection/plot_partial_dependence.py | matiasrvazquez/scikit-learn | e821a9e8a0d4ef63b1219faf9ab902ad0fd4b181 | [
"BSD-3-Clause"
] | 2 | 2017-11-22T08:20:15.000Z | 2017-11-22T08:23:14.000Z | examples/inspection/plot_partial_dependence.py | matiasrvazquez/scikit-learn | e821a9e8a0d4ef63b1219faf9ab902ad0fd4b181 | [
"BSD-3-Clause"
] | 1 | 2022-03-06T18:49:03.000Z | 2022-03-06T18:49:03.000Z | examples/inspection/plot_partial_dependence.py | matiasrvazquez/scikit-learn | e821a9e8a0d4ef63b1219faf9ab902ad0fd4b181 | [
"BSD-3-Clause"
] | null | null | null | """
===============================================================
Partial Dependence and Individual Conditional Expectation Plots
===============================================================
Partial dependence plots show the dependence between the target function [2]_
and a set of features of interest, marginaliz... | 37.5189 | 88 | 0.731453 |
7940317e97d8a06828234ba63a188f8c02f59386 | 3,212 | py | Python | eden/integration/hg/merge_test.py | jmswen/eden | 5e0b051703fa946cc77fc43004435ae6b20599a1 | [
"BSD-3-Clause"
] | null | null | null | eden/integration/hg/merge_test.py | jmswen/eden | 5e0b051703fa946cc77fc43004435ae6b20599a1 | [
"BSD-3-Clause"
] | null | null | null | eden/integration/hg/merge_test.py | jmswen/eden | 5e0b051703fa946cc77fc43004435ae6b20599a1 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
#
# 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.
... | 35.688889 | 85 | 0.633873 |
794031ac86770f20e8843d6c84ced4dc2c237b93 | 422 | py | Python | migrations/0006_auto_20161019_2000.py | tobiasbartel/servicium-contact_manager | 551001bc20c52484707b56fd548605a6580beacf | [
"MIT"
] | null | null | null | migrations/0006_auto_20161019_2000.py | tobiasbartel/servicium-contact_manager | 551001bc20c52484707b56fd548605a6580beacf | [
"MIT"
] | null | null | null | migrations/0006_auto_20161019_2000.py | tobiasbartel/servicium-contact_manager | 551001bc20c52484707b56fd548605a6580beacf | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.10.2 on 2016-10-19 20:00
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('contact_manager', '0005_contact_is_memeber_of'),
]
operations = [
migrations.AlterM... | 21.1 | 58 | 0.620853 |
794032b12f8c5385df51cfb54f2b117a2af98ccd | 6,716 | py | Python | holidays/countries/spain.py | m-ganko/python-holidays | f0d5a91f8bee8661ef3440bde2302332a364877e | [
"MIT"
] | null | null | null | holidays/countries/spain.py | m-ganko/python-holidays | f0d5a91f8bee8661ef3440bde2302332a364877e | [
"MIT"
] | 1 | 2021-06-08T14:40:55.000Z | 2021-06-08T14:40:55.000Z | holidays/countries/spain.py | m-ganko/python-holidays | f0d5a91f8bee8661ef3440bde2302332a364877e | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# python-holidays
# ---------------
# A fast, efficient Python library for generating country, province and state
# specific sets of holidays on the fly. It aims to make determining whether a
# specific date is a holiday as fast and flexible as possible.
#
# Author: ryanss <ryanssdev@icl... | 33.748744 | 78 | 0.483472 |
7940335539e067bab6066f686a64ed8e547342ce | 9,464 | py | Python | events.py | adrian-stephens/schedule | 56002951155b44aee9989393a088c20dd56d7f03 | [
"MIT"
] | null | null | null | events.py | adrian-stephens/schedule | 56002951155b44aee9989393a088c20dd56d7f03 | [
"MIT"
] | null | null | null | events.py | adrian-stephens/schedule | 56002951155b44aee9989393a088c20dd56d7f03 | [
"MIT"
] | null | null | null | # Events
# Class definitions for events
from datetime import timedelta, datetime
# Base Event type
class Event(object):
"""
Base class for all meeting events. Times and dates are in the meeting locale.
"""
def __init__(self,settings,startDateTime,endDateTime,summary,location,inIMA... | 34.666667 | 133 | 0.554205 |
794034151dd14da0037d743587644428b28c1ec0 | 139 | py | Python | ex_12/urllib1.py | rovelee/py4e | 32125f5d62b6c7b6a56c8e1a250c1d81c6d54006 | [
"MIT"
] | null | null | null | ex_12/urllib1.py | rovelee/py4e | 32125f5d62b6c7b6a56c8e1a250c1d81c6d54006 | [
"MIT"
] | null | null | null | ex_12/urllib1.py | rovelee/py4e | 32125f5d62b6c7b6a56c8e1a250c1d81c6d54006 | [
"MIT"
] | null | null | null | import urllib.request
fhand = urllib.request.urlopen('http://data.pr4e.org/romeo.txt')
for line in fhand:
print(line.decode().strip()) | 27.8 | 64 | 0.726619 |
794034d6cae9cc20610ec8662190fd23750bf625 | 5,319 | py | Python | src/util/storage.py | cagatay/Evolution-9 | dee5b0d95d722706d5014595d4e7d18ef81929cd | [
"WTFPL"
] | 18 | 2015-02-12T17:37:17.000Z | 2021-12-19T02:47:25.000Z | src/util/storage.py | cagatay/Evolution-9 | dee5b0d95d722706d5014595d4e7d18ef81929cd | [
"WTFPL"
] | null | null | null | src/util/storage.py | cagatay/Evolution-9 | dee5b0d95d722706d5014595d4e7d18ef81929cd | [
"WTFPL"
] | 6 | 2015-12-26T15:54:58.000Z | 2021-02-17T19:30:24.000Z | '''
Created on Oct 11, 2010
@author: melih.karci
'''
from constants import SQLITE_FILE
import sqlite3
import json
class db:
_connection = None
def __init__(self):
self._connection = sqlite3.connect(SQLITE_FILE)
c = self._cursor
# Create neural networks t... | 26.728643 | 112 | 0.460425 |
794034fe32f49b68eb755c13c433c30c7a61070e | 1,441 | py | Python | py/tests/problems/arr/majority_element_test.py | bmoretz/Daily-Coding-Problem | f79e062e9f6e7b18b7e95c071fbe71ad104affcb | [
"MIT"
] | 1 | 2020-06-26T13:28:43.000Z | 2020-06-26T13:28:43.000Z | py/tests/problems/arr/majority_element_test.py | bmoretz/Daily-Coding-Problem | f79e062e9f6e7b18b7e95c071fbe71ad104affcb | [
"MIT"
] | 7 | 2021-11-18T19:46:08.000Z | 2022-03-12T01:03:01.000Z | py/tests/problems/arr/majority_element_test.py | bmoretz/Daily-Coding-Problem | f79e062e9f6e7b18b7e95c071fbe71ad104affcb | [
"MIT"
] | null | null | null | import unittest
from problems.arr import majority_element
class Test_LettersNumbers2(unittest.TestCase):
def setUp(self):
pass
def test_none(self):
arr = None
actual = majority_element(arr)
expected = None
assert actual == expected
def test_case1(self):
... | 20.013889 | 56 | 0.532963 |
7940360ecee668e64808126b0258e95cb4420646 | 4,370 | py | Python | payfast/tests.py | reinbach/django-payfast-convert | 20267f76252cc61eba582d06694ce8e24ed413f0 | [
"MIT"
] | 2 | 2017-11-16T16:47:55.000Z | 2018-01-02T17:00:09.000Z | payfast/tests.py | reinbach/django-payfast-convert | 20267f76252cc61eba582d06694ce8e24ed413f0 | [
"MIT"
] | null | null | null | payfast/tests.py | reinbach/django-payfast-convert | 20267f76252cc61eba582d06694ce8e24ed413f0 | [
"MIT"
] | 2 | 2019-08-06T11:57:35.000Z | 2020-09-01T15:50:51.000Z | # coding: utf-8
import unittest
from collections import OrderedDict
import django
from django.test import TestCase
from payfast.forms import notify_url, PayFastForm
from payfast.models import PayFastOrder
from payfast.api import signature
from payfast import conf
import payfast.signals
def _test_data():
data = ... | 32.61194 | 87 | 0.653089 |
7940365fb4a641ecc80309586295002967c44fb9 | 894 | py | Python | rpi-config/scripts/sample_devices.py | DiamondLightSource/rpi-config | 617f5e176c0621e3ea1b567e9586e96ba0f8b5db | [
"Apache-2.0"
] | 4 | 2016-08-23T12:13:21.000Z | 2018-08-22T12:55:55.000Z | rpi-config/scripts/sample_devices.py | DiamondLightSource/rpi-config | 617f5e176c0621e3ea1b567e9586e96ba0f8b5db | [
"Apache-2.0"
] | null | null | null | rpi-config/scripts/sample_devices.py | DiamondLightSource/rpi-config | 617f5e176c0621e3ea1b567e9586e96ba0f8b5db | [
"Apache-2.0"
] | 2 | 2016-09-15T19:17:30.000Z | 2018-03-06T06:34:13.000Z | from gdascripts.pd.dummy_pds import DummyPD
from gdascripts.pd.dummy_pds import MultiInputExtraFieldsDummyPD
from gdascripts.pd.dummy_pds import ZeroInputExtraFieldsDummyPD
from gdascripts.pd.time_pds import showtimeClass
from gdascripts.pd.time_pds import showincrementaltimeClass
from gdascripts.pd.time_pds import wa... | 33.111111 | 64 | 0.779642 |
794037ae23c5efd4daf0e6c1f0b2f400bf176dc8 | 280 | py | Python | tests/mods/packinit/init.py | thatch45/pop | b1ea83cf93c1ea28851129146d8507842363aa6a | [
"Apache-2.0"
] | null | null | null | tests/mods/packinit/init.py | thatch45/pop | b1ea83cf93c1ea28851129146d8507842363aa6a | [
"Apache-2.0"
] | null | null | null | tests/mods/packinit/init.py | thatch45/pop | b1ea83cf93c1ea28851129146d8507842363aa6a | [
"Apache-2.0"
] | 1 | 2021-02-05T04:18:33.000Z | 2021-02-05T04:18:33.000Z | # -*- coding: utf-8 -*-
'''
used to test the pack_init system
'''
# pylint: disable=undefined-variable
def new(hub):
'''
Add a value to the context
'''
hub.context['NEW'] = True
hub.mods._mem['new'] = True
def check(hub):
return hub.context.get('NEW')
| 15.555556 | 36 | 0.592857 |
7940386dfab624ea2865919b4b95668620dd8ab3 | 5,220 | py | Python | cronjobs/FileLoader.py | axsauze/bigdatadarwin | 76320a1ba1b0e6efd50ca150699b34175c474856 | [
"Apache-2.0"
] | 1 | 2015-09-21T16:15:11.000Z | 2015-09-21T16:15:11.000Z | cronjobs/FileLoader.py | axsauze/bigdatadarwin | 76320a1ba1b0e6efd50ca150699b34175c474856 | [
"Apache-2.0"
] | 15 | 2015-09-19T20:19:18.000Z | 2015-10-10T05:36:23.000Z | cronjobs/FileLoader.py | HackPartners/bigdatadarwin | 76320a1ba1b0e6efd50ca150699b34175c474856 | [
"Apache-2.0"
] | null | null | null | import os, sys
sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
from models import Schedule, CallingPoint, db
from darwinpush.messagefactories.xml import ScheduleXMLMessageFactory
import darwinpush.xb.pushport as pp
import re
class ScheduleFileLoader:
def __init__(self, file_location):
ass... | 37.285714 | 220 | 0.546552 |
794038a66e8cbe75dfd2caed47bbcfd65ca699f2 | 4,964 | py | Python | repour/server/server.py | janinko/repour | 5df249254b0c4c5a5c90e7e87a8c3e135ad95d21 | [
"Apache-2.0"
] | null | null | null | repour/server/server.py | janinko/repour | 5df249254b0c4c5a5c90e7e87a8c3e135ad95d21 | [
"Apache-2.0"
] | null | null | null | repour/server/server.py | janinko/repour | 5df249254b0c4c5a5c90e7e87a8c3e135ad95d21 | [
"Apache-2.0"
] | null | null | null | # flake8: noqa
import asyncio
import logging
import os
import prometheus_async.aio as aio
from aiohttp import web
from prometheus_client.bridge.graphite import GraphiteBridge
from .. import clone, repo, websockets
from ..adjust import adjust
from ..auth import auth
from ..config import config
from .endpoint import (
... | 29.2 | 87 | 0.65552 |
7940397ffe8de596d4fa1d6504a4146f20f7f1c5 | 411 | py | Python | dupgee/base/dupgee/matcher.py | ahmetkotan/dupgee | 7cb65e6ba107fb30e98bdd17fd666ecff53f9eb7 | [
"MIT"
] | 40 | 2021-12-26T07:42:29.000Z | 2022-01-03T01:37:16.000Z | dupgee/base/dupgee/matcher.py | ahmetkotan/dupgee | 7cb65e6ba107fb30e98bdd17fd666ecff53f9eb7 | [
"MIT"
] | null | null | null | dupgee/base/dupgee/matcher.py | ahmetkotan/dupgee | 7cb65e6ba107fb30e98bdd17fd666ecff53f9eb7 | [
"MIT"
] | null | null | null | urls_module = __import__("{{ app_name }}.urls")
pages_module = __import__("{{ app_name }}.pages")
def match_url(path):
for url in urls_module.urls.urls:
if url.get("path") == path:
return url.get("view")
return pages_module.pages.HomepageView
def find_view(request):
view_class = matc... | 25.6875 | 49 | 0.673966 |
79403ac66e6eb68abac5dc38304c7a84c14b395b | 1,053 | py | Python | tensorflow_compression/python/ops/coder_ops.py | ghgh3269/compression | 3e920bc49fa32d79c1c2917583ffb663c6ebac85 | [
"Apache-2.0"
] | 46 | 2019-06-17T21:13:57.000Z | 2022-03-29T07:52:11.000Z | tensorflow_compression/python/ops/coder_ops.py | ghgh3269/compression | 3e920bc49fa32d79c1c2917583ffb663c6ebac85 | [
"Apache-2.0"
] | 11 | 2019-07-05T09:51:08.000Z | 2022-02-06T14:00:03.000Z | tensorflow_compression/python/ops/coder_ops.py | ghgh3269/compression | 3e920bc49fa32d79c1c2917583ffb663c6ebac85 | [
"Apache-2.0"
] | 14 | 2019-04-10T01:09:36.000Z | 2022-03-30T01:24:57.000Z | # -*- coding: utf-8 -*-
# Copyright 2018 Google LLC. 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 require... | 36.310345 | 80 | 0.725546 |
79403b3fc5708de3dddd0375f0a8bd10a3bbafa7 | 722 | py | Python | bluepy/scan_fuzz.py | rohichau/BLETracking | 495cbfc8e39343b3808a68a52283cdc6e113b7ff | [
"Apache-2.0"
] | 1 | 2021-08-20T10:02:21.000Z | 2021-08-20T10:02:21.000Z | old/scan_fuzz.py | grodansparadis/vscp-python-sensorpuck | 168aeb29b9994dd8f9499fa6380c4d7332619b34 | [
"MIT"
] | 7 | 2021-03-19T15:51:36.000Z | 2022-03-12T00:53:47.000Z | flora/lib/python3.5/site-packages/bluepy/scan_fuzz.py | saulgold/miflora | dc19d812dda1fc90b43e3e3bd72841fd62ca4003 | [
"Apache-2.0"
] | null | null | null | from __future__ import print_function
import sys
import os
import random
import struct
import btle
def rand_db(adtype, datalen):
return struct.pack("<BB", datalen+1, adtype) + os.urandom(datalen)
if __name__ == '__main__':
while True:
sr = btle.ScanEntry(None, 0)
db = b''
while len(... | 24.896552 | 70 | 0.522161 |
79403b717975c8ad70157d4d69c370b7adb72d92 | 5,387 | py | Python | influxdb_client/domain/scraper_target_response.py | Rajpratik71/influxdb-client-python | ae537018b638600552b3ac11f1b070c048719910 | [
"MIT"
] | null | null | null | influxdb_client/domain/scraper_target_response.py | Rajpratik71/influxdb-client-python | ae537018b638600552b3ac11f1b070c048719910 | [
"MIT"
] | null | null | null | influxdb_client/domain/scraper_target_response.py | Rajpratik71/influxdb-client-python | ae537018b638600552b3ac11f1b070c048719910 | [
"MIT"
] | null | null | null | # coding: utf-8
"""
Influx API Service.
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
OpenAPI spec version: 0.1.0
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import six
from influxdb_client.domain... | 26.935 | 152 | 0.558196 |
79403d8ae544f97a4a83b5b1c190bf395ffe8bb2 | 2,518 | py | Python | phi/physics/material.py | joelguerrero/PhiFlow | 94c7f3966c30c38b4e298fada88e001eba897dba | [
"MIT"
] | 1 | 2021-03-13T19:29:15.000Z | 2021-03-13T19:29:15.000Z | phi/physics/material.py | joelguerrero/PhiFlow | 94c7f3966c30c38b4e298fada88e001eba897dba | [
"MIT"
] | null | null | null | phi/physics/material.py | joelguerrero/PhiFlow | 94c7f3966c30c38b4e298fada88e001eba897dba | [
"MIT"
] | null | null | null | """
Surface material definitions including constants.
"""
import math
from phi import struct
@struct.definition()
class Material(struct.Struct):
"""
Defines a surface material including the boundary conditions.
"""
def __init__(self, name, **kwargs):
struct.Struct.__init__(self, **struct.kw... | 27.369565 | 95 | 0.619936 |
79403fd3ec341cbb42d5d1886552f6db6b287c82 | 931 | py | Python | application/app.py | PaulineLc/OpenDoorData | 203b19427467e330cd04b4dc5e8c31d5b9af755c | [
"MIT"
] | null | null | null | application/app.py | PaulineLc/OpenDoorData | 203b19427467e330cd04b4dc5e8c31d5b9af755c | [
"MIT"
] | null | null | null | application/app.py | PaulineLc/OpenDoorData | 203b19427467e330cd04b4dc5e8c31d5b9af755c | [
"MIT"
] | null | null | null | # file that contains flask app setup code
from flask import Flask # import Flask class
from config import DevelopmentConfig
import peewee
app = Flask(__name__) # instantiate the Flask class
app.config.from_object(DevelopmentConfig) # initialise app with development config
configdb = app.config['DATABASE']
... | 30.032258 | 83 | 0.627282 |
7940401a36f4d8b0eeeb436b6bd2b08b0426b161 | 1,815 | py | Python | userbot/modules/hentai.py | bryanasfuk/Baphomet | bf3c3d9589511534ad848b3aa0b59e3d6b113282 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 1 | 2021-04-15T16:10:49.000Z | 2021-04-15T16:10:49.000Z | userbot/modules/hentai.py | bryanasfuk/Baphomet | bf3c3d9589511534ad848b3aa0b59e3d6b113282 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | null | null | null | userbot/modules/hentai.py | bryanasfuk/Baphomet | bf3c3d9589511534ad848b3aa0b59e3d6b113282 | [
"Naumen",
"Condor-1.1",
"MS-PL"
] | 21 | 2021-02-01T14:01:42.000Z | 2021-08-22T01:13:28.000Z | # Copyright (C) 2021 Bian Sepang
# All Rights Reserved.
#
import nekos
from userbot import CMD_HELP
from userbot.events import register
@register(pattern=r"^\.hentai$", outgoing=True)
async def _(event):
"""Gets random hentai gif from nekos.py."""
await event.edit("`Fetching from nekos...`")
pic = nekos... | 24.2 | 52 | 0.595041 |
7940404582ae89b39db0c17d08f20cb362e64003 | 3,087 | py | Python | src/main/resources/blazemeter/AddData.py | xebialabs-community/xlr-blazemeter-plugin | d4629d31fda2a42efc7e628b01665e055ebe0096 | [
"MIT"
] | null | null | null | src/main/resources/blazemeter/AddData.py | xebialabs-community/xlr-blazemeter-plugin | d4629d31fda2a42efc7e628b01665e055ebe0096 | [
"MIT"
] | 1 | 2020-01-28T20:14:04.000Z | 2020-01-28T20:14:04.000Z | src/main/resources/blazemeter/AddData.py | xebialabs-community/xlr-blazemeter-plugin | d4629d31fda2a42efc7e628b01665e055ebe0096 | [
"MIT"
] | 1 | 2020-01-15T20:07:14.000Z | 2020-01-15T20:07:14.000Z | #
# Copyright 2020 XEBIALABS
#
# 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, publish, distribute, subli... | 38.111111 | 462 | 0.721088 |
7940407104bb1baeb52a68a624af88c38b838f0b | 333 | py | Python | softdelete/urls.py | fritill-team/django-generic-delete | dcd07bfff577525b8010b9e9790f5c054a41433e | [
"MIT"
] | null | null | null | softdelete/urls.py | fritill-team/django-generic-delete | dcd07bfff577525b8010b9e9790f5c054a41433e | [
"MIT"
] | null | null | null | softdelete/urls.py | fritill-team/django-generic-delete | dcd07bfff577525b8010b9e9790f5c054a41433e | [
"MIT"
] | null | null | null | from django.urls import path, include
from .views import AdminSingleDeleteView
app_name = 'softdelete'
urlpatterns = [
path('<str:app_label>/<str:model>/<str:pk>/', AdminSingleDeleteView.as_view(), name='single-delete'),
# path('<str:app_label>/<str:model>/<str:pks>/', AdminBulkDeleteView.as_view(), name='bulk... | 37 | 105 | 0.717718 |
794041a0313e747014f11fa2dcab2bbf8a8e5c31 | 8,989 | py | Python | utilities/utility_functions.py | pnwinkler/GKeepToCalc | ec995ba56a614deadca60927e29c1a8c27f1589a | [
"MIT"
] | null | null | null | utilities/utility_functions.py | pnwinkler/GKeepToCalc | ec995ba56a614deadca60927e29c1a8c27f1589a | [
"MIT"
] | null | null | null | utilities/utility_functions.py | pnwinkler/GKeepToCalc | ec995ba56a614deadca60927e29c1a8c27f1589a | [
"MIT"
] | null | null | null | import gkeepapi
import openpyxl
import shutil
import re
from datetime import datetime
from GKeepToCalc.utilities.params import *
import getpass
def backup_targetpath():
if not BACKUP_FOLDER_NAME:
bk_folder_name = 'Keep2Calc.backups'
else:
bk_folder_name = BACKUP_FOLDER_NAME
backup_folder ... | 40.129464 | 142 | 0.671599 |
794041ce8b452e0a95d88560e3a473ac025e688d | 227 | py | Python | ubuild.py | basilveerman/vcver-python | d5c1c70f0e7aae57cd047bb08fe9bfb7a16685a4 | [
"MIT"
] | 1 | 2017-06-22T17:04:59.000Z | 2017-06-22T17:04:59.000Z | ubuild.py | basilveerman/vcver-python | d5c1c70f0e7aae57cd047bb08fe9bfb7a16685a4 | [
"MIT"
] | 5 | 2019-07-24T20:45:18.000Z | 2021-08-10T05:26:41.000Z | ubuild.py | basilveerman/vcver-python | d5c1c70f0e7aae57cd047bb08fe9bfb7a16685a4 | [
"MIT"
] | 3 | 2018-07-29T20:34:30.000Z | 2021-11-12T19:35:49.000Z | from uranium import current_build
import os
current_build.packages.install("uranium-plus[vscode]")
import uranium_plus
current_build.config.update({"uranium-plus": {"module": "vcver"}})
uranium_plus.bootstrap(current_build)
| 22.7 | 66 | 0.801762 |
79404288ed5b86bb8076f2e01fe996e98f46536c | 1,216 | py | Python | snakepit/world.py | Artimi/snakepit-game | b9832cd542b1317147c179e944f529c022cad2e4 | [
"MIT"
] | null | null | null | snakepit/world.py | Artimi/snakepit-game | b9832cd542b1317147c179e944f529c022cad2e4 | [
"MIT"
] | null | null | null | snakepit/world.py | Artimi/snakepit-game | b9832cd542b1317147c179e944f529c022cad2e4 | [
"MIT"
] | null | null | null | from . import settings
from .datatypes import Char
class World(list):
SIZE_X = settings.FIELD_SIZE_X
SIZE_Y = settings.FIELD_SIZE_Y
COLOR_0 = 0
CH_VOID = ' '
CH_STONE = '#'
VOID_CHAR = Char(CH_VOID, COLOR_0)
def __init__(self):
super(World, self).__init__()
for y in range(... | 28.27907 | 110 | 0.553454 |
794042a784667230368f57d0f830b6e16b89cd39 | 13,601 | py | Python | gaphor/core/modeling/tests/test_elementdispatcher.py | Texopolis/gaphor | 3b190620075fd413258af1e7a007b4b2167a7564 | [
"Apache-2.0"
] | 1 | 2022-01-30T15:33:53.000Z | 2022-01-30T15:33:53.000Z | gaphor/core/modeling/tests/test_elementdispatcher.py | burakozturk16/gaphor | 86267a5200ac4439626d35d306dbb376c3800107 | [
"Apache-2.0"
] | 1 | 2021-12-10T19:46:00.000Z | 2021-12-10T19:46:00.000Z | gaphor/core/modeling/tests/test_elementdispatcher.py | burakozturk16/gaphor | 86267a5200ac4439626d35d306dbb376c3800107 | [
"Apache-2.0"
] | 1 | 2022-01-23T18:36:27.000Z | 2022-01-23T18:36:27.000Z | import pytest
from gaphor import UML
from gaphor.core.eventmanager import EventManager
from gaphor.core.modeling import Element, ElementFactory
from gaphor.core.modeling.elementdispatcher import ElementDispatcher, EventWatcher
from gaphor.core.modeling.properties import association
from gaphor.UML.modelinglanguage imp... | 31.33871 | 88 | 0.670465 |
794042b548004e67eee02b194db263821271d33e | 447 | py | Python | ruuvitag/ruuvi_single.py | emehtata/scripts | 9eda01157d2dfb3951bf2056d2336c1df4e01512 | [
"MIT"
] | null | null | null | ruuvitag/ruuvi_single.py | emehtata/scripts | 9eda01157d2dfb3951bf2056d2336c1df4e01512 | [
"MIT"
] | null | null | null | ruuvitag/ruuvi_single.py | emehtata/scripts | 9eda01157d2dfb3951bf2056d2336c1df4e01512 | [
"MIT"
] | null | null | null | # 56 DD:17:F3:D7:86:CE pakastin
# 74 EA:D5:76:69:70:99 jääkaappi
# 104 EC:67:46:36:EA:60 sauna
import logging
import sys
from ruuvitag_sensor.ruuvi import RuuviTagSensor
logging.basicConfig(level=logging.DEBUG)
macs = [ sys.argv[1] ]
timeout_in_sec = 30
datas = RuuviTagSensor.get_data_for_sensors(macs, timeout_in... | 20.318182 | 65 | 0.736018 |
794042f32dfdd6be5b028c255db036b3d9c85283 | 16,584 | py | Python | technology/freepdk45/tech/tech.py | ycyang0508/OpenRAM | 54c6043cb81c51f5f4a2f77e91145545ce0ed6d6 | [
"BSD-3-Clause"
] | 1 | 2022-02-17T22:12:46.000Z | 2022-02-17T22:12:46.000Z | technology/freepdk45/tech/tech.py | ycyang0508/OpenRAM | 54c6043cb81c51f5f4a2f77e91145545ce0ed6d6 | [
"BSD-3-Clause"
] | null | null | null | technology/freepdk45/tech/tech.py | ycyang0508/OpenRAM | 54c6043cb81c51f5f4a2f77e91145545ce0ed6d6 | [
"BSD-3-Clause"
] | null | null | null | # See LICENSE for licensing information.
#
# Copyright (c) 2016-2021 Regents of the University of California and The Board
# of Regents for the Oklahoma Agricultural and Mechanical College
# (acting for and on behalf of Oklahoma State University)
# All rights reserved.
#
import os
from design_rules import *
from module... | 35.587983 | 122 | 0.582972 |
79404384fc2971f69ead8fdd1e9d7609ed4e4911 | 554 | py | Python | util/text_tool.py | BarryZM/KnowYouAI | 8c9d96238090fa8fd70b8581ac536bb1b0691eb5 | [
"MIT"
] | null | null | null | util/text_tool.py | BarryZM/KnowYouAI | 8c9d96238090fa8fd70b8581ac536bb1b0691eb5 | [
"MIT"
] | null | null | null | util/text_tool.py | BarryZM/KnowYouAI | 8c9d96238090fa8fd70b8581ac536bb1b0691eb5 | [
"MIT"
] | 1 | 2020-12-31T11:13:30.000Z | 2020-12-31T11:13:30.000Z | import jieba
from jieba.posseg import POSTokenizer
import config
import os
import logging
jieba.setLogLevel(logging.INFO)
class TextTool:
def __init__(self):
self.token = jieba.Tokenizer()
file = [x.path for x in os.scandir(config.JIEBA_DICT_PATH) if x.path.endswith("txt")]
for fp in file... | 23.083333 | 93 | 0.676895 |
7940441d0882c2b05003a5793e1977151a7131e2 | 6,904 | py | Python | src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/spalloc/scripts/ps.py | Roboy/LSM_SpiNNaker_MyoArm | 04fa1eaf78778edea3ba3afa4c527d20c491718e | [
"BSD-3-Clause"
] | 2 | 2020-11-01T13:22:11.000Z | 2020-11-01T13:22:20.000Z | src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/spalloc/scripts/ps.py | Roboy/LSM_SpiNNaker_MyoArm | 04fa1eaf78778edea3ba3afa4c527d20c491718e | [
"BSD-3-Clause"
] | null | null | null | src/spinnaker_ros_lsm/venv/lib/python2.7/site-packages/spalloc/scripts/ps.py | Roboy/LSM_SpiNNaker_MyoArm | 04fa1eaf78778edea3ba3afa4c527d20c491718e | [
"BSD-3-Clause"
] | null | null | null | """An administrative command-line process listing utility.
By default, the ``spalloc-ps`` command lists all running and queued jobs. For
a real-time monitor of queued and running jobs, the ``--watch`` option may be
added.
.. image:: _static/spalloc_ps.png
:alt: Jobs being listed by spalloc-ps
This list may be f... | 32.87619 | 79 | 0.55562 |
794044603bb074fff84646136731475b312623b6 | 1,715 | py | Python | commands/calevent_commands.py | k-anson/minilla_bot_py | 8099059b7a577f2d3a8bbcbf673bda71178212b6 | [
"MIT"
] | null | null | null | commands/calevent_commands.py | k-anson/minilla_bot_py | 8099059b7a577f2d3a8bbcbf673bda71178212b6 | [
"MIT"
] | null | null | null | commands/calevent_commands.py | k-anson/minilla_bot_py | 8099059b7a577f2d3a8bbcbf673bda71178212b6 | [
"MIT"
] | null | null | null | from discord.ext import commands
from discord.ext.commands import Bot, Context, CommandError
from datetime import datetime, date
from dateutil.parser import parse
from database import Database
from utils.embed import create_cal_embed, create_calevent_embed
def create_calevent_commands(config:dict, client:Bot, db:Data... | 34.3 | 109 | 0.749271 |
794044af12c1ff76bce99bc3d2f03d3d06ebe6a6 | 8,896 | py | Python | tests/graph/hex/test_hex.py | clebouteiller/landlab | e6f47db76ea0814c4c5a24e695bbafb74c722ff7 | [
"MIT"
] | null | null | null | tests/graph/hex/test_hex.py | clebouteiller/landlab | e6f47db76ea0814c4c5a24e695bbafb74c722ff7 | [
"MIT"
] | 1 | 2021-11-11T21:23:46.000Z | 2021-11-11T21:23:46.000Z | tests/graph/hex/test_hex.py | clebouteiller/landlab | e6f47db76ea0814c4c5a24e695bbafb74c722ff7 | [
"MIT"
] | null | null | null | import numpy as np
import pytest
from hypothesis import given
from hypothesis.strategies import integers, lists
from numpy.testing import assert_array_almost_equal, assert_array_equal
from pytest import approx
from landlab.graph import TriGraph
from landlab.graph.hex.hex import (
HorizontalHexTriGraph,
Horizon... | 35.301587 | 88 | 0.61286 |
794045026ad061c4fbb00169f7bc13bc305d7d0c | 3,759 | py | Python | core_modules/macro_handler.py | picass02005/PyMacro-async | 5945de7be39793c42d2e1d53a6050809d962338d | [
"MIT"
] | 1 | 2021-08-10T19:50:57.000Z | 2021-08-10T19:50:57.000Z | core_modules/macro_handler.py | picass02005/PyMacro-async | 5945de7be39793c42d2e1d53a6050809d962338d | [
"MIT"
] | null | null | null | core_modules/macro_handler.py | picass02005/PyMacro-async | 5945de7be39793c42d2e1d53a6050809d962338d | [
"MIT"
] | null | null | null | import gc
import importlib
import json
from typing import Coroutine, Union
from core_modules.get_window import get_window
from core_modules.tray import Tray
from global_modules import logs
class MacroHandler:
def __init__(self, tray: Tray):
from global_modules.macro_manager import REGISTERED_PATH
... | 36.852941 | 117 | 0.589518 |
7940466d6e1fbfa9431ab8c92555b1f2b36be0fe | 415 | py | Python | packages/markblocks/tests/test_preprocessor.py | stattikcms/stattik | 5c96d600d105461edb95a11d8050dee3c32edd1e | [
"MIT"
] | 1 | 2021-11-05T06:24:28.000Z | 2021-11-05T06:24:28.000Z | packages/markblocks/tests/test_preprocessor.py | stattikcms/stattik | 5c96d600d105461edb95a11d8050dee3c32edd1e | [
"MIT"
] | null | null | null | packages/markblocks/tests/test_preprocessor.py | stattikcms/stattik | 5c96d600d105461edb95a11d8050dee3c32edd1e | [
"MIT"
] | null | null | null | import unittest
from markblocks.data import load
from markblocks.lex.textlexer import TextLexer
class Test(unittest.TestCase):
def test(self):
filename = "hello.mb"
with load(filename) as fh:
s = fh.read()
lexer = TextLexer()
tokens = lexer.tokenize(s)
... | 18.863636 | 46 | 0.585542 |
79404675e864ed3fb926cd2722bc42bcd1a56e6d | 63,476 | py | Python | flaml/model.py | wuchihsu/FLAML | 54d303a95ab8615ec298a5a7a530f8d1d477bf68 | [
"MIT"
] | null | null | null | flaml/model.py | wuchihsu/FLAML | 54d303a95ab8615ec298a5a7a530f8d1d477bf68 | [
"MIT"
] | 4 | 2022-01-16T04:25:26.000Z | 2022-02-23T04:50:37.000Z | flaml/model.py | wuchihsu/FLAML | 54d303a95ab8615ec298a5a7a530f8d1d477bf68 | [
"MIT"
] | null | null | null | # !
# * Copyright (c) Microsoft Corporation. All rights reserved.
# * Licensed under the MIT License. See LICENSE file in the
# * project root for license information.
from contextlib import contextmanager
from functools import partial
import signal
import os
from typing import Callable, List
import numpy a... | 36.292739 | 131 | 0.539653 |
794046a9a27ba53eec0ffda2acb470f34a19a802 | 1,062 | py | Python | website/urls.py | sharif-42/Personal_Website | 7c385bec272ec7b5c816eab92e3b5bfb8cd80016 | [
"MIT"
] | null | null | null | website/urls.py | sharif-42/Personal_Website | 7c385bec272ec7b5c816eab92e3b5bfb8cd80016 | [
"MIT"
] | null | null | null | website/urls.py | sharif-42/Personal_Website | 7c385bec272ec7b5c816eab92e3b5bfb8cd80016 | [
"MIT"
] | null | null | null | """website URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based... | 37.928571 | 82 | 0.731638 |
7940477e6bb0c1e71467d5385dbcda485b9edc83 | 1,318 | py | Python | distkv/command/client/log.py | smurfix/distkv | 190b4c8f6cbe038b85bac4317a7fb13a9e742516 | [
"Apache-2.0",
"MIT"
] | 10 | 2019-03-19T16:04:21.000Z | 2020-06-04T20:11:10.000Z | distkv/command/client/log.py | M-o-a-T/distkv | 94f440e1480ecec04af63abdb66ec8f23859f871 | [
"Apache-2.0",
"MIT"
] | 1 | 2020-02-05T18:32:52.000Z | 2020-02-05T22:15:36.000Z | distkv/command/client/log.py | smurfix/distkv | 190b4c8f6cbe038b85bac4317a7fb13a9e742516 | [
"Apache-2.0",
"MIT"
] | 1 | 2020-08-03T03:10:58.000Z | 2020-08-03T03:10:58.000Z | # command line interface
import asyncclick as click
from distkv.util import yprint
@click.group(short_help="Manage logging.") # pylint: disable=undefined-variable
async def cli():
"""
This subcommand controls a server's logging.
"""
pass
@cli.command()
@click.option("-i", "--incremental", is_flag... | 24.407407 | 88 | 0.656297 |
7940482833564abce82bcade0204082b4aaeb73d | 1,117 | py | Python | src/pyobo/sources/pfam_clan.py | fossabot/pyobo | f196b1ea37a50f9e9144bd0990e6c52ec1c16d0f | [
"MIT"
] | null | null | null | src/pyobo/sources/pfam_clan.py | fossabot/pyobo | f196b1ea37a50f9e9144bd0990e6c52ec1c16d0f | [
"MIT"
] | null | null | null | src/pyobo/sources/pfam_clan.py | fossabot/pyobo | f196b1ea37a50f9e9144bd0990e6c52ec1c16d0f | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""Convert PFAM Clans to OBO."""
from typing import Iterable
import bioversions
from tqdm import tqdm
from .pfam import get_pfam_clan_df
from ..struct import Obo, Reference, Term
PREFIX = 'pfam.clan'
def get_obo() -> Obo:
"""Get PFAM Clans as OBO."""
version = bioversions.get_vers... | 25.386364 | 100 | 0.659803 |
7940482882fa35887944cf0001ee52f37433bbb3 | 804 | py | Python | env/Scripts/f2py.py | matrixxd/woofpatrol | af7f7b6f44719450f6e0bf707c82f2be727f2553 | [
"MIT"
] | 1 | 2019-11-15T11:31:10.000Z | 2019-11-15T11:31:10.000Z | env/Scripts/f2py.py | matrixxd/woofpatrol | af7f7b6f44719450f6e0bf707c82f2be727f2553 | [
"MIT"
] | 2 | 2022-01-13T01:50:33.000Z | 2022-03-12T00:05:29.000Z | env/Scripts/f2py.py | matrixxd/woofpatrol | af7f7b6f44719450f6e0bf707c82f2be727f2553 | [
"MIT"
] | null | null | null | #!C:\Users\Darren\Desktop\OnlineDogFilter\env\Scripts\python.exe
# See http://cens.ioc.ee/projects/f2py2e/
from __future__ import division, print_function
import os
import sys
for mode in ["g3-numpy", "2e-numeric", "2e-numarray", "2e-numpy"]:
try:
i = sys.argv.index("--" + mode)
del sys.argv[i]
... | 27.724138 | 67 | 0.64801 |
79404957325a3d524c13ec5e68053a3f3c89924f | 126,621 | py | Python | base/site-packages/docutils/parsers/rst/states.py | edisonlz/fastor | 342078a18363ac41d3c6b1ab29dbdd44fdb0b7b3 | [
"Apache-2.0"
] | 285 | 2019-12-23T09:50:21.000Z | 2021-12-08T09:08:49.000Z | base/site-packages/docutils/parsers/rst/states.py | jeckun/fastor | 342078a18363ac41d3c6b1ab29dbdd44fdb0b7b3 | [
"Apache-2.0"
] | 3 | 2015-01-06T15:21:58.000Z | 2019-04-09T12:03:13.000Z | base/site-packages/docutils/parsers/rst/states.py | jeckun/fastor | 342078a18363ac41d3c6b1ab29dbdd44fdb0b7b3 | [
"Apache-2.0"
] | 9 | 2019-12-23T12:59:25.000Z | 2022-03-15T05:12:11.000Z | # $Id: states.py 6141 2009-09-25 18:50:30Z milde $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
This is the ``docutils.parsers.restructuredtext.states`` module, the core of
the reStructuredText parser. It defines the following:
:Classes:
- `RSTSt... | 42.080758 | 80 | 0.561882 |
794049ab2fe8bf96ec65e8c63971e44e7b835705 | 1,196 | py | Python | angr/engines/vex/statements/store.py | mariusmue/angr | f8304c4b1f0097a721a6692b02a45cabaae137c5 | [
"BSD-2-Clause"
] | 2 | 2018-12-03T23:14:56.000Z | 2018-12-03T23:15:57.000Z | angr/engines/vex/statements/store.py | mariusmue/angr | f8304c4b1f0097a721a6692b02a45cabaae137c5 | [
"BSD-2-Clause"
] | null | null | null | angr/engines/vex/statements/store.py | mariusmue/angr | f8304c4b1f0097a721a6692b02a45cabaae137c5 | [
"BSD-2-Clause"
] | 1 | 2022-02-10T02:29:38.000Z | 2022-02-10T02:29:38.000Z | from . import SimIRStmt
from .... import sim_options as o
from ....state_plugins.sim_action_object import SimActionObject
from ....state_plugins.sim_action import SimActionData
class SimIRStmt_Store(SimIRStmt):
def _execute(self):
# first resolve the address and record stuff
addr = self._translate_... | 41.241379 | 123 | 0.674749 |
794049e4f30221372ed41ef964148f0d3c91f09b | 629 | py | Python | InventoryManager/product/models.py | FuryAndRage/InventoryManager | bbb7318dae6bf40da81ed02a0f547019f031778f | [
"MIT"
] | null | null | null | InventoryManager/product/models.py | FuryAndRage/InventoryManager | bbb7318dae6bf40da81ed02a0f547019f031778f | [
"MIT"
] | null | null | null | InventoryManager/product/models.py | FuryAndRage/InventoryManager | bbb7318dae6bf40da81ed02a0f547019f031778f | [
"MIT"
] | null | null | null | from django.db import models
from InventoryManager.category.models import Category
from django.contrib.auth.models import User
class Product(models.Model):
user = models.ForeignKey(User, on_delete = models.CASCADE)
category = models.ForeignKey(Category, on_delete = models.CASCADE, verbose_name = 'Category')
... | 41.933333 | 97 | 0.750397 |
79404b66bddf932db6f8dacdf5ef5085f91e55f4 | 5,188 | py | Python | MyApi/settings.py | CodeEnvironment/django-rest-framework-deploy-heroku | c6ffb20961c193b0f4dc1289de904b5d6750f335 | [
"MIT"
] | 3 | 2021-04-05T14:02:44.000Z | 2022-01-25T07:50:20.000Z | MyApi/settings.py | CodeEnvironment/django-rest-framework-deploy-heroku | c6ffb20961c193b0f4dc1289de904b5d6750f335 | [
"MIT"
] | null | null | null | MyApi/settings.py | CodeEnvironment/django-rest-framework-deploy-heroku | c6ffb20961c193b0f4dc1289de904b5d6750f335 | [
"MIT"
] | 1 | 2022-01-23T15:09:59.000Z | 2022-01-23T15:09:59.000Z | """
Django settings for MyApi project.
Generated by 'django-admin startproject' using Django 2.2.5.
For more information on this file, see
https://docs.djangoproject.com/en/2.2/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/2.2/ref/settings/
"""
import os
from... | 26.605128 | 91 | 0.694873 |
79404b9091f4c9236ab4474e061ef2151e98c910 | 66 | py | Python | kpi/unical_accounts/__init__.py | UniversitaDellaCalabria/kpiManagement | d045a464298e17f50e005b89ba3b71e53d57f368 | [
"Apache-2.0"
] | null | null | null | kpi/unical_accounts/__init__.py | UniversitaDellaCalabria/kpiManagement | d045a464298e17f50e005b89ba3b71e53d57f368 | [
"Apache-2.0"
] | null | null | null | kpi/unical_accounts/__init__.py | UniversitaDellaCalabria/kpiManagement | d045a464298e17f50e005b89ba3b71e53d57f368 | [
"Apache-2.0"
] | 1 | 2022-03-28T10:48:38.000Z | 2022-03-28T10:48:38.000Z | default_app_config = 'unical_accounts.apps.Unical_AccountsConfig'
| 33 | 65 | 0.878788 |
79404bc719dededb5333373b2d7cb689679a62f2 | 4,414 | py | Python | Database.py | itsp300/attendance_facial_recognition | 0f49998ebbe35d350443c2f0b7e24060635066ee | [
"MIT"
] | null | null | null | Database.py | itsp300/attendance_facial_recognition | 0f49998ebbe35d350443c2f0b7e24060635066ee | [
"MIT"
] | null | null | null | Database.py | itsp300/attendance_facial_recognition | 0f49998ebbe35d350443c2f0b7e24060635066ee | [
"MIT"
] | null | null | null | import sqlite3
from sqlite3 import Error
def convert_tuple(tup):
str = ''.join(tup)
return str
# Database Connection
def create_connection(db_file):
""" create a database connection to the SQLite database
specified by db_file
:param db_file: database file
:return: Connection object or No... | 23.604278 | 102 | 0.624377 |
79404c4690837cc329e0c0abc1e55e7e455117c9 | 3,628 | py | Python | src/oci/application_migration/models/occ_authorization_details.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 249 | 2017-09-11T22:06:05.000Z | 2022-03-04T17:09:29.000Z | src/oci/application_migration/models/occ_authorization_details.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 228 | 2017-09-11T23:07:26.000Z | 2022-03-23T10:58:50.000Z | src/oci/application_migration/models/occ_authorization_details.py | Manny27nyc/oci-python-sdk | de60b04e07a99826254f7255e992f41772902df7 | [
"Apache-2.0",
"BSD-3-Clause"
] | 224 | 2017-09-27T07:32:43.000Z | 2022-03-25T16:55:42.000Z | # coding: utf-8
# Copyright (c) 2016, 2021, Oracle and/or its affiliates. All rights reserved.
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may c... | 32.392857 | 245 | 0.649118 |
79404ce563c06205e2c0278cee59f5bcd539811e | 8,754 | py | Python | tensorflow/python/eager/wrap_function_test.py | Sonata-Wang/tensorflow | 8bbef0cd77879d05ed69bf30e76087847a8ca4a2 | [
"Apache-2.0"
] | 6 | 2019-02-05T22:36:51.000Z | 2022-01-14T03:50:57.000Z | tensorflow/python/eager/wrap_function_test.py | YaoYaoZhi/tensorflow | 83903c9dd9b5235996ec9158c30a1607fcfb4c73 | [
"Apache-2.0"
] | 1 | 2019-09-14T04:40:07.000Z | 2020-11-18T18:16:17.000Z | tensorflow/python/eager/wrap_function_test.py | YaoYaoZhi/tensorflow | 83903c9dd9b5235996ec9158c30a1607fcfb4c73 | [
"Apache-2.0"
] | 8 | 2016-01-14T13:12:56.000Z | 2021-04-09T10:20:53.000Z | # Copyright 2018 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... | 33.285171 | 80 | 0.68186 |
79404d2942ec5d9462b5487f391faa75c03bccf8 | 3,694 | py | Python | hyver/config.py | retr0h/hyver | e17a95d97e43afa2e99dce5a7b2619a1ce330654 | [
"MIT"
] | null | null | null | hyver/config.py | retr0h/hyver | e17a95d97e43afa2e99dce5a7b2619a1ce330654 | [
"MIT"
] | null | null | null | hyver/config.py | retr0h/hyver | e17a95d97e43afa2e99dce5a7b2619a1ce330654 | [
"MIT"
] | null | null | null | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2017 John Dewey
#
# 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 t... | 26.198582 | 78 | 0.65647 |
79404dfda67b660f3ddd2b100b101a59af8f25f0 | 1,053 | py | Python | simulator/routers/NwcLeastEnergyRouter.py | seakers/dtnsim | 9ea1da84e0565d97b3ea184facb597302bf4d99e | [
"Apache-2.0"
] | 4 | 2020-03-06T19:39:08.000Z | 2022-02-22T13:12:36.000Z | simulator/routers/NwcLeastEnergyRouter.py | seakers/dtnsim | 9ea1da84e0565d97b3ea184facb597302bf4d99e | [
"Apache-2.0"
] | null | null | null | simulator/routers/NwcLeastEnergyRouter.py | seakers/dtnsim | 9ea1da84e0565d97b3ea184facb597302bf4d99e | [
"Apache-2.0"
] | 2 | 2021-07-30T14:09:20.000Z | 2022-02-27T10:28:58.000Z | """
# ==================================================================================
# Author: Marc Sanchez Net
# Date: 03/25/2019
# Copyright (c) 2019, Jet Propulsion Laboratory.
# ==================================================================================
"""
from simulator.routers.NwcAbstractOpportunis... | 37.607143 | 84 | 0.475783 |
79404f7fb1104f10432017b9800a40a63783ac61 | 7,173 | py | Python | CMSIS/CoreValidation/Tests/builder.py | DavidLesnjak/CMSIS_5 | e0848410d137758a3356a5ee94ca4501cea708a8 | [
"Apache-2.0"
] | 2,293 | 2016-02-25T06:47:33.000Z | 2022-03-29T16:44:02.000Z | CMSIS/CoreValidation/Tests/builder.py | DavidLesnjak/CMSIS_5 | e0848410d137758a3356a5ee94ca4501cea708a8 | [
"Apache-2.0"
] | 1,125 | 2016-02-27T09:56:01.000Z | 2022-03-31T13:57:05.000Z | CMSIS/CoreValidation/Tests/builder.py | DavidLesnjak/CMSIS_5 | e0848410d137758a3356a5ee94ca4501cea708a8 | [
"Apache-2.0"
] | 1,160 | 2016-02-27T09:06:10.000Z | 2022-03-31T19:06:24.000Z | #! python
import os
import shutil
import sys
from datetime import datetime
from buildutils.builder import Device, Compiler, Axis, Step, BuildStep, RunModelStep, Builder, Filter
OPTIMIZATION = [ 'O1', 'O2', 'Ofast', 'Os', 'Oz' ]
CC_OPT = {
Compiler.AC5: {
'O1': 'O0',
'O2': 'O1',
'Ofast': 'Otime',
... | 45.980769 | 168 | 0.615921 |
794050fbef34ae04c9cdb6df07766c2e62ac1d7c | 15,664 | py | Python | framework/PostProcessors/LimitSurfaceIntegral.py | milljm/raven | 5f29fe81b75e2ffbeb54a55aa63647e7b2f6457b | [
"Apache-2.0"
] | null | null | null | framework/PostProcessors/LimitSurfaceIntegral.py | milljm/raven | 5f29fe81b75e2ffbeb54a55aa63647e7b2f6457b | [
"Apache-2.0"
] | null | null | null | framework/PostProcessors/LimitSurfaceIntegral.py | milljm/raven | 5f29fe81b75e2ffbeb54a55aa63647e7b2f6457b | [
"Apache-2.0"
] | null | null | null | # Copyright 2017 Battelle Energy Alliance, LLC
#
# 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 t... | 49.88535 | 209 | 0.683797 |
79405402c3e6a991d39a4ae082a2039ff549ebd1 | 1,204 | py | Python | mfanalysis/utils.py | omardrwch/mfanalysis | 36c00e0d4ee346bb6dddc5776a86c8c2ebd4501a | [
"MIT"
] | 3 | 2019-04-11T15:38:25.000Z | 2021-04-16T16:30:34.000Z | mfanalysis/utils.py | omardrwch/mfanalysis | 36c00e0d4ee346bb6dddc5776a86c8c2ebd4501a | [
"MIT"
] | null | null | null | mfanalysis/utils.py | omardrwch/mfanalysis | 36c00e0d4ee346bb6dddc5776a86c8c2ebd4501a | [
"MIT"
] | 3 | 2018-07-09T07:28:33.000Z | 2021-07-26T12:40:52.000Z | from __future__ import print_function
from __future__ import unicode_literals
import numpy as np
class Utils:
def __init__(self):
pass
def linear_regression(self, x, y, nj, return_variance = False):
"""
Performs a (weighted or not) linear regression.
Finds 'a' that minimizes t... | 24.571429 | 67 | 0.527409 |
7940546813233f6d66e3857eb7b0e4b6a37afdca | 3,425 | py | Python | MindFuck/mindfuck.py | tixcode/mindfuck | 9737318a246c49adcda5b02596677cb0964189ce | [
"MIT"
] | 2 | 2021-12-25T18:16:16.000Z | 2022-01-10T10:38:43.000Z | MindFuck/mindfuck.py | tixcode/mindfuck | 9737318a246c49adcda5b02596677cb0964189ce | [
"MIT"
] | 5 | 2021-12-25T18:24:06.000Z | 2022-01-05T16:48:27.000Z | MindFuck/mindfuck.py | tixcode/mindfuck | 9737318a246c49adcda5b02596677cb0964189ce | [
"MIT"
] | 2 | 2021-12-25T18:25:50.000Z | 2022-01-10T10:37:24.000Z | import sys
import time
import random
from colorama import init, Fore, Style, Back
init(autoreset=True)
def Error(text: str):
print(text)
input('Click enter to exit from a program...')
exit()
def AnimationPrinting(text: str, secs: int):
for symbol in text:
print(symbol, flush=T... | 31.136364 | 71 | 0.434161 |
7940550e80aff2bcb75224d7d73b2c77ed4502da | 4,255 | py | Python | pysnmp/MITEL-APPLICATION-PLATFORM-LIST-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 11 | 2021-02-02T16:27:16.000Z | 2021-08-31T06:22:49.000Z | pysnmp/MITEL-APPLICATION-PLATFORM-LIST-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 75 | 2021-02-24T17:30:31.000Z | 2021-12-08T00:01:18.000Z | pysnmp/MITEL-APPLICATION-PLATFORM-LIST-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module MITEL-APPLICATION-PLATFORM-LIST-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/MITEL-APPLICATION-PLATFORM-LIST-MIB
# Produced by pysmi-0.3.4 at Mon Apr 29 20:02:47 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Usi... | 111.973684 | 781 | 0.818566 |
7940559c5cf0e4c3ea348b0cb733fd0ed2504a58 | 655 | py | Python | Day 14/day14pt1.py | sjgg555/aoc2021 | bf3a84a85949b65558a749aa0b39fb5b79b850ac | [
"MIT"
] | null | null | null | Day 14/day14pt1.py | sjgg555/aoc2021 | bf3a84a85949b65558a749aa0b39fb5b79b850ac | [
"MIT"
] | null | null | null | Day 14/day14pt1.py | sjgg555/aoc2021 | bf3a84a85949b65558a749aa0b39fb5b79b850ac | [
"MIT"
] | null | null | null | from day14data import simple_test_data, data
import numpy as np
from collections import Counter
#data = simple_test_data
steps = 10
template = data[0]
start, end = np.array(data[1]).T
result = template
for step in range(steps):
step_result = ""
for i in range(len(result)):
search = result[i:i+2]
... | 24.259259 | 49 | 0.630534 |
79405802e7a7590ab33eddf60b69888db5266694 | 6,677 | py | Python | apidocs/retrieve.py | gabeorlanski/external-knowledge-codegen | 3e1e3581f5774ca51d79c97e768eb5227e7e3dba | [
"Apache-2.0"
] | 80 | 2020-04-17T06:16:40.000Z | 2022-02-16T13:24:48.000Z | apidocs/retrieve.py | gabeorlanski/external-knowledge-codegen | 3e1e3581f5774ca51d79c97e768eb5227e7e3dba | [
"Apache-2.0"
] | 5 | 2020-06-17T14:55:15.000Z | 2021-11-05T11:56:46.000Z | apidocs/retrieve.py | gabeorlanski/external-knowledge-codegen | 3e1e3581f5774ca51d79c97e768eb5227e7e3dba | [
"Apache-2.0"
] | 10 | 2020-05-03T13:00:03.000Z | 2021-08-20T04:13:06.000Z | from typing import List
import json
import pprint
import sys
import argparse
import re
from tqdm import tqdm
import string
from collections import defaultdict
from elasticsearch import Elasticsearch
import operator
import numpy as np
import pickle
#PUNCT_TO_SPACE = dict(zip(list(string.punctuation), list(' ' * len(str... | 34.958115 | 104 | 0.608357 |
7940586ccde2d4f0a7c00043081106645ab0a735 | 1,380 | py | Python | web-simple/setup.py | lightyeare/FrameworkBenchmarks | 40489856a0480c85227993d91de7d66e9224f8b4 | [
"BSD-3-Clause"
] | 1 | 2015-01-28T07:11:03.000Z | 2015-01-28T07:11:03.000Z | web-simple/setup.py | lightyeare/FrameworkBenchmarks | 40489856a0480c85227993d91de7d66e9224f8b4 | [
"BSD-3-Clause"
] | null | null | null | web-simple/setup.py | lightyeare/FrameworkBenchmarks | 40489856a0480c85227993d91de7d66e9224f8b4 | [
"BSD-3-Clause"
] | null | null | null | import subprocess
import sys
import setup_util
from os.path import expanduser
import os
import getpass
home = expanduser("~")
def start(args, logfile, errfile):
setup_util.replace_text("web-simple/app.pl", "localhost", ""+ args.database_host +"")
setup_util.replace_text("web-simple/nginx.conf", "USR", getpass.get... | 41.818182 | 243 | 0.707971 |
79405994839fdb115af61becdee41c3d80eb69dc | 6,581 | py | Python | gcn/utils.py | alisure-fork/gcn | 4b7b64f941b89647f1ae9aa1f6a0e4276dbdf0d7 | [
"MIT"
] | null | null | null | gcn/utils.py | alisure-fork/gcn | 4b7b64f941b89647f1ae9aa1f6a0e4276dbdf0d7 | [
"MIT"
] | null | null | null | gcn/utils.py | alisure-fork/gcn | 4b7b64f941b89647f1ae9aa1f6a0e4276dbdf0d7 | [
"MIT"
] | null | null | null | import numpy as np
import pickle as pkl
import networkx as nx
import scipy.sparse as sp
from scipy.sparse.linalg.eigen.arpack import eigsh
import sys
def parse_index_file(filename):
"""Parse index file."""
index = []
for line in open(filename):
index.append(int(line.strip()))
return index
de... | 38.711765 | 115 | 0.683483 |
794059bfda0780c283b4a8d86ab6f3d41fc92a15 | 635 | py | Python | etl/parsers/etw/Microsoft_Windows_Video_For_Windows.py | IMULMUL/etl-parser | 76b7c046866ce0469cd129ee3f7bb3799b34e271 | [
"Apache-2.0"
] | 104 | 2020-03-04T14:31:31.000Z | 2022-03-28T02:59:36.000Z | etl/parsers/etw/Microsoft_Windows_Video_For_Windows.py | IMULMUL/etl-parser | 76b7c046866ce0469cd129ee3f7bb3799b34e271 | [
"Apache-2.0"
] | 7 | 2020-04-20T09:18:39.000Z | 2022-03-19T17:06:19.000Z | etl/parsers/etw/Microsoft_Windows_Video_For_Windows.py | IMULMUL/etl-parser | 76b7c046866ce0469cd129ee3f7bb3799b34e271 | [
"Apache-2.0"
] | 16 | 2020-03-05T18:55:59.000Z | 2022-03-01T10:19:28.000Z | # -*- coding: utf-8 -*-
"""
Microsoft-Windows-Video-For-Windows
GUID : 712abb2d-d806-4b42-9682-26da01d8b307
"""
from construct import Int8sl, Int8ul, Int16ul, Int16sl, Int32sl, Int32ul, Int64sl, Int64ul, Bytes, Double, Float32l, Struct
from etl.utils import WString, CString, SystemTime, Guid
from etl.dtyp import Sid
fr... | 31.75 | 123 | 0.725984 |
794059d85cb8078a7f803daa4412795b336239a5 | 5,309 | py | Python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_site_link_connections_operations.py | xolve/azure-sdk-for-python | 9f5baa19c392f77f811d936ee43450e4ea524002 | [
"MIT"
] | 2,728 | 2015-01-09T10:19:32.000Z | 2022-03-31T14:50:33.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_site_link_connections_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 17,773 | 2015-01-05T15:57:17.000Z | 2022-03-31T23:50:25.000Z | sdk/network/azure-mgmt-network/azure/mgmt/network/v2021_05_01/operations/_vpn_site_link_connections_operations.py | v-xuto/azure-sdk-for-python | 9c6296d22094c5ede410bc83749e8df8694ccacc | [
"MIT"
] | 1,916 | 2015-01-19T05:05:41.000Z | 2022-03-31T19:36:44.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 ... | 46.982301 | 238 | 0.685628 |
79405a7c0f95b1d632c407fa0cb26435255eaed2 | 552 | py | Python | virtual/lib/python3.8/site-packages/rest_framework/authtoken/migrations/0003_tokenproxy.py | ShirQUillE-SandE/the-neighborhood-101 | fda09cb0481d1cd902f5e13b7ed61ed96772121d | [
"MIT"
] | 17,395 | 2017-03-31T21:13:13.000Z | 2022-03-31T21:33:13.000Z | virtual/lib/python3.8/site-packages/rest_framework/authtoken/migrations/0003_tokenproxy.py | ShirQUillE-SandE/the-neighborhood-101 | fda09cb0481d1cd902f5e13b7ed61ed96772121d | [
"MIT"
] | 2,983 | 2017-03-31T14:43:26.000Z | 2022-03-31T20:34:23.000Z | virtual/lib/python3.8/site-packages/rest_framework/authtoken/migrations/0003_tokenproxy.py | ShirQUillE-SandE/the-neighborhood-101 | fda09cb0481d1cd902f5e13b7ed61ed96772121d | [
"MIT"
] | 5,159 | 2017-03-31T15:06:32.000Z | 2022-03-31T03:25:17.000Z | # Generated by Django 3.1.1 on 2020-09-28 09:34
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('authtoken', '0002_auto_20160226_1747'),
]
operations = [
migrations.CreateModel(
name='TokenProxy',
fields=[
],
... | 21.230769 | 49 | 0.471014 |
79405adb54b06f79a03d63496cdce160d8ad5b7c | 1,052 | py | Python | ci/dropbox_upload.py | swistakm/pyrilla | 43ceed4e2500ee9aa352446fd7a9552466b66aed | [
"BSD-3-Clause"
] | 9 | 2016-03-31T15:28:00.000Z | 2021-11-18T23:41:01.000Z | ci/dropbox_upload.py | swistakm/pyrilla | 43ceed4e2500ee9aa352446fd7a9552466b66aed | [
"BSD-3-Clause"
] | 7 | 2015-10-19T15:13:26.000Z | 2016-10-29T14:17:20.000Z | ci/dropbox_upload.py | swistakm/pyrilla | 43ceed4e2500ee9aa352446fd7a9552466b66aed | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Script for uploading securely built distributions (artifacts) to private
Dropbox directory.
Dropbox authorization token should be provided only as environment variable
in a secure form. In case of CI systems (AppVeyor, Travis CI) this should
be provided as encrypted value in CI configuration... | 30.941176 | 75 | 0.692966 |
79405b182dd33f0ca98116738f83470cc051fffe | 768 | py | Python | desktop/core/ext-py/cx_Oracle-6.4.1/samples/PLSQLProcedure.py | yetsun/hue | 2e48f0cc70e233ee0e1b40733d4b2a18d8836c66 | [
"Apache-2.0"
] | 5,079 | 2015-01-01T03:39:46.000Z | 2022-03-31T07:38:22.000Z | desktop/core/ext-py/cx_Oracle-6.4.1/samples/PLSQLProcedure.py | yetsun/hue | 2e48f0cc70e233ee0e1b40733d4b2a18d8836c66 | [
"Apache-2.0"
] | 1,623 | 2015-01-01T08:06:24.000Z | 2022-03-30T19:48:52.000Z | desktop/core/ext-py/cx_Oracle-6.4.1/samples/PLSQLProcedure.py | yetsun/hue | 2e48f0cc70e233ee0e1b40733d4b2a18d8836c66 | [
"Apache-2.0"
] | 2,033 | 2015-01-04T07:18:02.000Z | 2022-03-28T19:55:47.000Z | #------------------------------------------------------------------------------
# Copyright 2016, 2017, Oracle and/or its affiliates. All rights reserved.
#------------------------------------------------------------------------------
#------------------------------------------------------------------------------
# PL... | 32 | 79 | 0.454427 |
79405b79fd7199cc6ffdc946ac38611a6d1bfced | 11,616 | py | Python | diffusion/sampling.py | crowsonkb/v-diffusion-pytorch | 93b6a54986d8259837a100046777fba52d812554 | [
"MIT"
] | 393 | 2021-12-16T19:44:36.000Z | 2022-03-31T02:30:30.000Z | diffusion/sampling.py | crowsonkb/v-diffusion-pytorch | 93b6a54986d8259837a100046777fba52d812554 | [
"MIT"
] | 13 | 2021-12-21T11:14:37.000Z | 2022-03-29T14:29:59.000Z | diffusion/sampling.py | crowsonkb/v-diffusion-pytorch | 93b6a54986d8259837a100046777fba52d812554 | [
"MIT"
] | 59 | 2021-12-16T23:35:34.000Z | 2022-03-25T22:59:58.000Z | import torch
from tqdm.auto import trange
from . import utils
# DDPM/DDIM sampling
@torch.no_grad()
def sample(model, x, steps, eta, extra_args, callback=None):
"""Draws samples from a model given starting noise."""
ts = x.new_ones([x.shape[0]])
# Create the noise schedule
alphas, sigmas = utils.t_... | 37.230769 | 105 | 0.600723 |
79405bb96bdb046d9f64950346ad004a8e71615b | 15,780 | py | Python | symbolic_slimshot/ind_union_open.py | sunyi000/SafeLearner | bf93268c9107f3404696b9212accaace1a0e76ee | [
"Apache-2.0"
] | 6 | 2019-10-03T04:18:17.000Z | 2020-12-18T16:13:34.000Z | symbolic_slimshot/ind_union_open.py | sunyi000/SafeLearner | bf93268c9107f3404696b9212accaace1a0e76ee | [
"Apache-2.0"
] | null | null | null | symbolic_slimshot/ind_union_open.py | sunyi000/SafeLearner | bf93268c9107f3404696b9212accaace1a0e76ee | [
"Apache-2.0"
] | 2 | 2019-10-16T21:13:04.000Z | 2022-02-02T14:00:54.000Z | import itertools
from symbolic_slimshot import algorithm
class IndependentUnion(object):
def __init__(self, query, subqueries, init=True):
self.query = query
self.subqueries = subqueries
self.genericConstantStr = None
self.genericIdentifiers = set()
self.usedSeparatorVars ... | 39.748111 | 93 | 0.557098 |
79405e254c2200450a3d39c76dfc5483134ea245 | 286 | py | Python | _modules/urls/handler404/views.py | looking-for-a-job/django-examples | dfafa450668cac5c0351f6c7238b8886511229bf | [
"Unlicense"
] | null | null | null | _modules/urls/handler404/views.py | looking-for-a-job/django-examples | dfafa450668cac5c0351f6c7238b8886511229bf | [
"Unlicense"
] | null | null | null | _modules/urls/handler404/views.py | looking-for-a-job/django-examples | dfafa450668cac5c0351f6c7238b8886511229bf | [
"Unlicense"
] | null | null | null | #!/usr/bin/env python
from django.http import HttpResponse, HttpResponseNotFound
def my_view(request):
return HttpResponse('hello world')
def handler404(request, *args, **kwargs):
"""works only with DEBUG = False
"""
return HttpResponseNotFound("handler404 output")
| 22 | 58 | 0.723776 |
79405f9a201ac2c9e8bed737e48a2c8f319fa462 | 15,537 | py | Python | notebooks/01_dynamic_bernoulli/src/models.py | jfilter/ptf | 94e76a6f26344ba37c41793523e70ba75863c5c0 | [
"MIT"
] | 10 | 2020-05-20T07:25:21.000Z | 2021-05-20T15:14:55.000Z | notebooks/01_dynamic_bernoulli/src/models.py | jfilter/ptf | 94e76a6f26344ba37c41793523e70ba75863c5c0 | [
"MIT"
] | null | null | null | notebooks/01_dynamic_bernoulli/src/models.py | jfilter/ptf | 94e76a6f26344ba37c41793523e70ba75863c5c0 | [
"MIT"
] | 2 | 2020-04-28T15:07:41.000Z | 2021-05-06T14:30:01.000Z | import numpy as np
import os
import pickle
import tensorflow as tf
from tensorflow.contrib.distributions import Normal, Bernoulli
from tensorflow.contrib.tensorboard.plugins import projector
from sklearn.manifold import TSNE
from utils import *
class emb_model(object):
def __init__(self, args, d, logdir):
... | 45.165698 | 165 | 0.557765 |
79406056abb80590dc0ab387cab25bc8240864a5 | 668 | py | Python | startup.py | ruthogunnnaike/SeeSec---IoT-Vulnerablity-Scanner | d2186421607af0ef3351b7d95c2478c4ac307931 | [
"MIT"
] | 7 | 2017-09-09T06:16:16.000Z | 2020-12-23T09:00:23.000Z | startup.py | eshcrow/SeeSec---IoT-Vulnerablity-Scanner | d2186421607af0ef3351b7d95c2478c4ac307931 | [
"MIT"
] | null | null | null | startup.py | eshcrow/SeeSec---IoT-Vulnerablity-Scanner | d2186421607af0ef3351b7d95c2478c4ac307931 | [
"MIT"
] | 6 | 2018-05-12T10:07:42.000Z | 2021-12-06T15:24:17.000Z |
def launch():
def launch():
from pox.log.level import launch
launch(DEBUG=True)
from pox.misc.firewall import launch
launch()
from pox.openflow.keepalive import launch
launch(interval=300)
from pox.forwarding.l3_learning import launch
launch()
... | 20.875 | 56 | 0.615269 |
7940610d4644daf2201af34e4208b17352066110 | 2,242 | py | Python | utils/transforms.py | Vaden4d/logo-classifier | 18c397e52352da8e79868158123c13bf0417130f | [
"MIT"
] | null | null | null | utils/transforms.py | Vaden4d/logo-classifier | 18c397e52352da8e79868158123c13bf0417130f | [
"MIT"
] | null | null | null | utils/transforms.py | Vaden4d/logo-classifier | 18c397e52352da8e79868158123c13bf0417130f | [
"MIT"
] | null | null | null | import albumentations as A
from albumentations.pytorch.transforms import ToTensor
def get_train_transform(img_size):
train_transform = A.Compose([
A.Resize(img_size, img_size),
A.Transpose(p=0.5),
A.HorizontalFlip(p=0.5),
A.VerticalFlip(p=0.5),
A.ShiftSc... | 41.518519 | 109 | 0.417484 |
79406127fb3bf05f843e8c62030aa53b6c0230fb | 13,045 | py | Python | testscripts/RDKB/component/LOG_AGENT/TS_LOGAGENT_CM_DisableLog.py | rdkcmf/rdkb-tools-tdkb | 9f9c3600cd701d5fc90ac86a6394ebd28d49267e | [
"Apache-2.0"
] | null | null | null | testscripts/RDKB/component/LOG_AGENT/TS_LOGAGENT_CM_DisableLog.py | rdkcmf/rdkb-tools-tdkb | 9f9c3600cd701d5fc90ac86a6394ebd28d49267e | [
"Apache-2.0"
] | null | null | null | testscripts/RDKB/component/LOG_AGENT/TS_LOGAGENT_CM_DisableLog.py | rdkcmf/rdkb-tools-tdkb | 9f9c3600cd701d5fc90ac86a6394ebd28d49267e | [
"Apache-2.0"
] | null | null | null | ##########################################################################
# If not stated otherwise in this file or this component's Licenses.txt
# file the following copyright and licenses apply:
#
# Copyright 2019 RDK Management
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use th... | 46.92446 | 191 | 0.637792 |
7940619aeb9c124198d0f9756ba3f9e76d368a6e | 193 | py | Python | 020-Transaction Atomicity/core/urls.py | karuvally/Django-ORM-Mastery-DJ003 | 5792d717185b231449d41bd4ef82d6b4367d4722 | [
"MIT"
] | 33 | 2021-06-08T21:49:24.000Z | 2022-03-06T22:31:59.000Z | 020-Transaction Atomicity/core/urls.py | WilliamOtieno/Django-ORM-Mastery-DJ003 | 0eca2d2408bfc1112b7092fbdce1c5f188a428d3 | [
"MIT"
] | null | null | null | 020-Transaction Atomicity/core/urls.py | WilliamOtieno/Django-ORM-Mastery-DJ003 | 0eca2d2408bfc1112b7092fbdce1c5f188a428d3 | [
"MIT"
] | 33 | 2021-06-09T12:43:17.000Z | 2022-03-29T08:16:12.000Z | from django.contrib import admin
from django.urls import path
from bank import views
urlpatterns = [
path('admin/', admin.site.urls),
path('', views.process_payment, name='payment')
]
| 21.444444 | 51 | 0.720207 |
794061aed042e6ccc9ba6c6f7f48b97ef51c9585 | 5,008 | py | Python | tests_samoa/table_tools/plot_data.py | chameleon-hpc/chameleon-scripts | 67c22be72b436395384dd9d83ef05a3397a851ee | [
"BSD-3-Clause"
] | null | null | null | tests_samoa/table_tools/plot_data.py | chameleon-hpc/chameleon-scripts | 67c22be72b436395384dd9d83ef05a3397a851ee | [
"BSD-3-Clause"
] | null | null | null | tests_samoa/table_tools/plot_data.py | chameleon-hpc/chameleon-scripts | 67c22be72b436395384dd9d83ef05a3397a851ee | [
"BSD-3-Clause"
] | null | null | null | import sys
import getopt
import matplotlib.pyplot as plt
import matplotlib
import os
from filter_csv import *
markers_times = 'x'
markers_efficiency = 'o'
markers_imbalance = 'o'
colors = ['#1f77b4','#ff7f0e','#2ca02c']
def plot_speedup_curve(ax,x,base_time, times, label, marker):
speedups = [ base_time/t for t in... | 27.516484 | 125 | 0.678514 |
794061dd8e2e069a2b1b07504dfb10633bf7e7fb | 458 | py | Python | plotly/validators/layout/annotation/_name.py | gnestor/plotly.py | a8ae062795ddbf9867b8578fe6d9e244948c15ff | [
"MIT"
] | 12 | 2020-04-18T18:10:22.000Z | 2021-12-06T10:11:15.000Z | plotly/validators/layout/annotation/_name.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 27 | 2020-04-28T21:23:12.000Z | 2021-06-25T15:36:38.000Z | plotly/validators/layout/annotation/_name.py | Vesauza/plotly.py | e53e626d59495d440341751f60aeff73ff365c28 | [
"MIT"
] | 6 | 2020-04-18T23:07:08.000Z | 2021-11-18T07:53:06.000Z | import _plotly_utils.basevalidators
class NameValidator(_plotly_utils.basevalidators.StringValidator):
def __init__(
self, plotly_name='name', parent_name='layout.annotation', **kwargs
):
super(NameValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_... | 28.625 | 75 | 0.631004 |
794062c29ab6f35aee4a6a6cf2a457ad8f8e5047 | 739 | py | Python | LeetCode/randomPickInteger.py | johanaluna/DataScience_summary | a365728b81a38f31a28e97666252910a23732936 | [
"MIT"
] | null | null | null | LeetCode/randomPickInteger.py | johanaluna/DataScience_summary | a365728b81a38f31a28e97666252910a23732936 | [
"MIT"
] | null | null | null | LeetCode/randomPickInteger.py | johanaluna/DataScience_summary | a365728b81a38f31a28e97666252910a23732936 | [
"MIT"
] | null | null | null | import random
class Solution:
def __init__(self, w):
self.w = w
self.suma = sum(self.w[0][0])
self.sumAdded = [sum(self.w[0][0][0:x:1]) for x in range(1, len(self.w[0][0])+1)]
print(self.suma)
def pickIndex(self):
sln = []
sln.append('null')
i = 0
... | 25.482759 | 89 | 0.484438 |
7940637ce5ec1ee14232e7da8a7211b8b00b36e9 | 3,103 | py | Python | samples/client/petstore/python-experimental/petstore_api/models/dog_all_of.py | jaumard/openapi-generator | 239d68df3644cb0b60547184b7f0db17835940d3 | [
"Apache-2.0"
] | 1 | 2021-02-17T00:02:17.000Z | 2021-02-17T00:02:17.000Z | samples/client/petstore/python-experimental/petstore_api/models/dog_all_of.py | jaumard/openapi-generator | 239d68df3644cb0b60547184b7f0db17835940d3 | [
"Apache-2.0"
] | 8 | 2020-07-18T08:19:47.000Z | 2022-02-26T18:06:57.000Z | samples/client/petstore/python-experimental/petstore_api/models/dog_all_of.py | jaumard/openapi-generator | 239d68df3644cb0b60547184b7f0db17835940d3 | [
"Apache-2.0"
] | 2 | 2020-09-30T13:01:22.000Z | 2020-09-30T15:20:55.000Z | # coding: utf-8
"""
OpenAPI Petstore
This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
"""
... | 25.434426 | 174 | 0.538511 |
7940638e1d7faf83eea4618a79cfc9a46b2aeba7 | 2,552 | py | Python | logger.py | keonlee9420/tacotron2_toolkit | fe0e19fdb00f2554d99b0f33e56d65a1d1956b86 | [
"BSD-3-Clause"
] | 4 | 2021-04-26T13:48:38.000Z | 2022-01-16T03:21:03.000Z | logger.py | keonlee9420/tacotron2_toolkit | fe0e19fdb00f2554d99b0f33e56d65a1d1956b86 | [
"BSD-3-Clause"
] | null | null | null | logger.py | keonlee9420/tacotron2_toolkit | fe0e19fdb00f2554d99b0f33e56d65a1d1956b86 | [
"BSD-3-Clause"
] | 1 | 2021-05-10T06:17:57.000Z | 2021-05-10T06:17:57.000Z | import random
import torch
from tensorboardX import SummaryWriter
from plotting_utils import plot_alignment_to_numpy, plot_spectrogram_to_numpy
from plotting_utils import plot_gate_outputs_to_numpy
class Tacotron2Logger(SummaryWriter):
def __init__(self, logdir, use_mmi, use_guided_attn_loss):
super(Tacot... | 44.77193 | 82 | 0.647335 |
794063de7e3d8f1d2af409b7c068184b15a8026a | 933 | py | Python | setup.py | Alex-Au1/Youtube_Downloader | 3ad7b39a11154b9a9fd205ad75ce58120cb3d9be | [
"MIT"
] | null | null | null | setup.py | Alex-Au1/Youtube_Downloader | 3ad7b39a11154b9a9fd205ad75ce58120cb3d9be | [
"MIT"
] | null | null | null | setup.py | Alex-Au1/Youtube_Downloader | 3ad7b39a11154b9a9fd205ad75ce58120cb3d9be | [
"MIT"
] | null | null | null | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="Youtube_Video_Audio_Downloader",
version="0.1.2",
author="Alex Au",
author_email="AlexXianZhenYuAu@gmail.com",
description="A Simple GUI interface to help download videos... | 30.096774 | 122 | 0.652733 |
7940640d339fc94448be179bb1d3a37e20fb0780 | 2,316 | py | Python | interpolate.py | fmu2/Wasserstein-BiGAN | db4f7f26da54f255cd38451721108f3a762ba3d4 | [
"MIT"
] | 27 | 2020-02-21T21:51:54.000Z | 2021-12-13T09:04:52.000Z | interpolate.py | fmu2/Wasserstein-BiGAN | db4f7f26da54f255cd38451721108f3a762ba3d4 | [
"MIT"
] | null | null | null | interpolate.py | fmu2/Wasserstein-BiGAN | db4f7f26da54f255cd38451721108f3a762ba3d4 | [
"MIT"
] | 3 | 2020-06-26T10:30:05.000Z | 2021-05-26T17:17:53.000Z | import argparse, torch
from torchvision import utils
from wali_celeba import create_WALI
NLAT = 100
IMAGE_SIZE = 64
NUM_CHANNELS = 3
def interpolate(generator, z0, z1, nintp=10, path='linear', filepath=None):
""" Interpolate in the latent space.
Args:
generator: Generator network that takes z as input.
... | 35.090909 | 101 | 0.668394 |
794064eb8445a456367b3cb76f3e5f2192abbc18 | 11,339 | py | Python | tests/ignite/engine/test_create_supervised.py | Devanshu24/ignite | 2f0ba3e65cfa36b43bc87b315733fd3f3585e430 | [
"BSD-3-Clause"
] | null | null | null | tests/ignite/engine/test_create_supervised.py | Devanshu24/ignite | 2f0ba3e65cfa36b43bc87b315733fd3f3585e430 | [
"BSD-3-Clause"
] | null | null | null | tests/ignite/engine/test_create_supervised.py | Devanshu24/ignite | 2f0ba3e65cfa36b43bc87b315733fd3f3585e430 | [
"BSD-3-Clause"
] | null | null | null | import os
from distutils.version import LooseVersion
from importlib.util import find_spec
from typing import Optional, Union
from unittest.mock import patch
import pytest
import torch
from pytest import approx
from torch.nn import Linear
from torch.nn.functional import mse_loss
from torch.optim import SGD
import igni... | 38.307432 | 116 | 0.723697 |
794065530fce3e787336c2f6b73bf1b196bc5b33 | 1,795 | py | Python | Encoder/encoder.py | mivallion/Encoder | 8887e741e7efdf03eebc04c01c1ae4f0e2e19809 | [
"MIT"
] | 6 | 2020-04-06T19:43:31.000Z | 2022-03-16T13:15:37.000Z | Encoder/encoder.py | mivallion/Encoder | 8887e741e7efdf03eebc04c01c1ae4f0e2e19809 | [
"MIT"
] | 2 | 2020-05-14T18:04:53.000Z | 2022-02-12T06:22:56.000Z | Encoder/encoder.py | mivallion/Encoder | 8887e741e7efdf03eebc04c01c1ae4f0e2e19809 | [
"MIT"
] | 3 | 2020-11-08T04:14:43.000Z | 2021-09-04T16:48:54.000Z | """
Encoder library for Raspberry Pi for measuring quadrature encoded signals.
created by Mivallion <mivallion@gmail.com>
Version 1.0 - 01 april 2020 - inital release
"""
import RPi.GPIO as GPIO
class Encoder(object):
"""
Encoder class allows to work with rotary encoder
which connected via two pin A and B... | 29.42623 | 74 | 0.581616 |
794065ca09a2bcb8887f0109f03afec58298f31f | 21,006 | py | Python | tests/components/google/test_calendar.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 1,635 | 2015-01-01T14:59:18.000Z | 2016-04-13T02:36:16.000Z | tests/components/google/test_calendar.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 1,463 | 2015-01-06T06:18:07.000Z | 2016-04-12T22:30:37.000Z | tests/components/google/test_calendar.py | liangleslie/core | cc807b4d597daaaadc92df4a93c6e30da4f570c6 | [
"Apache-2.0"
] | 659 | 2015-01-05T14:02:23.000Z | 2016-04-12T23:39:31.000Z | """The tests for the google calendar platform."""
from __future__ import annotations
import copy
import datetime
from http import HTTPStatus
from typing import Any
from unittest.mock import patch
import urllib
from aiohttp.client_exceptions import ClientError
from gcal_sync.auth import API_BASE_URL
import pytest
fr... | 31.683258 | 106 | 0.643054 |
794065e41b382fbb3f0d9667ca0b2741ce5c963c | 5,786 | py | Python | google/ads/google_ads/v6/proto/services/currency_constant_service_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v6/proto/services/currency_constant_service_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | google/ads/google_ads/v6/proto/services/currency_constant_service_pb2.py | arammaliachi/google-ads-python | a4fe89567bd43eb784410523a6306b5d1dd9ee67 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/ads/googleads/v6/services/currency_constant_service.proto
"""Generated protocol buffer code."""
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf i... | 55.104762 | 1,174 | 0.826132 |
794066193012be50d5678d01b5b1258cd575c17f | 3,879 | py | Python | data_ingest/utils.py | 18F/data-federation-ingest | a896ef2da1faf3966f018366b26a338bb66cc717 | [
"CC0-1.0"
] | 18 | 2019-07-26T13:43:01.000Z | 2022-01-15T14:57:52.000Z | data_ingest/utils.py | 18F/data-federation-ingest | a896ef2da1faf3966f018366b26a338bb66cc717 | [
"CC0-1.0"
] | 96 | 2019-06-14T18:30:54.000Z | 2021-08-03T09:25:02.000Z | data_ingest/utils.py | 18F/data-federation-ingest | a896ef2da1faf3966f018366b26a338bb66cc717 | [
"CC0-1.0"
] | 3 | 2020-01-23T04:48:18.000Z | 2021-01-12T09:31:20.000Z | import csv
import json
import io
import logging
from collections import OrderedDict
from django.utils.module_loading import import_string
from .ingest_settings import UPLOAD_SETTINGS
logger = logging.getLogger('ReVAL')
def get_schema_headers():
ordered_header = []
good_table_validator = 'data_ingest.ingesto... | 30.785714 | 107 | 0.642691 |
7940662f4859044199cd656698fa207ea21c5792 | 65,618 | py | Python | mindspore/ops/operations/_grad_ops.py | kanchenhao/mindspore | 020662240545603fb53407c81f53f2541710e85d | [
"Apache-2.0"
] | null | null | null | mindspore/ops/operations/_grad_ops.py | kanchenhao/mindspore | 020662240545603fb53407c81f53f2541710e85d | [
"Apache-2.0"
] | null | null | null | mindspore/ops/operations/_grad_ops.py | kanchenhao/mindspore | 020662240545603fb53407c81f53f2541710e85d | [
"Apache-2.0"
] | null | null | null | # Copyright 2020 Huawei Technologies Co., Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | 39.648338 | 119 | 0.651574 |
79406707be2da045747fa6070187c44ef0a6f386 | 3,312 | py | Python | HomeLab/polls/views.py | amalik18/HomeLab | b0d71f379e8628948ceb15bd776386a81a468558 | [
"MIT"
] | null | null | null | HomeLab/polls/views.py | amalik18/HomeLab | b0d71f379e8628948ceb15bd776386a81a468558 | [
"MIT"
] | null | null | null | HomeLab/polls/views.py | amalik18/HomeLab | b0d71f379e8628948ceb15bd776386a81a468558 | [
"MIT"
] | null | null | null | from django.shortcuts import render, get_object_or_404
from django.http import HttpResponse, HttpResponseRedirect
from django.template import loader
from django.shortcuts import render
from django.urls import reverse
from django.http import Http404
from django.utils import timezone
from django.views import generic
# C... | 34.5 | 116 | 0.688406 |
794068983f05db8990a9af23cebbdd282c752a1f | 159 | py | Python | tests/model_control/detailed/transf_RelativeDifference/model_control_one_enabled_RelativeDifference_Lag1Trend_NoCycle_MLP.py | shaido987/pyaf | b9afd089557bed6b90b246d3712c481ae26a1957 | [
"BSD-3-Clause"
] | 377 | 2016-10-13T20:52:44.000Z | 2022-03-29T18:04:14.000Z | tests/model_control/detailed/transf_RelativeDifference/model_control_one_enabled_RelativeDifference_Lag1Trend_NoCycle_MLP.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 160 | 2016-10-13T16:11:53.000Z | 2022-03-28T04:21:34.000Z | tests/model_control/detailed/transf_RelativeDifference/model_control_one_enabled_RelativeDifference_Lag1Trend_NoCycle_MLP.py | ysdede/pyaf | b5541b8249d5a1cfdc01f27fdfd99b6580ed680b | [
"BSD-3-Clause"
] | 63 | 2017-03-09T14:51:18.000Z | 2022-03-27T20:52:57.000Z | import tests.model_control.test_ozone_custom_models_enabled as testmod
testmod.build_model( ['RelativeDifference'] , ['Lag1Trend'] , ['NoCycle'] , ['MLP'] ); | 39.75 | 86 | 0.754717 |
79406a1e9454beef765d23ef6a4aad365ba03fff | 174,468 | py | Python | geostatspy/geostats.py | jessepisel/GeostatsPy | 239a2a04b67991393892f5c010635b75e2eac062 | [
"MIT"
] | null | null | null | geostatspy/geostats.py | jessepisel/GeostatsPy | 239a2a04b67991393892f5c010635b75e2eac062 | [
"MIT"
] | null | null | null | geostatspy/geostats.py | jessepisel/GeostatsPy | 239a2a04b67991393892f5c010635b75e2eac062 | [
"MIT"
] | 6 | 2020-03-27T01:57:58.000Z | 2020-04-07T13:20:18.000Z | """
This file includes the reimplementations of GSLIB functionality in Python. While
this code will not be as well-tested and robust as the original GSLIB, it does
provide the opportunity to build 2D spatial modeling projects in Python without
the need to rely on compiled Fortran code from GSLIB. If you want to use the... | 36.29457 | 203 | 0.537044 |
79406b7cda8ca3fd218970e93ffa1d81f600b07e | 6,473 | py | Python | burplist/settings.py | ngshiheng/burplist | 87c4340e63fde476b25c3e7674b9486e8225f87f | [
"MIT"
] | 7 | 2021-11-02T03:19:23.000Z | 2022-01-27T08:05:51.000Z | burplist/settings.py | ngshiheng/burplist | 87c4340e63fde476b25c3e7674b9486e8225f87f | [
"MIT"
] | 10 | 2021-11-10T08:20:50.000Z | 2022-03-04T15:23:25.000Z | burplist/settings.py | ngshiheng/burplist | 87c4340e63fde476b25c3e7674b9486e8225f87f | [
"MIT"
] | 2 | 2021-11-05T04:27:02.000Z | 2022-01-27T08:05:53.000Z | import copy
import os
import scrapy.utils.log
from colorlog import ColoredFormatter
# Logging
color_formatter = ColoredFormatter(
(
'%(log_color)s%(levelname)-5s%(reset)s '
'%(yellow)s[%(asctime)s]%(reset)s'
'%(white)s %(name)s %(funcName)s %(bold_purple)s:%(lineno)d%(reset)s '
'%(... | 35.961111 | 142 | 0.753283 |
79406d8a9ec8f1bc3d6fb34d910f38ae9615b95c | 11,044 | py | Python | src/cone/app/tests/test_browser_sharing.py | lenadax/cone.app | b25c55aedb85e45a962003d2767a22a927cc61c0 | [
"BSD-3-Clause"
] | 1 | 2022-03-13T17:51:09.000Z | 2022-03-13T17:51:09.000Z | src/cone/app/tests/test_browser_sharing.py | lenadax/cone.app | b25c55aedb85e45a962003d2767a22a927cc61c0 | [
"BSD-3-Clause"
] | 1 | 2021-08-06T08:12:00.000Z | 2021-08-06T08:12:00.000Z | src/cone/app/tests/test_browser_sharing.py | lenadax/cone.app | b25c55aedb85e45a962003d2767a22a927cc61c0 | [
"BSD-3-Clause"
] | null | null | null | from cone.app import testing
from cone.app.browser.ajax import ajax_tile
from cone.app.browser.sharing import sharing
from cone.app.model import BaseNode
from cone.app.testing.mock import SharingNode
from cone.tile import render_tile
from cone.tile.tests import TileTestCase
from pyramid.exceptions import HTTPForbidden
... | 35.625806 | 86 | 0.566099 |
79406dd14bfbd45c61739c40ecb835536a0f6344 | 498 | py | Python | env/lib/python3.8/site-packages/plotly/validators/layout/geo/_countrywidth.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 76 | 2020-07-06T14:44:05.000Z | 2022-02-14T15:30:21.000Z | env/lib/python3.8/site-packages/plotly/validators/layout/geo/_countrywidth.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-08-09T02:30:14.000Z | 2022-03-12T00:50:14.000Z | env/lib/python3.8/site-packages/plotly/validators/layout/geo/_countrywidth.py | acrucetta/Chicago_COVI_WebApp | a37c9f492a20dcd625f8647067394617988de913 | [
"MIT",
"Unlicense"
] | 11 | 2020-07-12T16:18:07.000Z | 2022-02-05T16:48:35.000Z | import _plotly_utils.basevalidators
class CountrywidthValidator(_plotly_utils.basevalidators.NumberValidator):
def __init__(self, plotly_name="countrywidth", parent_name="layout.geo", **kwargs):
super(CountrywidthValidator, self).__init__(
plotly_name=plotly_name,
parent_name=paren... | 35.571429 | 87 | 0.646586 |
79406e5aa1041afe982444b0c01b398016e8c98c | 1,626 | py | Python | venv/lib/python3.6/site-packages/phonenumbers/shortdata/region_US.py | exdeam/opencrm | dfdcfdf99f0b42eb3959171927cb6574583f5ee0 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/phonenumbers/shortdata/region_US.py | exdeam/opencrm | dfdcfdf99f0b42eb3959171927cb6574583f5ee0 | [
"MIT"
] | null | null | null | venv/lib/python3.6/site-packages/phonenumbers/shortdata/region_US.py | exdeam/opencrm | dfdcfdf99f0b42eb3959171927cb6574583f5ee0 | [
"MIT"
] | null | null | null | """Auto-generated file, do not edit by hand. US metadata"""
from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata
PHONE_METADATA_US = PhoneMetadata(id='US', country_code=None, international_prefix=None,
general_desc=PhoneNumberDesc(national_number_pattern='[1-9]\\d{2,5}', possible_length=(3, 4, ... | 116.142857 | 357 | 0.712177 |
79406f3d5b496f317119afa17d667f503dfcf6e7 | 480 | py | Python | demo/exclusive.py | abbudao/slides-pulsar | 178bc49a9a73efc55147a7143c39f2438981da2f | [
"MIT"
] | null | null | null | demo/exclusive.py | abbudao/slides-pulsar | 178bc49a9a73efc55147a7143c39f2438981da2f | [
"MIT"
] | null | null | null | demo/exclusive.py | abbudao/slides-pulsar | 178bc49a9a73efc55147a7143c39f2438981da2f | [
"MIT"
] | null | null | null | from pulsar import Client, ConsumerType
client = Client('pulsar://localhost:6650')
consumer = client.subscribe(
'persistent://public/default/tick',
'i-am-exclusive',
consumer_type=ConsumerType.Exclusive
)
while True:
msg = consumer.receive()
try:
data = msg.data().decode('utf-8')
p... | 24 | 63 | 0.670833 |
79406f497f2feb85887ffda612ec55e2d7bd746c | 934 | py | Python | python-katas/tests/test_console.py | rtimmons/katas | 70aab07385c80125209de4f6ee6021a6b8bbf521 | [
"MIT"
] | null | null | null | python-katas/tests/test_console.py | rtimmons/katas | 70aab07385c80125209de4f6ee6021a6b8bbf521 | [
"MIT"
] | null | null | null | python-katas/tests/test_console.py | rtimmons/katas | 70aab07385c80125209de4f6ee6021a6b8bbf521 | [
"MIT"
] | null | null | null | """Test cases for the console module."""
from unittest.mock import Mock
from click.testing import CliRunner
import pytest
from pytest_mock import MockFixture
import requests
from katas import console
@pytest.fixture
def runner() -> CliRunner:
"""Fixture for invoking command-line interfaces."""
return CliRun... | 26.685714 | 75 | 0.738758 |
79406fa62ec7b5536430f4eab04190ea7a4c5862 | 326 | py | Python | prediction_flow/transformers/column/tests/test_log_transformer.py | dydcfg/prediction-flow | 332068f521bba51acc8600fe72e36e92c331bef1 | [
"MIT"
] | 211 | 2019-08-02T23:04:40.000Z | 2022-03-18T06:36:25.000Z | prediction_flow/transformers/column/tests/test_log_transformer.py | dydcfg/prediction-flow | 332068f521bba51acc8600fe72e36e92c331bef1 | [
"MIT"
] | 18 | 2019-08-10T07:13:05.000Z | 2022-03-17T10:45:30.000Z | prediction_flow/transformers/column/tests/test_log_transformer.py | dydcfg/prediction-flow | 332068f521bba51acc8600fe72e36e92c331bef1 | [
"MIT"
] | 51 | 2019-08-02T23:04:41.000Z | 2021-12-24T02:48:58.000Z | import numpy as np
from prediction_flow.transformers.column import LogTransformer
def test_normal():
log_transformer = LogTransformer()
x = np.array([100, 10, 32])
log_transformer.fit(x)
np.testing.assert_array_almost_equal(
log_transformer.transform(x), np.array([4.615121, 2.397895, 3.4965... | 23.285714 | 79 | 0.723926 |
7940708b7c973ed49bebcb5ac4f45d85504d0a00 | 1,782 | py | Python | main.py | EH30/To-Do-List | 0a58c247bbd15f6828bcc8f72c334f67cc9f2b58 | [
"Unlicense"
] | null | null | null | main.py | EH30/To-Do-List | 0a58c247bbd15f6828bcc8f72c334f67cc9f2b58 | [
"Unlicense"
] | 1 | 2021-10-01T08:51:40.000Z | 2021-10-01T08:51:40.000Z | main.py | EH30/To-Do-List | 0a58c247bbd15f6828bcc8f72c334f67cc9f2b58 | [
"Unlicense"
] | 1 | 2021-10-01T08:10:21.000Z | 2021-10-01T08:10:21.000Z | import platform
import sys
import json
import todo
import tkinter
from tkinter.constants import RIGHT, BOTTOM
# Created By EH
# -----------------------
# this script was tested on python 3.9
if len(sys.argv) > 1:
if type(sys.argv[1]) == str and sys.argv[1] == "--reset":
with open("data.json"... | 27.415385 | 64 | 0.578002 |
7940709b9e9412b00c2c6325745e1775e6fb3b0f | 4,384 | py | Python | benchmark/startQiskit_noisy1591.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_noisy1591.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | benchmark/startQiskit_noisy1591.py | UCLA-SEAL/QDiff | d968cbc47fe926b7f88b4adf10490f1edd6f8819 | [
"BSD-3-Clause"
] | null | null | null | # qubit number=5
# total number=50
import cirq
import qiskit
from qiskit.providers.aer import QasmSimulator
from qiskit.test.mock import FakeVigo
from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister
from qiskit import BasicAer, execute, transpile
from pprint import pprint
from qiskit.test.mock import ... | 32.474074 | 82 | 0.619982 |
794070fb918a6fbe5d674ef6743f655648872977 | 2,688 | py | Python | lib/aws_utils.py | murkyl/ecs_meta_search | 0c02a5c1feece877c441569cc199424102ceca01 | [
"MIT"
] | 2 | 2019-06-05T04:43:54.000Z | 2020-07-15T05:49:57.000Z | lib/aws_utils.py | murkyl/ecs_meta_search | 0c02a5c1feece877c441569cc199424102ceca01 | [
"MIT"
] | null | null | null | lib/aws_utils.py | murkyl/ecs_meta_search | 0c02a5c1feece877c441569cc199424102ceca01 | [
"MIT"
] | 5 | 2020-02-21T22:47:35.000Z | 2022-02-03T15:21:39.000Z | import time
import datetime
import base64
import hmac
import hashlib
try:
from urllib import quote_plus, quote
except:
from urllib.parse import quote_plus, quote
S3_SIGNED_URL_FORMAT = '%(prot)s://%(bucket)s/%(endpoint)s/%(obj)s?AWSAccessKeyId=%(id)s&Expires=%(expires)d&Signature=%(sig)s'
ECS_SIGNED_URL_FORMAT... | 34.909091 | 128 | 0.65439 |
794071014fb04ef3d875d2960ac65e8c93ccfdc7 | 1,519 | py | Python | cifar10/trainer/discriminator.py | rahhul/GANs | cec9e2f81528099407b8a9d3dce2f1cf85e449be | [
"MIT"
] | null | null | null | cifar10/trainer/discriminator.py | rahhul/GANs | cec9e2f81528099407b8a9d3dce2f1cf85e449be | [
"MIT"
] | null | null | null | cifar10/trainer/discriminator.py | rahhul/GANs | cec9e2f81528099407b8a9d3dce2f1cf85e449be | [
"MIT"
] | null | null | null | # python3
import util
import tensorflow as tf
from tensorflow import keras
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Dense, Conv2D, Dropout, Flatten, LeakyReLU
from tensorflow.keras.layers import BatchNormalization
from tensorflow.keras.optimizers import Adam
from tensorflow.k... | 37.04878 | 95 | 0.706386 |
7940710a28ff00624d3b55dca33112c911249d56 | 8,654 | py | Python | manilaclient/common/cliutils.py | SolKuczala/python-manilaclient | 9613c7fd2652dc3c7b8793c9af2b6357f42a4757 | [
"CNRI-Python",
"Apache-1.1"
] | null | null | null | manilaclient/common/cliutils.py | SolKuczala/python-manilaclient | 9613c7fd2652dc3c7b8793c9af2b6357f42a4757 | [
"CNRI-Python",
"Apache-1.1"
] | null | null | null | manilaclient/common/cliutils.py | SolKuczala/python-manilaclient | 9613c7fd2652dc3c7b8793c9af2b6357f42a4757 | [
"CNRI-Python",
"Apache-1.1"
] | null | null | null | # Copyright 2012 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | 30.048611 | 79 | 0.619598 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.