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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
364be06117f32488ff211fd30ee702031b4b63f0 | 935 | py | Python | make_mozilla/events/tests/test_paginators.py | Mozilla-GitHub-Standards/54c69db06ef83bda60e995a6c34ecfd168ca028994e40ce817295415bb409f0c | f80e7c0cff97a1e9b301aa04015db983c7645778 | [
"BSD-3-Clause"
] | 4 | 2015-05-08T16:58:53.000Z | 2019-09-06T05:30:59.000Z | make_mozilla/events/tests/test_paginators.py | Mozilla-GitHub-Standards/54c69db06ef83bda60e995a6c34ecfd168ca028994e40ce817295415bb409f0c | f80e7c0cff97a1e9b301aa04015db983c7645778 | [
"BSD-3-Clause"
] | 2 | 2019-02-17T17:44:53.000Z | 2019-03-28T03:54:39.000Z | make_mozilla/events/tests/test_paginators.py | Mozilla-GitHub-Standards/54c69db06ef83bda60e995a6c34ecfd168ca028994e40ce817295415bb409f0c | f80e7c0cff97a1e9b301aa04015db983c7645778 | [
"BSD-3-Clause"
] | 7 | 2015-05-21T15:38:29.000Z | 2019-10-28T23:39:06.000Z | from django.utils import unittest
from nose.tools import eq_, ok_
from make_mozilla.events.paginators import results_page
sample_results = [1,2,3,4,5,6,7,8,9,0]
| 28.333333 | 67 | 0.686631 |
364bea1cc3a268196e079579f42571e86d9befb2 | 644 | py | Python | river/ensemble/test_streaming_random_patches.py | brcharron/creme | 25290780f6bba0eb030215194e81b120d0219389 | [
"BSD-3-Clause"
] | 1 | 2020-12-04T18:56:19.000Z | 2020-12-04T18:56:19.000Z | river/ensemble/test_streaming_random_patches.py | brcharron/creme | 25290780f6bba0eb030215194e81b120d0219389 | [
"BSD-3-Clause"
] | null | null | null | river/ensemble/test_streaming_random_patches.py | brcharron/creme | 25290780f6bba0eb030215194e81b120d0219389 | [
"BSD-3-Clause"
] | null | null | null | import copy
import pytest
from river import utils
from river import ensemble
estimator = ensemble.SRPClassifier(
n_models=3, # Smaller ensemble than the default to avoid bottlenecks
seed=42)
| 24.769231 | 75 | 0.726708 |
364c9e4c77bae14954a377098632009151fcd659 | 2,071 | py | Python | antlir/nspawn_in_subvol/plugin_hooks.py | lhl2617/antlir | 1041732e8163c1316d3e45c0ba4db7937faa4809 | [
"MIT"
] | null | null | null | antlir/nspawn_in_subvol/plugin_hooks.py | lhl2617/antlir | 1041732e8163c1316d3e45c0ba4db7937faa4809 | [
"MIT"
] | null | null | null | antlir/nspawn_in_subvol/plugin_hooks.py | lhl2617/antlir | 1041732e8163c1316d3e45c0ba4db7937faa4809 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
"The core logic of how plugins integrate with `popen_nspawn`"
import functools
import subprocess
from contextlib impor... | 30.910448 | 79 | 0.740222 |
364d2da5e343e2ce74256399a60ddf18ac23eadf | 4,577 | py | Python | horseDB.py | maf-kakimoto/bet | 3da7c57bca88cee8f5565e605fae38168f6b21fa | [
"Apache-2.0"
] | null | null | null | horseDB.py | maf-kakimoto/bet | 3da7c57bca88cee8f5565e605fae38168f6b21fa | [
"Apache-2.0"
] | null | null | null | horseDB.py | maf-kakimoto/bet | 3da7c57bca88cee8f5565e605fae38168f6b21fa | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import time
import pandas as pd
# self-made
import manage_mysql
| 28.968354 | 89 | 0.489404 |
364dafdcafb142ed50351e67323fec6552de2b84 | 325 | py | Python | maskrcnn_benchmark/data/datasets/__init__.py | lipengfeizju/Detection | efe00b221725be05e30fd67957958f97ae42b3cf | [
"MIT"
] | null | null | null | maskrcnn_benchmark/data/datasets/__init__.py | lipengfeizju/Detection | efe00b221725be05e30fd67957958f97ae42b3cf | [
"MIT"
] | null | null | null | maskrcnn_benchmark/data/datasets/__init__.py | lipengfeizju/Detection | efe00b221725be05e30fd67957958f97ae42b3cf | [
"MIT"
] | null | null | null | # Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.
from .coco import COCODataset
from .voc import PascalVOCDataset
from .concat_dataset import ConcatDataset
__all__ = ["COCODataset", "ConcatDataset", "PascalVOCDataset"]
# if isinstance(dataset, datasets.MyDataset):
# return coco_evaluation(**... | 36.111111 | 71 | 0.778462 |
364dc99efa920ea79a2d2856b41d0a11a59412b1 | 68 | py | Python | social/actions.py | raccoongang/python-social-auth | 81c0a542d158772bd3486d31834c10af5d5f08b0 | [
"BSD-3-Clause"
] | 1,987 | 2015-01-01T16:12:45.000Z | 2022-03-29T14:24:25.000Z | social/actions.py | raccoongang/python-social-auth | 81c0a542d158772bd3486d31834c10af5d5f08b0 | [
"BSD-3-Clause"
] | 731 | 2015-01-01T22:55:25.000Z | 2022-03-10T15:07:51.000Z | virtual/lib/python3.6/site-packages/social/actions.py | dennismwaniki67/awards | 80ed10541f5f751aee5f8285ab1ad54cfecba95f | [
"MIT"
] | 1,082 | 2015-01-01T16:27:26.000Z | 2022-03-22T21:18:33.000Z | from social_core.actions import do_auth, do_complete, do_disconnect
| 34 | 67 | 0.867647 |
364de668db5e04abf8c4ddb3813bc74fcc464515 | 3,097 | py | Python | src/alphazero/data.py | Whillikers/seldon | 0d3ff7b25c7272d76a9aba38ee22efd910750f84 | [
"MIT"
] | 1 | 2019-11-03T20:18:16.000Z | 2019-11-03T20:18:16.000Z | src/alphazero/data.py | Whillikers/seldon | 0d3ff7b25c7272d76a9aba38ee22efd910750f84 | [
"MIT"
] | null | null | null | src/alphazero/data.py | Whillikers/seldon | 0d3ff7b25c7272d76a9aba38ee22efd910750f84 | [
"MIT"
] | null | null | null | """
Code for working with data.
In-memory format (as a list):
- board: Tensor (8, 8, 2) [bool; one-hot]
- move: Tensor (64,) [bool; one-hot]
- value: Tensor () [float32]
On-disk format (to save space and quicken loading):
- board: int64
- move: int64
- value: float32
"""
from typing import Dict, Tuple
import ... | 34.032967 | 87 | 0.680336 |
364e9aa16c6e94c8b02ddd7f95c3691e35f760e3 | 140 | py | Python | Codechef Factorial.py | zoya-0509/Practice-codes | 4d71b1b004f309025c215e55a504c7817b00e8c9 | [
"MIT"
] | null | null | null | Codechef Factorial.py | zoya-0509/Practice-codes | 4d71b1b004f309025c215e55a504c7817b00e8c9 | [
"MIT"
] | null | null | null | Codechef Factorial.py | zoya-0509/Practice-codes | 4d71b1b004f309025c215e55a504c7817b00e8c9 | [
"MIT"
] | null | null | null | t=int(input(""))
while (t>0):
n=int(input(""))
f=1
for i in range(1,n+1):
f=f*i
print(f)
t=t-1
| 15.555556 | 28 | 0.378571 |
364f0f926540cab854ab6053e2e09c0e19eaaacc | 1,569 | py | Python | pkgcore/ebuild/errors.py | pombreda/pkgcore | b438fc573af1a031d7ce12adbbf299bab5338451 | [
"BSD-3-Clause"
] | 1 | 2021-07-05T13:10:18.000Z | 2021-07-05T13:10:18.000Z | pkgcore/ebuild/errors.py | vapier/pkgcore | 35a7e4f4f0fc61dd9c4dc72d35a57e2e9d5b832f | [
"BSD-3-Clause"
] | 8 | 2015-03-24T14:21:44.000Z | 2015-03-24T14:21:44.000Z | pkgcore/ebuild/errors.py | vapier/pkgcore | 35a7e4f4f0fc61dd9c4dc72d35a57e2e9d5b832f | [
"BSD-3-Clause"
] | null | null | null | # Copyright: 2005 Brian Harring <ferringb@gmail.com>
# License: GPL2/BSD
# "More than one statement on a single line"
# pylint: disable-msg=C0321
"""
atom exceptions
"""
__all__ = ("MalformedAtom", "InvalidVersion", "InvalidCPV", "ParseError")
from pkgcore.package import errors
| 27.526316 | 78 | 0.599745 |
3652d826b86718a511de34e46553dd7eade808bc | 10,578 | py | Python | trainer/train_doc_ml.py | dainis-boumber/AA_CNN | 649612215c7e290ede1c51625268ad9fd7b46228 | [
"MIT"
] | 1 | 2021-09-27T09:39:11.000Z | 2021-09-27T09:39:11.000Z | trainer/train_doc_ml.py | dainis-boumber/AA_CNN | 649612215c7e290ede1c51625268ad9fd7b46228 | [
"MIT"
] | null | null | null | trainer/train_doc_ml.py | dainis-boumber/AA_CNN | 649612215c7e290ede1c51625268ad9fd7b46228 | [
"MIT"
] | 4 | 2018-03-21T23:19:40.000Z | 2021-03-05T15:09:01.000Z | #! /usr/bin/env python
import datetime
import os
import time
import tensorflow as tf
from datahelpers import data_helper_ml_mulmol6_OnTheFly as dh
from evaluators import eval_pan_archy as evaler
from networks.cnn_ml_archy import TextCNN
# Training
DO_DEV_SPLIT = False
bold_step = [2500, 3000, 3500, 4000, 4500]
b... | 45.012766 | 119 | 0.616752 |
365493226ef8ff623b67882ccdb1d5957462cc3b | 80 | py | Python | releases/_version.py | Nicusor97/releases | 97a763e41bbe7374106a1c648b89346a0d935429 | [
"BSD-2-Clause"
] | null | null | null | releases/_version.py | Nicusor97/releases | 97a763e41bbe7374106a1c648b89346a0d935429 | [
"BSD-2-Clause"
] | null | null | null | releases/_version.py | Nicusor97/releases | 97a763e41bbe7374106a1c648b89346a0d935429 | [
"BSD-2-Clause"
] | null | null | null | __version_info__ = (1, 6, 1)
__version__ = '.'.join(map(str, __version_info__))
| 26.666667 | 50 | 0.7 |
3656cab44b971cc68a2561efdd667d02fb35d8b4 | 442 | py | Python | areaofrectangle.py | Ahmad-Aiman/Calculate-Area-of-Rectangle | ff33a2eab14bffc1a8c29a9134cabea48b69538b | [
"MIT"
] | null | null | null | areaofrectangle.py | Ahmad-Aiman/Calculate-Area-of-Rectangle | ff33a2eab14bffc1a8c29a9134cabea48b69538b | [
"MIT"
] | null | null | null | areaofrectangle.py | Ahmad-Aiman/Calculate-Area-of-Rectangle | ff33a2eab14bffc1a8c29a9134cabea48b69538b | [
"MIT"
] | null | null | null | #Area of a rectangle = width x length
#Perimeter of a rectangle = 2 x [length + width#
width_input = float (input("\nPlease enter width: "))
length_input = float (input("Please enter length: "))
areaofRectangle = width_input * length_input
perimeterofRectangle = 2 * (width_input * length_input)
print ("\n... | 29.466667 | 67 | 0.70362 |
3657fec70ed8fedb4b5b14e5e0ae343bef42588d | 2,324 | py | Python | python/src/main/python/pygw/store/rocksdb/options.py | Maxar-Corp/sh-geowave | 675781d3898b50c09ee66f57e74cf788286b05d5 | [
"Apache-2.0"
] | null | null | null | python/src/main/python/pygw/store/rocksdb/options.py | Maxar-Corp/sh-geowave | 675781d3898b50c09ee66f57e74cf788286b05d5 | [
"Apache-2.0"
] | null | null | null | python/src/main/python/pygw/store/rocksdb/options.py | Maxar-Corp/sh-geowave | 675781d3898b50c09ee66f57e74cf788286b05d5 | [
"Apache-2.0"
] | null | null | null | #
# Copyright (c) 2013-2020 Contributors to the Eclipse Foundation
#
# See the NOTICE file distributed with this work for additional information regarding copyright
# ownership. All rights reserved. This program and the accompanying materials are made available
# under the terms of the Apache License, Version 2.0 whic... | 31.835616 | 96 | 0.63167 |
36595769c1ee20b5e029d4e12f235050f6967122 | 33,084 | py | Python | server/miscellaneous.py | dewancse/SMT-PMR | 8d280ff5d169a021a73ffa30c8159581ab859c62 | [
"MIT"
] | null | null | null | server/miscellaneous.py | dewancse/SMT-PMR | 8d280ff5d169a021a73ffa30c8159581ab859c62 | [
"MIT"
] | 10 | 2017-05-16T22:08:40.000Z | 2017-10-30T21:07:47.000Z | server/miscellaneous.py | dewancse/SMT-PMR | 8d280ff5d169a021a73ffa30c8159581ab859c62 | [
"MIT"
] | null | null | null | import requests
from libcellml import *
import lxml.etree as ET
# pre-generated model recipe in JSON format
model_recipe = [
{
"med_fma": "http://purl.obolibrary.org/obo/FMA_84666",
"med_pr": "http://purl.obolibrary.org/obo/PR_P26433",
"med_pr_text": "sodium/hydrogen exchanger 3 (rat)",
... | 44.647773 | 127 | 0.599716 |
365d9e30b62ef2b43194d13cd3b143b547c83df7 | 2,383 | py | Python | epg_grabber/sites/beinsports_id.py | akmalharith/epg-grabber | ee6bdd20f7cbb4c780d96a8ce0fe2ca68b553c33 | [
"MIT"
] | 1 | 2022-03-16T00:42:21.000Z | 2022-03-16T00:42:21.000Z | epg_grabber/sites/beinsports_id.py | akmalharith/epg-grabber | ee6bdd20f7cbb4c780d96a8ce0fe2ca68b553c33 | [
"MIT"
] | null | null | null | epg_grabber/sites/beinsports_id.py | akmalharith/epg-grabber | ee6bdd20f7cbb4c780d96a8ce0fe2ca68b553c33 | [
"MIT"
] | 1 | 2022-03-17T17:16:30.000Z | 2022-03-17T17:16:30.000Z | from typing import List
import requests
from pathlib import Path
from datetime import date, datetime
from bs4 import BeautifulSoup
from helper.classes import Channel, Program
from helper.utils import get_channel_by_name, get_epg_datetime
TIMEZONE_OFFSET = "+0800"
PROGRAM_URL = "https://epg.beinsports.com/utctime_id.ph... | 31.773333 | 111 | 0.61645 |
365ebdd95b4706dd8e23a6549e2d402adf342132 | 1,608 | py | Python | C19/19-1_Blog/blogs/views.py | Triple-Z/Python-Crash-Course | 7e59104420f6110e4d60668314264105534016ce | [
"MIT"
] | null | null | null | C19/19-1_Blog/blogs/views.py | Triple-Z/Python-Crash-Course | 7e59104420f6110e4d60668314264105534016ce | [
"MIT"
] | null | null | null | C19/19-1_Blog/blogs/views.py | Triple-Z/Python-Crash-Course | 7e59104420f6110e4d60668314264105534016ce | [
"MIT"
] | null | null | null | from django.shortcuts import render
from .models import BlogPost
from django.http import HttpResponseRedirect, Http404
from django.urls import reverse
from .forms import BlogForm
from django.contrib.auth.decorators import login_required
from .auth import check_blog_author
| 26.8 | 78 | 0.663557 |
365f44e59be4486a64ab3380f2d229d1dcacfbe6 | 34 | py | Python | SmartAPI/__init__.py | Kreastr/SmartAPI-HEILA | 97dbe9e6e27267c60a4f94f60692d5f391e2ef7f | [
"BSD-2-Clause"
] | null | null | null | SmartAPI/__init__.py | Kreastr/SmartAPI-HEILA | 97dbe9e6e27267c60a4f94f60692d5f391e2ef7f | [
"BSD-2-Clause"
] | null | null | null | SmartAPI/__init__.py | Kreastr/SmartAPI-HEILA | 97dbe9e6e27267c60a4f94f60692d5f391e2ef7f | [
"BSD-2-Clause"
] | null | null | null | import sys
import site
import os
| 6.8 | 11 | 0.794118 |
3660a38e9b27f00fca04ce1ae0246262cce312d3 | 3,455 | py | Python | cpplint_junit.py | johnthagen/cpplint-junit | 9de4ed6762fdb415e1ebe94f1cd82d2027c2b96f | [
"MIT"
] | 5 | 2016-02-15T19:24:46.000Z | 2020-05-12T12:35:24.000Z | cpplint_junit.py | johnthagen/cpplint-junit | 9de4ed6762fdb415e1ebe94f1cd82d2027c2b96f | [
"MIT"
] | 2 | 2019-10-14T12:25:38.000Z | 2019-12-15T18:34:34.000Z | cpplint_junit.py | johnthagen/cpplint-junit | 9de4ed6762fdb415e1ebe94f1cd82d2027c2b96f | [
"MIT"
] | null | null | null | #! /usr/bin/env python3
"""Converts cpplint output to JUnit XML format."""
import argparse
import collections
import os
import re
import sys
from typing import Dict, List
from xml.etree import ElementTree
from exitstatus import ExitStatus
def parse_cpplint(file_name: str) -> Dict[str, List[CpplintError]]:
""... | 29.279661 | 96 | 0.58958 |
366122abcb50b723473f045b548942945acdfd8c | 3,633 | py | Python | opennmt/tests/text_test.py | gcervantes8/OpenNMT-tf | 8cfe999c7b71f8d10caa6fe2af80cdf81d2b8c90 | [
"MIT"
] | 1,363 | 2017-11-02T14:00:04.000Z | 2022-03-25T15:21:50.000Z | opennmt/tests/text_test.py | gcervantes8/OpenNMT-tf | 8cfe999c7b71f8d10caa6fe2af80cdf81d2b8c90 | [
"MIT"
] | 455 | 2017-11-02T13:23:07.000Z | 2022-03-23T08:45:30.000Z | opennmt/tests/text_test.py | gcervantes8/OpenNMT-tf | 8cfe999c7b71f8d10caa6fe2af80cdf81d2b8c90 | [
"MIT"
] | 429 | 2017-11-02T17:14:33.000Z | 2022-02-26T12:00:39.000Z | import tensorflow as tf
from parameterized import parameterized
from opennmt.data import text
if __name__ == "__main__":
tf.test.main()
| 36.33 | 84 | 0.496009 |
3661e55cade9d0047ddb0c329454134c08c3a612 | 4,277 | py | Python | test/test_px_proxy.py | wizzard/perimeterx-python-3-wsgi | 03aded2c868dda3ad198c1f3ee944c775557d818 | [
"MIT"
] | 1 | 2021-11-06T16:47:51.000Z | 2021-11-06T16:47:51.000Z | test/test_px_proxy.py | wizzard/perimeterx-python-3-wsgi | 03aded2c868dda3ad198c1f3ee944c775557d818 | [
"MIT"
] | 1 | 2020-08-31T10:50:25.000Z | 2020-08-31T10:50:25.000Z | test/test_px_proxy.py | wizzard/perimeterx-python-3-wsgi | 03aded2c868dda3ad198c1f3ee944c775557d818 | [
"MIT"
] | 4 | 2020-04-01T10:37:09.000Z | 2020-12-03T12:34:13.000Z | import unittest
import requests_mock
from werkzeug.test import EnvironBuilder
from werkzeug.wrappers import Request
from perimeterx import px_constants
from perimeterx.px_config import PxConfig
from perimeterx.px_context import PxContext
from perimeterx.px_proxy import PxProxy
| 45.989247 | 208 | 0.676876 |
36625b8ef7dfda999b8814af3148b3e2460eb4ae | 1,683 | py | Python | PI/Events/Event.py | HotShot0901/PI | 7e6fd0f68b4222e09ea825f27709ec5b1e51e928 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"MIT-0",
"bzip2-1.0.6",
"BSD-3-Clause"
] | null | null | null | PI/Events/Event.py | HotShot0901/PI | 7e6fd0f68b4222e09ea825f27709ec5b1e51e928 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"MIT-0",
"bzip2-1.0.6",
"BSD-3-Clause"
] | null | null | null | PI/Events/Event.py | HotShot0901/PI | 7e6fd0f68b4222e09ea825f27709ec5b1e51e928 | [
"Apache-2.0",
"BSD-2-Clause",
"MIT",
"MIT-0",
"bzip2-1.0.6",
"BSD-3-Clause"
] | null | null | null | # This just shifts 1 to i th BIT
# This class is equvalent to a C++ enum
# This class is equvalent to a C++ enum
# It uses bitstream to represent flags, so
# a single Event can have multiple flags
def IsInCategory(self, category: int) -> bool:
return bool(self.CategoryFlags & category)
def __repr__... | 26.714286 | 87 | 0.541889 |
36639a81d680c26726142c2d1b64012956deef78 | 19,831 | py | Python | src/minerl/data/data_pipeline.py | imatge-upc/pixelcoordEDL | 353632feed6ac8c93758c1a2a1b7a477e7ff053c | [
"MIT"
] | 1 | 2021-06-10T04:03:24.000Z | 2021-06-10T04:03:24.000Z | src/minerl/data/data_pipeline.py | imatge-upc/pixelcoordEDL | 353632feed6ac8c93758c1a2a1b7a477e7ff053c | [
"MIT"
] | null | null | null | src/minerl/data/data_pipeline.py | imatge-upc/pixelcoordEDL | 353632feed6ac8c93758c1a2a1b7a477e7ff053c | [
"MIT"
] | null | null | null | import collections
import functools
import json
import logging
import multiprocessing
import os
import time
from collections import OrderedDict
from queue import PriorityQueue, Empty
from typing import List, Tuple, Any
from itertools import cycle, islice
import minerl.herobraine.env_spec
from minerl.herobraine.hero imp... | 40.554192 | 255 | 0.590742 |
3665bd678eff29512019ffaccbebf303e9c263a9 | 1,461 | py | Python | composer/trainer/devices/device_cpu.py | IanWorley/composer | e4d443012511b387ad495b4add3b3b101d729741 | [
"Apache-2.0"
] | null | null | null | composer/trainer/devices/device_cpu.py | IanWorley/composer | e4d443012511b387ad495b4add3b3b101d729741 | [
"Apache-2.0"
] | null | null | null | composer/trainer/devices/device_cpu.py | IanWorley/composer | e4d443012511b387ad495b4add3b3b101d729741 | [
"Apache-2.0"
] | null | null | null | # Copyright 2021 MosaicML. All Rights Reserved.
"""The CPU device used for training."""
from __future__ import annotations
import logging
from contextlib import contextmanager
from typing import Any, Dict, Generator, TypeVar, Union
import torch
from composer.core import Precision
from composer.trainer.devices.devi... | 27.566038 | 97 | 0.687201 |
3666bf1e611ab935978f475b3bd8eb1fa7fa44ff | 4,208 | py | Python | experiments/generate-pdf/process_hypercluster_data.py | parasailteam/coconet | d3a7d22697686586d01ca8f55f40fd2cc8b755c1 | [
"MIT"
] | 5 | 2022-01-12T06:36:56.000Z | 2022-03-15T06:56:03.000Z | experiments/generate-pdf/process_hypercluster_data.py | parasailteam/coconet | d3a7d22697686586d01ca8f55f40fd2cc8b755c1 | [
"MIT"
] | null | null | null | experiments/generate-pdf/process_hypercluster_data.py | parasailteam/coconet | d3a7d22697686586d01ca8f55f40fd2cc8b755c1 | [
"MIT"
] | 1 | 2022-03-13T05:43:50.000Z | 2022-03-13T05:43:50.000Z | import os
import re
import json
import ast
import csv
import sys
import shutil
# ["allreduce-lambf16", "reducescatter-lamb-allgatherf16", "test-lambf16"] + \
# ["allreduce-adamf16", "reducescatter-adam-allgatherf16", "test-adamf16"] +\
all_binaries = ["adam-ar-c", "adam-rs-c-ag", "adam-fuse-rs-c-ag"] + \
["lamb-... | 36.591304 | 210 | 0.631654 |
36670d4de61ce049abde949e0e34089149ce236c | 3,409 | py | Python | examples/pytorch/tgn/tgn.py | ketyi/dgl | a1b859c29b63a673c148d13231a49504740e0e01 | [
"Apache-2.0"
] | 9,516 | 2018-12-08T22:11:31.000Z | 2022-03-31T13:04:33.000Z | examples/pytorch/tgn/tgn.py | ketyi/dgl | a1b859c29b63a673c148d13231a49504740e0e01 | [
"Apache-2.0"
] | 2,494 | 2018-12-08T22:43:00.000Z | 2022-03-31T21:16:27.000Z | examples/pytorch/tgn/tgn.py | ketyi/dgl | a1b859c29b63a673c148d13231a49504740e0e01 | [
"Apache-2.0"
] | 2,529 | 2018-12-08T22:56:14.000Z | 2022-03-31T13:07:41.000Z | import copy
import torch.nn as nn
import dgl
from modules import MemoryModule, MemoryOperation, MsgLinkPredictor, TemporalTransformerConv, TimeEncode
| 40.105882 | 104 | 0.573482 |
366765dfc3b501d93189b1860864e2cb97e5eb00 | 3,813 | py | Python | pyinq/printers/__init__.py | Auzzy/pyinq | 91cc13013931620458ae6b23abc1d4a3e5ded27f | [
"0BSD"
] | null | null | null | pyinq/printers/__init__.py | Auzzy/pyinq | 91cc13013931620458ae6b23abc1d4a3e5ded27f | [
"0BSD"
] | null | null | null | pyinq/printers/__init__.py | Auzzy/pyinq | 91cc13013931620458ae6b23abc1d4a3e5ded27f | [
"0BSD"
] | null | null | null | """
Copyright (c) 2012-2013, Austin Noto-Moniz (metalnut4@netscape.net)
Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND... | 35.635514 | 88 | 0.647522 |
3667faea99d9e44cf1ec814efbac09de88c252f2 | 2,255 | py | Python | cassiopeia-diskstore/cassiopeia_diskstore/championgg.py | mrtolkien/cassiopeia-datastores | 1fbc6f9163ec4a5b4efdc892c219b5785f62b274 | [
"MIT"
] | 3 | 2017-11-22T20:38:18.000Z | 2018-09-04T07:48:55.000Z | cassiopeia-diskstore/cassiopeia_diskstore/championgg.py | mrtolkien/cassiopeia-datastores | 1fbc6f9163ec4a5b4efdc892c219b5785f62b274 | [
"MIT"
] | 12 | 2018-06-05T16:08:36.000Z | 2020-11-26T19:16:59.000Z | cassiopeia-diskstore/cassiopeia_diskstore/championgg.py | mrtolkien/cassiopeia-datastores | 1fbc6f9163ec4a5b4efdc892c219b5785f62b274 | [
"MIT"
] | 10 | 2017-11-14T18:59:10.000Z | 2020-09-17T15:18:29.000Z | from typing import Type, TypeVar, MutableMapping, Any, Iterable
from datapipelines import DataSource, DataSink, PipelineContext, Query, validate_query
from cassiopeia_championgg.dto import ChampionGGStatsListDto, ChampionGGStatsDto
from cassiopeia.datastores.uniquekeys import convert_region_to_platform
from .common i... | 43.365385 | 124 | 0.66031 |
366887a1056798b43b8bf1750a891210075a1524 | 5,788 | py | Python | src/cogs/fun-commands.py | ShubhamPatilsd/johnpeter-discord | 40738f8df57f85275eb4887ab2ed9a9b96ba9e40 | [
"MIT"
] | 1 | 2021-07-08T09:03:08.000Z | 2021-07-08T09:03:08.000Z | src/cogs/fun-commands.py | vidhyanijadala/johnpeter-discord | 40738f8df57f85275eb4887ab2ed9a9b96ba9e40 | [
"MIT"
] | null | null | null | src/cogs/fun-commands.py | vidhyanijadala/johnpeter-discord | 40738f8df57f85275eb4887ab2ed9a9b96ba9e40 | [
"MIT"
] | 1 | 2021-07-08T09:03:04.000Z | 2021-07-08T09:03:04.000Z | import asyncio
import json
import os
import random
import re
import urllib
import urllib.request
from glob import glob
from os import getenv
from random import choice
import discord
from discord.ext import commands
from utils.cms import get_sponsor_intro, get_sponsor_audio
from utils.commands import only_random, requ... | 35.292683 | 143 | 0.609537 |
3669ffcdb82515f7959090d8ec3b463fb0d9a6f3 | 1,175 | py | Python | aluraflix/tests/test_serializer.py | bonetou/django-rest-tests-documentation | a9e640e6425da560215d8f985a428d8eb90e09f9 | [
"MIT"
] | null | null | null | aluraflix/tests/test_serializer.py | bonetou/django-rest-tests-documentation | a9e640e6425da560215d8f985a428d8eb90e09f9 | [
"MIT"
] | null | null | null | aluraflix/tests/test_serializer.py | bonetou/django-rest-tests-documentation | a9e640e6425da560215d8f985a428d8eb90e09f9 | [
"MIT"
] | null | null | null | from django.test import TestCase
from aluraflix.models import Programa
from aluraflix.serializers import ProgramaSerializer
| 39.166667 | 96 | 0.667234 |
366b6bc762ff4618c8e2b630d09921664231bc91 | 53 | py | Python | 3_team/tests/unittest_sample_ng/sample.py | pyfirst/pymook-samplecode | 82321237c34515d287f28bd51ea86f870c1f5514 | [
"MIT"
] | 31 | 2017-09-27T14:54:39.000Z | 2021-05-26T14:03:44.000Z | 3_team/tests/unittest_sample_ng/sample.py | pyfirst/pymook-samplecode | 82321237c34515d287f28bd51ea86f870c1f5514 | [
"MIT"
] | 11 | 2018-03-11T05:28:14.000Z | 2022-03-11T23:19:36.000Z | 3_team/tests/unittest_sample_ng/sample.py | pyfirst/pymook-samplecode | 82321237c34515d287f28bd51ea86f870c1f5514 | [
"MIT"
] | 41 | 2017-10-21T04:45:56.000Z | 2021-07-16T14:12:33.000Z | def add(m, n):
"""mn"""
return m - n
| 13.25 | 20 | 0.490566 |
366bcb9133a5c3e67a13ed8806476e7eebec5689 | 16,720 | py | Python | src/pyseed/commands/gen.py | okosioc/pyseed | a4ee4bb6f005c9a9b80eafea45b91ddb7354fa91 | [
"MIT"
] | null | null | null | src/pyseed/commands/gen.py | okosioc/pyseed | a4ee4bb6f005c9a9b80eafea45b91ddb7354fa91 | [
"MIT"
] | null | null | null | src/pyseed/commands/gen.py | okosioc/pyseed | a4ee4bb6f005c9a9b80eafea45b91ddb7354fa91 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
gen
~~~~~~~~~~~~~~
Command gen.
:copyright: (c) 2021 by weiminfeng.
:date: 2021/9/1
"""
import argparse
import importlib.util
import json
import logging
import os
import re
import shutil
import sys
from typing import List
import inflection
from flask import request
fr... | 37.321429 | 112 | 0.536124 |
366e02860b9652ab88acf006189e3756c87e9843 | 575 | py | Python | logger/hum_test3.py | scsibug/Raspberry-Pi-Sensor-Node | 606cf2a15a72ac1503c7318a39c9f3cc523a9c4a | [
"Unlicense"
] | 1 | 2015-12-23T04:27:16.000Z | 2015-12-23T04:27:16.000Z | logger/hum_test3.py | scsibug/Raspberry-Pi-Sensor-Node | 606cf2a15a72ac1503c7318a39c9f3cc523a9c4a | [
"Unlicense"
] | null | null | null | logger/hum_test3.py | scsibug/Raspberry-Pi-Sensor-Node | 606cf2a15a72ac1503c7318a39c9f3cc523a9c4a | [
"Unlicense"
] | null | null | null | # this example came from http://www.raspberrypi.org/phpBB3/viewtopic.php?f=32&t=29454&sid=4543fbd8f48478644e608d741309c12b&start=25
import smbus
import time
b = smbus.SMBus(1)
d = []
addr = 0x27
b.write_quick(addr)
time.sleep(0.05)
d = b.read_i2c_block_data(addr, 0,4)
status = (d[0] & 0xc0) >> 6
humidity = (((d[0] & 0x... | 31.944444 | 131 | 0.634783 |
366e485c9bc0322e636a5736840956b42775c986 | 4,493 | py | Python | vendor/python-pika/tests/frame_tests.py | suthat/signal | 9730f7ee1a3b00a65eb4d9a2cce4f3a5eee33451 | [
"Apache-2.0"
] | 1 | 2018-09-02T22:28:56.000Z | 2018-09-02T22:28:56.000Z | vendor/python-pika/tests/frame_tests.py | suthat/signal | 9730f7ee1a3b00a65eb4d9a2cce4f3a5eee33451 | [
"Apache-2.0"
] | null | null | null | vendor/python-pika/tests/frame_tests.py | suthat/signal | 9730f7ee1a3b00a65eb4d9a2cce4f3a5eee33451 | [
"Apache-2.0"
] | null | null | null | """
Tests for pika.frame
"""
try:
import unittest2 as unittest
except ImportError:
import unittest
from pika import exceptions
from pika import frame
from pika import spec
| 38.401709 | 79 | 0.672157 |
366eb4dab94bf0dd50fb14aff2db308e9c7cde9d | 15,266 | py | Python | apps/users/views.py | RympeR/HypeFans | 28c3712af47fec4df2fe3df43c6e0ad26302bcbc | [
"MIT"
] | null | null | null | apps/users/views.py | RympeR/HypeFans | 28c3712af47fec4df2fe3df43c6e0ad26302bcbc | [
"MIT"
] | null | null | null | apps/users/views.py | RympeR/HypeFans | 28c3712af47fec4df2fe3df43c6e0ad26302bcbc | [
"MIT"
] | 2 | 2021-05-20T10:43:17.000Z | 2021-06-09T08:12:24.000Z | import logging
from datetime import datetime, timedelta
import requests
from core.utils.customClasses import UserFilter
from core.utils.default_responses import (api_accepted_202,
api_bad_request_400,
api_block_by_policy_451,
... | 32.971922 | 102 | 0.631796 |
366eba2a1a7b41a03aed067b028dd47e05783a38 | 7,102 | py | Python | powerline/commands/main.py | OSunday/powerline | f6bf7b4916dc377a5ffe13caff171fbaa3ab02f6 | [
"MIT"
] | 15 | 2017-10-02T06:09:07.000Z | 2020-01-17T07:53:58.000Z | powerline/commands/main.py | OSunday/powerline | f6bf7b4916dc377a5ffe13caff171fbaa3ab02f6 | [
"MIT"
] | null | null | null | powerline/commands/main.py | OSunday/powerline | f6bf7b4916dc377a5ffe13caff171fbaa3ab02f6 | [
"MIT"
] | 6 | 2017-10-03T15:48:12.000Z | 2021-08-28T18:07:29.000Z | # vim:fileencoding=utf-8:noet
# WARNING: using unicode_literals causes errors in argparse
from __future__ import (division, absolute_import, print_function)
import argparse
import sys
from itertools import chain
from powerline.lib.overrides import parsedotval, parse_override_var
from powerline.lib.dict import mergea... | 37.183246 | 89 | 0.696987 |
366f7150d8d059f7a7975d57fa08b372b8cccd5e | 2,126 | py | Python | hunter/mlops/experiments/experiment.py | akamlani/hunter-core | 98b08b69fc460eb4cb75e67a36f86e80e03029bd | [
"MIT"
] | null | null | null | hunter/mlops/experiments/experiment.py | akamlani/hunter-core | 98b08b69fc460eb4cb75e67a36f86e80e03029bd | [
"MIT"
] | null | null | null | hunter/mlops/experiments/experiment.py | akamlani/hunter-core | 98b08b69fc460eb4cb75e67a36f86e80e03029bd | [
"MIT"
] | null | null | null | import numpy as np
import os
import time
import shutil
import logging
logger = logging.getLogger(__name__)
| 27.973684 | 122 | 0.62841 |
36708e40843ebac43aa8a9c519fbf7f8e02640d2 | 1,895 | py | Python | blousebrothers/confs/migrations/0044_subscriptions_bonus.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | 1 | 2022-01-27T11:58:10.000Z | 2022-01-27T11:58:10.000Z | blousebrothers/confs/migrations/0044_subscriptions_bonus.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | 5 | 2021-03-19T00:01:54.000Z | 2022-03-11T23:46:21.000Z | blousebrothers/confs/migrations/0044_subscriptions_bonus.py | sladinji/blousebrothers | 461de3ba011c0aaed3f0014136c4497b6890d086 | [
"MIT"
] | null | null | null |
from django.db import migrations
from decimal import Decimal
from dateutil.relativedelta import relativedelta
from datetime import date
| 32.118644 | 93 | 0.705013 |
367177f87916e9f31a627747b9f2f2e7f5f23e29 | 1,771 | py | Python | NLP-Model/GraphGenerator.py | AdityaPrasadMishra/NLP--Project-Group-16 | fb62cc6a1db4a494058171f11c14a2be3933a9a1 | [
"MIT"
] | null | null | null | NLP-Model/GraphGenerator.py | AdityaPrasadMishra/NLP--Project-Group-16 | fb62cc6a1db4a494058171f11c14a2be3933a9a1 | [
"MIT"
] | null | null | null | NLP-Model/GraphGenerator.py | AdityaPrasadMishra/NLP--Project-Group-16 | fb62cc6a1db4a494058171f11c14a2be3933a9a1 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Apr 24 22:03:42 2018
@author: aditya
"""
import codecs
import numpy as np
import matplotlib.pyplot as plt
import tensorflow as tf
import re
import time
import random
training_errors= [2.880890389084816, 2.589109110832214, 2.529299919307232, 2.465622152... | 52.088235 | 506 | 0.784303 |
36720adea01a0055ba50050d6d0540ddb952c604 | 2,926 | py | Python | nc/tests/test_views.py | OpenDataPolicingNC/Traffic-Stops | 74e0d16ad2ac32addca6f04d34c2ddf36d023990 | [
"MIT"
] | 25 | 2015-09-12T23:10:52.000Z | 2021-03-24T08:39:46.000Z | nc/tests/test_views.py | OpenDataPolicingNC/Traffic-Stops | 74e0d16ad2ac32addca6f04d34c2ddf36d023990 | [
"MIT"
] | 159 | 2015-07-01T03:57:23.000Z | 2021-04-17T21:09:19.000Z | nc/tests/test_views.py | copelco/NC-Traffic-Stops | 74e0d16ad2ac32addca6f04d34c2ddf36d023990 | [
"MIT"
] | 8 | 2015-10-02T16:56:40.000Z | 2020-10-18T01:16:29.000Z | from django.core.urlresolvers import reverse
from django.test import TestCase
from nc.tests import factories
| 39.013333 | 81 | 0.66473 |
367317abfaeafe103c587d9d91dc6360e2f8aec5 | 24,706 | py | Python | hitbloq_bot.py | PulseLane/hitbloq | 94ea0563e6c2e34c0ff63b99cda8c6ff064e0910 | [
"MIT"
] | null | null | null | hitbloq_bot.py | PulseLane/hitbloq | 94ea0563e6c2e34c0ff63b99cda8c6ff064e0910 | [
"MIT"
] | null | null | null | hitbloq_bot.py | PulseLane/hitbloq | 94ea0563e6c2e34c0ff63b99cda8c6ff064e0910 | [
"MIT"
] | null | null | null | import asyncio
import json
import time
import sys
import discord
from discord.utils import get
import create_action
from db import database
import beatsaver
from cr_formulas import curves
from general import full_clean
beatsaver_interface = beatsaver.BeatSaverInterface()
token = read_f('data/token.txt')
guild_id = ... | 63.348718 | 313 | 0.551769 |
3673734968412c54bc6045e1a17de68b5afe3f70 | 1,885 | py | Python | GUI/preprocessing.py | muhammadtarek98/Graduation-project | 48f8df3b38c17f99787c8ffbe8f2bdcac166fce2 | [
"MIT"
] | null | null | null | GUI/preprocessing.py | muhammadtarek98/Graduation-project | 48f8df3b38c17f99787c8ffbe8f2bdcac166fce2 | [
"MIT"
] | null | null | null | GUI/preprocessing.py | muhammadtarek98/Graduation-project | 48f8df3b38c17f99787c8ffbe8f2bdcac166fce2 | [
"MIT"
] | null | null | null | import numpy as np
import cv2 as cv
import os
from PIL import Image
| 37.7 | 83 | 0.606897 |
36740a39b572e9f7d2dc74c2436385fe4043acca | 3,022 | py | Python | examples/generate_og_predictions.py | dennlinger/sentence-transformers | 67e82af977fbb198142ede7fbe941b74f8ce6c89 | [
"Apache-2.0"
] | 5 | 2020-12-25T07:22:54.000Z | 2022-02-15T16:35:19.000Z | examples/generate_og_predictions.py | dennlinger/sentence-transformers | 67e82af977fbb198142ede7fbe941b74f8ce6c89 | [
"Apache-2.0"
] | null | null | null | examples/generate_og_predictions.py | dennlinger/sentence-transformers | 67e82af977fbb198142ede7fbe941b74f8ce6c89 | [
"Apache-2.0"
] | 2 | 2021-04-04T17:50:25.000Z | 2021-11-18T01:17:21.000Z | """
The system RoBERTa trains on the AGB dataset with softmax loss function.
At every 1000 training steps, the model is evaluated on the AGB dev set.
"""
from torch.utils.data import DataLoader
from sentence_transformers import models, losses
from sentence_transformers import SentencesDataset, LoggingHandler, Sentence... | 45.104478 | 110 | 0.666115 |
3674bf513c78cb14c7a7197f8717bd835994b08c | 9,730 | py | Python | config/settings/defaults.py | lucaluca/palimpsest | 64565d1b188d68bc978253a21a98440b769e26ee | [
"BSD-3-Clause"
] | null | null | null | config/settings/defaults.py | lucaluca/palimpsest | 64565d1b188d68bc978253a21a98440b769e26ee | [
"BSD-3-Clause"
] | null | null | null | config/settings/defaults.py | lucaluca/palimpsest | 64565d1b188d68bc978253a21a98440b769e26ee | [
"BSD-3-Clause"
] | null | null | null | """
Base settings to build other settings files upon.
"""
import environ
ROOT_DIR = environ.Path(__file__) - 3 # (palimpsest/config/settings/base.py - 3 = palimpsest/)
APPS_DIR = ROOT_DIR.path('palimpsest')
env = environ.Env()
READ_DOT_ENV_FILE = env.bool('DJANGO_READ_DOT_ENV_FILE', default=False)
if READ_DOT_ENV_... | 40.041152 | 100 | 0.626619 |
3674e5cf5b0c10311bddd2c6d6dd783cd12f6998 | 5,992 | py | Python | cognipy/edit.py | jswiatkowski/cognipy | 44a6e32a44253d4965e03a9021a69134c033d041 | [
"Apache-2.0"
] | 34 | 2020-10-31T23:55:43.000Z | 2022-02-09T12:46:46.000Z | cognipy/edit.py | jswiatkowski/cognipy | 44a6e32a44253d4965e03a9021a69134c033d041 | [
"Apache-2.0"
] | 38 | 2020-10-31T11:16:01.000Z | 2022-02-01T12:08:11.000Z | cognipy/edit.py | jswiatkowski/cognipy | 44a6e32a44253d4965e03a9021a69134c033d041 | [
"Apache-2.0"
] | 9 | 2021-03-22T18:42:11.000Z | 2022-03-17T18:35:06.000Z | import ipywidgets as widgets
from traitlets import Unicode, Int, validate
import os
import json
from datetime import datetime,timedelta
from IPython.display import Javascript
from IPython.display import HTML
from cognipy.ontology import Ontology
from IPython.display import clear_output
_JS_initialized = False
def e... | 32.923077 | 124 | 0.537049 |
3674f6fa0841c2939ec3314e0546dac6ce11be16 | 1,717 | py | Python | params_tuning/ls_iter_n/out_comparator.py | bleakTwig/ophs_grasp | 3e3986154d096a476805269cb818f8c8709a7bda | [
"MIT"
] | 3 | 2019-04-21T06:28:00.000Z | 2022-01-20T15:39:34.000Z | params_tuning/ls_iter_n/out_comparator.py | bleakTwig/ophs_grasp | 3e3986154d096a476805269cb818f8c8709a7bda | [
"MIT"
] | 1 | 2020-03-08T07:21:52.000Z | 2022-01-20T15:40:04.000Z | params_tuning/ls_iter_n/out_comparator.py | bleakTwig/ophs_grasp | 3e3986154d096a476805269cb818f8c8709a7bda | [
"MIT"
] | 2 | 2019-11-13T13:05:06.000Z | 2020-05-21T18:09:03.000Z | INSTANCES = 405
ITERS = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 50, 100]
N_ITERS = len(ITERS)
# === RESULTS GATHERING ====================================================== #
# results_m is a [INSTANCES][N_ITERS] matrix to store every test result
results_m = [[0 for x in range(... | 36.531915 | 95 | 0.447292 |
36770786861f14e087df15911777504f6f97449c | 1,064 | py | Python | glim_extensions/jslint/jslint.py | aacanakin/glim-extensions | 75cf1e857abd717645db85f273650c0d883c55f2 | [
"MIT"
] | 2 | 2015-01-06T19:21:44.000Z | 2019-06-14T13:04:51.000Z | glim_extensions/jslint/jslint.py | aacanakin/glim-extensions | 75cf1e857abd717645db85f273650c0d883c55f2 | [
"MIT"
] | 2 | 2015-02-20T07:40:47.000Z | 2015-02-20T07:44:42.000Z | glim_extensions/jslint/jslint.py | aacanakin/glim-extensions | 75cf1e857abd717645db85f273650c0d883c55f2 | [
"MIT"
] | null | null | null | import subprocess
import os
from glim.core import Facade
from glim import Log
from glim import paths
DEFAULT_CONFIG = {
'source': os.path.join(paths.APP_PATH, 'assets/js'),
}
| 23.644444 | 81 | 0.641917 |
3678a2ecf4023c3c9633a878432bfa1234ee6123 | 777 | py | Python | migrations/versions/16d42da99601_.py | osmearth/tasking-manager | b9938496c30eedc44974b29858f803b218c7235b | [
"BSD-2-Clause"
] | null | null | null | migrations/versions/16d42da99601_.py | osmearth/tasking-manager | b9938496c30eedc44974b29858f803b218c7235b | [
"BSD-2-Clause"
] | 3 | 2020-03-24T16:28:34.000Z | 2021-02-02T21:52:03.000Z | migrations/versions/16d42da99601_.py | osmearth/tasking-manager | b9938496c30eedc44974b29858f803b218c7235b | [
"BSD-2-Clause"
] | 1 | 2019-10-02T21:59:00.000Z | 2019-10-02T21:59:00.000Z | """empty message
Revision ID: 16d42da99601
Revises: deec8123583d
Create Date: 2018-08-23 00:18:10.765086
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '16d42da99601'
down_revision = '30b091260689'
branch_labels = None
depends_on = None
| 25.9 | 93 | 0.731017 |
3678d7bd470a57edb6cab13b9b66d70383e92ec4 | 457 | py | Python | data_augmentation/eda/image/transforms/normalize.py | simran-arora/emmental-tutorials | 249a82a57be58e960408a45e2e0daa72980d210a | [
"MIT"
] | null | null | null | data_augmentation/eda/image/transforms/normalize.py | simran-arora/emmental-tutorials | 249a82a57be58e960408a45e2e0daa72980d210a | [
"MIT"
] | null | null | null | data_augmentation/eda/image/transforms/normalize.py | simran-arora/emmental-tutorials | 249a82a57be58e960408a45e2e0daa72980d210a | [
"MIT"
] | null | null | null | import torchvision.transforms as transforms
from eda.image.transforms.transform import EdaTransform
| 28.5625 | 64 | 0.695842 |
36794b18530c7dfbe909565c90c9010f724df448 | 150 | py | Python | scripts.py | intendednull/lcu_connectorpy | deb1050fe3a3fdc513d63d2ab08ab92bc86ac2f9 | [
"MIT"
] | null | null | null | scripts.py | intendednull/lcu_connectorpy | deb1050fe3a3fdc513d63d2ab08ab92bc86ac2f9 | [
"MIT"
] | 1 | 2020-03-05T18:54:17.000Z | 2020-03-05T18:54:17.000Z | scripts.py | Zer0897/lcu_connectorpy | deb1050fe3a3fdc513d63d2ab08ab92bc86ac2f9 | [
"MIT"
] | 1 | 2020-10-06T01:10:13.000Z | 2020-10-06T01:10:13.000Z | import subprocess as subp
| 16.666667 | 47 | 0.52 |
3679ff23a41d265863b5224bc85c9f29783e0ef7 | 894 | py | Python | lemon_markets/tests/ctest_account.py | leonhma/lemon_markets_sdk | 2739799e6f6b8fa781af8b19e92c32068565cdd3 | [
"MIT"
] | null | null | null | lemon_markets/tests/ctest_account.py | leonhma/lemon_markets_sdk | 2739799e6f6b8fa781af8b19e92c32068565cdd3 | [
"MIT"
] | 1 | 2021-09-29T16:32:49.000Z | 2021-09-29T16:56:26.000Z | lemon_markets/tests/ctest_account.py | leonhma/lemon_markets_sdk | 2739799e6f6b8fa781af8b19e92c32068565cdd3 | [
"MIT"
] | null | null | null | from os import environ
from unittest import TestCase
from lemon_markets.account import Account
client_id = environ.get('CLIENT_ID')
client_token = environ.get('CLIENT_TOKEN')
| 27.9375 | 62 | 0.682327 |
367a9bce756118fb872d4491d7235406c6ce91d1 | 95 | py | Python | Right_Angle/trans.py | kameranis/IEEExtreme-8.0 | 8ba80224b5218eb759ca91508b4f169788ff5571 | [
"MIT"
] | null | null | null | Right_Angle/trans.py | kameranis/IEEExtreme-8.0 | 8ba80224b5218eb759ca91508b4f169788ff5571 | [
"MIT"
] | null | null | null | Right_Angle/trans.py | kameranis/IEEExtreme-8.0 | 8ba80224b5218eb759ca91508b4f169788ff5571 | [
"MIT"
] | null | null | null | N=input()
num = [int(raw_input().split()[2]) for i in range(N)]
num = list(set(num))
print num
| 19 | 53 | 0.631579 |
367c224eb4987891fba2710e35832c7a65cc5a9c | 1,799 | py | Python | magnetos/crypto/caesar_rail_fence_crack.py | restran/magnetos | f48dcd7450a46d619dcbe64c11c9aa1c119cd307 | [
"MIT"
] | 20 | 2018-10-16T05:00:52.000Z | 2022-02-23T01:56:04.000Z | magnetos/crypto/caesar_rail_fence_crack.py | restran/magnetos | f48dcd7450a46d619dcbe64c11c9aa1c119cd307 | [
"MIT"
] | null | null | null | magnetos/crypto/caesar_rail_fence_crack.py | restran/magnetos | f48dcd7450a46d619dcbe64c11c9aa1c119cd307 | [
"MIT"
] | 12 | 2018-10-16T05:00:32.000Z | 2021-12-13T08:58:06.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""
,
sfxjkxtfhwz9xsmijk6j6sthhj
flagNSFOCUS{xxx}
"""
if __name__ == '__main__':
main()
| 22.4875 | 97 | 0.487493 |
367c714d55fb20ba8891983bb594b981f3b9fa1a | 470 | py | Python | backend/client/admin.py | katserafine/GenieHub | b7542b5b2a5dfc137b763a08b64d43e1dbe53af7 | [
"MIT"
] | 1 | 2020-06-24T04:44:33.000Z | 2020-06-24T04:44:33.000Z | backend/client/admin.py | katserafine/GenieHub | b7542b5b2a5dfc137b763a08b64d43e1dbe53af7 | [
"MIT"
] | null | null | null | backend/client/admin.py | katserafine/GenieHub | b7542b5b2a5dfc137b763a08b64d43e1dbe53af7 | [
"MIT"
] | null | null | null | from django.contrib import admin
from django.utils.html import format_html
from django.contrib.auth.models import Permission
from .models import *
# Register your models here.
admin.site.register(projectWorker)
admin.site.register(project)
admin.site.register(leadContact)
admin.site.register(Client, ClientAdmin) | 29.375 | 49 | 0.785106 |
367eac1a7db087dfdc9d4b14754a4dfc278aae39 | 1,310 | py | Python | dataset.py | donghankim/comma_ai_speed_challenge | b75c1dcb556ffb582c20b4540938989e7ecaadb7 | [
"MIT"
] | null | null | null | dataset.py | donghankim/comma_ai_speed_challenge | b75c1dcb556ffb582c20b4540938989e7ecaadb7 | [
"MIT"
] | null | null | null | dataset.py | donghankim/comma_ai_speed_challenge | b75c1dcb556ffb582c20b4540938989e7ecaadb7 | [
"MIT"
] | null | null | null | import os
import pandas as pd
import numpy as np
import torch
from torchvision import transforms
from torch.utils.data import Dataset
import matplotlib.pyplot as plt
from skimage import io
import pdb
| 28.478261 | 126 | 0.625954 |
367f5454bf00d15f020b33f86f78e7b9b5ef7a9d | 1,114 | py | Python | pairwise/pairwise_theano.py | numfocus/python-benchmarks | 75db94b33e3d8bd2d6504e21a9cb74e79e04b4f9 | [
"MIT"
] | 31 | 2015-05-15T17:53:50.000Z | 2022-01-14T12:49:19.000Z | pairwise/pairwise_theano.py | nouiz/python-benchmarks | 73ba6479f4243679dc06b6d204b5db3226e0a5a6 | [
"MIT"
] | null | null | null | pairwise/pairwise_theano.py | nouiz/python-benchmarks | 73ba6479f4243679dc06b6d204b5db3226e0a5a6 | [
"MIT"
] | 8 | 2015-02-25T09:12:03.000Z | 2020-12-28T18:06:22.000Z | # Authors: James Bergstra
# License: MIT
import theano
import theano.tensor as TT
benchmarks = (
pairwise_theano_tensor_prepare('float32'),
pairwise_theano_tensor_prepare('float64'),
pairwise_theano_blas_prepare('float32'),
pairwise_theano_blas_prepare('float64'),
)
| 28.564103 | 64 | 0.611311 |
367fa896207ba09a4df55eba008b8c69a5715343 | 3,396 | py | Python | pandapower/pypower/idx_bus.py | bergkvist/pandapower | 450bbd99888e7e5913905b20b848ee1cfa669ee8 | [
"BSD-3-Clause"
] | 1 | 2020-04-09T08:03:48.000Z | 2020-04-09T08:03:48.000Z | pandapower/pypower/idx_bus.py | bergkvist/pandapower | 450bbd99888e7e5913905b20b848ee1cfa669ee8 | [
"BSD-3-Clause"
] | 1 | 2019-04-17T14:58:53.000Z | 2019-04-17T14:58:53.000Z | pandapower/pypower/idx_bus.py | gdgarcia/pandapower | 630e3278ca012535f78282ae73f1b86f3fe932fc | [
"BSD-3-Clause"
] | 1 | 2020-11-03T01:40:38.000Z | 2020-11-03T01:40:38.000Z | # -*- coding: utf-8 -*-
# Copyright 1996-2015 PSERC. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
# Copyright (c) 2016-2020 by University of Kassel and Fraunhofer Institute for Energy Economics
# and Energy System Technology (IEE), Kassel. ... | 38.157303 | 95 | 0.654594 |
3682efa29fdf319c29d1fc0f9982530abedd7083 | 2,586 | py | Python | example.py | vinhntb/geo_redis | 2b79ab844bdf1a56e442393911437c76449bedb0 | [
"MIT"
] | null | null | null | example.py | vinhntb/geo_redis | 2b79ab844bdf1a56e442393911437c76449bedb0 | [
"MIT"
] | null | null | null | example.py | vinhntb/geo_redis | 2b79ab844bdf1a56e442393911437c76449bedb0 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# !/usr/bin/python
#
# example.py
#
#
# Created by vinhntb on 6/27/17.
# Copyright (c) 2017 geo_redis. All rights reserved.
import sys
from bunch import Bunch
from constants import GEO_USER_VISITED
from geo_redis.geo_redis import GeoRedis
if __name__ == '__main__':
main(sys.argv)
... | 35.424658 | 119 | 0.655066 |
36838e2dabeef85a22ebde7d229426841026be1e | 2,584 | py | Python | f5/bigip/tm/asm/policies/test/functional/test_signatures.py | nghia-tran/f5-common-python | acb23a6e5830a119b460c19a578654113419f5c3 | [
"Apache-2.0"
] | 272 | 2016-02-23T06:05:44.000Z | 2022-02-20T02:09:32.000Z | f5/bigip/tm/asm/policies/test/functional/test_signatures.py | nghia-tran/f5-common-python | acb23a6e5830a119b460c19a578654113419f5c3 | [
"Apache-2.0"
] | 1,103 | 2016-02-11T17:48:03.000Z | 2022-02-15T17:13:37.000Z | f5/bigip/tm/asm/policies/test/functional/test_signatures.py | nghia-tran/f5-common-python | acb23a6e5830a119b460c19a578654113419f5c3 | [
"Apache-2.0"
] | 167 | 2016-02-11T17:48:21.000Z | 2022-01-17T20:13:05.000Z | # Copyright 2017 F5 Networks Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writi... | 38 | 74 | 0.705882 |
3686fecb8e7eab5dbc7a6f5508649140b2813832 | 9,711 | py | Python | functions.py | anoopjakob/flowers_classifier | 554a7a408dbc4b40cee8098bada548bcea25d80f | [
"MIT"
] | null | null | null | functions.py | anoopjakob/flowers_classifier | 554a7a408dbc4b40cee8098bada548bcea25d80f | [
"MIT"
] | null | null | null | functions.py | anoopjakob/flowers_classifier | 554a7a408dbc4b40cee8098bada548bcea25d80f | [
"MIT"
] | null | null | null | import torch
import numpy as np
from PIL import Image
from torch import nn
from torch import optim
import torch.nn.functional as F
from torchvision import datasets, transforms, models
# changing the already created codes in jupyter notebbooks to a functions
# loading and processing image to use in the final stage of... | 32.69697 | 109 | 0.571105 |
3689044eb37e849dc16de8bc84d7a338cb4ea424 | 4,232 | py | Python | monotonic_cffi.py | rkyoto/monotonic_cffi | 8b2394ee65bcf16ab8d47f53db013ed39289a8d4 | [
"Apache-2.0"
] | 1 | 2016-05-03T06:51:10.000Z | 2016-05-03T06:51:10.000Z | monotonic_cffi.py | rkyoto/monotonic_cffi | 8b2394ee65bcf16ab8d47f53db013ed39289a8d4 | [
"Apache-2.0"
] | null | null | null | monotonic_cffi.py | rkyoto/monotonic_cffi | 8b2394ee65bcf16ab8d47f53db013ed39289a8d4 | [
"Apache-2.0"
] | null | null | null |
"""
monotonic_cffi:
Just a cffi version of existing monotonic module on PyPI. See:
https://pypi.python.org/pypi/monotonic
Tested with PyPy 2.6.1 and 4.0.0 on Windows, OSX and Ubuntu.
Copyright 2015 Matt Jones <mattjones1811@hotmail.com>
Licensed under the Apache License, Version 2.0 (the "License");
you may n... | 31.117647 | 76 | 0.577977 |
3689c5f926602b9755b6a68b88197732ca844b70 | 1,141 | py | Python | renormalizer/mps/tests/test_mpproperty.py | shuaigroup/Renormalizer | 963d52efdaa247320e781a96b64d41c9cadf6f0e | [
"Apache-2.0"
] | 27 | 2019-09-02T08:35:01.000Z | 2022-02-22T08:18:02.000Z | renormalizer/mps/tests/test_mpproperty.py | shuaigroup/Renormalizer | 963d52efdaa247320e781a96b64d41c9cadf6f0e | [
"Apache-2.0"
] | 54 | 2019-08-30T12:18:39.000Z | 2022-03-20T13:23:07.000Z | renormalizer/mps/tests/test_mpproperty.py | shuaigroup/Renormalizer | 963d52efdaa247320e781a96b64d41c9cadf6f0e | [
"Apache-2.0"
] | 6 | 2019-09-10T03:25:28.000Z | 2021-11-20T18:41:58.000Z | # -*- coding: utf-8 -*-
# Author: Jiajun Ren <jiajunren0522@gmail.com>
# Weitang Li <liwt31@163.com>
import pytest
from renormalizer.mps import Mps, Mpo, MpDm, ThermalProp
from renormalizer.mps.backend import np
from renormalizer.tests.parameter import holstein_model
from renormalizer.utils import Quantity
... | 28.525 | 71 | 0.725679 |
368bbba6590cf73d81aef3506e5c56c32a3d71dc | 4,661 | py | Python | pelee/pth2keras.py | DragonGongY/mmdet-ui | 41582b0ee2b3d9c631ee48540ca8a6d87be362e0 | [
"Apache-2.0"
] | 1 | 2021-12-24T05:28:20.000Z | 2021-12-24T05:28:20.000Z | pelee/pth2keras.py | DragonGongY/mmdet-ui | 41582b0ee2b3d9c631ee48540ca8a6d87be362e0 | [
"Apache-2.0"
] | null | null | null | pelee/pth2keras.py | DragonGongY/mmdet-ui | 41582b0ee2b3d9c631ee48540ca8a6d87be362e0 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
import sys
import numpy as np
import torch
from torch.autograd import Variable
from pytorch2keras.converter import pytorch_to_keras
import torchvision
import os.path as osp
import os
os.environ['KERAS_BACKEND'] = 'tensorflow'
from keras import backend as K
K.clear_session()
K.set_image_dim_or... | 33.292857 | 106 | 0.657584 |
368cb9e63af4447a8e0ac9131b7ee4fdf5b50b5c | 1,997 | py | Python | marketservice/models.py | mrprofessor/farmersmarket | 6c835ccb458a0533fe79a9a264fe5a084d647db3 | [
"MIT"
] | null | null | null | marketservice/models.py | mrprofessor/farmersmarket | 6c835ccb458a0533fe79a9a264fe5a084d647db3 | [
"MIT"
] | null | null | null | marketservice/models.py | mrprofessor/farmersmarket | 6c835ccb458a0533fe79a9a264fe5a084d647db3 | [
"MIT"
] | null | null | null | from typing import List, Union
import json
# Breakdown coupon's description into quantifiable attributes
# For example: BOGO on coffee can be translated as an object
# with certain properties should look like
# bogo_obj.target = "CF1"
# bogo_obj.apply_on = "CF1"
# bogo_obj.discount = 100
# bogo_obj.discount_type = "... | 25.602564 | 75 | 0.598398 |
368cd8469f10de7f8f6761744b6f6540ed7865bd | 649 | py | Python | sdk/eventhub/azure-eventhubs/azure/eventhub/eventprocessor/utils.py | gautam714/azure-sdk-for-python | 1741c199c42e8c85a2e14bc78195fd992837ef92 | [
"MIT"
] | null | null | null | sdk/eventhub/azure-eventhubs/azure/eventhub/eventprocessor/utils.py | gautam714/azure-sdk-for-python | 1741c199c42e8c85a2e14bc78195fd992837ef92 | [
"MIT"
] | null | null | null | sdk/eventhub/azure-eventhubs/azure/eventhub/eventprocessor/utils.py | gautam714/azure-sdk-for-python | 1741c199c42e8c85a2e14bc78195fd992837ef92 | [
"MIT"
] | null | null | null | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | 38.176471 | 94 | 0.49923 |
368d248443117fe64f685790a5bf178a4f08ad05 | 4,409 | py | Python | tools/examples.py | Hellowlol/plexapi | 313fef4de80fec5a187f71b76e53c3333efcb2fd | [
"BSD-3-Clause"
] | 4 | 2016-11-18T07:01:03.000Z | 2018-05-03T07:45:36.000Z | tools/examples.py | phongsathorn2540/plexapi | 313fef4de80fec5a187f71b76e53c3333efcb2fd | [
"BSD-3-Clause"
] | 1 | 2016-12-06T15:03:09.000Z | 2016-12-06T15:03:09.000Z | tools/examples.py | Hellowlol/plexapi | 313fef4de80fec5a187f71b76e53c3333efcb2fd | [
"BSD-3-Clause"
] | 4 | 2018-01-04T20:15:26.000Z | 2021-01-26T20:32:28.000Z | # -*- coding: utf-8 -*-
"""
PlexAPI Examples
As of Plex version 0.9.11 I noticed that you must be logged in
to browse even the plex server locatewd at localhost. You can
run this example suite with the following command:
>> python examples.py -u <USERNAME> -p <PASSWORD> -s <SERVERNAME>
"""
import argparse, sys
from co... | 36.139344 | 109 | 0.6709 |
368eabb014f813c693697e1b58b1279e93227806 | 1,070 | py | Python | BowlingGame/bowling_game_test.py | WisWang/code-kata | 179188e4e42686807ab3691e0fb68edac08304be | [
"MIT"
] | 2 | 2019-06-17T03:31:13.000Z | 2019-06-17T03:31:16.000Z | BowlingGame/bowling_game_test.py | WisWang/code-kata | 179188e4e42686807ab3691e0fb68edac08304be | [
"MIT"
] | null | null | null | BowlingGame/bowling_game_test.py | WisWang/code-kata | 179188e4e42686807ab3691e0fb68edac08304be | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2017 - hongzhi.wang <hongzhi.wang@moji.com>
'''
Author: hongzhi.wang
Create Date: 2019-09-04
Modify Date: 2019-09-04
'''
import unittest
from .bowling_game import BowlingGame
| 23.777778 | 60 | 0.626168 |
368f64f73686f6ce0d3e038e0daaf52552b9013c | 1,873 | py | Python | palo_alto_firewall_analyzer/validators/bad_group_profile.py | moshekaplan/palo_alto_firewall_analyzer | 9040b85278701dcd7280dde0cf9e3ed05b2fb5d0 | [
"CC0-1.0"
] | 4 | 2021-03-06T05:57:29.000Z | 2022-03-11T07:10:41.000Z | palo_alto_firewall_analyzer/validators/bad_group_profile.py | moshekaplan/palo_alto_firewall_analyzer | 9040b85278701dcd7280dde0cf9e3ed05b2fb5d0 | [
"CC0-1.0"
] | 24 | 2021-03-05T04:53:46.000Z | 2022-03-22T15:51:12.000Z | palo_alto_firewall_analyzer/validators/bad_group_profile.py | moshekaplan/palo_alto_firewall_analyzer | 9040b85278701dcd7280dde0cf9e3ed05b2fb5d0 | [
"CC0-1.0"
] | 1 | 2021-03-05T16:41:52.000Z | 2021-03-05T16:41:52.000Z | from palo_alto_firewall_analyzer.core import register_policy_validator, BadEntry
| 45.682927 | 120 | 0.657234 |
3690831885f4829c3bfb3701534068309447ba6f | 15,574 | py | Python | metagym/liftsim/tests/qa_test.py | WorldEditors/MetaGym | ad7263fcc80abd6831965ab6b556d54f75e17315 | [
"Apache-2.0"
] | null | null | null | metagym/liftsim/tests/qa_test.py | WorldEditors/MetaGym | ad7263fcc80abd6831965ab6b556d54f75e17315 | [
"Apache-2.0"
] | null | null | null | metagym/liftsim/tests/qa_test.py | WorldEditors/MetaGym | ad7263fcc80abd6831965ab6b556d54f75e17315 | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2018 PaddlePaddle 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 app... | 46.35119 | 139 | 0.634134 |
3690bf8c18ffa504f4805314fbdcb1e3b4e103df | 4,955 | py | Python | tests/AdagucTests/AdagucTestTools.py | lukas-phaf/adaguc-server | aa5e267d6c5c15463035ff87d353707207374d1b | [
"Apache-2.0"
] | 1 | 2019-08-21T11:03:09.000Z | 2019-08-21T11:03:09.000Z | tests/AdagucTests/AdagucTestTools.py | ernstdevreede/adaguc-server | 3516bf1a2ea6abb4f2e85e72944589dfcc990f7c | [
"Apache-2.0"
] | null | null | null | tests/AdagucTests/AdagucTestTools.py | ernstdevreede/adaguc-server | 3516bf1a2ea6abb4f2e85e72944589dfcc990f7c | [
"Apache-2.0"
] | null | null | null | import os
from io import BytesIO
import shutil
from adaguc.CGIRunner import CGIRunner
from lxml import etree
from lxml import objectify
import re
ADAGUC_PATH = os.environ['ADAGUC_PATH']
| 31.967742 | 118 | 0.55439 |
3692f4808105d5ea767d1f2ed8ac2212b0cfd4ec | 4,905 | py | Python | emotion_recognition_using_speech/test.py | TomKingsfordUoA/emotion-recognition-using-speech | d3e115e32c06c511e70cb50a92097bafd00d5e6c | [
"MIT"
] | null | null | null | emotion_recognition_using_speech/test.py | TomKingsfordUoA/emotion-recognition-using-speech | d3e115e32c06c511e70cb50a92097bafd00d5e6c | [
"MIT"
] | null | null | null | emotion_recognition_using_speech/test.py | TomKingsfordUoA/emotion-recognition-using-speech | d3e115e32c06c511e70cb50a92097bafd00d5e6c | [
"MIT"
] | null | null | null | import os
import wave
from array import array
from struct import pack
from sys import byteorder
import pyaudio
import soundfile
from .emotion_recognition import EmotionRecognizer
from .utils import get_best_estimators
THRESHOLD = 500
CHUNK_SIZE = 1024
FORMAT = pyaudio.paInt16
RATE = 16000
SILENCE = 30
def is_silen... | 30.65625 | 132 | 0.596738 |
369300d0c9a3d754cf6fa5fd20a01c6192f0204c | 2,032 | py | Python | training/dataset.py | liucong3/camelyon17 | bf6947ab5f59fc98f58f4459115cde5c815f2c5b | [
"MIT"
] | null | null | null | training/dataset.py | liucong3/camelyon17 | bf6947ab5f59fc98f58f4459115cde5c815f2c5b | [
"MIT"
] | 1 | 2021-09-07T04:56:15.000Z | 2021-09-07T04:56:15.000Z | training/dataset.py | liucong3/camelyon17 | bf6947ab5f59fc98f58f4459115cde5c815f2c5b | [
"MIT"
] | 1 | 2021-09-17T02:57:42.000Z | 2021-09-17T02:57:42.000Z |
import numpy as np
import torch.utils.data as data
import csv
import cv2
from PIL import Image
from utils import progress_bar
| 27.835616 | 93 | 0.563976 |
369370477fede6ca05479665d356d7b8ddbbef42 | 211 | py | Python | src/settings/settings.py | lamas1901/telegram__pdf-bot | 995bd3a41edba744efc07a99296ff109427ed310 | [
"MIT"
] | null | null | null | src/settings/settings.py | lamas1901/telegram__pdf-bot | 995bd3a41edba744efc07a99296ff109427ed310 | [
"MIT"
] | null | null | null | src/settings/settings.py | lamas1901/telegram__pdf-bot | 995bd3a41edba744efc07a99296ff109427ed310 | [
"MIT"
] | null | null | null | from ..utils import get_env_var
from pathlib import Path
BASE_DIR = Path(__file__).parent.parent
TG_TOKEN = get_env_var('TG_TOKEN')
YMONEY_TOKEN = get_env_var('YTOKEN')
PROMO_CODE = get_env_var('PROMO_CODE')
| 21.1 | 39 | 0.78673 |
369463a55c830c970eeba872097925e45f0b42da | 5,365 | py | Python | sheet.py | roocell/myfreelapextract | 933cf6c50155f0659e3b06f8caf38425920f349d | [
"Apache-2.0"
] | null | null | null | sheet.py | roocell/myfreelapextract | 933cf6c50155f0659e3b06f8caf38425920f349d | [
"Apache-2.0"
] | null | null | null | sheet.py | roocell/myfreelapextract | 933cf6c50155f0659e3b06f8caf38425920f349d | [
"Apache-2.0"
] | null | null | null | import gspread
from oauth2client.service_account import ServiceAccountCredentials
import pprint
import logging
import random
# https://medium.com/daily-python/python-script-to-edit-google-sheets-daily-python-7-aadce27846c0
# tutorial is older, so the googple API setup is a little outdated
# call directly to test
# py... | 35.529801 | 97 | 0.641007 |
3694d1a4cd60ecc1e34d895dba4a09639f943705 | 3,426 | py | Python | image_generation/parse_models.py | pudumagico/clevr-dataset-gen | 1e7e5e2585ae021b2a3f0ea509e5fa63f3d26b86 | [
"BSD-3-Clause"
] | null | null | null | image_generation/parse_models.py | pudumagico/clevr-dataset-gen | 1e7e5e2585ae021b2a3f0ea509e5fa63f3d26b86 | [
"BSD-3-Clause"
] | null | null | null | image_generation/parse_models.py | pudumagico/clevr-dataset-gen | 1e7e5e2585ae021b2a3f0ea509e5fa63f3d26b86 | [
"BSD-3-Clause"
] | null | null | null | import sys
import re
from typing import Sized
if __name__ == '__main__':
base_model = parse_models(sys.argv[1])
| 31.722222 | 76 | 0.558669 |
3694d7e8c0ea23a87ec0351e6dfd24cef2e1613b | 17,193 | py | Python | Codes of the SMD2II model/Codes of Transfer-learning of Bert (stage I classification)/produce_submit_json_file.py | 0AnonymousSite0/Social-media-data-to-Interrelated-informtion-to-Parameters-of-virtual-road-model | 3043f316bf6af3530dec894881c8f63607084759 | [
"MIT"
] | 1 | 2022-03-26T10:40:10.000Z | 2022-03-26T10:40:10.000Z | Codes of the SMD2II model/Codes of Transfer-learning of Bert (stage I classification)/produce_submit_json_file.py | 0AnonymousSite0/Social-media-data-to-Interrelated-informtion-to-Parameters-of-virtual-road-model | 3043f316bf6af3530dec894881c8f63607084759 | [
"MIT"
] | null | null | null | Codes of the SMD2II model/Codes of Transfer-learning of Bert (stage I classification)/produce_submit_json_file.py | 0AnonymousSite0/Social-media-data-to-Interrelated-informtion-to-Parameters-of-virtual-road-model | 3043f316bf6af3530dec894881c8f63607084759 | [
"MIT"
] | null | null | null | # coding=utf-8
import os
import json
#
# dict is comes from raw_data all_50_schemas
schemas_dict_relation_2_object_subject_type = {
'Road_status':[('Status','Road')],
'Lane_status':[('Status','Lane')],
'Road_position':[('Position_of_road','Road')],
# 'At':[('Road','Road')],
# 'PRIOR':[('Road','Ro... | 49.834783 | 370 | 0.600651 |
36957809b7a097e9aca4a9f73c606e574242991c | 18,656 | py | Python | pysnmp-with-texts/SW-VLAN-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 8 | 2019-05-09T17:04:00.000Z | 2021-06-09T06:50:51.000Z | pysnmp-with-texts/SW-VLAN-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 4 | 2019-05-31T16:42:59.000Z | 2020-01-31T21:57:17.000Z | pysnmp-with-texts/SW-VLAN-MIB.py | agustinhenze/mibs.snmplabs.com | 1fc5c07860542b89212f4c8ab807057d9a9206c7 | [
"Apache-2.0"
] | 10 | 2019-04-30T05:51:36.000Z | 2022-02-16T03:33:41.000Z | #
# PySNMP MIB module SW-VLAN-MIB (http://snmplabs.com/pysmi)
# ASN.1 source file:///Users/davwang4/Dev/mibs.snmplabs.com/asn1/SW-VLAN-MIB
# Produced by pysmi-0.3.4 at Wed May 1 15:12:44 2019
# On host DAVWANG4-M-1475 platform Darwin version 18.5.0 by user davwang4
# Using Python version 3.7.3 (default, Mar 27 2019, 0... | 143.507692 | 1,908 | 0.767206 |
3696c582aaf438a2c947387898295abd07a07bfe | 1,007 | py | Python | examples/artifact_with_fanout.py | bchalk101/hera-workflows | a3e9262f996ba477a35850c7e4b18ce3d5749687 | [
"MIT"
] | null | null | null | examples/artifact_with_fanout.py | bchalk101/hera-workflows | a3e9262f996ba477a35850c7e4b18ce3d5749687 | [
"MIT"
] | null | null | null | examples/artifact_with_fanout.py | bchalk101/hera-workflows | a3e9262f996ba477a35850c7e4b18ce3d5749687 | [
"MIT"
] | null | null | null | from hera import (
InputArtifact,
InputFrom,
OutputArtifact,
Task,
Workflow,
WorkflowService,
)
ws = WorkflowService(host='https://my-argo-server.com', token='my-auth-token')
w = Workflow('artifact-with-fanout', ws)
w_t = Task('writer', writer, output_artifacts=[OutputArtifact(name='test', ... | 21.891304 | 105 | 0.61569 |
3696d9a0ae665b8ea6b0dd59b9953426ce1a1124 | 424 | py | Python | fastparquet/__init__.py | jorisvandenbossche/fastparquet | e783eca9499883a6f025f18cce709c226e21402f | [
"Apache-2.0"
] | null | null | null | fastparquet/__init__.py | jorisvandenbossche/fastparquet | e783eca9499883a6f025f18cce709c226e21402f | [
"Apache-2.0"
] | null | null | null | fastparquet/__init__.py | jorisvandenbossche/fastparquet | e783eca9499883a6f025f18cce709c226e21402f | [
"Apache-2.0"
] | null | null | null | """parquet - read parquet files."""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from .thrift_structures import parquet_thrift
from .core import read_thrift
from .writer import write
from . import core, schema, conv... | 28.266667 | 48 | 0.823113 |
36979d30250b5ace4c5161cd349e582790c807b4 | 96,838 | py | Python | third_party/virtualbox/src/VBox/VMM/testcase/Instructions/InstructionTestGen.py | Fimbure/icebox-1 | 0b81992a53e1b410955ca89bdb6f8169d6f2da86 | [
"MIT"
] | 521 | 2019-03-29T15:44:08.000Z | 2022-03-22T09:46:19.000Z | third_party/virtualbox/src/VBox/VMM/testcase/Instructions/InstructionTestGen.py | Fimbure/icebox-1 | 0b81992a53e1b410955ca89bdb6f8169d6f2da86 | [
"MIT"
] | 30 | 2019-06-04T17:00:49.000Z | 2021-09-08T20:44:19.000Z | third_party/virtualbox/src/VBox/VMM/testcase/Instructions/InstructionTestGen.py | Fimbure/icebox-1 | 0b81992a53e1b410955ca89bdb6f8169d6f2da86 | [
"MIT"
] | 99 | 2019-03-29T16:04:13.000Z | 2022-03-28T16:59:34.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# $Id: InstructionTestGen.py $
"""
Instruction Test Generator.
"""
from __future__ import print_function;
__copyright__ = \
"""
Copyright (C) 2012-2017 Oracle Corporation
This file is part of VirtualBox Open Source Edition (OSE), as
available from http://www.virtualbox.... | 43.23125 | 130 | 0.517132 |
3698ef5864ca5ca9b604faa7dd2e31ba6fa54aa7 | 6,169 | py | Python | bann/b_data_functions/pytorch/shared_memory_interface.py | arturOnRails/BANN | 027af04349304941fb73c2ede502aca4b76f1ad1 | [
"MIT"
] | null | null | null | bann/b_data_functions/pytorch/shared_memory_interface.py | arturOnRails/BANN | 027af04349304941fb73c2ede502aca4b76f1ad1 | [
"MIT"
] | null | null | null | bann/b_data_functions/pytorch/shared_memory_interface.py | arturOnRails/BANN | 027af04349304941fb73c2ede502aca4b76f1ad1 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
""".. moduleauthor:: Artur Lissin"""
import abc
from copy import copy
from dataclasses import dataclass
from multiprocessing.managers import SharedMemoryManager
from multiprocessing.shared_memory import SharedMemory
from typing import Tuple, List, Optional, final, TypeVar, Generic
from torch.ut... | 32.468421 | 92 | 0.681796 |
36990bef47fde53e2358b6c735c82b0360a40313 | 1,090 | py | Python | packages/python/yap_kernel/yap_kernel/tests/test_io.py | ryandesign/yap | 9a50d1a3d985ec559ebfbb8e9f4d4c6b88b30214 | [
"Artistic-1.0-Perl",
"ClArtistic"
] | 90 | 2015-03-09T01:24:15.000Z | 2022-02-24T13:56:25.000Z | packages/python/yap_kernel/yap_kernel/tests/test_io.py | ryandesign/yap | 9a50d1a3d985ec559ebfbb8e9f4d4c6b88b30214 | [
"Artistic-1.0-Perl",
"ClArtistic"
] | 52 | 2016-02-14T08:59:37.000Z | 2022-03-14T16:39:35.000Z | packages/python/yap_kernel/yap_kernel/tests/test_io.py | ryandesign/yap | 9a50d1a3d985ec559ebfbb8e9f4d4c6b88b30214 | [
"Artistic-1.0-Perl",
"ClArtistic"
] | 27 | 2015-11-19T02:45:49.000Z | 2021-11-25T19:47:58.000Z | """Test IO capturing functionality"""
import io
import zmq
from jupyter_client.session import Session
from yap_kernel.iostream import IOPubThread, OutStream
import nose.tools as nt
def test_io_api():
"""Test that wrapped stdout has the same API as a normal TextIO object"""
session = Session()
ctx = zmq... | 25.952381 | 77 | 0.694495 |
369bd233d08fbdcd2a214a81e7c5f52a9ce6ed4e | 551 | py | Python | OSIx/modules/temp_file_manager.py | guibacellar/OSIx | 058714c1870bde0d794452b32ad0e62d544bdd90 | [
"Apache-2.0"
] | 1 | 2021-08-17T18:45:07.000Z | 2021-08-17T18:45:07.000Z | OSIx/modules/temp_file_manager.py | guibacellar/OSIx | 058714c1870bde0d794452b32ad0e62d544bdd90 | [
"Apache-2.0"
] | 12 | 2021-08-11T18:24:32.000Z | 2021-08-23T14:57:36.000Z | OSIx/modules/temp_file_manager.py | guibacellar/OSIx | 058714c1870bde0d794452b32ad0e62d544bdd90 | [
"Apache-2.0"
] | null | null | null | """Temporary Files Manager."""
import logging
from configparser import ConfigParser
from typing import Dict
from OSIx.core.base_module import BaseModule
from OSIx.core.temp_file import TempFileHandler
logger = logging.getLogger()
| 22.04 | 72 | 0.69873 |
369d292bf15ec11e1c3a4ad6d68821a207a8fc33 | 1,124 | py | Python | vectors/vectormath.py | sbanwart/data-science | 07f568e5f55a43339a9dca3ba3a13b263f54a37c | [
"MIT"
] | null | null | null | vectors/vectormath.py | sbanwart/data-science | 07f568e5f55a43339a9dca3ba3a13b263f54a37c | [
"MIT"
] | null | null | null | vectors/vectormath.py | sbanwart/data-science | 07f568e5f55a43339a9dca3ba3a13b263f54a37c | [
"MIT"
] | null | null | null | import math
def vector_add(v, w):
"""adds corresponding elements"""
return [v_i + w_i
for v_i, w_i in zip(v, w)]
def vector_subtract(v, w):
"""subtracts corresponding elements"""
return [v_i - w_i
for v_i, w_i in zip(v, w)]
def scalar_multiply(c, v):
"""c is a number, v is a vecto... | 25.545455 | 79 | 0.615658 |
369da642edb63cf01850b1f337a064efb7bb43b6 | 2,800 | py | Python | fancyrat.py | avacadoPWN/fancyrat | 477d5cb11a9af4f741770e4790f64884af1d01c3 | [
"MIT"
] | 1 | 2022-02-20T03:52:03.000Z | 2022-02-20T03:52:03.000Z | fancyrat.py | avacadoPWN/fancyrat | 477d5cb11a9af4f741770e4790f64884af1d01c3 | [
"MIT"
] | null | null | null | fancyrat.py | avacadoPWN/fancyrat | 477d5cb11a9af4f741770e4790f64884af1d01c3 | [
"MIT"
] | null | null | null | #!/bin/python3
import exploit
import ui_setup
from time import sleep
checkrain = exploit.Checkrain()
checkrain.REMOTE_SSH_CC = 'kali@fancyrat.moo.com'
window = ui_setup.UI.window
keep_printing=True
while True:
if window['-OUTPUT-'].DisplayText.count('\n') >= 14:
window['-OUTPUT-'].DisplayText = wind... | 35.897436 | 120 | 0.496786 |
369df66a1e15a4a67f881d9565ed02382eda4bee | 1,237 | py | Python | sysinv/sysinv/sysinv/sysinv/tests/helm/test_base.py | albailey/config | 40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9 | [
"Apache-2.0"
] | 10 | 2020-02-07T18:57:44.000Z | 2021-09-11T10:29:34.000Z | sysinv/sysinv/sysinv/sysinv/tests/helm/test_base.py | albailey/config | 40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9 | [
"Apache-2.0"
] | 1 | 2021-01-14T12:01:55.000Z | 2021-01-14T12:01:55.000Z | sysinv/sysinv/sysinv/sysinv/tests/helm/test_base.py | albailey/config | 40ebe63d7dfc6a0a03216ebe55ed3ec9cf5410b9 | [
"Apache-2.0"
] | 10 | 2020-10-13T08:37:46.000Z | 2022-02-09T00:21:25.000Z | # Copyright (c) 2021 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
import mock
from sysinv.helm.base import BaseHelm
from sysinv.helm.helm import HelmOperator
from sysinv.tests import base as test_base
| 37.484848 | 100 | 0.805174 |
369eb5cfd592210dd63a2cf4b6ab2112394dc2c9 | 612 | py | Python | tests/test_as_decimal.py | lkattis-signal/SignalSDK | f085b9cae0495f4e016b9982df271efc6fd0a8f5 | [
"Apache-2.0"
] | 10 | 2020-09-29T06:36:45.000Z | 2022-03-14T18:15:50.000Z | tests/test_as_decimal.py | lkattis-signal/SignalSDK | f085b9cae0495f4e016b9982df271efc6fd0a8f5 | [
"Apache-2.0"
] | 53 | 2020-10-08T10:05:00.000Z | 2022-03-29T14:21:18.000Z | tests/test_as_decimal.py | lkattis-signal/SignalSDK | f085b9cae0495f4e016b9982df271efc6fd0a8f5 | [
"Apache-2.0"
] | 5 | 2020-09-25T07:48:04.000Z | 2021-11-23T07:08:56.000Z | from decimal import Decimal
from signal_ocean._internals import as_decimal
| 20.4 | 57 | 0.714052 |
369efff06f7a72f84b0e9a781b19f53a96b5ca56 | 1,610 | py | Python | Francisco_Trujillo/Assignments/registration/serverre.py | webguru001/Python-Django-Web | 6264bc4c90ef1432ba0902c76b567cf3caaae221 | [
"MIT"
] | 5 | 2019-05-17T01:30:02.000Z | 2021-06-17T21:02:58.000Z | Francisco_Trujillo/Assignments/registration/serverre.py | curest0x1021/Python-Django-Web | 6264bc4c90ef1432ba0902c76b567cf3caaae221 | [
"MIT"
] | null | null | null | Francisco_Trujillo/Assignments/registration/serverre.py | curest0x1021/Python-Django-Web | 6264bc4c90ef1432ba0902c76b567cf3caaae221 | [
"MIT"
] | null | null | null | from flask import Flask, render_template, request, redirect, session, flash
import re
EMAIL_REGEX = re.compile(r'^[a-zA-Z0-9.+_-]+@[a-zA-Z0-9._-]+\.[a-zA-Z]+$')
app = Flask(__name__)
app.secret_key = 'irtndvieurnviur'
#check all for empty and password >=8
def checkForValuelength(form):
if ((len(form['email']))< 1... | 28.245614 | 82 | 0.636646 |
369f3934be836b3619a596d326601ac157eae3f4 | 2,344 | py | Python | eternalghost.py | awareseven/eternalghosttest | 989dafac06b72af21e1cd7103c92ec6b399e5133 | [
"MIT"
] | 2 | 2020-03-15T11:39:18.000Z | 2021-12-05T20:38:48.000Z | eternalghost.py | awareseven/eternalghosttest | 989dafac06b72af21e1cd7103c92ec6b399e5133 | [
"MIT"
] | null | null | null | eternalghost.py | awareseven/eternalghosttest | 989dafac06b72af21e1cd7103c92ec6b399e5133 | [
"MIT"
] | 2 | 2020-03-18T20:21:37.000Z | 2020-10-13T09:19:14.000Z | import socket
import struct
import sys
banner = """
_ _ _ _
| | | | | | | |
___| |_ ___ _ __ _ __ __ _| | __ _| |__ ___ ___| |_
/ _ \ __/ _ \ '__| '_ \ / _` | |/ _` | '_ \ / _ \/ __| __|
| __/ || __/ | | | | | (... | 45.076923 | 761 | 0.593857 |
369f8e2a1f4297f6ea89787a4d4e52bb3722aa03 | 63,998 | py | Python | pedantic/tests/tests_pedantic.py | LostInDarkMath/Pedantic-python-decorators | 32ed54c9593e80f63c0499093cb07847d8a5e1df | [
"Apache-2.0"
] | null | null | null | pedantic/tests/tests_pedantic.py | LostInDarkMath/Pedantic-python-decorators | 32ed54c9593e80f63c0499093cb07847d8a5e1df | [
"Apache-2.0"
] | null | null | null | pedantic/tests/tests_pedantic.py | LostInDarkMath/Pedantic-python-decorators | 32ed54c9593e80f63c0499093cb07847d8a5e1df | [
"Apache-2.0"
] | null | null | null | import os.path
import sys
import types
import typing
import unittest
from datetime import datetime, date
from functools import wraps
from io import BytesIO, StringIO
from typing import List, Tuple, Callable, Any, Optional, Union, Dict, Set, FrozenSet, NewType, TypeVar, Sequence, \
AbstractSet, Iterator, NamedTuple,... | 26.833543 | 117 | 0.544439 |
369fa166feeca798a146fe563bb6633de1435b63 | 12,391 | py | Python | robosuite/utils/mjcf_utils.py | kyungjaelee/robosuite | 0d73fcca9ed8e638632f4bd7b0f1b8ebf4640fb1 | [
"MIT"
] | null | null | null | robosuite/utils/mjcf_utils.py | kyungjaelee/robosuite | 0d73fcca9ed8e638632f4bd7b0f1b8ebf4640fb1 | [
"MIT"
] | null | null | null | robosuite/utils/mjcf_utils.py | kyungjaelee/robosuite | 0d73fcca9ed8e638632f4bd7b0f1b8ebf4640fb1 | [
"MIT"
] | 1 | 2021-03-26T19:10:00.000Z | 2021-03-26T19:10:00.000Z | # utility functions for manipulating MJCF XML models
import xml.etree.ElementTree as ET
import os
import numpy as np
from collections.abc import Iterable
from PIL import Image
from pathlib import Path
import robosuite
RED = [1, 0, 0, 1]
GREEN = [0, 1, 0, 1]
BLUE = [0, 0, 1, 1]
TEXTURES = {
"WoodRed": "red-wood.... | 33.855191 | 120 | 0.62957 |
36a07f1b483e17aa9a2719b08beb5635ce843a05 | 1,106 | py | Python | cpgames/modules/core/__init__.py | Wasabii88/Games | 33262ca1958207a24e57e3532feded7e275b1dd1 | [
"MIT"
] | 1 | 2022-03-07T11:13:08.000Z | 2022-03-07T11:13:08.000Z | cpgames/modules/core/__init__.py | Wasabii88/Games | 33262ca1958207a24e57e3532feded7e275b1dd1 | [
"MIT"
] | null | null | null | cpgames/modules/core/__init__.py | Wasabii88/Games | 33262ca1958207a24e57e3532feded7e275b1dd1 | [
"MIT"
] | null | null | null | '''initialize'''
from .ski import SkiGame
from .maze import MazeGame
from .gobang import GobangGame
from .tetris import TetrisGame
from .pacman import PacmanGame
from .gemgem import GemGemGame
from .tankwar import TankWarGame
from .sokoban import SokobanGame
from .pingpong import PingpongGame
from .trexrush import TRex... | 38.137931 | 56 | 0.867993 |
36a1039f62de29095d8932b740524a88b0801df0 | 486 | py | Python | jobs/migrations/0005_job_date.py | AkinWilderman/myPort | 3ddeea04ccffe3ed7b66d6dba2c1f2dc00c9eb6c | [
"Apache-2.0"
] | null | null | null | jobs/migrations/0005_job_date.py | AkinWilderman/myPort | 3ddeea04ccffe3ed7b66d6dba2c1f2dc00c9eb6c | [
"Apache-2.0"
] | null | null | null | jobs/migrations/0005_job_date.py | AkinWilderman/myPort | 3ddeea04ccffe3ed7b66d6dba2c1f2dc00c9eb6c | [
"Apache-2.0"
] | null | null | null | # Generated by Django 2.1.7 on 2019-07-06 04:48
from django.db import migrations, models
import django.utils.timezone
| 23.142857 | 95 | 0.625514 |
36a13155d02a4fb82c1083890ce96f64e834d72a | 715 | py | Python | build_an_ai_startup_demo/app/__init__.py | bbueno5000/BuildAnAIStartUpDemo | f70371802a2546530c34b7f04e2b644cd1faec8a | [
"MIT"
] | null | null | null | build_an_ai_startup_demo/app/__init__.py | bbueno5000/BuildAnAIStartUpDemo | f70371802a2546530c34b7f04e2b644cd1faec8a | [
"MIT"
] | null | null | null | build_an_ai_startup_demo/app/__init__.py | bbueno5000/BuildAnAIStartUpDemo | f70371802a2546530c34b7f04e2b644cd1faec8a | [
"MIT"
] | null | null | null | import app
import flask
import flask_debugtoolbar
app = flask.Flask(__name__)
app.config.from_object('app.config')
db = flask.ext.sqlalchemy.SQLAlchemy(app)
mail = flask.ext.mail.Mail(app)
app.config['DEBUG_TB_TEMPLATE_EDITOR_ENABLED'] = True
app.config['DEBUG_TB_PROFILER_ENABLED'] = True
toolbar = flask_debugtoolb... | 23.833333 | 79 | 0.776224 |
36a2d86f1e49ac5520b342c8f2a78f162854b298 | 304 | py | Python | main.py | shoulderhu/heroku-ctf-www | f1e136f8d93034d34a60702517b32fc0245dac38 | [
"MIT"
] | null | null | null | main.py | shoulderhu/heroku-ctf-www | f1e136f8d93034d34a60702517b32fc0245dac38 | [
"MIT"
] | null | null | null | main.py | shoulderhu/heroku-ctf-www | f1e136f8d93034d34a60702517b32fc0245dac38 | [
"MIT"
] | null | null | null | import os
from app import create_app
from dotenv import load_dotenv
# .env
dotenv_path = os.path.join(os.path.dirname(__file__), ".env")
if os.path.exists(dotenv_path):
load_dotenv(dotenv_path)
app = create_app(os.environ.get("FLASK_CONFIG") or "default")
if __name__ == "__main__":
app.run() | 21.714286 | 61 | 0.733553 |
36a374d5b35c8fab447dcc5b470ddd3335b4f06d | 5,628 | py | Python | src/apps/devices/cubelib/emulator.py | ajintom/music_sync | 0d7bc302502d28e4be4f0a0be1fc9bafb706f651 | [
"MIT"
] | null | null | null | src/apps/devices/cubelib/emulator.py | ajintom/music_sync | 0d7bc302502d28e4be4f0a0be1fc9bafb706f651 | [
"MIT"
] | null | null | null | src/apps/devices/cubelib/emulator.py | ajintom/music_sync | 0d7bc302502d28e4be4f0a0be1fc9bafb706f651 | [
"MIT"
] | null | null | null | #!/bin/env python
#using the wireframe module downloaded from http://www.petercollingridge.co.uk/
import mywireframe as wireframe
import pygame
from pygame import display
from pygame.draw import *
import time
import numpy
key_to_function = {
pygame.K_LEFT: (lambda x: x.translateAll('x', -10)),
pygame.K_RIGHT... | 33.903614 | 254 | 0.600569 |
36a6702d9737607ae7b2838e31ebcda4772cd182 | 810 | py | Python | src/topbuzz/management/commands/topbuzz_stat.py | lucemia/gnews | ac537062d8e34bb63fe0bf95c2affc8d2771d392 | [
"MIT"
] | null | null | null | src/topbuzz/management/commands/topbuzz_stat.py | lucemia/gnews | ac537062d8e34bb63fe0bf95c2affc8d2771d392 | [
"MIT"
] | null | null | null | src/topbuzz/management/commands/topbuzz_stat.py | lucemia/gnews | ac537062d8e34bb63fe0bf95c2affc8d2771d392 | [
"MIT"
] | null | null | null | # -*- encoding=utf8 -*-
from django.core.management.base import BaseCommand
from datetime import timedelta, datetime
from topbuzz.tasks import stat
import argparse
| 30 | 97 | 0.675309 |
36a769a0d7113d319d2bf9fc65325d50afd0198f | 5,276 | py | Python | Banner/rm_decompiled.py | Alpha-Demon404/RE-14 | b5b46a9f0eee218f2a642b615c77135c33c6f4ad | [
"MIT"
] | 39 | 2020-02-26T09:44:36.000Z | 2022-03-23T00:18:25.000Z | Banner/rm_decompiled.py | B4BY-DG/reverse-enginnering | b5b46a9f0eee218f2a642b615c77135c33c6f4ad | [
"MIT"
] | 15 | 2020-05-14T10:07:26.000Z | 2022-01-06T02:55:32.000Z | Banner/rm_decompiled.py | B4BY-DG/reverse-enginnering | b5b46a9f0eee218f2a642b615c77135c33c6f4ad | [
"MIT"
] | 41 | 2020-03-16T22:36:38.000Z | 2022-03-17T14:47:19.000Z | # uncompyle6 version 3.6.4
# Python bytecode 2.7
# Decompiled from: Python 2.7.17 (default, Oct 23 2019, 08:25:46)
# [GCC 4.2.1 Compatible Android (5220042 based on r346389c) Clang 8.0.7 (https://
# Embedded file name: <Angga>
"""
SILAHKAN RECODE SE ALAY MUNGKIN
DAN TIRU GAYA TAMPILAN SAYA :)
KASIH LOGO GEDE,... | 85.096774 | 1,273 | 0.649545 |
36a8051c9ed294e493f8410cbd5528938ce673ec | 2,712 | py | Python | main.py | anirudha-bs/Distributed_storage_ipfs | 52fcf0f5b7b620dea059116d34ab0def56ce5cdd | [
"MIT"
] | null | null | null | main.py | anirudha-bs/Distributed_storage_ipfs | 52fcf0f5b7b620dea059116d34ab0def56ce5cdd | [
"MIT"
] | null | null | null | main.py | anirudha-bs/Distributed_storage_ipfs | 52fcf0f5b7b620dea059116d34ab0def56ce5cdd | [
"MIT"
] | null | null | null | from files import write_key, load_key, encrypt, decrypt
import os
from ipfs import add,pin,get_file
# Encrypts file and adds to ipfs
#function to get a file added to ipfs
switcher = {
1: encrypt_ipfs_add,
2: ipfs_add,
3: decrypt_ipfs,
4: ipfs_get,
5: sim_block,
}
if ... | 30.133333 | 254 | 0.620206 |
36a8576ce226acd209efa0c300493610cf449c81 | 4,730 | py | Python | web-app/ZGenerator.py | IsaacGuan/SGSG | 7476f1b8ec0ed90cd9896ee2d23241c4310cb78c | [
"MIT"
] | 2 | 2021-05-04T11:19:50.000Z | 2021-05-16T01:37:08.000Z | web-app/ZGenerator.py | IsaacGuan/SGSG | 7476f1b8ec0ed90cd9896ee2d23241c4310cb78c | [
"MIT"
] | null | null | null | web-app/ZGenerator.py | IsaacGuan/SGSG | 7476f1b8ec0ed90cd9896ee2d23241c4310cb78c | [
"MIT"
] | 1 | 2021-05-15T10:23:54.000Z | 2021-05-15T10:23:54.000Z | import os
import tensorflow as tf
import numpy as np
import mcubes
from ops import *
| 37.539683 | 108 | 0.558774 |
36a935bd4ad858c3f4e568ba75cc0dc9d2989f18 | 2,410 | py | Python | tests/crud/test_crud_user.py | congdh/fastapi-realworld | 42c8630aedf594b69bc96a327b04dfe636a785fe | [
"MIT"
] | null | null | null | tests/crud/test_crud_user.py | congdh/fastapi-realworld | 42c8630aedf594b69bc96a327b04dfe636a785fe | [
"MIT"
] | null | null | null | tests/crud/test_crud_user.py | congdh/fastapi-realworld | 42c8630aedf594b69bc96a327b04dfe636a785fe | [
"MIT"
] | null | null | null | import pytest
from faker import Faker
from fastapi.encoders import jsonable_encoder
from pydantic.types import SecretStr
from sqlalchemy.orm import Session
from app import crud, schemas
from app.core import security
| 31.298701 | 78 | 0.702075 |