hexsha stringlengths 40 40 | size int64 5 2.06M | ext stringclasses 11
values | lang stringclasses 1
value | max_stars_repo_path stringlengths 3 251 | max_stars_repo_name stringlengths 4 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 251 | max_issues_repo_name stringlengths 4 130 | max_issues_repo_head_hexsha stringlengths 40 78 | max_issues_repo_licenses listlengths 1 10 | max_issues_count int64 1 116k ⌀ | max_issues_repo_issues_event_min_datetime stringlengths 24 24 ⌀ | max_issues_repo_issues_event_max_datetime stringlengths 24 24 ⌀ | max_forks_repo_path stringlengths 3 251 | max_forks_repo_name stringlengths 4 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.05M | avg_line_length float64 1 1.02M | max_line_length int64 3 1.04M | alphanum_fraction float64 0 1 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
fbfd2e30f614a3b655c2662e8c6213275af8c2ac | 4,378 | py | Python | touch.py | mendelmaker/dipn | a4871ecf2e4eeb40ff3b7945150c255802694609 | [
"BSD-2-Clause"
] | 8 | 2020-11-17T16:55:34.000Z | 2021-04-28T09:24:37.000Z | touch.py | mendelmaker/dipn | a4871ecf2e4eeb40ff3b7945150c255802694609 | [
"BSD-2-Clause"
] | null | null | null | touch.py | mendelmaker/dipn | a4871ecf2e4eeb40ff3b7945150c255802694609 | [
"BSD-2-Clause"
] | 8 | 2021-07-05T05:10:17.000Z | 2022-03-02T12:10:25.000Z | #!/usr/bin/env python
import matplotlib.pyplot as plt
import numpy as np
import time
import cv2
from real.camera import Camera
from robot import Robot
from subprocess import Popen, PIPE
# User options (change me)
# --------------- Setup options ---------------
tcp_host_ip = '100.127.7.223' # IP and port to robot a... | 35.885246 | 97 | 0.653952 |
fbfd539734cc022db7b79f3a3d092f8d88fe0ee4 | 3,708 | py | Python | py/WB-Klein/5/5.4_cc.py | kassbohm/wb-snippets | f1ac5194e9f60a9260d096ba5ed1ce40b844a3fe | [
"MIT"
] | null | null | null | py/WB-Klein/5/5.4_cc.py | kassbohm/wb-snippets | f1ac5194e9f60a9260d096ba5ed1ce40b844a3fe | [
"MIT"
] | null | null | null | py/WB-Klein/5/5.4_cc.py | kassbohm/wb-snippets | f1ac5194e9f60a9260d096ba5ed1ce40b844a3fe | [
"MIT"
] | null | null | null | # Header starts here.
from sympy.physics.units import *
from sympy import *
# Rounding:
import decimal
from decimal import Decimal as DX
from copy import deepcopy
# LateX:
kwargs = {}
kwargs["mat_str"] = "bmatrix"
kwargs["mat_delim"] = ""
# kwargs["symbol_names"] = {FB: "F^{\mathsf B}", }
# Units:
(k, M, G ) = ( 10*... | 21.433526 | 66 | 0.432848 |
fbfd7d6f8721ebc2b678a03f3cc15caf4d6fced6 | 870 | py | Python | ucc_csv_create.py | MasonDMitchell/HackNC-2019 | 4656f9dcc15ee86c66885267006ed9f4f5b935e7 | [
"MIT"
] | null | null | null | ucc_csv_create.py | MasonDMitchell/HackNC-2019 | 4656f9dcc15ee86c66885267006ed9f4f5b935e7 | [
"MIT"
] | null | null | null | ucc_csv_create.py | MasonDMitchell/HackNC-2019 | 4656f9dcc15ee86c66885267006ed9f4f5b935e7 | [
"MIT"
] | 1 | 2019-10-12T15:09:06.000Z | 2019-10-12T15:09:06.000Z | #!/usr/bin/python3
import csv
ucc_dictionary_file_list = [
'./downloads/diary08/diary08/uccd08.txt',
'./downloads/diary09/diary09/uccd09.txt',
'./downloads/diary11/diary11/uccd11.txt',
'./downloads/diary10/diary10/uccd10.txt',
]
cleaned_ucc_dictionary = dict()
for dictionary in ucc_dictionary_file_l... | 33.461538 | 78 | 0.688506 |
fbff8e3dec4d22f8cf3a2af319e44b94680c5703 | 30,937 | py | Python | eventsourcing/system/ray.py | gerbyzation/eventsourcing | a9e9ecf123af658762832cf97a9f00f8f7064393 | [
"BSD-3-Clause"
] | null | null | null | eventsourcing/system/ray.py | gerbyzation/eventsourcing | a9e9ecf123af658762832cf97a9f00f8f7064393 | [
"BSD-3-Clause"
] | null | null | null | eventsourcing/system/ray.py | gerbyzation/eventsourcing | a9e9ecf123af658762832cf97a9f00f8f7064393 | [
"BSD-3-Clause"
] | null | null | null | import datetime
import os
import traceback
from inspect import ismethod
from queue import Empty, Queue
from threading import Event, Lock, Thread
from time import sleep
from typing import Dict, Optional, Tuple, Type
import ray
from eventsourcing.application.process import ProcessApplication
from eventsourcing.applicat... | 41.030504 | 95 | 0.580761 |
fbff951b3453445a7ed046dfadb09ce047c59a21 | 1,766 | py | Python | authentik/stages/password/migrations/0007_app_password.py | BeryJu/passbook | 350f0d836580f4411524614f361a76c4f27b8a2d | [
"MIT"
] | 15 | 2020-01-05T09:09:57.000Z | 2020-11-28T05:27:39.000Z | authentik/stages/password/migrations/0007_app_password.py | BeryJu/passbook | 350f0d836580f4411524614f361a76c4f27b8a2d | [
"MIT"
] | 302 | 2020-01-21T08:03:59.000Z | 2020-12-04T05:04:57.000Z | authentik/stages/password/migrations/0007_app_password.py | BeryJu/passbook | 350f0d836580f4411524614f361a76c4f27b8a2d | [
"MIT"
] | 3 | 2020-03-04T08:21:59.000Z | 2020-08-01T20:37:18.000Z | # Generated by Django 3.2.6 on 2021-08-23 14:34
import django.contrib.postgres.fields
from django.apps.registry import Apps
from django.db import migrations, models
from django.db.backends.base.schema import BaseDatabaseSchemaEditor
from authentik.stages.password import BACKEND_APP_PASSWORD, BACKEND_INBUILT
| 36.040816 | 100 | 0.625708 |
220006b165652d33b27e971f916a5a800cf16e0a | 1,211 | py | Python | article/tests/test_models.py | asb29/Redundant | ee816fd41f9217610bd11f757cf9175288723c70 | [
"MIT"
] | null | null | null | article/tests/test_models.py | asb29/Redundant | ee816fd41f9217610bd11f757cf9175288723c70 | [
"MIT"
] | null | null | null | article/tests/test_models.py | asb29/Redundant | ee816fd41f9217610bd11f757cf9175288723c70 | [
"MIT"
] | null | null | null | from django.test import TestCase
from django.contrib.auth.models import User
from article.models import Article, Category
| 29.536585 | 77 | 0.6218 |
2200800f734e84798d40a112ef14379650a7d44d | 145 | py | Python | tests/test_import.py | GoodManWEN/typehints_checker | 36e2b2f27b4c392543972e8e466f8e48dfeff274 | [
"MIT"
] | null | null | null | tests/test_import.py | GoodManWEN/typehints_checker | 36e2b2f27b4c392543972e8e466f8e48dfeff274 | [
"MIT"
] | null | null | null | tests/test_import.py | GoodManWEN/typehints_checker | 36e2b2f27b4c392543972e8e466f8e48dfeff274 | [
"MIT"
] | null | null | null | import os , sys
sys.path.append(os.getcwd())
import pytest
from typehints_checker import * | 18.125 | 31 | 0.737931 |
2200a38582a5987a8032f11e6758387289477471 | 2,240 | py | Python | models/FlagAttachment.py | jeffg2k/RootTheBox | 1bb971f98da96f66c868f5786c2405321b0be976 | [
"Apache-2.0"
] | 1 | 2020-02-28T16:23:12.000Z | 2020-02-28T16:23:12.000Z | models/FlagAttachment.py | Warlockk/RootTheBox | e24f3e0350aec1b65be81cdc71ff09a5e1b8e587 | [
"Apache-2.0"
] | null | null | null | models/FlagAttachment.py | Warlockk/RootTheBox | e24f3e0350aec1b65be81cdc71ff09a5e1b8e587 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Nov 24, 2014
@author: moloch
Copyright 2014 Root the Box
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/licen... | 31.111111 | 88 | 0.672768 |
22016594c64927e9cac7fbe2989ffcfcf16a646f | 1,278 | py | Python | connman_dispatcher/detect.py | a-sk/connman-dispatcher | 2561ae87ffd26d0f98bb1ab2b430e181be3d01c1 | [
"0BSD"
] | 4 | 2015-01-04T19:26:01.000Z | 2017-06-06T21:04:01.000Z | connman_dispatcher/detect.py | a-sk/connman-dispatcher | 2561ae87ffd26d0f98bb1ab2b430e181be3d01c1 | [
"0BSD"
] | 1 | 2015-04-04T13:19:15.000Z | 2015-04-04T13:19:15.000Z | connman_dispatcher/detect.py | a-sk/connman-dispatcher | 2561ae87ffd26d0f98bb1ab2b430e181be3d01c1 | [
"0BSD"
] | null | null | null | import glib
import dbus
from dbus.mainloop.glib import DBusGMainLoop
from pyee import EventEmitter
import logbook
logger = logbook.Logger('connman-dispatcher')
__all__ = ['detector']
detector = EventEmitter()
DBusGMainLoop(set_as_default=True)
bus = dbus.SystemBus()
bus.add_match_string_non_blocking("interface='ne... | 25.058824 | 83 | 0.661972 |
2202355dec4485d79be0734da044b8e85dc7a3dc | 4,294 | py | Python | integration/test/test_profile_overflow.py | avilcheslopez/geopm | 35ad0af3f17f42baa009c97ed45eca24333daf33 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | integration/test/test_profile_overflow.py | avilcheslopez/geopm | 35ad0af3f17f42baa009c97ed45eca24333daf33 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | integration/test/test_profile_overflow.py | avilcheslopez/geopm | 35ad0af3f17f42baa009c97ed45eca24333daf33 | [
"MIT",
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
#
# Copyright (c) 2015 - 2022, Intel Corporation
# SPDX-License-Identifier: BSD-3-Clause
#
"""
Runs an application with a large number of short regions and checks
that the controller successfully runs.
"""
import sys
import unittest
import os
import subprocess
import glob
import geopmpy.io
i... | 32.778626 | 97 | 0.614578 |
2203367508cf03902b996dcb408a29b0ce2106d4 | 13,627 | py | Python | Objects/optAlignRNA.py | MooersLab/jupyterlabpymolpysnipsplus | b886750d63372434df53d4d6d7cdad6cb02ae4e7 | [
"MIT"
] | null | null | null | Objects/optAlignRNA.py | MooersLab/jupyterlabpymolpysnipsplus | b886750d63372434df53d4d6d7cdad6cb02ae4e7 | [
"MIT"
] | null | null | null | Objects/optAlignRNA.py | MooersLab/jupyterlabpymolpysnipsplus | b886750d63372434df53d4d6d7cdad6cb02ae4e7 | [
"MIT"
] | null | null | null | # Description: OptiAlign.py by Jason Vertree modified for aligning multiple RNA structures.
# Source: Generated while helping Miranda Adams at U of Saint Louis.
"""
cmd.do('python')
cmd.do(' ##############################################################################')
cmd.do('#')
cmd.do('# @SUMMARY: -- QKabsch.py... | 41.419453 | 143 | 0.634329 |
220378f315f7e2f7d8cd6b8b856c000fc8a490f5 | 12,933 | py | Python | 2020/day11.py | asmeurer/advent-of-code | 3ba3edb0c29994487f1b3344383dc41dfea9bfcb | [
"MIT"
] | null | null | null | 2020/day11.py | asmeurer/advent-of-code | 3ba3edb0c29994487f1b3344383dc41dfea9bfcb | [
"MIT"
] | null | null | null | 2020/day11.py | asmeurer/advent-of-code | 3ba3edb0c29994487f1b3344383dc41dfea9bfcb | [
"MIT"
] | null | null | null | test_input = """
L.LL.LL.LL
LLLLLLL.LL
L.L.L..L..
LLLL.LL.LL
L.LL.LL.LL
L.LLLLL.LL
..L.L.....
LLLLLLLLLL
L.LLLLLL.L
L.LLLLL.LL
"""
test_input2 = """
.......#.
...#.....
.#.......
.........
..#L....#
....#....
.........
#........
...#.....
"""
test_input3 = """
.............
.L.L.#.#.#.#.
.............
"""
test_input... | 45.861702 | 91 | 0.718163 |
220420bd932e73713baed1135186d8fa37af4fd2 | 2,849 | py | Python | final/runner_2.py | Pluriscient/sma2c-ipd | e6e4a5240930491a996afda4744714c5c4826ac2 | [
"MIT"
] | null | null | null | final/runner_2.py | Pluriscient/sma2c-ipd | e6e4a5240930491a996afda4744714c5c4826ac2 | [
"MIT"
] | null | null | null | final/runner_2.py | Pluriscient/sma2c-ipd | e6e4a5240930491a996afda4744714c5c4826ac2 | [
"MIT"
] | null | null | null | from SMA2CAgent import SMA2CAgent
from A2CAgent import A2CAgent
from RandomAgent import RandomAgent
# from .SMA2CAgent import SMA2CAgent
import gym
import numpy as np
from IPD_fixed import IPDEnv
import axelrod
import time
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.ad... | 43.830769 | 108 | 0.67708 |
2204368a20f00021e6e644e58818806aeac0f4fc | 876 | py | Python | 295-find-median-from-data-stream/295-find-median-from-data-stream.py | Dawit-Getachew/A2SV_Practice | 2fe06d725e0acfe668c6dae98fe3ef6e6e26ef61 | [
"MIT"
] | null | null | null | 295-find-median-from-data-stream/295-find-median-from-data-stream.py | Dawit-Getachew/A2SV_Practice | 2fe06d725e0acfe668c6dae98fe3ef6e6e26ef61 | [
"MIT"
] | null | null | null | 295-find-median-from-data-stream/295-find-median-from-data-stream.py | Dawit-Getachew/A2SV_Practice | 2fe06d725e0acfe668c6dae98fe3ef6e6e26ef61 | [
"MIT"
] | null | null | null | import heapq as h
# Your MedianFinder object will be instantiated and called as such:
# obj = MedianFinder()
# obj.addNum(num)
# param_2 = obj.findMedian() | 31.285714 | 67 | 0.586758 |
2204946bef0686b31437d34ea53f7a86c1f9035c | 1,781 | py | Python | mottak-arkiv-service/tests/routers/mappers/test_metadatafil.py | omBratteng/mottak | b7d2e1d063b31c2ad89c66e5414297612f91ebe9 | [
"Apache-2.0"
] | 4 | 2021-03-05T15:39:24.000Z | 2021-09-15T06:11:45.000Z | mottak-arkiv-service/tests/routers/mappers/test_metadatafil.py | omBratteng/mottak | b7d2e1d063b31c2ad89c66e5414297612f91ebe9 | [
"Apache-2.0"
] | 631 | 2020-04-27T10:39:18.000Z | 2022-03-31T14:51:38.000Z | mottak-arkiv-service/tests/routers/mappers/test_metadatafil.py | omBratteng/mottak | b7d2e1d063b31c2ad89c66e5414297612f91ebe9 | [
"Apache-2.0"
] | 3 | 2020-02-20T15:48:03.000Z | 2021-12-16T22:50:40.000Z | import pytest
from app.domain.models.Metadatafil import Metadatafil, MetadataType
from app.exceptions import InvalidContentType
from app.routers.mappers.metadafil import _get_file_content, metadatafil_mapper, _content_type2metadata_type
def test__content_type2metadata_type__success():
"""
GIVEN the string ... | 34.25 | 108 | 0.742841 |
2204c4afb63d7b851791357727ac0902218aab44 | 2,748 | py | Python | src/niweb/apps/noclook/templatetags/rack_tags.py | emjemj/ni | a78e6d97d1e4610aad7698c4f0f459221c680b4f | [
"BSD-2-Clause-FreeBSD"
] | null | null | null | src/niweb/apps/noclook/templatetags/rack_tags.py | emjemj/ni | a78e6d97d1e4610aad7698c4f0f459221c680b4f | [
"BSD-2-Clause-FreeBSD"
] | 2 | 2019-07-24T12:41:11.000Z | 2020-03-31T10:10:04.000Z | src/niweb/apps/noclook/templatetags/rack_tags.py | emjemj/ni | a78e6d97d1e4610aad7698c4f0f459221c680b4f | [
"BSD-2-Clause-FreeBSD"
] | 1 | 2019-02-25T14:58:20.000Z | 2019-02-25T14:58:20.000Z | from django import template
register = template.Library()
RACK_SIZE_PX = 20
MARGIN_HEIGHT = 2
| 28.926316 | 114 | 0.643377 |
2205e64387c6f4c5a706049e6175c53d8453ff11 | 442 | py | Python | Cryptography/Exp-1-Shamirs-Secret-Sharing/main.py | LuminolT/Cryptographic | 87fffae591eee9644641a4c511972df0c2a44df7 | [
"MIT"
] | null | null | null | Cryptography/Exp-1-Shamirs-Secret-Sharing/main.py | LuminolT/Cryptographic | 87fffae591eee9644641a4c511972df0c2a44df7 | [
"MIT"
] | null | null | null | Cryptography/Exp-1-Shamirs-Secret-Sharing/main.py | LuminolT/Cryptographic | 87fffae591eee9644641a4c511972df0c2a44df7 | [
"MIT"
] | 1 | 2022-03-07T13:56:55.000Z | 2022-03-07T13:56:55.000Z | import numpy as np
import matplotlib.pyplot as plt
from shamir import *
from binascii import hexlify
# img = plt.imread('cat.png')
# plt.imshow(img)
# plt.show()
s = 'TEST_STRING'.encode()
print("Original secret:", hexlify(s))
l = Shamir.split(3, 5, '12345'.encode())
for idx, item in l:
print("Share {}: {}".fo... | 18.416667 | 57 | 0.669683 |
2206a89728beed4abfd89a30818175cab85e95be | 825 | py | Python | P20-Stack Abstract Data Type/Stack - Reverse Stack.py | necrospiritus/Python-Working-Examples | 075d410673e470fc7c4ffc262e92109a3032132f | [
"MIT"
] | null | null | null | P20-Stack Abstract Data Type/Stack - Reverse Stack.py | necrospiritus/Python-Working-Examples | 075d410673e470fc7c4ffc262e92109a3032132f | [
"MIT"
] | null | null | null | P20-Stack Abstract Data Type/Stack - Reverse Stack.py | necrospiritus/Python-Working-Examples | 075d410673e470fc7c4ffc262e92109a3032132f | [
"MIT"
] | null | null | null | """Reverse stack is using a list where the top is at the beginning instead of at the end."""
s = Reverse_Stack()
print(s.is_empty())
s.push(4)
s.push("Dog")
print(s.peek())
s.push("Cat")
print(s.size())
print(s.is_empty())
s.pop()
print(s.peek())
print(s.size())
| 22.916667 | 92 | 0.632727 |
220737eae6a16eeacd5d110896be7e897b880d4e | 101 | py | Python | gerapy/cmd/server.py | awesome-archive/Gerapy | e9792d020397cd85b4d553b91b7829078b728b98 | [
"MIT"
] | 1 | 2018-12-07T02:05:32.000Z | 2018-12-07T02:05:32.000Z | gerapy/cmd/server.py | Tilyp/Gerapy | e9792d020397cd85b4d553b91b7829078b728b98 | [
"MIT"
] | null | null | null | gerapy/cmd/server.py | Tilyp/Gerapy | e9792d020397cd85b4d553b91b7829078b728b98 | [
"MIT"
] | null | null | null | from gerapy.server.manage import manage
import sys
| 14.428571 | 39 | 0.70297 |
220739480d36f76e621c523e3b7cf2bdd8e3c62a | 964 | py | Python | client/walt/client/term.py | dia38/walt-python-packages | e6fa1f166f45e73173195d57840d22bef87b88f5 | [
"BSD-3-Clause"
] | 4 | 2020-01-14T09:12:56.000Z | 2022-03-14T14:35:11.000Z | client/walt/client/term.py | dia38/walt-python-packages | e6fa1f166f45e73173195d57840d22bef87b88f5 | [
"BSD-3-Clause"
] | 73 | 2016-04-29T13:17:26.000Z | 2022-03-01T15:06:48.000Z | client/walt/client/term.py | dia38/walt-python-packages | e6fa1f166f45e73173195d57840d22bef87b88f5 | [
"BSD-3-Clause"
] | 3 | 2019-03-18T14:27:56.000Z | 2021-06-03T12:07:02.000Z | #!/usr/bin/env python
import sys, tty, termios, array, fcntl, curses
| 35.703704 | 69 | 0.629668 |
22075aae320e407eb3fd67de73b37aec7dd0a0b3 | 25,123 | py | Python | improver_tests/calibration/ensemble_calibration/test_CalibratedForecastDistributionParameters.py | cpelley/improver | ebf77fe2adc85ed7aec74c26671872a2e4388ded | [
"BSD-3-Clause"
] | null | null | null | improver_tests/calibration/ensemble_calibration/test_CalibratedForecastDistributionParameters.py | cpelley/improver | ebf77fe2adc85ed7aec74c26671872a2e4388ded | [
"BSD-3-Clause"
] | null | null | null | improver_tests/calibration/ensemble_calibration/test_CalibratedForecastDistributionParameters.py | cpelley/improver | ebf77fe2adc85ed7aec74c26671872a2e4388ded | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2017-2021 Met Office.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions a... | 42.294613 | 88 | 0.690841 |
2207cb5f7d7e3d98709c2a6697f808bd842caf1c | 2,897 | py | Python | rendaz/tests/test_daztools.py | veselosky/rendaz | c81298cb9b8f142c4748c28b7e93549a56ee248d | [
"Apache-2.0"
] | null | null | null | rendaz/tests/test_daztools.py | veselosky/rendaz | c81298cb9b8f142c4748c28b7e93549a56ee248d | [
"Apache-2.0"
] | null | null | null | rendaz/tests/test_daztools.py | veselosky/rendaz | c81298cb9b8f142c4748c28b7e93549a56ee248d | [
"Apache-2.0"
] | null | null | null | "Test handling/parsing of various DAZ Studio files"
from pathlib import Path
from tempfile import NamedTemporaryFile
from django.apps import apps
from rendaz.daztools import (
DSONFile,
ProductMeta,
manifest_files,
supplement_product_name,
)
TEST_DIR = Path(__file__).parent
def test_read_dson_com... | 29.561224 | 75 | 0.705557 |
2209880d39d84bdcf0ec5ef896046b892fe747ab | 20,000 | py | Python | src/core/models/graph2seq.py | talha1503/RL-based-Graph2Seq-for-NQG | 1039e0b6231ae7029ea6e4073b1e55df5ad2e928 | [
"Apache-2.0"
] | 100 | 2019-08-18T21:56:24.000Z | 2022-03-31T08:54:41.000Z | src/core/models/graph2seq.py | talha1503/RL-based-Graph2Seq-for-NQG | 1039e0b6231ae7029ea6e4073b1e55df5ad2e928 | [
"Apache-2.0"
] | 7 | 2019-12-26T03:49:20.000Z | 2021-11-26T19:11:19.000Z | src/core/models/graph2seq.py | talha1503/RL-based-Graph2Seq-for-NQG | 1039e0b6231ae7029ea6e4073b1e55df5ad2e928 | [
"Apache-2.0"
] | 17 | 2020-02-02T06:41:21.000Z | 2022-03-09T02:53:27.000Z | import random
import string
from typing import Union, List
import torch
import torch.nn as nn
import torch.nn.functional as F
from ..layers.common import EncoderRNN, DecoderRNN, dropout
from ..layers.attention import *
from ..layers.graphs import GraphNN
from ..utils.generic_utils import to_cuda, create_mask
from ..u... | 46.948357 | 194 | 0.6892 |
220aabb343a26ce1e8cadcc4df4a8b3a8adedfdb | 2,939 | py | Python | towhee/engine/pipeline.py | jeffoverflow/towhee | c576d22a4cdfc3909a3323b0d1decab87e83d26c | [
"Apache-2.0"
] | null | null | null | towhee/engine/pipeline.py | jeffoverflow/towhee | c576d22a4cdfc3909a3323b0d1decab87e83d26c | [
"Apache-2.0"
] | null | null | null | towhee/engine/pipeline.py | jeffoverflow/towhee | c576d22a4cdfc3909a3323b0d1decab87e83d26c | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 Zilliz. 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 agree... | 33.397727 | 92 | 0.638312 |
220ccdab937624a53d838d42a5f734ee87cb22a8 | 744 | py | Python | portfolio/models.py | MrInternauta/Python-Django-Portafolio-web-administrable | 0df6f76cb5bdc2f28eb691d21f3592f7f082ce80 | [
"MIT"
] | null | null | null | portfolio/models.py | MrInternauta/Python-Django-Portafolio-web-administrable | 0df6f76cb5bdc2f28eb691d21f3592f7f082ce80 | [
"MIT"
] | null | null | null | portfolio/models.py | MrInternauta/Python-Django-Portafolio-web-administrable | 0df6f76cb5bdc2f28eb691d21f3592f7f082ce80 | [
"MIT"
] | null | null | null | from django.db import models
# Create your models here.
| 43.764706 | 89 | 0.701613 |
220d1b0d3abc6c0db8d6bd13778e65f09dbb4290 | 231 | py | Python | src/notifications/tests.py | kullo/webconfig | 470839ed77fda11634d4e14a89bb5e7894aa707d | [
"BSD-3-Clause"
] | null | null | null | src/notifications/tests.py | kullo/webconfig | 470839ed77fda11634d4e14a89bb5e7894aa707d | [
"BSD-3-Clause"
] | null | null | null | src/notifications/tests.py | kullo/webconfig | 470839ed77fda11634d4e14a89bb5e7894aa707d | [
"BSD-3-Clause"
] | null | null | null | # Copyright 20152020 Kullo GmbH
#
# This source code is licensed under the 3-clause BSD license. See LICENSE.txt
# in the root directory of this source tree for details.
from django.test import TestCase
# Create your tests here.
| 28.875 | 78 | 0.774892 |
220da7c8db31ca8e3ea4491d39c1e1bb6b8b46fe | 1,018 | py | Python | examples/cam.py | jtme/button-shim | 19b80a236866fad068e6d3aeb643a1270d6ae934 | [
"MIT"
] | null | null | null | examples/cam.py | jtme/button-shim | 19b80a236866fad068e6d3aeb643a1270d6ae934 | [
"MIT"
] | null | null | null | examples/cam.py | jtme/button-shim | 19b80a236866fad068e6d3aeb643a1270d6ae934 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import signal
import buttonshim
print("""
Button SHIM: rainbow.py
Command on button press.
Press Ctrl+C to exit.
""")
import commands
signal.pause()
| 19.960784 | 74 | 0.681729 |
220e0c7e4d7e7b9e561c692a325977f16ecf70b4 | 153 | py | Python | built-in/TensorFlow/Official/cv/image_classification/ResnetVariant_for_TensorFlow/automl/vega/algorithms/nas/sm_nas/mmdet_meta_cfgs/bbox_head/__init__.py | Huawei-Ascend/modelzoo | df51ed9c1d6dbde1deef63f2a037a369f8554406 | [
"Apache-2.0"
] | 12 | 2020-12-13T08:34:24.000Z | 2022-03-20T15:17:17.000Z | built-in/TensorFlow/Official/cv/image_classification/ResnetVariant_for_TensorFlow/automl/vega/algorithms/nas/sm_nas/mmdet_meta_cfgs/bbox_head/__init__.py | Huawei-Ascend/modelzoo | df51ed9c1d6dbde1deef63f2a037a369f8554406 | [
"Apache-2.0"
] | 3 | 2021-03-31T20:15:40.000Z | 2022-02-09T23:50:46.000Z | built-in/TensorFlow/Research/cv/image_classification/Darts_for_TensorFlow/automl/vega/algorithms/nas/sm_nas/mmdet_meta_cfgs/bbox_head/__init__.py | Huawei-Ascend/modelzoo | df51ed9c1d6dbde1deef63f2a037a369f8554406 | [
"Apache-2.0"
] | 2 | 2021-07-10T12:40:46.000Z | 2021-12-17T07:55:15.000Z | from .cascade_head import CascadeFCBBoxHead
from .convfc_bbox_head import SharedFCBBoxHead
__all__ = [
'CascadeFCBBoxHead',
'SharedFCBBoxHead']
| 21.857143 | 46 | 0.79085 |
221167d3228359aec0ed9b72908eb095312e240f | 3,146 | py | Python | monzo/model/monzoaccount.py | elementechemlyn/pythonzo | ff6124119c7fe8c68c4bfa0e5d59b79ad442c1fc | [
"MIT"
] | null | null | null | monzo/model/monzoaccount.py | elementechemlyn/pythonzo | ff6124119c7fe8c68c4bfa0e5d59b79ad442c1fc | [
"MIT"
] | 1 | 2021-06-01T22:01:40.000Z | 2021-06-01T22:01:40.000Z | monzo/model/monzoaccount.py | elementechemlyn/pythonzo | ff6124119c7fe8c68c4bfa0e5d59b79ad442c1fc | [
"MIT"
] | null | null | null | import datetime
from .monzobalance import MonzoBalance
from .monzopagination import MonzoPaging
from .monzotransaction import MonzoTransaction
| 35.75 | 95 | 0.651939 |
22117a7dbdd2a79f096b01e929739e3fe71da985 | 3,718 | py | Python | learninghouse/api/errors/__init__.py | DerOetzi/learninghouse-core | ece900b2a333b8ea9710609322cfefeeaf694cf8 | [
"MIT"
] | 1 | 2021-11-02T13:52:11.000Z | 2021-11-02T13:52:11.000Z | learninghouse/api/errors/__init__.py | DerOetzi/learninghouse-core | ece900b2a333b8ea9710609322cfefeeaf694cf8 | [
"MIT"
] | null | null | null | learninghouse/api/errors/__init__.py | DerOetzi/learninghouse-core | ece900b2a333b8ea9710609322cfefeeaf694cf8 | [
"MIT"
] | 1 | 2020-08-27T20:03:36.000Z | 2020-08-27T20:03:36.000Z | from typing import Dict, Optional
from fastapi import status, Request
from fastapi.responses import JSONResponse
from fastapi.exceptions import RequestValidationError
from learninghouse.models import LearningHouseErrorMessage
MIMETYPE_JSON = 'application/json'
| 34.747664 | 133 | 0.604088 |
2212ba611cd09cc95cb9831180998a6882517ddf | 1,751 | py | Python | moda/dataprep/create_dataset.py | Patte1808/moda | 312c9594754ae0f6d17cbfafaa2c4c790c58efe5 | [
"MIT"
] | null | null | null | moda/dataprep/create_dataset.py | Patte1808/moda | 312c9594754ae0f6d17cbfafaa2c4c790c58efe5 | [
"MIT"
] | null | null | null | moda/dataprep/create_dataset.py | Patte1808/moda | 312c9594754ae0f6d17cbfafaa2c4c790c58efe5 | [
"MIT"
] | null | null | null | import pandas as pd
def get_windowed_ts(ranged_ts, window_size, with_actual=True):
"""
Creates a data frame where each row is a window of samples from the time series.
Each consecutive row is a shift of 1 cell from the previous row.
For example: [[1,2,3],[2,3,4],[3,4,5]]
:param ranged_ts: a pd.Da... | 38.065217 | 109 | 0.703027 |
22135083df33d8282602ed03efa2652030de4212 | 1,310 | py | Python | test/test_ufunc.py | tuwien-cms/xprec | 8f213aa9475342000883a56c56d54bb5208eb930 | [
"MIT"
] | 6 | 2021-10-01T16:35:27.000Z | 2022-01-05T18:21:39.000Z | test/test_ufunc.py | tuwien-cms/xprec | 8f213aa9475342000883a56c56d54bb5208eb930 | [
"MIT"
] | 8 | 2022-01-20T20:33:26.000Z | 2022-03-25T09:27:49.000Z | test/test_ufunc.py | tuwien-cms/xprec | 8f213aa9475342000883a56c56d54bb5208eb930 | [
"MIT"
] | 1 | 2022-01-21T22:49:16.000Z | 2022-01-21T22:49:16.000Z | # Copyright (C) 2021 Markus Wallerberger and others
# SPDX-License-Identifier: MIT
import numpy as np
import xprec
| 24.716981 | 77 | 0.650382 |
22135b653bd172de4f59e045357620ffd83da98a | 48 | py | Python | echolect/millstone/__init__.py | ryanvolz/echolect | ec2594925f34fdaea69b64e725fccb0c99665a55 | [
"BSD-3-Clause"
] | 1 | 2022-03-24T22:48:12.000Z | 2022-03-24T22:48:12.000Z | echolect/millstone/__init__.py | scivision/echolect | ec2594925f34fdaea69b64e725fccb0c99665a55 | [
"BSD-3-Clause"
] | 1 | 2015-03-25T20:41:24.000Z | 2015-03-25T20:41:24.000Z | echolect/millstone/__init__.py | scivision/echolect | ec2594925f34fdaea69b64e725fccb0c99665a55 | [
"BSD-3-Clause"
] | null | null | null | from .read_hdf5 import *
from .hdf5_api import * | 24 | 24 | 0.770833 |
2214b7a4b4680d12ebfcca09d05d0ee1ade6215e | 932 | py | Python | pyptoolz/transforms.py | embedio/pyplinez | 14b2e84d0f0bd86870d492a78f02c0b19810d3f6 | [
"MIT"
] | null | null | null | pyptoolz/transforms.py | embedio/pyplinez | 14b2e84d0f0bd86870d492a78f02c0b19810d3f6 | [
"MIT"
] | null | null | null | pyptoolz/transforms.py | embedio/pyplinez | 14b2e84d0f0bd86870d492a78f02c0b19810d3f6 | [
"MIT"
] | null | null | null | from pathlib import Path
from toolz import itertoolz, curried
import vaex
transform_path_to_posix = lambda path: path.as_posix()
transform_xlsx_to_vaex = lambda path: vaex.from_ascii(path, seperator="\t")
transform_ascii_to_vaex = lambda path: vaex.from_ascii(path, seperator="\t")
transform_ascii_to_vaex2 = ... | 20.26087 | 80 | 0.784335 |
2214dd004a4a327669decd49302d44af0c040bf5 | 1,409 | py | Python | experiments/s3-image-resize/chalicelib/s3_helpers.py | llamapope/chalice-experiments | f08fa0bade19c2659788a0678d89a4a63c2402d5 | [
"MIT"
] | null | null | null | experiments/s3-image-resize/chalicelib/s3_helpers.py | llamapope/chalice-experiments | f08fa0bade19c2659788a0678d89a4a63c2402d5 | [
"MIT"
] | 2 | 2021-06-08T20:56:46.000Z | 2022-01-13T02:15:29.000Z | experiments/s3-image-resize/chalicelib/s3_helpers.py | llamapope/chalice-experiments | f08fa0bade19c2659788a0678d89a4a63c2402d5 | [
"MIT"
] | null | null | null | import PIL
from PIL import Image
from io import BytesIO
import re | 29.978723 | 69 | 0.628105 |
221552a2a64bb10ef85638e3e31fd395fcf10fcf | 4,792 | py | Python | synapse/handlers/room_member_worker.py | lukaslihotzki/synapse | 1dfdc87b9bb07cc3c958dde7f41f2af4322477e5 | [
"Apache-2.0"
] | 9,945 | 2015-01-02T07:41:06.000Z | 2022-03-31T23:22:42.000Z | synapse/handlers/room_member_worker.py | lukaslihotzki/synapse | 1dfdc87b9bb07cc3c958dde7f41f2af4322477e5 | [
"Apache-2.0"
] | 9,320 | 2015-01-08T14:09:03.000Z | 2022-03-31T21:11:24.000Z | synapse/handlers/room_member_worker.py | lukaslihotzki/synapse | 1dfdc87b9bb07cc3c958dde7f41f2af4322477e5 | [
"Apache-2.0"
] | 2,299 | 2015-01-31T22:16:29.000Z | 2022-03-31T06:08:26.000Z | # Copyright 2018-2021 The Matrix.org Foundation C.I.C.
#
# 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... | 33.746479 | 77 | 0.660267 |
22159f4a1c6d6e72ce319e5cebbbcc4d51c13acd | 2,205 | py | Python | win/devkit/other/pymel/extras/completion/py/maya/app/edl/importExport.py | leegoonz/Maya-devkit | b81fe799b58e854e4ef16435426d60446e975871 | [
"ADSL"
] | 10 | 2018-03-30T16:09:02.000Z | 2021-12-07T07:29:19.000Z | win/devkit/other/pymel/extras/completion/py/maya/app/edl/importExport.py | leegoonz/Maya-devkit | b81fe799b58e854e4ef16435426d60446e975871 | [
"ADSL"
] | null | null | null | win/devkit/other/pymel/extras/completion/py/maya/app/edl/importExport.py | leegoonz/Maya-devkit | b81fe799b58e854e4ef16435426d60446e975871 | [
"ADSL"
] | 9 | 2018-06-02T09:18:49.000Z | 2021-12-20T09:24:35.000Z | import tempfile
import maya.OpenMaya as OpenMaya
import maya.OpenMayaRender as OpenMayaRender
import maya.OpenMayaMPx as OpenMayaMPx
import maya.cmds as cmds
import maya
import re
from maya.app.edl.fcp import *
def _setTimeCode(timecode):
pass
def doExport(fileName, allowPlayblast):
"""
Exports the ... | 17.64 | 92 | 0.647166 |
22189dbba6fcdc9b59fa2a428105a701aaaf4a2f | 1,040 | py | Python | packages/mcni/python/mcni/instrument_simulator/__init__.py | mcvine/mcvine | 42232534b0c6af729628009bed165cd7d833789d | [
"BSD-3-Clause"
] | 5 | 2017-01-16T03:59:47.000Z | 2020-06-23T02:54:19.000Z | packages/mcni/python/mcni/instrument_simulator/__init__.py | mcvine/mcvine | 42232534b0c6af729628009bed165cd7d833789d | [
"BSD-3-Clause"
] | 293 | 2015-10-29T17:45:52.000Z | 2022-01-07T16:31:09.000Z | packages/mcni/python/mcni/instrument_simulator/__init__.py | mcvine/mcvine | 42232534b0c6af729628009bed165cd7d833789d | [
"BSD-3-Clause"
] | 1 | 2019-05-25T00:53:31.000Z | 2019-05-25T00:53:31.000Z | #!/usr/bin/env python
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Michael A.G. Aivazis
# California Institute of Technology
# (C) 2006-2010 All Rights Reserved
#
# <LicenseText>
#
# ~~~~~~~~~... | 26.666667 | 100 | 0.575 |
22199caafbe2cf83aa5b2f765370eb9a8ab49f37 | 169 | py | Python | todolist/wsgi.py | HangeZoe/django-todo-list | 8a3232916e57724d52f0f93124f346d82b72e0ce | [
"MIT"
] | null | null | null | todolist/wsgi.py | HangeZoe/django-todo-list | 8a3232916e57724d52f0f93124f346d82b72e0ce | [
"MIT"
] | null | null | null | todolist/wsgi.py | HangeZoe/django-todo-list | 8a3232916e57724d52f0f93124f346d82b72e0ce | [
"MIT"
] | null | null | null | import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'todolist.settings')
application = get_wsgi_application()
| 21.125 | 68 | 0.828402 |
221aaf010e11acc9785595a6c6873f1ea746ad9a | 4,501 | py | Python | cern_search_rest_api/modules/cernsearch/cli.py | inveniosoftware-contrib/citadel-search | 736fdb3a5b32f750111bc846bc815c4671978fa1 | [
"MIT"
] | 6 | 2020-04-12T18:30:08.000Z | 2021-09-15T05:53:40.000Z | cern_search_rest_api/modules/cernsearch/cli.py | inveniosoftware-contrib/cern-search | 736fdb3a5b32f750111bc846bc815c4671978fa1 | [
"MIT"
] | 6 | 2020-03-19T13:28:38.000Z | 2020-12-08T16:54:05.000Z | cern_search_rest_api/modules/cernsearch/cli.py | inveniosoftware-contrib/cern-search | 736fdb3a5b32f750111bc846bc815c4671978fa1 | [
"MIT"
] | 2 | 2019-04-22T21:20:17.000Z | 2019-05-16T08:50:38.000Z | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# This file is part of CERN Search.
# Copyright (C) 2018-2021 CERN.
#
# Citadel Search is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
"""Click command-line utilities."""
import json
import c... | 30.412162 | 108 | 0.682959 |
221ac1f2a8c5526fcda12d6ed18346f9e5d9d58a | 906 | py | Python | kasaya/core/backend/redisstore.py | AYAtechnologies/Kasaya-esb | 150fa96d4136641cd4632f3c9a09d4fc2610df07 | [
"BSD-2-Clause"
] | 1 | 2015-06-26T18:05:20.000Z | 2015-06-26T18:05:20.000Z | kasaya/core/backend/redisstore.py | AYAtechnologies/Kasaya-esb | 150fa96d4136641cd4632f3c9a09d4fc2610df07 | [
"BSD-2-Clause"
] | null | null | null | kasaya/core/backend/redisstore.py | AYAtechnologies/Kasaya-esb | 150fa96d4136641cd4632f3c9a09d4fc2610df07 | [
"BSD-2-Clause"
] | null | null | null | __author__ = 'wektor'
from generic import GenericBackend
import redis
| 25.166667 | 71 | 0.562914 |
221b92eff3eb5754a23903956aeef1d20d52980f | 11,288 | py | Python | venv/lib/python3.6/site-packages/ansible_collections/amazon/aws/plugins/module_utils/rds.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 22 | 2021-07-16T08:11:22.000Z | 2022-03-31T07:15:34.000Z | venv/lib/python3.6/site-packages/ansible_collections/amazon/aws/plugins/module_utils/rds.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible_collections/amazon/aws/plugins/module_utils/rds.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 39 | 2021-07-05T02:31:42.000Z | 2022-03-31T02:46:03.000Z | # Copyright: (c) 2018, Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from collections import namedtuple
from time import sleep
try:
from botocore.exceptions impor... | 47.830508 | 159 | 0.710578 |
221baabdac2f34fa39aafcaa192dcd1f1b264104 | 176 | py | Python | week06/lecture/examples/src6/2/uppercase0.py | uldash/CS50x | c3ee0f42ad514b57a13c3ffbb96238b3ca3730e1 | [
"MIT"
] | null | null | null | week06/lecture/examples/src6/2/uppercase0.py | uldash/CS50x | c3ee0f42ad514b57a13c3ffbb96238b3ca3730e1 | [
"MIT"
] | null | null | null | week06/lecture/examples/src6/2/uppercase0.py | uldash/CS50x | c3ee0f42ad514b57a13c3ffbb96238b3ca3730e1 | [
"MIT"
] | null | null | null | # Uppercases string one character at a time
from cs50 import get_string
s = get_string("Before: ")
print("After: ", end="")
for c in s:
print(c.upper(), end="")
print()
| 17.6 | 43 | 0.653409 |
221c5dbcccafcacd09ca66b22dfdff675d20b942 | 2,050 | py | Python | tests/test_kobo.py | Donearm/kobuddy | 9c55f2f94c3c949c4d8a5ba18704be92c055873c | [
"MIT"
] | 75 | 2019-08-24T14:21:53.000Z | 2022-02-21T17:20:20.000Z | tests/test_kobo.py | Donearm/kobuddy | 9c55f2f94c3c949c4d8a5ba18704be92c055873c | [
"MIT"
] | 9 | 2019-10-15T19:30:16.000Z | 2021-08-17T15:24:00.000Z | tests/test_kobo.py | Donearm/kobuddy | 9c55f2f94c3c949c4d8a5ba18704be92c055873c | [
"MIT"
] | 4 | 2020-02-05T13:53:59.000Z | 2021-08-17T14:50:39.000Z | from datetime import datetime
from pathlib import Path
import pytz
import kobuddy
# a bit meh, but ok for now
kobuddy.set_databases(get_test_db())
from kobuddy import _iter_events_aux, get_events, get_books_with_highlights, _iter_highlights
| 28.472222 | 159 | 0.691707 |
221edc811e6d0e0ea5e013272ed5a112078a3713 | 1,062 | py | Python | tanks/views.py | BArdelean/djangostuff | b4b7b6bac5e1d8dbc73e2f5cb5a7e784a82c9519 | [
"bzip2-1.0.6"
] | null | null | null | tanks/views.py | BArdelean/djangostuff | b4b7b6bac5e1d8dbc73e2f5cb5a7e784a82c9519 | [
"bzip2-1.0.6"
] | null | null | null | tanks/views.py | BArdelean/djangostuff | b4b7b6bac5e1d8dbc73e2f5cb5a7e784a82c9519 | [
"bzip2-1.0.6"
] | null | null | null | from django.shortcuts import render
from .models import Tank
from django.db import models
from django.http import HttpResponse
from django.views import View
# Create your views here.
# The view for the created model Tank
| 21.673469 | 54 | 0.65725 |
221ee83a279f586d62cd3b5b659bf72ceddc7c10 | 8,125 | py | Python | VQVAE/main.py | bipashasen/How2Sign-Blob | 6e2af881d96d477fdb93104b8e53d943765c64ff | [
"MIT"
] | null | null | null | VQVAE/main.py | bipashasen/How2Sign-Blob | 6e2af881d96d477fdb93104b8e53d943765c64ff | [
"MIT"
] | null | null | null | VQVAE/main.py | bipashasen/How2Sign-Blob | 6e2af881d96d477fdb93104b8e53d943765c64ff | [
"MIT"
] | null | null | null | import os
import numpy as np
import torch
import torch.nn as nn
import torch.optim as optim
import argparse
from tqdm import tqdm
import sys
import distributed as dist
import utils
from models.vqvae import VQVAE, VQVAE_Blob2Full
from models.discriminator import discriminator
visual_folder = '/home2/bipasha31/python_... | 30.204461 | 113 | 0.606769 |
2221af1a0ee8e71a36084e82816e4e484658018d | 1,245 | py | Python | api/voters/tests/test_models.py | citizenlabsgr/voter-engagement | 2d33eac1531471988543c6c3781b95ac73ec6dd9 | [
"MIT"
] | 6 | 2017-11-10T00:50:17.000Z | 2018-03-25T02:26:19.000Z | api/voters/tests/test_models.py | citizenlabsgr/voter-engagement | 2d33eac1531471988543c6c3781b95ac73ec6dd9 | [
"MIT"
] | 40 | 2017-10-25T16:16:55.000Z | 2018-08-15T05:27:36.000Z | api/voters/tests/test_models.py | citizenlabsgr/voter-engagement | 2d33eac1531471988543c6c3781b95ac73ec6dd9 | [
"MIT"
] | 3 | 2017-11-22T01:50:41.000Z | 2018-04-17T23:33:08.000Z | # pylint: disable=unused-variable,unused-argument,expression-not-assigned
from django.forms.models import model_to_dict
import arrow
import pytest
from expecter import expect
from api.elections.models import Election
from .. import models
def describe_registration_info():
def describe_voter():
def describe... | 18.863636 | 73 | 0.658635 |
22259d4822670697f3a83a96fc5c76baa093e86f | 992 | py | Python | app/main/helpers/direct_award_helpers.py | uk-gov-mirror/alphagov.digitalmarketplace-buyer-frontend | ec3751b6d24842cc53febb20391ae340c0fea756 | [
"MIT"
] | 4 | 2017-10-12T16:15:01.000Z | 2020-11-28T03:41:15.000Z | app/main/helpers/direct_award_helpers.py | uk-gov-mirror/alphagov.digitalmarketplace-buyer-frontend | ec3751b6d24842cc53febb20391ae340c0fea756 | [
"MIT"
] | 615 | 2015-02-27T15:45:43.000Z | 2021-07-01T10:09:55.000Z | app/main/helpers/direct_award_helpers.py | uk-gov-mirror/alphagov.digitalmarketplace-buyer-frontend | ec3751b6d24842cc53febb20391ae340c0fea756 | [
"MIT"
] | 15 | 2015-06-30T14:35:20.000Z | 2021-04-10T18:06:36.000Z | from operator import itemgetter
| 31 | 113 | 0.658266 |
2227aded77b3fc2c225e7b80658dcf4702936914 | 2,261 | py | Python | daemon/api/endpoints/partial/pod.py | vishalbelsare/jina | ae72cc5ce1f7e7f4c662e72e96ea21dddc28bf43 | [
"Apache-2.0"
] | 2 | 2021-06-28T16:25:09.000Z | 2021-06-28T16:26:41.000Z | daemon/api/endpoints/partial/pod.py | vishalbelsare/jina | ae72cc5ce1f7e7f4c662e72e96ea21dddc28bf43 | [
"Apache-2.0"
] | null | null | null | daemon/api/endpoints/partial/pod.py | vishalbelsare/jina | ae72cc5ce1f7e7f4c662e72e96ea21dddc28bf43 | [
"Apache-2.0"
] | null | null | null | from typing import Optional, Dict, Any
from fastapi import APIRouter
from jina.helper import ArgNamespace
from jina.parsers import set_pod_parser
from ....excepts import PartialDaemon400Exception
from ....models import PodModel
from ....models.partial import PartialStoreItem
from ....stores import partial_store as sto... | 21.951456 | 74 | 0.657231 |
2227e03ea94ec70b6e6c0445734948d8034414f4 | 708 | py | Python | runehistory_api/app/config.py | RuneHistory/runehistory-api | 4e857c7fdbdf585d57cf4c7fe6214b565ac37a22 | [
"MIT"
] | null | null | null | runehistory_api/app/config.py | RuneHistory/runehistory-api | 4e857c7fdbdf585d57cf4c7fe6214b565ac37a22 | [
"MIT"
] | 6 | 2018-06-14T13:58:43.000Z | 2018-07-16T14:02:24.000Z | runehistory_api/app/config.py | RuneHistory/runehistory-api | 4e857c7fdbdf585d57cf4c7fe6214b565ac37a22 | [
"MIT"
] | null | null | null | import yaml
| 21.454545 | 53 | 0.572034 |
222831d9b44232f8e0bea417d43c813b4bde54d1 | 4,379 | py | Python | csv_filter/__init__.py | mooore-digital/csv_filter | 80afed0e4b366d195c5a90fb96ab2bf01620e3bf | [
"MIT"
] | 1 | 2018-08-13T05:51:21.000Z | 2018-08-13T05:51:21.000Z | csv_filter/__init__.py | mooore-digital/csv_filter | 80afed0e4b366d195c5a90fb96ab2bf01620e3bf | [
"MIT"
] | null | null | null | csv_filter/__init__.py | mooore-digital/csv_filter | 80afed0e4b366d195c5a90fb96ab2bf01620e3bf | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
import argparse
import csv
import logging
import os
import re
import sys
DELIMITER = ','
if __name__ == '__main__':
sys.exit(main())
| 31.731884 | 120 | 0.577529 |
22298775a674168a052235a68913e1eaa95ece94 | 9,883 | py | Python | bluebottle/impact/tests/test_api.py | terrameijar/bluebottle | b4f5ba9c4f03e678fdd36091b29240307ea69ffd | [
"BSD-3-Clause"
] | 10 | 2015-05-28T18:26:40.000Z | 2021-09-06T10:07:03.000Z | bluebottle/impact/tests/test_api.py | terrameijar/bluebottle | b4f5ba9c4f03e678fdd36091b29240307ea69ffd | [
"BSD-3-Clause"
] | 762 | 2015-01-15T10:00:59.000Z | 2022-03-31T15:35:14.000Z | bluebottle/impact/tests/test_api.py | terrameijar/bluebottle | b4f5ba9c4f03e678fdd36091b29240307ea69ffd | [
"BSD-3-Clause"
] | 9 | 2015-02-20T13:19:30.000Z | 2022-03-08T14:09:17.000Z | # coding=utf-8
from builtins import str
import json
from django.contrib.auth.models import Group, Permission
from django.urls import reverse
from rest_framework import status
from bluebottle.impact.models import ImpactGoal
from bluebottle.impact.tests.factories import (
ImpactTypeFactory, ImpactGoalFactory
)
from... | 33.16443 | 82 | 0.610746 |
222b145f8daf822353fc31ee9861239abfadffb3 | 11,613 | py | Python | dotmotif/parsers/v2/test_v2_parser.py | aplbrain/dotmotif | db093ddad7308756e9cf7ee01199f0dca1369872 | [
"Apache-2.0"
] | 28 | 2020-06-12T20:46:15.000Z | 2022-02-05T18:33:46.000Z | dotmotif/parsers/v2/test_v2_parser.py | aplbrain/dotmotif | db093ddad7308756e9cf7ee01199f0dca1369872 | [
"Apache-2.0"
] | 26 | 2020-06-09T20:09:32.000Z | 2022-02-01T18:22:20.000Z | dotmotif/parsers/v2/test_v2_parser.py | aplbrain/dotmotif | db093ddad7308756e9cf7ee01199f0dca1369872 | [
"Apache-2.0"
] | 4 | 2021-03-08T02:47:49.000Z | 2021-09-13T19:16:29.000Z | from . import ParserV2
import dotmotif
import unittest
_THREE_CYCLE = """A -> B\nB -> C\nC -> A\n"""
_THREE_CYCLE_NEG = """A !> B\nB !> C\nC !> A\n"""
_THREE_CYCLE_INH = """A -| B\nB -| C\nC -| A\n"""
_THREE_CYCLE_NEG_INH = """A !| B\nB !| C\nC !| A\n"""
_ABC_TO_D = """\nA -> D\nB -> D\nC -> D\n"""
_THREE_CYCLE_CSV ... | 26.819861 | 87 | 0.490313 |
222b699bb098dde76e50ecba30e5ab86e3537dcc | 1,382 | py | Python | examples/classification_mnist/main.py | yassersouri/fandak | 2bbadb6d78fcf73dc39f5342aa34c53fa3341c5a | [
"MIT"
] | 15 | 2019-07-12T14:04:46.000Z | 2020-08-04T12:30:30.000Z | examples/classification_mnist/main.py | yassersouri/fandak | 2bbadb6d78fcf73dc39f5342aa34c53fa3341c5a | [
"MIT"
] | 2 | 2019-07-12T17:06:56.000Z | 2019-07-17T12:05:32.000Z | examples/classification_mnist/main.py | yassersouri/fandak | 2bbadb6d78fcf73dc39f5342aa34c53fa3341c5a | [
"MIT"
] | null | null | null | from typing import List
import click
import torch
from fandak.utils import common_config
from fandak.utils import set_seed
from fandak.utils.config import update_config
from proj.config import get_config_defaults
from proj.datasets import MNISTClassification
from proj.evaluators import ValidationEvaluator
from proj.m... | 26.075472 | 73 | 0.708394 |
222b80300db760788fdc862f944935f9de93f40f | 864 | py | Python | tests/test_problem_solving_algorithms_sorting.py | mxdzi/hackerrank | 4455f73e4479a4204b2e1167253f6a02351aa5b7 | [
"MIT"
] | null | null | null | tests/test_problem_solving_algorithms_sorting.py | mxdzi/hackerrank | 4455f73e4479a4204b2e1167253f6a02351aa5b7 | [
"MIT"
] | null | null | null | tests/test_problem_solving_algorithms_sorting.py | mxdzi/hackerrank | 4455f73e4479a4204b2e1167253f6a02351aa5b7 | [
"MIT"
] | null | null | null | from problem_solving.algorithms.sorting import *
| 25.411765 | 64 | 0.545139 |
222dd53901bfb2ab9baf636ea45e6459defef6a1 | 9,975 | py | Python | runOtakuBot.py | Eagleheardt/otakuBot | 6f8576423bb1b0701d5a60095bed7552b2711bab | [
"Unlicense"
] | null | null | null | runOtakuBot.py | Eagleheardt/otakuBot | 6f8576423bb1b0701d5a60095bed7552b2711bab | [
"Unlicense"
] | null | null | null | runOtakuBot.py | Eagleheardt/otakuBot | 6f8576423bb1b0701d5a60095bed7552b2711bab | [
"Unlicense"
] | null | null | null | import sqlite3
from sqlite3 import Error
import os
import time
import datetime
import re
import random
import schedule
import cryptography
from apscheduler.schedulers.background import BackgroundScheduler
from slackclient import SlackClient
from cryptography.fernet import Fernet
conn = sqlite3.connect('... | 27.631579 | 95 | 0.665063 |
222fcf6d9b65f24912507aa874036c0ee4a1261b | 1,555 | py | Python | ocr.py | tunc2112/uet-img-processing | 6a191fe6927d7d0844742240cf4a39587c965d16 | [
"MIT"
] | null | null | null | ocr.py | tunc2112/uet-img-processing | 6a191fe6927d7d0844742240cf4a39587c965d16 | [
"MIT"
] | null | null | null | ocr.py | tunc2112/uet-img-processing | 6a191fe6927d7d0844742240cf4a39587c965d16 | [
"MIT"
] | null | null | null | from PIL import Image
import cv2
import pytesseract
import tesserocr
from pyocr import pyocr
from pyocr import builders
import sys
import os
| 27.280702 | 72 | 0.674598 |
2230323f70e41224c93df8ff861946c38acbb05d | 6,718 | py | Python | object_detection/det_heads/retinaNet_head/retinanet_head.py | no-name-xiaosheng/PaddleViT | 50226a3be5095b3727d3c62d2eab23ef1e9612ec | [
"Apache-2.0"
] | 993 | 2021-08-30T01:58:57.000Z | 2022-03-31T14:03:07.000Z | object_detection/det_heads/retinaNet_head/retinanet_head.py | Dongsheng-Bi/PaddleViT | c90a6c8dc3787e69cef3a37b9a260bd59eeff1f7 | [
"Apache-2.0"
] | 120 | 2021-09-03T13:05:32.000Z | 2022-03-29T02:08:22.000Z | object_detection/det_heads/retinaNet_head/retinanet_head.py | Dongsheng-Bi/PaddleViT | c90a6c8dc3787e69cef3a37b9a260bd59eeff1f7 | [
"Apache-2.0"
] | 253 | 2021-08-30T08:50:27.000Z | 2022-03-26T09:21:08.000Z | # Copyright (c) 2021 PPViT Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | 40.227545 | 94 | 0.620125 |
223135074d80c82a77c3e9b47c439c7c3abe7792 | 632 | py | Python | brp/formutils.py | chop-dbhi/biorepo-portal | 7db13c40b2b9d62af43a28e4af08c2472b98fc96 | [
"BSD-2-Clause"
] | 6 | 2016-10-26T19:51:11.000Z | 2021-03-18T16:05:55.000Z | brp/formutils.py | chop-dbhi/biorepo-portal | 7db13c40b2b9d62af43a28e4af08c2472b98fc96 | [
"BSD-2-Clause"
] | 207 | 2015-09-24T17:41:37.000Z | 2021-05-18T18:14:08.000Z | brp/formutils.py | chop-dbhi/biorepo-portal | 7db13c40b2b9d62af43a28e4af08c2472b98fc96 | [
"BSD-2-Clause"
] | 8 | 2016-04-27T19:04:50.000Z | 2020-08-24T02:33:05.000Z | from django import template
from django.forms import widgets
register = template.Library()
| 28.727273 | 62 | 0.675633 |
2231aae6662593f94c1874f0078bab296c0ac96f | 2,104 | py | Python | SGE/src/configs/rng_seeds.py | dabingrosewood/MasterThesisProj | 7e40fa2395468a1bccef429362a61ed8515ecc11 | [
"MIT"
] | null | null | null | SGE/src/configs/rng_seeds.py | dabingrosewood/MasterThesisProj | 7e40fa2395468a1bccef429362a61ed8515ecc11 | [
"MIT"
] | null | null | null | SGE/src/configs/rng_seeds.py | dabingrosewood/MasterThesisProj | 7e40fa2395468a1bccef429362a61ed8515ecc11 | [
"MIT"
] | null | null | null | # CONFIG
seeds = [6598903756360202179, 2908409715321502665, 6126375328734039552, 1447957147463681860, 8611858271322161001, 1129180857020570158, 6362222119948958210, 7116573423379052515, 6183551438103583226, 4025455056998962241, 3253052445978017587, 8447055112402476503, 5958072666039141800, 704315598608973559, 127314171... | 701.333333 | 2,094 | 0.901616 |
223331808a66e2aa15f291c872b40388de56a8a3 | 2,793 | py | Python | learning/modules/visitation_softmax.py | esteng/guiding-multi-step | 3f0db0ba70b5851cc83878f4ed48cf82342a2ddf | [
"BSD-2-Clause"
] | null | null | null | learning/modules/visitation_softmax.py | esteng/guiding-multi-step | 3f0db0ba70b5851cc83878f4ed48cf82342a2ddf | [
"BSD-2-Clause"
] | null | null | null | learning/modules/visitation_softmax.py | esteng/guiding-multi-step | 3f0db0ba70b5851cc83878f4ed48cf82342a2ddf | [
"BSD-2-Clause"
] | null | null | null | import torch
import torch.nn as nn
import numpy as np
| 52.698113 | 139 | 0.713928 |
223355bd5379be3ac4c24bf1261412562ebdf029 | 96 | py | Python | baekjoon/easy-math/17362-finger.py | honux77/algorithm | 2ed8cef1fbee7ad96d8f2ae583666d52bd8892ee | [
"MIT"
] | 2 | 2019-02-08T01:23:07.000Z | 2020-11-19T12:23:52.000Z | baekjoon/easy-math/17362-finger.py | honux77/algorithm | 2ed8cef1fbee7ad96d8f2ae583666d52bd8892ee | [
"MIT"
] | null | null | null | baekjoon/easy-math/17362-finger.py | honux77/algorithm | 2ed8cef1fbee7ad96d8f2ae583666d52bd8892ee | [
"MIT"
] | null | null | null | n = int(input()) % 8
if n == 0:
print(2)
elif n <= 5:
print(n)
else:
print(10 - n)
| 12 | 20 | 0.458333 |
22350d67f0af834116a7d33c446043e6c69e8a30 | 908 | py | Python | Module/nikodou_information.py | RyoTozawa/LineBot | 14b34094f9a27650d412128334c3f09c7444ffc9 | [
"MIT"
] | 1 | 2018-10-16T07:50:59.000Z | 2018-10-16T07:50:59.000Z | Module/nikodou_information.py | RyoTozawa/LineBot | 14b34094f9a27650d412128334c3f09c7444ffc9 | [
"MIT"
] | 1 | 2018-04-09T11:03:25.000Z | 2018-04-09T11:03:25.000Z | Module/nikodou_information.py | tozastation/Line-Bot | 14b34094f9a27650d412128334c3f09c7444ffc9 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# coding:utf-8
import urllib
from xml.etree import ElementTree
import xml.dom.minidom as md
| 29.290323 | 95 | 0.643172 |
2235a02d239f6f03f7a8b8fc3826bf3189e27e0c | 927 | py | Python | climbing/add_new_climbs.py | JiriKalvoda/slama.dev | 4856d246858dd98a1852365b028873b61f5a6775 | [
"MIT"
] | 7 | 2019-09-15T19:55:11.000Z | 2021-12-27T11:40:20.000Z | climbing/add_new_climbs.py | JiriKalvoda/slama.dev | 4856d246858dd98a1852365b028873b61f5a6775 | [
"MIT"
] | 38 | 2020-05-18T12:49:13.000Z | 2022-03-23T12:51:28.000Z | climbing/add_new_climbs.py | JiriKalvoda/slama.dev | 4856d246858dd98a1852365b028873b61f5a6775 | [
"MIT"
] | 17 | 2020-02-16T19:49:25.000Z | 2022-02-06T14:28:35.000Z | #!/usr/bin/env python3
import os
import shutil
from subprocess import Popen, PIPE
from datetime import date
import yaml
os.chdir(os.path.dirname(os.path.realpath(__file__)))
CLIMBING_FOLDER = "."
CLIMBING_VIDEOS_FOLDER = os.path.join(CLIMBING_FOLDER, "videos")
CLIMBING_INFO = os.path.join(CLIMBING_FOLDER, "videos.... | 24.394737 | 64 | 0.614887 |
22369660633e2973cf659ea963259b0f27b54f98 | 952 | py | Python | posts/models.py | dnetochaves/blog | e04fda385490b671540b671631726584a533369c | [
"MIT"
] | null | null | null | posts/models.py | dnetochaves/blog | e04fda385490b671540b671631726584a533369c | [
"MIT"
] | null | null | null | posts/models.py | dnetochaves/blog | e04fda385490b671540b671631726584a533369c | [
"MIT"
] | null | null | null | from django.db import models
from categorias.models import Categoria
from django.contrib.auth.models import User
from django.utils import timezone
# Create your models here.
| 43.272727 | 103 | 0.765756 |
2237660edc2b315c6d1a8e947bbdd55091f794e0 | 2,765 | py | Python | src/ros_vision_interaction/examples/example_interaction.py | HaaaO/vision-project | 72256af07834195cfe52ac344aee5effcd0da978 | [
"MIT"
] | null | null | null | src/ros_vision_interaction/examples/example_interaction.py | HaaaO/vision-project | 72256af07834195cfe52ac344aee5effcd0da978 | [
"MIT"
] | 21 | 2020-09-09T18:55:58.000Z | 2021-07-26T19:42:46.000Z | src/ros_vision_interaction/examples/example_interaction.py | HaaaO/vision-project | 72256af07834195cfe52ac344aee5effcd0da978 | [
"MIT"
] | 6 | 2020-12-20T17:19:29.000Z | 2021-08-09T22:33:04.000Z | #!/usr/bin/env python
import datetime
import logging
import os
import random
import rospy
import schedule
from interaction_engine.cordial_interface import CordialInterface
from interaction_engine.database import Database
from interaction_engine.int_engine import InteractionEngine
from interaction_engine.message impor... | 24.469027 | 71 | 0.725859 |
2237956981da3e82e0d6350f1b78b20897718d48 | 2,441 | py | Python | explicalib/distribution/multiclass_distribution.py | euranova/estimating_eces | 9bfa81dd7a39ebe069c5b11b8e7a9bf9017e9350 | [
"MIT"
] | 2 | 2021-11-30T18:44:11.000Z | 2021-11-30T18:44:19.000Z | explicalib/distribution/multiclass_distribution.py | euranova/estimating_eces | 9bfa81dd7a39ebe069c5b11b8e7a9bf9017e9350 | [
"MIT"
] | null | null | null | explicalib/distribution/multiclass_distribution.py | euranova/estimating_eces | 9bfa81dd7a39ebe069c5b11b8e7a9bf9017e9350 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
@author: nicolas.posocco
"""
from abc import ABC
import numpy as np
| 29.059524 | 116 | 0.643179 |
22386109daaa28a3082c4a5bbbaea3c931eb1b4c | 3,169 | py | Python | test.py | JulioPDX/ci_cd_dev | e9b72c1b16e9f05a5e93e22f045fda605aac509f | [
"MIT"
] | 6 | 2021-10-31T18:36:49.000Z | 2022-03-14T02:26:37.000Z | test.py | JulioPDX/ci_cd_dev | e9b72c1b16e9f05a5e93e22f045fda605aac509f | [
"MIT"
] | null | null | null | test.py | JulioPDX/ci_cd_dev | e9b72c1b16e9f05a5e93e22f045fda605aac509f | [
"MIT"
] | 2 | 2022-02-10T16:58:46.000Z | 2022-03-07T05:00:57.000Z | #!/usr/bin/env python
"""Script used to test the network with batfish"""
from pybatfish.client.commands import *
from pybatfish.question import load_questions
from pybatfish.client.asserts import (
assert_no_duplicate_router_ids,
assert_no_incompatible_bgp_sessions,
assert_no_incompatible_ospf_sessions,
... | 30.471154 | 125 | 0.716945 |
22386711171a0a872717803582d333bc6bde0602 | 1,176 | py | Python | algs15_priority_queue/circular_queue.py | zhubaiyuan/learning-algorithms | ea9ee674878d535a9e9987c0d948c0357e0ed4da | [
"MIT"
] | null | null | null | algs15_priority_queue/circular_queue.py | zhubaiyuan/learning-algorithms | ea9ee674878d535a9e9987c0d948c0357e0ed4da | [
"MIT"
] | null | null | null | algs15_priority_queue/circular_queue.py | zhubaiyuan/learning-algorithms | ea9ee674878d535a9e9987c0d948c0357e0ed4da | [
"MIT"
] | null | null | null | """
A fixed-capacity queue implemented as circular queue.
Queue can become full.
* enqueue is O(1)
* dequeue is O(1)
"""
| 22.188679 | 54 | 0.519558 |
223a35394d8e357d916a263b18714241694b5330 | 4,300 | py | Python | pos_evaluation/create_train_dev_old.py | ayyoobimani/GNN-POSTAG | 47eb4bc6d64de565e87ee7cb8e9c5020d936138c | [
"MIT"
] | null | null | null | pos_evaluation/create_train_dev_old.py | ayyoobimani/GNN-POSTAG | 47eb4bc6d64de565e87ee7cb8e9c5020d936138c | [
"MIT"
] | null | null | null | pos_evaluation/create_train_dev_old.py | ayyoobimani/GNN-POSTAG | 47eb4bc6d64de565e87ee7cb8e9c5020d936138c | [
"MIT"
] | null | null | null | """
Create train and dev set from bronze data
Example call:
$ python3 create_train_dev.py --pos /mounts/work/ayyoob/results/gnn_align/yoruba/pos_tags_tam-x-bible-newworld_posfeatFalse_transformerFalse_trainWEFalse_maskLangTrue.pickle --bible tam-x-bible-newworld.txt --bronze 1 --lang tam
$ python3 create_train_dev.py ... | 38.738739 | 228 | 0.621163 |
223b3e8319f85381a1c34694d9c35926bb3d9b11 | 1,076 | py | Python | lib/spack/spack/test/permissions.py | SimeonEhrig/spack | 7fe0230492ecf0e497a84d578ea163570cf460eb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 2 | 2016-01-12T20:14:40.000Z | 2017-06-16T07:03:46.000Z | lib/spack/spack/test/permissions.py | SimeonEhrig/spack | 7fe0230492ecf0e497a84d578ea163570cf460eb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 75 | 2016-07-27T11:43:00.000Z | 2020-12-08T15:56:53.000Z | lib/spack/spack/test/permissions.py | SimeonEhrig/spack | 7fe0230492ecf0e497a84d578ea163570cf460eb | [
"ECL-2.0",
"Apache-2.0",
"MIT"
] | 8 | 2015-10-16T13:51:49.000Z | 2021-10-18T13:58:03.000Z | # 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 os
import pytest
import stat
from spack.hooks.permissions_setters import (
chmod_real_entries, InvalidPermissi... | 29.888889 | 76 | 0.736059 |
223b618424ceff584aa410ff8121dcf69f5567f4 | 323 | py | Python | data_statistics/variable_statistics.py | go-jugo/ml_event_prediction_trainer | 0d644b737afdef078ad5b6fc2b7e2549b964b56f | [
"Apache-2.0"
] | null | null | null | data_statistics/variable_statistics.py | go-jugo/ml_event_prediction_trainer | 0d644b737afdef078ad5b6fc2b7e2549b964b56f | [
"Apache-2.0"
] | null | null | null | data_statistics/variable_statistics.py | go-jugo/ml_event_prediction_trainer | 0d644b737afdef078ad5b6fc2b7e2549b964b56f | [
"Apache-2.0"
] | null | null | null | import dask.dataframe as dd
| 40.375 | 67 | 0.718266 |
223b7dfcfebf8324a056e2a31a6551d0d0397ac2 | 393 | py | Python | code/com/caicongyang/python/study/base/pandas_sql.py | caicongyang/python-study | e5db4d1b033d183da7e9af6a8c930bcaba2962f7 | [
"Apache-2.0"
] | null | null | null | code/com/caicongyang/python/study/base/pandas_sql.py | caicongyang/python-study | e5db4d1b033d183da7e9af6a8c930bcaba2962f7 | [
"Apache-2.0"
] | null | null | null | code/com/caicongyang/python/study/base/pandas_sql.py | caicongyang/python-study | e5db4d1b033d183da7e9af6a8c930bcaba2962f7 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import numpy as np
import pandas as pd
'''
sqlpandas
'''
from pandas import DataFrame, Series
from pandasql import sqldf, load_meat, load_births
df1 = DataFrame({'name': ['jack', 'tony', 'pony'], 'data1': range(3)})
print(df1)
sql = "select * from df1 where name = 'jack'"
... | 19.65 | 70 | 0.676845 |
223ccb03fea812be5bc8d09d17bc6aa157ee7449 | 5,016 | py | Python | tests/test_publish_parq.py | jacobtobias/s3parq | 0a56fbc7d93168c68e823f05b073b8d03e67a665 | [
"MIT"
] | null | null | null | tests/test_publish_parq.py | jacobtobias/s3parq | 0a56fbc7d93168c68e823f05b073b8d03e67a665 | [
"MIT"
] | null | null | null | tests/test_publish_parq.py | jacobtobias/s3parq | 0a56fbc7d93168c68e823f05b073b8d03e67a665 | [
"MIT"
] | null | null | null | import pytest
from mock import patch
import pandas as pd
import pyarrow as pa
import pyarrow.parquet as pq
import boto3
from string import ascii_lowercase
import random
from dfmock import DFMock
import s3parq.publish_parq as parq
import s3fs
from moto import mock_s3
| 36.347826 | 105 | 0.622608 |
223dcc250b1cfb0dc6bb2a2c2757035efcba4a73 | 2,936 | py | Python | docs/examples/examplesCategorization.py | benstear/pyiomica | bc26032b610fc911cc03b54115d6abdf53a56fce | [
"MIT"
] | 12 | 2019-11-22T21:44:13.000Z | 2022-03-06T21:46:31.000Z | docs/examples/examplesCategorization.py | benstear/pyiomica | bc26032b610fc911cc03b54115d6abdf53a56fce | [
"MIT"
] | null | null | null | docs/examples/examplesCategorization.py | benstear/pyiomica | bc26032b610fc911cc03b54115d6abdf53a56fce | [
"MIT"
] | 5 | 2019-07-25T21:03:42.000Z | 2021-06-09T02:14:30.000Z | #import sys
#sys.path.append("../..")
import pyiomica as pio
from pyiomica import categorizationFunctions as cf
if __name__ == '__main__':
# Unzip example data
with pio.zipfile.ZipFile(pio.os.path.join(pio.ConstantPyIOmicaExamplesDirectory, 'SLV.zip'), "r") as zipFile:
zipFile.extractall(... | 47.354839 | 149 | 0.742166 |
223df95481a53841ba1260a2ab6e7adbdff16f31 | 2,612 | py | Python | tworaven_apps/eventdata_queries/initialization/icews_unique_count.py | TwoRavens/TwoRavens | e5f820557d6646df525ceed15e17d79f4159cf0a | [
"Apache-2.0"
] | 20 | 2017-12-11T07:26:06.000Z | 2021-11-22T16:16:20.000Z | tworaven_apps/eventdata_queries/initialization/icews_unique_count.py | TwoRavens/TwoRavens | e5f820557d6646df525ceed15e17d79f4159cf0a | [
"Apache-2.0"
] | 849 | 2017-10-20T18:21:18.000Z | 2022-02-18T02:45:44.000Z | tworaven_apps/eventdata_queries/initialization/icews_unique_count.py | TwoRavens/TwoRavens | e5f820557d6646df525ceed15e17d79f4159cf0a | [
"Apache-2.0"
] | 1 | 2020-05-18T06:02:13.000Z | 2020-05-18T06:02:13.000Z | # returns number of unique records for icews with different filtering:
# -by rounded lat/lon (100,000)
# -by country, district, province, city (100,000)
# -by lat/lon, filtered by 2 or more matches (70,000)
from pymongo import MongoClient
import os
mongo_client = MongoClient(host='localhost', port=27017) # Default p... | 20.092308 | 72 | 0.343415 |
223edb2e5970e591f491deb0d0fde065371aadb5 | 7,576 | py | Python | OcCo_Torch/models/pointnet_util.py | sun-pyo/OcCo | e2e12dbaa8f9b98fb8c42fc32682f49e99be302f | [
"MIT"
] | 158 | 2020-08-19T18:13:28.000Z | 2022-03-30T13:55:32.000Z | OcCo_Torch/models/pointnet_util.py | sun-pyo/OcCo | e2e12dbaa8f9b98fb8c42fc32682f49e99be302f | [
"MIT"
] | 28 | 2020-05-30T04:02:33.000Z | 2022-03-30T15:46:38.000Z | OcCo_Torch/models/pointnet_util.py | sun-pyo/OcCo | e2e12dbaa8f9b98fb8c42fc32682f49e99be302f | [
"MIT"
] | 18 | 2020-08-19T19:52:38.000Z | 2022-02-06T11:42:26.000Z | # Copyright (c) 2020. Hanchen Wang, hw501@cam.ac.uk
# Ref: https://github.com/fxia22/pointnet.pytorch/pointnet/model.py
import torch, torch.nn as nn, numpy as np, torch.nn.functional as F
from torch.autograd import Variable
# STN -> Spatial Transformer Network
| 33.522124 | 105 | 0.567318 |
2241d0bcc483df8ae598bcac2ffa98c9d73b4660 | 747 | py | Python | Week#3__Assignment#3/join.py | P7h/IntroToDataScience__Coursera_Course | 4f3d4073e552c7e6f5d1e31c0391eccec32d3786 | [
"Apache-2.0"
] | 1 | 2015-10-26T00:32:09.000Z | 2015-10-26T00:32:09.000Z | Week#3__Assignment#3/join.py | P7h/IntroToDataScience__Coursera_Course | 4f3d4073e552c7e6f5d1e31c0391eccec32d3786 | [
"Apache-2.0"
] | null | null | null | Week#3__Assignment#3/join.py | P7h/IntroToDataScience__Coursera_Course | 4f3d4073e552c7e6f5d1e31c0391eccec32d3786 | [
"Apache-2.0"
] | null | null | null | import MapReduce
import sys
"""
SQL style Joins in MapReduce
"""
mr = MapReduce.MapReduce()
# =============================
# Do not modify above this line
# Do not modify below this line
# =============================
if __name__ == '__main__':
inputdata = open(sys.argv[1])
mr.execute(inputdata, mapper, reducer... | 20.189189 | 44 | 0.609103 |
224336ed5538a9d61b10299e07b1b099064fc032 | 823 | py | Python | tests/test_testresources.py | sjoerdk/anonapi | ade94da2b8eb2fb94f831ef77e563f750f88d0ba | [
"MIT"
] | null | null | null | tests/test_testresources.py | sjoerdk/anonapi | ade94da2b8eb2fb94f831ef77e563f750f88d0ba | [
"MIT"
] | 408 | 2018-11-24T19:41:10.000Z | 2022-03-31T23:48:54.000Z | tests/test_testresources.py | sjoerdk/anonapi | ade94da2b8eb2fb94f831ef77e563f750f88d0ba | [
"MIT"
] | 2 | 2018-11-11T12:56:03.000Z | 2021-08-09T01:53:07.000Z | from anonapi.testresources import (
MockAnonClientTool,
JobInfoFactory,
RemoteAnonServerFactory,
JobStatus,
)
| 30.481481 | 85 | 0.690158 |
2243b6cc5ce377cffdd91e6609c4b0155421a8c1 | 13,442 | py | Python | homeassistant/components/mikrotik/hub.py | jvitkauskas/home-assistant | 3718b25bd9528188530f291f0810a1c7970abcdb | [
"Apache-2.0"
] | null | null | null | homeassistant/components/mikrotik/hub.py | jvitkauskas/home-assistant | 3718b25bd9528188530f291f0810a1c7970abcdb | [
"Apache-2.0"
] | 7 | 2016-04-09T20:56:30.000Z | 2016-04-19T21:28:46.000Z | homeassistant/components/mikrotik/hub.py | jvitkauskas/home-assistant | 3718b25bd9528188530f291f0810a1c7970abcdb | [
"Apache-2.0"
] | null | null | null | """The Mikrotik router class."""
from datetime import timedelta
import logging
import socket
import ssl
import librouteros
from librouteros.login import plain as login_plain, token as login_token
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_USERNAME, CONF_VERIFY_SSL
from homeassistant.exceptions imp... | 32.468599 | 88 | 0.602515 |
22441b73e069c3528a08a1ed36f4c0850e6085f0 | 4,137 | py | Python | gemlog_from_rss/spip/page.py | Hookz/Gemlog-from-RSS | b57a311db3008e8b0df2442236c4729a06d9b74d | [
"MIT"
] | 1 | 2021-02-19T16:06:07.000Z | 2021-02-19T16:06:07.000Z | gemlog_from_rss/spip/page.py | Hookz/Gemlog-from-RSS | b57a311db3008e8b0df2442236c4729a06d9b74d | [
"MIT"
] | null | null | null | gemlog_from_rss/spip/page.py | Hookz/Gemlog-from-RSS | b57a311db3008e8b0df2442236c4729a06d9b74d | [
"MIT"
] | null | null | null | from bs4 import BeautifulSoup
import requests
import re
from lxml.html import fromstring
from lxml.etree import ParserError
from gemlog_from_rss.spip import SinglePost
| 32.069767 | 109 | 0.547982 |
2245fe03d22e27328780ecdf4fb5f3ecb80912ed | 1,421 | py | Python | simulation/aivika/modeler/arrival_timer.py | dsorokin/aivika-modeler | 5c112015f9af6ba1974a3b208842da01e705f9ac | [
"BSD-3-Clause"
] | null | null | null | simulation/aivika/modeler/arrival_timer.py | dsorokin/aivika-modeler | 5c112015f9af6ba1974a3b208842da01e705f9ac | [
"BSD-3-Clause"
] | null | null | null | simulation/aivika/modeler/arrival_timer.py | dsorokin/aivika-modeler | 5c112015f9af6ba1974a3b208842da01e705f9ac | [
"BSD-3-Clause"
] | null | null | null | # Copyright (c) 2017 David Sorokin <david.sorokin@gmail.com>
#
# Licensed under BSD3. See the LICENSE.txt file in the root of this distribution.
from simulation.aivika.modeler.model import *
from simulation.aivika.modeler.port import *
def create_arrival_timer(model, name, descr = None):
"""Return a new timer tha... | 36.435897 | 105 | 0.712878 |
2246b2f969806313a587b3933434d8a9f94f2b5f | 106 | py | Python | mundo 1/aula 7/exer8.py | jonatan098/cursopython | 6e4cbaef6229e230fdbc66d80ec1b5a089887b0d | [
"MIT"
] | null | null | null | mundo 1/aula 7/exer8.py | jonatan098/cursopython | 6e4cbaef6229e230fdbc66d80ec1b5a089887b0d | [
"MIT"
] | null | null | null | mundo 1/aula 7/exer8.py | jonatan098/cursopython | 6e4cbaef6229e230fdbc66d80ec1b5a089887b0d | [
"MIT"
] | 1 | 2020-02-22T17:21:05.000Z | 2020-02-22T17:21:05.000Z | m = float(input('digite o metro '))
print(f'{m} metros e igual {m*100} centimetros e {m*1000} milimetros') | 53 | 70 | 0.688679 |
2246b7989fa46d68e0d0a29597a7a6170e8898d9 | 859 | py | Python | ros/src/airsim_ros_pkgs/scripts/readscan.py | juwangvsu/AirSim | fcf8c7d89821a9067d53f0d083c7bc6efac1776c | [
"MIT"
] | null | null | null | ros/src/airsim_ros_pkgs/scripts/readscan.py | juwangvsu/AirSim | fcf8c7d89821a9067d53f0d083c7bc6efac1776c | [
"MIT"
] | null | null | null | ros/src/airsim_ros_pkgs/scripts/readscan.py | juwangvsu/AirSim | fcf8c7d89821a9067d53f0d083c7bc6efac1776c | [
"MIT"
] | 1 | 2021-03-23T23:11:02.000Z | 2021-03-23T23:11:02.000Z | #!/usr/bin/env python
import rospy
import rosbag
import os
import sys
import textwrap
import yaml
lidarmsg=None
################# read the lidar msg from yaml file and return ##############
if __name__ == '__main__':
readlidardummy()
| 23.861111 | 100 | 0.694994 |
2247d6e5fabfa0bfb68bd37d1e8736537d83e496 | 4,375 | py | Python | flytekit/models/qubole.py | slai/flytekit | 9d73d096b748d263a638e6865d15db4880845305 | [
"Apache-2.0"
] | null | null | null | flytekit/models/qubole.py | slai/flytekit | 9d73d096b748d263a638e6865d15db4880845305 | [
"Apache-2.0"
] | 2 | 2021-06-26T04:32:43.000Z | 2021-07-14T04:47:52.000Z | flytekit/models/qubole.py | slai/flytekit | 9d73d096b748d263a638e6865d15db4880845305 | [
"Apache-2.0"
] | null | null | null | from flyteidl.plugins import qubole_pb2 as _qubole
from flytekit.models import common as _common
| 26.355422 | 109 | 0.597257 |
224b518501a4fc21242f8b7e19fdfbb05fcec01d | 1,583 | py | Python | app/app.py | SogoKato/mecab-parser | 402f22b4da283dfc74935fc66f092452158beb56 | [
"MIT"
] | null | null | null | app/app.py | SogoKato/mecab-parser | 402f22b4da283dfc74935fc66f092452158beb56 | [
"MIT"
] | null | null | null | app/app.py | SogoKato/mecab-parser | 402f22b4da283dfc74935fc66f092452158beb56 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from dataclasses import asdict
from logging import DEBUG
import os
from flask import Flask, jsonify, request
from werkzeug.exceptions import HTTPException
from mecab_parser import MecabParserFactory
app = Flask(__name__)
app.config["JSON_AS_ASCII"] = False
if __name__ == "__main__":
p... | 27.77193 | 94 | 0.599495 |
224e634019de5a0413838cff34d92fa96b8463fb | 1,402 | py | Python | src/data_migrator/emitters/__init__.py | schubergphilis/data-migrator | b5ced9abd6bc2c60e9c115951fee38c2fd08923f | [
"MIT"
] | 18 | 2017-04-27T08:57:40.000Z | 2021-04-01T22:39:40.000Z | src/data_migrator/emitters/__init__.py | schubergphilis/data-migrator | b5ced9abd6bc2c60e9c115951fee38c2fd08923f | [
"MIT"
] | 1,077 | 2017-04-13T20:56:44.000Z | 2022-03-31T01:23:50.000Z | src/data_migrator/emitters/__init__.py | schubergphilis/data-migrator | b5ced9abd6bc2c60e9c115951fee38c2fd08923f | [
"MIT"
] | 6 | 2017-04-17T14:14:45.000Z | 2020-05-05T10:05:23.000Z | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""Emitters are used to export models to output format.
This module contains all classes for emitters: base and actuals. Currently
the system has two emitters: :class:`~.CSVEmitter` and :class:`~.MySQLEmitter`
implemented, of which the last is the default emitter. An emitt... | 32.604651 | 78 | 0.738231 |
22529ca1da0ceee85ccd01a18946c0340e79ffbb | 330 | py | Python | cycleshare/migrations/0013_remove_cycle_toprofile.py | vasundhara7/College-EWallet | 0a4c32bc08218650635a04fb9a9e28446fd4f3e1 | [
"Apache-2.0"
] | 2 | 2019-07-28T00:34:09.000Z | 2020-06-18T11:58:03.000Z | cycleshare/migrations/0013_remove_cycle_toprofile.py | vasundhara7/College-EWallet | 0a4c32bc08218650635a04fb9a9e28446fd4f3e1 | [
"Apache-2.0"
] | null | null | null | cycleshare/migrations/0013_remove_cycle_toprofile.py | vasundhara7/College-EWallet | 0a4c32bc08218650635a04fb9a9e28446fd4f3e1 | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.0.9 on 2018-12-12 08:18
from django.db import migrations
| 18.333333 | 47 | 0.593939 |
2252c6b7f19070373e0889abae519f050d93b6aa | 5,495 | py | Python | projects/aFPGA/10_python/npu/generate_npu_sram_init_file.py | helloworld1983/NPU_on_FPGA | 1d0626dbed463cfacd47805a3214a43662f5b28c | [
"BSD-2-Clause"
] | 63 | 2018-08-05T14:30:47.000Z | 2022-03-31T09:41:55.000Z | projects/aFPGA/10_python/npu/generate_npu_sram_init_file.py | cxdzyq1110/NPU_on_FPGA | 1d0626dbed463cfacd47805a3214a43662f5b28c | [
"BSD-2-Clause"
] | null | null | null | projects/aFPGA/10_python/npu/generate_npu_sram_init_file.py | cxdzyq1110/NPU_on_FPGA | 1d0626dbed463cfacd47805a3214a43662f5b28c | [
"BSD-2-Clause"
] | 22 | 2018-11-06T13:01:28.000Z | 2022-03-09T08:52:27.000Z | import math
import numpy as np
from scipy import signal
#%%
M = 16; N = 100;
AddImm = 1000;
MAT_M = 3; MAT_N = 5; MAT_P = 7;
Pm = 5; Pn = 5;
Km = 5; Kn = 5;
MODE = 1;
fpp = open("./npu_verification_para.list", "w")
fpp.write("%d\n"%(M))
fpp.write("%d\n"%(N))
fpp.write("%d\n"%(AddImm))
fpp.write("%d\n"%(MAT_M))
fpp.w... | 25.67757 | 67 | 0.601274 |
225438e5c2b8551e69ccb321df71b6704ae2b4d5 | 17 | py | Python | 2.py | modianor/git_project | 21d664bfa31d6f3e584ffc594514ea4342b6bc3f | [
"MIT"
] | null | null | null | 2.py | modianor/git_project | 21d664bfa31d6f3e584ffc594514ea4342b6bc3f | [
"MIT"
] | null | null | null | 2.py | modianor/git_project | 21d664bfa31d6f3e584ffc594514ea4342b6bc3f | [
"MIT"
] | null | null | null | A = 1
B = 2
C = 4 | 5.666667 | 5 | 0.352941 |
2255fb2ff207d881f927e1b321a4dc62c8ca610a | 17 | py | Python | src/ixu/commands/server/__init__.py | luanguimaraesla/ixu | f213bdf27fc7336a76110cf3f89e30ae1d5a64fb | [
"Apache-2.0"
] | 2 | 2021-05-14T17:14:09.000Z | 2021-06-13T21:35:04.000Z | src/ixu/commands/server/__init__.py | luanguimaraesla/ixu | f213bdf27fc7336a76110cf3f89e30ae1d5a64fb | [
"Apache-2.0"
] | null | null | null | src/ixu/commands/server/__init__.py | luanguimaraesla/ixu | f213bdf27fc7336a76110cf3f89e30ae1d5a64fb | [
"Apache-2.0"
] | null | null | null | from . import up
| 8.5 | 16 | 0.705882 |
225632b6786bc6319f8c49ffcd364075da52275b | 247 | py | Python | pythoncev/exercicios/ex096.py | gustavobelloni/Python | 156a99d10f460f0fcaea18a87d35d4b0e3dba493 | [
"MIT"
] | null | null | null | pythoncev/exercicios/ex096.py | gustavobelloni/Python | 156a99d10f460f0fcaea18a87d35d4b0e3dba493 | [
"MIT"
] | null | null | null | pythoncev/exercicios/ex096.py | gustavobelloni/Python | 156a99d10f460f0fcaea18a87d35d4b0e3dba493 | [
"MIT"
] | null | null | null |
print('Controle de Terrenos')
print('--------------------')
l = float(input('Largura (m): '))
c = float(input('Comprimento (m): '))
rea(l, c)
| 22.454545 | 59 | 0.554656 |
22567858f90706f357ad018d732e41ca1cb74961 | 2,678 | py | Python | readthedocs/proxito/views/decorators.py | tkoyama010/readthedocs.org | aac8fb39586db902d9fbb51b639dd281c819dae2 | [
"MIT"
] | 2 | 2021-05-16T06:57:15.000Z | 2021-05-16T06:57:18.000Z | readthedocs/proxito/views/decorators.py | tkoyama010/readthedocs.org | aac8fb39586db902d9fbb51b639dd281c819dae2 | [
"MIT"
] | 12 | 2021-03-21T13:16:50.000Z | 2022-03-12T00:55:05.000Z | readthedocs/proxito/views/decorators.py | mondeja/readthedocs.org | fb01c6d9d78272e3f4fd146697e8760c04e4fbb6 | [
"MIT"
] | 1 | 2021-07-09T14:02:39.000Z | 2021-07-09T14:02:39.000Z | import logging
from functools import wraps
from django.http import Http404
from readthedocs.projects.models import Project, ProjectRelationship
log = logging.getLogger(__name__) # noqa
def map_subproject_slug(view_func):
"""
A decorator that maps a ``subproject_slug`` URL param into a Project.
:raise... | 33.475 | 100 | 0.581404 |
2256a0c4684d099dc813eeba74a7fcc9133e772a | 4,217 | py | Python | tortue_geniale/tg_channel_events.py | vavalm/discord_bot_tortue_geniale | 2fa2865166dd109b1138b77ed7f21d8e59efd8ab | [
"MIT"
] | null | null | null | tortue_geniale/tg_channel_events.py | vavalm/discord_bot_tortue_geniale | 2fa2865166dd109b1138b77ed7f21d8e59efd8ab | [
"MIT"
] | null | null | null | tortue_geniale/tg_channel_events.py | vavalm/discord_bot_tortue_geniale | 2fa2865166dd109b1138b77ed7f21d8e59efd8ab | [
"MIT"
] | null | null | null | import discord
import asyncio
import re
import logging
from data.groups_name import free_random_name
logging.basicConfig(level=logging.INFO)
client = discord.Client()
| 35.436975 | 116 | 0.596396 |
22574ae53ea97f421f17d51078183bbb695cb068 | 566 | py | Python | middleware/login_required.py | ahmetelgun/flask-boilerplate | 56bc0235b5f00a7aaca6a9536a1744442863b8b6 | [
"Apache-2.0"
] | 2 | 2021-12-01T20:48:44.000Z | 2022-02-04T16:33:33.000Z | middleware/login_required.py | ahmetelgun/flask_authentication_boilerplate | 56bc0235b5f00a7aaca6a9536a1744442863b8b6 | [
"Apache-2.0"
] | null | null | null | middleware/login_required.py | ahmetelgun/flask_authentication_boilerplate | 56bc0235b5f00a7aaca6a9536a1744442863b8b6 | [
"Apache-2.0"
] | null | null | null | from flask import request, make_response, jsonify, g
from datetime import datetime
from functools import wraps
import jwt
from models import DBContext, User
from settings import SECRET_KEY
from service import is_token_valid
| 22.64 | 52 | 0.681979 |
22574e100d92910a2acaa1fb84cd7d78b47e8242 | 2,189 | py | Python | libs/sqlservice/utils.py | smartadvising/smartadvising-api | 74cfcc336c87523fcb011a96bc4506ecdef93afe | [
"MIT"
] | null | null | null | libs/sqlservice/utils.py | smartadvising/smartadvising-api | 74cfcc336c87523fcb011a96bc4506ecdef93afe | [
"MIT"
] | null | null | null | libs/sqlservice/utils.py | smartadvising/smartadvising-api | 74cfcc336c87523fcb011a96bc4506ecdef93afe | [
"MIT"
] | null | null | null | """
Utilities
---------
The utilities module.
"""
from collections.abc import Mapping, Sequence
from functools import wraps
import types
def classonce(meth):
"""Decorator that executes a class method once, stores the results at the
class level, and subsequently returns those results for every future method... | 27.708861 | 79 | 0.640018 |
2257918164befc9b4532377573ee36b973df3e73 | 1,817 | py | Python | tests/test_normals.py | foobarbecue/trimesh | db2c649ebc577874702644248964b3295bd6ed5b | [
"MIT"
] | null | null | null | tests/test_normals.py | foobarbecue/trimesh | db2c649ebc577874702644248964b3295bd6ed5b | [
"MIT"
] | null | null | null | tests/test_normals.py | foobarbecue/trimesh | db2c649ebc577874702644248964b3295bd6ed5b | [
"MIT"
] | 1 | 2019-05-31T03:37:21.000Z | 2019-05-31T03:37:21.000Z | try:
from . import generic as g
except BaseException:
import generic as g
if __name__ == '__main__':
g.trimesh.util.attach_to_log()
g.unittest.main()
| 41.295455 | 79 | 0.587782 |
2257acdf6a3fd8c165f7da9ebcd60fa9bce30be5 | 14,692 | py | Python | flagmaker/settings.py | google/sa360-bigquery-bootstrapper | ca25e9d9f4d00f392970e5e942942f9acb21952b | [
"Apache-2.0"
] | 4 | 2020-03-14T03:26:46.000Z | 2020-12-13T14:43:22.000Z | flagmaker/settings.py | google/sa360-bigquery-bootstrapper | ca25e9d9f4d00f392970e5e942942f9acb21952b | [
"Apache-2.0"
] | 1 | 2020-11-17T16:26:50.000Z | 2020-11-17T16:26:50.000Z | flagmaker/settings.py | google/sa360-bigquery-bootstrapper | ca25e9d9f4d00f392970e5e942942f9acb21952b | [
"Apache-2.0"
] | 1 | 2020-10-13T17:02:23.000Z | 2020-10-13T17:02:23.000Z | # /***********************************************************************
# Copyright 2019 Google 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/LICE... | 33.239819 | 80 | 0.544854 |
225800b91896c420ce99d82a83f56df5a8a804aa | 19,390 | py | Python | cli/sub.py | mylovage/GolemQT | 7560d4e67d564022fbbdc00c069a51c673bfe267 | [
"MIT"
] | null | null | null | cli/sub.py | mylovage/GolemQT | 7560d4e67d564022fbbdc00c069a51c673bfe267 | [
"MIT"
] | null | null | null | cli/sub.py | mylovage/GolemQT | 7560d4e67d564022fbbdc00c069a51c673bfe267 | [
"MIT"
] | null | null | null | # coding:utf-8
#
# The MIT License (MIT)
#
# Copyright (c) 2018-2020 azai/Rgveda/GolemQuant base on QUANTAXIS/yutiansut
#
# 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, ... | 37.145594 | 143 | 0.545848 |
225834b3b08a2a19311dda4b3b5c026b4df674f0 | 3,125 | py | Python | setup.py | voxel51/eta | 17fb1148e853704872ed50e0e30c7800272b8398 | [
"Apache-2.0"
] | 25 | 2018-07-21T02:37:34.000Z | 2022-03-30T12:57:54.000Z | setup.py | voxel51/eta | 17fb1148e853704872ed50e0e30c7800272b8398 | [
"Apache-2.0"
] | 183 | 2018-06-13T18:57:00.000Z | 2022-02-24T14:35:49.000Z | setup.py | voxel51/eta | 17fb1148e853704872ed50e0e30c7800272b8398 | [
"Apache-2.0"
] | 13 | 2018-09-10T18:46:58.000Z | 2022-02-07T02:25:31.000Z | #!/usr/bin/env python
"""
Installs ETA.
Copyright 2017-2021, Voxel51, Inc.
voxel51.com
"""
import os
from setuptools import setup, find_packages
from wheel.bdist_wheel import bdist_wheel
VERSION = "0.6.1"
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name="voxel51-eta",
ver... | 28.935185 | 70 | 0.58944 |