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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
33e70135430c756b9a90a2e67be6abde70c17fb4 | 100 | py | Python | paraVerComoFuncionaAlgumasCoisas/sqlite3/fazendoTeste/teste.py | jonasht/pythonEstudos | 5e7d28e7bd82b9d1b08e795867fdbaa743f4b747 | [
"MIT"
] | null | null | null | paraVerComoFuncionaAlgumasCoisas/sqlite3/fazendoTeste/teste.py | jonasht/pythonEstudos | 5e7d28e7bd82b9d1b08e795867fdbaa743f4b747 | [
"MIT"
] | null | null | null | paraVerComoFuncionaAlgumasCoisas/sqlite3/fazendoTeste/teste.py | jonasht/pythonEstudos | 5e7d28e7bd82b9d1b08e795867fdbaa743f4b747 | [
"MIT"
] | null | null | null | import PegandoVariavel as v
print(v.get_Pessoas())
print()
for d in v.get_Pessoas():
print(d) | 12.5 | 27 | 0.7 |
33e78a01265ca1d4db3cea8c8ee8b0a653ab15e6 | 2,689 | py | Python | main.py | Abrolhus/animeDlCLI | 4ba7fc4c24eb0b01a6352a1f6b011edee79b8ea3 | [
"MIT"
] | null | null | null | main.py | Abrolhus/animeDlCLI | 4ba7fc4c24eb0b01a6352a1f6b011edee79b8ea3 | [
"MIT"
] | null | null | null | main.py | Abrolhus/animeDlCLI | 4ba7fc4c24eb0b01a6352a1f6b011edee79b8ea3 | [
"MIT"
] | null | null | null | import click
from Crypto.Cipher import AES
import base64
from hashlib import md5
import warnings
import requests_cache
import requests
import logging
import subprocess
import tempfile
from anime_downloader.sites import get_anime_class
import util
if __name__ == "__main__":
hello()
| 34.474359 | 97 | 0.613611 |
33e792cf546e5c419d580edda8137736596261a6 | 333 | py | Python | file_upload/address/models.py | pkscredy/lat_long | 1079d4c4eaf16a7df08c431aaa83eed188099af4 | [
"MIT"
] | null | null | null | file_upload/address/models.py | pkscredy/lat_long | 1079d4c4eaf16a7df08c431aaa83eed188099af4 | [
"MIT"
] | null | null | null | file_upload/address/models.py | pkscredy/lat_long | 1079d4c4eaf16a7df08c431aaa83eed188099af4 | [
"MIT"
] | null | null | null | from __future__ import unicode_literals
from django.db import models
| 25.615385 | 60 | 0.756757 |
33e8f24130e48b94bffd6cb5db000655f6d2dde5 | 3,106 | py | Python | src/messages/results/base.py | rkulyn/telegram-dutch-taxbot | f6c2222e5f2b9f96d8e035e9d6f64c67da3a73e1 | [
"MIT"
] | 2 | 2020-02-27T13:15:07.000Z | 2020-09-19T15:19:29.000Z | src/messages/results/base.py | rkulyn/telegram-dutch-taxbot | f6c2222e5f2b9f96d8e035e9d6f64c67da3a73e1 | [
"MIT"
] | null | null | null | src/messages/results/base.py | rkulyn/telegram-dutch-taxbot | f6c2222e5f2b9f96d8e035e9d6f64c67da3a73e1 | [
"MIT"
] | null | null | null | import abc
from collections import OrderedDict
from .constants import RESULT_KEY_MAP
def send(self, bot, chat_id, custom_data=None):
"""
Send built message.
Args:
bot (instance): Bot.
chat_id (int): Chat ID.
custom_data (dict): Any custom data.
... | 20.168831 | 61 | 0.533162 |
33ec942a5d39ab4de12cd3ad377092659ef39d3e | 377 | py | Python | extract_wn_synsets.py | napsternxg/WordNetExperiments | 6dd12604b3b1ae64d07b819745629074b9db993b | [
"Apache-2.0"
] | 2 | 2017-06-22T16:59:58.000Z | 2020-03-26T17:04:32.000Z | extract_wn_synsets.py | napsternxg/WordNetExperiments | 6dd12604b3b1ae64d07b819745629074b9db993b | [
"Apache-2.0"
] | null | null | null | extract_wn_synsets.py | napsternxg/WordNetExperiments | 6dd12604b3b1ae64d07b819745629074b9db993b | [
"Apache-2.0"
] | null | null | null | # coding: utf-8
from nltk.corpus import wordnet as wn
all_synsets = set()
for word in wn.words():
for synset in wn.synsets(word):
all_synsets.add(synset)
with open("wordnet_synset_definition.txt", "wb+") as fp:
for synset in all_synsets:
print >> fp, "%s\t%s" % (
synset.name()... | 22.176471 | 56 | 0.570292 |
33ed53521c15ad28a778f2b1528538b64f181026 | 32 | py | Python | week01/test_f.py | wasit7/cn350 | a84a6ed04ada532e0a12c69d705cf3c15d7e0240 | [
"MIT"
] | null | null | null | week01/test_f.py | wasit7/cn350 | a84a6ed04ada532e0a12c69d705cf3c15d7e0240 | [
"MIT"
] | null | null | null | week01/test_f.py | wasit7/cn350 | a84a6ed04ada532e0a12c69d705cf3c15d7e0240 | [
"MIT"
] | null | null | null | n=1
f(0) | 6.4 | 12 | 0.46875 |
33eef624cce407f1578fbc591f6a8b24eb12d230 | 2,047 | py | Python | otel_billing/otel_billing.py | rnishtala/otel_billing | 24f49458eb273d210f15c597953bd176a32f5e89 | [
"MIT"
] | null | null | null | otel_billing/otel_billing.py | rnishtala/otel_billing | 24f49458eb273d210f15c597953bd176a32f5e89 | [
"MIT"
] | null | null | null | otel_billing/otel_billing.py | rnishtala/otel_billing | 24f49458eb273d210f15c597953bd176a32f5e89 | [
"MIT"
] | null | null | null | """Main module."""
from sqlalchemy import create_engine
import pandas as pd
import collections
import logging
import re
from pprint import pprint
from typing import Sequence
from opentelemetry.metrics import Counter, Metric
from opentelemetry.sdk.metrics.export import (
MetricRecord,
MetricsExporter,
Metr... | 33.016129 | 90 | 0.521739 |
33f0d31e3a217367f0357c35df26fe4ef6403f03 | 4,410 | py | Python | broker/service/api/v10.py | bigsea-ufcg/bigsea-manager | 73235298308f55ae287a595fc1f056fbcc022b12 | [
"Apache-2.0"
] | 3 | 2017-03-21T20:03:53.000Z | 2018-05-03T16:27:32.000Z | broker/service/api/v10.py | bigsea-ufcg/bigsea-manager | 73235298308f55ae287a595fc1f056fbcc022b12 | [
"Apache-2.0"
] | 7 | 2017-07-17T10:34:34.000Z | 2018-05-16T14:04:57.000Z | broker/service/api/v10.py | bigsea-ufcg/bigsea-manager | 73235298308f55ae287a595fc1f056fbcc022b12 | [
"Apache-2.0"
] | 10 | 2017-04-17T14:30:27.000Z | 2018-09-04T14:55:11.000Z | # Copyright (c) 2017 UFCG-LSD.
#
# 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,... | 32.189781 | 76 | 0.65941 |
33f1df7af6076d426dfa10cdaf7eb926cc35605b | 362 | py | Python | Unit_B/chapter10_Lists/sampleCode/makeList.py | noynaert/csc184Handouts | c3e4c8824ee8d16b128abd771a8b5f8a2f01c0de | [
"Unlicense"
] | 2 | 2021-04-27T09:18:46.000Z | 2021-10-17T03:58:53.000Z | Unit_B/chapter10_Lists/sampleCode/makeList.py | noynaert/csc184Handouts | c3e4c8824ee8d16b128abd771a8b5f8a2f01c0de | [
"Unlicense"
] | null | null | null | Unit_B/chapter10_Lists/sampleCode/makeList.py | noynaert/csc184Handouts | c3e4c8824ee8d16b128abd771a8b5f8a2f01c0de | [
"Unlicense"
] | null | null | null | # creates a list and prints it
days = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"]
# traversing without an index
for day in days:
print(day)
# traversing with an index
for i in range(len(days)):
print(f"Day {i} is {days[i]}")
days[1] = "Lunes"
print("Day[1] is now ... | 21.294118 | 85 | 0.624309 |
33f2c47794c2f14e6aec70a212195a2870d2f836 | 826 | py | Python | cellacdc/models/YeaZ/__init__.py | SchmollerLab/Cell_ACDC | 2be9c0055c3306c4c35da99831f146d8a211baa0 | [
"BSD-3-Clause"
] | 29 | 2021-10-01T09:43:26.000Z | 2022-03-15T10:46:53.000Z | cellacdc/models/YeaZ/__init__.py | SchmollerLab/Cell_ACDC | 2be9c0055c3306c4c35da99831f146d8a211baa0 | [
"BSD-3-Clause"
] | 15 | 2022-02-04T09:21:43.000Z | 2022-03-31T08:29:00.000Z | cellacdc/models/YeaZ/__init__.py | SchmollerLab/Cell_ACDC | 2be9c0055c3306c4c35da99831f146d8a211baa0 | [
"BSD-3-Clause"
] | 1 | 2022-03-15T02:23:02.000Z | 2022-03-15T02:23:02.000Z | try:
import tensorflow
except ModuleNotFoundError:
pkg_name = 'tensorflow'
import os
import sys
import subprocess
from cellacdc import myutils
cancel = myutils.install_package_msg(pkg_name)
if cancel:
raise ModuleNotFoundError(
f'User aborted {pkg_name} installation'
... | 30.592593 | 79 | 0.635593 |
33f36e64be2e93d23e86bda79bdc0f169b48316e | 1,290 | py | Python | demos/shortify/shortify/utils.py | Ixyk-Wolf/aiohttp-demos | e26ef202e6fd4759f4c77f44cdbdbec482196b41 | [
"Apache-2.0"
] | 649 | 2017-10-27T10:55:59.000Z | 2022-03-29T07:14:09.000Z | demos/shortify/shortify/utils.py | xiaohuanshu/aiohttp-demos | 0d9898eec7e262ed0083159613de5d1ea1e98974 | [
"Apache-2.0"
] | 87 | 2017-10-27T11:12:06.000Z | 2021-08-17T18:36:59.000Z | demos/shortify/shortify/utils.py | xiaohuanshu/aiohttp-demos | 0d9898eec7e262ed0083159613de5d1ea1e98974 | [
"Apache-2.0"
] | 284 | 2017-11-05T13:24:51.000Z | 2022-03-12T03:37:55.000Z | import aioredis
import trafaret as t
import yaml
from aiohttp import web
CONFIG_TRAFARET = t.Dict(
{
t.Key('redis'): t.Dict(
{
'port': t.Int(),
'host': t.String(),
'db': t.Int(),
'minsize': t.Int(),
'maxsize': t.In... | 20.15625 | 66 | 0.54186 |
33f382e01faf075b62dec4b248210e8307fb81c2 | 1,667 | py | Python | anonymizers/location_anonymizer.py | zacharywilkins/anonymizac | c38ce30413f89f49b8e90cdca13c3739674d7b64 | [
"MIT"
] | null | null | null | anonymizers/location_anonymizer.py | zacharywilkins/anonymizac | c38ce30413f89f49b8e90cdca13c3739674d7b64 | [
"MIT"
] | null | null | null | anonymizers/location_anonymizer.py | zacharywilkins/anonymizac | c38ce30413f89f49b8e90cdca13c3739674d7b64 | [
"MIT"
] | null | null | null | from anonymizers.base_anonymizer import Anonymizer
| 38.767442 | 105 | 0.636473 |
33f77890d77ebb7d721abd90ddbfe421eb63ecdb | 5,838 | py | Python | Chapter05/python/init_data.py | iamssxn/PacktPublishingb | caadbf997f7f7a27601424b602fc554e7be931d4 | [
"MIT"
] | 18 | 2019-06-11T13:35:26.000Z | 2021-08-30T22:28:32.000Z | Chapter05/python/init_data.py | iamssxn/PacktPublishingb | caadbf997f7f7a27601424b602fc554e7be931d4 | [
"MIT"
] | 1 | 2019-10-10T12:27:44.000Z | 2019-10-10T12:27:44.000Z | Chapter05/python/init_data.py | iamssxn/PacktPublishingb | caadbf997f7f7a27601424b602fc554e7be931d4 | [
"MIT"
] | 8 | 2019-07-24T03:25:18.000Z | 2021-12-10T07:02:38.000Z | from pymongo import MongoClient
import json
if __name__ == '__main__':
main() | 46.704 | 143 | 0.626242 |
33f795c2e3982a688bb7022c730690391c8e4132 | 532 | py | Python | 067_MiDaS/01_float32/07_float16_quantization.py | IgiArdiyanto/PINTO_model_zoo | 9247b56a7dff37f28a8a7822a7ef4dd9adf7234d | [
"MIT"
] | 1,529 | 2019-12-11T13:36:23.000Z | 2022-03-31T18:38:27.000Z | 067_MiDaS/01_float32/07_float16_quantization.py | IgiArdiyanto/PINTO_model_zoo | 9247b56a7dff37f28a8a7822a7ef4dd9adf7234d | [
"MIT"
] | 200 | 2020-01-06T09:24:42.000Z | 2022-03-31T17:29:08.000Z | 067_MiDaS/01_float32/07_float16_quantization.py | IgiArdiyanto/PINTO_model_zoo | 9247b56a7dff37f28a8a7822a7ef4dd9adf7234d | [
"MIT"
] | 288 | 2020-02-21T14:56:02.000Z | 2022-03-30T03:00:35.000Z | ### tensorflow==2.3.1
import tensorflow as tf
# Float16 Quantization - Input/Output=float32
height = 384
width = 384
converter = tf.lite.TFLiteConverter.from_saved_model('saved_model')
converter.optimizations = [tf.lite.Optimize.DEFAULT]
converter.target_spec.supported_types = [tf.float16]
tflite_model = converter.c... | 35.466667 | 96 | 0.770677 |
33f7daec8520bf61c9a9ff557667fd5b5759236d | 2,598 | py | Python | experiments/e2_multi_directional_model_comparison/file_naming/rules/single_target_tree_rule_naming.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | 3 | 2020-08-03T19:25:44.000Z | 2021-06-27T22:25:55.000Z | experiments/e2_multi_directional_model_comparison/file_naming/rules/single_target_tree_rule_naming.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | null | null | null | experiments/e2_multi_directional_model_comparison/file_naming/rules/single_target_tree_rule_naming.py | joschout/Multi-Directional-Rule-Set-Learning | ef0620b115f4e0fd7fba3e752d238a8020c1ca6b | [
"Apache-2.0"
] | 2 | 2020-08-07T22:54:28.000Z | 2021-02-18T06:11:01.000Z | import os
from experiments.file_naming.single_target_classifier_indicator import SingleTargetClassifierIndicator
from project_info import project_dir
| 36.591549 | 102 | 0.734411 |
33f87e0f533a0c640931bd3fd8c3d5fa7efb74b8 | 1,291 | py | Python | devconf/ast/mixins/expression.py | everclear72216/ucapi | 7f5afbee6b3b772086d33c2ee37e85e65af61697 | [
"MIT"
] | null | null | null | devconf/ast/mixins/expression.py | everclear72216/ucapi | 7f5afbee6b3b772086d33c2ee37e85e65af61697 | [
"MIT"
] | 5 | 2019-03-04T16:17:30.000Z | 2019-05-04T08:34:19.000Z | devconf/ast/mixins/expression.py | everclear72216/ucapi | 7f5afbee6b3b772086d33c2ee37e85e65af61697 | [
"MIT"
] | null | null | null | import ast.value
import ast.qualifier
import ast.mixins.node
import ast.mixins.typed
import ast.mixins.qualified
| 23.907407 | 101 | 0.642912 |
33f916f81fdbf9453883ef52533bcab168ba5c0e | 911 | py | Python | todo/mail/delivery.py | sweetlearn/django-todo | 70cac8b4e926794126f831a766a1461fa5eae399 | [
"BSD-3-Clause"
] | 1 | 2019-03-23T08:53:53.000Z | 2019-03-23T08:53:53.000Z | todo/mail/delivery.py | sweetlearn/django-todo | 70cac8b4e926794126f831a766a1461fa5eae399 | [
"BSD-3-Clause"
] | null | null | null | todo/mail/delivery.py | sweetlearn/django-todo | 70cac8b4e926794126f831a766a1461fa5eae399 | [
"BSD-3-Clause"
] | null | null | null | import importlib
smtp_backend = _declare_backend('django.core.mail.backends.smtp.EmailBackend')
console_backend = _declare_backend('django.core.mail.backends.console.EmailBackend')
locmem_backend = _declare_backend('django.core.mail.backends.locmem.EmailBackend')
| 35.038462 | 84 | 0.710209 |
33f92dee740cb042eaee2c3fec74d44c25ed57fb | 795 | py | Python | models.py | 12DReflections/cab_trips | fc85ebd44056b1a340705164912d2f8c700415df | [
"BSD-Source-Code"
] | null | null | null | models.py | 12DReflections/cab_trips | fc85ebd44056b1a340705164912d2f8c700415df | [
"BSD-Source-Code"
] | null | null | null | models.py | 12DReflections/cab_trips | fc85ebd44056b1a340705164912d2f8c700415df | [
"BSD-Source-Code"
] | null | null | null | from database import Base
from sqlalchemy import Column, Integer, String, Boolean, ForeignKey, DateTime, Float
from sqlalchemy.types import DateTime
from flask import Flask, request, jsonify, make_response
from flask_sqlalchemy import SQLAlchemy
app = Flask(__name__)
app.config['SQLALCHEMY_TRACK_MODIFICATIONS'] = ... | 25.645161 | 84 | 0.78239 |
33f98f80566e3cf8e0e71b7f6386a2651df6888b | 4,131 | py | Python | census_api/census_query.py | chrispyles/census_api | bb543517e4226a075b28cc3d10f7a40403f79337 | [
"BSD-3-Clause"
] | null | null | null | census_api/census_query.py | chrispyles/census_api | bb543517e4226a075b28cc3d10f7a40403f79337 | [
"BSD-3-Clause"
] | null | null | null | census_api/census_query.py | chrispyles/census_api | bb543517e4226a075b28cc3d10f7a40403f79337 | [
"BSD-3-Clause"
] | null | null | null | #####################################
##### Class to Query Census API #####
#####################################
import requests
import json
import pandas as pd
import datascience as ds
from .utils import * | 29.719424 | 115 | 0.657952 |
33f9bc9ef4a0562402b71b8f52d5b6955d65ca99 | 264 | py | Python | tests/utils.py | mihhail-m/avaandmed-py | c64b07db989b9aff4cfa7f4e18efc0c47ae5e219 | [
"MIT"
] | null | null | null | tests/utils.py | mihhail-m/avaandmed-py | c64b07db989b9aff4cfa7f4e18efc0c47ae5e219 | [
"MIT"
] | 5 | 2022-03-17T15:00:23.000Z | 2022-03-26T08:33:19.000Z | tests/utils.py | mihhail-m/avaandmed-py | c64b07db989b9aff4cfa7f4e18efc0c47ae5e219 | [
"MIT"
] | null | null | null | import json
from pathlib import Path
| 18.857143 | 54 | 0.659091 |
33faf3e59ae2a6c2f4688c40e56760f5e45ff478 | 999 | py | Python | setup.py | ammarsys/pyanywhere-wrapper | d8cde2d29900c25fc7ab3cd8103923f727b5dade | [
"MIT"
] | 5 | 2021-06-25T14:34:52.000Z | 2021-07-04T14:15:13.000Z | setup.py | ammarsys/pyanywhere-wrapper | d8cde2d29900c25fc7ab3cd8103923f727b5dade | [
"MIT"
] | 1 | 2021-12-12T00:47:25.000Z | 2022-01-24T17:19:43.000Z | setup.py | ammarsys/pyanywhere-wrapper | d8cde2d29900c25fc7ab3cd8103923f727b5dade | [
"MIT"
] | 1 | 2021-12-14T15:44:52.000Z | 2021-12-14T15:44:52.000Z | import setuptools
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setuptools.setup(
name="pyaww",
version="0.0.3",
author="ammarsys",
author_email="amarftw1@gmail.com",
description="A simple API wrapper around the pythonanywhere's API.",
long_description=l... | 31.21875 | 72 | 0.627628 |
33fd5340f85ed0ca31c259e1144a71ef4b91e995 | 24,831 | py | Python | development/CAMInterp.py | kohanlee1995/MHCfovea | 040975e43926a5f8e344b642af6e900b74b50d02 | [
"MIT"
] | 4 | 2021-04-29T02:57:15.000Z | 2022-01-10T10:31:52.000Z | development/CAMInterp.py | kohanlee1995/MHCfovea | 040975e43926a5f8e344b642af6e900b74b50d02 | [
"MIT"
] | null | null | null | development/CAMInterp.py | kohanlee1995/MHCfovea | 040975e43926a5f8e344b642af6e900b74b50d02 | [
"MIT"
] | 1 | 2021-04-21T07:38:55.000Z | 2021-04-21T07:38:55.000Z | import os, sys, re, json, random, importlib
import numpy as np
import pandas as pd
from collections import OrderedDict
from tqdm import tqdm
import matplotlib
import matplotlib.pyplot as plt
import seaborn as sns
import logomaker as lm
from venn import venn
from venn import generate_petal_labels, draw_venn
from scipy.s... | 45.813653 | 127 | 0.568966 |
33feaaef9c20723000c009c977b27fc9c05c9b4d | 4,478 | py | Python | projects/imsend/imsend.py | ZJM6658/PythonProject | 8ca51a1551b20ccd696358941727188838e0e236 | [
"MIT"
] | 1 | 2021-06-09T02:06:17.000Z | 2021-06-09T02:06:17.000Z | projects/imsend/imsend.py | ZJM6658/PythonProject | 8ca51a1551b20ccd696358941727188838e0e236 | [
"MIT"
] | null | null | null | projects/imsend/imsend.py | ZJM6658/PythonProject | 8ca51a1551b20ccd696358941727188838e0e236 | [
"MIT"
] | null | null | null | #!usr/bin/python
# -*- coding: utf-8 -*-
' an im_send project '
# __author__ 'ZHU JIAMIN'
import sys
import mysql.connector #python3
import requests
import json
from os import path, access, R_OK # W_OK for write permission.
#python2ascii utf8
reload(sys)
sys.setdefaultencoding('utf8')
#
# 1.(mobile)
# 2.acc... | 23.202073 | 151 | 0.684457 |
d500b30356c6d10f466377f593728e458801fa4b | 556 | py | Python | manage.py | g90tony/tonys-perspective | c0296d8aabe7f170368341907e6b4015787347cd | [
"MIT"
] | null | null | null | manage.py | g90tony/tonys-perspective | c0296d8aabe7f170368341907e6b4015787347cd | [
"MIT"
] | null | null | null | manage.py | g90tony/tonys-perspective | c0296d8aabe7f170368341907e6b4015787347cd | [
"MIT"
] | null | null | null | from flask_script import Manager, Server
from flask_migrate import Migrate, MigrateCommand
from app import create_app, db
from app.models import User, Article, Category, Comment, Quote
app = create_app('development')
manager = Manager(app)
migrate= Migrate(app, db)
manager.add_command('db', MigrateCommand)
manager... | 26.47619 | 117 | 0.757194 |
d5025b15829b19f379302daca23271668cadecc4 | 389 | py | Python | setup.py | alvations/mindset | 05180a4bbf3162d97ffa148b0babc920764c6b1d | [
"MIT"
] | 2 | 2020-11-09T23:13:58.000Z | 2020-11-12T12:13:14.000Z | setup.py | alvations/mindset | 05180a4bbf3162d97ffa148b0babc920764c6b1d | [
"MIT"
] | null | null | null | setup.py | alvations/mindset | 05180a4bbf3162d97ffa148b0babc920764c6b1d | [
"MIT"
] | null | null | null | from distutils.core import setup
import setuptools
setup(
name = 'mindset',
packages = ['mindset'],
version = '0.0.1',
description = 'Mindset',
author = '',
url = 'https://github.com/alvations/mindset',
keywords = [],
classifiers = [
"Programming Language :: Python :: 3",
"License :: OSI Approv... | 21.611111 | 47 | 0.624679 |
d503452c7afa0f6d1b9b7a4cde6e1cea9bbc9d99 | 2,082 | py | Python | cir_project/cirp_user/scripts/camera_user.py | sprkrd/UPC-MAI-CIR | f9a6ef6e9c95534c1fdea6f9023c939bd89c2df8 | [
"MIT"
] | 1 | 2021-11-18T13:34:48.000Z | 2021-11-18T13:34:48.000Z | cir_project/cirp_user/scripts/camera_user.py | sprkrd/UPC-MAI-CIR | f9a6ef6e9c95534c1fdea6f9023c939bd89c2df8 | [
"MIT"
] | null | null | null | cir_project/cirp_user/scripts/camera_user.py | sprkrd/UPC-MAI-CIR | f9a6ef6e9c95534c1fdea6f9023c939bd89c2df8 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
import rospy
from std_msgs.msg import String
from peyetribe import EyeTribe
import time
from cir_user.srv import UserAction, UserActionResponse
TH1 = 1280*(1.0/3)
TH2 = 1280*(2.0/3)
IP = "192.168.101.72"
if __name__ == '__main__':
try:
user = CameraUserServer()
while True... | 28.135135 | 86 | 0.56292 |
d50550ea66d6bcca0e8c6d873de65a99c1e874cd | 833 | py | Python | captcha_bypass.py | ruroot/captcha_bypass | 6457d7bb6152ddd8d784bac8cd99488f2534013e | [
"MIT"
] | null | null | null | captcha_bypass.py | ruroot/captcha_bypass | 6457d7bb6152ddd8d784bac8cd99488f2534013e | [
"MIT"
] | null | null | null | captcha_bypass.py | ruroot/captcha_bypass | 6457d7bb6152ddd8d784bac8cd99488f2534013e | [
"MIT"
] | null | null | null | import requests
cookie = {'_ga':'GA1.2.1373385590.1498799275','_gid':'GA1.2.867459789.1498799275','_gat':'1','PHPSESSID':'1kr76vh1164sbgeflnngimi321'}
url = 'http://captcha.ringzer0team.com:7421'
headers = {'Authorization':'Basic Y2FwdGNoYTpRSmM5VTZ3eEQ0U0ZUMHU='}
for i in range(1000):
# get captacha
r = requests.g... | 55.533333 | 134 | 0.727491 |
d505765173ba8ae48d059a5d6519553fdbd987f4 | 685 | py | Python | antlr-python/ChatErrorListener.py | evilkirin/antlr-mega-tutorial | 91135a7b2fc9e99b9fc500b290a4a2893d328bf8 | [
"MIT"
] | 138 | 2017-03-08T14:29:54.000Z | 2020-04-25T23:00:26.000Z | antlr-python/ChatErrorListener.py | evilkirin/antlr-mega-tutorial | 91135a7b2fc9e99b9fc500b290a4a2893d328bf8 | [
"MIT"
] | 17 | 2020-05-08T10:10:39.000Z | 2022-01-21T20:40:16.000Z | lifestyle/antlr-mega-tutorial-master/antlr-python/ChatErrorListener.py | pennz/antlr_lifestyle | e97f0a2e125fc851b637ef854e5d4968491acb42 | [
"BSD-3-Clause"
] | 38 | 2017-03-15T02:44:17.000Z | 2020-03-30T10:24:15.000Z | import sys
from antlr4 import *
from ChatParser import ChatParser
from ChatListener import ChatListener
from antlr4.error.ErrorListener import *
import io | 29.782609 | 85 | 0.646715 |
d50622fc11746b41527aa6f48d3bb22b36bbce6d | 568 | py | Python | home/urls.py | auxfuse/ci-hackathon-app | 87d5ad7aae33c15f535ceed28e1657a014159516 | [
"MIT"
] | 11 | 2020-10-06T13:50:46.000Z | 2021-02-27T20:19:17.000Z | home/urls.py | auxfuse/ci-hackathon-app | 87d5ad7aae33c15f535ceed28e1657a014159516 | [
"MIT"
] | 174 | 2020-10-13T18:25:34.000Z | 2022-01-17T09:49:18.000Z | home/urls.py | auxfuse/ci-hackathon-app | 87d5ad7aae33c15f535ceed28e1657a014159516 | [
"MIT"
] | 46 | 2020-10-14T11:27:20.000Z | 2022-01-31T17:48:12.000Z | from django.urls import path
from . import views
urlpatterns = [
path("", views.home, name="home"),
path("faq/", views.faq, name="faq"),
path("plagiarism_policy/", views.plagiarism_policy,
name="plagiarism_policy"),
path("privacy_policy/", views.privacy_policy, name="privacy_policy"),
path... | 33.411765 | 79 | 0.68662 |
d5068f56351c172f868906780ca7bfa27fd8680d | 13,750 | py | Python | ogreyMaterialTool.py | opengd/OgreyTool | 42e169fe530458084c20d6fb3e7a2dc78f1ac487 | [
"MIT"
] | null | null | null | ogreyMaterialTool.py | opengd/OgreyTool | 42e169fe530458084c20d6fb3e7a2dc78f1ac487 | [
"MIT"
] | null | null | null | ogreyMaterialTool.py | opengd/OgreyTool | 42e169fe530458084c20d6fb3e7a2dc78f1ac487 | [
"MIT"
] | null | null | null | import wx
from ogreyPopupMenu import *
from ogreyOgreManagers import *
from ogreyTool import *
ta1, ta2 = Test(), Test()
assert ta1 is ta2
tb1, tb2 = Test(5), Test(5)
assert tb1 is tb2
assert ta1 is not tb1
| 43.650794 | 203 | 0.583782 |
d506de8e02af069210ffd80855347f0a1726c56d | 2,366 | py | Python | utils/nlp.py | dominikmn/one-million-posts | a628e88874ca7134a7628d88de169e8520f8deba | [
"MIT"
] | null | null | null | utils/nlp.py | dominikmn/one-million-posts | a628e88874ca7134a7628d88de169e8520f8deba | [
"MIT"
] | 95 | 2021-03-26T14:37:37.000Z | 2021-09-07T08:26:03.000Z | utils/nlp.py | dominikmn/one-million-posts | a628e88874ca7134a7628d88de169e8520f8deba | [
"MIT"
] | 2 | 2021-04-19T15:43:57.000Z | 2021-04-19T15:57:47.000Z | import nltk
nltk.download('stopwords')
from nltk.corpus import stopwords
stopwords=stopwords.words('german')
nltk.download('punkt')
from nltk.stem.snowball import SnowballStemmer
import spacy
from spacy_iwnlp import spaCyIWNLP
nlp=spacy.load('de') #You need to download the 'de'-module in advance. This will be done auto... | 38.16129 | 181 | 0.695689 |
d5079b7e4434645da0fb5e3ffaa6425629f4d22f | 2,960 | py | Python | heat/engine/resources/__init__.py | pshchelo/heat | 6cf94a3ece89d77b839f61292e5f023c3f192c82 | [
"Apache-2.0"
] | null | null | null | heat/engine/resources/__init__.py | pshchelo/heat | 6cf94a3ece89d77b839f61292e5f023c3f192c82 | [
"Apache-2.0"
] | null | null | null | heat/engine/resources/__init__.py | pshchelo/heat | 6cf94a3ece89d77b839f61292e5f023c3f192c82 | [
"Apache-2.0"
] | null | null | null | #
# 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
# ... | 31.827957 | 79 | 0.731757 |
d509b5f72e083aa61cb8b128a7291eccbddaaf89 | 858 | py | Python | research/02_TrafficSignClassification/02_CarNDTrafficSignClassifier/source/path/run.py | LewisCollum/frostAV | f17966b2646640ee1d29f80f951f9622fdbbb78a | [
"MIT"
] | 5 | 2020-04-20T09:56:59.000Z | 2022-01-10T15:51:02.000Z | research/02_TrafficSignClassification/02_CarNDTrafficSignClassifier/source/path/run.py | LewisCollum/frostAV | f17966b2646640ee1d29f80f951f9622fdbbb78a | [
"MIT"
] | 1 | 2020-08-26T01:04:55.000Z | 2020-08-26T02:00:14.000Z | research/02_TrafficSignClassification/02_CarNDTrafficSignClassifier/source/path/run.py | LewisCollum/frostAV | f17966b2646640ee1d29f80f951f9622fdbbb78a | [
"MIT"
] | 2 | 2020-01-21T18:58:53.000Z | 2020-05-20T04:24:40.000Z | import os
from datetime import datetime
directory = "../runs"
current = os.path.join(directory, ".current")
| 26.8125 | 61 | 0.635198 |
d50ac85d5573725c47a9716c89b128de25b4d933 | 415 | py | Python | flask_code/day02_request/12xss.py | haitaoss/flask_study | c8431f17c1156b7086d85c914edbfb5293ae50f1 | [
"Apache-2.0"
] | null | null | null | flask_code/day02_request/12xss.py | haitaoss/flask_study | c8431f17c1156b7086d85c914edbfb5293ae50f1 | [
"Apache-2.0"
] | null | null | null | flask_code/day02_request/12xss.py | haitaoss/flask_study | c8431f17c1156b7086d85c914edbfb5293ae50f1 | [
"Apache-2.0"
] | null | null | null | # coding:utf-8
from flask import Flask, render_template, request
# flask
app = Flask(__name__)
#
# flas
if __name__ == '__main__':
app.run(host='0.0.0.0', port=8080, debug=True)
# manager.run()
| 17.291667 | 50 | 0.626506 |
d50c7c2f1fa783afbf677f62ca8de9f21c378df9 | 1,543 | py | Python | mk312/constants.py | bkifft/mk312com | a36fd20bc8518f81e2de23c9fff28296cb9cb6d6 | [
"MIT"
] | 2 | 2022-03-12T14:09:46.000Z | 2022-03-16T21:44:34.000Z | mk312/constants.py | bkifft/mk312com | a36fd20bc8518f81e2de23c9fff28296cb9cb6d6 | [
"MIT"
] | 1 | 2021-04-15T17:58:43.000Z | 2021-04-15T17:58:43.000Z | mk312/constants.py | Rubberfate/mk312com | a36fd20bc8518f81e2de23c9fff28296cb9cb6d6 | [
"MIT"
] | 2 | 2021-03-16T20:32:59.000Z | 2022-03-12T14:30:16.000Z | # -*- coding: utf-8 -*-
# Memory addresses
ADDRESS_R15 = 0x400f
ADDRESS_ADC_POWER = 0x4062
ADDRESS_ADC_BATTERY = 0x4063
ADDRESS_LEVELA = 0x4064
ADDRESS_LEVELB = 0x4065
ADDRESS_PUSH_BUTTON = 0x4068
ADDRESS_COMMAND_1 = 0x4070
ADDRESS_COMMAND_2 = 0x4071
ADDRESS_MA_MIN_VALUE = 0x4086
ADDRESS_MA_MAX_VALUE = 0x4087
ADDRESS_... | 20.302632 | 38 | 0.813999 |
d50e3b87908d0499a5a93735ec1c8322d076f909 | 3,359 | py | Python | nerlogparser/grammar/bluegenelog.py | studiawan/nerlogparser | 4dc3d955f735ea5496557ee76378a38b5746e425 | [
"Apache-2.0"
] | 5 | 2018-12-20T00:51:30.000Z | 2022-02-08T17:38:33.000Z | nerlogparser/grammar/bluegenelog.py | studiawan/nerlogparser | 4dc3d955f735ea5496557ee76378a38b5746e425 | [
"Apache-2.0"
] | 1 | 2022-02-16T08:49:51.000Z | 2022-02-17T02:19:01.000Z | nerlogparser/grammar/bluegenelog.py | studiawan/nerlogparser | 4dc3d955f735ea5496557ee76378a38b5746e425 | [
"Apache-2.0"
] | 8 | 2020-03-20T11:10:16.000Z | 2022-01-28T16:46:15.000Z | import os
import csv
from pyparsing import Word, alphas, Combine, nums, Regex, ParseException
from collections import OrderedDict
if __name__ == '__main__':
dataset_path = '/home/hudan/Git/prlogparser/datasets/'
filenames = ['bgl2/bgl2']
test_file = '/home/hudan/Git/prlogparser/groundtruth/test-results/... | 33.929293 | 115 | 0.572492 |
d50eb66f6a2f65dfb75bacdcb2e90ded759fc355 | 2,106 | py | Python | wagtailcomments/views.py | takeflight/wagtailcomments | 941ae2f16fccb867a33d2ed4c21b8e5e04af712d | [
"BSD-3-Clause"
] | 7 | 2016-09-28T10:51:44.000Z | 2018-09-29T08:27:23.000Z | wagtailcomments/views.py | takeflight/wagtailcomments | 941ae2f16fccb867a33d2ed4c21b8e5e04af712d | [
"BSD-3-Clause"
] | null | null | null | wagtailcomments/views.py | takeflight/wagtailcomments | 941ae2f16fccb867a33d2ed4c21b8e5e04af712d | [
"BSD-3-Clause"
] | 2 | 2017-05-21T08:41:19.000Z | 2018-08-06T13:50:59.000Z | from django.contrib import messages
from django.contrib.contenttypes.models import ContentType
from django.http import Http404, HttpResponseRedirect
from django.shortcuts import get_object_or_404
from django.template.response import TemplateResponse
from wagtailcomments import registry
from wagtailcomments.models impo... | 42.979592 | 79 | 0.727445 |
d50f0e9cbb19e05d48c36acf153af68b7038da01 | 2,468 | py | Python | open_mafia_engine/built_in/roleblock.py | open-mafia/open_mafia_engine | 19296748757a4a18d395a940d30aa48aaac9dd7a | [
"Apache-2.0"
] | 9 | 2018-08-19T21:47:00.000Z | 2021-11-30T20:46:09.000Z | open_mafia_engine/built_in/roleblock.py | open-mafia/open_mafia_engine | 19296748757a4a18d395a940d30aa48aaac9dd7a | [
"Apache-2.0"
] | 2 | 2021-05-16T00:12:39.000Z | 2021-05-16T18:36:47.000Z | open_mafia_engine/built_in/roleblock.py | open-mafia/open_mafia_engine | 19296748757a4a18d395a940d30aa48aaac9dd7a | [
"Apache-2.0"
] | 2 | 2020-11-28T06:13:10.000Z | 2021-05-16T22:23:22.000Z | from typing import List, Optional
from open_mafia_engine.core.all import (
Ability,
Action,
Actor,
ATBase,
CancelAction,
EPreAction,
Game,
GameObject,
handler,
)
from .auxiliary import TempPhaseAux
RoleBlockAbility = Ability.generate(
RoleBlockAction,
params=["target"],... | 24.929293 | 84 | 0.598865 |
d5136a0af274a53470c429bc113f5296b87d7800 | 6,836 | py | Python | covid_data/daily_updates/update_outbreak.py | gunnarsundberg/covid-tracker | 012f48f4fbeeff6123456196349a4122f927416a | [
"MIT"
] | null | null | null | covid_data/daily_updates/update_outbreak.py | gunnarsundberg/covid-tracker | 012f48f4fbeeff6123456196349a4122f927416a | [
"MIT"
] | 5 | 2021-03-30T14:37:56.000Z | 2021-10-11T17:33:20.000Z | covid_data/daily_updates/update_outbreak.py | gunnarsundberg/covid-tracker | 012f48f4fbeeff6123456196349a4122f927416a | [
"MIT"
] | null | null | null | import os
import io
import math
import requests
from datetime import datetime, date, timedelta
import pandas as pd
from covid_data.models import State, County, Outbreak, OutbreakCumulative
from covid_data.utilities import get_datetime_from_str, api_request_from_str
# Some functions only work for specific region types ... | 42.459627 | 304 | 0.599912 |
d51442e5802a7e7a7d3c8bda504b303ddbb541d1 | 483 | py | Python | books/PythonAutomate/webscrap/using_bs4.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonAutomate/webscrap/using_bs4.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | books/PythonAutomate/webscrap/using_bs4.py | zeroam/TIL | 43e3573be44c7f7aa4600ff8a34e99a65cbdc5d1 | [
"MIT"
] | null | null | null | import bs4
with open("example.html") as f:
# BeautifulSoup
soup = bs4.BeautifulSoup(f.read(), "lxml")
print(type(soup)) # <class 'bs4.BeautifulSoup'>
# id author
elems = soup.select("#author")
print(type(elems)) # <class 'list'>
print(type(elems[0])) # <class 'bs4.element.Tag'>
#
print(str(el... | 19.32 | 50 | 0.654244 |
d5149d3b5b3f45cac244c29fa5eaa4c2f9bbaeff | 109 | py | Python | __init__.py | dl-fmi/bottleneck | bc8795731d148839b1fd6bf6e510abc7968a669d | [
"BSD-2-Clause"
] | null | null | null | __init__.py | dl-fmi/bottleneck | bc8795731d148839b1fd6bf6e510abc7968a669d | [
"BSD-2-Clause"
] | null | null | null | __init__.py | dl-fmi/bottleneck | bc8795731d148839b1fd6bf6e510abc7968a669d | [
"BSD-2-Clause"
] | null | null | null | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Thu Jun 13 11:34:33 2019
@author: manninan
""" | 15.571429 | 35 | 0.614679 |
d5155bb3abd235bf78598d767115ae4c2571c009 | 55 | py | Python | pytorchltr/__init__.py | rjagerman/pytorchltr | 625416e1e7d21fb2bbc485914704fc2e55274556 | [
"MIT"
] | 37 | 2020-05-24T13:40:52.000Z | 2022-03-17T09:00:52.000Z | pytorchltr/__init__.py | SuperXiang/pytorchltr | 625416e1e7d21fb2bbc485914704fc2e55274556 | [
"MIT"
] | 22 | 2020-05-25T11:35:38.000Z | 2021-03-20T04:08:07.000Z | pytorchltr/__init__.py | SuperXiang/pytorchltr | 625416e1e7d21fb2bbc485914704fc2e55274556 | [
"MIT"
] | 4 | 2020-10-16T13:14:16.000Z | 2022-01-31T17:18:20.000Z | r"""
.. include::../README.md
:start-line: 1
"""
| 7.857143 | 24 | 0.472727 |
d51574f35003d93d91b7a70eebae9e1bc40963ce | 8,548 | py | Python | ImageNet/lib/validation.py | mhilmiasyrofi/AT_HE | c63c36a0661d826e58eb355914c6758f85981ff3 | [
"Apache-2.0"
] | 107 | 2020-06-15T09:55:11.000Z | 2020-12-20T11:27:11.000Z | pytorch_ares/third_party/AT_HE/ImageNet/lib/validation.py | haichen-ber/ares | 474d549aa402b4cdd5e3629d23d035c31b60a360 | [
"MIT"
] | 7 | 2020-06-14T03:00:18.000Z | 2020-12-07T07:10:10.000Z | pytorch_ares/third_party/AT_HE/ImageNet/lib/validation.py | haichen-ber/ares | 474d549aa402b4cdd5e3629d23d035c31b60a360 | [
"MIT"
] | 19 | 2020-06-14T08:35:33.000Z | 2020-12-19T13:43:41.000Z | from utils import *
import torch
import sys
import numpy as np
import time
import torchvision
from torch.autograd import Variable
import torchvision.transforms as transforms
import torchvision.datasets as datasets
| 37.491228 | 167 | 0.565746 |
d515e1181cd1a83ccea9dcf3b0c0c3bdba283864 | 2,493 | py | Python | scripts/merge.py | vsui/hypergraph-k-cut | 1134ca254fb709bce62a4506c931362d84a06894 | [
"MIT"
] | 2 | 2021-01-17T07:31:36.000Z | 2021-07-14T08:36:50.000Z | scripts/merge.py | vsui/hypergraph-k-cut | 1134ca254fb709bce62a4506c931362d84a06894 | [
"MIT"
] | null | null | null | scripts/merge.py | vsui/hypergraph-k-cut | 1134ca254fb709bce62a4506c931362d84a06894 | [
"MIT"
] | null | null | null | #!/usr/bin/env python3
"""This is a script for making graphs of constant rank instances with varying rank
Usage:
<script> <src_dir> <dest_dir>
Where <src_dir> is a directory with subfolders
```
constant02
constant04
...
```
And each subfolder has a file `data.csv` with the CXY run in it.
This combines the graphs o... | 24.683168 | 112 | 0.638187 |
1d0fdb41642d7e059e2af9967d0a5707e8be001c | 1,829 | py | Python | StationeryBG.py | CharlesW1970/Handright | cda9400232e1815f7137ab3bd86ded8e307f35c7 | [
"BSD-3-Clause"
] | 1 | 2020-10-14T06:05:35.000Z | 2020-10-14T06:05:35.000Z | StationeryBG.py | CharlesW1970/Handright | cda9400232e1815f7137ab3bd86ded8e307f35c7 | [
"BSD-3-Clause"
] | null | null | null | StationeryBG.py | CharlesW1970/Handright | cda9400232e1815f7137ab3bd86ded8e307f35c7 | [
"BSD-3-Clause"
] | null | null | null | # coding: utf-8
from PIL import Image, ImageFont
from handright import Template, handwrite
text = """
"""
imagex = Image.open("./pic/stationeryBackground.jpg")
width, height = imagex.size
imagex = imagex.resize((width * 2, height * 2), resample=Image.LANCZOS)
template = Template(backgroun... | 43.547619 | 172 | 0.783488 |
1d117bf0adf1a9cc2baa3df6d95a6f65e94df2bb | 4,627 | py | Python | api/metadata/views.py | cad106uk/market-access-api | a357c33bbec93408b193e598a5628634126e9e99 | [
"MIT"
] | null | null | null | api/metadata/views.py | cad106uk/market-access-api | a357c33bbec93408b193e598a5628634126e9e99 | [
"MIT"
] | null | null | null | api/metadata/views.py | cad106uk/market-access-api | a357c33bbec93408b193e598a5628634126e9e99 | [
"MIT"
] | null | null | null | from django.conf import settings
from hawkrest import HawkAuthentication
from rest_framework import generics, status
from rest_framework.permissions import IsAuthenticated
from rest_framework.response import Response
from .constants import (
BARRIER_PENDING,
BARRIER_SOURCE,
BarrierStatus,
BARRIER_CHA... | 37.92623 | 79 | 0.706938 |
1d14d1a8f4768aa5af1d7409da82dc30b96fd135 | 367 | py | Python | test_memory.py | dbstein/python_examples | 664142b5f8e5f58c04f1d588bc6659221dc6b0a9 | [
"Apache-2.0"
] | null | null | null | test_memory.py | dbstein/python_examples | 664142b5f8e5f58c04f1d588bc6659221dc6b0a9 | [
"Apache-2.0"
] | null | null | null | test_memory.py | dbstein/python_examples | 664142b5f8e5f58c04f1d588bc6659221dc6b0a9 | [
"Apache-2.0"
] | null | null | null | import numpy as np
from numexpr_kernel import numexpr_kernel
from numba_kernel import numba_kernel
N = 10000
x = np.random.rand(N)
y = np.random.rand(N)
z = np.random.rand(N)
tau = np.random.rand(N)
r1 = numexpr_kernel(x, y, z, tau)
r1 = numexpr_kernel(x, y, z, tau)
r2 = np.zeros(N, dtype=float)
numba_kernel(x, y, z,... | 22.9375 | 41 | 0.700272 |
1d168df70c241bffc650db1634940f97996ff8f9 | 151 | py | Python | 8kyu/grasshopper_combine_strings.py | nhsz/codewars | 82703959e910254d6feff4162f78c6dbd7a1c3ed | [
"MIT"
] | 1 | 2018-12-02T23:04:38.000Z | 2018-12-02T23:04:38.000Z | 8kyu/grasshopper_combine_strings.py | nhsz/codewars | 82703959e910254d6feff4162f78c6dbd7a1c3ed | [
"MIT"
] | null | null | null | 8kyu/grasshopper_combine_strings.py | nhsz/codewars | 82703959e910254d6feff4162f78c6dbd7a1c3ed | [
"MIT"
] | null | null | null | # http://www.codewars.com/kata/55f73f66d160f1f1db000059/
| 30.2 | 56 | 0.754967 |
1d17af49d97762d297a5faa5d4a099f944bdc291 | 1,125 | py | Python | PG/project/myapp/urls.py | vishalimpinge7696/vishal_pg | c881b8d6d784b764700d2068226cb725c16f9490 | [
"Apache-2.0"
] | null | null | null | PG/project/myapp/urls.py | vishalimpinge7696/vishal_pg | c881b8d6d784b764700d2068226cb725c16f9490 | [
"Apache-2.0"
] | null | null | null | PG/project/myapp/urls.py | vishalimpinge7696/vishal_pg | c881b8d6d784b764700d2068226cb725c16f9490 | [
"Apache-2.0"
] | null | null | null | """project URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/3.0/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: path('', views.home, name='home')
Class-based... | 37.5 | 77 | 0.68 |
1d1827406da3b2f551eb53c92ceb578ffb31e0ff | 3,425 | py | Python | full_test_data_svm_rbf.py | HarikrishnanNB/occd_experiments | e078030348133a564400a5b27057400c69ddfd92 | [
"Apache-2.0"
] | null | null | null | full_test_data_svm_rbf.py | HarikrishnanNB/occd_experiments | e078030348133a564400a5b27057400c69ddfd92 | [
"Apache-2.0"
] | null | null | null | full_test_data_svm_rbf.py | HarikrishnanNB/occd_experiments | e078030348133a564400a5b27057400c69ddfd92 | [
"Apache-2.0"
] | 1 | 2021-02-14T06:14:47.000Z | 2021-02-14T06:14:47.000Z | """
This module give the classification results for test data using SVM with RBF
kernel.
Email: harikrishnannb07@gmail.com
Dtd: 2 - August - 2020
Parameters
----------
classification_type : string
DESCRIPTION - classification_type == "binary_class" loads binary classification artificial data.
class... | 40.77381 | 141 | 0.771095 |
1d1ad6315c73b6924e164f03e7e42156df8826eb | 1,224 | py | Python | cogs/WelcomeCog.py | tandemdude/DevilDonkey | be2c561f73c42aa2d5016e186bef2538658475d5 | [
"MIT"
] | 1 | 2021-08-22T17:34:41.000Z | 2021-08-22T17:34:41.000Z | cogs/WelcomeCog.py | tandemdude/DevilDonkey | be2c561f73c42aa2d5016e186bef2538658475d5 | [
"MIT"
] | null | null | null | cogs/WelcomeCog.py | tandemdude/DevilDonkey | be2c561f73c42aa2d5016e186bef2538658475d5 | [
"MIT"
] | null | null | null | # User welcome extension coded by github u/tandemdude
# https://github.com/tandemdude
import discord
import json
from discord.ext import commands
| 29.142857 | 97 | 0.747549 |
1d1b331ff1ab098a4c5dbc7bd53b72d465dadc1d | 293 | py | Python | configurations.py | KumundzhievMaxim/WearingGlassesClassification | ae78a258735e852a1fbb9d9d9876f9ea74320153 | [
"MIT"
] | 1 | 2021-06-05T13:10:07.000Z | 2021-06-05T13:10:07.000Z | configurations.py | KumundzhievMaxim/WearingGlassesClassification | ae78a258735e852a1fbb9d9d9876f9ea74320153 | [
"MIT"
] | null | null | null | configurations.py | KumundzhievMaxim/WearingGlassesClassification | ae78a258735e852a1fbb9d9d9876f9ea74320153 | [
"MIT"
] | null | null | null | # ------------------------------------------
#
# Program created by Maksim Kumundzhiev
#
#
# email: kumundzhievmaxim@gmail.com
# github: https://github.com/KumundzhievMaxim
# -------------------------------------------
BATCH_SIZE = 10
IMG_SIZE = (160, 160)
MODEL_PATH = 'checkpoints/model'
| 20.928571 | 45 | 0.511945 |
1d1cbe4a45b8515cd47580925c5d9d6956f0f60a | 10,247 | py | Python | conditional/models/migrate.py | adamhb123/conditional | 7193443106f83e8260b61535b6d6a253f01133f8 | [
"MIT"
] | 2 | 2020-06-27T09:11:59.000Z | 2020-12-27T17:49:50.000Z | conditional/models/migrate.py | adamhb123/conditional | 7193443106f83e8260b61535b6d6a253f01133f8 | [
"MIT"
] | null | null | null | conditional/models/migrate.py | adamhb123/conditional | 7193443106f83e8260b61535b6d6a253f01133f8 | [
"MIT"
] | null | null | null | from sqlalchemy import create_engine
from sqlalchemy.orm import scoped_session, sessionmaker
from conditional import db
from conditional.models import models, old_models as zoo
import flask_migrate
# pylint: skip-file
old_engine = None
zoo_session = None
# Takes in param of SqlAlchemy Database Connection String
#... | 29.530259 | 103 | 0.539865 |
1d1e074b61872504f96ce32330f37d8ab5634c26 | 789 | py | Python | ch04/cross_entropy_error.py | sankaku/deep-learning-from-scratch-py | 70ec531578f099136744d2c1ec11959b239c3854 | [
"MIT"
] | null | null | null | ch04/cross_entropy_error.py | sankaku/deep-learning-from-scratch-py | 70ec531578f099136744d2c1ec11959b239c3854 | [
"MIT"
] | null | null | null | ch04/cross_entropy_error.py | sankaku/deep-learning-from-scratch-py | 70ec531578f099136744d2c1ec11959b239c3854 | [
"MIT"
] | null | null | null | import numpy as np
if __name__ == '__main__':
t = np.array([0, 1, 0, 0, 0, 0, 0, 0, 0, 0])
y1 = np.array([1, 0, 0, 0, 0, 0, 0, 0, 0, 0])
y2 = np.array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
y3 = np.array([0.1, 0.9, 0.3, 0.3, 0, 0, 0.2, 0, 0, 0.6])
print('t = {0}'.format(t))
print('y1 = {0}, cross_... | 31.56 | 61 | 0.536122 |
1d1e45fe56dabcf2ddf962ee15b1e9639fc43965 | 466 | py | Python | day-02/part-2/david.py | badouralix/adventofcode-2018 | 543ce39d4eeb7d9d695459ffadca001a8c56386d | [
"MIT"
] | 31 | 2018-12-01T00:43:40.000Z | 2020-05-30T05:18:59.000Z | day-02/part-2/david.py | badouralix/adventofcode-2018 | 543ce39d4eeb7d9d695459ffadca001a8c56386d | [
"MIT"
] | 14 | 2018-12-01T12:14:26.000Z | 2021-05-07T22:41:47.000Z | day-02/part-2/david.py | badouralix/adventofcode-2018 | 543ce39d4eeb7d9d695459ffadca001a8c56386d | [
"MIT"
] | 10 | 2018-12-01T23:38:34.000Z | 2020-12-28T13:36:10.000Z | from tool.runners.python import SubmissionPy
| 25.888889 | 44 | 0.48927 |
1d20d0efe9e2afc5c843ccc72c38d5f99d5237b5 | 3,653 | py | Python | Plug-ins/PlexSportsAgent.bundle/Contents/Code/Teams/NFL/ProFootballReferenceFranchiseAdapter.py | waldosax/PlexSports | 404058921e4be02b93ad155bdaef768ff917620e | [
"MIT"
] | 5 | 2021-07-09T01:05:47.000Z | 2021-09-06T02:23:12.000Z | Plug-ins/PlexSportsAgent.bundle/Contents/Code/Teams/NFL/ProFootballReferenceFranchiseAdapter.py | waldosax/PlexSports | 404058921e4be02b93ad155bdaef768ff917620e | [
"MIT"
] | 1 | 2022-01-08T04:04:56.000Z | 2022-01-08T04:04:56.000Z | Plug-ins/PlexSportsAgent.bundle/Contents/Code/Teams/NFL/ProFootballReferenceFranchiseAdapter.py | waldosax/PlexSports | 404058921e4be02b93ad155bdaef768ff917620e | [
"MIT"
] | null | null | null | # Pro-Football-Reference.com
# TEAMS
import re, os
import uuid
import json
from datetime import datetime, date, time
from bs4 import BeautifulSoup
import bs4
from Constants import *
from PathUtils import *
from PluginSupport import *
from Serialization import *
from StringUtils import *
import ProFoo... | 29.224 | 123 | 0.636463 |
1d21e44ef2cd9394beeecb747e4069887cb35e0e | 9,565 | py | Python | KfoldBERT.py | JamesUOA/K-Fold-CrossValidation | 451b9ce3cd529c450922d52d436e6983f52b6fe0 | [
"Apache-2.0"
] | 1 | 2020-10-25T03:43:57.000Z | 2020-10-25T03:43:57.000Z | KfoldBERT.py | JamesUOA/K-Fold-CrossValidation | 451b9ce3cd529c450922d52d436e6983f52b6fe0 | [
"Apache-2.0"
] | null | null | null | KfoldBERT.py | JamesUOA/K-Fold-CrossValidation | 451b9ce3cd529c450922d52d436e6983f52b6fe0 | [
"Apache-2.0"
] | null | null | null | import torch
import numpy as np
import time
import datetime
import random
from Kfold import KFold
from split_data import DataManager
from transformers import BertTokenizer
from transformers import BertTokenizer
from torch.utils.data import TensorDataset, random_split
from torch.utils.data import DataLoader, RandomSamp... | 40.529661 | 118 | 0.540408 |
1d224808f2a6914ef8278b9e81b293979d0a85e1 | 7,957 | py | Python | kdc/kdc.py | cesium12/webathena | 3ccd870bf7543966e613cf36dbbbb1aabf53e581 | [
"MIT"
] | null | null | null | kdc/kdc.py | cesium12/webathena | 3ccd870bf7543966e613cf36dbbbb1aabf53e581 | [
"MIT"
] | null | null | null | kdc/kdc.py | cesium12/webathena | 3ccd870bf7543966e613cf36dbbbb1aabf53e581 | [
"MIT"
] | null | null | null | #!/usr/bin/env python
# pylint: disable=invalid-name
""" Web-based proxy to a Kerberos KDC for Webathena. """
import base64
import json
import os
import select
import socket
import dns.resolver
from pyasn1.codec.der import decoder as der_decoder
from pyasn1.codec.der import encoder as der_encoder
from pyasn1.error im... | 34.150215 | 98 | 0.613045 |
1d248c7603b5f2ad59f69f3e1de31b7ccc44d34b | 1,980 | py | Python | dedupsqlfs/db/migrations/m20171103001.py | tabulon-ext/dedupsqlfs | 9dfbed17450e7f2a499a7381e0368d08ae3c700d | [
"MIT"
] | 22 | 2015-04-09T09:00:00.000Z | 2022-03-23T00:16:04.000Z | dedupsqlfs/db/migrations/m20171103001.py | tabulon-ext/dedupsqlfs | 9dfbed17450e7f2a499a7381e0368d08ae3c700d | [
"MIT"
] | 119 | 2015-02-11T21:39:27.000Z | 2021-07-27T23:04:49.000Z | dedupsqlfs/db/migrations/m20171103001.py | tabulon-ext/dedupsqlfs | 9dfbed17450e7f2a499a7381e0368d08ae3c700d | [
"MIT"
] | 7 | 2016-03-16T11:53:45.000Z | 2022-02-24T13:47:31.000Z | # -*- coding: utf8 -*-
#
# DB migration 001 by 2017-11-03
#
# New statistics for subvolume - root diff in blocks / bytes
#
__author__ = 'sergey'
__NUMBER__ = 20171103001
def run(manager):
"""
:param manager: Database manager
:type manager: dedupsqlfs.db.sqlite.manager.DbManager|dedupsqlfs.db.mysql.manage... | 30 | 101 | 0.622222 |
1d268f5884d3edaa2ebd73f6bea09ab2e7e7400f | 582 | py | Python | tests/test_keywords.py | VeerendraNathLukkani/pytest_test | c39a1a7e74d90aebeb30797a61d0e491942557e8 | [
"Apache-2.0"
] | 51 | 2018-04-26T09:02:38.000Z | 2021-11-21T10:57:32.000Z | tests/test_keywords.py | VeerendraNathLukkani/pytest_test | c39a1a7e74d90aebeb30797a61d0e491942557e8 | [
"Apache-2.0"
] | 39 | 2017-12-20T14:27:33.000Z | 2018-04-05T22:45:12.000Z | tests/test_keywords.py | tierratelematics/pytest-play | c39a1a7e74d90aebeb30797a61d0e491942557e8 | [
"Apache-2.0"
] | 5 | 2018-06-30T15:51:39.000Z | 2020-04-13T19:31:25.000Z | import pytest
| 22.384615 | 64 | 0.685567 |
1d27314ab7fea8509c861472d1fd1cdbc7becfb3 | 224 | py | Python | python/find_largest_divisor.py | codevscolor/codevscolor | 35ef9042bdc86f45ef87795c35963b75fb64d5d7 | [
"Apache-2.0"
] | 6 | 2019-04-26T03:11:54.000Z | 2021-05-07T21:48:29.000Z | python/find_largest_divisor.py | akojif/codevscolor | 56db3dffeac8f8d76ff8fcf5656770f33765941f | [
"Apache-2.0"
] | null | null | null | python/find_largest_divisor.py | akojif/codevscolor | 56db3dffeac8f8d76ff8fcf5656770f33765941f | [
"Apache-2.0"
] | 26 | 2019-02-23T14:50:46.000Z | 2022-02-04T23:44:24.000Z | #1
num = int(input("Enter a number : "))
largest_divisor = 0
#2
for i in range(2, num):
#3
if num % i == 0:
#4
largest_divisor = i
#5
print("Largest divisor of {} is {}".format(num,largest_divisor))
| 18.666667 | 64 | 0.575893 |
1d27a3363d2c72c8ff7fcb62450ccd526ce19065 | 1,532 | py | Python | lintcode/0008-rotate-string.py | runzezhang/Data-Structure-and-Algorithm-Notebook | 15a94d7df2ac1d2ad081004d61433324654085e5 | [
"Apache-2.0"
] | 1 | 2020-07-24T03:37:05.000Z | 2020-07-24T03:37:05.000Z | lintcode/0008-rotate-string.py | runzezhang/Code-NoteBook | 15a94d7df2ac1d2ad081004d61433324654085e5 | [
"Apache-2.0"
] | null | null | null | lintcode/0008-rotate-string.py | runzezhang/Code-NoteBook | 15a94d7df2ac1d2ad081004d61433324654085e5 | [
"Apache-2.0"
] | null | null | null | # Description
#
# English
# Given a string(Given in the way of char array) and an offset, rotate the string by offset in place. (rotate from left to right)
# offset >= 0
# the length of str >= 0
# Have you met this question in a real interview?
# Example
# Example 1:
# Input: str="abcdefg", offset = 3
# Output: s... | 30.039216 | 129 | 0.640339 |
1d28dceef64377a9dfc091e14cb2bc5b41317fb7 | 5,854 | py | Python | CIFAR10/losses.py | ankanbansal/semi-supervised-learning | 1aa16e2a7ae10908f70bf9657d26a49bacc50be9 | [
"Apache-2.0"
] | null | null | null | CIFAR10/losses.py | ankanbansal/semi-supervised-learning | 1aa16e2a7ae10908f70bf9657d26a49bacc50be9 | [
"Apache-2.0"
] | 1 | 2018-10-18T18:49:33.000Z | 2018-10-18T18:49:33.000Z | CIFAR10/losses.py | ankanbansal/semi-supervised-learning | 1aa16e2a7ae10908f70bf9657d26a49bacc50be9 | [
"Apache-2.0"
] | 1 | 2018-10-18T20:59:18.000Z | 2018-10-18T20:59:18.000Z | import numpy as np
import torch
import torch.nn as nn
import torch.nn.functional as F
import ipdb
import time
# Clustering penalties
# Stochastic Transformation Stability Loss. Introduced in:
# "Regularization With Stochastic Transformations and Perturbations for Deep Semi-Supervised
# Learning"
def get_loss(los... | 41.51773 | 139 | 0.625726 |
1d2a9842977980ab181e2ea21da18fb3dfcb4476 | 1,134 | py | Python | roles/monitoring/files/cluster_monitoring_library.py | dubalda/sv-manager | 207824faf96296e9a051f959115f0f60b9a22c0e | [
"Apache-2.0"
] | 34 | 2021-05-08T08:43:05.000Z | 2022-03-30T03:03:45.000Z | roles/monitoring/files/cluster_monitoring_library.py | dubalda/sv-manager | 207824faf96296e9a051f959115f0f60b9a22c0e | [
"Apache-2.0"
] | 5 | 2021-05-14T19:50:17.000Z | 2021-11-23T23:44:44.000Z | roles/monitoring/files/cluster_monitoring_library.py | dubalda/sv-manager | 207824faf96296e9a051f959115f0f60b9a22c0e | [
"Apache-2.0"
] | 17 | 2021-05-10T21:42:25.000Z | 2022-02-23T18:03:31.000Z | import solana_rpc as rpc
| 24.652174 | 81 | 0.641093 |
1d2bb1990a65ce8c94ef800f677963660b1de9dc | 5,545 | py | Python | src/ralph_assets/rest/serializers/models_dc_asssets.py | vi4m/ralph_assets | d174e8f769da2d5a335d24bbef5d0ca2e205383c | [
"Apache-2.0"
] | null | null | null | src/ralph_assets/rest/serializers/models_dc_asssets.py | vi4m/ralph_assets | d174e8f769da2d5a335d24bbef5d0ca2e205383c | [
"Apache-2.0"
] | null | null | null | src/ralph_assets/rest/serializers/models_dc_asssets.py | vi4m/ralph_assets | d174e8f769da2d5a335d24bbef5d0ca2e205383c | [
"Apache-2.0"
] | null | null | null | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from django.core.urlresolvers import reverse
from rest_framework import serializers
from ralph_assets.models_dc_assets import (
DataCenter,
... | 32.238372 | 79 | 0.679892 |
1d2cf95c0dec50f1e5b2fe20f8276992a649f783 | 2,163 | py | Python | endochrone/ensemble/random_forest.py | nickwood/endochrone | 050a2604be82ee4cd5ee6357ea72d3d6d4117277 | [
"MIT"
] | 2 | 2020-04-20T15:41:53.000Z | 2021-11-25T18:52:20.000Z | endochrone/ensemble/random_forest.py | nickwood/endochrone | 050a2604be82ee4cd5ee6357ea72d3d6d4117277 | [
"MIT"
] | null | null | null | endochrone/ensemble/random_forest.py | nickwood/endochrone | 050a2604be82ee4cd5ee6357ea72d3d6d4117277 | [
"MIT"
] | null | null | null | # -*- coding: utf-8 -*-
import numpy as np
import time
from endochrone import Base
from endochrone.classification import BinaryDecisionTree
__author__ = "nickwood"
__copyright__ = "nickwood"
__license__ = "mit"
| 31.808824 | 72 | 0.626445 |
1d2f8198cf092ac9dcd093d637fd09e17f523d59 | 65 | py | Python | projects/microphysics/scripts/config.py | jacnugent/fv3net | 84958651bdd17784fdab98f87ad0d65414c03368 | [
"MIT"
] | 5 | 2021-03-20T22:42:40.000Z | 2021-06-30T18:39:36.000Z | projects/microphysics/scripts/config.py | jacnugent/fv3net | 84958651bdd17784fdab98f87ad0d65414c03368 | [
"MIT"
] | 195 | 2021-09-16T05:47:18.000Z | 2022-03-31T22:03:15.000Z | projects/microphysics/scripts/config.py | ai2cm/fv3net | e62038aee0a97d6207e66baabd8938467838cf51 | [
"MIT"
] | 1 | 2021-06-16T22:04:24.000Z | 2021-06-16T22:04:24.000Z | BUCKET = "vcm-ml-experiments"
PROJECT = "microphysics-emulation"
| 21.666667 | 34 | 0.769231 |
1d2fdc2424cb9c6df54a0b050148d4cc5b4644c3 | 463 | py | Python | Leetcode/1096. Brace Expansion II/solution1.py | asanoviskhak/Outtalent | c500e8ad498f76d57eb87a9776a04af7bdda913d | [
"MIT"
] | 51 | 2020-07-12T21:27:47.000Z | 2022-02-11T19:25:36.000Z | Leetcode/1096. Brace Expansion II/solution1.py | CrazySquirrel/Outtalent | 8a10b23335d8e9f080e5c39715b38bcc2916ff00 | [
"MIT"
] | null | null | null | Leetcode/1096. Brace Expansion II/solution1.py | CrazySquirrel/Outtalent | 8a10b23335d8e9f080e5c39715b38bcc2916ff00 | [
"MIT"
] | 32 | 2020-07-27T13:54:24.000Z | 2021-12-25T18:12:50.000Z | import re
| 22.047619 | 74 | 0.542117 |
1d31e93e31c793bdd05dfba69ef56693f1358e4d | 715 | py | Python | poem_generator/PoemCallback.py | Aaronsom/poem-generation | 10cccad88d073f82f6556374fdfb23a5b5e3769a | [
"MIT"
] | null | null | null | poem_generator/PoemCallback.py | Aaronsom/poem-generation | 10cccad88d073f82f6556374fdfb23a5b5e3769a | [
"MIT"
] | null | null | null | poem_generator/PoemCallback.py | Aaronsom/poem-generation | 10cccad88d073f82f6556374fdfb23a5b5e3769a | [
"MIT"
] | null | null | null | from tensorflow.keras.callbacks import Callback
from poem_generator.word_generator import generate_poem
| 39.722222 | 117 | 0.699301 |
1d33a06767c4e42865ab97028637606945438718 | 1,456 | py | Python | Inprocessing/Thomas/Python/core/optimizers/linear_shatter.py | maliha93/Fairness-Analysis-Code | acf13c6e7993704fc627249fe4ada44d8b616264 | [
"MIT"
] | 9 | 2020-07-09T07:32:57.000Z | 2022-02-25T12:21:28.000Z | Inprocessing/Thomas/Python/core/optimizers/linear_shatter.py | maliha93/Fairness-Analysis-Code | acf13c6e7993704fc627249fe4ada44d8b616264 | [
"MIT"
] | null | null | null | Inprocessing/Thomas/Python/core/optimizers/linear_shatter.py | maliha93/Fairness-Analysis-Code | acf13c6e7993704fc627249fe4ada44d8b616264 | [
"MIT"
] | 3 | 2020-07-09T12:35:09.000Z | 2021-09-06T13:54:19.000Z | import numpy as np
from scipy.spatial import ConvexHull
from core.optimizers import SMLAOptimizer
| 28 | 84 | 0.662775 |
1d366388fe3fd891610cd7eed119bc9220611ae4 | 13,464 | py | Python | vendor/pyLibrary/env/big_data.py | klahnakoski/auth0-api | eda9c2554c641da76687f64445b8d35543d012d9 | [
"MIT"
] | null | null | null | vendor/pyLibrary/env/big_data.py | klahnakoski/auth0-api | eda9c2554c641da76687f64445b8d35543d012d9 | [
"MIT"
] | null | null | null | vendor/pyLibrary/env/big_data.py | klahnakoski/auth0-api | eda9c2554c641da76687f64445b8d35543d012d9 | [
"MIT"
] | null | null | null | # encoding: utf-8
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Author: Kyle Lahnakoski (kyle@lahnakoski.com)
#
from __future__ import absolute_import, division,... | 29.142857 | 131 | 0.562908 |
1d39d676517e96a73bf0a00218bd894b6ea7add5 | 820 | py | Python | chapter_10_testing_and_tdd/dependent/test_dependent_mocked_test.py | Tm2197/Python-Architecture-Patterns | 8091b4d8e2580763ceb55a83c75aa9b6225fcb72 | [
"MIT"
] | 12 | 2021-07-20T12:55:39.000Z | 2022-02-05T10:53:38.000Z | chapter_10_testing_and_tdd/dependent/test_dependent_mocked_test.py | Tm2197/Python-Architecture-Patterns | 8091b4d8e2580763ceb55a83c75aa9b6225fcb72 | [
"MIT"
] | null | null | null | chapter_10_testing_and_tdd/dependent/test_dependent_mocked_test.py | Tm2197/Python-Architecture-Patterns | 8091b4d8e2580763ceb55a83c75aa9b6225fcb72 | [
"MIT"
] | 9 | 2021-07-22T06:01:03.000Z | 2022-03-01T05:50:45.000Z | from unittest.mock import patch
from dependent import parameter_dependent
| 22.777778 | 41 | 0.747561 |
1d39ff1e6bd4edf957d03269b5fb60c6c678992b | 416 | py | Python | test_world_rowing/test_dashboard.py | matthewghgriffiths/rowing | d682e66ca8d8a811e033ae32c2a1948376659123 | [
"MIT"
] | 1 | 2022-02-21T09:52:12.000Z | 2022-02-21T09:52:12.000Z | test_world_rowing/test_dashboard.py | matthewghgriffiths/rowing | d682e66ca8d8a811e033ae32c2a1948376659123 | [
"MIT"
] | null | null | null | test_world_rowing/test_dashboard.py | matthewghgriffiths/rowing | d682e66ca8d8a811e033ae32c2a1948376659123 | [
"MIT"
] | null | null | null |
import pytest
from world_rowing import dashboard
| 15.407407 | 66 | 0.670673 |
1d3d8280c20d0be738af64bc749e533b575ef043 | 1,665 | py | Python | plerr/tests/test_package.py | b2bs-team/pylint-errors | f1362c8afbe6b7075f805560d7699f63ad35a10b | [
"MIT"
] | 2 | 2020-10-28T23:53:59.000Z | 2020-10-29T03:31:20.000Z | plerr/tests/test_package.py | b2bs-team/pylint-errors | f1362c8afbe6b7075f805560d7699f63ad35a10b | [
"MIT"
] | null | null | null | plerr/tests/test_package.py | b2bs-team/pylint-errors | f1362c8afbe6b7075f805560d7699f63ad35a10b | [
"MIT"
] | 1 | 2020-10-28T23:53:47.000Z | 2020-10-28T23:53:47.000Z | """Tests a package installation on a user OS."""
import pathlib
import subprocess
import unittest
| 30.833333 | 77 | 0.583183 |
1d3ea69b3e4a276b5c416f98c802081047762711 | 2,826 | py | Python | src/api2db/install/make_lab.py | TristenHarr/api2db | 8c8b14280441f5153ff146c23359a0eb91022ddb | [
"MIT"
] | 45 | 2021-05-05T01:34:20.000Z | 2021-11-02T08:41:34.000Z | src/api2db/install/make_lab.py | TristenHarr/api2db | 8c8b14280441f5153ff146c23359a0eb91022ddb | [
"MIT"
] | 1 | 2021-06-02T11:43:33.000Z | 2021-06-02T20:32:29.000Z | src/api2db/install/make_lab.py | TristenHarr/api2db | 8c8b14280441f5153ff146c23359a0eb91022ddb | [
"MIT"
] | 3 | 2021-05-08T21:49:24.000Z | 2021-05-13T23:14:09.000Z | import os
_lab_components = """from api2db.ingest import *
CACHE=True # Caches API data so that only a single API call is made if True
def import_target():
return None
def pre_process():
return None
def data_features():
return None
def post_process():
return None
if __name__ == "__main__":
... | 28.836735 | 100 | 0.381812 |
1d4106adaf0d42a3f4d5f358b322161fcf83843b | 485 | py | Python | 30-39/37. sliceview/sliceview.py | dcragusa/PythonMorsels | 5f75b51a68769036e4004e9ccdada6b220124ab6 | [
"MIT"
] | 1 | 2021-11-30T05:03:24.000Z | 2021-11-30T05:03:24.000Z | 30-39/37. sliceview/sliceview.py | dcragusa/PythonMorsels | 5f75b51a68769036e4004e9ccdada6b220124ab6 | [
"MIT"
] | null | null | null | 30-39/37. sliceview/sliceview.py | dcragusa/PythonMorsels | 5f75b51a68769036e4004e9ccdada6b220124ab6 | [
"MIT"
] | 2 | 2021-04-18T05:26:43.000Z | 2021-11-28T18:46:43.000Z | from collections.abc import Sequence
| 30.3125 | 76 | 0.663918 |
1d4187041cb8f8754084b1a0b8f675142f96aee6 | 2,348 | py | Python | docs/examples/use_cases/video_superres/common/loss_scaler.py | cyyever/DALI | e2b2d5a061da605e3e9e681017a7b2d53fe41a62 | [
"ECL-2.0",
"Apache-2.0"
] | 3,967 | 2018-06-19T04:39:09.000Z | 2022-03-31T10:57:53.000Z | docs/examples/use_cases/video_superres/common/loss_scaler.py | cyyever/DALI | e2b2d5a061da605e3e9e681017a7b2d53fe41a62 | [
"ECL-2.0",
"Apache-2.0"
] | 3,494 | 2018-06-21T07:09:58.000Z | 2022-03-31T19:44:51.000Z | docs/examples/use_cases/video_superres/common/loss_scaler.py | cyyever/DALI | e2b2d5a061da605e3e9e681017a7b2d53fe41a62 | [
"ECL-2.0",
"Apache-2.0"
] | 531 | 2018-06-19T23:53:10.000Z | 2022-03-30T08:35:59.000Z | import torch
| 28.634146 | 85 | 0.617121 |
1d4187891be83646d904f0d1cc49e72009c69797 | 3,172 | py | Python | shop/forms.py | dwx9/test | a74e38369de40b9e5f481f6ac9dda6d5eb161da0 | [
"BSD-3-Clause"
] | 1 | 2021-02-11T10:01:11.000Z | 2021-02-11T10:01:11.000Z | shop/forms.py | dwx9/test | a74e38369de40b9e5f481f6ac9dda6d5eb161da0 | [
"BSD-3-Clause"
] | null | null | null | shop/forms.py | dwx9/test | a74e38369de40b9e5f481f6ac9dda6d5eb161da0 | [
"BSD-3-Clause"
] | 1 | 2020-11-08T17:56:45.000Z | 2020-11-08T17:56:45.000Z | #-*- coding: utf-8 -*-
"""Forms for the django-shop app."""
from django import forms
from django.conf import settings
from django.forms.models import modelformset_factory
from django.utils.translation import ugettext_lazy as _
from shop.backends_pool import backends_pool
from shop.models.cartmodel import CartItem
from... | 36.45977 | 116 | 0.720996 |
1d41a5d36753a39f9bdaaccc33c457eebde52284 | 6,298 | py | Python | conflowgen/tests/posthoc_analyses/test_quay_side_throughput_analysis.py | 1grasse/conflowgen | 142330ab6427254109af3b86102a30a13144ba0c | [
"MIT"
] | 5 | 2022-02-16T11:44:42.000Z | 2022-02-24T20:02:17.000Z | conflowgen/tests/posthoc_analyses/test_quay_side_throughput_analysis.py | 1grasse/conflowgen | 142330ab6427254109af3b86102a30a13144ba0c | [
"MIT"
] | 90 | 2021-12-08T14:05:44.000Z | 2022-03-24T08:53:31.000Z | conflowgen/tests/posthoc_analyses/test_quay_side_throughput_analysis.py | 1grasse/conflowgen | 142330ab6427254109af3b86102a30a13144ba0c | [
"MIT"
] | 5 | 2021-12-07T16:05:15.000Z | 2022-02-16T08:24:07.000Z | import datetime
import unittest
from conflowgen.domain_models.arrival_information import TruckArrivalInformationForPickup, \
TruckArrivalInformationForDelivery
from conflowgen.domain_models.container import Container
from conflowgen.domain_models.data_types.container_length import ContainerLength
from conflowgen.d... | 42.268456 | 115 | 0.694665 |
1d41b1db26751bf84729eea34f1bc555d8b62d08 | 591 | py | Python | backend/tests/access/test_access_user_remove.py | fjacob21/mididecweb | b65f28eb6fdeafa265796b6190a4264a5eac54ce | [
"MIT"
] | null | null | null | backend/tests/access/test_access_user_remove.py | fjacob21/mididecweb | b65f28eb6fdeafa265796b6190a4264a5eac54ce | [
"MIT"
] | 88 | 2016-11-12T14:54:38.000Z | 2018-08-02T00:25:07.000Z | backend/tests/access/test_access_user_remove.py | mididecouverte/mididecweb | b65f28eb6fdeafa265796b6190a4264a5eac54ce | [
"MIT"
] | null | null | null | from src.access import UserRemoveAccess
from generate_access_data import generate_access_data
| 36.9375 | 63 | 0.752961 |
1d42c5d5454b1ecc51005c189c8d3fc67484d164 | 541 | py | Python | tests/gdb/execute_nacl_manifest_twice.py | kapkic/native_client | 51c8bc8c249d55606232ae011bdfc8b4cab3d794 | [
"BSD-3-Clause"
] | 1 | 2021-12-23T00:36:43.000Z | 2021-12-23T00:36:43.000Z | tests/gdb/execute_nacl_manifest_twice.py | kapkic/native_client | 51c8bc8c249d55606232ae011bdfc8b4cab3d794 | [
"BSD-3-Clause"
] | null | null | null | tests/gdb/execute_nacl_manifest_twice.py | kapkic/native_client | 51c8bc8c249d55606232ae011bdfc8b4cab3d794 | [
"BSD-3-Clause"
] | null | null | null | # -*- python2 -*-
# Copyright (c) 2012 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from gdb_test import AssertEquals
import gdb_test
if __name__ == '__main__':
gdb_test.RunTest(test, '') | 28.473684 | 79 | 0.735675 |
1d4318fe475f3ff0a677d7ca22d845bd46a02756 | 1,403 | py | Python | dev/3_30_2018/UPS_Main.py | npwebste/UPS_Controller | a90ce2229108197fd48f956310ae2929e0fa5d9a | [
"AFL-1.1"
] | null | null | null | dev/3_30_2018/UPS_Main.py | npwebste/UPS_Controller | a90ce2229108197fd48f956310ae2929e0fa5d9a | [
"AFL-1.1"
] | null | null | null | dev/3_30_2018/UPS_Main.py | npwebste/UPS_Controller | a90ce2229108197fd48f956310ae2929e0fa5d9a | [
"AFL-1.1"
] | null | null | null | # Universal Power Supply Controller
# USAID Middle East Water Security Initiative
#
# Developed by: Nathan Webster
# Primary Investigator: Nathan Johnson
#
# Version History (mm_dd_yyyy)
# 1.00 03_24_2018_NW
#
######################################################
# Import Libraries
import Config
import time
import sql... | 15.086022 | 87 | 0.652887 |
1d450a8c2c7ee65bca377acf9e9a6b2af8f1bf8a | 4,054 | py | Python | bioconverters/utils.py | jakelever/biotext | 3925524f38fdeea3944bf829c8c563f09d62a13e | [
"MIT"
] | 6 | 2020-10-07T13:33:09.000Z | 2021-12-24T22:46:52.000Z | bioconverters/utils.py | jakelever/biotext | 3925524f38fdeea3944bf829c8c563f09d62a13e | [
"MIT"
] | 11 | 2021-05-21T00:06:16.000Z | 2022-02-16T12:23:25.000Z | bioconverters/utils.py | jakelever/biotext | 3925524f38fdeea3944bf829c8c563f09d62a13e | [
"MIT"
] | 4 | 2020-10-01T02:26:03.000Z | 2022-03-23T04:35:06.000Z | import re
import unicodedata
# Remove empty brackets (that could happen if the contents have been removed already
# e.g. for citation ( [3] [4] ) -> ( ) -> nothing
# Some older articles have titles like "[A study of ...]."
# This removes the brackets while retaining the full stop
# XML elements to i... | 32.174603 | 85 | 0.609521 |
1d4544e69d225092db077d2bbcbd9fa3de697615 | 17,887 | py | Python | pylinx/core.py | raczben/pylinx | 230f9e4079942c3c561681d8fc0884904f0de893 | [
"Apache-2.0"
] | null | null | null | pylinx/core.py | raczben/pylinx | 230f9e4079942c3c561681d8fc0884904f0de893 | [
"Apache-2.0"
] | 1 | 2020-07-26T14:57:42.000Z | 2020-08-26T12:26:44.000Z | pylinx/core.py | raczben/pylinx | 230f9e4079942c3c561681d8fc0884904f0de893 | [
"Apache-2.0"
] | 3 | 2019-11-28T15:29:36.000Z | 2021-11-22T07:15:59.000Z | #!/usr/bin/env python3
#
# Import built in packages
#
import logging
import platform
import os
import time
import socket
import subprocess
import signal
import psutil
from .util import setup_logger
from .util import PylinxException
import re
# Import 3th party modules:
# - wexpect/pexpect to launch... | 38.301927 | 116 | 0.592497 |
1d479001ca8c194710be9daccfb27ed5e279b01d | 532 | py | Python | b0012_integer_to_roman.py | savarin/algorithms | 4d1f8f2361de12a02f376883f648697562d177ae | [
"MIT"
] | 1 | 2020-06-16T23:22:54.000Z | 2020-06-16T23:22:54.000Z | b0012_integer_to_roman.py | savarin/algorithms | 4d1f8f2361de12a02f376883f648697562d177ae | [
"MIT"
] | null | null | null | b0012_integer_to_roman.py | savarin/algorithms | 4d1f8f2361de12a02f376883f648697562d177ae | [
"MIT"
] | null | null | null |
lookup = [
(10, "x"),
(9, "ix"),
(5, "v"),
(4, "iv"),
(1, "i"),
]
def to_roman(integer):
#
"""
"""
for decimal, roman in lookup:
if decimal <= integer:
return roman + to_roman(integer - decimal)
return ""
if __name__ == "__main__":
main()
| 15.2 | 54 | 0.513158 |
1d4b5de957e9dedc94124939d23c8450668c5a52 | 1,781 | py | Python | IAD-Laboratory-Work-1/include/dispatch.py | TolimanStaR/Intelligent-Data-Analysis-Minor | 4e50abbb14aafeb07e9037a208bbbedff4758246 | [
"MIT"
] | null | null | null | IAD-Laboratory-Work-1/include/dispatch.py | TolimanStaR/Intelligent-Data-Analysis-Minor | 4e50abbb14aafeb07e9037a208bbbedff4758246 | [
"MIT"
] | null | null | null | IAD-Laboratory-Work-1/include/dispatch.py | TolimanStaR/Intelligent-Data-Analysis-Minor | 4e50abbb14aafeb07e9037a208bbbedff4758246 | [
"MIT"
] | null | null | null | from .service import *
import multiprocessing
import threading
__recognizer = None
command_action: dict = {
'list': list_action,
'search': search,
'add': add,
'delete': delete,
'pdelete': delete_by_phone,
'edit': edit,
'get_age': get_age,
'quit': complete_session,
'help': help... | 20.709302 | 85 | 0.578888 |
1d4dd929550bf7b4692d9cb7d58e97e19856e8bd | 3,618 | py | Python | behave_tests/steps/get_events.py | Sindhuja-SRL/back-end | d84dae8ed212913339dec646b46a67fcc0b77f52 | [
"MIT"
] | null | null | null | behave_tests/steps/get_events.py | Sindhuja-SRL/back-end | d84dae8ed212913339dec646b46a67fcc0b77f52 | [
"MIT"
] | null | null | null | behave_tests/steps/get_events.py | Sindhuja-SRL/back-end | d84dae8ed212913339dec646b46a67fcc0b77f52 | [
"MIT"
] | 1 | 2022-03-11T01:45:39.000Z | 2022-03-11T01:45:39.000Z | from behave import *
import requests
from django.contrib.auth.models import User
from rest_framework.authtoken.models import Token
use_step_matcher("re")
| 29.900826 | 104 | 0.701216 |
1d4e1390d738eb0ddc1e3c14bffd7c96ac769e6a | 1,011 | py | Python | P20-Stack Abstract Data Type/Stack - Base Converter.py | necrospiritus/Python-Working-Examples | 075d410673e470fc7c4ffc262e92109a3032132f | [
"MIT"
] | null | null | null | P20-Stack Abstract Data Type/Stack - Base Converter.py | necrospiritus/Python-Working-Examples | 075d410673e470fc7c4ffc262e92109a3032132f | [
"MIT"
] | null | null | null | P20-Stack Abstract Data Type/Stack - Base Converter.py | necrospiritus/Python-Working-Examples | 075d410673e470fc7c4ffc262e92109a3032132f | [
"MIT"
] | null | null | null |
print(base_converter(196, 2))
print(base_converter(25, 8))
print(base_converter(26, 16)) | 25.923077 | 69 | 0.635015 |
1d4e5f95e9a8949b22d01dfef301296ff8f780c4 | 4,422 | py | Python | model_api/model_training/trigger_ner/model/soft_encoder.py | INK-USC/LEAN-LIFE | e3d6debc3e4c41145ef1c03236c4cf57bfd8be7d | [
"MIT"
] | 21 | 2020-09-29T12:45:50.000Z | 2022-03-27T13:11:12.000Z | model_api/model_training/trigger_ner/model/soft_encoder.py | INK-USC/LEAN-LIFE | e3d6debc3e4c41145ef1c03236c4cf57bfd8be7d | [
"MIT"
] | 3 | 2020-12-03T10:34:54.000Z | 2021-03-29T09:01:05.000Z | model_api/model_training/trigger_ner/model/soft_encoder.py | INK-USC/LEAN-LIFE | e3d6debc3e4c41145ef1c03236c4cf57bfd8be7d | [
"MIT"
] | 3 | 2021-02-14T08:39:02.000Z | 2021-07-29T02:33:14.000Z | """soft_encoder.py: Encoding sentence with LSTM.
It encodes sentence with Bi-LSTM.
After encoding, it uses all tokens for sentence, and extract some parts for trigger.
Written in 2020 by Dong-Ho Lee.
"""
from torch.nn.utils.rnn import pack_padded_sequence, pad_packed_sequence
import torch.nn as nn
import torch
from ... | 40.568807 | 120 | 0.622795 |
1d515818a17c0385781342938f73ea5ce795d738 | 1,040 | py | Python | TrajPlot/main.py | CodesDope/python-pro-course-projects | 1c334ff70f38b7db4314826853a982b7dd89ead0 | [
"MIT"
] | null | null | null | TrajPlot/main.py | CodesDope/python-pro-course-projects | 1c334ff70f38b7db4314826853a982b7dd89ead0 | [
"MIT"
] | null | null | null | TrajPlot/main.py | CodesDope/python-pro-course-projects | 1c334ff70f38b7db4314826853a982b7dd89ead0 | [
"MIT"
] | null | null | null | import matplotlib.pyplot as plt
import numpy as np
import math
angle = float(input("Enter angle (degree): "))
velocity = float(input("Enter Velocity (m/s): "))
g = 9.81
cos_theta = math.cos(math.radians(angle))
sin_theta = math.sin(math.radians(angle))
v_x = velocity * cos_theta
v_y = velocity * sin_theta
time_of_... | 20.392157 | 59 | 0.641346 |
1d523451cc925d640abefc8dc4a8dd62ec1de69a | 305 | py | Python | myscrumy/remiljscrumy/urls.py | mikkeyiv/Django-App | b1114e9e53bd673119a38a1acfefb7a9fd9f172e | [
"MIT"
] | null | null | null | myscrumy/remiljscrumy/urls.py | mikkeyiv/Django-App | b1114e9e53bd673119a38a1acfefb7a9fd9f172e | [
"MIT"
] | null | null | null | myscrumy/remiljscrumy/urls.py | mikkeyiv/Django-App | b1114e9e53bd673119a38a1acfefb7a9fd9f172e | [
"MIT"
] | null | null | null | from django.urls import include,path
from remiljscrumy import views
app_name = 'remiljscrumy'
urlpatterns = [
path('',views.index,name='index'),
path('<int:goal_id>/', views.move_goal, name = "move_goal"),
path('accounts/', include('django.contrib.auth.urls')),
]
| 16.944444 | 65 | 0.632787 |
1d527a9ea85f89d985ce11b29b779c2d5f4e16c8 | 914 | py | Python | src/django_idom/config.py | idom-team/django-idom | 940fbe21a2a5492f69fd0ba822917e4f4625c582 | [
"MIT"
] | 82 | 2021-07-23T04:42:24.000Z | 2022-03-31T10:43:30.000Z | src/django_idom/config.py | idom-team/django-idom | 940fbe21a2a5492f69fd0ba822917e4f4625c582 | [
"MIT"
] | 47 | 2021-05-20T06:53:43.000Z | 2022-03-05T22:25:21.000Z | src/django_idom/config.py | idom-team/django-idom | 940fbe21a2a5492f69fd0ba822917e4f4625c582 | [
"MIT"
] | 4 | 2021-05-17T21:51:48.000Z | 2022-02-08T08:36:08.000Z | from typing import Dict
from django.conf import settings
from django.core.cache import DEFAULT_CACHE_ALIAS
from idom.core.proto import ComponentConstructor
IDOM_REGISTERED_COMPONENTS: Dict[str, ComponentConstructor] = {}
IDOM_BASE_URL = getattr(settings, "IDOM_BASE_URL", "_idom/")
IDOM_WEBSOCKET_URL = IDOM_BASE_URL... | 31.517241 | 86 | 0.784464 |
1d54ee0f796a2f72b2598319b4e1cc6534789204 | 496 | py | Python | ox_herd/core/plugins/awstools_plugin/forms.py | empower-capital/ox_herd | 2aa77db945296c152dc8d420f42a6d6455d514fa | [
"BSD-2-Clause"
] | 1 | 2021-11-28T20:35:31.000Z | 2021-11-28T20:35:31.000Z | ox_herd/core/plugins/awstools_plugin/forms.py | empower-capital/ox_herd | 2aa77db945296c152dc8d420f42a6d6455d514fa | [
"BSD-2-Clause"
] | 5 | 2017-11-21T00:21:13.000Z | 2021-06-30T19:47:54.000Z | ox_herd/core/plugins/awstools_plugin/forms.py | empower-capital/ox_herd | 2aa77db945296c152dc8d420f42a6d6455d514fa | [
"BSD-2-Clause"
] | 4 | 2021-12-17T10:58:15.000Z | 2021-12-23T14:38:40.000Z | """Forms for ox_herd commands.
"""
from wtforms import StringField
from ox_herd.core.plugins import base
| 24.8 | 62 | 0.645161 |
1d55e3c66873c14775b1b524718c409625a3347a | 1,455 | py | Python | rpiRobot/test/dexterity/infrastructure/test_electromagnetGPIO.py | olgam4/design3 | 6e05d123a24deae7dda646df535844a158ef5cc0 | [
"WTFPL"
] | null | null | null | rpiRobot/test/dexterity/infrastructure/test_electromagnetGPIO.py | olgam4/design3 | 6e05d123a24deae7dda646df535844a158ef5cc0 | [
"WTFPL"
] | null | null | null | rpiRobot/test/dexterity/infrastructure/test_electromagnetGPIO.py | olgam4/design3 | 6e05d123a24deae7dda646df535844a158ef5cc0 | [
"WTFPL"
] | null | null | null | from unittest import TestCase
from unittest.mock import patch, Mock, DEFAULT, call
from dexterity.infrastructure.electromagnetGPIO import ElectromagnetGPIO
| 31.630435 | 77 | 0.692784 |
1d5874fe18b2e75012e32310519149b4c42547fe | 81 | py | Python | app_folder/schemas/api.py | Nuznhy/day-f-hack | 9f3dbcd73e73ea4e7807e5197bf0b0ded76bc9f3 | [
"MIT"
] | 2 | 2021-10-02T12:12:57.000Z | 2021-11-16T11:36:15.000Z | app_folder/schemas/api.py | Nuznhy/day-f-hack | 9f3dbcd73e73ea4e7807e5197bf0b0ded76bc9f3 | [
"MIT"
] | null | null | null | app_folder/schemas/api.py | Nuznhy/day-f-hack | 9f3dbcd73e73ea4e7807e5197bf0b0ded76bc9f3 | [
"MIT"
] | null | null | null | from pydantic import BaseModel
| 13.5 | 31 | 0.777778 |
1d590653c6d0bc80cf945214103ea57aa9992bdd | 1,087 | py | Python | bots/rand/rand.py | markmelnic/IS-Project | 85a4418c1ec9da4bd4fd105c20f4ca5c50d99ff5 | [
"MIT"
] | 51 | 2019-02-01T19:43:37.000Z | 2022-03-16T09:07:03.000Z | bots/rand/rand.py | markmelnic/IS-Project | 85a4418c1ec9da4bd4fd105c20f4ca5c50d99ff5 | [
"MIT"
] | 2 | 2019-02-23T18:54:22.000Z | 2019-11-09T01:30:32.000Z | bots/rand/rand.py | markmelnic/IS-Project | 85a4418c1ec9da4bd4fd105c20f4ca5c50d99ff5 | [
"MIT"
] | 35 | 2019-02-08T02:00:31.000Z | 2022-03-01T23:17:00.000Z | """
RandomBot -- A simple strategy: enumerates all legal moves, and picks one
uniformly at random.
"""
# Import the API objects
from api import State
import random
| 31.057143 | 93 | 0.645814 |
1d5c20c56742eec9a208d57b7cd8d133f379fa4b | 8,252 | py | Python | storeAdjust/models.py | FreeGodCode/store | 1ea1d6f0d6030fb58bce9a4e2d428342a0c3ad19 | [
"MIT"
] | null | null | null | storeAdjust/models.py | FreeGodCode/store | 1ea1d6f0d6030fb58bce9a4e2d428342a0c3ad19 | [
"MIT"
] | 1 | 2021-03-05T15:00:38.000Z | 2021-03-05T15:00:38.000Z | storeAdjust/models.py | FreeGodCode/store | 1ea1d6f0d6030fb58bce9a4e2d428342a0c3ad19 | [
"MIT"
] | null | null | null | import datetime
from django.db import models
# class Inventory(models.Model):
# """
#
# """
#
# STA_STATUS_CHOICES = (
# (0, ''),
# (1, '')
# )
# id = models.AutoField(primary_key=True)
# sta_identify = models.CharField(max_length=15, verbose_name='')
# sta_serial ... | 44.847826 | 131 | 0.702739 |
1d5d4eb18eb25d8b1449b6d42e4176ad70ac4a53 | 401 | py | Python | auctions/context_processors/footer_ctx.py | AH-SALAH/CS50W-commerce | 19663da14721b5fbadb691763d79d9ae66a40faa | [
"CNRI-Python"
] | null | null | null | auctions/context_processors/footer_ctx.py | AH-SALAH/CS50W-commerce | 19663da14721b5fbadb691763d79d9ae66a40faa | [
"CNRI-Python"
] | null | null | null | auctions/context_processors/footer_ctx.py | AH-SALAH/CS50W-commerce | 19663da14721b5fbadb691763d79d9ae66a40faa | [
"CNRI-Python"
] | null | null | null | from auctions.models import Category, Listing
from django.utils.timezone import now as tz_now | 33.416667 | 83 | 0.643392 |
1d5d6d8998dc584931f9eeaf41067c368cf6390e | 4,237 | py | Python | sga/operators.py | ggarrett13/genetic-algorithm-example | 02dc8664245728fff74c54493c504ec1e7bae482 | [
"MIT"
] | 1 | 2020-08-10T15:29:59.000Z | 2020-08-10T15:29:59.000Z | sga/operators.py | ggarrett13/genetic-algorithm-example | 02dc8664245728fff74c54493c504ec1e7bae482 | [
"MIT"
] | null | null | null | sga/operators.py | ggarrett13/genetic-algorithm-example | 02dc8664245728fff74c54493c504ec1e7bae482 | [
"MIT"
] | null | null | null | import numpy as np
import operator
# TODO: Make Mutation Operator.
# def convergence_or_100(population_fitness, convergence_ratio):
# if abs((np.max(population_fitness) - np.mean(population_fitness)) / np.mean(
# population_fitness)) <= convergence_ratio / 2:
# return True
# elif abs(np.... | 33.101563 | 117 | 0.64928 |
1d5e37d663df33d8a715b4a60c72cd71296f8689 | 29 | py | Python | validation/__init__.py | pauloubuntu/ocr-processing-service | 3a8e755e6ec62336499280e4a48ffbd0d41df3cf | [
"MIT"
] | 22 | 2015-06-10T22:40:11.000Z | 2018-08-12T04:26:57.000Z | validation/__init__.py | pauloubuntu/ocr-processing-service | 3a8e755e6ec62336499280e4a48ffbd0d41df3cf | [
"MIT"
] | 6 | 2015-07-31T17:52:49.000Z | 2017-03-06T11:36:00.000Z | validation/__init__.py | nfscan/ocr-processing-service | 3a8e755e6ec62336499280e4a48ffbd0d41df3cf | [
"MIT"
] | 20 | 2015-06-10T12:47:10.000Z | 2020-03-24T20:23:14.000Z | __author__ = 'paulo.rodenas'
| 14.5 | 28 | 0.758621 |