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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
e3496bdad8c230d6caf15ce743cc65f029480031 | 5,287 | py | Python | RecoEgamma/Configuration/python/RecoEgamma_cff.py | sebwieland/cmssw | 431e2fdfedec052e73c16e9f06de98ade41ebc56 | [
"Apache-2.0"
] | null | null | null | RecoEgamma/Configuration/python/RecoEgamma_cff.py | sebwieland/cmssw | 431e2fdfedec052e73c16e9f06de98ade41ebc56 | [
"Apache-2.0"
] | null | null | null | RecoEgamma/Configuration/python/RecoEgamma_cff.py | sebwieland/cmssw | 431e2fdfedec052e73c16e9f06de98ade41ebc56 | [
"Apache-2.0"
] | null | null | null | import FWCore.ParameterSet.Config as cms
from RecoEgamma.EgammaElectronProducers.gsfElectronSequence_cff import *
from RecoEgamma.EgammaElectronProducers.uncleanedOnlyElectronSequence_cff import *
from RecoEgamma.EgammaPhotonProducers.photonSequence_cff import *
from RecoEgamma.EgammaPhotonProducers.conversionSequence... | 66.924051 | 169 | 0.897863 |
e349722dbbb7eaf1a0dc75722c25f01806dbcca5 | 3,632 | py | Python | language/serene/boolq_tfds.py | Xtuden-com/language | 70c0328968d5ffa1201c6fdecde45bbc4fec19fc | [
"Apache-2.0"
] | 1,199 | 2018-10-16T01:30:18.000Z | 2022-03-31T21:05:24.000Z | language/serene/boolq_tfds.py | Xtuden-com/language | 70c0328968d5ffa1201c6fdecde45bbc4fec19fc | [
"Apache-2.0"
] | 116 | 2018-10-18T03:31:46.000Z | 2022-03-24T13:40:50.000Z | language/serene/boolq_tfds.py | Xtuden-com/language | 70c0328968d5ffa1201c6fdecde45bbc4fec19fc | [
"Apache-2.0"
] | 303 | 2018-10-22T12:35:12.000Z | 2022-03-27T17:38:17.000Z | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# 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 ... | 32.141593 | 75 | 0.593337 |
e34a90751c66f311b5912bb8c6a8d1a8ad0deae9 | 449 | py | Python | 23/03/0.py | pylangstudy/201709 | 53d868786d7327a83bfa7f4149549c6f9855a6c6 | [
"CC0-1.0"
] | null | null | null | 23/03/0.py | pylangstudy/201709 | 53d868786d7327a83bfa7f4149549c6f9855a6c6 | [
"CC0-1.0"
] | 32 | 2017-09-01T00:52:17.000Z | 2017-10-01T00:30:02.000Z | 23/03/0.py | pylangstudy/201709 | 53d868786d7327a83bfa7f4149549c6f9855a6c6 | [
"CC0-1.0"
] | null | null | null | import json
import pprint
from urllib.request import urlopen
with urlopen('http://pypi.python.org/pypi/Twisted/json') as url:
http_info = url.info()
raw_data = url.read().decode(http_info.get_content_charset())
project_info = json.loads(raw_data)
pprint.pprint(project_info)
print('-----------------------------... | 29.933333 | 65 | 0.657016 |
e34b1404822d471e120b2d87a3f5be2a57d14434 | 1,323 | py | Python | molotov_ext/__init__.py | 2gis-test-labs/molotov-ext | 2cf2cc5b74f6676ed1680511030d4dddb8be8380 | [
"Apache-2.0"
] | null | null | null | molotov_ext/__init__.py | 2gis-test-labs/molotov-ext | 2cf2cc5b74f6676ed1680511030d4dddb8be8380 | [
"Apache-2.0"
] | null | null | null | molotov_ext/__init__.py | 2gis-test-labs/molotov-ext | 2cf2cc5b74f6676ed1680511030d4dddb8be8380 | [
"Apache-2.0"
] | null | null | null | from argparse import Namespace
from functools import partial
from typing import Any
import molotov
from .formatters import DefaultFormatter
from .record_table import RecordTable
from .recorder import Recorder
from .reporter import Reporter
from .scenario import Scenario
__all__ = ("Reporter", "register_reporter", "s... | 32.268293 | 99 | 0.73167 |
e34cc6ddd23022672aee1685f571b987ab87c815 | 936 | py | Python | services/viewcounts/utils.py | RyanFleck/AuxilliaryWebsiteServices | bcaa6689e567fdf9f20f7f4ea84043aa2b6f1378 | [
"MIT"
] | 1 | 2020-11-11T20:20:42.000Z | 2020-11-11T20:20:42.000Z | services/viewcounts/utils.py | RyanFleck/AuxilliaryWebsiteServices | bcaa6689e567fdf9f20f7f4ea84043aa2b6f1378 | [
"MIT"
] | 17 | 2020-11-09T19:04:04.000Z | 2022-03-01T18:08:42.000Z | services/viewcounts/utils.py | RyanFleck/AuxilliaryWebsiteServices | bcaa6689e567fdf9f20f7f4ea84043aa2b6f1378 | [
"MIT"
] | null | null | null | from slugify import slugify
from services.viewcounts.models import PageViewsModel
def get_page_views(url: str):
"""Returns the number of views for a given page object."""
# Pre-processing checks: Client should not pass full or partial URL.
if not url.startswith("/"):
raise Exception("Partial URL... | 28.363636 | 73 | 0.672009 |
e34da2a39a4311b17cd41e029318a815155da9e9 | 9,875 | py | Python | bin/gaussian_process_samples.py | ltiao/videos | ba371078d107da5a4c726a957b31a29bb157664d | [
"MIT"
] | null | null | null | bin/gaussian_process_samples.py | ltiao/videos | ba371078d107da5a4c726a957b31a29bb157664d | [
"MIT"
] | null | null | null | bin/gaussian_process_samples.py | ltiao/videos | ba371078d107da5a4c726a957b31a29bb157664d | [
"MIT"
] | null | null | null | import tensorflow as tf
import tensorflow_probability as tfp
from scipy.stats import expon
from videos.linalg import safe_cholesky
from manim import *
# shortcuts
tfd = tfp.distributions
kernels = tfp.math.psd_kernels
| 35.142349 | 127 | 0.582278 |
e34e43e9e1aa6f169f4e3ce01d35a03a886c9108 | 932 | py | Python | app/api/v2/models/base_models.py | erick-maina/Questioner_API | 0ffad203fd525e22b52e861ce574803a844cc3b3 | [
"MIT"
] | null | null | null | app/api/v2/models/base_models.py | erick-maina/Questioner_API | 0ffad203fd525e22b52e861ce574803a844cc3b3 | [
"MIT"
] | 7 | 2019-01-15T12:23:59.000Z | 2019-01-20T17:32:45.000Z | app/api/v2/models/base_models.py | erick-maina/Questioner_API | 0ffad203fd525e22b52e861ce574803a844cc3b3 | [
"MIT"
] | null | null | null | """
This module defines the base model and associated functions
"""
from flask import Flask, jsonify
from psycopg2.extras import RealDictCursor
from ....database import db_con
| 30.064516 | 69 | 0.648069 |
e34fb05ebe987705aa9522c54e606db43ebf8086 | 9,288 | py | Python | cvr/core/task.py | john-james-ai/cvr | 37e12dff4d46acac64b09ad8ddb8d238d43a5513 | [
"BSD-3-Clause"
] | null | null | null | cvr/core/task.py | john-james-ai/cvr | 37e12dff4d46acac64b09ad8ddb8d238d43a5513 | [
"BSD-3-Clause"
] | null | null | null | cvr/core/task.py | john-james-ai/cvr | 37e12dff4d46acac64b09ad8ddb8d238d43a5513 | [
"BSD-3-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
# ================================================================================================ #
# Project : Deep Learning for Conversion Rate Prediction (CVR) #
# Version : 0.1.0 ... | 33.053381 | 100 | 0.463932 |
e34fb4cf8e7da5cda9892155346f681567a85054 | 304 | py | Python | matroids/matroid.py | Aasfga/matroids-library | 468f6fdc4b0c0e93346dba7365fae0fc6993f9cf | [
"MIT"
] | null | null | null | matroids/matroid.py | Aasfga/matroids-library | 468f6fdc4b0c0e93346dba7365fae0fc6993f9cf | [
"MIT"
] | null | null | null | matroids/matroid.py | Aasfga/matroids-library | 468f6fdc4b0c0e93346dba7365fae0fc6993f9cf | [
"MIT"
] | null | null | null | from typing import Set
from numpy import ndarray
| 19 | 45 | 0.671053 |
e350ce9086d7c563b5e1154ba5f38a8024e85d87 | 779 | py | Python | inconnu/traits/traitcommon.py | tiltowait/inconnu | 6cca5fed520899d159537701b695c94222d8dc45 | [
"MIT"
] | 4 | 2021-09-06T20:18:13.000Z | 2022-02-05T17:08:44.000Z | inconnu/traits/traitcommon.py | tiltowait/inconnu | 6cca5fed520899d159537701b695c94222d8dc45 | [
"MIT"
] | 7 | 2021-09-13T00:46:57.000Z | 2022-01-11T06:38:50.000Z | inconnu/traits/traitcommon.py | tiltowait/inconnu | 6cca5fed520899d159537701b695c94222d8dc45 | [
"MIT"
] | 2 | 2021-11-27T22:24:53.000Z | 2022-03-16T21:05:00.000Z | """traits/traitcommon.py - Common functionality across trait operations."""
import re
from ..constants import UNIVERSAL_TRAITS
VALID_TRAIT_PATTERN = re.compile(r"^[A-z_]+$")
def validate_trait_names(*traits):
"""
Raises a ValueError if a trait doesn't exist and a SyntaxError
if the syntax is bad.
""... | 33.869565 | 100 | 0.671374 |
e355aa3c3d4c58a325cb59719ca07b7c1a10df4b | 2,293 | py | Python | docker_ml_templates/simple_batch_model/container/src/tests/test_model.py | MadMedian/ubik | d8dabf0a26db1e35c653b23facb5045f2ae7bf0d | [
"Apache-2.0"
] | null | null | null | docker_ml_templates/simple_batch_model/container/src/tests/test_model.py | MadMedian/ubik | d8dabf0a26db1e35c653b23facb5045f2ae7bf0d | [
"Apache-2.0"
] | null | null | null | docker_ml_templates/simple_batch_model/container/src/tests/test_model.py | MadMedian/ubik | d8dabf0a26db1e35c653b23facb5045f2ae7bf0d | [
"Apache-2.0"
] | null | null | null | import unittest
from ..model import RandomForestWithFeatureSelection
from sklearn.model_selection import train_test_split
import os
import numpy as np
if __name__ == '__main__':
unittest.main()
| 39.534483 | 113 | 0.69167 |
e357ec80e01c5cb1d929b33f8d9bbb4379d90eae | 43,051 | py | Python | DataAnalysis.py | ben-dent/Contract-Cheating-Analysis | 28999b5ac73dbb6f4a65ef3d8f8dd4db677c42df | [
"MIT"
] | null | null | null | DataAnalysis.py | ben-dent/Contract-Cheating-Analysis | 28999b5ac73dbb6f4a65ef3d8f8dd4db677c42df | [
"MIT"
] | null | null | null | DataAnalysis.py | ben-dent/Contract-Cheating-Analysis | 28999b5ac73dbb6f4a65ef3d8f8dd4db677c42df | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt;
plt.rcdefaults()
import csv
import sqlite3 as lite
from calendar import monthrange
from datetime import datetime, date, timedelta
from datetimerange import DateTimeRange
import numpy as np
import pycountry_convert as pc
from dateutil.relativedelta import relativedelta
from forex_pytho... | 31.016571 | 184 | 0.551207 |
e359de552a30d24e6371b5e1ad922405353576ab | 1,733 | py | Python | deploy_flask_plotly/app.py | mohamedsaadmoustafa/Arabic_Dialect_Classification | a13e92ddaa8fda5afcc40d1ce97946174f9a4674 | [
"BSD-3-Clause"
] | null | null | null | deploy_flask_plotly/app.py | mohamedsaadmoustafa/Arabic_Dialect_Classification | a13e92ddaa8fda5afcc40d1ce97946174f9a4674 | [
"BSD-3-Clause"
] | null | null | null | deploy_flask_plotly/app.py | mohamedsaadmoustafa/Arabic_Dialect_Classification | a13e92ddaa8fda5afcc40d1ce97946174f9a4674 | [
"BSD-3-Clause"
] | 1 | 2022-03-14T19:41:57.000Z | 2022-03-14T19:41:57.000Z | from flask import Flask, render_template, request, jsonify
import numpy as np
import pickle
import sys
import json
import re
app = Flask(__name__)
app.config['JSON_AS_ASCII'] = False
target_names = [
'AE', 'BH', 'DZ',
'EG', 'IQ', 'JO',
'KW', 'LB', 'LY',
'MA', 'OM','PL',
'QA', ... | 27.507937 | 112 | 0.562031 |
e359e595d02499d12ce9088ccf34ac138ffada36 | 384 | py | Python | 2018/2/hash.py | octonion/adventofcode | 132e8bf0c9bc0ad64a0e12e22170177df4947e37 | [
"MIT"
] | 1 | 2019-01-10T09:43:34.000Z | 2019-01-10T09:43:34.000Z | 2018/2/hash.py | octonion/adventofcode | 132e8bf0c9bc0ad64a0e12e22170177df4947e37 | [
"MIT"
] | null | null | null | 2018/2/hash.py | octonion/adventofcode | 132e8bf0c9bc0ad64a0e12e22170177df4947e37 | [
"MIT"
] | null | null | null | data = [i.strip() for i in open("input.txt").readlines()]
two = 0
three = 0
for code in data:
counts = {}
for i in range(0,len(code)):
if code[i] in counts.keys():
counts[code[i]] += 1
else:
counts[code[i]] = 1
if (2 in counts.values()):
two += 1
if (3 in... | 21.333333 | 57 | 0.492188 |
e359f824dde6ff522819969499136201763f90fa | 322 | py | Python | conf_site/speakers/tests/factories.py | jasongrout/conf_site | 6b3beb21de8d847cba65dcb6da84464b40739d48 | [
"MIT"
] | 13 | 2015-05-22T17:10:22.000Z | 2021-07-15T16:45:19.000Z | conf_site/speakers/tests/factories.py | jasongrout/conf_site | 6b3beb21de8d847cba65dcb6da84464b40739d48 | [
"MIT"
] | 758 | 2015-03-18T13:39:25.000Z | 2022-03-31T13:14:09.000Z | conf_site/speakers/tests/factories.py | jasongrout/conf_site | 6b3beb21de8d847cba65dcb6da84464b40739d48 | [
"MIT"
] | 16 | 2015-03-24T18:53:17.000Z | 2020-10-22T21:30:02.000Z | # -*- coding: utf-8 -*-
import factory
from symposion.speakers.models import Speaker
from conf_site.accounts.tests.factories import UserFactory
| 21.466667 | 58 | 0.73913 |
e35a2abebd28f1f938e6001756592d76df4ec548 | 179 | py | Python | pokediadb/dbuilder/__init__.py | Kynarth/pokediadb | 97d981909803335f878b9e07ed31d86fc93e7941 | [
"MIT"
] | null | null | null | pokediadb/dbuilder/__init__.py | Kynarth/pokediadb | 97d981909803335f878b9e07ed31d86fc93e7941 | [
"MIT"
] | null | null | null | pokediadb/dbuilder/__init__.py | Kynarth/pokediadb | 97d981909803335f878b9e07ed31d86fc93e7941 | [
"MIT"
] | null | null | null | # flake8: noqa
import pokediadb.dbuilder.version
import pokediadb.dbuilder.type
import pokediadb.dbuilder.ability
import pokediadb.dbuilder.move
import pokediadb.dbuilder.pokemon
| 25.571429 | 33 | 0.860335 |
e35b469d7625c1fa8f422ae121b4eaab1ed606da | 10,171 | py | Python | origin/app_bb_modifier.py | nukeguys/myutil | 65d0aff36ec45bffbd2e52fea0fabfbabd5609b1 | [
"Apache-2.0"
] | null | null | null | origin/app_bb_modifier.py | nukeguys/myutil | 65d0aff36ec45bffbd2e52fea0fabfbabd5609b1 | [
"Apache-2.0"
] | null | null | null | origin/app_bb_modifier.py | nukeguys/myutil | 65d0aff36ec45bffbd2e52fea0fabfbabd5609b1 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python3
import sys
import os
import io
from orderedset import OrderedSet
from shell import Shell
import logpath as LogPath
VERSION = '1.1'
HEADER = '\033[95m'
OKBLUE = '\033[94m'
OKGREEN = '\033[92m'
WARNING = '\033[93m'
FAIL = '\033[91m'
ENDC = '\033[0m'
BOLD = '\033[1m'
UNDERLINE = '\033[4m'
current_path... | 39.730469 | 125 | 0.534756 |
e35b94ca7170c796ccad0fbd61ea4ee542cd52e0 | 3,514 | py | Python | gamebike/controlmapbits.py | johnlpage/gamebike | 429736d0238dca2961763f2a33d8e4e72ed97364 | [
"Apache-2.0"
] | null | null | null | gamebike/controlmapbits.py | johnlpage/gamebike | 429736d0238dca2961763f2a33d8e4e72ed97364 | [
"Apache-2.0"
] | null | null | null | gamebike/controlmapbits.py | johnlpage/gamebike | 429736d0238dca2961763f2a33d8e4e72ed97364 | [
"Apache-2.0"
] | null | null | null | # These were used when I was trying to map between controllers
# To map to a wheel - but was defeated in that by using a driver
# 2021 comment (What did I mean there?)
GAMEPAD_TRIANGLE = (0, 0x08)
GAMEPAD_CIRCLE = (0, 0x04)
GAMEPAD_CROSS = (0, 0x02)
GAMEPAD_SQUARE = (0, 0x01)
GAMEPAD_DPAD_MASK = 0x0F
GAMEPAD_DPAD_NON... | 24.746479 | 79 | 0.726807 |
e35c3059ee54c88a4dcfc9000cdd58922b31c667 | 4,185 | py | Python | conveyordashboard/volumes/tables.py | Hybrid-Cloud/birdie-dashboard | a3dc370c50ef9f33498a8ed4180ff5009532a79f | [
"Apache-2.0"
] | null | null | null | conveyordashboard/volumes/tables.py | Hybrid-Cloud/birdie-dashboard | a3dc370c50ef9f33498a8ed4180ff5009532a79f | [
"Apache-2.0"
] | null | null | null | conveyordashboard/volumes/tables.py | Hybrid-Cloud/birdie-dashboard | a3dc370c50ef9f33498a8ed4180ff5009532a79f | [
"Apache-2.0"
] | null | null | null | # Copyright (c) 2017 Huawei, 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 a... | 35.769231 | 78 | 0.61601 |
e35f9878c2b4e671e6f25e427a7cdba3e0466f0b | 9,046 | py | Python | tools/tver/tver.py | jackyzy823/restrictionbreaker | 1aabce0c98c50782a592fa6c91abd72e82e59a6a | [
"Unlicense"
] | 5 | 2019-05-29T21:34:34.000Z | 2021-07-25T10:58:57.000Z | tools/tver/tver.py | jackyzy823/restrictionbreaker | 1aabce0c98c50782a592fa6c91abd72e82e59a6a | [
"Unlicense"
] | null | null | null | tools/tver/tver.py | jackyzy823/restrictionbreaker | 1aabce0c98c50782a592fa6c91abd72e82e59a6a | [
"Unlicense"
] | 1 | 2020-06-25T14:14:41.000Z | 2020-06-25T14:14:41.000Z | import requests
import re
import sqlite3
db =sqlite3.connect("db_tver.db",check_same_thread =False)
cur = db.cursor()
cur.execute(
'''CREATE TABLE if not exists `tver` (
`reference_id` TEXT NOT NULL,
`service` TEXT NOT NULL,
`player_id` TEXT NOT NULL,
`name` TEXT NOT NULL,
`title` TEXT,
... | 41.118182 | 272 | 0.624254 |
e360941b07ce2d49e4d682a79c218a27dc642b96 | 1,696 | py | Python | tests/test_init.py | nuvolos-cloud/resolos | 0918066cab7b11ef04ae005f3e052b14a65ded68 | [
"MIT"
] | 1 | 2021-11-30T06:47:24.000Z | 2021-11-30T06:47:24.000Z | tests/test_init.py | nuvolos-cloud/resolos | 0918066cab7b11ef04ae005f3e052b14a65ded68 | [
"MIT"
] | 1 | 2021-04-08T12:56:39.000Z | 2021-04-08T12:56:39.000Z | tests/test_init.py | nuvolos-cloud/resolos | 0918066cab7b11ef04ae005f3e052b14a65ded68 | [
"MIT"
] | null | null | null | from pathlib import Path
from click.testing import CliRunner
from resolos.interface import res, res_run
from resolos.shell import run_shell_cmd
from tests.common import verify_result
import logging
logger = logging.getLogger(__name__)
| 34.612245 | 108 | 0.595519 |
e3619a35a7b1327801ed3520deafd02b23723cdc | 946 | py | Python | performence/get_flops.py | idealboy/mmsr | f8284e9fb977a74db1904e6034b768805845e138 | [
"Apache-2.0"
] | 2 | 2020-08-05T05:13:14.000Z | 2020-11-10T03:37:48.000Z | performence/get_flops.py | idealboy/mmsr | f8284e9fb977a74db1904e6034b768805845e138 | [
"Apache-2.0"
] | null | null | null | performence/get_flops.py | idealboy/mmsr | f8284e9fb977a74db1904e6034b768805845e138 | [
"Apache-2.0"
] | null | null | null | import os
import sys
op_name = []
with open("name.txt") as lines:
for line in lines:
line = line.strip()
op_name.append(line)
with open("shape.txt") as lines:
index = 0
for line in lines:
name = op_name[index]
line = line.strip()
items = line.split("\t")
if "conv" in name:
input_shape = [int(s) for ... | 32.62069 | 138 | 0.605708 |
e3621a99c91f66bf8b690df838e64f5433dfeefe | 6,086 | py | Python | pan/mesh_bee_wrapper.py | KillingJacky/CloudPan | 128f438b8d84c734aad94ad3e03f6c3aa12b66af | [
"MIT"
] | 1 | 2016-08-29T14:28:45.000Z | 2016-08-29T14:28:45.000Z | pan/mesh_bee_wrapper.py | KillingJacky/CloudPan | 128f438b8d84c734aad94ad3e03f6c3aa12b66af | [
"MIT"
] | null | null | null | pan/mesh_bee_wrapper.py | KillingJacky/CloudPan | 128f438b8d84c734aad94ad3e03f6c3aa12b66af | [
"MIT"
] | null | null | null | # Wrapper for Mesh Bee library
# helping to easier communicate with Mesh Bee module
#
# Copyright (C) 2014 at seeedstudio
# Author: Jack Shao (jacky.shaoxg@gmail.com)
#
# The MIT License (MIT)
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associate... | 34.977011 | 141 | 0.565067 |
e36654005301b9cf41913be091e578a74c259424 | 1,669 | py | Python | pythonapm/collector/test_reqhandler.py | nextapm/pythonapm | ddd8ad374e4f268516fc81f0bf710206565b737e | [
"FTL"
] | null | null | null | pythonapm/collector/test_reqhandler.py | nextapm/pythonapm | ddd8ad374e4f268516fc81f0bf710206565b737e | [
"FTL"
] | null | null | null | pythonapm/collector/test_reqhandler.py | nextapm/pythonapm | ddd8ad374e4f268516fc81f0bf710206565b737e | [
"FTL"
] | null | null | null | import unittest
import json
import requests
from unittest import mock
from .reqhandler import send_req
from pythonapm.agent import Agent
from pythonapm import constants
| 37.931818 | 233 | 0.711803 |
e366e2fcb39a47a49999de24a158d9a70e017103 | 277 | py | Python | app/admin.py | hbuiOnline/AMS | d9118aee7b5ddd90d54bf4cf7f5cdd11c8e4a511 | [
"MIT"
] | null | null | null | app/admin.py | hbuiOnline/AMS | d9118aee7b5ddd90d54bf4cf7f5cdd11c8e4a511 | [
"MIT"
] | null | null | null | app/admin.py | hbuiOnline/AMS | d9118aee7b5ddd90d54bf4cf7f5cdd11c8e4a511 | [
"MIT"
] | null | null | null | from django.contrib import admin
# Register your models here.
from .models import * # To import all the model from .models, then specify those in register
admin.site.register(Customer)
admin.site.register(Staff)
admin.site.register(Service)
admin.site.register(Appointment) | 27.7 | 93 | 0.794224 |
e36726ae66238ed268d95c0acb72decccf95ea5d | 17,263 | py | Python | static/brythonlib/cs1robots/worlds_data.py | pythonpad/vue-pythonpad-runner | 52decba9607b3b7b050ee0bf6dd4ef07ae644587 | [
"MIT"
] | 3 | 2021-01-26T16:18:45.000Z | 2021-09-15T00:57:12.000Z | static/brythonlib/cs1robots/worlds_data.py | pythonpad/vue-pythonpad-runner | 52decba9607b3b7b050ee0bf6dd4ef07ae644587 | [
"MIT"
] | null | null | null | static/brythonlib/cs1robots/worlds_data.py | pythonpad/vue-pythonpad-runner | 52decba9607b3b7b050ee0bf6dd4ef07ae644587 | [
"MIT"
] | 2 | 2021-01-26T16:18:47.000Z | 2021-10-21T20:45:20.000Z |
worlds_data = {
'around': {'avenues': 10, 'streets': 10, 'walls': [], 'beepers': {(1, 9): 1, (2, 10): 1, (8, 10): 1, (10, 10): 1, (9, 10): 1, (5, 10): 1, (10, 8): 1, (10, 4): 1, (10, 1): 1, (8, 1): 1, (7, 1): 1, (6, 1): 1, (5, 1): 1, (3, 1): 1, (1, 6): 1, (1, 5): 1, (1, 3): 1}},
'around2': {'avenues': 10, 'str... | 60.36014 | 635 | 0.333835 |
e36ae367550f66dd2b4a1cdb03a10bf47b3c6b9c | 5,694 | py | Python | hdp_api/routes/__init__.py | CedricCazinHC/HyperAPI | 789419b95679faf550a57773b9cc57107b2b8504 | [
"BSD-3-Clause"
] | null | null | null | hdp_api/routes/__init__.py | CedricCazinHC/HyperAPI | 789419b95679faf550a57773b9cc57107b2b8504 | [
"BSD-3-Clause"
] | null | null | null | hdp_api/routes/__init__.py | CedricCazinHC/HyperAPI | 789419b95679faf550a57773b9cc57107b2b8504 | [
"BSD-3-Clause"
] | null | null | null | from abc import ABCMeta, abstractproperty, abstractmethod
import inspect
import random
import re
import time
from requests.exceptions import HTTPError
def __call__(self,**kwargs):
formatter = dict.fromkeys(self._path_keys)
for _path_key, _validator in self._path_keys.items():
_value = k... | 31.114754 | 131 | 0.592378 |
e36b3c194ac71da00a1987d9f541d4a940300816 | 332 | py | Python | compsocsite/polls/migrations/0108_merge_20180105_1930.py | ReedyChen/opra | 86ce88c7219d92e321cd9aa3d0bc2bf631e4b90f | [
"MIT"
] | 8 | 2017-03-07T19:46:51.000Z | 2021-06-01T01:41:37.000Z | compsocsite/polls/migrations/0108_merge_20180105_1930.py | ReedyChen/opra | 86ce88c7219d92e321cd9aa3d0bc2bf631e4b90f | [
"MIT"
] | null | null | null | compsocsite/polls/migrations/0108_merge_20180105_1930.py | ReedyChen/opra | 86ce88c7219d92e321cd9aa3d0bc2bf631e4b90f | [
"MIT"
] | 9 | 2016-06-09T03:36:20.000Z | 2019-09-11T20:56:23.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-01-06 00:30
from __future__ import unicode_literals
from django.db import migrations
| 19.529412 | 46 | 0.659639 |
e36c689a2b24e54549cda9f00830211a35aefafa | 5,141 | py | Python | source.py | Sakshisingh05/ClockChian | 21ce1005c83b003a9fc62203d03c50b3e8f70793 | [
"MIT"
] | null | null | null | source.py | Sakshisingh05/ClockChian | 21ce1005c83b003a9fc62203d03c50b3e8f70793 | [
"MIT"
] | null | null | null | source.py | Sakshisingh05/ClockChian | 21ce1005c83b003a9fc62203d03c50b3e8f70793 | [
"MIT"
] | null | null | null | from flask import Flask
from flask import render_template, redirect, url_for
from flask import request
import blockChain
app = Flask(__name__)
if __name__ == '__main__':
app.run(debug=True)
import hashlib
import json
import os
from time import time
BLOCKCHAIN_DIR = os.curdir + '/blocks/'
if __name... | 29.545977 | 108 | 0.606497 |
e36dc2963b3e15b6183197cc7bce8f0677915722 | 27 | py | Python | rtmp/__init__.py | notnola/pinybot | 8ad579fe5652b42a8fb9486c8d11962f5972f817 | [
"MIT"
] | null | null | null | rtmp/__init__.py | notnola/pinybot | 8ad579fe5652b42a8fb9486c8d11962f5972f817 | [
"MIT"
] | null | null | null | rtmp/__init__.py | notnola/pinybot | 8ad579fe5652b42a8fb9486c8d11962f5972f817 | [
"MIT"
] | 1 | 2019-01-31T01:07:56.000Z | 2019-01-31T01:07:56.000Z | __author__ = 'TechWhizZ199' | 27 | 27 | 0.814815 |
e36e0bc7f72121825603a719d4feff88206f860b | 5,668 | py | Python | download_pinterest_images.py | BrunoKrinski/pinterest_download_tools | c804f83bc97c418ea44f1d179ad9864e90631fe5 | [
"MIT"
] | 1 | 2022-03-07T04:38:26.000Z | 2022-03-07T04:38:26.000Z | download_pinterest_images.py | BrunoKrinski/pinterest_download_tools | c804f83bc97c418ea44f1d179ad9864e90631fe5 | [
"MIT"
] | null | null | null | download_pinterest_images.py | BrunoKrinski/pinterest_download_tools | c804f83bc97c418ea44f1d179ad9864e90631fe5 | [
"MIT"
] | null | null | null | import os
import wget
import time
import argparse
import subprocess
import geckodriver_autoinstaller
import chromedriver_autoinstaller
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver import FirefoxOptions
from selenium.webdriver import DesiredCapabilities
fr... | 35.873418 | 114 | 0.569689 |
e36ead0127bc40a1f4670d0eba027d0736c82d0a | 781 | py | Python | kafka_scripts/kafka-producer-stream-algorithm.py | walterjgsp/meaning | 71fd69eab430d364baefb31096c866999de9b4dd | [
"MIT"
] | null | null | null | kafka_scripts/kafka-producer-stream-algorithm.py | walterjgsp/meaning | 71fd69eab430d364baefb31096c866999de9b4dd | [
"MIT"
] | null | null | null | kafka_scripts/kafka-producer-stream-algorithm.py | walterjgsp/meaning | 71fd69eab430d364baefb31096c866999de9b4dd | [
"MIT"
] | null | null | null | from kafka import KafkaProducer
import json
import random
from time import sleep
from datetime import datetime
# Create an instance of the Kafka producer
producer = KafkaProducer(bootstrap_servers='kafka-server:9092',
value_serializer=lambda m: json.dumps(
m).encod... | 37.190476 | 97 | 0.658131 |
e3727e0484521064be92f2b66e6c5b9dd289ef54 | 897 | py | Python | kinsumer/helpers.py | ungikim/kinsumer | 01bd9626d985bc3c239b979f0d98094f78cc102f | [
"MIT"
] | 5 | 2018-03-09T05:16:38.000Z | 2021-11-12T11:56:18.000Z | kinsumer/helpers.py | ungikim/kinsumer | 01bd9626d985bc3c239b979f0d98094f78cc102f | [
"MIT"
] | 2 | 2017-10-16T06:38:28.000Z | 2017-10-18T08:05:37.000Z | kinsumer/helpers.py | balancehero/kinsumer | 01bd9626d985bc3c239b979f0d98094f78cc102f | [
"MIT"
] | 1 | 2017-10-18T08:15:28.000Z | 2017-10-18T08:15:28.000Z | """:mod:`kinsumer.helpers` --- Implements various helpers
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
"""
from threading import RLock
_missing = object()
| 27.181818 | 61 | 0.570792 |
e372ca50f1bbb91d278a5aa868f3b3246267b836 | 4,886 | py | Python | python/tests/pyspark/feature/string_map_test.py | voganrc/mleap | 68cbf375968d9f55acb1d673a4c2390602c0274a | [
"Apache-2.0"
] | 1,401 | 2017-01-07T03:34:44.000Z | 2022-03-31T22:17:58.000Z | python/tests/pyspark/feature/string_map_test.py | liang0/mleap | 41dbde99e389873fc609083cce5d610cea9e9170 | [
"Apache-2.0"
] | 546 | 2016-12-30T19:10:55.000Z | 2022-03-31T16:56:52.000Z | python/tests/pyspark/feature/string_map_test.py | liang0/mleap | 41dbde99e389873fc609083cce5d610cea9e9170 | [
"Apache-2.0"
] | 326 | 2017-01-24T10:35:41.000Z | 2022-03-15T15:53:17.000Z | import os
import tempfile
import unittest
from py4j.protocol import Py4JJavaError
from pyspark.ml import Pipeline
from pyspark.sql import types as t
from mleap.pyspark.feature.string_map import StringMap
from mleap.pyspark.spark_support import SimpleSparkSerializer
from tests.pyspark.lib.assertions import assert_df
f... | 36.192593 | 107 | 0.657388 |
e374829b389cef040daa81ebe91954032d3a7a55 | 72 | py | Python | __init__.py | hoel-bagard/yolact | 028fd121e94c18531243a73eb4c0d443fc38a079 | [
"MIT"
] | null | null | null | __init__.py | hoel-bagard/yolact | 028fd121e94c18531243a73eb4c0d443fc38a079 | [
"MIT"
] | null | null | null | __init__.py | hoel-bagard/yolact | 028fd121e94c18531243a73eb4c0d443fc38a079 | [
"MIT"
] | null | null | null | from .predict import YolactK
from .data import *
__version__ = "0.1.0"
| 14.4 | 28 | 0.722222 |
e374d42c0a5b986cfc32f92436749b7345991388 | 4,210 | py | Python | stocks.py | nicojapas/algorithmic_trading | 46b2b59253638f15858e44b4ebae39eb222a4619 | [
"MIT"
] | 1 | 2021-03-16T12:11:47.000Z | 2021-03-16T12:11:47.000Z | stocks.py | nicojapas/algorithmic_trading | 46b2b59253638f15858e44b4ebae39eb222a4619 | [
"MIT"
] | null | null | null | stocks.py | nicojapas/algorithmic_trading | 46b2b59253638f15858e44b4ebae39eb222a4619 | [
"MIT"
] | 1 | 2022-01-14T21:48:08.000Z | 2022-01-14T21:48:08.000Z | #!/usr/bin/env python
# coding: utf-8
# In[6]:
import pandas as pd
import io
import requests
import time
import random
# In[3]:
# gets the hidden API keys
api_key = pd.read_csv('secrets.csv').api_key.to_string().split()[1]
# In[124]:
# gets data using user's parameters
def get_data(symbol, interval):
"""... | 24.195402 | 113 | 0.611639 |
e3773931c3c2274119d47a9e56c7b5427c5ed618 | 241 | py | Python | python/sock-merchant.py | gajubadge11/hackerrank-3 | 132a5019b7ed21507bb95b5063fa66c446b0eff7 | [
"MIT"
] | 21 | 2015-02-09T18:08:38.000Z | 2021-11-08T15:00:48.000Z | python/sock-merchant.py | gajubadge11/hackerrank-3 | 132a5019b7ed21507bb95b5063fa66c446b0eff7 | [
"MIT"
] | 7 | 2020-04-12T23:00:19.000Z | 2021-01-30T23:44:24.000Z | python/sock-merchant.py | gajubadge11/hackerrank-3 | 132a5019b7ed21507bb95b5063fa66c446b0eff7 | [
"MIT"
] | 27 | 2015-07-22T18:08:12.000Z | 2022-02-28T19:50:26.000Z | #!/bin/python3
from collections import Counter
_ = int(input().strip())
socks = list(map(int, input().strip().split(' ')))
print(pairs(socks))
| 18.538462 | 74 | 0.659751 |
e37917c4d561fd8d9c4ecc0de859e1c2d60e6398 | 1,834 | py | Python | statdpwrapper/experiments/exp_without_pp.py | barryZZJ/dp-sniper | 71a3fc06f3fc319b023bde9aad8f05b8c5a47a80 | [
"MIT"
] | 13 | 2021-03-30T15:39:35.000Z | 2022-02-21T08:30:45.000Z | statdpwrapper/experiments/exp_without_pp.py | barryZZJ/dp-sniper | 71a3fc06f3fc319b023bde9aad8f05b8c5a47a80 | [
"MIT"
] | null | null | null | statdpwrapper/experiments/exp_without_pp.py | barryZZJ/dp-sniper | 71a3fc06f3fc319b023bde9aad8f05b8c5a47a80 | [
"MIT"
] | 4 | 2021-06-30T08:37:45.000Z | 2022-03-05T03:21:14.000Z | import os
from dpsniper.utils.my_multiprocessing import initialize_parallel_executor
from dpsniper.utils.paths import get_output_directory, set_output_directory
from statdpwrapper.algorithms_ext import *
from statdpwrapper.experiments.base import run_statdp
from statdpwrapper.experiments.mechanism_config import statd... | 41.681818 | 99 | 0.768811 |
e37a1fef8ba0d57e0296169fc7cb4fee0cc149e2 | 1,134 | py | Python | ants/registration/symimg.py | ncullen93/ANTsPy | a4c990dcd5b7445a45ce7b366ee018c7350e7d9f | [
"Apache-2.0"
] | 3 | 2018-06-07T19:11:47.000Z | 2019-06-10T05:24:06.000Z | ants/registration/symimg.py | ncullen93/ANTsPy | a4c990dcd5b7445a45ce7b366ee018c7350e7d9f | [
"Apache-2.0"
] | null | null | null | ants/registration/symimg.py | ncullen93/ANTsPy | a4c990dcd5b7445a45ce7b366ee018c7350e7d9f | [
"Apache-2.0"
] | 1 | 2019-04-04T06:18:44.000Z | 2019-04-04T06:18:44.000Z |
__all__ = ['symimg']
from tempfile import mktemp
from .reflect_image import reflect_image
from .interface import registration
from .apply_transforms import apply_transforms
from ..core import image_io as iio
def symimg(img, gs=0.25):
"""
Symmetrize an image
Example
-------
>>> import ants
... | 27.658537 | 95 | 0.636684 |
e37b4614ad6f2375762685c14b508a5358b41194 | 184 | py | Python | CRONtest/hello.py | liu2z2/TutorCal | 41cd0272d59cd1cca439cfef178485d0d8096820 | [
"MIT"
] | null | null | null | CRONtest/hello.py | liu2z2/TutorCal | 41cd0272d59cd1cca439cfef178485d0d8096820 | [
"MIT"
] | null | null | null | CRONtest/hello.py | liu2z2/TutorCal | 41cd0272d59cd1cca439cfef178485d0d8096820 | [
"MIT"
] | null | null | null | import datetime
time=datetime.datetime.today().strftime("%H-%M-%S")
text_file = open("/home/pi/TutorCal/CRONtest/"+time+".txt", "w")
text_file.write("Hello world!")
text_file.close() | 26.285714 | 64 | 0.711957 |
e37b5fbe24287ac8297fbe7f44ed3c806e40c97b | 3,775 | py | Python | src/facrecog_core.py | GaussQR/cs305-g01 | 06b1ad9ba2d05e7c76ee10eb053e9d091b070d6d | [
"MIT"
] | null | null | null | src/facrecog_core.py | GaussQR/cs305-g01 | 06b1ad9ba2d05e7c76ee10eb053e9d091b070d6d | [
"MIT"
] | null | null | null | src/facrecog_core.py | GaussQR/cs305-g01 | 06b1ad9ba2d05e7c76ee10eb053e9d091b070d6d | [
"MIT"
] | null | null | null | import dlib
import face_recognition
import glob
import pickle
import cv2
import numpy as np
import os
from PIL import Image,ImageFont, ImageDraw, ImageEnhance
# from google.colab.patches import cv2_imshow
add_target_faces('known')
faces = load_encoded_faces('encoded_faces.pkl')
identify_faces_video('al.m... | 41.944444 | 115 | 0.614834 |
e37b884d8c5f1d75d2683c37c9063a16300e4321 | 117 | py | Python | src/aioprometheus/formats/__init__.py | jbunce12/aioprometheus | d6dec47b05cab04901ffb8d2016d659927e02311 | [
"MIT"
] | null | null | null | src/aioprometheus/formats/__init__.py | jbunce12/aioprometheus | d6dec47b05cab04901ffb8d2016d659927e02311 | [
"MIT"
] | null | null | null | src/aioprometheus/formats/__init__.py | jbunce12/aioprometheus | d6dec47b05cab04901ffb8d2016d659927e02311 | [
"MIT"
] | null | null | null | from . import text
from .base import IFormatter
try:
from . import binary
except ImportError:
binary = None
| 14.625 | 28 | 0.717949 |
e37d41115e68a3191b6a2c67d0ba9d33fd342473 | 378 | py | Python | pulpo_forms_example/urls.py | pulpocoders/pulpo-forms-examples | 8b9121b8e323b9432d17f7fc0812405668df3b04 | [
"Apache-2.0"
] | 3 | 2015-11-05T00:23:32.000Z | 2017-05-02T15:24:11.000Z | pulpo_forms_example/urls.py | pulpocoders/pulpo-forms-examples | 8b9121b8e323b9432d17f7fc0812405668df3b04 | [
"Apache-2.0"
] | null | null | null | pulpo_forms_example/urls.py | pulpocoders/pulpo-forms-examples | 8b9121b8e323b9432d17f7fc0812405668df3b04 | [
"Apache-2.0"
] | 1 | 2015-08-01T02:03:23.000Z | 2015-08-01T02:03:23.000Z | from django.conf.urls import include, url
from django.contrib import admin
urlpatterns = [
url(r'^example/', include('pulpo_example.urls')),
url(r'^pulpo/', include('pulpo_forms.urls'), name='base'),
url(r'^admin/', include(admin.site.urls)),
url(r'^model_field_form/$',
'pulpo_forms.views.rend... | 29.076923 | 62 | 0.656085 |
e37dccf1196dd3e409502f652bd89e454eb6a2b8 | 2,903 | py | Python | backup_tool/utils.py | tnoff/backup-tool | 114d066b0aeaa9dab9e2594f42a520839587df20 | [
"BSD-2-Clause"
] | null | null | null | backup_tool/utils.py | tnoff/backup-tool | 114d066b0aeaa9dab9e2594f42a520839587df20 | [
"BSD-2-Clause"
] | null | null | null | backup_tool/utils.py | tnoff/backup-tool | 114d066b0aeaa9dab9e2594f42a520839587df20 | [
"BSD-2-Clause"
] | null | null | null | import codecs
from contextlib import contextmanager
import hashlib
import logging
from logging.handlers import RotatingFileHandler
import random
import string
from pathlib import Path
def random_string(length=32, prefix='', suffix=''):
'''
Generate random string
length : Length of string
prefix :... | 31.901099 | 96 | 0.613503 |
e37ecee0bdcbaf77c2d3a8c1147419b338c8e1b7 | 1,573 | py | Python | invmonInfra/models/inventoryModels.py | jtom38/invmon-api | 28f163bef47ee5c95bac0f40198e25e44090758f | [
"MIT"
] | null | null | null | invmonInfra/models/inventoryModels.py | jtom38/invmon-api | 28f163bef47ee5c95bac0f40198e25e44090758f | [
"MIT"
] | 16 | 2021-12-09T06:22:29.000Z | 2022-03-25T06:26:01.000Z | invmonInfra/models/inventoryModels.py | jtom38/invmon-api | 28f163bef47ee5c95bac0f40198e25e44090758f | [
"MIT"
] | null | null | null | from logging import lastResort
from pydantic import BaseModel
from invmonApi.database import Base
from invmonInfra.enum import InventoryLastStatusEnum
from sqlalchemy import Column, String, Boolean
from uuid import uuid4
| 25.370968 | 121 | 0.628099 |
e37f1a70ff938fa436f4a4d3d93cb8fdc066ba63 | 2,201 | py | Python | chatette/parsing/lexing/rule_slot_val.py | ziligy/Chatette | 014c0b0a991bf66cb69fc6a69e0f6c298974eec9 | [
"MIT"
] | 263 | 2018-09-06T14:46:29.000Z | 2022-03-31T08:40:19.000Z | chatette/parsing/lexing/rule_slot_val.py | ziligy/Chatette | 014c0b0a991bf66cb69fc6a69e0f6c298974eec9 | [
"MIT"
] | 50 | 2018-09-06T14:50:18.000Z | 2021-11-16T03:54:27.000Z | chatette/parsing/lexing/rule_slot_val.py | ziligy/Chatette | 014c0b0a991bf66cb69fc6a69e0f6c298974eec9 | [
"MIT"
] | 49 | 2018-09-18T23:15:09.000Z | 2022-03-02T11:23:08.000Z | # coding: utf-8
"""
Module `chatette.parsing.lexing.rule_slot_val`
Contains the definition of the class that represents the lexing rule
to tokenize a slot value being set within a unit rule (only for a slot).
"""
from chatette.parsing.lexing.lexing_rule import LexingRule
from chatette.parsing.lexing import LexicalToke... | 37.948276 | 78 | 0.598364 |
e37fa4448f670de81c2e240c869389511aaf6b49 | 441 | py | Python | python算法/6.5如何根据已知随机数生成函数计算新的随机数.py | RobinYaoWenbin/Python-CommonCode | 1ee714541f2fd9c8b96d018d3d4eb94f4edc812a | [
"MIT"
] | 12 | 2020-09-28T03:25:03.000Z | 2022-03-20T07:44:09.000Z | python算法/6.5如何根据已知随机数生成函数计算新的随机数.py | RobinYaoWenbin/Python-CommonCode | 1ee714541f2fd9c8b96d018d3d4eb94f4edc812a | [
"MIT"
] | null | null | null | python算法/6.5如何根据已知随机数生成函数计算新的随机数.py | RobinYaoWenbin/Python-CommonCode | 1ee714541f2fd9c8b96d018d3d4eb94f4edc812a | [
"MIT"
] | 21 | 2020-03-19T00:44:35.000Z | 2022-01-30T03:46:18.000Z | # -*- coding: utf-8 -*-
"""
Created on Sun Feb 23 20:28:51 2020
@author: Administrator
"""
"""
rand7()1~7,rand10(),1-10.
"""
import random
if __name__ == "__main__":
print(rand10()) | 16.961538 | 67 | 0.535147 |
e380169c4e3938481f564cc3fc99e33f8bdaa725 | 26,432 | py | Python | pytropos/internals/values/python_values/python_values.py | helq/pytropos | 497ed5902e6e4912249ca0a46b477f9bfa6ae80a | [
"MIT"
] | 4 | 2019-10-06T18:01:24.000Z | 2020-07-03T05:27:35.000Z | pytropos/internals/values/python_values/python_values.py | helq/pytropos | 497ed5902e6e4912249ca0a46b477f9bfa6ae80a | [
"MIT"
] | 5 | 2021-06-07T15:50:04.000Z | 2021-06-07T15:50:06.000Z | pytropos/internals/values/python_values/python_values.py | helq/pytropos | 497ed5902e6e4912249ca0a46b477f9bfa6ae80a | [
"MIT"
] | null | null | null | from abc import ABC, abstractmethod
from enum import Enum
from functools import partial
# from math import isinf
from typing import Union, Optional, Any
from typing import Callable, Tuple, Dict, List, Set, Type # noqa: F401
from ..builtin_values import Bool, ops_symbols
from ..abstract_value import AbstractValue
from... | 37.019608 | 99 | 0.589967 |
e3819ef8cd2690861dd5dfa539b9d90716dabcd3 | 2,249 | py | Python | datasets/utils_cifar10.py | jbinas/fortified-networks | 7db626075a019a6a7d8e2cb7d3a97404a1124c69 | [
"MIT"
] | 5 | 2018-10-29T20:21:58.000Z | 2021-11-19T08:58:18.000Z | datasets/utils_cifar10.py | yaya20160101/fortified-networks | 7db626075a019a6a7d8e2cb7d3a97404a1124c69 | [
"MIT"
] | null | null | null | datasets/utils_cifar10.py | yaya20160101/fortified-networks | 7db626075a019a6a7d8e2cb7d3a97404a1124c69 | [
"MIT"
] | 5 | 2018-06-29T00:37:56.000Z | 2021-05-28T04:00:55.000Z | import keras
import tensorflow as tf
import numpy.random as rng
from keras.datasets import cifar10
from keras.utils import np_utils
def data_cifar10(**kwargs):
"""
Preprocess CIFAR10 dataset
:return:
"""
# These values are specific to CIFAR10
img_rows = 32
img_cols = 32
nb_classes = ... | 29.207792 | 74 | 0.678524 |
e382e90eebc5900ceec8c6969e8c5a01efb198a6 | 93 | py | Python | gorden_crawler/utils/country.py | Enmming/gorden_cralwer | 3c279e4f80eaf90f3f03acd31b75cf991952adee | [
"Apache-2.0"
] | 2 | 2019-02-22T13:51:08.000Z | 2020-08-03T14:01:30.000Z | gorden_crawler/utils/country.py | Enmming/gorden_cralwer | 3c279e4f80eaf90f3f03acd31b75cf991952adee | [
"Apache-2.0"
] | null | null | null | gorden_crawler/utils/country.py | Enmming/gorden_cralwer | 3c279e4f80eaf90f3f03acd31b75cf991952adee | [
"Apache-2.0"
] | 1 | 2020-08-03T14:01:32.000Z | 2020-08-03T14:01:32.000Z | #!/usr/bin/python
#-*- coding:utf-8 -*-
from . import const
const.UK = 'UK'
const.US = 'US'
| 13.285714 | 21 | 0.591398 |
e3850a968708849ad26d08ad8495038926eabd09 | 248 | py | Python | 9bus.py | sayonsom/Canvass | e59cd68f26722144abc5caf2d7ae1e7389c39ad1 | [
"MIT"
] | 9 | 2018-01-29T10:53:25.000Z | 2021-02-21T19:35:23.000Z | 9bus.py | cyberange-dev0ps/Canvass | e59cd68f26722144abc5caf2d7ae1e7389c39ad1 | [
"MIT"
] | 1 | 2019-06-04T14:43:34.000Z | 2021-07-09T08:35:13.000Z | 9bus.py | cyberange-dev0ps/Canvass | e59cd68f26722144abc5caf2d7ae1e7389c39ad1 | [
"MIT"
] | 12 | 2017-05-04T23:39:10.000Z | 2021-09-25T17:05:00.000Z | # There are copyright holders.
import pandapower as pp
import pandapower.networks as pn
net = pn.case9()
pp.runpp(net)
print ("Canvass NR Power Flow Results At The Buses")
print ("------------------------------------------")
print (net.res_bus) | 22.545455 | 52 | 0.612903 |
e388be8ed758ecb9a717bada7d2953a7819ac2aa | 315 | py | Python | archeutils/urls.py | acdh-oeaw/acdh-django-archeutils | d1d560ce739d3e2eeddd080c4d96e7482fefbbc5 | [
"MIT"
] | null | null | null | archeutils/urls.py | acdh-oeaw/acdh-django-archeutils | d1d560ce739d3e2eeddd080c4d96e7482fefbbc5 | [
"MIT"
] | null | null | null | archeutils/urls.py | acdh-oeaw/acdh-django-archeutils | d1d560ce739d3e2eeddd080c4d96e7482fefbbc5 | [
"MIT"
] | null | null | null | from django.urls import include, path
from . import arche_rdf_views
app_name = "archeutils"
urlpatterns = [
path('<app_name>/<model_name>/<pk>', arche_rdf_views.res_as_arche_graph, name='res_as_arche_graph'),
path('<app_name>/<model_name>', arche_rdf_views.qs_as_arche_graph, name='qs_as_arche_graph'),
]
| 31.5 | 104 | 0.75873 |
8b4c4b1f780806fe28ac378ba5bc5176a6a833d9 | 763 | py | Python | applications/createEVENT/SimCenterEvent.py | fmckenna/EE-UQ | a1fe96fd000aec933430bda5829c82b5743338c3 | [
"BSD-2-Clause"
] | 1 | 2019-04-30T19:38:17.000Z | 2019-04-30T19:38:17.000Z | applications/createEVENT/SimCenterEvent.py | s-m-amin-ghasemi/EE-UQ | 7eb42d09b59b42fd1256c6d8693cfe46e0b8034b | [
"BSD-2-Clause"
] | 2 | 2018-09-11T01:32:27.000Z | 2018-09-11T23:08:06.000Z | applications/createEVENT/SimCenterEvent.py | s-m-amin-ghasemi/EE-UQ | 7eb42d09b59b42fd1256c6d8693cfe46e0b8034b | [
"BSD-2-Clause"
] | 6 | 2018-05-14T21:45:24.000Z | 2018-10-04T18:13:42.000Z | import sys
from shutil import copyfile
if __name__== "__main__":
main()
| 29.346154 | 69 | 0.626474 |
8b4cf66930d071ee4505d81a0c0281d51346de46 | 384 | py | Python | zad1_12.py | kamilhabrych/python-semestr5-lista1 | 65faeffe83bcc4706b2818e2e7802d986b19244b | [
"MIT"
] | null | null | null | zad1_12.py | kamilhabrych/python-semestr5-lista1 | 65faeffe83bcc4706b2818e2e7802d986b19244b | [
"MIT"
] | null | null | null | zad1_12.py | kamilhabrych/python-semestr5-lista1 | 65faeffe83bcc4706b2818e2e7802d986b19244b | [
"MIT"
] | null | null | null | x = 2 ** (1/2)
y = 3 ** (1/3)
z = 5 ** (1/5)
print(x)
print(y)
print(z)
print()
if x>y and x>z:
print(x,'jest najwiksza')
elif y>x and y>z:
print(y,'jest najwiksza')
elif z>x and z>y:
print(z,'jest najwiksza')
print()
if x<y and x<z:
print(x,'jest najmniejsza')
elif y<x and y<z:
print(y,'jest na... | 16 | 31 | 0.585938 |
8b4d9675e98a4abeceff47ef0ef4214b548c119b | 259 | py | Python | 2-mouth02/day03/exe03.py | gary-gggggg/gary | d8ba30ea4bc2b662a2d6a87d247f813e5680d63e | [
"Apache-2.0"
] | 4 | 2021-02-01T10:28:11.000Z | 2021-02-01T10:34:40.000Z | 2-mouth02/day03/exe03.py | gary-gggggg/gary | d8ba30ea4bc2b662a2d6a87d247f813e5680d63e | [
"Apache-2.0"
] | null | null | null | 2-mouth02/day03/exe03.py | gary-gggggg/gary | d8ba30ea4bc2b662a2d6a87d247f813e5680d63e | [
"Apache-2.0"
] | null | null | null | title=open("file.txt","w")
title.write("\n" )
title.close()
sum=0
while 1:
sentence=open("file.txt","a")
sum+=1
if sum>4:
sentence.close()
break
k =input("")
sentence.write(f"{k}\n")
sentence.close()
| 17.266667 | 33 | 0.555985 |
8b4d9f6ab5c3257761c9eb3fa1e62a13d1f8d05b | 1,635 | py | Python | scanplans/grid_scan.py | st3107/bluesky_scanplans | 2ab126c0b7f4427a10d42cf59ea004770c433383 | [
"BSD-3-Clause"
] | null | null | null | scanplans/grid_scan.py | st3107/bluesky_scanplans | 2ab126c0b7f4427a10d42cf59ea004770c433383 | [
"BSD-3-Clause"
] | null | null | null | scanplans/grid_scan.py | st3107/bluesky_scanplans | 2ab126c0b7f4427a10d42cf59ea004770c433383 | [
"BSD-3-Clause"
] | null | null | null | import bluesky.plan_stubs as bps
import bluesky.plans as bp
from xpdacq.beamtime import _configure_area_det
from xpdacq.glbl import glbl
from xpdacq.xpdacq import open_shutter_stub, close_shutter_stub
from xpdacq.xpdacq_conf import xpd_configuration
# below is the code to run at the beamtime
# register the scanplan
#... | 34.0625 | 76 | 0.688685 |
8b4e6b2b167aebf419baed2ece989c7a96978324 | 5,172 | py | Python | kolibri/logger/migrations/0001_initial_redone.py | aronasorman/kolibri | 940672bc849cd0b26d7d84ee08a34f072c4f6cd6 | [
"MIT"
] | 1 | 2021-11-09T11:30:12.000Z | 2021-11-09T11:30:12.000Z | kolibri/logger/migrations/0001_initial_redone.py | aronasorman/kolibri | 940672bc849cd0b26d7d84ee08a34f072c4f6cd6 | [
"MIT"
] | 2 | 2017-02-08T00:22:04.000Z | 2017-06-12T20:27:44.000Z | kolibri/logger/migrations/0001_initial_redone.py | aronasorman/kolibri | 940672bc849cd0b26d7d84ee08a34f072c4f6cd6 | [
"MIT"
] | 1 | 2020-05-21T18:17:55.000Z | 2020-05-21T18:17:55.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-08-09 17:25
from __future__ import unicode_literals
import django.core.validators
import django.db.models.deletion
import kolibri.content.models
from django.db import migrations, models
| 56.835165 | 176 | 0.616589 |
8b4e779744d51e5ebec4b797f93c9f1ab0c716a1 | 555 | py | Python | setup.py | kennydo/pick-my-stick | 17bb4fbb35cc9637a838f5bdd91caeb7458b43bd | [
"MIT"
] | null | null | null | setup.py | kennydo/pick-my-stick | 17bb4fbb35cc9637a838f5bdd91caeb7458b43bd | [
"MIT"
] | null | null | null | setup.py | kennydo/pick-my-stick | 17bb4fbb35cc9637a838f5bdd91caeb7458b43bd | [
"MIT"
] | null | null | null | from setuptools import setup, find_packages
setup(
name='picker-my-sticker',
version='0.0.1',
description='Stickers for Slack',
long_description='S t i c k e r s',
url='https://github.com/kennydo/pick-my-stick',
author='Kenny Do',
author_email='chinesedewey@gmail.com',
classifiers=[
... | 25.227273 | 51 | 0.610811 |
8b528bad86c27520698632ef706d6564180389c3 | 10,562 | py | Python | helpers.py | TimHeiszwolf/NBPGravity | b054b189f5493ad8ec094786f16f5525c117a127 | [
"MIT"
] | 1 | 2022-03-08T07:16:53.000Z | 2022-03-08T07:16:53.000Z | helpers.py | TimHeiszwolf/NBPGravity | b054b189f5493ad8ec094786f16f5525c117a127 | [
"MIT"
] | null | null | null | helpers.py | TimHeiszwolf/NBPGravity | b054b189f5493ad8ec094786f16f5525c117a127 | [
"MIT"
] | null | null | null | import numpy as np
import time
import matplotlib.pyplot as plt
import imageio
from scipy.optimize import fsolve
from body import Body
def get_position_from_Kepler(semimajor_axis, eccentricity, inclination, ascending_node, argument_of_periapsis, mean_anomaly, mass_orbit, G=6.67430 * 10**(-11)):
"""
Get the pos... | 44.944681 | 194 | 0.639841 |
8b569282b5d41a4fb5d9ee37ff203ff019b8b666 | 10,897 | py | Python | opttrack/lib/ui/edit_handlers.py | aisthesis/opttrack | 17e0c7740ea43e0f07166e30d689b106d0319d0b | [
"MIT"
] | null | null | null | opttrack/lib/ui/edit_handlers.py | aisthesis/opttrack | 17e0c7740ea43e0f07166e30d689b106d0319d0b | [
"MIT"
] | 2 | 2016-03-30T02:50:31.000Z | 2016-03-30T16:18:23.000Z | opttrack/lib/ui/edit_handlers.py | aisthesis/opttrack | 17e0c7740ea43e0f07166e30d689b106d0319d0b | [
"MIT"
] | null | null | null | """
Copyright (c) 2015 Marshall Farrier
license http://opensource.org/licenses/MIT
lib/ui/handlers.py
Handlers for edit menu
"""
from bson.codec_options import CodecOptions
import datetime as dt
from functools import partial
import json
from pymongo.errors import BulkWriteError
from ..dbschema import SPREADS
from ... | 37.968641 | 112 | 0.623383 |
8b58c384ea2a5cec4051907804ed34709b049103 | 4,126 | py | Python | server/music/api.py | tricelex/zc_plugin_youtube_music_video | f3389cafc9e1a6b0fd2d94e0af77e9beec678282 | [
"MIT"
] | null | null | null | server/music/api.py | tricelex/zc_plugin_youtube_music_video | f3389cafc9e1a6b0fd2d94e0af77e9beec678282 | [
"MIT"
] | null | null | null | server/music/api.py | tricelex/zc_plugin_youtube_music_video | f3389cafc9e1a6b0fd2d94e0af77e9beec678282 | [
"MIT"
] | null | null | null | # class SidebarView(GenericAPIView):
# permission_classes = [AllowAny]
# def get(self, request, *args, **kwargs):
# org_id = request.GET.get("org", None)
# user_id = request.GET.get("user", None)
# room = settings.ROOM_COLLECTION
# plugin_id = settings.PLUGIN_ID
# roomi... | 41.26 | 134 | 0.479641 |
8b59bcd3a89ce1967c8f1f93333ca68f2476a3f5 | 6,331 | py | Python | BIT_OpenDomain_QA/rerank/utils_rerank.py | rwei1218/transformers | 511e100c650b3f942c432d8f71eee3ea1c0005a8 | [
"Apache-2.0"
] | null | null | null | BIT_OpenDomain_QA/rerank/utils_rerank.py | rwei1218/transformers | 511e100c650b3f942c432d8f71eee3ea1c0005a8 | [
"Apache-2.0"
] | null | null | null | BIT_OpenDomain_QA/rerank/utils_rerank.py | rwei1218/transformers | 511e100c650b3f942c432d8f71eee3ea1c0005a8 | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
""" Load Duqa labeled dataset. """
from __future__ import absolute_import, division, print_function
import collections
import json
import logging
import math
from io import open
from tqdm import tqdm
from transformers.tokenization_bert import BasicTokenizer, whitespace_tokenize
logger = log... | 31.655 | 113 | 0.59027 |
8b59f06aa5c12c6a5c23df65ae4eee79a9122e69 | 1,973 | py | Python | LanguageConstructs/DataModel/MetaProgramming/Reflection/attribute_builtins.py | ha-khan/PythonPractice | 31366d0a3380b168b96cf2e90cef3960efee8a7e | [
"MIT"
] | null | null | null | LanguageConstructs/DataModel/MetaProgramming/Reflection/attribute_builtins.py | ha-khan/PythonPractice | 31366d0a3380b168b96cf2e90cef3960efee8a7e | [
"MIT"
] | null | null | null | LanguageConstructs/DataModel/MetaProgramming/Reflection/attribute_builtins.py | ha-khan/PythonPractice | 31366d0a3380b168b96cf2e90cef3960efee8a7e | [
"MIT"
] | null | null | null | from typing import Any
if __name__ == '__main__':
main()
| 25.294872 | 104 | 0.601115 |
8b5af6372e48aa5e412d730c4fca44191540f238 | 1,360 | py | Python | src/gui/components/weeklycolormesh.py | larashores/spotify-analyzer | 98022b178ce3ef1b07a8f005aeba2aeb573125ee | [
"MIT"
] | null | null | null | src/gui/components/weeklycolormesh.py | larashores/spotify-analyzer | 98022b178ce3ef1b07a8f005aeba2aeb573125ee | [
"MIT"
] | null | null | null | src/gui/components/weeklycolormesh.py | larashores/spotify-analyzer | 98022b178ce3ef1b07a8f005aeba2aeb573125ee | [
"MIT"
] | null | null | null | import collections
import colorsys
from typing import Iterable, List, Tuple
import matplotobjlib as plot
from backports import zoneinfo
from matplotlib.colors import ListedColormap
import utils
from gui.components import PlotComponent
from gui.options import ArtistChooser, ColorMap, Spinbox
from track import Track
| 35.789474 | 137 | 0.627206 |
8b5b05fdbf74764959912c9444f946a0e9f8ee11 | 3,524 | py | Python | hard-gists/1558831/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 21 | 2019-07-08T08:26:45.000Z | 2022-01-24T23:53:25.000Z | hard-gists/1558831/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 5 | 2019-06-15T14:47:47.000Z | 2022-02-26T05:02:56.000Z | hard-gists/1558831/snippet.py | jjhenkel/dockerizeme | eaa4fe5366f6b9adf74399eab01c712cacaeb279 | [
"Apache-2.0"
] | 17 | 2019-05-16T03:50:34.000Z | 2021-01-14T14:35:12.000Z | # [h] interpolated nudge dialog
'''a simple RoboFont dialog for the famous "interpolated nudge" script'''
# Interpolated Nudge for RoboFont -- Travis Kochel
# http://tktype.tumblr.com/post/15254264845/interpolated-nudge-for-robofont
# Interpolated Nudge -- Christian Robertson
# http://betatype.com/node/18
from vani... | 31.464286 | 75 | 0.521566 |
8b5d964924108495e0cb8ad5afc9e9b8d784d6b3 | 1,547 | py | Python | django_query_profiler/django/db/backends/database_wrapper_mixin.py | sonej/django-query-profiler | 4afe3694ded26d7ba0b435f5666e990b668d85b5 | [
"BSD-3-Clause"
] | 97 | 2020-03-03T01:20:35.000Z | 2022-03-23T14:06:09.000Z | django_query_profiler/django/db/backends/database_wrapper_mixin.py | sonej/django-query-profiler | 4afe3694ded26d7ba0b435f5666e990b668d85b5 | [
"BSD-3-Clause"
] | 24 | 2020-03-06T17:35:08.000Z | 2022-02-09T20:06:05.000Z | django_query_profiler/django/db/backends/database_wrapper_mixin.py | sonej/django-query-profiler | 4afe3694ded26d7ba0b435f5666e990b668d85b5 | [
"BSD-3-Clause"
] | 9 | 2020-03-22T18:17:09.000Z | 2022-01-31T18:59:11.000Z | """
This module defines a mixin, which can be used by all implementations for all databases.
All the databases have a different hierarchy of DatabaseWrapper, but all of them derive from BaseDatabaseWrapper
"""
from abc import ABC
from typing import Optional
from django.db.backends.base.base import BaseDatabaseWrapper... | 39.666667 | 120 | 0.707822 |
8b5e99254ec155e2d433487c1c07674f3203394e | 1,736 | py | Python | Demo/frontend-server.py | hlynch/Penguins_AIforEarth | bccedb68640b20c6c6849040ad57823e99dbd0c6 | [
"MIT"
] | 2 | 2019-06-17T14:09:45.000Z | 2020-08-17T00:20:44.000Z | Demo/frontend-server.py | hlynch/Penguins_AIforEarth | bccedb68640b20c6c6849040ad57823e99dbd0c6 | [
"MIT"
] | 6 | 2019-05-21T16:24:43.000Z | 2019-05-28T18:41:04.000Z | Demo/frontend-server.py | hlynch/Penguins_AIforEarth | bccedb68640b20c6c6849040ad57823e99dbd0c6 | [
"MIT"
] | null | null | null | '''
Webserver for the Penguin Guano Classification AI4Earth API
To run:
export FLASK_APP=frontend-server.py
python -m flask run --host=0.0.0.0
To access the website, enter your IP address:5000 into a browser.
e.g., http://127.0.0.1:5000/
'''
from flask import Flask, send_from_directory, request
import requests
pri... | 24.111111 | 88 | 0.711982 |
8b6038fb868f4e95b06475e6967de2992f3ee654 | 2,947 | py | Python | src/brouwers/shop/migrations/0021_payment.py | modelbrouwers/modelbrouwers | e0ba4819bf726d6144c0a648fdd4731cdc098a52 | [
"MIT"
] | 6 | 2015-03-03T13:23:07.000Z | 2021-12-19T18:12:41.000Z | src/brouwers/shop/migrations/0021_payment.py | modelbrouwers/modelbrouwers | e0ba4819bf726d6144c0a648fdd4731cdc098a52 | [
"MIT"
] | 95 | 2015-02-07T00:55:39.000Z | 2022-02-08T20:22:05.000Z | src/brouwers/shop/migrations/0021_payment.py | modelbrouwers/modelbrouwers | e0ba4819bf726d6144c0a648fdd4731cdc098a52 | [
"MIT"
] | 2 | 2016-03-22T16:53:26.000Z | 2019-02-09T22:46:04.000Z | # -*- coding: utf-8 -*-
# Generated by Django 1.11.20 on 2019-06-29 13:56
from __future__ import unicode_literals
import django.contrib.postgres.fields.jsonb
import django.db.models.deletion
from django.db import migrations, models
import brouwers.shop.models.utils
| 33.11236 | 84 | 0.405836 |
8b620f703a95ef7c54125b1554d9a9e0de82f47e | 12,330 | py | Python | lib/rapi/auth/pam.py | regnauld/ganeti | c1d88461a964a5d0d89cd1ba0571429e01f0a1b5 | [
"BSD-2-Clause"
] | 2 | 2018-09-26T10:09:23.000Z | 2018-09-27T07:27:06.000Z | lib/rapi/auth/pam.py | regnauld/ganeti | c1d88461a964a5d0d89cd1ba0571429e01f0a1b5 | [
"BSD-2-Clause"
] | null | null | null | lib/rapi/auth/pam.py | regnauld/ganeti | c1d88461a964a5d0d89cd1ba0571429e01f0a1b5 | [
"BSD-2-Clause"
] | null | null | null | #
#
# Copyright (C) 2015, 2016 Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of condition... | 32.447368 | 79 | 0.701703 |
8b6521edee5c7a6f815e52a5b53c02dede9be866 | 918 | py | Python | iconparse/image_store.py | donk-project/pydonk | 50417ce9e655cdcab20918b474039426f583d6d3 | [
"MIT"
] | null | null | null | iconparse/image_store.py | donk-project/pydonk | 50417ce9e655cdcab20918b474039426f583d6d3 | [
"MIT"
] | null | null | null | iconparse/image_store.py | donk-project/pydonk | 50417ce9e655cdcab20918b474039426f583d6d3 | [
"MIT"
] | null | null | null | # Donk Project
# Copyright (c) 2021 Warriorstar Orion <orion@snowfrost.garden>
# SPDX-License-Identifier: MIT
import pathlib
from typing import Dict
from iconparse.reader import DmiData, Reader
from iconparse.extractor import Extractor
| 32.785714 | 69 | 0.676471 |
8b655e5cbdbfcf38233bc910318fcb6e68177e29 | 28 | py | Python | network/__init__.py | sveatlo/inpainting | 6870ee56beea7401aa97194f76487c391af9dd5d | [
"Unlicense"
] | 1 | 2021-08-08T03:17:17.000Z | 2021-08-08T03:17:17.000Z | network/__init__.py | sveatlo/inpainting | 6870ee56beea7401aa97194f76487c391af9dd5d | [
"Unlicense"
] | 6 | 2021-08-08T13:12:55.000Z | 2022-03-13T15:26:02.000Z | network/__init__.py | sveatlo/unmasked | 6870ee56beea7401aa97194f76487c391af9dd5d | [
"Unlicense"
] | null | null | null | from .gan import SNPatchGAN
| 14 | 27 | 0.821429 |
8b666913019cd3ac664dfb714c512a8beb73daff | 10,601 | py | Python | mssql_backend/mssql_backend.py | Reposoft/trac-mssql | da8d8ae29ef81db39ca2d6af439d88f3d6ecfebd | [
"BSD-3-Clause"
] | 1 | 2021-01-27T00:21:47.000Z | 2021-01-27T00:21:47.000Z | mssql_backend/mssql_backend.py | Reposoft/trac-mssql | da8d8ae29ef81db39ca2d6af439d88f3d6ecfebd | [
"BSD-3-Clause"
] | 1 | 2015-05-11T18:34:46.000Z | 2017-02-12T07:07:06.000Z | mssql_backend/mssql_backend.py | Reposoft/trac-mssql | da8d8ae29ef81db39ca2d6af439d88f3d6ecfebd | [
"BSD-3-Clause"
] | 1 | 2021-01-27T00:21:50.000Z | 2021-01-27T00:21:50.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 MATOBA Akihiro <matobaa+trac-hacks@gmail.com>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
from trac.core import *
from trac.config imp... | 31.550595 | 111 | 0.647486 |
8b668fce877fc1e0332e1fd014c47e5007f994ff | 6,767 | py | Python | CertifiableBayesianInference/BayesKeras/optimizers/adam.py | Hongchenglong/colab | 9cc5c15abde536493cc3f12008e791caa1d00070 | [
"Apache-2.0"
] | null | null | null | CertifiableBayesianInference/BayesKeras/optimizers/adam.py | Hongchenglong/colab | 9cc5c15abde536493cc3f12008e791caa1d00070 | [
"Apache-2.0"
] | null | null | null | CertifiableBayesianInference/BayesKeras/optimizers/adam.py | Hongchenglong/colab | 9cc5c15abde536493cc3f12008e791caa1d00070 | [
"Apache-2.0"
] | null | null | null | #Author: Matthew Wicker
# Impliments the BayesByBackprop optimizer for BayesKeras
import os
import math
import logging
import numpy as np
import tensorflow as tf
import tensorflow_probability as tfp
from tensorflow.keras.models import *
from tensorflow.keras.layers import *
from tqdm import tqdm
from tqdm import tran... | 42.031056 | 114 | 0.612827 |
8b66b9f64668e1a15163413263d5b63cdc824a7c | 1,435 | py | Python | Scripts/ExplicitInstantation.py | fbudin69500/calatk | 3cee90488feab7e3ef2ade1f791106aa7f11e404 | [
"Apache-2.0"
] | 2 | 2019-09-15T12:51:02.000Z | 2020-04-08T14:03:58.000Z | Scripts/ExplicitInstantation.py | cpatrick/calatk | 849c17919ac5084b5b067c7631bc2aa1efd650df | [
"Apache-2.0"
] | null | null | null | Scripts/ExplicitInstantation.py | cpatrick/calatk | 849c17919ac5084b5b067c7631bc2aa1efd650df | [
"Apache-2.0"
] | 1 | 2018-10-20T16:38:28.000Z | 2018-10-20T16:38:28.000Z | #!/usr/bin/env python
"""Create a .cxx file that performs explicit instantiation over float/double and
dimensions 1, 2, and 3. Writes the file to the current directory."""
usage = "ExplicitInstantiation.py <class_name>"
import sys
if len(sys.argv) < 2 or sys.argv[1] == '-h' or sys.argv[1] == '--help':
print(us... | 26.090909 | 80 | 0.694774 |
8b67d69e37e542f410bab436a641c536c8c9539f | 3,231 | py | Python | aiopogo/auth_google.py | DennyLoko/aiopogo | 55a9efe13c51261c68ab2abe8efc4ac69e04eb01 | [
"MIT"
] | 14 | 2017-03-28T16:32:24.000Z | 2021-03-13T23:03:57.000Z | aiopogo/auth_google.py | ultrafunkamsterdam/aiopogo | 43444c994a400bc9bc8fd1ccaa6a1f79ff5df1fe | [
"MIT"
] | 8 | 2017-03-01T07:56:09.000Z | 2017-08-15T07:37:12.000Z | aiopogo/auth_google.py | ultrafunkamsterdam/aiopogo | 43444c994a400bc9bc8fd1ccaa6a1f79ff5df1fe | [
"MIT"
] | 14 | 2017-04-08T20:01:50.000Z | 2017-08-19T04:23:57.000Z | from concurrent.futures import ThreadPoolExecutor
from functools import partial
from time import time
try:
from gpsoauth import perform_master_login, perform_oauth
except ImportError:
perform_oauth = perform_master_login
from .auth import Auth
from .exceptions import AuthException, InvalidCredentialsException... | 36.715909 | 127 | 0.662953 |
8b68b894928fc1a47949be32739e5721fad32eb5 | 518 | py | Python | voluseg/_tools/evenly_parallelize.py | jingxlim/voluseg | 41429a73a481fbffc3a15457be262ec021304b51 | [
"MIT"
] | 10 | 2019-11-05T18:49:50.000Z | 2022-03-07T04:15:53.000Z | voluseg/_tools/evenly_parallelize.py | jingxlim/voluseg | 41429a73a481fbffc3a15457be262ec021304b51 | [
"MIT"
] | 5 | 2021-02-09T20:32:38.000Z | 2021-03-22T16:53:40.000Z | voluseg/_tools/evenly_parallelize.py | jingxlim/voluseg | 41429a73a481fbffc3a15457be262ec021304b51 | [
"MIT"
] | 3 | 2019-12-09T08:30:18.000Z | 2021-03-22T01:58:44.000Z | def evenly_parallelize(input_list):
'''return evenly partitioned spark resilient distributed dataset (RDD)'''
import numpy as np
from pyspark.sql.session import SparkSession
spark = SparkSession.builder.getOrCreate()
sc = spark.sparkContext
n_input = len(input_list)
n_parts = sc.paralleliz... | 37 | 87 | 0.747104 |
8b6908539193ed05f7b55115e992b2c27664607d | 3,153 | py | Python | deepplats/models/utils.py | GuillaumeDMMarion/deep-plats | d1f58d9fe07a7e3e7560fd4b425234fd5512da1a | [
"MIT"
] | null | null | null | deepplats/models/utils.py | GuillaumeDMMarion/deep-plats | d1f58d9fe07a7e3e7560fd4b425234fd5512da1a | [
"MIT"
] | null | null | null | deepplats/models/utils.py | GuillaumeDMMarion/deep-plats | d1f58d9fe07a7e3e7560fd4b425234fd5512da1a | [
"MIT"
] | null | null | null | """Model helper module.
"""
from __future__ import annotations
from typing import Union
import numpy as np
import torch
| 29.745283 | 79 | 0.598795 |
8b69509f22f3cb70d7f8b98551364109fc2064fa | 1,491 | py | Python | test/utils/test_utils.py | Chick-star/sagemaker-xgboost-container | e06e278b3a34515f79fa73ab770b574b9aafe5f0 | [
"Apache-2.0"
] | 1 | 2021-07-10T15:08:18.000Z | 2021-07-10T15:08:18.000Z | test/utils/test_utils.py | Chick-star/sagemaker-xgboost-container | e06e278b3a34515f79fa73ab770b574b9aafe5f0 | [
"Apache-2.0"
] | null | null | null | test/utils/test_utils.py | Chick-star/sagemaker-xgboost-container | e06e278b3a34515f79fa73ab770b574b9aafe5f0 | [
"Apache-2.0"
] | 1 | 2020-02-07T22:41:34.000Z | 2020-02-07T22:41:34.000Z | # Copyright 2019 Amazon.com, Inc. or its affiliates. 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. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the 'license' file acc... | 35.5 | 84 | 0.7277 |
8b6aace89e3d825b331240e13aabc132d611171f | 2,584 | py | Python | setup_extension.py | kuwayamamasayuki/FeedValidator-extension-for-GTFS-JP | af01375d0cf99c671a8a49f8f3a7aac2083424bc | [
"Apache-2.0"
] | 1 | 2020-04-03T09:18:53.000Z | 2020-04-03T09:18:53.000Z | setup_extension.py | kuwayamamasayuki/FeedValidator-extension-for-GTFS-JP | af01375d0cf99c671a8a49f8f3a7aac2083424bc | [
"Apache-2.0"
] | null | null | null | setup_extension.py | kuwayamamasayuki/FeedValidator-extension-for-GTFS-JP | af01375d0cf99c671a8a49f8f3a7aac2083424bc | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python2.5
# Copyright (C) 2019 KUWAYAMA, Masayuki
#
# 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 applic... | 28.711111 | 74 | 0.768576 |
8b6bbd5a925b35697b012e2714a2cfeb198264c6 | 651 | py | Python | api/team_directory/questions/migrations/0003_auto_20200930_0947.py | Hipo/team-directory | dfc999a6b464e88c020cfebe3b569b960b5d7e3d | [
"MIT"
] | null | null | null | api/team_directory/questions/migrations/0003_auto_20200930_0947.py | Hipo/team-directory | dfc999a6b464e88c020cfebe3b569b960b5d7e3d | [
"MIT"
] | 2 | 2020-06-05T23:54:21.000Z | 2020-09-30T12:50:16.000Z | api/team_directory/questions/migrations/0003_auto_20200930_0947.py | Hipo/team-directory | dfc999a6b464e88c020cfebe3b569b960b5d7e3d | [
"MIT"
] | null | null | null | # Generated by Django 2.2.5 on 2020-09-30 09:47
from django.db import migrations, models
| 28.304348 | 208 | 0.58679 |
8b6d14070d60a3432471d3e5b7787427ad3b6a3d | 565 | py | Python | CursoemVideo/Desafio076.py | davihonorato/Curso-python | 47e6b4b2f5b37ef520b8b31d37dba0b5d259a0b0 | [
"MIT"
] | null | null | null | CursoemVideo/Desafio076.py | davihonorato/Curso-python | 47e6b4b2f5b37ef520b8b31d37dba0b5d259a0b0 | [
"MIT"
] | null | null | null | CursoemVideo/Desafio076.py | davihonorato/Curso-python | 47e6b4b2f5b37ef520b8b31d37dba0b5d259a0b0 | [
"MIT"
] | null | null | null | # Exerccio Python 076: Crie um programa que tenha uma tupla nica com nomes de produtos e seus respectivos preos, na sequncia.
# No final, mostre uma listagem de preos, organizando os dados em forma tabular.
produtos = ('LPIS', 1.75,
'BORRACHA', 2,
'CADERNO', 20,
'CANETAS', 7,
... | 31.388889 | 129 | 0.580531 |
8b6db37566c6d60a2bd9e55330800dc0a7ad705e | 8,558 | py | Python | tests/test_simba.py | SIMBAChain/libsimba.py-platform | a815105a5ed84564c7eafbe01281473cebfb44e5 | [
"MIT"
] | null | null | null | tests/test_simba.py | SIMBAChain/libsimba.py-platform | a815105a5ed84564c7eafbe01281473cebfb44e5 | [
"MIT"
] | 2 | 2022-02-25T05:03:13.000Z | 2022-03-09T13:56:56.000Z | tests/test_simba.py | SIMBAChain/libsimba.py-platform | a815105a5ed84564c7eafbe01281473cebfb44e5 | [
"MIT"
] | null | null | null | import unittest
from unittest.mock import patch
from libsimba.simba import Simba
| 38.9 | 113 | 0.592545 |
8b6dc47fa5a53a344b6d3a7e96adce1b89de4411 | 521 | py | Python | projects/golem_integration/tests/actions/wait_for_element_enabled.py | kangchenwei/keyautotest2 | f980d46cabfc128b2099af3d33968f236923063f | [
"MIT"
] | null | null | null | projects/golem_integration/tests/actions/wait_for_element_enabled.py | kangchenwei/keyautotest2 | f980d46cabfc128b2099af3d33968f236923063f | [
"MIT"
] | null | null | null | projects/golem_integration/tests/actions/wait_for_element_enabled.py | kangchenwei/keyautotest2 | f980d46cabfc128b2099af3d33968f236923063f | [
"MIT"
] | null | null | null | from golem import actions
description = 'Verify wait_for_element_enabled action'
| 34.733333 | 85 | 0.729367 |
8b6f0fc1892ec8aa8153dba6ca257fd87d9c6c75 | 4,263 | py | Python | Sketches/THF/3D/playground/SimpleCube.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 12 | 2015-10-20T10:22:01.000Z | 2021-07-19T10:09:44.000Z | Sketches/THF/3D/playground/SimpleCube.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 2 | 2015-10-20T10:22:55.000Z | 2017-02-13T11:05:25.000Z | Sketches/THF/3D/playground/SimpleCube.py | sparkslabs/kamaelia_orig | 24b5f855a63421a1f7c6c7a35a7f4629ed955316 | [
"Apache-2.0"
] | 6 | 2015-03-09T12:51:59.000Z | 2020-03-01T13:06:21.000Z | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License... | 31.577778 | 98 | 0.546798 |
8b71d0b65eecf04d767d50cdc3d7516cf1940fbe | 236 | py | Python | routers.py | gabrielangelo/revelo-wallet | 3e91117b673e5aaf50773aa180af4117235965c9 | [
"BSD-3-Clause"
] | null | null | null | routers.py | gabrielangelo/revelo-wallet | 3e91117b673e5aaf50773aa180af4117235965c9 | [
"BSD-3-Clause"
] | 8 | 2020-02-11T23:50:12.000Z | 2022-03-14T22:51:54.000Z | routers.py | gabrielangelo/revelo-wallet | 3e91117b673e5aaf50773aa180af4117235965c9 | [
"BSD-3-Clause"
] | null | null | null | from rest_framework.routers import SimpleRouter
from transactions.api.views import TransactionsViewSet
router_v1 = SimpleRouter(trailing_slash=False)
router_v1.register(r'transactions', TransactionsViewSet, base_name='transactions')
| 33.714286 | 82 | 0.855932 |
8b72e1cc46246e65f5c4487e4423aa24c3c70e6e | 8,480 | py | Python | plugins/modules/waf_domain.py | schrej/ansible-collection-cloud | 1fa1d18aaa06178616af17d8240e8fc5d13a370c | [
"Apache-2.0"
] | 16 | 2020-09-22T14:45:52.000Z | 2022-02-11T07:56:38.000Z | plugins/modules/waf_domain.py | schrej/ansible-collection-cloud | 1fa1d18aaa06178616af17d8240e8fc5d13a370c | [
"Apache-2.0"
] | 153 | 2020-08-20T14:00:55.000Z | 2022-03-30T13:48:51.000Z | plugins/modules/waf_domain.py | schrej/ansible-collection-cloud | 1fa1d18aaa06178616af17d8240e8fc5d13a370c | [
"Apache-2.0"
] | 11 | 2020-09-01T12:21:09.000Z | 2021-12-23T09:48:34.000Z | #!/usr/bin/python
# 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
# di... | 33.254902 | 100 | 0.610024 |
8b73af8b167c0c808ac06e682936f0020d7644ea | 2,104 | py | Python | python/raft/NodeState.py | chenzhaoplus/vraft | 73fe880289061cfbb62aa33b8e5c7d012543bb9d | [
"Apache-2.0"
] | 23 | 2020-05-17T04:22:17.000Z | 2022-02-22T02:09:34.000Z | python/raft/NodeState.py | chenzhaoplus/vraft | 73fe880289061cfbb62aa33b8e5c7d012543bb9d | [
"Apache-2.0"
] | 1 | 2020-10-22T11:47:54.000Z | 2020-10-22T11:47:54.000Z | python/raft/NodeState.py | chenzhaoplus/vraft | 73fe880289061cfbb62aa33b8e5c7d012543bb9d | [
"Apache-2.0"
] | 11 | 2020-07-11T07:12:19.000Z | 2022-03-23T08:24:15.000Z | import collections
from cluster import Cluster
import logging
logging.basicConfig(format='%(asctime)s - %(levelname)s: %(message)s', datefmt='%H:%M:%S', level=logging.INFO)
VoteResult = collections.namedtuple('VoteResult', ['term', 'vote_granted', 'id'])
| 42.08 | 113 | 0.66635 |
8b73f4c7986a2f8c2bd94b366f876d38ceb6a037 | 303 | py | Python | 06source_code/service-center/language-service/bin/language_service.py | dumengnan/unicorn | 165330ff8e01bc18e3eca2d8ecf23b5d955f155b | [
"Apache-2.0"
] | null | null | null | 06source_code/service-center/language-service/bin/language_service.py | dumengnan/unicorn | 165330ff8e01bc18e3eca2d8ecf23b5d955f155b | [
"Apache-2.0"
] | 8 | 2020-01-28T22:31:03.000Z | 2022-03-02T03:37:47.000Z | 06source_code/service-center/language-service/bin/language_service.py | dumengnan/unicorn | 165330ff8e01bc18e3eca2d8ecf23b5d955f155b | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/env python
# encoding: utf-8
import _load_lib
import sys
import logging
import os
from unicorn.language.app\
import main as languae_main
if __name__ == '__main__':
try:
languae_main()
except Exception as ex:
logging.exception("main except")
os._exit(1)
| 16.833333 | 40 | 0.673267 |
8b75a7eaacdb476c970a5cf2013b558edc778b20 | 10,303 | py | Python | incremental_evaluation_run.py | comrob/ensgendel | 4958d588a30a5bc60c6e7af5abb2b830b1265a25 | [
"BSD-3-Clause"
] | null | null | null | incremental_evaluation_run.py | comrob/ensgendel | 4958d588a30a5bc60c6e7af5abb2b830b1265a25 | [
"BSD-3-Clause"
] | null | null | null | incremental_evaluation_run.py | comrob/ensgendel | 4958d588a30a5bc60c6e7af5abb2b830b1265a25 | [
"BSD-3-Clause"
] | null | null | null | import incremental_evaluation.utils as IE
import incremental_evaluation.scenario_sets as SS
import incremental_evaluation.visualisation_helper as VH
import models.basic_predictor_interfaces
import models.ensgendel_interface
import incremental_evaluation.data_file_helper as DFH
import os
import argparse
SS_MNIST012 = "... | 54.803191 | 119 | 0.625837 |
8b76c38f1e29d8bf142d3e3373941067e32aadc6 | 15,792 | py | Python | core/models.py | admariner/madewithwagtail | a43b3263c0f151ece4994fccd561b0575db4979f | [
"MIT"
] | null | null | null | core/models.py | admariner/madewithwagtail | a43b3263c0f151ece4994fccd561b0575db4979f | [
"MIT"
] | null | null | null | core/models.py | admariner/madewithwagtail | a43b3263c0f151ece4994fccd561b0575db4979f | [
"MIT"
] | null | null | null | import os
import re
from bs4 import BeautifulSoup
from django.core.exceptions import ObjectDoesNotExist
from django.core.paginator import EmptyPage, PageNotAnInteger, Paginator
from django.db import models
from django.db.models import Case, Count, Q, Value, When
from django.utils.encoding import python_2_unicode_compa... | 31.967611 | 117 | 0.634435 |
8b77b588bbd23056762b56f743c2a98bf3afca31 | 868 | py | Python | calvin/runtime/south/plugins/storage/twistedimpl/securedht/tests/cert_script.py | josrolgil/exjobbCalvin | 976459eaa50246586360c049b9880d753623d574 | [
"Apache-2.0"
] | 1 | 2016-05-10T22:36:31.000Z | 2016-05-10T22:36:31.000Z | calvin/runtime/south/plugins/storage/twistedimpl/securedht/tests/cert_script.py | josrolgil/exjobbCalvin | 976459eaa50246586360c049b9880d753623d574 | [
"Apache-2.0"
] | null | null | null | calvin/runtime/south/plugins/storage/twistedimpl/securedht/tests/cert_script.py | josrolgil/exjobbCalvin | 976459eaa50246586360c049b9880d753623d574 | [
"Apache-2.0"
] | null | null | null | #!/usr/bin/python
from calvin.utilities import certificate
import os
print "Trying to create a new domain configuration."
testconfig = certificate.Config(domain="test")
# testconfig2 = certificate.Config(domain="evil")
print "Reading configuration successfull."
print "Creating new domain."
certificate.new_domain(test... | 36.166667 | 73 | 0.75 |
8b78243e120efed83eabeee3ef9fab1fbb90cb9c | 2,526 | py | Python | users/migrations/0001_initial.py | bhaveshpraveen/VIT-Pugaar | 0a33b264939287071ddaffef4ab1f2ef9a38de87 | [
"MIT"
] | null | null | null | users/migrations/0001_initial.py | bhaveshpraveen/VIT-Pugaar | 0a33b264939287071ddaffef4ab1f2ef9a38de87 | [
"MIT"
] | 6 | 2017-11-11T08:43:55.000Z | 2021-06-10T19:38:24.000Z | users/migrations/0001_initial.py | bhaveshpraveen/VIT-Pugaar | 0a33b264939287071ddaffef4ab1f2ef9a38de87 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-10-23 05:30
from __future__ import unicode_literals
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
| 56.133333 | 266 | 0.641726 |
8b789e81aabae4e0b2a7953dacad2a13826e5a3e | 93 | py | Python | runoob100/032.py | GenweiWu/PythonDemo | 957bacb6fc0eb0bc37c4af7a64220d8aa58189ba | [
"MIT"
] | null | null | null | runoob100/032.py | GenweiWu/PythonDemo | 957bacb6fc0eb0bc37c4af7a64220d8aa58189ba | [
"MIT"
] | null | null | null | runoob100/032.py | GenweiWu/PythonDemo | 957bacb6fc0eb0bc37c4af7a64220d8aa58189ba | [
"MIT"
] | null | null | null | # _*_ coding:utf-8 _*_
#
arr=["aaa",True,100,"ccc"]
print arr
print arr[::-1] | 11.625 | 26 | 0.634409 |
8b790365631a765420b493cba01b292fac4bc258 | 475 | py | Python | ArrangingCoins.py | Jcarlos0828/LeetCode-PracticeResults | 73566a131629038caf2555eaf4999379227ec369 | [
"MIT"
] | 1 | 2019-06-26T22:44:16.000Z | 2019-06-26T22:44:16.000Z | ArrangingCoins.py | Jcarlos0828/LeetCode-PracticeResults | 73566a131629038caf2555eaf4999379227ec369 | [
"MIT"
] | null | null | null | ArrangingCoins.py | Jcarlos0828/LeetCode-PracticeResults | 73566a131629038caf2555eaf4999379227ec369 | [
"MIT"
] | null | null | null | '''
EASY 441. Arranging Coins
You have a total of n coins that you want to form in
a staircase shape, where every k-th row must have exactly k coins.
''' | 26.388889 | 66 | 0.511579 |
8b7cf31b94df4dc51935676b554357efa86d4611 | 1,167 | py | Python | stable_projects/predict_phenotypes/Nguyen2020_RNNAD/cbig/Nguyen2020/test_rnn.py | marielacour81/CBIG | 511af756c6ddabbd3a9681ce3514b79ef5aaaf3f | [
"MIT"
] | 6 | 2020-03-03T22:23:07.000Z | 2021-11-27T06:11:02.000Z | stable_projects/predict_phenotypes/Nguyen2020_RNNAD/cbig/Nguyen2020/test_rnn.py | marielacour81/CBIG | 511af756c6ddabbd3a9681ce3514b79ef5aaaf3f | [
"MIT"
] | null | null | null | stable_projects/predict_phenotypes/Nguyen2020_RNNAD/cbig/Nguyen2020/test_rnn.py | marielacour81/CBIG | 511af756c6ddabbd3a9681ce3514b79ef5aaaf3f | [
"MIT"
] | 2 | 2020-05-27T20:24:03.000Z | 2021-04-14T07:51:44.000Z | # Written by Minh Nguyen and CBIG under MIT license:
# https://github.com/ThomasYeoLab/CBIG/blob/master/LICENSE.md
import unittest
import torch
import cbig.Nguyen2020.rnn as rnn
| 33.342857 | 73 | 0.658098 |
8b7e0f2a1f8d7363c4a7045709aa260449c86b2e | 4,816 | py | Python | mysite/myapp/forms.py | MarkArren/PhotoSocial | bb401f465a464e7cf6a7fac184cef0d40e0a9525 | [
"MIT"
] | null | null | null | mysite/myapp/forms.py | MarkArren/PhotoSocial | bb401f465a464e7cf6a7fac184cef0d40e0a9525 | [
"MIT"
] | null | null | null | mysite/myapp/forms.py | MarkArren/PhotoSocial | bb401f465a464e7cf6a7fac184cef0d40e0a9525 | [
"MIT"
] | null | null | null | from django import forms
from django.forms import ModelForm
from django.contrib.auth.forms import UserCreationForm
from django.contrib.auth.models import User
from django.core.validators import EmailValidator
from . import models
from .models import ProfileModel
from io import BytesIO
from PIL import Image, ExifTags
... | 28.163743 | 135 | 0.706811 |
8b80a8a516beaa5b7d7dde65eb8c098754473d58 | 1,442 | py | Python | up/tasks/sparse/models/heads/cls_head.py | ModelTC/EOD | 164bff80486e9ae6a095a97667b365c46ceabd86 | [
"Apache-2.0"
] | 196 | 2021-10-30T05:15:36.000Z | 2022-03-30T18:43:40.000Z | up/tasks/sparse/models/heads/cls_head.py | ModelTC/EOD | 164bff80486e9ae6a095a97667b365c46ceabd86 | [
"Apache-2.0"
] | 12 | 2021-10-30T11:33:28.000Z | 2022-03-31T14:22:58.000Z | up/tasks/sparse/models/heads/cls_head.py | ModelTC/EOD | 164bff80486e9ae6a095a97667b365c46ceabd86 | [
"Apache-2.0"
] | 23 | 2021-11-01T07:26:17.000Z | 2022-03-27T05:55:37.000Z | from up.utils.general.registry_factory import MODULE_ZOO_REGISTRY
from up.tasks.cls.models.heads import BaseClsHead, ConvNeXtHead
__all__ = ['SparseBaseClsHead', 'SparseConvNeXtHead']
| 36.974359 | 109 | 0.647018 |
8b8159fcb82d3a08050148abdcf3102b1846cbb7 | 4,753 | py | Python | app/xl/long_runner.py | evgeniyabrosin/anfisa | ac4aef1a816de05ee2a45aa5b220e2baf93574de | [
"Apache-2.0"
] | 8 | 2019-03-26T16:07:46.000Z | 2021-12-30T13:38:06.000Z | app/xl/long_runner.py | evgeniyabrosin/anfisa | ac4aef1a816de05ee2a45aa5b220e2baf93574de | [
"Apache-2.0"
] | 13 | 2018-11-07T19:37:20.000Z | 2022-02-21T17:11:45.000Z | app/xl/long_runner.py | evgeniyabrosin/anfisa | ac4aef1a816de05ee2a45aa5b220e2baf93574de | [
"Apache-2.0"
] | 15 | 2018-10-16T08:15:11.000Z | 2022-02-21T14:07:29.000Z | # Copyright (c) 2019. Partners HealthCare and other members of
# Forome Association
#
# Developed by Sergey Trifonov based on contributions by Joel Krier,
# Michael Bouzinier, Shamil Sunyaev and other members of Division of
# Genetics, Brigham and Women's Hospital
#
# Licensed under the Apache License, Version 2.... | 39.608333 | 77 | 0.564696 |
8b8201f75514c47ff34e925027bea925196f4d34 | 23,209 | py | Python | cosmos_virtual_assistant_uf.py | Nishit014/COSMOS | 3042377715f6f4b0eb0a75b6b360415a965754df | [
"MIT"
] | 1 | 2021-06-27T11:53:43.000Z | 2021-06-27T11:53:43.000Z | cosmos_virtual_assistant_uf.py | Aayush9027/COSMOS_VIRTUAL_ASSISTANT | d02aa04a66b2acdfeaf9270607059182f54e78a5 | [
"MIT"
] | null | null | null | cosmos_virtual_assistant_uf.py | Aayush9027/COSMOS_VIRTUAL_ASSISTANT | d02aa04a66b2acdfeaf9270607059182f54e78a5 | [
"MIT"
] | 1 | 2021-06-25T12:04:24.000Z | 2021-06-25T12:04:24.000Z | import pyttsx3
import speech_recognition as sr
import os
import subprocess
#from requests import request , session
#from pprint import pprint as pp
import json
import requests
import datetime
from datetime import date
import time
import calendar
import warnings
import random
import wikipedia
import web... | 38.553156 | 186 | 0.550605 |
8b820e62535a256f6892582e2d661efa4be1b944 | 1,748 | py | Python | model.py | TilenHumar/Vislice | 5970fb4d887a5689b906a7190fabb5405b25bbc7 | [
"MIT"
] | null | null | null | model.py | TilenHumar/Vislice | 5970fb4d887a5689b906a7190fabb5405b25bbc7 | [
"MIT"
] | 2 | 2021-04-19T15:51:18.000Z | 2021-04-19T16:17:06.000Z | model.py | TilenHumar/Vislice | 5970fb4d887a5689b906a7190fabb5405b25bbc7 | [
"MIT"
] | null | null | null | import random
# najprej konstante
STEVILO_DOVOLJENIH_NAPAK = 10
PRAVILNA_CRKA = "+"
PONOVLJENA_CRKA = "o"
NAPACNA_CRKA = "-"
ZMAGA = "W"
PORAZ = "X"
bazen_besed = []
with open("besede.txt", encoding ="utf8") as input_file:
bazen_besed = input_file.readlines()
| 23 | 69 | 0.582952 |