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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
67e6967f9057bb9fe14cc5543b93fd2036edcf8d | 2,662 | py | Python | 8/star2.py | nfitzen/advent-of-code-2020 | 774b7db35aaf31b0e72a569b3441343d50f4d079 | [
"CC0-1.0",
"MIT"
] | null | null | null | 8/star2.py | nfitzen/advent-of-code-2020 | 774b7db35aaf31b0e72a569b3441343d50f4d079 | [
"CC0-1.0",
"MIT"
] | null | null | null | 8/star2.py | nfitzen/advent-of-code-2020 | 774b7db35aaf31b0e72a569b3441343d50f4d079 | [
"CC0-1.0",
"MIT"
] | null | null | null | #!/usr/bin/env python3
# SPDX-FileCopyrightText: 2020 Nathaniel Fitzenrider <https://github.com/nfitzen>
#
# SPDX-License-Identifier: CC0-1.0
# Jesus Christ this was overengineered to Hell and back.
from typing import List, Tuple, Union
with open('input.txt') as f:
instructions = f.readlines()
# It's not a univ... | 31.690476 | 98 | 0.583396 |
67e77f21e80bffc6d63b3d609643ba3804770c10 | 1,010 | py | Python | projects/20151163/api/api.py | universe3306/WebStudio2019 | f6827875c449e762bae21e0d4d4fc76187626930 | [
"MIT"
] | 14 | 2019-03-06T10:32:40.000Z | 2021-11-18T01:44:28.000Z | projects/20151163/api/api.py | universe3306/WebStudio2019 | f6827875c449e762bae21e0d4d4fc76187626930 | [
"MIT"
] | 35 | 2019-03-13T07:04:02.000Z | 2019-10-08T06:26:45.000Z | projects/20151163/api/api.py | universe3306/WebStudio2019 | f6827875c449e762bae21e0d4d4fc76187626930 | [
"MIT"
] | 22 | 2019-03-11T11:00:24.000Z | 2019-09-14T06:53:30.000Z | from flask import Flask, request, jsonify
from flask_restful import Api, Resource
from flask_cors import CORS
import json, os
from models import db, User
from UserList import UserList
from PicturesList import Picture, PicturesList, Uploader
basedir = os.path.dirname(os.path.abspath(__file__))
SQLALCHEMY_DATABASE_URI ... | 26.578947 | 72 | 0.725743 |
67e793c1f1db4accdabd37b5f3ae0c798f19a953 | 40,518 | py | Python | app.py | sharonytlau/dash-loan-calculator | b789d30953c8836cc5e861f36a66e73aace24e2c | [
"Apache-2.0"
] | 1 | 2021-10-30T14:41:15.000Z | 2021-10-30T14:41:15.000Z | app.py | sharonytlau/dash-loan-calculator | b789d30953c8836cc5e861f36a66e73aace24e2c | [
"Apache-2.0"
] | null | null | null | app.py | sharonytlau/dash-loan-calculator | b789d30953c8836cc5e861f36a66e73aace24e2c | [
"Apache-2.0"
] | null | null | null | # Ying Tung Lau - sharonlau@brandeis.edu
# Jiaying Yan - jiayingyan@brandeis.edu
# <editor-fold desc="import modules">
import pandas as pd
import numpy as np
import json
import os
import re
import dash
import dash_table
import dash_core_components as dcc
import dash_html_components as html
import dash_bootstrap_compon... | 45.88675 | 145 | 0.542722 |
67e7da06bf5b0c480be1e68da30d3dd8280232f5 | 2,888 | py | Python | examples/advanced-topics/IIR-FIR/delay_channels.py | qua-platform/qua-libs | 805a3b1a69980b939b370b3ba09434bc26dc45ec | [
"BSD-3-Clause"
] | 21 | 2021-05-21T08:23:34.000Z | 2022-03-25T11:30:55.000Z | examples/advanced-topics/IIR-FIR/delay_channels.py | qua-platform/qua-libs | 805a3b1a69980b939b370b3ba09434bc26dc45ec | [
"BSD-3-Clause"
] | 9 | 2021-05-13T19:56:00.000Z | 2021-12-21T05:11:04.000Z | examples/advanced-topics/IIR-FIR/delay_channels.py | qua-platform/qua-libs | 805a3b1a69980b939b370b3ba09434bc26dc45ec | [
"BSD-3-Clause"
] | 2 | 2021-06-21T10:56:40.000Z | 2021-12-19T14:21:33.000Z | import scipy.signal as sig
import numpy as np
from qm.qua import *
import matplotlib.pyplot as plt
import warnings
from qm.QuantumMachinesManager import (
SimulationConfig,
QuantumMachinesManager,
LoopbackInterface,
)
ntaps = 40
delays = [0, 22, 22.25, 22.35]
for delay in delays:
de... | 28.594059 | 88 | 0.480956 |
67e7dfe8a3a11d78c472c0f64358e33daa1e6979 | 1,696 | py | Python | listener.py | chrismarget/ios-icmp-channel | b2a09f1c345816f525a3f7aed6a562631b0fc7e6 | [
"Apache-2.0"
] | 1 | 2018-01-30T01:53:20.000Z | 2018-01-30T01:53:20.000Z | listener.py | chrismarget/ios-icmp-channel | b2a09f1c345816f525a3f7aed6a562631b0fc7e6 | [
"Apache-2.0"
] | null | null | null | listener.py | chrismarget/ios-icmp-channel | b2a09f1c345816f525a3f7aed6a562631b0fc7e6 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
import sys
s = open_icmp_sniffer()
messages = {}
while True:
p = s.recvfrom(65565)
sender = p[1][0]
sequence = ord(p[0][-2])
payload = p[0][-1]
if sender not in messages.keys():
messages[sender] = message(sender, sequence, payload)
else:
messages[sender].... | 27.803279 | 71 | 0.56191 |
67e9dd76bdad3ed45018c88774b6229ebe78a253 | 12,780 | py | Python | hapiclient/util.py | hbatta/client-python | 1c1d32fce9e84bc1a4938ae7adc30cef8d682aa4 | [
"BSD-3-Clause"
] | null | null | null | hapiclient/util.py | hbatta/client-python | 1c1d32fce9e84bc1a4938ae7adc30cef8d682aa4 | [
"BSD-3-Clause"
] | null | null | null | hapiclient/util.py | hbatta/client-python | 1c1d32fce9e84bc1a4938ae7adc30cef8d682aa4 | [
"BSD-3-Clause"
] | null | null | null | def setopts(defaults, given):
"""Override default keyword dictionary options.
kwargs = setopts(defaults, kwargs)
A warning is shown if kwargs contains a key not found in default.
"""
# Override defaults
for key, value in given.items():
if type(given[key]) == dict:
setopts(... | 30.356295 | 103 | 0.590141 |
67ea232a964b415b5c48734cb2b31e366146e901 | 269 | py | Python | docs/examples/combine-configs/convert.py | Mbompr/fromconfig | eb34582c79a9a9e3b9e60d41fec2ac6a619e9c27 | [
"Apache-2.0"
] | 19 | 2021-03-18T16:48:03.000Z | 2022-03-02T13:09:21.000Z | docs/examples/combine-configs/convert.py | Mbompr/fromconfig | eb34582c79a9a9e3b9e60d41fec2ac6a619e9c27 | [
"Apache-2.0"
] | 3 | 2021-04-23T23:03:29.000Z | 2021-05-11T14:09:16.000Z | docs/examples/combine-configs/convert.py | Mbompr/fromconfig | eb34582c79a9a9e3b9e60d41fec2ac6a619e9c27 | [
"Apache-2.0"
] | 3 | 2021-04-19T22:05:34.000Z | 2022-02-21T11:32:16.000Z | """Convert file format."""
import fire
import fromconfig
def convert(path_input, path_output):
"""Convert input into output with load and dump."""
fromconfig.dump(fromconfig.load(path_input), path_output)
if __name__ == "__main__":
fire.Fire(convert)
| 17.933333 | 61 | 0.717472 |
67eb8e7c17780b803858f13f5e39eadc802e465d | 11,257 | py | Python | pyfibot/modules/module_rss.py | aapa/pyfibot | a8a4330d060b05f0ce63cbcfc6915afb8141955f | [
"BSD-3-Clause"
] | null | null | null | pyfibot/modules/module_rss.py | aapa/pyfibot | a8a4330d060b05f0ce63cbcfc6915afb8141955f | [
"BSD-3-Clause"
] | null | null | null | pyfibot/modules/module_rss.py | aapa/pyfibot | a8a4330d060b05f0ce63cbcfc6915afb8141955f | [
"BSD-3-Clause"
] | null | null | null | from __future__ import unicode_literals, print_function, division
import feedparser
import dataset
from twisted.internet.reactor import callLater
from threading import Thread
import twisted.internet.error
import logging
logger = logging.getLogger('module_rss')
DATABASE = None
updater = None
botref = None
config = {}
... | 32.819242 | 111 | 0.587634 |
67ec5c96d81577346cea04b4409e2275d4e56466 | 15,335 | py | Python | main.py | omidsakhi/progressive_introvae | 8f052ca7202196fe214ea238afe60e806660d6d4 | [
"MIT"
] | 5 | 2018-10-19T03:30:27.000Z | 2019-03-25T06:01:27.000Z | main.py | omidsakhi/progressive_introvae | 8f052ca7202196fe214ea238afe60e806660d6d4 | [
"MIT"
] | 1 | 2019-03-27T08:39:55.000Z | 2019-03-27T08:39:55.000Z | main.py | omidsakhi/progressive_introvae | 8f052ca7202196fe214ea238afe60e806660d6d4 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os, ops, utils
# Standard Imports
from absl import flags
import absl.logging as _logging # pylint: disable=unused-import
import numpy as np
import tensorflow as tf
from PIL import Image
import input_pi... | 44.708455 | 159 | 0.637105 |
67ecb4f05375d9a4dfbfec0d8b5a28b3678e0e4e | 172 | py | Python | docs/examples/timer.py | vlcinsky/nameko | 88d7e5211de4fcc1c34cd7f84d7c77f0619c5f5d | [
"Apache-2.0"
] | 3,425 | 2016-11-10T17:12:42.000Z | 2022-03-31T19:07:49.000Z | docs/examples/timer.py | vlcinsky/nameko | 88d7e5211de4fcc1c34cd7f84d7c77f0619c5f5d | [
"Apache-2.0"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | docs/examples/timer.py | vlcinsky/nameko | 88d7e5211de4fcc1c34cd7f84d7c77f0619c5f5d | [
"Apache-2.0"
] | 420 | 2016-11-17T05:46:42.000Z | 2022-03-23T12:36:06.000Z | from nameko.timer import timer
| 17.2 | 38 | 0.627907 |
67ed812b563acfcc4e10ecbff190182561180c0d | 752 | py | Python | app/controllers/config/system/slack.py | grepleria/SnitchDNS | 24f98b01fd5fca9aa2c660d6ee15742f2e44915c | [
"MIT"
] | 152 | 2020-12-07T13:26:53.000Z | 2022-03-23T02:00:04.000Z | app/controllers/config/system/slack.py | grepleria/SnitchDNS | 24f98b01fd5fca9aa2c660d6ee15742f2e44915c | [
"MIT"
] | 16 | 2020-12-07T17:04:36.000Z | 2022-03-10T11:12:52.000Z | app/controllers/config/system/slack.py | grepleria/SnitchDNS | 24f98b01fd5fca9aa2c660d6ee15742f2e44915c | [
"MIT"
] | 36 | 2020-12-09T13:04:40.000Z | 2022-03-12T18:14:36.000Z | from .. import bp
from flask import request, render_template, flash, redirect, url_for
from flask_login import current_user, login_required
from app.lib.base.provider import Provider
from app.lib.base.decorators import admin_required
| 26.857143 | 85 | 0.743351 |
67edef8325e323ad0e7a7ee375973574e5b9dbb3 | 845 | py | Python | setup.py | 7AM7/Arabic-dialects-segmenter-with-flask | a69e060fa25a5905864dae7d500c4f46436e0c40 | [
"MIT"
] | 1 | 2021-07-07T06:54:43.000Z | 2021-07-07T06:54:43.000Z | setup.py | 7AM7/Arabic-dialects-segmenter-with-flask | a69e060fa25a5905864dae7d500c4f46436e0c40 | [
"MIT"
] | null | null | null | setup.py | 7AM7/Arabic-dialects-segmenter-with-flask | a69e060fa25a5905864dae7d500c4f46436e0c40 | [
"MIT"
] | null | null | null |
from setuptools import setup, find_packages
with open("README.md", "r") as fh:
long_description = fh.read()
setup(
name='FarasaPy3',
version='3.0.0',
packages=find_packages(exclude=['tests*']),
license='MIT',
description='Farasa (which means insight in Arabic), is a fast and accurate text... | 32.5 | 124 | 0.673373 |
67eef460ddcba049717ee205dce3da7ab1a62a5b | 45,026 | py | Python | oldversion/crystIT_v0.1.py | GKieslich/crystIT | 2632b544b3ec0f4893f84aa6bb73f03a7f3c0890 | [
"MIT"
] | 4 | 2020-10-14T04:35:40.000Z | 2022-03-31T08:11:40.000Z | oldversion/crystIT_v0.1.py | GKieslich/crystIT | 2632b544b3ec0f4893f84aa6bb73f03a7f3c0890 | [
"MIT"
] | null | null | null | oldversion/crystIT_v0.1.py | GKieslich/crystIT | 2632b544b3ec0f4893f84aa6bb73f03a7f3c0890 | [
"MIT"
] | null | null | null | import ase
from ase.spacegroup import crystal
from ase.units import kB,mol,kJ
import spglib
import pyxtal
from pyxtal.symmetry import Group
import numpy # arrays
import math # log
import os.path # isfile, isdir
import copy # copy dictionary
imp... | 47.296218 | 525 | 0.58042 |
67ef29d1d4ce47e0f4c946159c2b8e5e9239317e | 2,166 | py | Python | bin-opcodes-vec/top50opcodes.py | laurencejbelliott/Ensemble_DL_Ransomware_Detector | 0cae02c2425e787a810513537a47897f3a42e5b5 | [
"MIT"
] | 18 | 2019-04-10T21:16:45.000Z | 2021-11-03T00:22:14.000Z | bin-opcodes-vec/top50opcodes.py | laurencejbelliott/Ensemble_DL_Ransomware_Detector | 0cae02c2425e787a810513537a47897f3a42e5b5 | [
"MIT"
] | null | null | null | bin-opcodes-vec/top50opcodes.py | laurencejbelliott/Ensemble_DL_Ransomware_Detector | 0cae02c2425e787a810513537a47897f3a42e5b5 | [
"MIT"
] | 9 | 2019-06-29T18:09:24.000Z | 2021-11-10T22:15:13.000Z | __author__ = "Laurence Elliott - 16600748"
from capstone import *
import pefile, os
# samplePaths = ["testSamples/" + sample for sample in os.listdir("testSamples")]
samplePaths = ["../bin-utf8-vec/benignSamples/" + sample for sample in os.listdir("../bin-utf8-vec/benignSamples")] + \
["../bin-utf8-vec/malwareSamples... | 31.391304 | 119 | 0.612188 |
67f01ead8301ab0d013d90c2874dceeac2e0f7b9 | 233 | py | Python | chat/messaging/apps.py | VsevolodOkhrimenko/enchad | eca2790b374d336dfc5e109657d25ab0616196ee | [
"MIT"
] | null | null | null | chat/messaging/apps.py | VsevolodOkhrimenko/enchad | eca2790b374d336dfc5e109657d25ab0616196ee | [
"MIT"
] | null | null | null | chat/messaging/apps.py | VsevolodOkhrimenko/enchad | eca2790b374d336dfc5e109657d25ab0616196ee | [
"MIT"
] | null | null | null | from django.apps import AppConfig
| 19.416667 | 54 | 0.622318 |
67f15b64983f5eafc8f2961a8adfe37568e44cb9 | 2,051 | py | Python | tests/test_keepalived2.py | khosrow/lvsm | 516ee1422f736d016ccc198e54f5f019102504a6 | [
"MIT"
] | 15 | 2015-03-18T21:45:24.000Z | 2021-02-22T09:41:30.000Z | tests/test_keepalived2.py | khosrow/lvsm | 516ee1422f736d016ccc198e54f5f019102504a6 | [
"MIT"
] | 12 | 2016-01-15T19:32:36.000Z | 2016-10-27T14:21:14.000Z | tests/test_keepalived2.py | khosrow/lvsm | 516ee1422f736d016ccc198e54f5f019102504a6 | [
"MIT"
] | 8 | 2015-03-20T00:24:56.000Z | 2021-11-19T06:21:19.000Z | import unittest
import os
import sys
import StringIO
path = os.path.abspath(os.path.dirname(__file__))
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../lvsm')))
from lvsm.modules import keepalived
if __name__ == "__main__":
unittest.main()
| 42.729167 | 113 | 0.376889 |
67f2b9d79410dba976d86159718de46c71935384 | 1,416 | py | Python | faeAuditor/auditGroupResults/urlsCSV.py | opena11y/fae-auditor | ea9099b37b77ddc30092b0cdd962647c92b143a7 | [
"Apache-2.0"
] | 2 | 2018-02-28T19:03:28.000Z | 2021-09-30T13:40:23.000Z | faeAuditor/auditGroupResults/urlsCSV.py | opena11y/fae-auditor | ea9099b37b77ddc30092b0cdd962647c92b143a7 | [
"Apache-2.0"
] | 6 | 2020-02-11T21:53:58.000Z | 2022-02-10T07:57:58.000Z | faeAuditor/auditGroupResults/urlsCSV.py | opena11y/fae-auditor | ea9099b37b77ddc30092b0cdd962647c92b143a7 | [
"Apache-2.0"
] | 1 | 2019-12-05T06:05:20.000Z | 2019-12-05T06:05:20.000Z | """
Copyright 2014-2018 University of Illinois
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writ... | 29.5 | 100 | 0.735169 |
67f2d1af7b93140433f3b44d8d6f9fbf50549676 | 912 | py | Python | microcosm_caching/base.py | globality-corp/microcosm-caching | 9e4ddb60d95e1344bf97f69248d1f7ac36a92cc8 | [
"Apache-2.0"
] | 1 | 2019-08-29T16:47:18.000Z | 2019-08-29T16:47:18.000Z | microcosm_caching/base.py | globality-corp/microcosm-caching | 9e4ddb60d95e1344bf97f69248d1f7ac36a92cc8 | [
"Apache-2.0"
] | 2 | 2019-10-29T19:25:16.000Z | 2019-11-12T00:00:04.000Z | microcosm_caching/base.py | globality-corp/microcosm-caching | 9e4ddb60d95e1344bf97f69248d1f7ac36a92cc8 | [
"Apache-2.0"
] | null | null | null | """
Cache abstractions for use with API resources.
"""
from abc import ABC, abstractmethod
| 19.404255 | 63 | 0.574561 |
67f2fda918bbde7a4b1b415f81dab3ffab386200 | 876 | py | Python | randomizer.py | shane1027/PollDaddySlurp | 6cc17156f38427379d095277681dbe1a68baa49d | [
"MIT"
] | null | null | null | randomizer.py | shane1027/PollDaddySlurp | 6cc17156f38427379d095277681dbe1a68baa49d | [
"MIT"
] | null | null | null | randomizer.py | shane1027/PollDaddySlurp | 6cc17156f38427379d095277681dbe1a68baa49d | [
"MIT"
] | 1 | 2019-10-10T15:19:33.000Z | 2019-10-10T15:19:33.000Z | #!/usr/bin/env python2.7
import time
from http_request_randomizer.requests.proxy.requestProxy import RequestProxy
if __name__ == '__main__':
start = time.time()
req_proxy = RequestProxy()
print "Initialization took: {0} sec".format((time.time() - start))
print "Size : ", len(req_proxy.get_proxy_list()... | 35.04 | 109 | 0.643836 |
67f38cc9e41435b2a8a8c22aa5a456b1d76fb88e | 555 | py | Python | examples/nni_data_augmentation/basenet/data.py | petuum/tuun | 8eec472dbf0e5e695449b0fa2d98985469fd5b30 | [
"Apache-2.0"
] | 33 | 2020-08-30T16:22:35.000Z | 2022-02-26T13:48:32.000Z | examples/nni_data_augmentation/basenet/data.py | petuum/tuun | 8eec472dbf0e5e695449b0fa2d98985469fd5b30 | [
"Apache-2.0"
] | 2 | 2021-01-18T19:46:43.000Z | 2021-03-24T09:59:14.000Z | examples/nni_data_augmentation/basenet/data.py | petuum/tuun | 8eec472dbf0e5e695449b0fa2d98985469fd5b30 | [
"Apache-2.0"
] | 2 | 2020-08-25T17:02:15.000Z | 2021-04-21T16:40:44.000Z | #!/usr/bin/env python
"""
data.py
"""
import itertools
| 18.5 | 60 | 0.578378 |
67f3afbe3c2036ebfbec72e16288761010482211 | 1,180 | py | Python | tools_box/_selling/report/sales_representative_scorecard/sales_representative_scorecard.py | maisonarmani/Tools_Box | 4f8cc3a0deac1be50a3ac80758a10608faf58454 | [
"MIT"
] | null | null | null | tools_box/_selling/report/sales_representative_scorecard/sales_representative_scorecard.py | maisonarmani/Tools_Box | 4f8cc3a0deac1be50a3ac80758a10608faf58454 | [
"MIT"
] | null | null | null | tools_box/_selling/report/sales_representative_scorecard/sales_representative_scorecard.py | maisonarmani/Tools_Box | 4f8cc3a0deac1be50a3ac80758a10608faf58454 | [
"MIT"
] | 1 | 2022-01-30T12:15:41.000Z | 2022-01-30T12:15:41.000Z | # Copyright (c) 2013, masonarmani38@gmail.com and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
| 39.333333 | 183 | 0.691525 |
67f3bbd2cd29eb37f8dc56a77c4074bc640a2a29 | 484 | py | Python | Google-IT-Automation-with-Python-Professional-Certificate/3-Introduction-to-Git-and-Github/Week-1/disk_usage.py | fengjings/Coursera | 54098a9732faa4b37afe69d196e27805b1ac73aa | [
"MIT"
] | null | null | null | Google-IT-Automation-with-Python-Professional-Certificate/3-Introduction-to-Git-and-Github/Week-1/disk_usage.py | fengjings/Coursera | 54098a9732faa4b37afe69d196e27805b1ac73aa | [
"MIT"
] | null | null | null | Google-IT-Automation-with-Python-Professional-Certificate/3-Introduction-to-Git-and-Github/Week-1/disk_usage.py | fengjings/Coursera | 54098a9732faa4b37afe69d196e27805b1ac73aa | [
"MIT"
] | 1 | 2021-06-09T08:59:48.000Z | 2021-06-09T08:59:48.000Z | import shutil
import sys
def check_disk_usage(disk, min_absolute, min_percent):
'''return true if there is enough free disk space, else false'''
du = shutil.disk_usage(disk)
percent_free= 100*du.free/du.total
gigabytes_free = du.free/2**30
if percent_free<min_percent or gigabytes_free < min_absolut... | 26.888889 | 68 | 0.708678 |
67f441ca489816b005f268005b6753cf7c38a180 | 1,796 | py | Python | src/utils/tests/test_www.py | nuuuwan/utils | d5085d9bddd1ffc79544241b43aaa8269c5806f0 | [
"MIT"
] | null | null | null | src/utils/tests/test_www.py | nuuuwan/utils | d5085d9bddd1ffc79544241b43aaa8269c5806f0 | [
"MIT"
] | 1 | 2021-07-06T11:16:58.000Z | 2021-07-06T11:16:58.000Z | src/utils/tests/test_www.py | nuuuwan/utils | d5085d9bddd1ffc79544241b43aaa8269c5806f0 | [
"MIT"
] | null | null | null | """Test."""
import os
import unittest
import pytest
from utils import www
TEST_JSON_URL = os.path.join(
'https://raw.githubusercontent.com',
'nuuuwan/misc-sl-data/master',
'sl_power_station_info.json',
)
TEST_TSV_URL = os.path.join(
'https://raw.githubusercontent.com',
'nuuuwan/gig-data/master',... | 24.60274 | 72 | 0.604677 |
67f6677df6c93e2d632b899ab9dc98b595479ae0 | 19,511 | py | Python | src/qrl/core/State.py | scottdonaldau/QRL | fb78c1cdf227330ace46f590a36cc6a52c7af3fe | [
"MIT"
] | 1 | 2020-07-12T23:40:48.000Z | 2020-07-12T23:40:48.000Z | src/qrl/core/State.py | scottdonaldau/QRL | fb78c1cdf227330ace46f590a36cc6a52c7af3fe | [
"MIT"
] | null | null | null | src/qrl/core/State.py | scottdonaldau/QRL | fb78c1cdf227330ace46f590a36cc6a52c7af3fe | [
"MIT"
] | null | null | null | # coding=utf-8
# Distributed under the MIT software license, see the accompanying
# file LICENSE or http://www.opensource.org/licenses/mit-license.php.
from typing import Optional
from statistics import median
import functools
from google.protobuf.json_format import MessageToJson, Parse
from pyqrllib.pyqrllib import b... | 38.559289 | 125 | 0.602788 |
67f6729eb5c33b2e9485a361bcba852adc1d1e4b | 2,670 | py | Python | data/make_stterror_data/main.py | gcunhase/StackedDeBERT | 82777114fd99cafc6e2a3d760e774f007c563245 | [
"MIT"
] | 32 | 2020-01-03T09:53:03.000Z | 2021-09-07T07:23:26.000Z | data/make_stterror_data/main.py | gcunhase/StackedDeBERT | 82777114fd99cafc6e2a3d760e774f007c563245 | [
"MIT"
] | null | null | null | data/make_stterror_data/main.py | gcunhase/StackedDeBERT | 82777114fd99cafc6e2a3d760e774f007c563245 | [
"MIT"
] | 6 | 2020-01-21T06:50:21.000Z | 2021-01-22T08:04:00.000Z | import os.path
from timeit import default_timer as timer
import data.make_stterror_data.utils as utils
from data.make_stterror_data.handler import HandlerIntent
from data.make_stterror_data.parser import snips_parser
__author__ = "Gwena Cunha"
""" Main module for Snips
text -> TTS -> STT -> wrong text
"""
if ... | 45.254237 | 131 | 0.695506 |
67f6d526ab4ecec5625261ee10602db862d65a55 | 5,591 | py | Python | src/tk_live_model_test.py | KarlWithK/gesture | d60204684c1e3868177e76b62d74d899d39d287d | [
"MIT"
] | null | null | null | src/tk_live_model_test.py | KarlWithK/gesture | d60204684c1e3868177e76b62d74d899d39d287d | [
"MIT"
] | null | null | null | src/tk_live_model_test.py | KarlWithK/gesture | d60204684c1e3868177e76b62d74d899d39d287d | [
"MIT"
] | 2 | 2021-09-01T01:06:23.000Z | 2021-09-06T00:18:54.000Z | import tkinter as tk
from PIL import Image, ImageTk
from cv2 import cv2
import numpy as np
import mediapipe as mp
from keyboard import press_and_release as press
from json import load
from data_preprocessor import DataGenerator
from gestures import GESTURES
import tensorflow as tf
TARGET_FRAMERATE... | 34.512346 | 104 | 0.597746 |
67f86eeb953024e2463d4d73c584b0e83d0b4555 | 12,761 | py | Python | wykop/api/client.py | selfisekai/wykop-sdk-reborn | 7f17c5b2a3d282b5aaf72475a0f58ba66d5c5c5d | [
"MIT"
] | null | null | null | wykop/api/client.py | selfisekai/wykop-sdk-reborn | 7f17c5b2a3d282b5aaf72475a0f58ba66d5c5c5d | [
"MIT"
] | null | null | null | wykop/api/client.py | selfisekai/wykop-sdk-reborn | 7f17c5b2a3d282b5aaf72475a0f58ba66d5c5c5d | [
"MIT"
] | null | null | null | import logging
from typing import Dict, List
from wykop.api.api_const import PAGE_NAMED_ARG, BODY_NAMED_ARG, FILE_POST_NAME
from wykop.core.credentials import Credentials
from wykop.core.requestor import Requestor
log = logging.getLogger(__name__)
| 37.754438 | 114 | 0.587728 |
67f9a1f6ffa0fc0bfe7226b1e9ede9e0f2fe3d7a | 1,461 | py | Python | brainbox/tests/test_singlecell.py | SebastianBruijns/ibllib | 49f2091b7a53430c00c339b862dfc1a53aab008b | [
"MIT"
] | null | null | null | brainbox/tests/test_singlecell.py | SebastianBruijns/ibllib | 49f2091b7a53430c00c339b862dfc1a53aab008b | [
"MIT"
] | null | null | null | brainbox/tests/test_singlecell.py | SebastianBruijns/ibllib | 49f2091b7a53430c00c339b862dfc1a53aab008b | [
"MIT"
] | null | null | null | from brainbox.singlecell import acorr, calculate_peths
import unittest
import numpy as np
def test_firing_rate():
pass
if __name__ == "__main__":
np.random.seed(0)
unittest.main(exit=False)
| 31.085106 | 88 | 0.644764 |
67f9b6a00e2c9b6075dbb4dc4f6b1acedc0ffc2d | 11,958 | py | Python | test/test_base_metric.py | Spraitazz/metric-learn | 137880d9c6ce9a2b81a8af24c07d80e528f657cd | [
"MIT"
] | 547 | 2019-08-01T23:21:30.000Z | 2022-03-31T10:23:04.000Z | test/test_base_metric.py | Spraitazz/metric-learn | 137880d9c6ce9a2b81a8af24c07d80e528f657cd | [
"MIT"
] | 104 | 2019-08-02T10:15:53.000Z | 2022-03-29T20:33:55.000Z | test/test_base_metric.py | Spraitazz/metric-learn | 137880d9c6ce9a2b81a8af24c07d80e528f657cd | [
"MIT"
] | 69 | 2019-08-12T16:22:57.000Z | 2022-03-10T15:10:02.000Z | import pytest
import re
import unittest
import metric_learn
import numpy as np
from sklearn import clone
from test.test_utils import ids_metric_learners, metric_learners, remove_y
from metric_learn.sklearn_shims import set_random_state, SKLEARN_AT_LEAST_0_22
def sk_repr_kwargs(def_kwargs, nndef_kwargs):
"""Given... | 42.860215 | 79 | 0.647516 |
67fa9c3bff783bccc4fb93e62dd21fe1343fce47 | 881 | py | Python | examples/geomopt/20-callback.py | QuESt-Calculator/pyscf | 0ed03633b699505c7278f1eb501342667d0aa910 | [
"Apache-2.0"
] | 501 | 2018-12-06T23:48:17.000Z | 2022-03-31T11:53:18.000Z | examples/geomopt/20-callback.py | QuESt-Calculator/pyscf | 0ed03633b699505c7278f1eb501342667d0aa910 | [
"Apache-2.0"
] | 710 | 2018-11-26T22:04:52.000Z | 2022-03-30T03:53:12.000Z | examples/geomopt/20-callback.py | QuESt-Calculator/pyscf | 0ed03633b699505c7278f1eb501342667d0aa910 | [
"Apache-2.0"
] | 273 | 2018-11-26T10:10:24.000Z | 2022-03-30T12:25:28.000Z | #!/usr/bin/env python
'''
Optimize molecular geometry within the environment of QM/MM charges.
'''
from pyscf import gto, scf
from pyscf.geomopt import berny_solver
from pyscf.geomopt import geometric_solver
mol = gto.M(atom='''
C 0.000000 0.000000 -0.542500
O 0.000000 0.000000 ... | 22.589744 | 68 | 0.659478 |
67fa9dc096cb1ead50c5acc747b6ed866a1988a5 | 8,251 | py | Python | Q1_final_project_v2.py | wolhandlerdeb/clustering | d84b0ff91d20b8dbf45e235fc8204f8cedf1ecc5 | [
"MIT"
] | null | null | null | Q1_final_project_v2.py | wolhandlerdeb/clustering | d84b0ff91d20b8dbf45e235fc8204f8cedf1ecc5 | [
"MIT"
] | null | null | null | Q1_final_project_v2.py | wolhandlerdeb/clustering | d84b0ff91d20b8dbf45e235fc8204f8cedf1ecc5 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import scipy as sc
from scipy.stats import randint, norm, multivariate_normal, ortho_group
from scipy import linalg
from scipy.linalg import subspace_angles, orth
from scipy.optimize import fmin
import math
from statistics import mean
import seaborn as sns
from sklearn.cluster imp... | 37.848624 | 141 | 0.630105 |
67facec68d3d68647d57845cc972fe7ead4b3012 | 793 | py | Python | lnbits/extensions/usermanager/models.py | blackcoffeexbt/lnbits-legend | a9f2877af77ea56d1900e2b5bc1c21b9b7ac2f64 | [
"MIT"
] | 76 | 2021-11-02T22:19:59.000Z | 2022-03-30T18:01:33.000Z | lnbits/extensions/usermanager/models.py | blackcoffeexbt/lnbits-legend | a9f2877af77ea56d1900e2b5bc1c21b9b7ac2f64 | [
"MIT"
] | 100 | 2021-11-04T16:33:28.000Z | 2022-03-30T15:03:52.000Z | lnbits/extensions/usermanager/models.py | blackcoffeexbt/lnbits-legend | a9f2877af77ea56d1900e2b5bc1c21b9b7ac2f64 | [
"MIT"
] | 57 | 2021-11-08T06:43:59.000Z | 2022-03-31T08:53:16.000Z | from sqlite3 import Row
from fastapi.param_functions import Query
from pydantic import BaseModel
from typing import Optional
| 19.341463 | 45 | 0.630517 |
67fbc8dcaaaab886066c2cc01da3a3bc0ee4a485 | 3,215 | py | Python | Operator.py | zijieli-Jlee/FGN | f707ed31687ea355ab62a1eaf43b5756a6ed883e | [
"MIT"
] | 2 | 2022-02-28T07:36:47.000Z | 2022-03-10T04:45:57.000Z | Operator.py | BaratiLab/FGN | 04729eaebfa8395a7d2ebb275761f98dc0342933 | [
"MIT"
] | null | null | null | Operator.py | BaratiLab/FGN | 04729eaebfa8395a7d2ebb275761f98dc0342933 | [
"MIT"
] | null | null | null | import numba as nb
import numpy as np
import torch
from torch.autograd import Function
from Constants import MPS_KERNEL as w
from Constants import BASE_RADIUS, ND_RAIUS, GRAD_RADIUS, LAP_RADIUS
Divergence = DivOp.apply
Laplacian = LapOp.apply
| 31.213592 | 123 | 0.601244 |
67fc163e324d1273cf478cbfac97cd26f437a946 | 5,274 | py | Python | pythia/LinearRegression.py | MaudBoucherit/Pythia | 0076d8008350c3a323e28c400b26628be34302e6 | [
"MIT"
] | null | null | null | pythia/LinearRegression.py | MaudBoucherit/Pythia | 0076d8008350c3a323e28c400b26628be34302e6 | [
"MIT"
] | 4 | 2018-02-09T01:16:14.000Z | 2018-03-04T07:48:49.000Z | pythia/LinearRegression.py | MaudBoucherit/Pythia | 0076d8008350c3a323e28c400b26628be34302e6 | [
"MIT"
] | 3 | 2018-02-08T22:52:27.000Z | 2018-02-08T22:53:05.000Z | # LinearRegression.py
# March 2018
#
# This script builds a Linear regression class to analyse data.
# It supports a continuous response and several continuous features.
# The class has a constructor building and fitting the model, and
# a plotting method for residuals.
#
# Dependencies:
#
# Usage:
# from pythia.Li... | 32.555556 | 154 | 0.603527 |
67fc89d1bcce49307c043c31ae573dd5205a3395 | 289 | py | Python | src/renault_api/exceptions.py | slater0013/renault-api | 13c784b6af09331368341c93888f1eb32c46cb19 | [
"MIT"
] | 44 | 2020-11-01T15:52:33.000Z | 2022-03-31T04:40:03.000Z | src/renault_api/exceptions.py | slater0013/renault-api | 13c784b6af09331368341c93888f1eb32c46cb19 | [
"MIT"
] | 334 | 2020-11-01T13:00:01.000Z | 2022-03-31T17:17:40.000Z | src/renault_api/exceptions.py | slater0013/renault-api | 13c784b6af09331368341c93888f1eb32c46cb19 | [
"MIT"
] | 22 | 2020-11-20T08:26:26.000Z | 2022-03-11T18:58:31.000Z | """Exceptions for Renault API."""
| 20.642857 | 67 | 0.702422 |
67fd6116ebb01570250dd4cf9fbbcabbf9f0ae67 | 5,945 | py | Python | analysis/playing_with_pykalman.py | rafaelvalero/covid_forecast | 4e009ade5481f4e3bd48fd8048ca7d293d5d19b4 | [
"MIT"
] | 3 | 2020-03-20T14:23:51.000Z | 2020-03-29T18:55:12.000Z | analysis/playing_with_pykalman.py | rafaelvalero/covid_forecast | 4e009ade5481f4e3bd48fd8048ca7d293d5d19b4 | [
"MIT"
] | 2 | 2020-03-21T14:07:17.000Z | 2020-03-22T07:38:11.000Z | analysis/playing_with_pykalman.py | rafaelvalero/covid_forecast | 4e009ade5481f4e3bd48fd8048ca7d293d5d19b4 | [
"MIT"
] | 1 | 2020-05-12T14:37:28.000Z | 2020-05-12T14:37:28.000Z | '''
=============================
EM for Linear-Gaussian Models
=============================
This example shows how one may use the EM algorithm to estimate model
parameters with a Kalman Filter.
The EM algorithm is a meta-algorithm for learning parameters in probabilistic
models. The algorithm works by first fixing t... | 49.541667 | 348 | 0.697056 |
67fd71b159a22e60b64a07348a0a3e35c2a3b7e5 | 382 | py | Python | phyutil/__init__.py | frib-high-level-controls/phyhlc | 6486607e3aa0212054a12e9f2ad1a3ef15542f48 | [
"BSD-3-Clause"
] | 1 | 2018-03-22T15:18:54.000Z | 2018-03-22T15:18:54.000Z | phyutil/__init__.py | frib-high-level-controls/phyhlc | 6486607e3aa0212054a12e9f2ad1a3ef15542f48 | [
"BSD-3-Clause"
] | null | null | null | phyutil/__init__.py | frib-high-level-controls/phyhlc | 6486607e3aa0212054a12e9f2ad1a3ef15542f48 | [
"BSD-3-Clause"
] | null | null | null | # encoding: UTF-8
"""Physics Applications Utility"""
__copyright__ = "Copyright (c) 2015, Facility for Rare Isotope Beams"
__author__ = "Dylan Maxwell"
__version__ = "0.0.1"
import logging
import phylib
import machine
from machine import *
from phylib.libCore import *
# configure the root logger
logging.basicConfi... | 21.222222 | 79 | 0.740838 |
67fdbf96ac87d3b403bf853041d7bc6c394c1dfd | 1,902 | py | Python | pydyn/explicit_blocks.py | chhokrad/PYPOWER-Dynamics | e6e42fc6975828a51cd01c42a81d7a45844f323f | [
"BSD-3-Clause"
] | null | null | null | pydyn/explicit_blocks.py | chhokrad/PYPOWER-Dynamics | e6e42fc6975828a51cd01c42a81d7a45844f323f | [
"BSD-3-Clause"
] | null | null | null | pydyn/explicit_blocks.py | chhokrad/PYPOWER-Dynamics | e6e42fc6975828a51cd01c42a81d7a45844f323f | [
"BSD-3-Clause"
] | 1 | 2021-09-13T14:34:41.000Z | 2021-09-13T14:34:41.000Z | #!python3
#
# Copyright (C) 2014-2015 Julius Susanto. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
"""
PYPOWER-Dynamics
Functions for standard blocks (solves a step)
"""
import numpy as np
# Gain block
# yo = p * yi
# p is a scalar gain c... | 15.463415 | 69 | 0.532072 |
67ff40cfd4c8a6b2e69d26c388ef6020f73b4c94 | 2,151 | py | Python | river/migrations/0012_auto_20191113_1550.py | xuziheng1002/django-river | 7c7f23aa4790e451019c3e2b4d29f35852de17e6 | [
"BSD-3-Clause"
] | null | null | null | river/migrations/0012_auto_20191113_1550.py | xuziheng1002/django-river | 7c7f23aa4790e451019c3e2b4d29f35852de17e6 | [
"BSD-3-Clause"
] | null | null | null | river/migrations/0012_auto_20191113_1550.py | xuziheng1002/django-river | 7c7f23aa4790e451019c3e2b4d29f35852de17e6 | [
"BSD-3-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.25 on 2019-11-13 21:50
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
| 45.765957 | 191 | 0.664807 |
db00271e05f78081485f6f0bf77fff9b5da0dd36 | 929 | py | Python | nesta/packages/examples/tests/test_example_package.py | anniyanvr/nesta | 4b3ae79922cebde0ad33e08ac4c40b9a10e8e7c3 | [
"MIT"
] | 13 | 2019-06-18T16:53:53.000Z | 2021-03-04T10:58:52.000Z | nesta/packages/examples/tests/test_example_package.py | nestauk/old_nesta_daps | 4b3ae79922cebde0ad33e08ac4c40b9a10e8e7c3 | [
"MIT"
] | 208 | 2018-08-10T13:15:40.000Z | 2021-07-21T10:16:07.000Z | nesta/packages/examples/tests/test_example_package.py | nestauk/old_nesta_daps | 4b3ae79922cebde0ad33e08ac4c40b9a10e8e7c3 | [
"MIT"
] | 8 | 2018-09-20T15:19:23.000Z | 2020-12-15T17:41:34.000Z | from collections import namedtuple
import pytest
from nesta.packages.examples.example_package import some_func
| 33.178571 | 85 | 0.697524 |
db0097f13bc0f850f8b50c6cc9087132aa46c5fd | 6,408 | py | Python | test/test_misc.py | mhthies/smarthomeconnect | d93d1038145285af66769ebf10589c1088b323ed | [
"Apache-2.0"
] | 5 | 2021-07-02T21:48:45.000Z | 2021-12-12T21:55:42.000Z | test/test_misc.py | mhthies/smarthomeconnect | d93d1038145285af66769ebf10589c1088b323ed | [
"Apache-2.0"
] | 49 | 2020-09-18T20:05:55.000Z | 2022-03-05T19:51:33.000Z | test/test_misc.py | mhthies/smarthomeconnect | d93d1038145285af66769ebf10589c1088b323ed | [
"Apache-2.0"
] | 1 | 2021-12-10T14:50:43.000Z | 2021-12-10T14:50:43.000Z | import asyncio
import unittest
import unittest.mock
import shc.misc
from test._helper import ExampleSubscribable, ExampleWritable, async_test, ExampleReadable
| 37.473684 | 106 | 0.666042 |
db00bdc9b4970c171632e8c7e85bbb5706127395 | 27,709 | py | Python | pysatSpaceWeather/instruments/sw_f107.py | JonathonMSmith/pysatSpaceWeather | b403a14bd9a37dd010e97be6e5da15c54a87b888 | [
"BSD-3-Clause"
] | 3 | 2021-02-02T05:33:46.000Z | 2022-01-20T16:54:35.000Z | pysatSpaceWeather/instruments/sw_f107.py | JonathonMSmith/pysatSpaceWeather | b403a14bd9a37dd010e97be6e5da15c54a87b888 | [
"BSD-3-Clause"
] | 48 | 2020-08-13T22:05:06.000Z | 2022-01-21T22:48:14.000Z | pysatSpaceWeather/instruments/sw_f107.py | JonathonMSmith/pysatSpaceWeather | b403a14bd9a37dd010e97be6e5da15c54a87b888 | [
"BSD-3-Clause"
] | 3 | 2021-02-02T05:33:54.000Z | 2021-08-19T17:14:24.000Z | # -*- coding: utf-8 -*-
"""Supports F10.7 index values. Downloads data from LASP and the SWPC.
Properties
----------
platform
'sw'
name
'f107'
tag
- 'historic' LASP F10.7 data (downloads by month, loads by day)
- 'prelim' Preliminary SWPC daily solar indices
- 'daily' Daily SWPC solar indices (cont... | 40.688693 | 80 | 0.521383 |
db031f4543bacf2c603d4a3ccb452d553dc3e0d6 | 486 | py | Python | user/migrations/0004_auto_20200813_1948.py | VladimirZubavlenko/ikaf42-app | 240e012675e4347370289554f34d9c60c8b6f35d | [
"MIT"
] | null | null | null | user/migrations/0004_auto_20200813_1948.py | VladimirZubavlenko/ikaf42-app | 240e012675e4347370289554f34d9c60c8b6f35d | [
"MIT"
] | null | null | null | user/migrations/0004_auto_20200813_1948.py | VladimirZubavlenko/ikaf42-app | 240e012675e4347370289554f34d9c60c8b6f35d | [
"MIT"
] | null | null | null | # Generated by Django 3.0.5 on 2020-08-13 19:48
from django.db import migrations, models
| 25.578947 | 144 | 0.652263 |
db03fc21b23af129e340ee65486e184e179cf632 | 1,394 | py | Python | vfoot/graphics/__init__.py | filipecn/vfoot | 3059f5bb471b6bdf92a18a7cdb6b33a2c8852046 | [
"MIT"
] | null | null | null | vfoot/graphics/__init__.py | filipecn/vfoot | 3059f5bb471b6bdf92a18a7cdb6b33a2c8852046 | [
"MIT"
] | null | null | null | vfoot/graphics/__init__.py | filipecn/vfoot | 3059f5bb471b6bdf92a18a7cdb6b33a2c8852046 | [
"MIT"
] | null | null | null | import glfw
import OpenGL.GL as gl
import imgui
from imgui.integrations.glfw import GlfwRenderer
| 27.333333 | 67 | 0.677188 |
db04b4c5b6cb46accefdb0e93dbb064e76e6bb44 | 1,472 | py | Python | master/rabbitvcs-master/rabbitvcs-master/rabbitvcs/util/_locale.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 4 | 2018-09-07T15:35:24.000Z | 2019-03-27T09:48:12.000Z | master/rabbitvcs-master/rabbitvcs-master/rabbitvcs/util/_locale.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 371 | 2020-03-04T21:51:56.000Z | 2022-03-31T20:59:11.000Z | master/rabbitvcs-master/rabbitvcs-master/rabbitvcs/util/_locale.py | AlexRogalskiy/DevArtifacts | 931aabb8cbf27656151c54856eb2ea7d1153203a | [
"MIT"
] | 3 | 2019-06-18T19:57:17.000Z | 2020-11-06T03:55:08.000Z | from __future__ import absolute_import
import locale
import os
from rabbitvcs.util.log import Log
import rabbitvcs.util.settings
import rabbitvcs.util.helper
log = Log("rabbitvcs.util.locale")
| 36.8 | 87 | 0.63587 |
db05538cc85061ce7b28bead1b966a843722b5be | 7,378 | py | Python | vectorize_enriched_api.py | mfejzer/tracking_buggy_files | 161095f315a94709ef74ab4bb6696889537aaa6a | [
"MIT"
] | 3 | 2019-08-06T05:29:53.000Z | 2021-05-23T08:23:10.000Z | vectorize_enriched_api.py | mfejzer/tracking_buggy_files | 161095f315a94709ef74ab4bb6696889537aaa6a | [
"MIT"
] | 5 | 2020-04-23T18:29:06.000Z | 2021-12-09T21:21:57.000Z | vectorize_enriched_api.py | mfejzer/tracking_buggy_files | 161095f315a94709ef74ab4bb6696889537aaa6a | [
"MIT"
] | 1 | 2021-05-23T08:23:12.000Z | 2021-05-23T08:23:12.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Usage: %(scriptName) <bug_report_file> <data_prefix>
"""
import json
from timeit import default_timer
import datetime
import numpy as np
import pickle
import sys
from multiprocessing import Pool
from operator import itemgetter
from scipy import sparse
from sklearn.fe... | 33.234234 | 126 | 0.719301 |
db063dcff6ca568e771df05b7ae7f650c6cd2aea | 4,270 | py | Python | interpreter.py | bendmorris/beaver | 4db3e1690145dee89d30144f3632396313218214 | [
"MIT"
] | 2 | 2018-10-06T08:35:41.000Z | 2019-04-03T21:15:02.000Z | interpreter.py | bendmorris/beaver | 4db3e1690145dee89d30144f3632396313218214 | [
"MIT"
] | null | null | null | interpreter.py | bendmorris/beaver | 4db3e1690145dee89d30144f3632396313218214 | [
"MIT"
] | null | null | null | import argparse
import os
import sys
from lib.graph import Graph
from lib.types import BeaverException, Uri
from lib.command import OutCommand
import sys
reload(sys)
sys.setdefaultencoding('utf8')
from __init__ import __version__
arg_parser = argparse.ArgumentParser()
arg_parser.add_argument('--version', help='print ... | 32.846154 | 154 | 0.544028 |
db0693e026c74e759573c7252d4aff5ef90ae5ad | 242 | py | Python | euler/28.py | DevStarSJ/algorithmExercise | 66b42c54cdd594ff3f229613fd83446f8c1f9153 | [
"MIT"
] | null | null | null | euler/28.py | DevStarSJ/algorithmExercise | 66b42c54cdd594ff3f229613fd83446f8c1f9153 | [
"MIT"
] | null | null | null | euler/28.py | DevStarSJ/algorithmExercise | 66b42c54cdd594ff3f229613fd83446f8c1f9153 | [
"MIT"
] | null | null | null |
print(get_cross_sum(501)) | 18.615385 | 37 | 0.516529 |
db06e9490bbc299985803b6daf8dbca9d83d6fc3 | 1,509 | py | Python | titan/react_view_pkg/router/resources.py | mnieber/gen | 65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9 | [
"MIT"
] | null | null | null | titan/react_view_pkg/router/resources.py | mnieber/gen | 65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9 | [
"MIT"
] | null | null | null | titan/react_view_pkg/router/resources.py | mnieber/gen | 65f8aa4fb671c4f90d5cbcb1a0e10290647a31d9 | [
"MIT"
] | null | null | null | import typing as T
from dataclasses import dataclass, field
from moonleap import Resource
from titan.react_pkg.component import Component
def reduce_router_configs(router_configs, base_route):
result = []
for router_config in router_configs:
child_components = getattr(router_config.component.typ, ... | 32.106383 | 88 | 0.713718 |
db077393470e53a796d0d72580ad3f3064dd2bda | 2,119 | py | Python | lab-taxi/agent.py | JunShern/deep-reinforcement-learning | 4c99d8e3b5c6df0ec7985a33611a16a791eb0041 | [
"MIT"
] | null | null | null | lab-taxi/agent.py | JunShern/deep-reinforcement-learning | 4c99d8e3b5c6df0ec7985a33611a16a791eb0041 | [
"MIT"
] | null | null | null | lab-taxi/agent.py | JunShern/deep-reinforcement-learning | 4c99d8e3b5c6df0ec7985a33611a16a791eb0041 | [
"MIT"
] | null | null | null | import numpy as np
from collections import defaultdict | 33.634921 | 153 | 0.591789 |
db07a7ea8e4f0634af5cfc5dde1a21fb51caf3b5 | 11,271 | py | Python | visicom_reverse_geocoding.py | zimirrr/visicom_reverse_geocoding | 3da913f80e934f8352bcc8abe9d24ba54bbc482a | [
"MIT"
] | null | null | null | visicom_reverse_geocoding.py | zimirrr/visicom_reverse_geocoding | 3da913f80e934f8352bcc8abe9d24ba54bbc482a | [
"MIT"
] | null | null | null | visicom_reverse_geocoding.py | zimirrr/visicom_reverse_geocoding | 3da913f80e934f8352bcc8abe9d24ba54bbc482a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
/***************************************************************************
VisicomReverseGeocoder
A QGIS plugin
plugin for reverse geocoding from visicom api
Generated by Plugin Builder: http://g-sherman.github.io/Qgis-Plugin-Builder/
... | 35.332288 | 126 | 0.58167 |
db08017fe044db65092dd00ed22dea1c4564f406 | 699 | py | Python | test/module_dir/mymodule/__init__.py | honzajavorek/mkdocs_macros_plugin | c97c2e08e3c1cb9023b28a605784e0a7ac45b885 | [
"MIT"
] | null | null | null | test/module_dir/mymodule/__init__.py | honzajavorek/mkdocs_macros_plugin | c97c2e08e3c1cb9023b28a605784e0a7ac45b885 | [
"MIT"
] | null | null | null | test/module_dir/mymodule/__init__.py | honzajavorek/mkdocs_macros_plugin | c97c2e08e3c1cb9023b28a605784e0a7ac45b885 | [
"MIT"
] | null | null | null | import os
def define_env(env):
"""
This is the hook for the functions (new form)
"""
env.variables.cwd = os.getcwd()
# use dot notation for adding
env.variables.baz = env.variables.fix_url('foo')
# Optional: a special function for making relative urls point to root
fix_url = env... | 20.558824 | 73 | 0.602289 |
db086691881d363f79126af6b8d208d584242b29 | 114,519 | py | Python | cisco-ios-xe/ydk/models/cisco_ios_xe/MPLS_LDP_STD_MIB.py | Maikor/ydk-py | b86c4a7c570ae3b2c5557d098420446df5de4929 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cisco-ios-xe/ydk/models/cisco_ios_xe/MPLS_LDP_STD_MIB.py | Maikor/ydk-py | b86c4a7c570ae3b2c5557d098420446df5de4929 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | cisco-ios-xe/ydk/models/cisco_ios_xe/MPLS_LDP_STD_MIB.py | Maikor/ydk-py | b86c4a7c570ae3b2c5557d098420446df5de4929 | [
"ECL-2.0",
"Apache-2.0"
] | null | null | null | """ MPLS_LDP_STD_MIB
Copyright (C) The Internet Society (2004). The
initial version of this MIB module was published
in RFC 3815. For full legal notices see the RFC
itself or see\:
http\://www.ietf.org/copyrights/ianamib.html
This MIB contains managed object definitions for the
'Multiprotocol Label Switching, Labe... | 55.323188 | 1,407 | 0.642164 |
db0ab3da5d70c76acedaa4a8af65bab398892ba2 | 9,104 | py | Python | app/models/user.py | tonyngophd/dronest | f0976c31cbbf6fb032851bd42ac566bb381608f0 | [
"MIT"
] | 13 | 2021-02-03T13:26:59.000Z | 2021-03-24T19:34:19.000Z | app/models/user.py | suasllc/dronest | f0976c31cbbf6fb032851bd42ac566bb381608f0 | [
"MIT"
] | null | null | null | app/models/user.py | suasllc/dronest | f0976c31cbbf6fb032851bd42ac566bb381608f0 | [
"MIT"
] | 1 | 2021-06-07T17:56:58.000Z | 2021-06-07T17:56:58.000Z | from .db import db
from .userfollower import UserFollower
from werkzeug.security import generate_password_hash, check_password_hash
from flask_login import UserMixin
from sqlalchemy import Table, Column, Integer, ForeignKey, or_
from .directmessage import DirectMessage
from .userequipment import UserEquipment
from .equ... | 35.286822 | 174 | 0.672781 |
db0bae1eb24630016d687ec03ec4ffa465df2055 | 397 | py | Python | pyflu/update/signals.py | flupke/pyflu | 8856759ced5367fc8439a418b3ce6570b82707ce | [
"BSD-3-Clause"
] | 1 | 2017-07-17T06:50:24.000Z | 2017-07-17T06:50:24.000Z | pyflu/update/signals.py | flupke/pyflu | 8856759ced5367fc8439a418b3ce6570b82707ce | [
"BSD-3-Clause"
] | null | null | null | pyflu/update/signals.py | flupke/pyflu | 8856759ced5367fc8439a418b3ce6570b82707ce | [
"BSD-3-Clause"
] | null | null | null | from louie import Signal
| 22.055556 | 79 | 0.697733 |
db0cc1dc2ea1b2e1fa0e57ca089770ba09f4f7f8 | 9,443 | py | Python | sentence_transformers/losses/BatchHardTripletLoss.py | zhangxieyang2/sentence-transformers | 87847b86954f92d200fbb4351b0576f4778d9381 | [
"Apache-2.0"
] | 5 | 2021-08-10T02:31:51.000Z | 2022-02-08T01:12:25.000Z | sentence_transformers/losses/BatchHardTripletLoss.py | zhangxieyang2/sentence-transformers | 87847b86954f92d200fbb4351b0576f4778d9381 | [
"Apache-2.0"
] | 5 | 2021-07-02T04:37:04.000Z | 2021-07-21T00:02:58.000Z | sentence_transformers/losses/BatchHardTripletLoss.py | zhangxieyang2/sentence-transformers | 87847b86954f92d200fbb4351b0576f4778d9381 | [
"Apache-2.0"
] | 5 | 2021-07-04T06:02:02.000Z | 2021-07-21T08:32:10.000Z | import torch
from torch import nn, Tensor
from typing import Union, Tuple, List, Iterable, Dict
from sentence_transformers import util
from sentence_transformers.SentenceTransformer import SentenceTransformer
| 46.517241 | 162 | 0.684528 |
db0cd377f76bee16bf9abd7de52027837704b690 | 2,505 | py | Python | wedding/card/route.py | ackneal/wedday | b57b524e3aa237a2568bda4fadb2d5709773c507 | [
"MIT"
] | null | null | null | wedding/card/route.py | ackneal/wedday | b57b524e3aa237a2568bda4fadb2d5709773c507 | [
"MIT"
] | null | null | null | wedding/card/route.py | ackneal/wedday | b57b524e3aa237a2568bda4fadb2d5709773c507 | [
"MIT"
] | null | null | null | from flask import Flask, Blueprint, request, make_response, jsonify
from sqlalchemy.sql.expression import func
from google.cloud import storage
from .card import Cards
from ..functions import valid_param, upload_file
from .. import db
bp = Blueprint('route', __name__, url_prefix = '/api')
# , limit
| 29.127907 | 91 | 0.602395 |
db0de61b39c2d473b879ae1a407b8e263bd53ec2 | 6,804 | py | Python | mudi/utils.py | getzlab/mudi | eda170119708e59920c23a03834af915ecca24ce | [
"MIT"
] | 1 | 2021-11-04T00:08:00.000Z | 2021-11-04T00:08:00.000Z | mudi/utils.py | getzlab/mudi | eda170119708e59920c23a03834af915ecca24ce | [
"MIT"
] | null | null | null | mudi/utils.py | getzlab/mudi | eda170119708e59920c23a03834af915ecca24ce | [
"MIT"
] | null | null | null | import numpy as np
import h5py
import scipy
import gc
import pandas as pd
import os
import time
import pkg_resources
import scanpy as sc
import scanpy.external as sce
import sys
import scrublet as scr
# ---------------------------------
# Scanpy Helpers
# ---------------------------------
def scanpy_adata_loader(pat... | 36.191489 | 147 | 0.640212 |
db0e44fa6d9ec7326e7caba29ef74b40e65149d4 | 1,518 | py | Python | src/quacks/mypy.py | ariebovenberg/quacks | 839d307b24f3f37d9a5318c16acb631b9a1153f0 | [
"MIT"
] | 11 | 2021-12-12T20:51:15.000Z | 2022-02-02T12:08:32.000Z | src/quacks/mypy.py | ariebovenberg/quacks | 839d307b24f3f37d9a5318c16acb631b9a1153f0 | [
"MIT"
] | 8 | 2021-12-14T12:53:51.000Z | 2022-03-15T04:29:44.000Z | src/quacks/mypy.py | ariebovenberg/quacks | 839d307b24f3f37d9a5318c16acb631b9a1153f0 | [
"MIT"
] | 1 | 2021-12-15T16:50:34.000Z | 2021-12-15T16:50:34.000Z | from typing import Callable, Optional, Type
from mypy.nodes import AssignmentStmt, NameExpr, Statement, TempNode, Var
from mypy.plugin import ClassDefContext, Plugin
READONLY_DECORATOR_NAME = "quacks.readonly"
# this logic is mostly derived from the dataclasses plugin
def plugin(version: str) -> Type[Plugin]:
... | 26.631579 | 77 | 0.667984 |
db0eabb87d8f110b34f799008d45115ae3494a8a | 470 | py | Python | tests/test_toolbar.py | WilliamMayor/django-mail-panel | 2c41f808a645d5d7bad90510f44e53d29981cf22 | [
"Apache-2.0"
] | null | null | null | tests/test_toolbar.py | WilliamMayor/django-mail-panel | 2c41f808a645d5d7bad90510f44e53d29981cf22 | [
"Apache-2.0"
] | null | null | null | tests/test_toolbar.py | WilliamMayor/django-mail-panel | 2c41f808a645d5d7bad90510f44e53d29981cf22 | [
"Apache-2.0"
] | null | null | null | from .context import *
import unittest
from mail_panel.panels import MailToolbarPanel
if __name__ == "__main__":
unittest.TextTestRunner().run(suite())
| 21.363636 | 51 | 0.668085 |
db0fa33383a316fc52554465b3c7c6c0aa5f9ac3 | 8,130 | py | Python | tests/project/operations/operational_types/test_common_functions.py | anamileva/gridpath | e55eacb88ca5e6c034a90b18819e17cbd6f43854 | [
"Apache-2.0"
] | 44 | 2020-10-27T19:05:44.000Z | 2022-03-22T17:17:37.000Z | tests/project/operations/operational_types/test_common_functions.py | anamileva/gridpath | e55eacb88ca5e6c034a90b18819e17cbd6f43854 | [
"Apache-2.0"
] | 67 | 2020-10-08T22:36:53.000Z | 2022-03-22T22:58:33.000Z | tests/project/operations/operational_types/test_common_functions.py | anamileva/gridpath | e55eacb88ca5e6c034a90b18819e17cbd6f43854 | [
"Apache-2.0"
] | 21 | 2020-10-08T23:23:48.000Z | 2022-03-28T01:21:21.000Z | # Copyright 2016-2020 Blue Marble Analytics 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 ag... | 44.42623 | 79 | 0.605904 |
db0fa4a708c3b8da99f0eb3651ee65d3e1405fa0 | 338 | py | Python | top_links.py | judge2020/crossover-viz | 61fef8750f2b64a2e71b9737a3c992f99c47c300 | [
"0BSD"
] | null | null | null | top_links.py | judge2020/crossover-viz | 61fef8750f2b64a2e71b9737a3c992f99c47c300 | [
"0BSD"
] | null | null | null | top_links.py | judge2020/crossover-viz | 61fef8750f2b64a2e71b9737a3c992f99c47c300 | [
"0BSD"
] | null | null | null | from main import extract_data
if __name__ == '__main__':
top = {}
out = extract_data('CrossoverWiki.xml')
for name in out:
for link in name['links']:
w = link['with']
top[w] = top[w] + 1 if w in top else 1
top = dict(reversed(sorted(top.items(), key=lambda item: item[1])... | 28.166667 | 71 | 0.573964 |
db0fc2a14bd242c50cea5efa838e162798fc3772 | 316 | py | Python | instance/settings.py | isaacjohnwesley/digfont | 0f0a088151e52e972eec04dbc0b8c7fd6a30a52d | [
"MIT"
] | 2 | 2017-01-27T03:22:21.000Z | 2018-10-30T15:26:33.000Z | instance/settings.py | isaacjohnwesley/digfont | 0f0a088151e52e972eec04dbc0b8c7fd6a30a52d | [
"MIT"
] | null | null | null | instance/settings.py | isaacjohnwesley/digfont | 0f0a088151e52e972eec04dbc0b8c7fd6a30a52d | [
"MIT"
] | null | null | null | """
Flask application settings.
"""
import os
DEBUG = True
# Output un-merged files in debug mode.
#ASSETS_DEBUG = DEBUG
SECRET_KEY = os.environ.get('SECRET_KEY', None)
MY_VAR = os.environ.get('MY_VAR', None)
#: Mongodb settings
MONGODB_SETTINGS = {'DB' : 'digfont'}
#: CSRF key
SECRET_KEY = "dig.font.s3cr3t"
| 15.8 | 47 | 0.702532 |
db116d889b8b1d94133fabaa9ee920a870375f4b | 839 | py | Python | pangram.py | ZorbaTheStrange/pangram | f9fda95f119d328224f21f19690122e36be34482 | [
"MIT"
] | null | null | null | pangram.py | ZorbaTheStrange/pangram | f9fda95f119d328224f21f19690122e36be34482 | [
"MIT"
] | null | null | null | pangram.py | ZorbaTheStrange/pangram | f9fda95f119d328224f21f19690122e36be34482 | [
"MIT"
] | null | null | null | #! /usr/bin/python3
'''
panogram.py - this program recongizes pangrams.
by zorba
'''
import sys
def pangram_check(sentence_or_word):
'''
checks the user input to see if it is a pangram.
'''
letters = set('abcdefghijklmnopqrstuvwxyz')
if sentence_or_word.lower() == 'done':
z
for le... | 19.511628 | 131 | 0.623361 |
db13d0f32b95cfef64253a43f004918a6c18619d | 232 | py | Python | Chapter-4 Sequence/Dictionary.py | jaiswalIT02/pythonprograms | bc94e52121202b04c3e9112d9786f93ed6707f7a | [
"MIT"
] | null | null | null | Chapter-4 Sequence/Dictionary.py | jaiswalIT02/pythonprograms | bc94e52121202b04c3e9112d9786f93ed6707f7a | [
"MIT"
] | null | null | null | Chapter-4 Sequence/Dictionary.py | jaiswalIT02/pythonprograms | bc94e52121202b04c3e9112d9786f93ed6707f7a | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Sat Oct 10 15:31:57 2020
@author: Tarun Jaiswal
"""
dictone = {
"bookname": "Recursion Sutras",
"subject": "Recursion",
"author": "Champak Roy"
}
dicttwo = dict(dictone)
print(dicttwo) | 15.466667 | 35 | 0.633621 |
db15276b717208ef752639b4aaf944577ef66238 | 1,032 | py | Python | mportal/wsgi_start.py | auyeongwy/mportal | e406baea802093569c90c7206649c5afd9431dab | [
"Apache-2.0"
] | null | null | null | mportal/wsgi_start.py | auyeongwy/mportal | e406baea802093569c90c7206649c5afd9431dab | [
"Apache-2.0"
] | null | null | null | mportal/wsgi_start.py | auyeongwy/mportal | e406baea802093569c90c7206649c5afd9431dab | [
"Apache-2.0"
] | null | null | null | # Copyright 2014 Au Yeong Wing Yau
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | 34.4 | 74 | 0.774225 |
db16a58a234af950b25d6e13e770b9afd148413c | 1,252 | py | Python | lecture_04/312_plan_motion_ros_artist.py | farzanehesk/COMPAS-II-FS2022 | 857eb40000f0532d0c04689331eadefd38dce6b7 | [
"MIT"
] | 11 | 2022-01-24T15:07:15.000Z | 2022-03-29T12:58:05.000Z | lecture_04/312_plan_motion_ros_artist.py | farzanehesk/COMPAS-II-FS2022 | 857eb40000f0532d0c04689331eadefd38dce6b7 | [
"MIT"
] | 4 | 2022-03-16T06:06:45.000Z | 2022-03-29T22:59:11.000Z | lecture_04/312_plan_motion_ros_artist.py | farzanehesk/COMPAS-II-FS2022 | 857eb40000f0532d0c04689331eadefd38dce6b7 | [
"MIT"
] | 20 | 2022-03-02T10:36:41.000Z | 2022-03-09T00:12:33.000Z | import math
import time
from compas_fab.backends import RosClient
from compas.artists import Artist
from compas.geometry import Frame
with RosClient("localhost") as client:
robot = client.load_robot(load_geometry=True)
group = robot.main_group_name
frame = Frame((0.4, 0.3, 0.05), (-1, 0, 0), (0, 1, 0))
... | 33.837838 | 112 | 0.713259 |
db16e37393c0ecb2b013bb3800feb96ec755b22d | 1,306 | py | Python | awxkit/test/cli/test_client.py | vrevelas/awx | 858f43fd2aeccacd3172b1efa44fb37c7a48e92e | [
"Apache-2.0"
] | null | null | null | awxkit/test/cli/test_client.py | vrevelas/awx | 858f43fd2aeccacd3172b1efa44fb37c7a48e92e | [
"Apache-2.0"
] | null | null | null | awxkit/test/cli/test_client.py | vrevelas/awx | 858f43fd2aeccacd3172b1efa44fb37c7a48e92e | [
"Apache-2.0"
] | null | null | null | from io import StringIO
import pytest
from requests.exceptions import ConnectionError
from awxkit.cli import run, CLI
def test_connection_error(capfd):
cli = CLI()
cli.parse_args(['awx'])
with pytest.raises(ConnectionError):
cli.connect()
| 21.409836 | 56 | 0.608729 |
db18a54ed6a35015f51619ef8bd59e64ab56a6ea | 10,797 | py | Python | tests/python/pants_test/tasks/test_what_changed.py | areitz/pants | 9bfb3feb0272c05f36e190c9147091b97ee1950d | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/tasks/test_what_changed.py | areitz/pants | 9bfb3feb0272c05f36e190c9147091b97ee1950d | [
"Apache-2.0"
] | null | null | null | tests/python/pants_test/tasks/test_what_changed.py | areitz/pants | 9bfb3feb0272c05f36e190c9147091b97ee1950d | [
"Apache-2.0"
] | null | null | null | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from textwrap import... | 29.662088 | 100 | 0.643605 |
db1c1956b75c3a0483a601da0add4f5327ce2ad0 | 364 | py | Python | utils/image_utils.py | novicasarenac/car-racing-rl | 5bb3b2c47fb6ceda3e8f2c149485652da5a079ba | [
"MIT"
] | 10 | 2019-08-08T03:17:39.000Z | 2021-12-15T08:43:29.000Z | utils/image_utils.py | novicasarenac/car-racing-rl | 5bb3b2c47fb6ceda3e8f2c149485652da5a079ba | [
"MIT"
] | 7 | 2019-11-29T04:00:22.000Z | 2022-03-11T23:38:20.000Z | utils/image_utils.py | novicasarenac/car-racing-rl | 5bb3b2c47fb6ceda3e8f2c149485652da5a079ba | [
"MIT"
] | 4 | 2019-11-28T10:14:48.000Z | 2020-04-08T08:10:37.000Z | import PIL
import numpy as np
| 17.333333 | 55 | 0.653846 |
db1c1d0e4cd2adbba4dafd1f97c64d82fddfdf36 | 102 | py | Python | sharing_groups/apps.py | sthagen/misp-hub | 5b528b40796a74dc7e8367d75cb3c84920b87bfb | [
"BSD-3-Clause"
] | 2 | 2020-10-08T18:35:04.000Z | 2020-10-08T18:35:08.000Z | sharing_groups/apps.py | sthagen/misp-hub | 5b528b40796a74dc7e8367d75cb3c84920b87bfb | [
"BSD-3-Clause"
] | null | null | null | sharing_groups/apps.py | sthagen/misp-hub | 5b528b40796a74dc7e8367d75cb3c84920b87bfb | [
"BSD-3-Clause"
] | 1 | 2020-10-08T18:35:17.000Z | 2020-10-08T18:35:17.000Z | from django.apps import AppConfig
| 17 | 37 | 0.784314 |
db1fd3d38056cafb0f7ff39c5a005804f923571f | 5,310 | py | Python | GoogleCloud/backend.py | ryanjsfx2424/HowToNFTs | f4cff7ad676d272815bd936eb142556f92540a32 | [
"MIT"
] | null | null | null | GoogleCloud/backend.py | ryanjsfx2424/HowToNFTs | f4cff7ad676d272815bd936eb142556f92540a32 | [
"MIT"
] | null | null | null | GoogleCloud/backend.py | ryanjsfx2424/HowToNFTs | f4cff7ad676d272815bd936eb142556f92540a32 | [
"MIT"
] | null | null | null | ## backend.py
"""
The purpose of this script is to continuously monitor the blockchain to
1) determine if a holder aquires or loses an NFT:
2) if they do, generate a new image/movie for the tokens they hold,
3) upload the new image/movie to the hosting service
4) update the metadata file
Repeat :)
(The above ordering ... | 32.378049 | 109 | 0.628625 |
db20e9e55635779f1f3c32e48206263757ae91d0 | 10,875 | py | Python | dependencies/pyffi/formats/tga/__init__.py | korri123/fnv-blender-niftools-addon | ce8733e011c7d74c79be265832e1b06e85faf5ee | [
"BSD-3-Clause"
] | 4 | 2021-09-27T09:58:44.000Z | 2022-02-05T16:12:28.000Z | io_scene_niftools_updater/backup/dependencies/pyffi/formats/tga/__init__.py | korri123/fnv-blender-niftools-addon | ce8733e011c7d74c79be265832e1b06e85faf5ee | [
"BSD-3-Clause"
] | 5 | 2019-11-10T16:20:09.000Z | 2019-12-02T14:23:58.000Z | .venv/Lib/site-packages/pyffi/formats/tga/__init__.py | ndaley7/BodySlide-Group-Generator | 3ed7b78c5f5ccec103b6bf06bc24398cfb6ad014 | [
"BSD-3-Clause"
] | null | null | null | """
:mod:`pyffi.formats.tga` --- Targa (.tga)
=========================================
Implementation
--------------
.. autoclass:: TgaFormat
:show-inheritance:
:members:
Regression tests
----------------
Read a TGA file
^^^^^^^^^^^^^^^
>>> # check and read tga file
>>> import os
>>> from os.path import dir... | 34.090909 | 80 | 0.57269 |
db2348f24a291f4c0fb84c5876a92a0022f59eed | 355 | py | Python | python/push.py | swallowstalker/postopush | 6ec7e791aff1e3d868711d62e6c702a231bc1d65 | [
"MIT"
] | 1 | 2020-02-11T03:41:49.000Z | 2020-02-11T03:41:49.000Z | python/push.py | swallowstalker/postopush | 6ec7e791aff1e3d868711d62e6c702a231bc1d65 | [
"MIT"
] | null | null | null | python/push.py | swallowstalker/postopush | 6ec7e791aff1e3d868711d62e6c702a231bc1d65 | [
"MIT"
] | null | null | null | import telegram
import os
if __name__ == "__main__":
main() | 23.666667 | 87 | 0.687324 |
db23585c3e9e1de8759f993492930d5a53b54101 | 4,309 | py | Python | advent-of-code-2018/day 13/main.py | gikf/advent-of-code | 923b026ce87121b73093554734746c2ecb17c5e2 | [
"MIT"
] | null | null | null | advent-of-code-2018/day 13/main.py | gikf/advent-of-code | 923b026ce87121b73093554734746c2ecb17c5e2 | [
"MIT"
] | null | null | null | advent-of-code-2018/day 13/main.py | gikf/advent-of-code | 923b026ce87121b73093554734746c2ecb17c5e2 | [
"MIT"
] | null | null | null | """Advent of Code 2018 Day 13."""
from copy import deepcopy
CARTS = '<>^v'
INTERSECTION = '+'
CURVES = '\\/'
cart_to_direction = {
'<': 180,
'^': 90,
'>': 0,
'v': 270,
}
direction_to_move = {
0: (0, 1),
90: (-1, 0),
180: (0, -1),
270: (1, 0),
}
direction_to_cart = {
0: '>',
90:... | 26.115152 | 77 | 0.598747 |
db24a982814e1d245a07e054f71ca678690fe6ad | 13,037 | py | Python | goopylib/applications/custom_ease.py | YuvrajThorat/goopylib | b6bc593b7bcc92498a507f34b2190365a0ac51e7 | [
"MIT"
] | null | null | null | goopylib/applications/custom_ease.py | YuvrajThorat/goopylib | b6bc593b7bcc92498a507f34b2190365a0ac51e7 | [
"MIT"
] | null | null | null | goopylib/applications/custom_ease.py | YuvrajThorat/goopylib | b6bc593b7bcc92498a507f34b2190365a0ac51e7 | [
"MIT"
] | null | null | null | from goopylib.imports import *
from pathlib import Path as pathlib_Path
# I kinda wanted to scrap this, it wasn't that good.
| 49.570342 | 120 | 0.535246 |
db26ca941f83e142751cfd4f2744ef8039848b25 | 537 | py | Python | app/lib/duplication_check/train.py | WHUT-XGP/ASoulCnki | 98f29532e43e73f8e364d55b284558de5803b8b9 | [
"Apache-2.0"
] | null | null | null | app/lib/duplication_check/train.py | WHUT-XGP/ASoulCnki | 98f29532e43e73f8e364d55b284558de5803b8b9 | [
"Apache-2.0"
] | null | null | null | app/lib/duplication_check/train.py | WHUT-XGP/ASoulCnki | 98f29532e43e73f8e364d55b284558de5803b8b9 | [
"Apache-2.0"
] | null | null | null | # -*- encoding: utf-8 -*-
"""
Filename :train.py
Description :
Time :2021/06/22 15:21:08
Author :hwa
Version :1.0
"""
from app.lib.duplication_check.reply_database import ReplyDatabase
import time
if __name__ == "__main__":
train_data()
| 23.347826 | 70 | 0.646182 |
db28a45f5705fff1d415e5578ed431780d73980b | 5,837 | py | Python | buildscripts/task_generation/evg_config_builder.py | benety/mongo | 203430ac9559f82ca01e3cbb3b0e09149fec0835 | [
"Apache-2.0"
] | null | null | null | buildscripts/task_generation/evg_config_builder.py | benety/mongo | 203430ac9559f82ca01e3cbb3b0e09149fec0835 | [
"Apache-2.0"
] | null | null | null | buildscripts/task_generation/evg_config_builder.py | benety/mongo | 203430ac9559f82ca01e3cbb3b0e09149fec0835 | [
"Apache-2.0"
] | null | null | null | """Builder for generating evergreen configuration."""
from threading import Lock
from typing import Set, List, Dict
import inject
from shrub.v2 import ShrubProject, BuildVariant, ExistingTask, Task
from buildscripts.patch_builds.task_generation import validate_task_generation_limit
from buildscripts.task_generation.c... | 46.325397 | 99 | 0.716807 |
db299a97d65e80dbbfa712b50525b811276c7bff | 4,424 | py | Python | test/unit/vint/ast/plugin/scope_plugin/stub_node.py | mosheavni/vint | 9078dd626415cfe37ddaf03032e714bbaca8b336 | [
"MIT"
] | 538 | 2015-01-03T18:54:53.000Z | 2020-01-11T01:34:51.000Z | test/unit/vint/ast/plugin/scope_plugin/stub_node.py | mosheavni/vint | 9078dd626415cfe37ddaf03032e714bbaca8b336 | [
"MIT"
] | 235 | 2015-01-01T06:20:01.000Z | 2020-01-17T11:32:39.000Z | test/unit/vint/ast/plugin/scope_plugin/stub_node.py | mosheavni/vint | 9078dd626415cfe37ddaf03032e714bbaca8b336 | [
"MIT"
] | 43 | 2015-01-23T16:59:49.000Z | 2019-12-27T10:56:12.000Z | from vint.ast.node_type import NodeType
from vint.ast.plugin.scope_plugin.identifier_attribute import (
IDENTIFIER_ATTRIBUTE,
IDENTIFIER_ATTRIBUTE_DYNAMIC_FLAG,
IDENTIFIER_ATTRIBUTE_DECLARATION_FLAG,
IDENTIFIER_ATTRIBUTE_MEMBER_FLAG,
IDENTIFIER_ATTRIBUTE_FUNCTION_FLAG,
IDENTIFIER_ATTRIBUTE_AUTOL... | 35.96748 | 82 | 0.667043 |
db2cccb8706be958cee0c18ee9e554aac314a720 | 348 | py | Python | grpr2-ch/maci/policies/__init__.py | saarcohen30/GrPR2-CH | ba8c32f5b4caeebfc93ca30fa1fcc8223176183f | [
"MIT"
] | null | null | null | grpr2-ch/maci/policies/__init__.py | saarcohen30/GrPR2-CH | ba8c32f5b4caeebfc93ca30fa1fcc8223176183f | [
"MIT"
] | null | null | null | grpr2-ch/maci/policies/__init__.py | saarcohen30/GrPR2-CH | ba8c32f5b4caeebfc93ca30fa1fcc8223176183f | [
"MIT"
] | null | null | null | from .nn_policy import NNPolicy
# from .gmm import GMMPolicy
# from .latent_space_policy import LatentSpacePolicy
from .uniform_policy import UniformPolicy
# from .gaussian_policy import GaussianPolicy
from .stochastic_policy import StochasticNNPolicy, StochasticNNConditionalPolicy
from .deterministic_policy impo... | 38.666667 | 81 | 0.850575 |
db2d0faef6bb46b40a8c415250b0a2a6b57926d0 | 3,841 | py | Python | sugarpidisplay/sugarpiconfig/views.py | szpaku80/SugarPiDisplay | 793c288afaad1b1b6921b0d29ee0e6a537e42384 | [
"MIT"
] | 1 | 2022-02-12T20:39:20.000Z | 2022-02-12T20:39:20.000Z | sugarpidisplay/sugarpiconfig/views.py | szpaku80/SugarPiDisplay | 793c288afaad1b1b6921b0d29ee0e6a537e42384 | [
"MIT"
] | null | null | null | sugarpidisplay/sugarpiconfig/views.py | szpaku80/SugarPiDisplay | 793c288afaad1b1b6921b0d29ee0e6a537e42384 | [
"MIT"
] | null | null | null | """
Routes and views for the flask application.
"""
import os
import json
from flask import Flask, redirect, request, render_template, flash
from pathlib import Path
from flask_wtf import FlaskForm
from wtforms import StringField,SelectField,PasswordField,BooleanField
from wtforms.validators import InputRequired,Valida... | 35.564815 | 93 | 0.664931 |
db2d5607d06728d0c91675bdab230c329ed3e400 | 2,001 | py | Python | progressao_aritmeticav3.py | eduardobaltazarmarfim/PythonC | 8e44b4f191582c73cca6df98120ab142145c4ba1 | [
"MIT"
] | null | null | null | progressao_aritmeticav3.py | eduardobaltazarmarfim/PythonC | 8e44b4f191582c73cca6df98120ab142145c4ba1 | [
"MIT"
] | null | null | null | progressao_aritmeticav3.py | eduardobaltazarmarfim/PythonC | 8e44b4f191582c73cca6df98120ab142145c4ba1 | [
"MIT"
] | null | null | null |
verificar() | 17.4 | 91 | 0.410795 |
db2d89c006750b429af0eb85221902cff310ad5b | 3,278 | py | Python | policies/plc_migrate_default.py | PaloAltoNetworks/pcs-migration-management | 766c8c861befa92e593b23ad6d248e33f62054bb | [
"ISC"
] | 1 | 2022-03-17T12:51:45.000Z | 2022-03-17T12:51:45.000Z | policies/plc_migrate_default.py | PaloAltoNetworks/pcs-migration-management | 766c8c861befa92e593b23ad6d248e33f62054bb | [
"ISC"
] | 2 | 2021-11-03T15:34:40.000Z | 2021-12-14T19:50:20.000Z | policies/plc_migrate_default.py | PaloAltoNetworks/pcs-migration-management | 766c8c861befa92e593b23ad6d248e33f62054bb | [
"ISC"
] | 4 | 2021-11-09T17:57:01.000Z | 2022-01-24T17:41:21.000Z | from policies import plc_get, plc_add, plc_update
from sdk.color_print import c_print
from tqdm import tqdm
def migrate_builtin_policies(tenant_sessions: list, logger):
'''
Updates the default/built in policies of all clone tenants so they are the same as the
source tenant. Default policies can not be adde... | 46.169014 | 148 | 0.57352 |
db2e05e89e1db86e733714d3d045b8d52021205c | 8,158 | py | Python | MAIN VERSION 2.py | HorridHanu/Notepad-Python | 5c40ddf0cc01b88387bf3052117581cba6e8ab6f | [
"Apache-2.0"
] | 1 | 2021-07-03T09:16:26.000Z | 2021-07-03T09:16:26.000Z | MAIN VERSION 2.py | HorridHanu/Notepad-Python | 5c40ddf0cc01b88387bf3052117581cba6e8ab6f | [
"Apache-2.0"
] | null | null | null | MAIN VERSION 2.py | HorridHanu/Notepad-Python | 5c40ddf0cc01b88387bf3052117581cba6e8ab6f | [
"Apache-2.0"
] | null | null | null |
########################################################################################
########################################################################################
## # CODE LANGUAGE IS PYHTON! ## ## ##
## # DATE: 1-JULY-2021 ## ## ... | 28.131034 | 95 | 0.539103 |
db308acc7784941bed9244b19f0ab77519bcb972 | 512 | py | Python | unfollow_parfum.py | AntonPukhonin/InstaPy | 0c480474ec39e174fa4256b48bc25bc4ecf7b6aa | [
"MIT"
] | null | null | null | unfollow_parfum.py | AntonPukhonin/InstaPy | 0c480474ec39e174fa4256b48bc25bc4ecf7b6aa | [
"MIT"
] | null | null | null | unfollow_parfum.py | AntonPukhonin/InstaPy | 0c480474ec39e174fa4256b48bc25bc4ecf7b6aa | [
"MIT"
] | null | null | null | from instapy import InstaPy
#insta_username = 'antonpuhonin'
#insta_password = 'Bulbazavr36'
insta_username = 'tonparfums'
insta_password = 'ov9AN6NlnV'
try:
session = InstaPy(username=insta_username,
password=insta_password,
headless_browser=True,
... | 24.380952 | 122 | 0.667969 |
db30f2130ff4ed72860f0513ddb8d069dd812ef8 | 1,462 | py | Python | portal/grading/serializers.py | LDSSA/portal | 9561da1e262678fe68dcf51c66007c0fb13eb51a | [
"MIT"
] | 2 | 2020-11-09T03:48:36.000Z | 2021-07-02T14:30:09.000Z | portal/grading/serializers.py | LDSSA/portal | 9561da1e262678fe68dcf51c66007c0fb13eb51a | [
"MIT"
] | 132 | 2020-04-25T15:57:56.000Z | 2022-03-10T19:15:51.000Z | portal/grading/serializers.py | LDSSA/portal | 9561da1e262678fe68dcf51c66007c0fb13eb51a | [
"MIT"
] | 1 | 2020-10-24T16:15:57.000Z | 2020-10-24T16:15:57.000Z | from rest_framework import serializers
from portal.academy import models
from portal.applications.models import Submission, Challenge
| 24.366667 | 64 | 0.613543 |
db3364ee622377b95d22e40cf02ce787e7812d16 | 323 | py | Python | Funcoes/ex106-sistemaInterativoAjuda.py | ascaniopy/python | 6d8892b7b9ff803b7422a61e68a383ec6ac7d62d | [
"MIT"
] | null | null | null | Funcoes/ex106-sistemaInterativoAjuda.py | ascaniopy/python | 6d8892b7b9ff803b7422a61e68a383ec6ac7d62d | [
"MIT"
] | null | null | null | Funcoes/ex106-sistemaInterativoAjuda.py | ascaniopy/python | 6d8892b7b9ff803b7422a61e68a383ec6ac7d62d | [
"MIT"
] | null | null | null | from time import sleep
c = ('\033[m', # 0 - Sem cores
'\033[0;30;41m', # 1 - Vermelho
'\033[0;30;42m', # 2 - Verde
'\033[0;30;43m', # 3 - Amarelo
'\033[0;30;44m', # 4 - Azul
'\033[0;30;45m', # 5 - Roxo
'\033[0;30m' # 6 - Branco
)
#Programa princip... | 19 | 40 | 0.439628 |
db3369b101ea183c503c1fa561b47c91b9100d56 | 36 | py | Python | deeptrack/extras/__init__.py | Margon01/DeepTrack-2.0_old | f4f4abc89ab1f63aeb4722f84dcfb93189c57ccf | [
"MIT"
] | 65 | 2020-04-29T01:06:01.000Z | 2022-03-28T12:44:02.000Z | deeptrack/extras/__init__.py | Margon01/DeepTrack-2.0_old | f4f4abc89ab1f63aeb4722f84dcfb93189c57ccf | [
"MIT"
] | 41 | 2020-04-20T16:09:07.000Z | 2022-03-29T15:40:08.000Z | deeptrack/extras/__init__.py | Margon01/DeepTrack-2.0_old | f4f4abc89ab1f63aeb4722f84dcfb93189c57ccf | [
"MIT"
] | 31 | 2020-04-27T18:04:06.000Z | 2022-03-18T17:24:50.000Z | from . import datasets, radialcenter | 36 | 36 | 0.833333 |
db33adbcb92391813fa24af06e3df16ea1f77a19 | 236 | py | Python | pyvisdk/enums/virtual_machine_ht_sharing.py | Infinidat/pyvisdk | f2f4e5f50da16f659ccc1d84b6a00f397fa997f8 | [
"MIT"
] | null | null | null | pyvisdk/enums/virtual_machine_ht_sharing.py | Infinidat/pyvisdk | f2f4e5f50da16f659ccc1d84b6a00f397fa997f8 | [
"MIT"
] | null | null | null | pyvisdk/enums/virtual_machine_ht_sharing.py | Infinidat/pyvisdk | f2f4e5f50da16f659ccc1d84b6a00f397fa997f8 | [
"MIT"
] | null | null | null |
########################################
# Automatically generated, do not edit.
########################################
from pyvisdk.thirdparty import Enum
VirtualMachineHtSharing = Enum(
'any',
'internal',
'none',
)
| 15.733333 | 40 | 0.440678 |
db33d4b02c61194e50c6a9e8e0140a09b33f011f | 1,710 | py | Python | reo/migrations/0118_auto_20210715_2148.py | NREL/REopt_API | fbc70f3b0cdeec9ee220266d6b3b0c5d64f257a6 | [
"BSD-3-Clause"
] | 7 | 2022-01-29T12:10:10.000Z | 2022-03-28T13:45:20.000Z | reo/migrations/0118_auto_20210715_2148.py | NREL/reopt_api | fbc70f3b0cdeec9ee220266d6b3b0c5d64f257a6 | [
"BSD-3-Clause"
] | 12 | 2022-02-01T18:23:18.000Z | 2022-03-31T17:22:17.000Z | reo/migrations/0118_auto_20210715_2148.py | NREL/REopt_API | fbc70f3b0cdeec9ee220266d6b3b0c5d64f257a6 | [
"BSD-3-Clause"
] | 3 | 2022-02-08T19:44:40.000Z | 2022-03-12T11:05:36.000Z | # Generated by Django 3.1.12 on 2021-07-15 21:48
from django.db import migrations, models
| 31.666667 | 59 | 0.588304 |
db34a67ee55a1e9b0a17aba6120305fef0d0c936 | 16,287 | py | Python | bpy_lambda/2.78/scripts/addons_contrib/io_scene_cod/__init__.py | resultant-gamedev/bpy_lambda | c8cf46c10c69e74a0892b621d76c62edaa5b04bc | [
"MIT"
] | null | null | null | bpy_lambda/2.78/scripts/addons_contrib/io_scene_cod/__init__.py | resultant-gamedev/bpy_lambda | c8cf46c10c69e74a0892b621d76c62edaa5b04bc | [
"MIT"
] | null | null | null | bpy_lambda/2.78/scripts/addons_contrib/io_scene_cod/__init__.py | resultant-gamedev/bpy_lambda | c8cf46c10c69e74a0892b621d76c62edaa5b04bc | [
"MIT"
] | 1 | 2019-11-24T18:43:42.000Z | 2019-11-24T18:43:42.000Z | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | 34.144654 | 151 | 0.647203 |
db359edbcc421125b398c8492ccfbe1df5e59aa8 | 771 | py | Python | pynpact/tests/steps/test_extract.py | NProfileAnalysisComputationalTool/npact | d4495f5cba2a936f2be2f2c821edd5429d1a58da | [
"BSD-3-Clause"
] | 2 | 2015-09-18T02:01:19.000Z | 2021-09-03T18:40:59.000Z | pynpact/tests/steps/test_extract.py | NProfileAnalysisComputationalTool/npact | d4495f5cba2a936f2be2f2c821edd5429d1a58da | [
"BSD-3-Clause"
] | null | null | null | pynpact/tests/steps/test_extract.py | NProfileAnalysisComputationalTool/npact | d4495f5cba2a936f2be2f2c821edd5429d1a58da | [
"BSD-3-Clause"
] | 1 | 2015-09-25T18:58:21.000Z | 2015-09-25T18:58:21.000Z | import os.path
import pytest
import py
from pynpact.steps import extract
| 23.363636 | 47 | 0.713359 |
db3607c58d0cde5c1aa1bfb4ceddd2fc24ac1f1e | 16,994 | py | Python | dl_training/core.py | Duplums/SMLvsDL | b285717bd8d8e832b4bc9e2b42d18bd96b628def | [
"MIT"
] | null | null | null | dl_training/core.py | Duplums/SMLvsDL | b285717bd8d8e832b4bc9e2b42d18bd96b628def | [
"MIT"
] | null | null | null | dl_training/core.py | Duplums/SMLvsDL | b285717bd8d8e832b4bc9e2b42d18bd96b628def | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
##########################################################################
# NSAp - Copyright (C) CEA, 2019
# Distributed under the terms of the CeCILL-B license, as published by
# the CEA-CNRS-INRIA. Refer to the LICENSE file or to
# http://www.cecill.info/licences/Licence_CeCILL-B_V1-en.html
#... | 41.550122 | 114 | 0.530658 |
db36254aae8d66e15ff58a16dc04f7e0fdb0d51b | 865 | py | Python | python/two_pointers/1004_max_consecutive_ones_iii.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | 6 | 2019-07-15T13:23:57.000Z | 2020-01-22T03:12:01.000Z | python/two_pointers/1004_max_consecutive_ones_iii.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | null | null | null | python/two_pointers/1004_max_consecutive_ones_iii.py | linshaoyong/leetcode | ea052fad68a2fe0cbfa5469398508ec2b776654f | [
"MIT"
] | 1 | 2019-07-24T02:15:31.000Z | 2019-07-24T02:15:31.000Z | from collections import deque
| 27.03125 | 69 | 0.419653 |
db3658941378a7367cc8947a67be394b0c932596 | 3,000 | py | Python | student_files/lap_times_db.py | jstucken/DET-Python-Anki-Overdrive-v1-1 | 74cfcd9ea533cc0127fa2b8bd4ed26400da8a21b | [
"MIT"
] | null | null | null | student_files/lap_times_db.py | jstucken/DET-Python-Anki-Overdrive-v1-1 | 74cfcd9ea533cc0127fa2b8bd4ed26400da8a21b | [
"MIT"
] | null | null | null | student_files/lap_times_db.py | jstucken/DET-Python-Anki-Overdrive-v1-1 | 74cfcd9ea533cc0127fa2b8bd4ed26400da8a21b | [
"MIT"
] | null | null | null | #
# This script allows the user to control an Anki car using Python
# To control multiple cars at once, open a seperate Command Line Window for each car
# and call this script with the approriate car mac address.
# This script attempts to save lap times into local mysql db running on the pi
# Author: jstucken
#... | 28.037383 | 87 | 0.606333 |
db377a3b2e18c647ed0d195a162511f6c719f4a5 | 9,992 | py | Python | flatsat/opensatkit/cfs/apps/adcs_io/adcs-drivers/cubewheel-driver/test/code.py | cromulencellc/hackasat-final-2021 | d01a1b5d7947b3e41ae2da3ec63d5f43278a5eac | [
"MIT"
] | 4 | 2022-02-25T05:45:27.000Z | 2022-03-10T01:05:27.000Z | flatsat/opensatkit/cfs/apps/adcs_io/adcs-drivers/cubewheel-driver/test/code.py | cromulencellc/hackasat-final-2021 | d01a1b5d7947b3e41ae2da3ec63d5f43278a5eac | [
"MIT"
] | null | null | null | flatsat/opensatkit/cfs/apps/adcs_io/adcs-drivers/cubewheel-driver/test/code.py | cromulencellc/hackasat-final-2021 | d01a1b5d7947b3e41ae2da3ec63d5f43278a5eac | [
"MIT"
] | 2 | 2022-03-02T02:14:16.000Z | 2022-03-05T07:36:18.000Z | import board
from i2cperipheral import I2CPeripheral
from analogio import AnalogOut
from digitalio import DigitalInOut, Direction, Pull
import struct
import math
import time
regs = [0] * 16
index = 0
i2c_addr = 0x68
frame_id = 0
motor_control_mode = 0
backup_mode = 0
motor_switch_state = 0
hall_switch_state = 0
enc... | 46.910798 | 214 | 0.522218 |
db37c14354deeb12104130ebc747684e2912a561 | 360 | py | Python | constants.py | tooreht/airstripmap | 7a65e67e417870c6853fd1adb848cf91d724f566 | [
"MIT"
] | null | null | null | constants.py | tooreht/airstripmap | 7a65e67e417870c6853fd1adb848cf91d724f566 | [
"MIT"
] | null | null | null | constants.py | tooreht/airstripmap | 7a65e67e417870c6853fd1adb848cf91d724f566 | [
"MIT"
] | null | null | null | GOV_AIRPORTS = {
"Antananarivo/Ivato": "big",
"Antsiranana/Diego": "small",
"Fianarantsoa": "small",
"Tolagnaro/Ft. Dauphin": "small",
"Mahajanga": "medium",
"Mananjary": "small",
"Nosy Be": "medium",
"Morondava": "small",
"Sainte Marie": "small",
"Sambava": "small",
"Toamasi... | 24 | 37 | 0.561111 |
db399ce2f0303a23e925d9d8085ddcee798d396a | 608 | py | Python | practical_0/fibonacci.py | BarracudaPff/code-golf-data-pythpn | 42e8858c2ebc6a061012bcadb167d29cebb85c5e | [
"MIT"
] | null | null | null | practical_0/fibonacci.py | BarracudaPff/code-golf-data-pythpn | 42e8858c2ebc6a061012bcadb167d29cebb85c5e | [
"MIT"
] | null | null | null | practical_0/fibonacci.py | BarracudaPff/code-golf-data-pythpn | 42e8858c2ebc6a061012bcadb167d29cebb85c5e | [
"MIT"
] | null | null | null | if __name__ == "__main__":
INPUT = sys.argv[1]
print(INPUT)
main(INPUT) | 30.4 | 80 | 0.6875 |
db3a4d55930ad8686d2de82e1838a1ca79a144ec | 24,800 | py | Python | UW_System/UW_System/UW_System/spiders/uw_system.py | Nouldine/MyCrawlerSystem | 7bba8ba3ec76e10f70a35700602812ee6f039b63 | [
"MIT"
] | null | null | null | UW_System/UW_System/UW_System/spiders/uw_system.py | Nouldine/MyCrawlerSystem | 7bba8ba3ec76e10f70a35700602812ee6f039b63 | [
"MIT"
] | null | null | null | UW_System/UW_System/UW_System/spiders/uw_system.py | Nouldine/MyCrawlerSystem | 7bba8ba3ec76e10f70a35700602812ee6f039b63 | [
"MIT"
] | null | null | null |
from scrapy import Spider
from scrapy.spiders import CrawlSpider, Rule
from scrapy.selector import Selector
from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.linkextractors import LinkExtractor
import scrapy
from scrapy.spidermiddlewares... | 90.510949 | 303 | 0.798185 |
db3b169862361f20c4e85e1f3babf59d22b794c5 | 10,622 | py | Python | src/lib/GL/glutbindings/glutbind.py | kokizzu/v8cgi | eafd3bd7a5dd1d60e2f1483701a52e7ac0ae0eba | [
"BSD-3-Clause"
] | 4 | 2016-01-31T08:49:35.000Z | 2021-07-12T17:31:42.000Z | src/lib/GL/glutbindings/glutbind.py | kokizzu/v8cgi | eafd3bd7a5dd1d60e2f1483701a52e7ac0ae0eba | [
"BSD-3-Clause"
] | null | null | null | src/lib/GL/glutbindings/glutbind.py | kokizzu/v8cgi | eafd3bd7a5dd1d60e2f1483701a52e7ac0ae0eba | [
"BSD-3-Clause"
] | 1 | 2021-06-03T22:51:17.000Z | 2021-06-03T22:51:17.000Z | import sys
import re
PATH_GLUT = 'glut.h'
FILE_GLUT = 'glutbind.cpp'
TEMPLATES = ['glutInit', 'glutTimerFunc']
def main():
"""
Still some things have to be hand-made, like
changing argv pargc values in the glutInit method definition
Also change the TimerFunc method with some magic.
"""
make_... | 33.828025 | 188 | 0.553568 |