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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
644c92e4d0e82bad61581439da89a101823a1f63 | 3,269 | py | Python | src/zc/relation/queryfactory.py | witsch/zc.relation | a928064b5b29a8ed0590cb474b5c421365fa19a1 | [
"ZPL-2.1"
] | null | null | null | src/zc/relation/queryfactory.py | witsch/zc.relation | a928064b5b29a8ed0590cb474b5c421365fa19a1 | [
"ZPL-2.1"
] | 9 | 2016-08-02T12:31:05.000Z | 2021-04-30T14:53:28.000Z | src/zc/relation/queryfactory.py | witsch/zc.relation | a928064b5b29a8ed0590cb474b5c421365fa19a1 | [
"ZPL-2.1"
] | 5 | 2015-04-03T06:48:08.000Z | 2020-02-17T10:40:14.000Z | ##############################################################################
#
# Copyright (c) 2006-2008 Zope Foundation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THI... | 36.730337 | 78 | 0.516978 |
644e700c01e62c3075fcc1c7c8eb2a31a7e080af | 2,524 | py | Python | radolan_scraper/add_coordinate_grid.py | JarnoRFB/radolan-scraper | c4189ff9981306569034e5a4e2c01776503976d1 | [
"MIT"
] | null | null | null | radolan_scraper/add_coordinate_grid.py | JarnoRFB/radolan-scraper | c4189ff9981306569034e5a4e2c01776503976d1 | [
"MIT"
] | 2 | 2019-09-10T11:51:22.000Z | 2019-10-24T11:07:05.000Z | radolan_scraper/add_coordinate_grid.py | JarnoRFB/radolan-scraper | c4189ff9981306569034e5a4e2c01776503976d1 | [
"MIT"
] | null | null | null | """Add the multidimensional coordinates to the netcdf file."""
from pathlib import Path
from typing import *
import h5netcdf
import numpy as np
def chunk_str(iterable: Iterable, n: int) -> Iterable[str]:
"""Collect data into fixed-length chunks or blocks"""
# grouper('ABCDEFG', 3, 'x') --> ABC DEF Gxx"
... | 30.780488 | 88 | 0.591125 |
644f7c66068f7d5fd0fdd79a713ae1563438709a | 6,781 | py | Python | test/test_13_BNetwork_class.py | geolovic/topopy | 0ccfc4bfc0364b99489d08a1d4b87582deb08b81 | [
"MIT"
] | 5 | 2020-04-05T18:42:45.000Z | 2022-02-17T11:15:32.000Z | test/test_13_BNetwork_class.py | geolovic/topopy | 0ccfc4bfc0364b99489d08a1d4b87582deb08b81 | [
"MIT"
] | null | null | null | test/test_13_BNetwork_class.py | geolovic/topopy | 0ccfc4bfc0364b99489d08a1d4b87582deb08b81 | [
"MIT"
] | 5 | 2019-07-02T11:14:54.000Z | 2021-12-15T08:43:42.000Z | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on 09 february, 2021
Testing suite for BNetwork class
@author: J. Vicente Perez
@email: geolovic@hotmail.com
@date: 09 february, 2021
"""
import unittest
import os
import numpy as np
from topopy import Flow, Basin, Network, BNetwork, DEM
from topopy.network im... | 41.347561 | 107 | 0.550214 |
644fa580a42f5f6ad41d146a84a6c4b37d698c96 | 1,053 | py | Python | modoboa_postfix_autoreply/migrations/0005_auto_20151202_1623.py | modoboa/modoboa-postfix-autoreply | 353c62e51a0ecd011d056264422d74fcd571f05b | [
"MIT"
] | 5 | 2017-06-23T08:18:52.000Z | 2021-02-17T07:09:24.000Z | modoboa_postfix_autoreply/migrations/0005_auto_20151202_1623.py | modoboa/modoboa-postfix-autoreply | 353c62e51a0ecd011d056264422d74fcd571f05b | [
"MIT"
] | 78 | 2015-05-02T09:19:09.000Z | 2022-02-28T02:07:05.000Z | modoboa_postfix_autoreply/migrations/0005_auto_20151202_1623.py | modoboa/modoboa-postfix-autoreply | 353c62e51a0ecd011d056264422d74fcd571f05b | [
"MIT"
] | 10 | 2015-05-05T10:19:23.000Z | 2020-04-09T05:20:59.000Z | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
def remove_useless_aliases(apps, schema_editor):
"""Remove aliases linked to disabled messages."""
ARmessage = apps.get_model("modoboa_postfix_autoreply", "ARmessage")
AliasRecipient = apps.get_model(... | 30.085714 | 75 | 0.665717 |
644fa6c7575de74309c593d18054afd49f392625 | 1,343 | py | Python | mhvdb2/models.py | kjnsn/mhvdb2 | ce3fc77f76ca32e2aaeff928b291cc45d041b68f | [
"MIT"
] | null | null | null | mhvdb2/models.py | kjnsn/mhvdb2 | ce3fc77f76ca32e2aaeff928b291cc45d041b68f | [
"MIT"
] | null | null | null | mhvdb2/models.py | kjnsn/mhvdb2 | ce3fc77f76ca32e2aaeff928b291cc45d041b68f | [
"MIT"
] | null | null | null | from mhvdb2 import database
from peewee import *
| 35.342105 | 78 | 0.696947 |
64509bf6de10248d798ce10dfca7d707d586dfa0 | 7,214 | py | Python | cogs/tags.py | milindmadhukar/Martin-Garrix-Bot | 571ed68a3eecab34513dd9b12c8527cff865e912 | [
"MIT"
] | 2 | 2021-08-28T07:34:16.000Z | 2021-08-28T11:55:55.000Z | cogs/tags.py | milindmadhukar/Martin-Garrix-Bot | 571ed68a3eecab34513dd9b12c8527cff865e912 | [
"MIT"
] | null | null | null | cogs/tags.py | milindmadhukar/Martin-Garrix-Bot | 571ed68a3eecab34513dd9b12c8527cff865e912 | [
"MIT"
] | 1 | 2022-01-05T05:58:29.000Z | 2022-01-05T05:58:29.000Z | from discord.ext import commands
import discord
from aiohttp import request
import asyncio
from .utils.DataBase.tag import Tag
| 40.301676 | 113 | 0.597449 |
6451437fb5ad823d205624f75c9557035f253ce1 | 16,825 | py | Python | trainer.py | 97chenxa/Multiview2Novelview | 3492948f983e9b97d4b5ada04ae23f49485a54e3 | [
"MIT"
] | 1 | 2019-03-26T12:10:56.000Z | 2019-03-26T12:10:56.000Z | trainer.py | 97chenxa/Multiview2Novelview | 3492948f983e9b97d4b5ada04ae23f49485a54e3 | [
"MIT"
] | null | null | null | trainer.py | 97chenxa/Multiview2Novelview | 3492948f983e9b97d4b5ada04ae23f49485a54e3 | [
"MIT"
] | null | null | null | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from six.moves import xrange
from util import log
from pprint import pprint
from input_ops import create_input_ops
from model import Model
import os
import time
import tensorflow as tf
import tensorflow.contr... | 44.39314 | 107 | 0.617177 |
6452a951fee3eeea2589839d237ea795bf24e925 | 1,413 | py | Python | pyprof/examples/apex/fused_layer_norm.py | yhgon/PyProf | 7b2bcdde43b5edc416b9defb668126d9778dcce0 | [
"Apache-2.0"
] | null | null | null | pyprof/examples/apex/fused_layer_norm.py | yhgon/PyProf | 7b2bcdde43b5edc416b9defb668126d9778dcce0 | [
"Apache-2.0"
] | null | null | null | pyprof/examples/apex/fused_layer_norm.py | yhgon/PyProf | 7b2bcdde43b5edc416b9defb668126d9778dcce0 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2020, NVIDIA CORPORATION. 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/li... | 30.717391 | 74 | 0.757962 |
64530935af15fd81adb5c87356e6dfb3afbacffb | 878 | py | Python | twitter/forms.py | isulim/twitter | 6b2573fbb10272e11d9566189856297bc5b4913e | [
"MIT"
] | null | null | null | twitter/forms.py | isulim/twitter | 6b2573fbb10272e11d9566189856297bc5b4913e | [
"MIT"
] | null | null | null | twitter/forms.py | isulim/twitter | 6b2573fbb10272e11d9566189856297bc5b4913e | [
"MIT"
] | null | null | null | from django import forms
from django.contrib.auth.models import User
from django.contrib.auth.forms import UserCreationForm
from twitter import models
| 22.512821 | 68 | 0.612756 |
64555d34145c4c4b0784189b1218daea8d16af32 | 510 | py | Python | class-notes/chapter_13/readline_text.py | rhoenkelevra/python_simple_applications | 28ceb5f9fe7ecf11d606d49463385e92927e8f98 | [
"MIT"
] | null | null | null | class-notes/chapter_13/readline_text.py | rhoenkelevra/python_simple_applications | 28ceb5f9fe7ecf11d606d49463385e92927e8f98 | [
"MIT"
] | null | null | null | class-notes/chapter_13/readline_text.py | rhoenkelevra/python_simple_applications | 28ceb5f9fe7ecf11d606d49463385e92927e8f98 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
"""
Created on Mon Jul 26 15:06:57 2021
@author: user24
"""
file = "./data/tsuretsuregusa.txt"
with open(file, "r", encoding="utf_8") as fileobj:
while True:
# set line as value of the file line
line = fileobj.readline()
# removes any white space at the end of strin... | 20.4 | 54 | 0.560784 |
64572ea93cb97cc8f36d4cdba05a3a5c9a854e9c | 313 | py | Python | appendix_a_comments/reading_comments.py | r00c/automating_excel_with_python | b4fa01aa6bdc2ec1c87a3e9cd00813b100f81f8b | [
"MIT"
] | 43 | 2021-07-01T11:50:38.000Z | 2022-03-26T13:56:15.000Z | appendix_a_comments/reading_comments.py | wenxuefeng3930/automating_excel_with_python | dc2509359e1b14d2ad694f9fe554f3ce1781e497 | [
"MIT"
] | 1 | 2021-11-06T23:06:21.000Z | 2021-11-07T01:24:44.000Z | appendix_a_comments/reading_comments.py | wenxuefeng3930/automating_excel_with_python | dc2509359e1b14d2ad694f9fe554f3ce1781e497 | [
"MIT"
] | 11 | 2021-06-25T02:06:35.000Z | 2022-03-31T14:29:59.000Z | # reading_comments.py
from openpyxl import load_workbook
from openpyxl.comments import Comment
if __name__ == "__main__":
main("comments.xlsx", "A1") | 20.866667 | 47 | 0.728435 |
64572f662356fd4cd4c4f1528b9d651667778d43 | 18,730 | py | Python | qiling/qiling/os/windows/dlls/kernel32/fileapi.py | mrTavas/owasp-fstm-auto | 6e9ff36e46d885701c7419db3eca15f12063a7f3 | [
"CC0-1.0"
] | 2 | 2021-05-05T12:03:01.000Z | 2021-06-04T14:27:15.000Z | qiling/qiling/os/windows/dlls/kernel32/fileapi.py | mrTavas/owasp-fstm-auto | 6e9ff36e46d885701c7419db3eca15f12063a7f3 | [
"CC0-1.0"
] | null | null | null | qiling/qiling/os/windows/dlls/kernel32/fileapi.py | mrTavas/owasp-fstm-auto | 6e9ff36e46d885701c7419db3eca15f12063a7f3 | [
"CC0-1.0"
] | 2 | 2021-05-05T12:03:09.000Z | 2021-06-04T14:27:21.000Z | #!/usr/bin/env python3
#
# Cross Platform and Multi Architecture Advanced Binary Emulation Framework
#
import struct, time, os
from shutil import copyfile
from datetime import datetime
from qiling.exception import *
from qiling.os.windows.const import *
from qiling.os.const import *
from qiling.os.windows.fncc imp... | 32.182131 | 110 | 0.665617 |
6459bb5a254d67d42306305b964300abdf563dd5 | 1,561 | py | Python | algorithm/merge_sort.py | smartdolphin/recommandation-tutorial | 3bfa8f91a6d2d064db42dfb61c3640e1775e4c31 | [
"MIT"
] | 1 | 2018-10-14T14:19:05.000Z | 2018-10-14T14:19:05.000Z | algorithm/merge_sort.py | smartdolphin/recommandation-tutorial | 3bfa8f91a6d2d064db42dfb61c3640e1775e4c31 | [
"MIT"
] | null | null | null | algorithm/merge_sort.py | smartdolphin/recommandation-tutorial | 3bfa8f91a6d2d064db42dfb61c3640e1775e4c31 | [
"MIT"
] | null | null | null | import unittest
if __name__ == '__main__':
unittest.TestCase()
| 23.651515 | 47 | 0.434337 |
6459d5e70633b4a25bd89627161b0973bbe59d67 | 3,382 | py | Python | run_w2v.py | hugochan/K-Competitive-Autoencoder-for-Text-Analytics | 5433de649028a4e021b8ad17cd0ec5da8c726031 | [
"BSD-3-Clause"
] | 133 | 2017-05-30T20:28:24.000Z | 2022-03-10T01:27:43.000Z | run_w2v.py | hugochan/K-Competitive-Autoencoder-for-Text-Analytics | 5433de649028a4e021b8ad17cd0ec5da8c726031 | [
"BSD-3-Clause"
] | 34 | 2017-09-04T08:04:50.000Z | 2022-02-10T01:12:17.000Z | run_w2v.py | hugochan/K-Competitive-Autoencoder-for-Text-Analytics | 5433de649028a4e021b8ad17cd0ec5da8c726031 | [
"BSD-3-Clause"
] | 49 | 2017-07-08T09:30:17.000Z | 2021-07-30T04:37:29.000Z | '''
Created on Jan, 2017
@author: hugo
'''
from __future__ import absolute_import
import argparse
from os import path
import timeit
import numpy as np
from autoencoder.baseline.word2vec import Word2Vec, save_w2v, load_w2v
from autoencoder.baseline.doc_word2vec import doc_word2vec
from autoencoder.utils.io_utils impo... | 44.5 | 146 | 0.715257 |
645b1f549815ff06f8102522d4899632169c198c | 713 | py | Python | code/udls/datasets/sol_string.py | acids-ircam/lottery_mir | 1440d717d7fd688ac43c1a406602aaf2d5a3842d | [
"MIT"
] | 10 | 2020-07-29T23:12:15.000Z | 2022-03-23T16:27:43.000Z | code/udls/datasets/sol_string.py | acids-ircam/lottery_mir | 1440d717d7fd688ac43c1a406602aaf2d5a3842d | [
"MIT"
] | null | null | null | code/udls/datasets/sol_string.py | acids-ircam/lottery_mir | 1440d717d7fd688ac43c1a406602aaf2d5a3842d | [
"MIT"
] | 1 | 2022-02-06T11:42:28.000Z | 2022-02-06T11:42:28.000Z | from .. import DomainAdaptationDataset, SimpleDataset
SolV4folders = [
"/fast-2/datasets/Solv4_strings_wav/audio/Cello",
"/fast-2/datasets/Solv4_strings_wav/audio/Contrabass",
"/fast-2/datasets/Solv4_strings_wav/audio/Violin",
"/fast-2/datasets/Solv4_strings_wav/audio/Viola"
]
| 37.526316 | 78 | 0.734923 |
645ccc5b1f68aec3345ceb1d48f1b9dfe2ef349e | 1,079 | py | Python | testsuite/cases/cv2.py | jcupitt/pillow-perf | dc71bf8597f73ced42724a2203867ba4000e0640 | [
"MIT"
] | null | null | null | testsuite/cases/cv2.py | jcupitt/pillow-perf | dc71bf8597f73ced42724a2203867ba4000e0640 | [
"MIT"
] | null | null | null | testsuite/cases/cv2.py | jcupitt/pillow-perf | dc71bf8597f73ced42724a2203867ba4000e0640 | [
"MIT"
] | null | null | null | # coding: utf-8
from __future__ import print_function, unicode_literals, absolute_import
import cv2
from .base import BaseTestCase, root
try:
cv2.setNumThreads(1)
except AttributeError:
print('!!! You are using OpenCV which does not allow you to set '
'the number of threads')
| 26.317073 | 76 | 0.591288 |
645cdcce15f683ef36c7e69e585e1850939a7867 | 1,736 | py | Python | App/main.py | uip-pc3/calculadora-de-comisiones-andrew962 | 344c9e04926c810a9549b8899bcb4b4aae071da7 | [
"MIT"
] | null | null | null | App/main.py | uip-pc3/calculadora-de-comisiones-andrew962 | 344c9e04926c810a9549b8899bcb4b4aae071da7 | [
"MIT"
] | null | null | null | App/main.py | uip-pc3/calculadora-de-comisiones-andrew962 | 344c9e04926c810a9549b8899bcb4b4aae071da7 | [
"MIT"
] | null | null | null | """Librerias Importadas"""
from flask import Flask
from flask import render_template
from flask import request
App=Flask(__name__)
if __name__=="__main__":
App.run() | 32.148148 | 88 | 0.595046 |
645d0a77c8595a137c03943b9accce405a4f8a4c | 2,407 | py | Python | waste_flow/spreading.py | xapple/waste_flow | 7ec6789de6364fb535f4bac4c6a50e0656c9279a | [
"MIT"
] | 1 | 2020-06-08T12:39:44.000Z | 2020-06-08T12:39:44.000Z | waste_flow/spreading.py | xapple/waste_flow | 7ec6789de6364fb535f4bac4c6a50e0656c9279a | [
"MIT"
] | 2 | 2021-02-14T13:54:28.000Z | 2021-02-19T14:02:32.000Z | waste_flow/spreading.py | xapple/waste_flow | 7ec6789de6364fb535f4bac4c6a50e0656c9279a | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Written by Lucas Sinclair.
JRC Biomass Project.
Unit D1 Bioeconomy.
Typically you can use this class like this:
>>> from waste_flow.spreading import spread
>>> print(spread.by_nace)
"""
# Built-in modules #
# Internal modules #
from waste_flow.common impo... | 32.527027 | 79 | 0.493145 |
645fc4bf818569364ce3bf0cb6225d48dc5020d1 | 13,890 | py | Python | tests/test_deploy.py | lobziik/ocdeployer | 092e65fb6d8868f262980d6221518433de1345f4 | [
"MIT"
] | null | null | null | tests/test_deploy.py | lobziik/ocdeployer | 092e65fb6d8868f262980d6221518433de1345f4 | [
"MIT"
] | null | null | null | tests/test_deploy.py | lobziik/ocdeployer | 092e65fb6d8868f262980d6221518433de1345f4 | [
"MIT"
] | null | null | null | import pytest
from ocdeployer.secrets import SecretImporter
from ocdeployer.deploy import DeployRunner
from ocdeployer.env import EnvConfigHandler, LegacyEnvConfigHandler
def test__get_variables_base_and_service_set(patch_os_path):
base_var_data = {
"test_env": {
"global": {"global_v... | 33.229665 | 98 | 0.589561 |
6460dc559a73dc7e53f1f3a422be42d50e7cc1b0 | 210 | py | Python | app/main/__init__.py | Edwin-Karanu-Muiruri/pitch-perfect | 8d3abaf0898dcfbe57ba1db93043ac6cea1dd0e2 | [
"MIT"
] | null | null | null | app/main/__init__.py | Edwin-Karanu-Muiruri/pitch-perfect | 8d3abaf0898dcfbe57ba1db93043ac6cea1dd0e2 | [
"MIT"
] | null | null | null | app/main/__init__.py | Edwin-Karanu-Muiruri/pitch-perfect | 8d3abaf0898dcfbe57ba1db93043ac6cea1dd0e2 | [
"MIT"
] | null | null | null | from flask import Flask
from flask_bootstrap import Bootstrap
from config import config_options
from flask import Blueprint
main = Blueprint('main',__name__)
from . import views,error
bootstrap = Bootstrap()
| 21 | 37 | 0.814286 |
646208f0693f4cb46abcaf9ae8ce2a78afead206 | 2,205 | py | Python | loaner/deployments/lib/password.py | gng-demo/travisfix | 6d64de6dac44d89059eb92f76410fdcc2d41a247 | [
"Apache-2.0"
] | 175 | 2018-03-28T20:33:39.000Z | 2022-03-27T06:02:39.000Z | loaner/deployments/lib/password.py | gng-demo/travisfix | 6d64de6dac44d89059eb92f76410fdcc2d41a247 | [
"Apache-2.0"
] | 111 | 2018-05-22T18:50:59.000Z | 2022-01-23T23:11:15.000Z | loaner/deployments/lib/password.py | gng-demo/travisfix | 6d64de6dac44d89059eb92f76410fdcc2d41a247 | [
"Apache-2.0"
] | 70 | 2018-03-30T01:52:06.000Z | 2021-10-13T11:20:10.000Z | # Copyright 2018 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 29.4 | 80 | 0.711111 |
64628052cc79203f1662d5c3075c0ef300636aa0 | 732 | py | Python | debug/test_call.py | ccj5351/hmr_rgbd | d1dcf81d72c11e1f502f2c494cd86425f384d9cc | [
"MIT"
] | null | null | null | debug/test_call.py | ccj5351/hmr_rgbd | d1dcf81d72c11e1f502f2c494cd86425f384d9cc | [
"MIT"
] | 1 | 2020-12-09T07:29:00.000Z | 2020-12-09T07:29:00.000Z | debug/test_call.py | ccj5351/hmr_rgbd | d1dcf81d72c11e1f502f2c494cd86425f384d9cc | [
"MIT"
] | null | null | null | # !/usr/bin/env python3
# -*-coding:utf-8-*-
# @file: test_call.py
# @brief:
# @author: Changjiang Cai, ccai1@stevens.edu, caicj5351@gmail.com
# @version: 0.0.1
# @creation date: 09-07-2019
# @last modified: Tue 09 Jul 2019 07:09:07 PM EDT
if __name__ == "__main__":
s = Stuff(1,2,3)
print (s.x)
s(7, 8)
... | 20.333333 | 65 | 0.546448 |
64629dd661ec8e7faccc37654ec9059a6243e7b1 | 390 | py | Python | python/hackerrank/strings-xor.py | leewalter/coding | 2afd9dbfc1ecb94def35b953f4195a310d6953c9 | [
"Apache-2.0"
] | null | null | null | python/hackerrank/strings-xor.py | leewalter/coding | 2afd9dbfc1ecb94def35b953f4195a310d6953c9 | [
"Apache-2.0"
] | null | null | null | python/hackerrank/strings-xor.py | leewalter/coding | 2afd9dbfc1ecb94def35b953f4195a310d6953c9 | [
"Apache-2.0"
] | 1 | 2020-08-29T17:12:52.000Z | 2020-08-29T17:12:52.000Z | '''
https://www.hackerrank.com/challenges/strings-xor/submissions/code/102872134
Given two strings consisting of digits 0 and 1 only, find the XOR of the two strings.
'''
s = input()
t = input()
print(strings_xor(s, t))
| 17.727273 | 85 | 0.571795 |
64642512549fbe0dcf2f64eed76704c1c5116562 | 1,365 | py | Python | cleaning_data.py | yoon-gu/dand-p5 | d53443d0e954b4559350ad5e81ebad715e036a69 | [
"BSD-3-Clause"
] | null | null | null | cleaning_data.py | yoon-gu/dand-p5 | d53443d0e954b4559350ad5e81ebad715e036a69 | [
"BSD-3-Clause"
] | null | null | null | cleaning_data.py | yoon-gu/dand-p5 | d53443d0e954b4559350ad5e81ebad715e036a69 | [
"BSD-3-Clause"
] | null | null | null | from pandas import DataFrame, read_csv, cut
import numpy as np
df = read_csv('data/baseball_data.csv')
df = df[(df.avg > 0.0) & (df.HR > 0)]
## Split to 5 intervals using pandas.cut function
df['avg_category'] = cut(df.avg,
bins = np.linspace(0.1, 0.35, 6),
right=False)
## Except 'height', 'weight', 'a... | 47.068966 | 144 | 0.708425 |
64659fc8013df6eb0ece0729395653522f617a1f | 2,311 | py | Python | model_predict.py | Non1ce/Transformer-Bert | 32a3c002d80c6719e5a93c10879e09c1c645a39b | [
"MIT"
] | 2 | 2021-09-23T07:52:21.000Z | 2021-09-24T13:48:02.000Z | model_predict.py | Non1ce/Transformer-Bert | 32a3c002d80c6719e5a93c10879e09c1c645a39b | [
"MIT"
] | null | null | null | model_predict.py | Non1ce/Transformer-Bert | 32a3c002d80c6719e5a93c10879e09c1c645a39b | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
from model_train import pipeline_model
from Data import InputData
"""
Created on 20.07.2021
@author: Nikita
The module is designed to predict the topic of the entered text. To make a prediction, it is enough to run the
module as the main program.The longer the text, the better th... | 27.511905 | 115 | 0.617049 |
64683791fc3bd9190d2f464d62fd8297c378bec0 | 5,904 | py | Python | tests/acceptance/commons/behave_step_helpers.py | telefonicaid/fiware-glancesync | 5ad0c80e12b9384473f31bf336015c75cf02a2a2 | [
"Apache-2.0"
] | null | null | null | tests/acceptance/commons/behave_step_helpers.py | telefonicaid/fiware-glancesync | 5ad0c80e12b9384473f31bf336015c75cf02a2a2 | [
"Apache-2.0"
] | 88 | 2015-07-21T22:13:23.000Z | 2016-11-15T21:28:56.000Z | tests/acceptance/commons/behave_step_helpers.py | telefonicaid/fiware-glancesync | 5ad0c80e12b9384473f31bf336015c75cf02a2a2 | [
"Apache-2.0"
] | 2 | 2015-08-12T11:19:55.000Z | 2018-05-25T19:04:43.000Z | # -*- coding: utf-8 -*-
# Copyright 2015-2016 Telefnica Investigacin y Desarrollo, S.A.U
#
# This file is part of FIWARE project.
#
# 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:... | 40.438356 | 111 | 0.69563 |
646a09bba433e9134052e21102c6b81a5cd88eb1 | 341 | py | Python | src/video_store/urls.py | staab/video-store | 9badfae8316ab1d33fa20fe6a17cd90ef2737f8c | [
"MIT"
] | null | null | null | src/video_store/urls.py | staab/video-store | 9badfae8316ab1d33fa20fe6a17cd90ef2737f8c | [
"MIT"
] | null | null | null | src/video_store/urls.py | staab/video-store | 9badfae8316ab1d33fa20fe6a17cd90ef2737f8c | [
"MIT"
] | null | null | null | from django.conf.urls import include, url
from django.contrib import admin
from django.views.generic import RedirectView
import store_api.urls
import store_ui.urls
urlpatterns = [
url(r'^admin/', include(admin.site.urls)),
url(r'^api/', include(store_api.urls.urlpatterns)),
url(r'^.*$', include(store_ui.... | 24.357143 | 55 | 0.73607 |
646a4518e28de7da32a6e93047fe7e1de9aa14ed | 776 | py | Python | pp/samples/13_component_yaml.py | smartalecH/gdsfactory | 66dfbf740704f1a6155f4812a1d9483ccf5c116c | [
"MIT"
] | 16 | 2020-02-03T07:05:31.000Z | 2021-12-29T18:40:09.000Z | pp/samples/13_component_yaml.py | smartalecH/gdsfactory | 66dfbf740704f1a6155f4812a1d9483ccf5c116c | [
"MIT"
] | 2 | 2020-01-31T20:01:40.000Z | 2020-09-26T17:50:55.000Z | pp/samples/13_component_yaml.py | smartalecH/gdsfactory | 66dfbf740704f1a6155f4812a1d9483ccf5c116c | [
"MIT"
] | 7 | 2020-02-09T23:16:18.000Z | 2020-10-30T03:12:04.000Z | import pp
if __name__ == "__main__":
c = test_mzi()
pp.show(c)
pp.plotgds(c)
| 17.636364 | 42 | 0.476804 |
646b09594cd86b4fbaef8fd2c64ad439c0f79bf3 | 5,159 | py | Python | simulated_data.py | aamcbee/AdaOja | 11d2525a2123395ba8f8d6c1da3ffc1032356766 | [
"BSD-3-Clause"
] | 9 | 2019-05-30T16:50:28.000Z | 2021-06-21T14:44:29.000Z | simulated_data.py | aamcbee/AdaOja | 11d2525a2123395ba8f8d6c1da3ffc1032356766 | [
"BSD-3-Clause"
] | null | null | null | simulated_data.py | aamcbee/AdaOja | 11d2525a2123395ba8f8d6c1da3ffc1032356766 | [
"BSD-3-Clause"
] | 1 | 2019-07-16T15:05:54.000Z | 2019-07-16T15:05:54.000Z | import numpy as np
import scipy.linalg as la
from scipy.stats import multinomial
def random_multivar_normal(n, d, k, sigma=.1):
'''
Generate random samples from a random multivariate normal distribution
with covariance A A^T + sigma^2 I.
Input:
n: int, number of samples
d: int, dimensio... | 35.826389 | 85 | 0.629773 |
646ba550e2915c48f8240facac2579b39fb7e221 | 600 | py | Python | livestream/api_test.py | mitodl/open-discussions | ab6e9fac70b8a1222a84e78ba778a7a065c20541 | [
"BSD-3-Clause"
] | 12 | 2017-09-27T21:23:27.000Z | 2020-12-25T04:31:30.000Z | livestream/api_test.py | mitodl/open-discussions | ab6e9fac70b8a1222a84e78ba778a7a065c20541 | [
"BSD-3-Clause"
] | 3,293 | 2017-06-30T18:16:01.000Z | 2022-03-31T18:01:34.000Z | livestream/api_test.py | mitodl/open-discussions | ab6e9fac70b8a1222a84e78ba778a7a065c20541 | [
"BSD-3-Clause"
] | 1 | 2020-04-13T12:19:57.000Z | 2020-04-13T12:19:57.000Z | """livestream API tests"""
from livestream.api import get_upcoming_events
def test_get_upcoming_events(settings, mocker):
"""test get upcoming events"""
settings.LIVESTREAM_ACCOUNT_ID = 392_239
settings.LIVESTREAM_SECRET_KEY = "secret key"
requests_patch = mocker.patch("requests.get", autospec=True)
... | 37.5 | 99 | 0.75 |
646bb4c53e729313b2e24c298dec7ba02d40b510 | 2,105 | py | Python | xcamserver/framebuffer.py | Moskari/xcamserver | ed8cedf7cd0308b1e5fd9a8f74cec5e95d6c4978 | [
"MIT"
] | null | null | null | xcamserver/framebuffer.py | Moskari/xcamserver | ed8cedf7cd0308b1e5fd9a8f74cec5e95d6c4978 | [
"MIT"
] | null | null | null | xcamserver/framebuffer.py | Moskari/xcamserver | ed8cedf7cd0308b1e5fd9a8f74cec5e95d6c4978 | [
"MIT"
] | null | null | null | '''
Created on 15.2.2017
@author: sapejura
'''
import io
import threading
import struct
| 25.361446 | 60 | 0.524466 |
646d6247dd6126e8107c3cf99ab420aeeee219c8 | 14,246 | py | Python | tests/test_nmt.py | LSSTDESC/TJPCov | eb70afc3d1e9a349ccd5e3c8ffe9c7e89a77b3cc | [
"MIT"
] | 3 | 2020-01-26T16:20:11.000Z | 2022-01-21T15:56:41.000Z | tests/test_nmt.py | LSSTDESC/TJPCov | eb70afc3d1e9a349ccd5e3c8ffe9c7e89a77b3cc | [
"MIT"
] | 25 | 2020-01-24T22:53:56.000Z | 2022-01-21T14:31:05.000Z | tests/test_nmt.py | LSSTDESC/TJPCov | eb70afc3d1e9a349ccd5e3c8ffe9c7e89a77b3cc | [
"MIT"
] | 1 | 2021-07-01T16:08:48.000Z | 2021-07-01T16:08:48.000Z | #!/usr/bin/python
import numpy as np
import os
import pymaster as nmt
import pytest
import tjpcov.main as cv
from tjpcov.parser import parse
import yaml
import sacc
root = "./tests/benchmarks/32_DES_tjpcov_bm/"
input_yml = os.path.join(root, "tjpcov_conf_minimal.yaml")
input_yml_no_nmtc = os.path.join(root, "tjpcov_c... | 38.090909 | 87 | 0.585989 |
646da2c390d3322cbbc2c43e4e62944383fbc9f4 | 1,174 | py | Python | lib/fathead/scikit_learn/fetch.py | aeisenberg/zeroclickinfo-fathead | 9be00a038d812ca9ccd0d601220afde777ab2f8e | [
"Apache-2.0"
] | null | null | null | lib/fathead/scikit_learn/fetch.py | aeisenberg/zeroclickinfo-fathead | 9be00a038d812ca9ccd0d601220afde777ab2f8e | [
"Apache-2.0"
] | null | null | null | lib/fathead/scikit_learn/fetch.py | aeisenberg/zeroclickinfo-fathead | 9be00a038d812ca9ccd0d601220afde777ab2f8e | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from os.path import join
import requests
from bs4 import BeautifulSoup
SCIKIT_LEARN_BASE_URL = 'http://scikit-learn.org/stable/auto_examples/'
SCIKIT_INDEX_URL = 'http://scikit-learn.org/stable/auto_examples/index.html'
def download_file(fetch_me):
"""
Fetches a file in given url int... | 31.72973 | 77 | 0.670358 |
646e3f798705f6b0c67f2b3094fafcabdb531a9a | 2,283 | py | Python | frappe-bench/apps/erpnext/erpnext/education/report/student_batch_wise_attendance/student_batch_wise_attendance.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/education/report/student_batch_wise_attendance/student_batch_wise_attendance.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | frappe-bench/apps/erpnext/erpnext/education/report/student_batch_wise_attendance/student_batch_wise_attendance.py | Semicheche/foa_frappe_docker | a186b65d5e807dd4caf049e8aeb3620a799c1225 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import cstr, cint, getdate
from frappe import msgprint, _ | 35.671875 | 109 | 0.750329 |
646e5dbf5f25bac61c00c886ecb35af7a68f74e5 | 1,819 | py | Python | src/role_filter.py | kjkszpj/mifans | 523ea1907c7bf32cdabed129676c748eeb57e552 | [
"MIT"
] | null | null | null | src/role_filter.py | kjkszpj/mifans | 523ea1907c7bf32cdabed129676c748eeb57e552 | [
"MIT"
] | null | null | null | src/role_filter.py | kjkszpj/mifans | 523ea1907c7bf32cdabed129676c748eeb57e552 | [
"MIT"
] | null | null | null | import pickle
data = pickle.load(open('../data/record.pk', 'rb'))
namedict = pickle.load(open('../data/namedict.pk', 'rb'))
rndict = {v:k for k, v in namedict.items()}
pickle.dump(rndict, open('../data/rndict.pk', 'wb'))
cnt_name = {v:[0, 0, 0] for v in namedict.values()}
for record in data:
for a in record[2]:
... | 27.984615 | 57 | 0.536009 |
646f82e80f897c2f8bd798e481eac1b38a160e51 | 14,748 | py | Python | server/internal/rest_server.py | VentionCo/mm-machineapp-template | 61de22b9bb65c534407f2f9ff3a389a799484284 | [
"MIT"
] | null | null | null | server/internal/rest_server.py | VentionCo/mm-machineapp-template | 61de22b9bb65c534407f2f9ff3a389a799484284 | [
"MIT"
] | 1 | 2021-11-02T13:59:54.000Z | 2021-11-03T22:28:54.000Z | server/internal/rest_server.py | VentionCo/mm-machineapp-template | 61de22b9bb65c534407f2f9ff3a389a799484284 | [
"MIT"
] | null | null | null | import logging
from bottle import Bottle, request, response, abort, static_file
import os
import time
import threading
from threading import Thread
from pathlib import Path
import json
import subprocess
import io
import sys
import signal
from internal.notifier import getNotifier, NotificationLevel
from internal.interpr... | 36.595533 | 168 | 0.624695 |
6470ee21c76238510e2a174a475155ece7f28c66 | 30,430 | py | Python | minpiler/mind.py | neumond/minpiler | 2e37a9e0854383d3974af38e1cb2da0ecb8e2108 | [
"MIT"
] | 23 | 2020-12-20T03:39:30.000Z | 2022-03-23T15:47:10.000Z | minpiler/mind.py | neumond/minpiler | 2e37a9e0854383d3974af38e1cb2da0ecb8e2108 | [
"MIT"
] | 15 | 2020-12-21T01:12:22.000Z | 2021-04-19T10:40:11.000Z | minpiler/mind.py | neumond/minpiler | 2e37a9e0854383d3974af38e1cb2da0ecb8e2108 | [
"MIT"
] | 2 | 2022-02-12T19:19:50.000Z | 2022-02-12T21:33:35.000Z | import ast
import sys
from contextlib import contextmanager
from dataclasses import dataclass, field
from typing import Any, Callable
from . import mast, utils
_PY = (sys.version_info.major, sys.version_info.minor)
BIN_OP_MAP = {
ast.Add: 'add',
ast.Sub: 'sub',
ast.Mult: 'mul',
ast.Div: 'div',
... | 30.675403 | 79 | 0.610746 |
6471f48da26ddba2df69a8c07fa52ed1ac917387 | 1,499 | py | Python | sdk/python/pulumi_aws_native/redshift/_enums.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 29 | 2021-09-30T19:32:07.000Z | 2022-03-22T21:06:08.000Z | sdk/python/pulumi_aws_native/redshift/_enums.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 232 | 2021-09-30T19:26:26.000Z | 2022-03-31T23:22:06.000Z | sdk/python/pulumi_aws_native/redshift/_enums.py | AaronFriel/pulumi-aws-native | 5621690373ac44accdbd20b11bae3be1baf022d1 | [
"Apache-2.0"
] | 4 | 2021-11-10T19:42:01.000Z | 2022-02-05T10:15:49.000Z | # coding=utf-8
# *** WARNING: this file was generated by the Pulumi SDK Generator. ***
# *** Do not edit by hand unless you're certain you know what you are doing! ***
from enum import Enum
__all__ = [
'EventSubscriptionEventCategoriesItem',
'EventSubscriptionSeverity',
'EventSubscriptionSourceType',
... | 25.844828 | 104 | 0.697799 |
6472e6b9caa6ef8c7d6637f36d731e5edcd08f66 | 1,739 | py | Python | openmdao/utils/tests/test_cs_safe.py | friedenhe/OpenMDAO | db1d7e22a8bf9f66afa82ec3544b7244d5545f6d | [
"Apache-2.0"
] | 451 | 2015-07-20T11:52:35.000Z | 2022-03-28T08:04:56.000Z | openmdao/utils/tests/test_cs_safe.py | friedenhe/OpenMDAO | db1d7e22a8bf9f66afa82ec3544b7244d5545f6d | [
"Apache-2.0"
] | 1,096 | 2015-07-21T03:08:26.000Z | 2022-03-31T11:59:17.000Z | openmdao/utils/tests/test_cs_safe.py | friedenhe/OpenMDAO | db1d7e22a8bf9f66afa82ec3544b7244d5545f6d | [
"Apache-2.0"
] | 301 | 2015-07-16T20:02:11.000Z | 2022-03-28T08:04:39.000Z | import numpy as np
import unittest
from openmdao.utils import cs_safe
from openmdao.utils.assert_utils import assert_near_equal
if __name__ == "__main__":
unittest.main() | 29.982759 | 97 | 0.635423 |
64731da3c8956920b9c929cc9f200ff529bc2c34 | 1,341 | py | Python | scripts/main.py | kjenney/community-ops | c9132079e3685f7457199ef2f37c7d5d8361d67e | [
"Apache-2.0"
] | 14 | 2021-08-10T03:46:25.000Z | 2022-03-16T11:25:01.000Z | scripts/main.py | kjenney/community-ops | c9132079e3685f7457199ef2f37c7d5d8361d67e | [
"Apache-2.0"
] | null | null | null | scripts/main.py | kjenney/community-ops | c9132079e3685f7457199ef2f37c7d5d8361d67e | [
"Apache-2.0"
] | 4 | 2020-11-03T07:14:45.000Z | 2022-02-25T23:31:53.000Z | #!/usr/bin/env python
from parser.configuration import ConfigurationParser
from deployer.helm import HelmDeployer
from deployer.shell import ShellDeployer
from deployer.kustomize import KustomizeDeployer
from deployer.manifest import ManifestDeployer
from deployer.istio import IstioDeployer
from utils import *
import... | 27.367347 | 82 | 0.753915 |
647401346cf10238d3f0044de0b2d66f7bc135f8 | 203 | py | Python | python/ex034.py | deniseicorrea/Aulas-de-Python | c5bcafa34f03ea4b9c73805b58c8004bb13f70e5 | [
"MIT"
] | null | null | null | python/ex034.py | deniseicorrea/Aulas-de-Python | c5bcafa34f03ea4b9c73805b58c8004bb13f70e5 | [
"MIT"
] | null | null | null | python/ex034.py | deniseicorrea/Aulas-de-Python | c5bcafa34f03ea4b9c73805b58c8004bb13f70e5 | [
"MIT"
] | null | null | null | salario = float(input('Qual o seu salrio? R$ '))
if salario <= 1250:
novo = salario + (salario * 15 / 100)
else:
novo = salario + (salario * 10 / 100)
print(f'Seu novo salrio R${novo :.2f}.') | 33.833333 | 49 | 0.610837 |
6475a7145db7db9856cc53ae5ca36a32dd1e2c4c | 3,615 | py | Python | custom/icds/messaging/custom_recipients.py | kkrampa/commcare-hq | d64d7cad98b240325ad669ccc7effb07721b4d44 | [
"BSD-3-Clause"
] | 1 | 2020-05-05T13:10:01.000Z | 2020-05-05T13:10:01.000Z | custom/icds/messaging/custom_recipients.py | kkrampa/commcare-hq | d64d7cad98b240325ad669ccc7effb07721b4d44 | [
"BSD-3-Clause"
] | 1 | 2019-12-09T14:00:14.000Z | 2019-12-09T14:00:14.000Z | custom/icds/messaging/custom_recipients.py | MaciejChoromanski/commcare-hq | fd7f65362d56d73b75a2c20d2afeabbc70876867 | [
"BSD-3-Clause"
] | 5 | 2015-11-30T13:12:45.000Z | 2019-07-01T19:27:07.000Z | from __future__ import absolute_import
from __future__ import unicode_literals
from corehq.apps.locations.models import SQLLocation
from corehq.form_processor.models import CommCareCaseIndexSQL
from custom.icds.case_relationships import (
mother_person_case_from_ccs_record_case,
mother_person_case_from_child_he... | 36.15 | 105 | 0.768188 |
6476c66a90cc6db2e0f89497af03df52e9401883 | 3,053 | py | Python | main.py | tuzhucheng/sent-sim | ebda09322be1dca3e967b80ffcf6437adb789132 | [
"MIT"
] | 109 | 2017-12-09T04:52:06.000Z | 2022-02-08T17:41:37.000Z | main.py | tuzhucheng/sent-sim | ebda09322be1dca3e967b80ffcf6437adb789132 | [
"MIT"
] | 5 | 2018-06-05T01:50:02.000Z | 2021-03-14T04:45:02.000Z | main.py | tuzhucheng/sent-sim | ebda09322be1dca3e967b80ffcf6437adb789132 | [
"MIT"
] | 24 | 2018-04-27T01:52:34.000Z | 2021-12-21T09:21:26.000Z | """
Driver program for training and evaluation.
"""
import argparse
import logging
import numpy as np
import random
import torch
import torch.optim as O
from datasets import get_dataset, get_dataset_configurations
from models import get_model
from runners import Runner
if __name__ == '__main__':
parser = argpar... | 45.567164 | 160 | 0.72224 |
6477f0f67faa25656d06bc7f042cf253f6f4ecae | 544 | py | Python | dhook.py | Araon/Sadhu-Kamra | daf99d9d4ccb4e1f39d98ce9296fc774a9562fc0 | [
"MIT"
] | null | null | null | dhook.py | Araon/Sadhu-Kamra | daf99d9d4ccb4e1f39d98ce9296fc774a9562fc0 | [
"MIT"
] | null | null | null | dhook.py | Araon/Sadhu-Kamra | daf99d9d4ccb4e1f39d98ce9296fc774a9562fc0 | [
"MIT"
] | null | null | null | import requests
url = "https://discord.com/api/webhooks/848514072194580511/_7RDKRz4PeX3oPPaRuPsA8P-3287J6uFoUAiXYtA0yygVPOdkLV3HphfLargI1dJ9eJi"
| 25.904762 | 128 | 0.670956 |
64784891319622c3277255e07ba9df3046e9426c | 16,301 | py | Python | proganomaly_modules/training_module/trainer/training_inputs.py | ryangillard/P-CEAD | d4e95fa17112af07eb99cd581470bd3146d1c8e5 | [
"Apache-2.0"
] | 6 | 2021-07-01T23:37:10.000Z | 2022-02-19T03:12:41.000Z | proganomaly_modules/training_module/trainer/training_inputs.py | ryangillard/P-CEAD | d4e95fa17112af07eb99cd581470bd3146d1c8e5 | [
"Apache-2.0"
] | null | null | null | proganomaly_modules/training_module/trainer/training_inputs.py | ryangillard/P-CEAD | d4e95fa17112af07eb99cd581470bd3146d1c8e5 | [
"Apache-2.0"
] | 2 | 2021-07-01T23:37:30.000Z | 2021-12-21T18:19:21.000Z | # Copyright 2020 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | 32.667335 | 80 | 0.565241 |
64799d5c6f6b719d0987aca3b83297c592058a73 | 58 | py | Python | python/testData/intentions/quotedStringDoubleSlash_after.py | jnthn/intellij-community | 8fa7c8a3ace62400c838e0d5926a7be106aa8557 | [
"Apache-2.0"
] | 2 | 2019-04-28T07:48:50.000Z | 2020-12-11T14:18:08.000Z | python/testData/intentions/quotedStringDoubleSlash_after.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 173 | 2018-07-05T13:59:39.000Z | 2018-08-09T01:12:03.000Z | python/testData/intentions/quotedStringDoubleSlash_after.py | Cyril-lamirand/intellij-community | 60ab6c61b82fc761dd68363eca7d9d69663cfa39 | [
"Apache-2.0"
] | 2 | 2020-03-15T08:57:37.000Z | 2020-04-07T04:48:14.000Z | data_path = dirname(realpath(__file__)).replace("\\", '/') | 58 | 58 | 0.672414 |
6479a0308b3995ce53fc23a94f0f47e1afdd3615 | 3,846 | py | Python | usfm_references/__init__.py | anthonyraj/usfm-references | e0e2cc804545b029df55f9780c1361a8a2702f9c | [
"MIT"
] | null | null | null | usfm_references/__init__.py | anthonyraj/usfm-references | e0e2cc804545b029df55f9780c1361a8a2702f9c | [
"MIT"
] | null | null | null | usfm_references/__init__.py | anthonyraj/usfm-references | e0e2cc804545b029df55f9780c1361a8a2702f9c | [
"MIT"
] | null | null | null | """
USFM References Tools
"""
import re
__version__ = '1.1.0'
ANY_REF = re.compile(r'^[1-9A-Z]{3}\.([0-9]{1,3}(_[0-9]+)?(\.[0-9]{1,3})?|INTRO\d+)$')
CHAPTER = re.compile(r'^[1-6A-Z]{3}\.[0-9]{1,3}(_[0-9]+)?$')
CHAPTER_OR_INTRO = re.compile(r'^[1-9A-Z]{3}\.([0-9]{1,3}(_[0-9]+)?|INTRO\d+)$')
SINGLE_CHAPTER_OR_VERSE = r... | 46.337349 | 99 | 0.606084 |
647a4c4839fcdf56e3e2a60854159ce82350a4e1 | 1,591 | py | Python | dataset/gla_vol_time_series/cumul_to_rates_rgi01regions.py | subond/ww_tvol_study | 6fbcae251015a7cd49220abbb054914266b3b4a1 | [
"MIT"
] | 20 | 2021-04-28T18:11:43.000Z | 2022-03-09T13:15:56.000Z | dataset/gla_vol_time_series/cumul_to_rates_rgi01regions.py | subond/ww_tvol_study | 6fbcae251015a7cd49220abbb054914266b3b4a1 | [
"MIT"
] | 4 | 2021-04-28T15:51:43.000Z | 2022-01-02T19:10:25.000Z | dataset/gla_vol_time_series/cumul_to_rates_rgi01regions.py | rhugonnet/ww_tvol_study | f29fc2fca358aa169f6b7cc790e6b6f9f8b55c6f | [
"MIT"
] | 9 | 2021-04-28T17:58:27.000Z | 2021-12-19T05:51:56.000Z | import os, sys
import pandas as pd
import numpy as np
import pyddem.tdem_tools as tt
# example to integrate the RGI-O1 cumulative time series into rates with time-varying glacier areas
# file with time-varying areas for RGI regions
fn_tarea = '/home/atom/data/inventory_products/RGI/tarea_zemp.csv'
# list of regional... | 40.794872 | 143 | 0.750471 |
647ae795ccb2eae73a4642206f65fa6ba9dc4abe | 375 | py | Python | wallarm_api/core/api/triggers_api.py | Neraverin/wallarm-api-python | a033cfee28b1648f6bb7d1e531f353929b5d41c1 | [
"Apache-2.0"
] | null | null | null | wallarm_api/core/api/triggers_api.py | Neraverin/wallarm-api-python | a033cfee28b1648f6bb7d1e531f353929b5d41c1 | [
"Apache-2.0"
] | null | null | null | wallarm_api/core/api/triggers_api.py | Neraverin/wallarm-api-python | a033cfee28b1648f6bb7d1e531f353929b5d41c1 | [
"Apache-2.0"
] | null | null | null | from wallarm_api.core.api.base_api import BaseApi
from wallarm_api.core.models.trigger import Triggers
| 37.5 | 69 | 0.696 |
647b7f76abf9d66cbd9622be1caf548a048a1b6b | 534 | py | Python | kokki/cookbooks/gearmand/metadata.py | samuel/kokki | da98da55e0bba8db5bda993666a43c6fdc4cacdb | [
"BSD-3-Clause"
] | 11 | 2015-01-14T00:43:26.000Z | 2020-12-29T06:12:51.000Z | kokki/cookbooks/gearmand/metadata.py | samuel/kokki | da98da55e0bba8db5bda993666a43c6fdc4cacdb | [
"BSD-3-Clause"
] | null | null | null | kokki/cookbooks/gearmand/metadata.py | samuel/kokki | da98da55e0bba8db5bda993666a43c6fdc4cacdb | [
"BSD-3-Clause"
] | 3 | 2015-01-14T01:05:56.000Z | 2019-01-26T05:09:37.000Z |
__description__ = "Gearman RPC broker"
__config__ = {
"gearmand.listen_address": dict(
description = "IP address to bind to",
default = "127.0.0.1",
),
"gearmand.user": dict(
display_name = "Gearmand user",
description = "User to run the gearmand procses as",
default... | 28.105263 | 60 | 0.593633 |
647b873dcc7cc9f8ebf1215e9427968dfcb02031 | 1,751 | py | Python | class0/pil.py | dapianzi/tf_start | b6dc85c4c06c65ff892f6eb19aceb09fffc676a9 | [
"MIT"
] | null | null | null | class0/pil.py | dapianzi/tf_start | b6dc85c4c06c65ff892f6eb19aceb09fffc676a9 | [
"MIT"
] | null | null | null | class0/pil.py | dapianzi/tf_start | b6dc85c4c06c65ff892f6eb19aceb09fffc676a9 | [
"MIT"
] | null | null | null | from PIL import Image
from matplotlib import pyplot as plt
import numpy as np
names = locals()
img0 = Image.open("./assets/pyCharm.png")
# print image info:
print(img0.size, img0.format, img0.mode, np.array(img0))
# save other format
# img0.save('./assets/pyCharm.tiff')
# img0.convert('RGB').save('./assets/pyCharm.jp... | 26.134328 | 102 | 0.672758 |
647eebf2afa85364fe3d780d7873a3f80debbdc1 | 2,123 | py | Python | rpython/jit/backend/x86/codebuf.py | kantai/passe-pypy-taint-tracking | b60a3663f8fe89892dc182c8497aab97e2e75d69 | [
"MIT"
] | 2 | 2016-07-06T23:30:20.000Z | 2017-05-30T15:59:31.000Z | rpython/jit/backend/x86/codebuf.py | kantai/passe-pypy-taint-tracking | b60a3663f8fe89892dc182c8497aab97e2e75d69 | [
"MIT"
] | null | null | null | rpython/jit/backend/x86/codebuf.py | kantai/passe-pypy-taint-tracking | b60a3663f8fe89892dc182c8497aab97e2e75d69 | [
"MIT"
] | 2 | 2020-07-09T08:14:22.000Z | 2021-01-15T18:01:25.000Z | from rpython.rtyper.lltypesystem import lltype, rffi
from rpython.rlib.rarithmetic import intmask
from rpython.rlib.debug import debug_start, debug_print, debug_stop
from rpython.rlib.debug import have_debug_prints
from rpython.jit.backend.llsupport.asmmemmgr import BlockBuilderMixin
from rpython.jit.backend.x86.rx86 i... | 38.6 | 81 | 0.676401 |
647f046c31c221244ebc2df5f266fb6c4c36a234 | 223 | py | Python | apps/integrations/github/resources/__init__.py | wizzzet/github_backend | 9e4b5d3273e850e4ac0f425d22911987be7a7eff | [
"MIT"
] | null | null | null | apps/integrations/github/resources/__init__.py | wizzzet/github_backend | 9e4b5d3273e850e4ac0f425d22911987be7a7eff | [
"MIT"
] | null | null | null | apps/integrations/github/resources/__init__.py | wizzzet/github_backend | 9e4b5d3273e850e4ac0f425d22911987be7a7eff | [
"MIT"
] | null | null | null | from .users import UsersListResource # NOQA
from .users import UserResource # NOQA
from .followers import FollowersListResource # NOQA
from .repos import ReposListResource # NOQA
from .repos import RepoResource # NOQA
| 37.166667 | 52 | 0.798206 |
647fa64e5f63de84b7eadfe651862d2472378acf | 1,590 | py | Python | 2019/day03/day03_part1.py | boffman/adventofcode | 077e727b9b050c1fc5cb99ed7fbd64c5a69d9605 | [
"MIT"
] | null | null | null | 2019/day03/day03_part1.py | boffman/adventofcode | 077e727b9b050c1fc5cb99ed7fbd64c5a69d9605 | [
"MIT"
] | null | null | null | 2019/day03/day03_part1.py | boffman/adventofcode | 077e727b9b050c1fc5cb99ed7fbd64c5a69d9605 | [
"MIT"
] | null | null | null | import math
maze1 = set()
maze2 = set()
with open("input") as infile:
moves1 = infile.readline().strip().split(",")
apply_moves(moves1, maze1)
moves2 = infile.readline().strip().split(",")
apply_moves(moves2, maze2)
merge_maze = maze1 & maze2
distance = find_smallest_distance(merge_maze)
print(dist... | 26.949153 | 73 | 0.573585 |
64806f65878c18d62b19689145b457942a25bb91 | 1,991 | py | Python | server/src/weaverbird/pipeline/steps/aggregate.py | JeremyJacquemont/weaverbird | e04ab6f9c8381986ab71078e5199ece7a875e743 | [
"BSD-3-Clause"
] | 54 | 2019-11-20T15:07:39.000Z | 2022-03-24T22:13:51.000Z | server/src/weaverbird/pipeline/steps/aggregate.py | JeremyJacquemont/weaverbird | e04ab6f9c8381986ab71078e5199ece7a875e743 | [
"BSD-3-Clause"
] | 786 | 2019-10-20T11:48:37.000Z | 2022-03-23T08:58:18.000Z | server/src/weaverbird/pipeline/steps/aggregate.py | JeremyJacquemont/weaverbird | e04ab6f9c8381986ab71078e5199ece7a875e743 | [
"BSD-3-Clause"
] | 10 | 2019-11-21T10:16:16.000Z | 2022-03-21T10:34:06.000Z | from typing import List, Literal, Optional, Sequence
from pydantic import Field, root_validator, validator
from pydantic.main import BaseModel
from weaverbird.pipeline.steps.utils.base import BaseStep
from weaverbird.pipeline.steps.utils.render_variables import StepWithVariablesMixin
from weaverbird.pipeline.steps.ut... | 29.279412 | 92 | 0.721748 |
64818116878cb9d102e8939921e2cfcabcbe47ce | 23,929 | py | Python | src/ea/libs/FileModels/TestUnit.py | dmachard/extensivetesting | a5c3d2648aebcfaf1d0352a7aff8728ab843b73f | [
"MIT"
] | 9 | 2019-09-01T04:56:28.000Z | 2021-04-08T19:45:52.000Z | src/ea/libs/FileModels/TestUnit.py | dmachard/extensivetesting | a5c3d2648aebcfaf1d0352a7aff8728ab843b73f | [
"MIT"
] | 5 | 2020-10-27T15:05:12.000Z | 2021-12-13T13:48:11.000Z | src/ea/libs/FileModels/TestUnit.py | dmachard/extensivetesting | a5c3d2648aebcfaf1d0352a7aff8728ab843b73f | [
"MIT"
] | 2 | 2019-10-01T06:12:06.000Z | 2020-04-29T13:28:20.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# -------------------------------------------------------------------
# Copyright (c) 2010-2021 Denis Machard
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# ... | 42.277385 | 108 | 0.426428 |
648561ff4edc4db1c644515ed643f5d862a173dc | 6,672 | py | Python | BenchmarkScripts/convert2panoptic.py | Skywalker666666/scannet_dataset_prep | 0cda8c360512eda8c2ade892c5f23ed21320cc69 | [
"MIT"
] | null | null | null | BenchmarkScripts/convert2panoptic.py | Skywalker666666/scannet_dataset_prep | 0cda8c360512eda8c2ade892c5f23ed21320cc69 | [
"MIT"
] | null | null | null | BenchmarkScripts/convert2panoptic.py | Skywalker666666/scannet_dataset_prep | 0cda8c360512eda8c2ade892c5f23ed21320cc69 | [
"MIT"
] | null | null | null | #!/usr/bin/python
#
# Convert to COCO-style panoptic segmentation format (http://cocodataset.org/#format-data).
#
# python imports
from __future__ import print_function, absolute_import, division, unicode_literals
import os
import glob
import sys
import argparse
import json
import numpy as np
# Image processing
from ... | 38.566474 | 348 | 0.561451 |
6485fec3abdcd71b449dc07dfd6e24085b4ec88d | 19,281 | py | Python | tlmshop/settings.py | LegionMarket/django-cms-base | 1b6fc3423e3d0b2165552cc980432befb496f3e0 | [
"BSD-3-Clause"
] | null | null | null | tlmshop/settings.py | LegionMarket/django-cms-base | 1b6fc3423e3d0b2165552cc980432befb496f3e0 | [
"BSD-3-Clause"
] | null | null | null | tlmshop/settings.py | LegionMarket/django-cms-base | 1b6fc3423e3d0b2165552cc980432befb496f3e0 | [
"BSD-3-Clause"
] | null | null | null | """
Django settings for this project.
Generated by 'django-admin startproject' using Django 1.10.7.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import os
f... | 29.213636 | 119 | 0.64478 |
64867655df53ae53f42648b7a2d27b6c674ce9c1 | 272 | py | Python | examples/02-hello_kml.py | JMSchietekat/polycircles | 26f46bb77c234ac0aec756131f599f1651a559da | [
"MIT"
] | 9 | 2016-07-04T08:57:57.000Z | 2021-04-30T16:02:12.000Z | examples/02-hello_kml.py | JMSchietekat/polycircles | 26f46bb77c234ac0aec756131f599f1651a559da | [
"MIT"
] | 11 | 2016-06-30T19:36:24.000Z | 2021-12-04T21:20:23.000Z | examples/02-hello_kml.py | JMSchietekat/polycircles | 26f46bb77c234ac0aec756131f599f1651a559da | [
"MIT"
] | 7 | 2015-11-15T02:38:38.000Z | 2021-12-04T09:16:49.000Z | import os
import simplekml
from polycircles.polycircles import Polycircle
polycircle = Polycircle(latitude=31.611878, longitude=34.505351, radius=100)
kml = simplekml.Kml()
pol = kml.newpolygon(name=f"Polycircle", outerboundaryis=polycircle.to_kml())
kml.save('02.kml') | 27.2 | 77 | 0.794118 |
6486e28543122cc731938867a4ab44ae1ac8a42a | 5,579 | py | Python | amazon_main_xgboost.py | twankim/ensemble_amazon | 9019d8dcdfa3651b374e0216cc310255c2d660aa | [
"Apache-2.0"
] | 236 | 2016-04-08T01:49:46.000Z | 2021-08-16T21:27:34.000Z | amazon_main_xgboost.py | twankim/ensemble_amazon | 9019d8dcdfa3651b374e0216cc310255c2d660aa | [
"Apache-2.0"
] | 1 | 2017-07-09T10:35:01.000Z | 2017-07-09T10:55:19.000Z | amazon_main_xgboost.py | kaz-Anova/ensemble_amazon | 9019d8dcdfa3651b374e0216cc310255c2d660aa | [
"Apache-2.0"
] | 87 | 2016-04-08T05:13:44.000Z | 2022-02-02T14:46:51.000Z | """ Amazon Access Challenge Code for ensemble
Marios Michaildis script for Amazon .
xgboost on input data
based on Paul Duan's Script.
"""
from __future_
_ import division
import numpy as np
from sklearn import preprocessing
from sklearn.metrics import roc_auc_score
import XGBoostClassifier as xg
from sklearn.cros... | 35.535032 | 133 | 0.639003 |
64875676b96c2647ed1948f84397285ec47bff0c | 4,289 | py | Python | venv/lib/python3.6/site-packages/ansible/modules/set_fact.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 1 | 2020-01-22T13:11:23.000Z | 2020-01-22T13:11:23.000Z | venv/lib/python3.6/site-packages/ansible/modules/set_fact.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | 12 | 2020-02-21T07:24:52.000Z | 2020-04-14T09:54:32.000Z | venv/lib/python3.6/site-packages/ansible/modules/set_fact.py | usegalaxy-no/usegalaxy | 75dad095769fe918eb39677f2c887e681a747f3a | [
"MIT"
] | null | null | null | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2013, Dag Wieers (@dagwieers) <dag@wieers.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
DOCUMENTATION = r'''
---
module... | 47.655556 | 144 | 0.726743 |
64882886d4f3bd8190f93a2bc8758ff2dad50669 | 7,114 | py | Python | general/general_app_for_company/general_ledger.py | surajano/general | 82157f61f7686aceeb6ff108474faa060463b9c2 | [
"MIT"
] | null | null | null | general/general_app_for_company/general_ledger.py | surajano/general | 82157f61f7686aceeb6ff108474faa060463b9c2 | [
"MIT"
] | null | null | null | general/general_app_for_company/general_ledger.py | surajano/general | 82157f61f7686aceeb6ff108474faa060463b9c2 | [
"MIT"
] | null | null | null | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import flt, cstr, cint
from frappe import _
from frappe.model.meta import get_field_precision
from erpnext.accounts.util... | 39.303867 | 132 | 0.758645 |
648835b0871fa76f3d85b2a140f67b19860ce428 | 114 | py | Python | virgool_cloud/config-sample.py | mavahedinia/virgoolcloud | cef18e5dc85940d079c51552e8def158dff6ec88 | [
"MIT"
] | 1 | 2018-03-27T15:16:12.000Z | 2018-03-27T15:16:12.000Z | virgool_cloud/config-sample.py | Mr0Null/virgoolcloud | cef18e5dc85940d079c51552e8def158dff6ec88 | [
"MIT"
] | 4 | 2021-03-18T20:18:20.000Z | 2022-03-11T23:14:34.000Z | virgool_cloud/config-sample.py | mavahedinia/virgoolcloud | cef18e5dc85940d079c51552e8def158dff6ec88 | [
"MIT"
] | null | null | null | bot_token = ''
waiting_timeout = 5 # Seconds
admin_id = ""
channel_id = ""
bitly_access_token = ""
vars_file = ""
| 16.285714 | 29 | 0.675439 |
6488eb36f073b4226b997654ad44ca0cfd79c48b | 5,425 | py | Python | src/runs/step321_pulmonary_summary.py | uw-bionlp/ards | e9fc27f7034cc6b54f0ccdba4a58377948cf0258 | [
"BSD-3-Clause"
] | null | null | null | src/runs/step321_pulmonary_summary.py | uw-bionlp/ards | e9fc27f7034cc6b54f0ccdba4a58377948cf0258 | [
"BSD-3-Clause"
] | null | null | null | src/runs/step321_pulmonary_summary.py | uw-bionlp/ards | e9fc27f7034cc6b54f0ccdba4a58377948cf0258 | [
"BSD-3-Clause"
] | null | null | null |
from __future__ import division, print_function, unicode_literals
from sacred import Experiment
from sacred.observers import FileStorageObserver
from pathlib import Path
import os
import re
import numpy as np
import json
import joblib
import pandas as pd
from collections import Counter, OrderedDict
import logging
fro... | 26.99005 | 163 | 0.627281 |
648989e670d245b0f41026c6263b79ce124e9e03 | 3,811 | py | Python | pydanmaku_old/game.py | Alokpro1/PyDanmaku | 7c33252774c07c99216fc4e7ac957e9fe27101d1 | [
"MIT"
] | null | null | null | pydanmaku_old/game.py | Alokpro1/PyDanmaku | 7c33252774c07c99216fc4e7ac957e9fe27101d1 | [
"MIT"
] | null | null | null | pydanmaku_old/game.py | Alokpro1/PyDanmaku | 7c33252774c07c99216fc4e7ac957e9fe27101d1 | [
"MIT"
] | null | null | null | import pygame
import inspect
from .bullet import Bullet
from .player import Player
PRESSED = {
pygame.K_UP: 'up',
pygame.K_DOWN: 'down',
pygame.K_LEFT: 'left',
pygame.K_RIGHT: 'right',
}
DOWN = {
pygame.K_LSHIFT: 'shift',
}
UP = {
pygame.K_LSHIFT: 'unshift',
}
| 27.417266 | 108 | 0.504067 |
648a55e4d03e0a1260cec1b579e77e89a43b04dd | 4,040 | py | Python | inz/tests/test_utils.py | matbur/inz | f6be1a685761f99f8c808d8b23f58debf7e19da2 | [
"MIT"
] | null | null | null | inz/tests/test_utils.py | matbur/inz | f6be1a685761f99f8c808d8b23f58debf7e19da2 | [
"MIT"
] | 2 | 2020-03-24T16:35:39.000Z | 2020-03-31T00:33:08.000Z | inz/tests/test_utils.py | matbur/inz | f6be1a685761f99f8c808d8b23f58debf7e19da2 | [
"MIT"
] | null | null | null | import numpy as np
import pandas as pd
import pytest
from sklearn.feature_selection import SelectKBest, chi2 as sk_chi2
from inz.utils import chi2, select_k_best, split, train_test_split
if __name__ == '__main__':
pytest.main()
| 25.56962 | 69 | 0.576733 |
648a6781dfe93e87fceccd3d76deb550de9b06e9 | 7,572 | py | Python | Library/Database.py | kensand/HonorsProject | 219b9b448a41c74f17f89319ef1550878d77e6e0 | [
"Apache-2.0"
] | null | null | null | Library/Database.py | kensand/HonorsProject | 219b9b448a41c74f17f89319ef1550878d77e6e0 | [
"Apache-2.0"
] | null | null | null | Library/Database.py | kensand/HonorsProject | 219b9b448a41c74f17f89319ef1550878d77e6e0 | [
"Apache-2.0"
] | null | null | null | import psycopg2
batch_size = 10000
embedding_length=256
#These are the default database settings, and assumes the tweets, tweets_hashtags, and hashtags tables are in the public schema.
# default database information
Dbname = 'postgres'
User = 'kenny'
Host = 'localhost'
Password = 'honorsproject2017'
# default tabl... | 46.740741 | 354 | 0.67261 |
648b8ff35a770ae66532b53431befbafd6fbde8c | 3,596 | py | Python | train.py | TaoHuUMD/3D-Reconstruction | 8f3648ee5e6506d7aa04c20e0a7bfe84534e8cb1 | [
"MIT"
] | null | null | null | train.py | TaoHuUMD/3D-Reconstruction | 8f3648ee5e6506d7aa04c20e0a7bfe84534e8cb1 | [
"MIT"
] | null | null | null | train.py | TaoHuUMD/3D-Reconstruction | 8f3648ee5e6506d7aa04c20e0a7bfe84534e8cb1 | [
"MIT"
] | null | null | null | import time
import open3d
from options.train_options import TrainOptions
from data import CreateDataLoader
from models import create_model
from util.visualizer import Visualizer
from config import *
import os
from torch.utils.tensorboard import SummaryWriter
if __name__ == '__main__':
opt = TrainOptions().parse()... | 33.924528 | 112 | 0.598443 |
648c2c20bd854f69e485a8cf34eeda1f41447e10 | 9,434 | py | Python | tests/contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/test_michelson_coding_KT1BDM.py | juztin/pytezos-1 | 7e608ff599d934bdcf129e47db43dbdb8fef9027 | [
"MIT"
] | 1 | 2020-08-11T02:31:24.000Z | 2020-08-11T02:31:24.000Z | tests/contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/test_michelson_coding_KT1BDM.py | juztin/pytezos-1 | 7e608ff599d934bdcf129e47db43dbdb8fef9027 | [
"MIT"
] | 1 | 2020-12-30T16:44:56.000Z | 2020-12-30T16:44:56.000Z | tests/contracts/KT1BDMQEhMATgVAcwtgqNgZNBM6LEM1PANuM/test_michelson_coding_KT1BDM.py | tqtezos/pytezos | a4ac0b022d35d4c9f3062609d8ce09d584b5faa8 | [
"MIT"
] | 1 | 2022-03-20T19:01:00.000Z | 2022-03-20T19:01:00.000Z | from unittest import TestCase
from tests import get_data
from pytezos.michelson.micheline import michelson_to_micheline
from pytezos.michelson.formatter import micheline_to_michelson
| 46.935323 | 89 | 0.734683 |
648c4346d07df4969891123c667fe653aca75a7c | 2,310 | py | Python | kmeans/dbscan.py | kravtsun/au-ml | a9e354c14d4df8d1e4569e7f6cfa2fdad060522f | [
"MIT"
] | null | null | null | kmeans/dbscan.py | kravtsun/au-ml | a9e354c14d4df8d1e4569e7f6cfa2fdad060522f | [
"MIT"
] | null | null | null | kmeans/dbscan.py | kravtsun/au-ml | a9e354c14d4df8d1e4569e7f6cfa2fdad060522f | [
"MIT"
] | null | null | null | #!/bin/python
import argparse
import numpy as np
from cluster import read_csv, plot_clusters, distance, print_cluster_distribution
if __name__ == '__main__':
parser = argparse.ArgumentParser(description="run k-means clusterization with given arguments")
parser.add_argument("-f", dest="filename", type=str, requ... | 33.970588 | 103 | 0.619913 |
648e30761d7e3ede29079ce9d0cd99b661034fad | 527 | py | Python | harness.py | vmchale/phash-fut | 941dfc891077253ff550d16438b3b416c1d6b1c4 | [
"BSD-3-Clause"
] | 2 | 2020-01-04T23:10:15.000Z | 2020-01-05T12:51:03.000Z | harness.py | vmchale/phash-fut | 941dfc891077253ff550d16438b3b416c1d6b1c4 | [
"BSD-3-Clause"
] | null | null | null | harness.py | vmchale/phash-fut | 941dfc891077253ff550d16438b3b416c1d6b1c4 | [
"BSD-3-Clause"
] | 1 | 2020-02-05T09:22:26.000Z | 2020-02-05T09:22:26.000Z | import timeit
setup = """
import phash
import imageio
import numpy as np
mod = phash.phash()
"""
read_image = """
img0 = np.array(imageio.imread('data/frog.jpeg', pilmode='F'))
mod.img_hash_f32(img0)
"""
print('data/frog.jpeg', timeit.timeit(read_image, setup=setup, number=100) * 10, "ms")
setup_imagehash = """
fr... | 18.821429 | 96 | 0.70019 |
648fa6c89a991e12d29d38c835dfac9b5c5c7d52 | 13,798 | py | Python | simopt/models/san.py | simopt-admin/simopt | 5119c605305699dce9e0c44e0b8b68e23e77c02f | [
"MIT"
] | 24 | 2020-01-06T17:21:10.000Z | 2022-03-08T16:36:29.000Z | simopt/models/san.py | simopt-admin/simopt | 5119c605305699dce9e0c44e0b8b68e23e77c02f | [
"MIT"
] | 4 | 2020-02-20T18:59:41.000Z | 2020-10-18T22:28:29.000Z | simopt/models/san.py | simopt-admin/simopt | 5119c605305699dce9e0c44e0b8b68e23e77c02f | [
"MIT"
] | 8 | 2020-02-13T18:37:48.000Z | 2021-12-15T08:27:33.000Z | """
Summary
-------
Simulate duration of stochastic activity network (SAN).
"""
import numpy as np
from base import Model, Problem
"""
Summary
-------
Minimize the duration of the longest path from a to i plus cost.
"""
| 32.16317 | 126 | 0.567908 |
64904492fae611833b44081cd57a9959ef89af7d | 169 | py | Python | algorithms/da3c/__init__.py | j0k/relaax | dff865facc2932e4f8317d6ab4ad32a1f218e7b6 | [
"MIT"
] | 4 | 2018-07-31T06:32:30.000Z | 2021-05-02T20:21:37.000Z | algorithms/da3c_cont/__init__.py | bohblue2/relaax | 0a7ed8f2a21e37ca047e16d216d164527c1fffdd | [
"MIT"
] | null | null | null | algorithms/da3c_cont/__init__.py | bohblue2/relaax | 0a7ed8f2a21e37ca047e16d216d164527c1fffdd | [
"MIT"
] | null | null | null | from .common.config import Config
from .parameter_server.parameter_server import ParameterServer
from .agent.agent import Agent
from .bridge.bridge import BridgeControl
| 33.8 | 62 | 0.857988 |
6491da520089ccd407f5b9a996b24d12d4cf98c1 | 1,223 | py | Python | examples/simple-box.py | renovate-tests/gaphas | 388ee28b573fdb67e246bb9e66ff02b5afcf8204 | [
"Apache-2.0"
] | null | null | null | examples/simple-box.py | renovate-tests/gaphas | 388ee28b573fdb67e246bb9e66ff02b5afcf8204 | [
"Apache-2.0"
] | null | null | null | examples/simple-box.py | renovate-tests/gaphas | 388ee28b573fdb67e246bb9e66ff02b5afcf8204 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
"""A simple example containing two boxes and a line.
"""
import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk
from gaphas import Canvas, GtkView
from gaphas.examples import Box
from gaphas.painter import DefaultPainter
from gaphas.item import Line
from gaphas.segment import ... | 22.648148 | 61 | 0.673753 |
649222f97f73f123281635bb2c3d36c6e7dafb0b | 2,574 | py | Python | 09_NNI/files/nni_xgb.py | aiq2020-tw/automl-notebooks | 689a494b3614d8a17d62e9b8713c97c54976e796 | [
"MIT"
] | 17 | 2021-07-07T02:04:47.000Z | 2022-03-24T17:42:00.000Z | 09_NNI/files/nni_xgb.py | aiq2020-tw/automl-notebooks | 689a494b3614d8a17d62e9b8713c97c54976e796 | [
"MIT"
] | null | null | null | 09_NNI/files/nni_xgb.py | aiq2020-tw/automl-notebooks | 689a494b3614d8a17d62e9b8713c97c54976e796 | [
"MIT"
] | 1 | 2021-11-29T04:32:13.000Z | 2021-11-29T04:32:13.000Z | # NNI
import nni
import pandas as pd
import xgboost as xgb
from sklearn.model_selection import KFold, cross_val_score
from sklearn.preprocessing import LabelEncoder
def load_data(train_file_path):
"""
Parameters
----------
train_file_path : str
Returns
-------
... | 24.75 | 71 | 0.590909 |
6492ff76f8b02098a203441a7f17d6b324cf4767 | 22,255 | py | Python | parsetab.py | Hebbarkh/ScientificCalculator | 35e7c547b2cfebb8b8f6a7b090a43973abef5a0b | [
"Apache-2.0"
] | 1 | 2018-07-14T23:16:56.000Z | 2018-07-14T23:16:56.000Z | parsetab.py | Hebbarkh/ScientificCalculator | 35e7c547b2cfebb8b8f6a7b090a43973abef5a0b | [
"Apache-2.0"
] | null | null | null | parsetab.py | Hebbarkh/ScientificCalculator | 35e7c547b2cfebb8b8f6a7b090a43973abef5a0b | [
"Apache-2.0"
] | null | null | null |
# parsetab.py
# This file is automatically generated. Do not edit.
_tabversion = '3.5'
_lr_method = 'LALR'
_lr_signature = '5E2BB3531AA676A6BB1D06733251B2F3'
_lr_action_items = {'COS':([0,1,2,3,4,5,7,8,9,11,12,13,14,15,16,17,18,20,22,23,26,27,29,30,32,33,34,35,36,37,38,39,40,42,43,44,45,46,47,48,49,50,51,52,53,... | 271.402439 | 16,810 | 0.608268 |
649457b8032d8db424acfcf9fd15600116f0ed28 | 526 | py | Python | tests/data.py | biologic/stylus | ae642bbb7e2205bab1ab1b4703ea037e996e13db | [
"Apache-2.0"
] | null | null | null | tests/data.py | biologic/stylus | ae642bbb7e2205bab1ab1b4703ea037e996e13db | [
"Apache-2.0"
] | null | null | null | tests/data.py | biologic/stylus | ae642bbb7e2205bab1ab1b4703ea037e996e13db | [
"Apache-2.0"
] | null | null | null | # The following is a list of gene-plan combinations which should
# not be run
BLACKLIST = [
('8C58', 'performance'), # performance.xml make specific references to 52DC
('7DDA', 'performance') # performance.xml make specific references to 52DC
]
IGNORE = {
'history' : ['uuid', 'creationTool', 'creationD... | 35.066667 | 79 | 0.657795 |
64946af2634bec93cc261bffb1f1c3c754ac3109 | 2,015 | py | Python | hidtcore.py | zengxinzhy/HiDT | 3a223d727e6888dfcdfd5e81bd83df428d3a5596 | [
"BSD-3-Clause"
] | null | null | null | hidtcore.py | zengxinzhy/HiDT | 3a223d727e6888dfcdfd5e81bd83df428d3a5596 | [
"BSD-3-Clause"
] | null | null | null | hidtcore.py | zengxinzhy/HiDT | 3a223d727e6888dfcdfd5e81bd83df428d3a5596 | [
"BSD-3-Clause"
] | null | null | null | import torch
import sys
import coremltools as ct
from hidt.style_transformer import StyleTransformer
from ops import inference_size
sys.path.append('./HiDT')
if __name__ == '__main__':
image = torch.zeros(1, 3, 256, 452)
style_to_transfer = torch.zeros(3)
model = HiDT()
model.eval()
for param i... | 36.636364 | 79 | 0.655087 |
64949bbe3dc54542a6bf1cf20073d7801df0a497 | 295 | py | Python | prm/relations/migrations/0010_delete_mood.py | justaname94/innovathon2019 | d1a4e9b1b877ba12ab23384b9ee098fcdbf363af | [
"MIT"
] | null | null | null | prm/relations/migrations/0010_delete_mood.py | justaname94/innovathon2019 | d1a4e9b1b877ba12ab23384b9ee098fcdbf363af | [
"MIT"
] | 4 | 2021-06-08T20:20:05.000Z | 2022-03-11T23:58:37.000Z | prm/relations/migrations/0010_delete_mood.py | justaname94/personal_crm | d1a4e9b1b877ba12ab23384b9ee098fcdbf363af | [
"MIT"
] | null | null | null | # Generated by Django 2.2.6 on 2019-10-03 23:37
from django.db import migrations
| 17.352941 | 49 | 0.60339 |
6494d7e235268c91bde539243623f44dd265dd50 | 962 | py | Python | tests/fake_websocket_server.py | UrbanOS-Examples/PredictiveParking | 778acb68a0c8be78655d38698ab68f1c1b47cbc5 | [
"Apache-2.0"
] | 2 | 2021-03-29T03:36:32.000Z | 2021-07-01T16:51:18.000Z | tests/fake_websocket_server.py | UrbanOS-Examples/PredictiveParking | 778acb68a0c8be78655d38698ab68f1c1b47cbc5 | [
"Apache-2.0"
] | null | null | null | tests/fake_websocket_server.py | UrbanOS-Examples/PredictiveParking | 778acb68a0c8be78655d38698ab68f1c1b47cbc5 | [
"Apache-2.0"
] | 1 | 2022-01-28T15:56:00.000Z | 2022-01-28T15:56:00.000Z | import json
| 21.377778 | 63 | 0.591476 |
6495674227e2d4f327739dbc79ec0dbe607aeede | 189 | py | Python | simplepush/__init__.py | bobquest33/django-simplepush | af53ba086e51976a346e7741cb101c509ca9de0f | [
"BSD-3-Clause"
] | 1 | 2021-07-30T21:00:49.000Z | 2021-07-30T21:00:49.000Z | simplepush/__init__.py | bobquest33/django-simplepush | af53ba086e51976a346e7741cb101c509ca9de0f | [
"BSD-3-Clause"
] | null | null | null | simplepush/__init__.py | bobquest33/django-simplepush | af53ba086e51976a346e7741cb101c509ca9de0f | [
"BSD-3-Clause"
] | null | null | null | import json
from .helpers import send_notification_to_user
| 23.625 | 49 | 0.814815 |
64968402e2034f893d17334b1fc6d1f4e99dc264 | 24,885 | py | Python | goalrepresent/models/lenia_BC/pytorchnnrepresentation/helper.py | flowersteam/holmes | e38fb8417ec56cfde8142eddd0f751e319e35d8c | [
"MIT"
] | 6 | 2020-12-19T00:16:16.000Z | 2022-01-28T14:59:21.000Z | goalrepresent/models/lenia_BC/pytorchnnrepresentation/helper.py | Evolutionary-Intelligence/holmes | e38fb8417ec56cfde8142eddd0f751e319e35d8c | [
"MIT"
] | null | null | null | goalrepresent/models/lenia_BC/pytorchnnrepresentation/helper.py | Evolutionary-Intelligence/holmes | e38fb8417ec56cfde8142eddd0f751e319e35d8c | [
"MIT"
] | 1 | 2021-05-24T14:58:26.000Z | 2021-05-24T14:58:26.000Z | import math
from math import floor
from numbers import Number
import h5py
import numpy as np
import torch
from torch import nn
from torch.nn import functional as F
from torch.nn.init import xavier_uniform_, xavier_normal_, kaiming_uniform_, kaiming_normal_
from torch.utils.data import Dataset
from torchvision.transfor... | 40.929276 | 278 | 0.594937 |
649691d5c0e82103d6071fa1fc077a9de68296e7 | 874 | py | Python | 100_days_of_code/Intermediate+/day_32/practice/main.py | Tiago-S-Ribeiro/Python-Pro-Bootcamp | 20a82443fe2e6ee9040ecd9a03853e6c6346592c | [
"MIT"
] | null | null | null | 100_days_of_code/Intermediate+/day_32/practice/main.py | Tiago-S-Ribeiro/Python-Pro-Bootcamp | 20a82443fe2e6ee9040ecd9a03853e6c6346592c | [
"MIT"
] | null | null | null | 100_days_of_code/Intermediate+/day_32/practice/main.py | Tiago-S-Ribeiro/Python-Pro-Bootcamp | 20a82443fe2e6ee9040ecd9a03853e6c6346592c | [
"MIT"
] | null | null | null | import smtplib
import random
import datetime as dt
from data import EML, PWD, DST, HOST_SERVER
if dt.datetime.now().weekday() == 0: #Monday
try:
with open("./quotes.txt") as file:
quotes = file.readlines()
except FileNotFoundError:
print("File not found. Please provide a valid file ... | 38 | 118 | 0.644165 |
64969f5fe7755132d49c138a9918dfb740289d3c | 7,870 | py | Python | tenant_workspace/templatetags/qt_066_tag.py | smegurus/smegurus-django | 053973b5ff0b997c52bfaca8daf8e07db64a877c | [
"BSD-4-Clause"
] | 1 | 2020-07-16T10:58:23.000Z | 2020-07-16T10:58:23.000Z | tenant_workspace/templatetags/qt_066_tag.py | smegurus/smegurus-django | 053973b5ff0b997c52bfaca8daf8e07db64a877c | [
"BSD-4-Clause"
] | 13 | 2018-11-30T02:29:39.000Z | 2022-03-11T23:35:49.000Z | tenant_workspace/templatetags/qt_066_tag.py | smegurus/smegurus-django | 053973b5ff0b997c52bfaca8daf8e07db64a877c | [
"BSD-4-Clause"
] | null | null | null | # -*- coding: utf-8 -*-
from django import template
from django.db.models import Q
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from django.utils.translation import ugettext_lazy as _
from django.shortcuts import get_object_or_404
from foundation_tenant.utils import int_or_no... | 30.862745 | 134 | 0.634943 |
6496baa59497d45ed96cfa1160da34e1c8492c6a | 2,087 | py | Python | octavia_f5/common/constants.py | notandy/octavia-f5-provider-driver | 29b33e55c369561a50791fd4f923ff3b10081759 | [
"Apache-2.0"
] | null | null | null | octavia_f5/common/constants.py | notandy/octavia-f5-provider-driver | 29b33e55c369561a50791fd4f923ff3b10081759 | [
"Apache-2.0"
] | null | null | null | octavia_f5/common/constants.py | notandy/octavia-f5-provider-driver | 29b33e55c369561a50791fd4f923ff3b10081759 | [
"Apache-2.0"
] | null | null | null | # Copyright 2018 SAP SE
#
# 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, software
... | 30.246377 | 75 | 0.729276 |
6496e3a04cad8fb52d2bf8ff8057483c20f1efdb | 1,788 | py | Python | tests/loris/parameters/api_tests.py | jpstroop/loris-redux | b5db56d5a250fdb24486afe01bad55b81761701a | [
"BSD-2-Clause"
] | 7 | 2016-08-09T17:39:05.000Z | 2016-09-26T19:37:30.000Z | tests/loris/parameters/api_tests.py | jpstroop/loris-redux | b5db56d5a250fdb24486afe01bad55b81761701a | [
"BSD-2-Clause"
] | 183 | 2016-06-02T22:07:05.000Z | 2022-03-11T23:23:01.000Z | tests/loris/parameters/api_tests.py | jpstroop/loris-redux | b5db56d5a250fdb24486afe01bad55b81761701a | [
"BSD-2-Clause"
] | 1 | 2016-08-09T17:39:11.000Z | 2016-08-09T17:39:11.000Z | from loris.parameters.api import AbstractParameter
from unittest.mock import Mock
import pytest
| 32.509091 | 83 | 0.649888 |
6496f1be53aa281264d7e156cc9fc75b4d6f2857 | 1,119 | py | Python | examples/scripts/generate-big-event.py | Neloop/pcrf-traffic-generator | 9aaf336c747bbd3dcfb11625a9af65bdddd5291c | [
"MIT"
] | 5 | 2018-07-20T11:31:23.000Z | 2021-03-24T16:22:10.000Z | examples/scripts/generate-big-event.py | Neloop/pcrf-traffic-generator | 9aaf336c747bbd3dcfb11625a9af65bdddd5291c | [
"MIT"
] | 1 | 2021-12-14T20:50:52.000Z | 2021-12-14T20:50:52.000Z | examples/scripts/generate-big-event.py | Neloop/pcrf-traffic-generator | 9aaf336c747bbd3dcfb11625a9af65bdddd5291c | [
"MIT"
] | 4 | 2018-08-22T00:41:28.000Z | 2021-12-03T17:47:04.000Z | import utils
times = range(3, 147, 3);
call_center_list = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 100, 200, 500, 500, 500, 500, 500, 500, 300, 200, 600, 700, 800, 800, 800, 700, 500, 300, 100, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ];
classic_list = [ 5000, 3000, 2000, 1500, 1500, 1000, 1000, 800, 1000, 130... | 111.9 | 353 | 0.607685 |
6497af3ad4bf8548fe4f42285895e50ab7e9a15c | 3,992 | py | Python | 29_ticTacToeGame.py | hjlarrea/pythonExercises | f634489d181292bc51b4a4770b497c1f57e097d7 | [
"MIT"
] | null | null | null | 29_ticTacToeGame.py | hjlarrea/pythonExercises | f634489d181292bc51b4a4770b497c1f57e097d7 | [
"MIT"
] | null | null | null | 29_ticTacToeGame.py | hjlarrea/pythonExercises | f634489d181292bc51b4a4770b497c1f57e097d7 | [
"MIT"
] | null | null | null | #This exercise is Part 4 of 4 of the Tic Tac Toe exercise series. The other exercises are: Part 1, Part 2, and Part 3.
#
#In 3 previous exercises, we built up a few components needed to build a Tic Tac Toe game in Python:
#
# Draw the Tic Tac Toe game board
# Checking whether a game board has a winner
# Handle... | 36.290909 | 131 | 0.548347 |
6499166ff9e4140b4e105ce3ebf038b47555e332 | 2,149 | py | Python | rdr_server/model/site.py | robabram/raw-data-repository-v2 | a8e1a387d9ea3e4be3ec44473d026e3218f23509 | [
"BSD-3-Clause"
] | null | null | null | rdr_server/model/site.py | robabram/raw-data-repository-v2 | a8e1a387d9ea3e4be3ec44473d026e3218f23509 | [
"BSD-3-Clause"
] | 2 | 2021-02-08T20:31:00.000Z | 2021-04-30T20:44:44.000Z | rdr_server/model/site.py | robabram/raw-data-repository-v2 | a8e1a387d9ea3e4be3ec44473d026e3218f23509 | [
"BSD-3-Clause"
] | null | null | null | from rdr_server.common.enums import SiteStatus, EnrollingStatus, DigitalSchedulingStatus, ObsoleteStatus
from sqlalchemy import Column, Integer, String, Date, Float, ForeignKey, UnicodeText
from rdr_server.model.base_model import BaseModel, ModelMixin, ModelEnum
| 51.166667 | 104 | 0.731038 |
6499a0c1afe410276dc4e6cb49747784c3d9840c | 1,842 | py | Python | hacku/contents/models/contents.py | aleducode/hacku_backend | d70f303dcbcb3fecf5d4a47f20e9985846fc766c | [
"MIT"
] | 1 | 2021-09-15T19:22:18.000Z | 2021-09-15T19:22:18.000Z | hacku/contents/models/contents.py | alejandroduquec/hacku_backend | d70f303dcbcb3fecf5d4a47f20e9985846fc766c | [
"MIT"
] | null | null | null | hacku/contents/models/contents.py | alejandroduquec/hacku_backend | d70f303dcbcb3fecf5d4a47f20e9985846fc766c | [
"MIT"
] | 1 | 2021-09-15T19:24:34.000Z | 2021-09-15T19:24:34.000Z | """Contents Models."""
# Django
from django.db import models
from django.contrib.postgres.fields import JSONField
# utilities
from hacku.utils.models import HackuModel
| 20.696629 | 64 | 0.604235 |
649a993277a42a61a1570384faaec1b7bdd02010 | 2,096 | py | Python | passwd_validate/utils.py | clamytoe/Password-Validate | 3ce14ce0e3fa325dc578aaaf5e051e71d195f271 | [
"MIT"
] | 2 | 2018-07-08T17:36:59.000Z | 2018-10-19T22:51:33.000Z | passwd_validate/utils.py | clamytoe/Password-Validate | 3ce14ce0e3fa325dc578aaaf5e051e71d195f271 | [
"MIT"
] | 1 | 2018-05-16T00:25:42.000Z | 2018-05-16T00:25:42.000Z | passwd_validate/utils.py | clamytoe/Password-Validate | 3ce14ce0e3fa325dc578aaaf5e051e71d195f271 | [
"MIT"
] | 4 | 2018-04-18T18:18:40.000Z | 2018-09-26T16:33:54.000Z | # _*_ coding: utf-8 _*_
"""
password-validate.utils
-----------------------
This module provides utility functions that are used within password_validate
that are also useful for external consumption.
"""
import hashlib
from os.path import abspath, dirname, join
DICTIONARY_LOC = "dictionary_files"
DICTIONARY = "dicti... | 29.942857 | 79 | 0.656966 |
649b03207f4c323a4d1d709a72d7c801428bb675 | 8,129 | py | Python | downstream/finetune/eval.py | YihengZhang-CV/Sequence-Contrastive-Learning | f0b1b48731de808694e57da348e366df57dcd8c7 | [
"MIT"
] | 31 | 2020-12-14T13:58:34.000Z | 2022-03-24T02:43:32.000Z | downstream/finetune/eval.py | YihengZhang-CV/Sequence-Contrastive-Learning | f0b1b48731de808694e57da348e366df57dcd8c7 | [
"MIT"
] | 4 | 2021-02-26T08:46:39.000Z | 2022-03-26T06:57:25.000Z | downstream/finetune/eval.py | YihengZhang-CV/Sequence-Contrastive-Learning | f0b1b48731de808694e57da348e366df57dcd8c7 | [
"MIT"
] | 3 | 2021-02-02T12:54:54.000Z | 2022-01-17T06:48:31.000Z | import argparse
import os
import json
import torch
import torch.backends.cudnn as cudnn
import torch.distributed as dist
from torch.nn.parallel import DistributedDataParallel
from torchvision import transforms
from seco_util import clip_transforms
from seco_util.logger import setup_logger
from dataset.video_dataset i... | 40.849246 | 124 | 0.646697 |
649d5d0ba5bc8ab1592032b37368fffa67ba9234 | 2,260 | py | Python | notebooks/data_cleaning/track_meta.py | roannav/learntools | 355a5df6a66562de62254b723da1a9389b9acc49 | [
"Apache-2.0"
] | 359 | 2018-03-23T15:57:52.000Z | 2022-03-25T21:56:28.000Z | notebooks/data_cleaning/track_meta.py | roannav/learntools | 355a5df6a66562de62254b723da1a9389b9acc49 | [
"Apache-2.0"
] | 84 | 2018-06-14T00:06:52.000Z | 2022-02-08T17:25:54.000Z | notebooks/data_cleaning/track_meta.py | roannav/learntools | 355a5df6a66562de62254b723da1a9389b9acc49 | [
"Apache-2.0"
] | 213 | 2018-05-02T19:06:31.000Z | 2022-03-20T15:40:34.000Z | track = dict(
author_username='alexisbcook',
course_name='Data Cleaning',
course_url='https://www.kaggle.com/learn/data-cleaning',
course_forum_url='https://www.kaggle.com/learn-forum/172650'
)
lessons = [ {'topic': topic_name} for topic_name in
['Handling missing values', #1
... | 27.901235 | 87 | 0.55531 |
649ec842193e89960a242bc874436fa6915e1321 | 2,921 | py | Python | three_sum.py | jaebradley/leetcode.py | 64634cc7d0e975ddd163f35acb18cc92960b8eb5 | [
"MIT"
] | null | null | null | three_sum.py | jaebradley/leetcode.py | 64634cc7d0e975ddd163f35acb18cc92960b8eb5 | [
"MIT"
] | 2 | 2019-11-13T19:55:49.000Z | 2019-11-13T19:55:57.000Z | three_sum.py | jaebradley/leetcode.py | 64634cc7d0e975ddd163f35acb18cc92960b8eb5 | [
"MIT"
] | null | null | null | """
https://leetcode.com/problems/3sum/
Given an array nums of n integers, are there elements a, b, c in nums such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.
Note:
The solution set must not contain duplicate triplets.
Example:
Given array nums = [-1, 0, 1, 2, -1, -4],
A... | 37.448718 | 161 | 0.552208 |
649f90abe5a0e2278134d2c05c716ffaecd2b45f | 429 | py | Python | bookwyrm/migrations/0145_sitesettings_version.py | mouse-reeve/fedireads | e3471fcc3500747a1b1deaaca662021aae5b08d4 | [
"CC0-1.0"
] | 270 | 2020-01-27T06:06:07.000Z | 2020-06-21T00:28:18.000Z | bookwyrm/migrations/0145_sitesettings_version.py | mouse-reeve/fedireads | e3471fcc3500747a1b1deaaca662021aae5b08d4 | [
"CC0-1.0"
] | 158 | 2020-02-10T20:36:54.000Z | 2020-06-26T17:12:54.000Z | bookwyrm/migrations/0145_sitesettings_version.py | mouse-reeve/fedireads | e3471fcc3500747a1b1deaaca662021aae5b08d4 | [
"CC0-1.0"
] | 15 | 2020-02-13T21:53:33.000Z | 2020-06-17T16:52:46.000Z | # Generated by Django 3.2.12 on 2022-03-16 18:10
from django.db import migrations, models
| 22.578947 | 73 | 0.624709 |
649fc66bebfabac4f317bf9a2446146f166a9e2e | 1,549 | py | Python | crawls/ProxyPool/proxy_spiders/spider_ip181.py | NCU-NLP/news_feed | af2097c5b815c45c6089824759b50c64e51955e4 | [
"MIT"
] | 2 | 2017-11-22T02:51:25.000Z | 2017-11-27T10:50:22.000Z | crawls/ProxyPool/proxy_spiders/spider_ip181.py | NCU-NLP/news_feed | af2097c5b815c45c6089824759b50c64e51955e4 | [
"MIT"
] | 4 | 2017-11-12T14:13:16.000Z | 2021-06-01T21:56:17.000Z | crawls/ProxyPool/proxy_spiders/spider_ip181.py | NCU-NLP/news_feed | af2097c5b815c45c6089824759b50c64e51955e4 | [
"MIT"
] | 7 | 2017-11-01T12:46:17.000Z | 2020-05-14T01:20:45.000Z | import requests
import re
import logging
import time
import threading
from bs4 import BeautifulSoup
headers = {
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept-Encoding": "gzip, deflate",
"Accept-Language": "en-US,en;q=0.5",
"User-Agent": "Mozilla/5.0 (X11; Ubuntu; ... | 31.612245 | 102 | 0.574564 |
64a06148dea41ab8bba1f28dcb0466b88c322b88 | 3,670 | py | Python | toolbox/docker/utils.py | avatao-content/challenge-engine | 38700b96895f12f310e6cf266b9c24b639dbad40 | [
"Apache-2.0"
] | 23 | 2017-08-15T08:18:27.000Z | 2021-05-16T20:38:30.000Z | toolbox/docker/utils.py | avatao-content/challenge-engine | 38700b96895f12f310e6cf266b9c24b639dbad40 | [
"Apache-2.0"
] | 7 | 2017-08-31T18:18:04.000Z | 2019-10-20T00:07:10.000Z | toolbox/docker/utils.py | avatao-content/challenge-engine | 38700b96895f12f310e6cf266b9c24b639dbad40 | [
"Apache-2.0"
] | 9 | 2017-08-31T18:37:01.000Z | 2020-02-11T08:30:46.000Z | import os
import subprocess
from glob import glob
from typing import Any, Dict, Iterable, List, Tuple
from toolbox.config.docker import DOCKER_REGISTRY, DOCKER_REGISTRY_MIRRORS, WHITELISTED_DOCKER_REGISTRIES
from toolbox.utils import run_cmd, fatal_error
def sorted_container_configs(crp_config: Dict[str, Dic... | 33.669725 | 113 | 0.668937 |
64a2067aa9929d774bfeaaacf40147f2b7919a09 | 7,194 | py | Python | complex_neural_net.py | mehdihosseinimoghadam/Complex-Neural-Networks | 7f1135d5c6e23113c43f5a9d9aa3d257bf0770de | [
"OLDAP-2.2.1"
] | null | null | null | complex_neural_net.py | mehdihosseinimoghadam/Complex-Neural-Networks | 7f1135d5c6e23113c43f5a9d9aa3d257bf0770de | [
"OLDAP-2.2.1"
] | null | null | null | complex_neural_net.py | mehdihosseinimoghadam/Complex-Neural-Networks | 7f1135d5c6e23113c43f5a9d9aa3d257bf0770de | [
"OLDAP-2.2.1"
] | null | null | null | """
Complex Valued Neural Layers From Scratch
Programmed by Mehdi Hosseini Moghadam
* MIT Licence
* 2022-02-15 Last Update
"""
from torch import nn
import torch
##__________________________________Complex Linear Layer __________________________________________
##___________________________________... | 27.458015 | 118 | 0.678343 |
64a6d9297b2d82f455c0e98224ae042ba6dbe984 | 1,939 | py | Python | scripts/sample_script.py | TheConfused/LinkedIn | 83e75ed18c54ebc1bed55ee55f69d580a2cb1b73 | [
"MIT"
] | null | null | null | scripts/sample_script.py | TheConfused/LinkedIn | 83e75ed18c54ebc1bed55ee55f69d580a2cb1b73 | [
"MIT"
] | null | null | null | scripts/sample_script.py | TheConfused/LinkedIn | 83e75ed18c54ebc1bed55ee55f69d580a2cb1b73 | [
"MIT"
] | null | null | null | from simplelinkedin import LinkedIn
if __name__ == "__main__":
import os
sett = {
"LINKEDIN_USER": os.getenv("LINKEDIN_USER"),
"LINKEDIN_PASSWORD": os.getenv("LINKEDIN_PASSWORD"),
"LINKEDIN_BROWSER": "Chrome",
"LINKEDIN_BROWSER_DRIVER": "/Users/dayhatt/workspace/drivers/chrom... | 32.864407 | 111 | 0.647241 |
64a85288f25d878a7f78992ddf71bbcdba23b115 | 4,561 | py | Python | F20/SVM_3beat/HeatMap.py | rmorse7/TCH_Arrhythmias_F20 | eb739ab68288d012c9af7f5c21c16776f947ac09 | [
"MIT"
] | null | null | null | F20/SVM_3beat/HeatMap.py | rmorse7/TCH_Arrhythmias_F20 | eb739ab68288d012c9af7f5c21c16776f947ac09 | [
"MIT"
] | null | null | null | F20/SVM_3beat/HeatMap.py | rmorse7/TCH_Arrhythmias_F20 | eb739ab68288d012c9af7f5c21c16776f947ac09 | [
"MIT"
] | null | null | null | import numpy as np
import matplotlib.pyplot as plt
time_max_normalized = 1.25
normalized_amplitude = 400
num_bins_x = 50
num_bins_y = 50
# ----------------------------------------------------
# Based off code from D2K MIC group from Spring 2020. Rewritten and optimized for beat displaying by Ricky Morse,
# D2K Arrhy... | 37.385246 | 114 | 0.611269 |